Free cookie consent management tool by TermsFeed Policy Generator

Changeset 510 for trunk


Ignore:
Timestamp:
08/13/08 13:20:33 (16 years ago)
Author:
gkronber
Message:

implemented #255 (CEDMA console should have a refresh button for the treeview with agents and results). Also deleted the obsolete timer in ConsoleEditor.

Location:
trunk/sources/HeuristicLab.CEDMA.Core
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.CEDMA.Core/AgentList.cs

    r503 r510  
    4141        database = value;
    4242        ReloadList();
     43        FireChanged();
    4344      }
    4445    }
     
    5253        agentList.Add(newAgent);
    5354      }
    54       FireChanged();
    5555    }
    5656
     
    6868      agent.Id = id;
    6969      agentList.Add(agent);
     70      FireChanged();
    7071    }
    7172
    7273    public IEnumerator<IAgent> GetEnumerator() {
     74      ReloadList();
    7375      return agentList.GetEnumerator();
    7476    }
  • trunk/sources/HeuristicLab.CEDMA.Core/AgentListView.Designer.cs

    r390 r510  
    5050      this.splitContainer1 = new System.Windows.Forms.SplitContainer();
    5151      this.agentsGroupBox = new System.Windows.Forms.GroupBox();
     52      this.agentTreeView = new System.Windows.Forms.TreeView();
    5253      this.detailsGroupBox = new System.Windows.Forms.GroupBox();
    5354      this.addButton = new System.Windows.Forms.Button();
    54       this.agentTreeView = new System.Windows.Forms.TreeView();
     55      this.refreshButton = new System.Windows.Forms.Button();
    5556      this.splitContainer1.Panel1.SuspendLayout();
    5657      this.splitContainer1.Panel2.SuspendLayout();
     
    9091      this.agentsGroupBox.Text = "&Agents";
    9192      //
     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      //
    92103      // detailsGroupBox
    93104      //
     
    111122      this.addButton.Click += new System.EventHandler(this.addButton_Click);
    112123      //
    113       // agentTreeView
     124      // refreshButton
    114125      //
    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);
    122134      //
    123135      // AgentListView
    124136      //
    125137      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
     138      this.Controls.Add(this.refreshButton);
    126139      this.Controls.Add(this.addButton);
    127140      this.Controls.Add(this.splitContainer1);
     
    143156    private System.Windows.Forms.Button addButton;
    144157    private TreeView agentTreeView;
     158    private Button refreshButton;
    145159  }
    146160}
  • trunk/sources/HeuristicLab.CEDMA.Core/AgentListView.cs

    r394 r510  
    7373    private void addButton_Click(object sender, EventArgs e) {
    7474      AgentList.CreateAgent();
    75       UpdateControls();
    7675    }
    7776    #endregion
     
    120119      }
    121120    }
     121
     122    private void refreshButton_Click(object sender, EventArgs e) {
     123      UpdateControls();
     124    }
    122125  }
    123126}
  • trunk/sources/HeuristicLab.CEDMA.Core/ConsoleEditor.cs

    r417 r510  
    3939    private Label projectLabel;
    4040    private Button newButton;
    41     private Timer refreshTimer;
    4241    private System.ComponentModel.IContainer components;
    4342    private Button opLibButton;
     
    5150
    5251    private void InitializeComponent() {
    53       this.components = new System.ComponentModel.Container();
    5452      this.uriTextBox = new System.Windows.Forms.TextBox();
    5553      this.uriLabel = new System.Windows.Forms.Label();
     
    6058      this.projectLabel = new System.Windows.Forms.Label();
    6159      this.newButton = new System.Windows.Forms.Button();
    62       this.refreshTimer = new System.Windows.Forms.Timer(this.components);
    6360      this.opLibButton = new System.Windows.Forms.Button();
    6461      this.label1 = new System.Windows.Forms.Label();
     
    143140      this.newButton.Text = "New...";
    144141      this.newButton.UseVisualStyleBackColor = true;
    145       //
    146       // refreshTimer
    147       //
    148       this.refreshTimer.Interval = 3000;
    149       this.refreshTimer.Tick += new System.EventHandler(this.refreshTimer_Tick);
    150142      //
    151143      // opLibButton
     
    197189        agentsPage.Controls.Add((Control)console.AgentList.CreateView());
    198190        agentsPage.Controls[0].Dock = DockStyle.Fill;
    199         refreshTimer.Enabled = true;
    200191        opLibButton.Enabled = true;
    201192        opLibButton.Enabled = true;
    202193      } catch(CommunicationException ex) {
    203         // TASK create helper class for error reporting
    204194        MessageBox.Show("Exception while trying to connect to " + uriTextBox.Text + "\n" + ex.Message);
    205195      }
    206     }
    207 
    208     private void refreshTimer_Tick(object sender, EventArgs e) {
    209       refreshTimer.Stop();
    210       UpdateControls();
    211       refreshTimer.Enabled = true;
    212196    }
    213197
  • trunk/sources/HeuristicLab.CEDMA.Core/ConsoleEditor.resx

    r393 r510  
    118118    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
    119119  </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>
    123120</root>
Note: See TracChangeset for help on using the changeset viewer.