Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/08/09 12:48:18 (15 years ago)
Author:
gkronber
Message:

Merged change sets from CEDMA branch to trunk:

File:
1 edited

Legend:

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

    r561 r1287  
    3636    private System.Windows.Forms.Label uriLabel;
    3737    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;
    4439    private Console console;
    4540
     
    4742      InitializeComponent();
    4843      this.console = console;
     44      serverPanel.Enabled = false;
    4945    }
    5046
     47    #region autogenerated code
    5148    private void InitializeComponent() {
    5249      this.uriTextBox = new System.Windows.Forms.TextBox();
    5350      this.uriLabel = new System.Windows.Forms.Label();
    5451      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();
    6153      this.SuspendLayout();
    6254      //
     
    8779      this.connectButton.Click += new System.EventHandler(this.connectButton_Click);
    8880      //
    89       // openOpLibButton
     81      // serverPanel
    9082      //
    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;
    14890      //
    14991      // ConsoleEditor
    15092      //
    15193      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);
    15895      this.Controls.Add(this.connectButton);
    15996      this.Controls.Add(this.uriLabel);
     
    166103    }
    167104
     105    #endregion
     106
    168107    private void connectButton_Click(object sender, EventArgs e) {
    169108      try {
    170109        console.Connect(uriTextBox.Text);
    171110        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);
    175116      } catch(CommunicationException ex) {
    176117        MessageBox.Show("Exception while trying to connect to " + uriTextBox.Text + "\n" + ex.Message);
    177118      }
    178119    }
    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     }
    196120  }
    197121}
Note: See TracChangeset for help on using the changeset viewer.