- Timestamp:
- 08/13/08 13:20:33 (16 years ago)
- Location:
- trunk/sources/HeuristicLab.CEDMA.Core
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.CEDMA.Core/AgentList.cs
r503 r510 41 41 database = value; 42 42 ReloadList(); 43 FireChanged(); 43 44 } 44 45 } … … 52 53 agentList.Add(newAgent); 53 54 } 54 FireChanged();55 55 } 56 56 … … 68 68 agent.Id = id; 69 69 agentList.Add(agent); 70 FireChanged(); 70 71 } 71 72 72 73 public IEnumerator<IAgent> GetEnumerator() { 74 ReloadList(); 73 75 return agentList.GetEnumerator(); 74 76 } -
trunk/sources/HeuristicLab.CEDMA.Core/AgentListView.Designer.cs
r390 r510 50 50 this.splitContainer1 = new System.Windows.Forms.SplitContainer(); 51 51 this.agentsGroupBox = new System.Windows.Forms.GroupBox(); 52 this.agentTreeView = new System.Windows.Forms.TreeView(); 52 53 this.detailsGroupBox = new System.Windows.Forms.GroupBox(); 53 54 this.addButton = new System.Windows.Forms.Button(); 54 this. agentTreeView = new System.Windows.Forms.TreeView();55 this.refreshButton = new System.Windows.Forms.Button(); 55 56 this.splitContainer1.Panel1.SuspendLayout(); 56 57 this.splitContainer1.Panel2.SuspendLayout(); … … 90 91 this.agentsGroupBox.Text = "&Agents"; 91 92 // 93 // agentTreeView 94 // 95 this.agentTreeView.Dock = System.Windows.Forms.DockStyle.Fill; 96 this.agentTreeView.Location = new System.Drawing.Point(3, 16); 97 this.agentTreeView.Name = "agentTreeView"; 98 this.agentTreeView.Size = new System.Drawing.Size(129, 136); 99 this.agentTreeView.TabIndex = 0; 100 this.agentTreeView.BeforeExpand += new System.Windows.Forms.TreeViewCancelEventHandler(this.agentTreeView_BeforeExpand); 101 this.agentTreeView.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.agentTreeView_AfterSelect); 102 // 92 103 // detailsGroupBox 93 104 // … … 111 122 this.addButton.Click += new System.EventHandler(this.addButton_Click); 112 123 // 113 // agentTreeView124 // refreshButton 114 125 // 115 this.agentTreeView.Dock = System.Windows.Forms.DockStyle.Fill; 116 this.agentTreeView.Location = new System.Drawing.Point(3, 16); 117 this.agentTreeView.Name = "agentTreeView"; 118 this.agentTreeView.Size = new System.Drawing.Size(129, 136); 119 this.agentTreeView.TabIndex = 0; 120 this.agentTreeView.BeforeExpand += new System.Windows.Forms.TreeViewCancelEventHandler(this.agentTreeView_BeforeExpand); 121 this.agentTreeView.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.agentTreeView_AfterSelect); 126 this.refreshButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); 127 this.refreshButton.Location = new System.Drawing.Point(81, 161); 128 this.refreshButton.Name = "refreshButton"; 129 this.refreshButton.Size = new System.Drawing.Size(75, 23); 130 this.refreshButton.TabIndex = 2; 131 this.refreshButton.Text = "&Refresh"; 132 this.refreshButton.UseVisualStyleBackColor = true; 133 this.refreshButton.Click += new System.EventHandler(this.refreshButton_Click); 122 134 // 123 135 // AgentListView 124 136 // 125 137 this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 138 this.Controls.Add(this.refreshButton); 126 139 this.Controls.Add(this.addButton); 127 140 this.Controls.Add(this.splitContainer1); … … 143 156 private System.Windows.Forms.Button addButton; 144 157 private TreeView agentTreeView; 158 private Button refreshButton; 145 159 } 146 160 } -
trunk/sources/HeuristicLab.CEDMA.Core/AgentListView.cs
r394 r510 73 73 private void addButton_Click(object sender, EventArgs e) { 74 74 AgentList.CreateAgent(); 75 UpdateControls();76 75 } 77 76 #endregion … … 120 119 } 121 120 } 121 122 private void refreshButton_Click(object sender, EventArgs e) { 123 UpdateControls(); 124 } 122 125 } 123 126 } -
trunk/sources/HeuristicLab.CEDMA.Core/ConsoleEditor.cs
r417 r510 39 39 private Label projectLabel; 40 40 private Button newButton; 41 private Timer refreshTimer;42 41 private System.ComponentModel.IContainer components; 43 42 private Button opLibButton; … … 51 50 52 51 private void InitializeComponent() { 53 this.components = new System.ComponentModel.Container();54 52 this.uriTextBox = new System.Windows.Forms.TextBox(); 55 53 this.uriLabel = new System.Windows.Forms.Label(); … … 60 58 this.projectLabel = new System.Windows.Forms.Label(); 61 59 this.newButton = new System.Windows.Forms.Button(); 62 this.refreshTimer = new System.Windows.Forms.Timer(this.components);63 60 this.opLibButton = new System.Windows.Forms.Button(); 64 61 this.label1 = new System.Windows.Forms.Label(); … … 143 140 this.newButton.Text = "New..."; 144 141 this.newButton.UseVisualStyleBackColor = true; 145 //146 // refreshTimer147 //148 this.refreshTimer.Interval = 3000;149 this.refreshTimer.Tick += new System.EventHandler(this.refreshTimer_Tick);150 142 // 151 143 // opLibButton … … 197 189 agentsPage.Controls.Add((Control)console.AgentList.CreateView()); 198 190 agentsPage.Controls[0].Dock = DockStyle.Fill; 199 refreshTimer.Enabled = true;200 191 opLibButton.Enabled = true; 201 192 opLibButton.Enabled = true; 202 193 } catch(CommunicationException ex) { 203 // TASK create helper class for error reporting204 194 MessageBox.Show("Exception while trying to connect to " + uriTextBox.Text + "\n" + ex.Message); 205 195 } 206 }207 208 private void refreshTimer_Tick(object sender, EventArgs e) {209 refreshTimer.Stop();210 UpdateControls();211 refreshTimer.Enabled = true;212 196 } 213 197 -
trunk/sources/HeuristicLab.CEDMA.Core/ConsoleEditor.resx
r393 r510 118 118 <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> 119 119 </resheader> 120 <metadata name="refreshTimer.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">121 <value>17, 17</value>122 </metadata>123 120 </root>
Note: See TracChangeset
for help on using the changeset viewer.