Changeset 1287 for trunk/sources/HeuristicLab.CEDMA.Core/ConsoleEditor.cs
- Timestamp:
- 03/08/09 12:48:18 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.CEDMA.Core/ConsoleEditor.cs
r561 r1287 36 36 private System.Windows.Forms.Label uriLabel; 37 37 private Button connectButton; 38 private Button openOpLibButton; 39 private Label label1; 40 private Label resultsLabel; 41 private Button openResultsButton; 42 private Button openAgentsButton; 43 private Label agentsLabel; 38 private Panel serverPanel; 44 39 private Console console; 45 40 … … 47 42 InitializeComponent(); 48 43 this.console = console; 44 serverPanel.Enabled = false; 49 45 } 50 46 47 #region autogenerated code 51 48 private void InitializeComponent() { 52 49 this.uriTextBox = new System.Windows.Forms.TextBox(); 53 50 this.uriLabel = new System.Windows.Forms.Label(); 54 51 this.connectButton = new System.Windows.Forms.Button(); 55 this.openOpLibButton = new System.Windows.Forms.Button(); 56 this.label1 = new System.Windows.Forms.Label(); 57 this.resultsLabel = new System.Windows.Forms.Label(); 58 this.openResultsButton = new System.Windows.Forms.Button(); 59 this.openAgentsButton = new System.Windows.Forms.Button(); 60 this.agentsLabel = new System.Windows.Forms.Label(); 52 this.serverPanel = new System.Windows.Forms.Panel(); 61 53 this.SuspendLayout(); 62 54 // … … 87 79 this.connectButton.Click += new System.EventHandler(this.connectButton_Click); 88 80 // 89 // openOpLibButton81 // serverPanel 90 82 // 91 this.openOpLibButton.Enabled = false; 92 this.openOpLibButton.Location = new System.Drawing.Point(94, 85); 93 this.openOpLibButton.Name = "openOpLibButton"; 94 this.openOpLibButton.Size = new System.Drawing.Size(75, 23); 95 this.openOpLibButton.TabIndex = 7; 96 this.openOpLibButton.Text = "&Open"; 97 this.openOpLibButton.UseVisualStyleBackColor = true; 98 this.openOpLibButton.Click += new System.EventHandler(this.opLibButton_Click); 99 // 100 // label1 101 // 102 this.label1.AutoSize = true; 103 this.label1.Location = new System.Drawing.Point(3, 90); 104 this.label1.Name = "label1"; 105 this.label1.Size = new System.Drawing.Size(85, 13); 106 this.label1.TabIndex = 8; 107 this.label1.Text = "Operator Library:"; 108 // 109 // resultsLabel 110 // 111 this.resultsLabel.AutoSize = true; 112 this.resultsLabel.Location = new System.Drawing.Point(43, 61); 113 this.resultsLabel.Name = "resultsLabel"; 114 this.resultsLabel.Size = new System.Drawing.Size(45, 13); 115 this.resultsLabel.TabIndex = 9; 116 this.resultsLabel.Text = "Results:"; 117 // 118 // openResultsButton 119 // 120 this.openResultsButton.Enabled = false; 121 this.openResultsButton.Location = new System.Drawing.Point(94, 56); 122 this.openResultsButton.Name = "openResultsButton"; 123 this.openResultsButton.Size = new System.Drawing.Size(75, 23); 124 this.openResultsButton.TabIndex = 10; 125 this.openResultsButton.Text = "&Open"; 126 this.openResultsButton.UseVisualStyleBackColor = true; 127 this.openResultsButton.Click += new System.EventHandler(this.openChartButton_Click); 128 // 129 // openAgentsButton 130 // 131 this.openAgentsButton.Enabled = false; 132 this.openAgentsButton.Location = new System.Drawing.Point(94, 27); 133 this.openAgentsButton.Name = "openAgentsButton"; 134 this.openAgentsButton.Size = new System.Drawing.Size(75, 23); 135 this.openAgentsButton.TabIndex = 12; 136 this.openAgentsButton.Text = "&Open"; 137 this.openAgentsButton.UseVisualStyleBackColor = true; 138 this.openAgentsButton.Click += new System.EventHandler(this.openAgentsButton_Click); 139 // 140 // agentsLabel 141 // 142 this.agentsLabel.AutoSize = true; 143 this.agentsLabel.Location = new System.Drawing.Point(45, 32); 144 this.agentsLabel.Name = "agentsLabel"; 145 this.agentsLabel.Size = new System.Drawing.Size(43, 13); 146 this.agentsLabel.TabIndex = 11; 147 this.agentsLabel.Text = "Agents:"; 83 this.serverPanel.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 84 | System.Windows.Forms.AnchorStyles.Left) 85 | System.Windows.Forms.AnchorStyles.Right))); 86 this.serverPanel.Location = new System.Drawing.Point(3, 29); 87 this.serverPanel.Name = "serverPanel"; 88 this.serverPanel.Size = new System.Drawing.Size(439, 157); 89 this.serverPanel.TabIndex = 4; 148 90 // 149 91 // ConsoleEditor 150 92 // 151 93 this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 152 this.Controls.Add(this.openAgentsButton); 153 this.Controls.Add(this.agentsLabel); 154 this.Controls.Add(this.openResultsButton); 155 this.Controls.Add(this.resultsLabel); 156 this.Controls.Add(this.label1); 157 this.Controls.Add(this.openOpLibButton); 94 this.Controls.Add(this.serverPanel); 158 95 this.Controls.Add(this.connectButton); 159 96 this.Controls.Add(this.uriLabel); … … 166 103 } 167 104 105 #endregion 106 168 107 private void connectButton_Click(object sender, EventArgs e) { 169 108 try { 170 109 console.Connect(uriTextBox.Text); 171 110 connectButton.Enabled = false; 172 openOpLibButton.Enabled = true; 173 openAgentsButton.Enabled = true; 174 openResultsButton.Enabled = true; 111 serverPanel.Enabled = true; 112 serverPanel.Controls.Clear(); 113 Control dataSetListView = (Control)console.DataSetList.CreateView(); 114 dataSetListView.Dock = DockStyle.Fill; 115 serverPanel.Controls.Add(dataSetListView); 175 116 } catch(CommunicationException ex) { 176 117 MessageBox.Show("Exception while trying to connect to " + uriTextBox.Text + "\n" + ex.Message); 177 118 } 178 119 } 179 180 private void opLibButton_Click(object sender, EventArgs e) {181 IOperatorLibrary opLib = console.OperatorLibrary;182 if(opLib != null) {183 IView view = opLib.CreateView();184 if(view != null)185 PluginManager.ControlManager.ShowControl(view);186 }187 }188 189 private void openChartButton_Click(object sender, EventArgs e) {190 PluginManager.ControlManager.ShowControl(console.ResultsList.CreateView());191 }192 193 private void openAgentsButton_Click(object sender, EventArgs e) {194 PluginManager.ControlManager.ShowControl(console.AgentList.CreateView());195 }196 120 } 197 121 }
Note: See TracChangeset
for help on using the changeset viewer.