1 | #region License Information
|
---|
2 | /* HeuristicLab
|
---|
3 | * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
|
---|
4 | *
|
---|
5 | * This file is part of HeuristicLab.
|
---|
6 | *
|
---|
7 | * HeuristicLab is free software: you can redistribute it and/or modify
|
---|
8 | * it under the terms of the GNU General Public License as published by
|
---|
9 | * the Free Software Foundation, either version 3 of the License, or
|
---|
10 | * (at your option) any later version.
|
---|
11 | *
|
---|
12 | * HeuristicLab is distributed in the hope that it will be useful,
|
---|
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
15 | * GNU General Public License for more details.
|
---|
16 | *
|
---|
17 | * You should have received a copy of the GNU General Public License
|
---|
18 | * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
|
---|
19 | */
|
---|
20 | #endregion
|
---|
21 |
|
---|
22 | using System;
|
---|
23 | using System.Collections.Generic;
|
---|
24 | using System.Linq;
|
---|
25 | using System.Text;
|
---|
26 | using HeuristicLab.MainForm.WindowsForms;
|
---|
27 |
|
---|
28 | namespace HeuristicLab.PluginAdministrator {
|
---|
29 | internal class MainForm : DockingMainForm {
|
---|
30 | private System.Windows.Forms.ToolStripProgressBar progressBar;
|
---|
31 | private System.Windows.Forms.ToolStripLabel statusLabel;
|
---|
32 | public MainForm(Type type)
|
---|
33 | : base(type) {
|
---|
34 | InitializeComponent();
|
---|
35 | this.Controls.Remove(toolStrip);
|
---|
36 | this.statusStrip.Items.Add(progressBar);
|
---|
37 | this.statusStrip.Items.Add(statusLabel);
|
---|
38 | }
|
---|
39 |
|
---|
40 | protected override void OnInitialized(EventArgs e) {
|
---|
41 | base.OnInitialized(e);
|
---|
42 | (new PluginEditor()).Show();
|
---|
43 | }
|
---|
44 |
|
---|
45 | private void InitializeComponent() {
|
---|
46 | this.progressBar = new System.Windows.Forms.ToolStripProgressBar();
|
---|
47 | this.statusLabel = new System.Windows.Forms.ToolStripLabel();
|
---|
48 | this.SuspendLayout();
|
---|
49 | //
|
---|
50 | // progressBar
|
---|
51 | //
|
---|
52 | this.progressBar.MarqueeAnimationSpeed = 30;
|
---|
53 | this.progressBar.Name = "progressBar";
|
---|
54 | this.progressBar.Size = new System.Drawing.Size(100, 16);
|
---|
55 | this.progressBar.Style = System.Windows.Forms.ProgressBarStyle.Marquee;
|
---|
56 | this.progressBar.Visible = false;
|
---|
57 |
|
---|
58 | this.statusLabel.Name = "statusLabel";
|
---|
59 | this.statusLabel.Visible = true;
|
---|
60 | //
|
---|
61 | // MainForm
|
---|
62 | //
|
---|
63 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
---|
64 | this.ClientSize = new System.Drawing.Size(770, 550);
|
---|
65 | this.Name = "MainForm";
|
---|
66 | this.ResumeLayout(false);
|
---|
67 | this.PerformLayout();
|
---|
68 |
|
---|
69 | }
|
---|
70 |
|
---|
71 | public void ShowProgressBar() {
|
---|
72 | progressBar.Visible = true;
|
---|
73 | }
|
---|
74 |
|
---|
75 | public void HideProgressBar() {
|
---|
76 | progressBar.Visible = false;
|
---|
77 | }
|
---|
78 |
|
---|
79 | public void SetStatusBarText(string msg) {
|
---|
80 | statusLabel.Text = msg;
|
---|
81 | }
|
---|
82 | }
|
---|
83 | }
|
---|