Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/19/08 17:05:56 (16 years ago)
Author:
aleitner
Message:

two Forms communication in ServerConsole (Login and Information-form) (#369)

Location:
trunk/sources/HeuristicLab.Hive.Server.Console
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Hive.Server.Console

    • Property svn:ignore set to
      *.user
      bin
      obj
  • trunk/sources/HeuristicLab.Hive.Server.Console/HiveServerConsole.cs

    r778 r785  
    3434  public partial class HiveServerConsole : Form {
    3535
     36    HiveServerConsoleInformation information = null;
    3637
    3738    public HiveServerConsole() {
     
    4748      if (ipIsValid()) {
    4849        this.Visible = false;
    49         // Form information = new HiveServerConsoleInformation();
    50         // Application.Run(information);
    51         this.Visible = true;
     50        information = new HiveServerConsoleInformation();
     51        information.closeFormEvent += new closeForm(enableForm);
     52        information.Show();
    5253      }
    5354    }
     
    5657      return true;
    5758    }
     59
     60    private void enableForm(bool cf) {
     61      if (cf) {
     62        this.Visible = true;
     63      }
     64    }
    5865  }
    5966}
  • trunk/sources/HeuristicLab.Hive.Server.Console/HiveServerConsoleInformation.Designer.cs

    r778 r785  
    2424    /// </summary>
    2525    private void InitializeComponent() {
     26      this.menuStrip1 = new System.Windows.Forms.MenuStrip();
     27      this.informationToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
     28      this.closeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
     29      this.menuStrip1.SuspendLayout();
    2630      this.SuspendLayout();
     31      //
     32      // menuStrip1
     33      //
     34      this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
     35            this.informationToolStripMenuItem});
     36      this.menuStrip1.Location = new System.Drawing.Point(0, 0);
     37      this.menuStrip1.Name = "menuStrip1";
     38      this.menuStrip1.Size = new System.Drawing.Size(651, 24);
     39      this.menuStrip1.TabIndex = 0;
     40      this.menuStrip1.Text = "menuStrip1";
     41      //
     42      // informationToolStripMenuItem
     43      //
     44      this.informationToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
     45            this.closeToolStripMenuItem});
     46      this.informationToolStripMenuItem.Name = "informationToolStripMenuItem";
     47      this.informationToolStripMenuItem.Size = new System.Drawing.Size(75, 20);
     48      this.informationToolStripMenuItem.Text = "Information";
     49      //
     50      // closeToolStripMenuItem
     51      //
     52      this.closeToolStripMenuItem.Name = "closeToolStripMenuItem";
     53      this.closeToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
     54      this.closeToolStripMenuItem.Text = "Close";
     55      this.closeToolStripMenuItem.Click += new System.EventHandler(this.close_Click);
    2756      //
    2857      // HiveServerConsoleInformation
     
    3160      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
    3261      this.ClientSize = new System.Drawing.Size(651, 402);
     62      this.Controls.Add(this.menuStrip1);
     63      this.MainMenuStrip = this.menuStrip1;
    3364      this.Name = "HiveServerConsoleInformation";
    3465      this.Text = "HiveServerConsoleInformation";
     66      this.Click += new System.EventHandler(this.close_Click);
     67      this.menuStrip1.ResumeLayout(false);
     68      this.menuStrip1.PerformLayout();
    3569      this.ResumeLayout(false);
     70      this.PerformLayout();
    3671
    3772    }
    3873
    3974    #endregion
     75
     76    private System.Windows.Forms.MenuStrip menuStrip1;
     77    private System.Windows.Forms.ToolStripMenuItem informationToolStripMenuItem;
     78    private System.Windows.Forms.ToolStripMenuItem closeToolStripMenuItem;
    4079  }
    4180}
  • trunk/sources/HeuristicLab.Hive.Server.Console/HiveServerConsoleInformation.cs

    r778 r785  
    1 using System;
     1#region License Information
     2/* HeuristicLab
     3 * Copyright (C) 2002-2008 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
     22using System;
    223using System.Collections.Generic;
    324using System.ComponentModel;
     
    930
    1031namespace HeuristicLab.Hive.Server.Console {
     32
     33  public delegate void closeForm(bool cf);
     34
    1135  public partial class HiveServerConsoleInformation : Form {
     36
     37    public event closeForm closeFormEvent;
     38
    1239    public HiveServerConsoleInformation() {
    1340      InitializeComponent();
    1441    }
     42
     43    private void close_Click(object sender, EventArgs e) {
     44      if (closeFormEvent != null) {
     45        closeFormEvent(true);
     46      }
     47      this.Close();
     48    }
    1549  }
    1650}
  • trunk/sources/HeuristicLab.Hive.Server.Console/HiveServerConsoleInformation.resx

    r778 r785  
    118118    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
    119119  </resheader>
     120  <metadata name="menuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
     121    <value>17, 17</value>
     122  </metadata>
    120123</root>
  • trunk/sources/HeuristicLab.Hive.Server.Console/Properties

    • Property svn:ignore set to
      AssemblyInfo.cs
Note: See TracChangeset for help on using the changeset viewer.