Free cookie consent management tool by TermsFeed Policy Generator

Changeset 1381


Ignore:
Timestamp:
03/20/09 14:00:35 (16 years ago)
Author:
aleitner
Message:

deleted user controls
job control will be showed on update
(#508)

Location:
branches/Hive_Management_Console_Refactoring_Ticket508/HeuristicLab.Hive.Server.Console
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/Hive_Management_Console_Refactoring_Ticket508/HeuristicLab.Hive.Server.Console/Changes.cs

    r1273 r1381  
    1414
    1515    public Change ChangeType { get; set; }
     16
     17    public int Position { get; set; }
    1618  }
    1719}
  • branches/Hive_Management_Console_Refactoring_Ticket508/HeuristicLab.Hive.Server.Console/HiveServerManagementConsole.Designer.cs

    r1261 r1381  
    3131      this.addToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
    3232      this.jobToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
    33       this.userToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
    34       this.userToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
    35       this.groupToolStripMenuItem2 = new System.Windows.Forms.ToolStripMenuItem();
    36       this.tcManagementConsole = new System.Windows.Forms.TabControl();
    37       this.tpClientControl = new System.Windows.Forms.TabPage();
    38       this.scClientControl = new System.Windows.Forms.SplitContainer();
    39       this.tvClientControl = new System.Windows.Forms.TreeView();
    40       this.lvClientControl = new System.Windows.Forms.ListView();
    4133      this.ilClientControl = new System.Windows.Forms.ImageList(this.components);
    42       this.tpJobControl = new System.Windows.Forms.TabPage();
    43       this.scJobControl = new System.Windows.Forms.SplitContainer();
    44       this.tvJobControl = new System.Windows.Forms.TreeView();
    45       this.lvJobControl = new System.Windows.Forms.ListView();
    4634      this.ilJobControl = new System.Windows.Forms.ImageList(this.components);
    47       this.tpUserControl = new System.Windows.Forms.TabPage();
    48       this.scUserControl = new System.Windows.Forms.SplitContainer();
    49       this.tvUserControl = new System.Windows.Forms.TreeView();
    50       this.lvUserControl = new System.Windows.Forms.ListView();
    5135      this.ilUserControl = new System.Windows.Forms.ImageList(this.components);
    5236      this.plClientDetails = new System.Windows.Forms.Panel();
     
    8569      this.fileSystemWatcher1 = new System.IO.FileSystemWatcher();
    8670      this.updaterWoker = new System.ComponentModel.BackgroundWorker();
     71      this.tpJobControl = new System.Windows.Forms.TabPage();
     72      this.scJobControl = new System.Windows.Forms.SplitContainer();
     73      this.lvJobControl = new System.Windows.Forms.ListView();
     74      this.tvJobControl = new System.Windows.Forms.TreeView();
     75      this.tpClientControl = new System.Windows.Forms.TabPage();
     76      this.scClientControl = new System.Windows.Forms.SplitContainer();
     77      this.lvClientControl = new System.Windows.Forms.ListView();
     78      this.tvClientControl = new System.Windows.Forms.TreeView();
     79      this.tcManagementConsole = new System.Windows.Forms.TabControl();
    8780      this.menuStrip1.SuspendLayout();
    88       this.tcManagementConsole.SuspendLayout();
    89       this.tpClientControl.SuspendLayout();
    90       this.scClientControl.Panel1.SuspendLayout();
    91       this.scClientControl.Panel2.SuspendLayout();
    92       this.scClientControl.SuspendLayout();
    93       this.tpJobControl.SuspendLayout();
    94       this.scJobControl.Panel1.SuspendLayout();
    95       this.scJobControl.Panel2.SuspendLayout();
    96       this.scJobControl.SuspendLayout();
    97       this.tpUserControl.SuspendLayout();
    98       this.scUserControl.Panel1.SuspendLayout();
    99       this.scUserControl.Panel2.SuspendLayout();
    100       this.scUserControl.SuspendLayout();
    10181      this.plClientDetails.SuspendLayout();
    10282      ((System.ComponentModel.ISupportInitialize)(this.pbClientControl)).BeginInit();
     
    10686      ((System.ComponentModel.ISupportInitialize)(this.pbJobControl)).BeginInit();
    10787      ((System.ComponentModel.ISupportInitialize)(this.fileSystemWatcher1)).BeginInit();
     88      this.tpJobControl.SuspendLayout();
     89      this.scJobControl.Panel1.SuspendLayout();
     90      this.scJobControl.Panel2.SuspendLayout();
     91      this.scJobControl.SuspendLayout();
     92      this.tpClientControl.SuspendLayout();
     93      this.scClientControl.Panel1.SuspendLayout();
     94      this.scClientControl.Panel2.SuspendLayout();
     95      this.scClientControl.SuspendLayout();
     96      this.tcManagementConsole.SuspendLayout();
    10897      this.SuspendLayout();
    10998      //
     
    137126      //
    138127      this.addToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
    139             this.jobToolStripMenuItem,
    140             this.userToolStripMenuItem});
     128            this.jobToolStripMenuItem});
    141129      this.addToolStripMenuItem.Name = "addToolStripMenuItem";
    142130      this.addToolStripMenuItem.Size = new System.Drawing.Size(38, 20);
     
    149137      this.jobToolStripMenuItem.Text = "Job";
    150138      this.jobToolStripMenuItem.Click += new System.EventHandler(this.AddJob_Click);
    151       //
    152       // userToolStripMenuItem
    153       //
    154       this.userToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
    155             this.userToolStripMenuItem1,
    156             this.groupToolStripMenuItem2});
    157       this.userToolStripMenuItem.Name = "userToolStripMenuItem";
    158       this.userToolStripMenuItem.Size = new System.Drawing.Size(107, 22);
    159       this.userToolStripMenuItem.Text = "User";
    160       //
    161       // userToolStripMenuItem1
    162       //
    163       this.userToolStripMenuItem1.Name = "userToolStripMenuItem1";
    164       this.userToolStripMenuItem1.Size = new System.Drawing.Size(114, 22);
    165       this.userToolStripMenuItem1.Text = "User";
    166       this.userToolStripMenuItem1.Click += new System.EventHandler(this.AddUser_Click);
    167       //
    168       // groupToolStripMenuItem2
    169       //
    170       this.groupToolStripMenuItem2.Name = "groupToolStripMenuItem2";
    171       this.groupToolStripMenuItem2.Size = new System.Drawing.Size(114, 22);
    172       this.groupToolStripMenuItem2.Text = "Group";
    173       this.groupToolStripMenuItem2.Click += new System.EventHandler(this.AddUserGroup_Click);
    174       //
    175       // tcManagementConsole
    176       //
    177       this.tcManagementConsole.Controls.Add(this.tpClientControl);
    178       this.tcManagementConsole.Controls.Add(this.tpJobControl);
    179       this.tcManagementConsole.Controls.Add(this.tpUserControl);
    180       this.tcManagementConsole.Dock = System.Windows.Forms.DockStyle.Fill;
    181       this.tcManagementConsole.Location = new System.Drawing.Point(0, 24);
    182       this.tcManagementConsole.Name = "tcManagementConsole";
    183       this.tcManagementConsole.SelectedIndex = 0;
    184       this.tcManagementConsole.Size = new System.Drawing.Size(651, 378);
    185       this.tcManagementConsole.TabIndex = 1;
    186       //
    187       // tpClientControl
    188       //
    189       this.tpClientControl.AllowDrop = true;
    190       this.tpClientControl.Controls.Add(this.scClientControl);
    191       this.tpClientControl.Location = new System.Drawing.Point(4, 22);
    192       this.tpClientControl.Name = "tpClientControl";
    193       this.tpClientControl.Padding = new System.Windows.Forms.Padding(3);
    194       this.tpClientControl.Size = new System.Drawing.Size(643, 352);
    195       this.tpClientControl.TabIndex = 0;
    196       this.tpClientControl.Text = "Client Control";
    197       this.tpClientControl.UseVisualStyleBackColor = true;
    198       //
    199       // scClientControl
    200       //
    201       this.scClientControl.Dock = System.Windows.Forms.DockStyle.Fill;
    202       this.scClientControl.Location = new System.Drawing.Point(3, 3);
    203       this.scClientControl.Name = "scClientControl";
    204       //
    205       // scClientControl.Panel1
    206       //
    207       this.scClientControl.Panel1.Controls.Add(this.tvClientControl);
    208       //
    209       // scClientControl.Panel2
    210       //
    211       this.scClientControl.Panel2.Controls.Add(this.lvClientControl);
    212       this.scClientControl.Size = new System.Drawing.Size(637, 346);
    213       this.scClientControl.SplitterDistance = 139;
    214       this.scClientControl.TabIndex = 0;
    215       //
    216       // tvClientControl
    217       //
    218       this.tvClientControl.Dock = System.Windows.Forms.DockStyle.Fill;
    219       this.tvClientControl.Location = new System.Drawing.Point(0, 0);
    220       this.tvClientControl.Name = "tvClientControl";
    221       this.tvClientControl.Size = new System.Drawing.Size(139, 346);
    222       this.tvClientControl.TabIndex = 0;
    223       this.tvClientControl.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.OnTVClientClicked);
    224       //
    225       // lvClientControl
    226       //
    227       this.lvClientControl.AllowDrop = true;
    228       this.lvClientControl.Dock = System.Windows.Forms.DockStyle.Fill;
    229       this.lvClientControl.ImeMode = System.Windows.Forms.ImeMode.Off;
    230       this.lvClientControl.LargeImageList = this.ilClientControl;
    231       this.lvClientControl.Location = new System.Drawing.Point(0, 0);
    232       this.lvClientControl.MultiSelect = false;
    233       this.lvClientControl.Name = "lvClientControl";
    234       this.lvClientControl.Size = new System.Drawing.Size(494, 346);
    235       this.lvClientControl.TabIndex = 0;
    236       this.lvClientControl.UseCompatibleStateImageBehavior = false;
    237       this.lvClientControl.Click += new System.EventHandler(this.OnLVClientClicked);
    238139      //
    239140      // ilClientControl
     
    245146      this.ilClientControl.Images.SetKeyName(2, "monitor-red.png");
    246147      //
    247       // tpJobControl
    248       //
    249       this.tpJobControl.Controls.Add(this.scJobControl);
    250       this.tpJobControl.Location = new System.Drawing.Point(4, 22);
    251       this.tpJobControl.Name = "tpJobControl";
    252       this.tpJobControl.Padding = new System.Windows.Forms.Padding(3);
    253       this.tpJobControl.Size = new System.Drawing.Size(643, 352);
    254       this.tpJobControl.TabIndex = 1;
    255       this.tpJobControl.Text = "Job Control";
    256       this.tpJobControl.UseVisualStyleBackColor = true;
    257       //
    258       // scJobControl
    259       //
    260       this.scJobControl.Dock = System.Windows.Forms.DockStyle.Fill;
    261       this.scJobControl.Location = new System.Drawing.Point(3, 3);
    262       this.scJobControl.Name = "scJobControl";
    263       //
    264       // scJobControl.Panel1
    265       //
    266       this.scJobControl.Panel1.Controls.Add(this.tvJobControl);
    267       //
    268       // scJobControl.Panel2
    269       //
    270       this.scJobControl.Panel2.Controls.Add(this.lvJobControl);
    271       this.scJobControl.Size = new System.Drawing.Size(637, 346);
    272       this.scJobControl.SplitterDistance = 139;
    273       this.scJobControl.TabIndex = 1;
    274       //
    275       // tvJobControl
    276       //
    277       this.tvJobControl.Dock = System.Windows.Forms.DockStyle.Fill;
    278       this.tvJobControl.Location = new System.Drawing.Point(0, 0);
    279       this.tvJobControl.Name = "tvJobControl";
    280       this.tvJobControl.Size = new System.Drawing.Size(139, 346);
    281       this.tvJobControl.TabIndex = 2;
    282       this.tvJobControl.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.OnTVJobControlClicked);
    283       //
    284       // lvJobControl
    285       //
    286       this.lvJobControl.AllowDrop = true;
    287       this.lvJobControl.Dock = System.Windows.Forms.DockStyle.Fill;
    288       this.lvJobControl.LargeImageList = this.ilJobControl;
    289       this.lvJobControl.Location = new System.Drawing.Point(0, 0);
    290       this.lvJobControl.MultiSelect = false;
    291       this.lvJobControl.Name = "lvJobControl";
    292       this.lvJobControl.Size = new System.Drawing.Size(494, 346);
    293       this.lvJobControl.TabIndex = 0;
    294       this.lvJobControl.UseCompatibleStateImageBehavior = false;
    295       this.lvJobControl.MouseMove += new System.Windows.Forms.MouseEventHandler(this.lvJobControl_MouseMove);
    296       this.lvJobControl.Click += new System.EventHandler(this.OnLVJobControlClicked);
    297       //
    298148      // ilJobControl
    299149      //
     
    301151      this.ilJobControl.TransparentColor = System.Drawing.Color.Transparent;
    302152      this.ilJobControl.Images.SetKeyName(0, "PlayHS.png");
    303       //
    304       // tpUserControl
    305       //
    306       this.tpUserControl.Controls.Add(this.scUserControl);
    307       this.tpUserControl.Location = new System.Drawing.Point(4, 22);
    308       this.tpUserControl.Name = "tpUserControl";
    309       this.tpUserControl.Padding = new System.Windows.Forms.Padding(3);
    310       this.tpUserControl.Size = new System.Drawing.Size(643, 352);
    311       this.tpUserControl.TabIndex = 2;
    312       this.tpUserControl.Text = "User Control";
    313       this.tpUserControl.UseVisualStyleBackColor = true;
    314       //
    315       // scUserControl
    316       //
    317       this.scUserControl.Dock = System.Windows.Forms.DockStyle.Fill;
    318       this.scUserControl.Location = new System.Drawing.Point(3, 3);
    319       this.scUserControl.Name = "scUserControl";
    320       //
    321       // scUserControl.Panel1
    322       //
    323       this.scUserControl.Panel1.Controls.Add(this.tvUserControl);
    324       //
    325       // scUserControl.Panel2
    326       //
    327       this.scUserControl.Panel2.Controls.Add(this.lvUserControl);
    328       this.scUserControl.Size = new System.Drawing.Size(637, 346);
    329       this.scUserControl.SplitterDistance = 139;
    330       this.scUserControl.TabIndex = 1;
    331       //
    332       // tvUserControl
    333       //
    334       this.tvUserControl.Dock = System.Windows.Forms.DockStyle.Fill;
    335       this.tvUserControl.Location = new System.Drawing.Point(0, 0);
    336       this.tvUserControl.Name = "tvUserControl";
    337       this.tvUserControl.Size = new System.Drawing.Size(139, 346);
    338       this.tvUserControl.TabIndex = 1;
    339       this.tvUserControl.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.OnTVUserControlClicked);
    340       //
    341       // lvUserControl
    342       //
    343       this.lvUserControl.AllowDrop = true;
    344       this.lvUserControl.Dock = System.Windows.Forms.DockStyle.Fill;
    345       this.lvUserControl.LargeImageList = this.ilUserControl;
    346       this.lvUserControl.Location = new System.Drawing.Point(0, 0);
    347       this.lvUserControl.Name = "lvUserControl";
    348       this.lvUserControl.Size = new System.Drawing.Size(494, 346);
    349       this.lvUserControl.TabIndex = 1;
    350       this.lvUserControl.UseCompatibleStateImageBehavior = false;
    351       this.lvUserControl.Click += new System.EventHandler(this.OnLVUserControlClicked);
    352153      //
    353154      // ilUserControl
     
    465266      this.btnUserControlClose.Text = "Close";
    466267      this.btnUserControlClose.UseVisualStyleBackColor = true;
    467       this.btnUserControlClose.Click += new System.EventHandler(this.btnUserControlClose_Click);
    468268      //
    469269      // pbUserControl
     
    669469      //
    670470      this.updaterWoker.DoWork += new System.ComponentModel.DoWorkEventHandler(this.updaterWoker_DoWork);
     471      this.updaterWoker.RunWorkerCompleted += new System.ComponentModel.RunWorkerCompletedEventHandler(this.updaterWoker_RunWorkerCompleted);
     472      //
     473      // tpJobControl
     474      //
     475      this.tpJobControl.Controls.Add(this.scJobControl);
     476      this.tpJobControl.Location = new System.Drawing.Point(4, 22);
     477      this.tpJobControl.Name = "tpJobControl";
     478      this.tpJobControl.Padding = new System.Windows.Forms.Padding(3);
     479      this.tpJobControl.Size = new System.Drawing.Size(643, 352);
     480      this.tpJobControl.TabIndex = 1;
     481      this.tpJobControl.Text = "Job Control";
     482      this.tpJobControl.UseVisualStyleBackColor = true;
     483      //
     484      // scJobControl
     485      //
     486      this.scJobControl.Dock = System.Windows.Forms.DockStyle.Fill;
     487      this.scJobControl.Location = new System.Drawing.Point(3, 3);
     488      this.scJobControl.Name = "scJobControl";
     489      //
     490      // scJobControl.Panel1
     491      //
     492      this.scJobControl.Panel1.Controls.Add(this.tvJobControl);
     493      //
     494      // scJobControl.Panel2
     495      //
     496      this.scJobControl.Panel2.Controls.Add(this.lvJobControl);
     497      this.scJobControl.Size = new System.Drawing.Size(637, 346);
     498      this.scJobControl.SplitterDistance = 139;
     499      this.scJobControl.TabIndex = 1;
     500      //
     501      // lvJobControl
     502      //
     503      this.lvJobControl.AllowDrop = true;
     504      this.lvJobControl.Dock = System.Windows.Forms.DockStyle.Fill;
     505      this.lvJobControl.LargeImageList = this.ilJobControl;
     506      this.lvJobControl.Location = new System.Drawing.Point(0, 0);
     507      this.lvJobControl.MultiSelect = false;
     508      this.lvJobControl.Name = "lvJobControl";
     509      this.lvJobControl.Size = new System.Drawing.Size(494, 346);
     510      this.lvJobControl.TabIndex = 0;
     511      this.lvJobControl.UseCompatibleStateImageBehavior = false;
     512      this.lvJobControl.MouseMove += new System.Windows.Forms.MouseEventHandler(this.lvJobControl_MouseMove);
     513      this.lvJobControl.Click += new System.EventHandler(this.OnLVJobControlClicked);
     514      //
     515      // tvJobControl
     516      //
     517      this.tvJobControl.Dock = System.Windows.Forms.DockStyle.Fill;
     518      this.tvJobControl.Location = new System.Drawing.Point(0, 0);
     519      this.tvJobControl.Name = "tvJobControl";
     520      this.tvJobControl.Size = new System.Drawing.Size(139, 346);
     521      this.tvJobControl.TabIndex = 2;
     522      this.tvJobControl.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.OnTVJobControlClicked);
     523      //
     524      // tpClientControl
     525      //
     526      this.tpClientControl.AllowDrop = true;
     527      this.tpClientControl.Controls.Add(this.scClientControl);
     528      this.tpClientControl.Location = new System.Drawing.Point(4, 22);
     529      this.tpClientControl.Name = "tpClientControl";
     530      this.tpClientControl.Padding = new System.Windows.Forms.Padding(3);
     531      this.tpClientControl.Size = new System.Drawing.Size(643, 352);
     532      this.tpClientControl.TabIndex = 0;
     533      this.tpClientControl.Text = "Client Control";
     534      this.tpClientControl.UseVisualStyleBackColor = true;
     535      //
     536      // scClientControl
     537      //
     538      this.scClientControl.Dock = System.Windows.Forms.DockStyle.Fill;
     539      this.scClientControl.Location = new System.Drawing.Point(3, 3);
     540      this.scClientControl.Name = "scClientControl";
     541      //
     542      // scClientControl.Panel1
     543      //
     544      this.scClientControl.Panel1.Controls.Add(this.tvClientControl);
     545      //
     546      // scClientControl.Panel2
     547      //
     548      this.scClientControl.Panel2.Controls.Add(this.lvClientControl);
     549      this.scClientControl.Size = new System.Drawing.Size(637, 346);
     550      this.scClientControl.SplitterDistance = 139;
     551      this.scClientControl.TabIndex = 0;
     552      //
     553      // lvClientControl
     554      //
     555      this.lvClientControl.AllowDrop = true;
     556      this.lvClientControl.Dock = System.Windows.Forms.DockStyle.Fill;
     557      this.lvClientControl.ImeMode = System.Windows.Forms.ImeMode.Off;
     558      this.lvClientControl.LargeImageList = this.ilClientControl;
     559      this.lvClientControl.Location = new System.Drawing.Point(0, 0);
     560      this.lvClientControl.MultiSelect = false;
     561      this.lvClientControl.Name = "lvClientControl";
     562      this.lvClientControl.Size = new System.Drawing.Size(494, 346);
     563      this.lvClientControl.TabIndex = 0;
     564      this.lvClientControl.UseCompatibleStateImageBehavior = false;
     565      this.lvClientControl.Click += new System.EventHandler(this.OnLVClientClicked);
     566      //
     567      // tvClientControl
     568      //
     569      this.tvClientControl.Dock = System.Windows.Forms.DockStyle.Fill;
     570      this.tvClientControl.Location = new System.Drawing.Point(0, 0);
     571      this.tvClientControl.Name = "tvClientControl";
     572      this.tvClientControl.Size = new System.Drawing.Size(139, 346);
     573      this.tvClientControl.TabIndex = 0;
     574      this.tvClientControl.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.OnTVClientClicked);
     575      //
     576      // tcManagementConsole
     577      //
     578      this.tcManagementConsole.Controls.Add(this.tpClientControl);
     579      this.tcManagementConsole.Controls.Add(this.tpJobControl);
     580      this.tcManagementConsole.Dock = System.Windows.Forms.DockStyle.Fill;
     581      this.tcManagementConsole.Location = new System.Drawing.Point(0, 24);
     582      this.tcManagementConsole.Name = "tcManagementConsole";
     583      this.tcManagementConsole.SelectedIndex = 0;
     584      this.tcManagementConsole.Size = new System.Drawing.Size(651, 378);
     585      this.tcManagementConsole.TabIndex = 1;
    671586      //
    672587      // HiveServerManagementConsole
     
    683598      this.menuStrip1.ResumeLayout(false);
    684599      this.menuStrip1.PerformLayout();
    685       this.tcManagementConsole.ResumeLayout(false);
    686       this.tpClientControl.ResumeLayout(false);
    687       this.scClientControl.Panel1.ResumeLayout(false);
    688       this.scClientControl.Panel2.ResumeLayout(false);
    689       this.scClientControl.ResumeLayout(false);
    690       this.tpJobControl.ResumeLayout(false);
    691       this.scJobControl.Panel1.ResumeLayout(false);
    692       this.scJobControl.Panel2.ResumeLayout(false);
    693       this.scJobControl.ResumeLayout(false);
    694       this.tpUserControl.ResumeLayout(false);
    695       this.scUserControl.Panel1.ResumeLayout(false);
    696       this.scUserControl.Panel2.ResumeLayout(false);
    697       this.scUserControl.ResumeLayout(false);
    698600      this.plClientDetails.ResumeLayout(false);
    699601      this.plClientDetails.PerformLayout();
     
    706608      ((System.ComponentModel.ISupportInitialize)(this.pbJobControl)).EndInit();
    707609      ((System.ComponentModel.ISupportInitialize)(this.fileSystemWatcher1)).EndInit();
     610      this.tpJobControl.ResumeLayout(false);
     611      this.scJobControl.Panel1.ResumeLayout(false);
     612      this.scJobControl.Panel2.ResumeLayout(false);
     613      this.scJobControl.ResumeLayout(false);
     614      this.tpClientControl.ResumeLayout(false);
     615      this.scClientControl.Panel1.ResumeLayout(false);
     616      this.scClientControl.Panel2.ResumeLayout(false);
     617      this.scClientControl.ResumeLayout(false);
     618      this.tcManagementConsole.ResumeLayout(false);
    708619      this.ResumeLayout(false);
    709620      this.PerformLayout();
     
    716627    private System.Windows.Forms.ToolStripMenuItem informationToolStripMenuItem;
    717628    private System.Windows.Forms.ToolStripMenuItem closeToolStripMenuItem;
    718     private System.Windows.Forms.TabControl tcManagementConsole;
    719     private System.Windows.Forms.TabPage tpClientControl;
    720     private System.Windows.Forms.TabPage tpJobControl;
    721     private System.Windows.Forms.SplitContainer scClientControl;
    722     private System.Windows.Forms.TabPage tpUserControl;
    723     private System.Windows.Forms.TreeView tvClientControl;
    724     private System.Windows.Forms.ListView lvClientControl;
    725     private System.Windows.Forms.SplitContainer scJobControl;
    726     private System.Windows.Forms.ListView lvJobControl;
    727     private System.Windows.Forms.SplitContainer scUserControl;
    728629    private System.Windows.Forms.TreeView treeView2;
    729630    private System.Windows.Forms.ListView listView2;
    730     private System.Windows.Forms.TreeView tvJobControl;
    731     private System.Windows.Forms.TreeView tvUserControl;
    732     private System.Windows.Forms.ListView lvUserControl;
    733631    private System.Windows.Forms.ImageList ilClientControl;
    734632    private System.Windows.Forms.ToolStripMenuItem addToolStripMenuItem;
    735633    private System.Windows.Forms.ToolStripMenuItem jobToolStripMenuItem;
    736     private System.Windows.Forms.ToolStripMenuItem userToolStripMenuItem;
    737     private System.Windows.Forms.ToolStripMenuItem userToolStripMenuItem1;
    738     private System.Windows.Forms.ToolStripMenuItem groupToolStripMenuItem2;
    739634    private System.Windows.Forms.ImageList ilUserControl;
    740635    private System.Windows.Forms.Timer timerSyncronize;
     
    772667    private System.Windows.Forms.Label lblState;
    773668    private System.ComponentModel.BackgroundWorker updaterWoker;
     669    private System.Windows.Forms.TabControl tcManagementConsole;
     670    private System.Windows.Forms.TabPage tpClientControl;
     671    private System.Windows.Forms.SplitContainer scClientControl;
     672    private System.Windows.Forms.TreeView tvClientControl;
     673    private System.Windows.Forms.ListView lvClientControl;
     674    private System.Windows.Forms.TabPage tpJobControl;
     675    private System.Windows.Forms.SplitContainer scJobControl;
     676    private System.Windows.Forms.TreeView tvJobControl;
     677    private System.Windows.Forms.ListView lvJobControl;
    774678  }
    775679}
  • branches/Hive_Management_Console_Refactoring_Ticket508/HeuristicLab.Hive.Server.Console/HiveServerManagementConsole.cs

    r1372 r1381  
    4444    private ResponseList<ClientInfo> clientInfo = null;
    4545    private ResponseList<Job> jobs = null;
    46     private ResponseList<UserGroup> userGroups = null;
    47     private ResponseList<User> usersList = null;
    4846
    4947    private Dictionary<long, ListViewGroup> clientObjects;
    5048    private Dictionary<long, ListViewItem> clientInfoObjects;
    5149    private Dictionary<long, ListViewItem> jobObjects;
    52     private Dictionary<long, ListViewGroup> userGroupsObjects;
    53     private Dictionary<long, ListViewItem> userListObjects;
    5450
    5551    private Job currentJob = null;
    5652    private ClientInfo currentClient = null;
    57     private User currentUser = null;
    5853    private string nameCurrentJob = "";
    5954    private string nameCurrentClient = "";
     
    7267      AddClients();
    7368      AddJobs();
    74       AddUsers();
    7569      timerSyncronize.Start();
    7670    }
     
    8276    /// <param name="e"></param>
    8377    private void TickSync(object obj, EventArgs e) {
    84       //Refresh();
    8578      if (!updaterWoker.IsBusy) {
    8679        updaterWoker.RunWorkerAsync();
     
    138131    }
    139132
     133
     134    List<ListViewGroup> jobGroup;
    140135    /// <summary>
    141136    /// Adds jobs to ListView and TreeView
     
    154149        ListViewGroup lvJobFinished = new ListViewGroup("finished", HorizontalAlignment.Left);
    155150        ListViewGroup lvJobPending = new ListViewGroup("pending", HorizontalAlignment.Left);
     151
     152        jobGroup = new List<ListViewGroup>();
     153        jobGroup.Add(lvJobCalculating);
     154        jobGroup.Add(lvJobFinished);
     155        jobGroup.Add(lvJobPending);
     156       
    156157        tvJobControl.Nodes.Add("calculating");
    157158        tvJobControl.Nodes.Add("finished");
     
    188189        if (flagJob) {
    189190          JobClicked();
    190         }
    191       }
    192       catch (Exception ex) {
    193         closeFormEvent(true, true);
    194         this.Close();
    195       }
    196     }
    197 
    198     /// <summary>
    199     /// Adds users to ListView and TreeView
    200     /// </summary>
    201     private void AddUsers() {
    202       try {
    203         userGroupsObjects = new Dictionary<long, ListViewGroup>();
    204         userListObjects = new Dictionary<long, ListViewItem>();
    205         IUserRoleManager userRoleManager =
    206           ServiceLocator.GetUserRoleManager();
    207 
    208         userGroups = userRoleManager.GetAllUserGroups();
    209 
    210         lvUserControl.Items.Clear();
    211         tvUserControl.Nodes.Clear();
    212 
    213         foreach (UserGroup ug in userGroups.List) {
    214           tvUserControl.Nodes.Add(ug.Name);
    215           ListViewGroup lvg = new ListViewGroup(ug.Name, HorizontalAlignment.Left);
    216 
    217           foreach (PermissionOwner permOwner in ug.Members) {
    218             if (permOwner is User) {
    219               User users = permOwner as User;
    220               tvUserControl.Nodes[tvUserControl.Nodes.Count - 1].Nodes.Add(users.Name);
    221               ListViewItem item = new ListViewItem(users.Name, 0, lvg);
    222               lvUserControl.Items.Add(item);
    223               userListObjects.Add(users.Id, item);
    224             }
    225           }
    226           lvUserControl.Groups.Add(lvg);
    227           userGroupsObjects.Add(ug.Id, lvg);
    228 
    229         } // Users
    230         usersList = userRoleManager.GetAllUsers();
    231         ListViewGroup lvunsorted = new ListViewGroup("unsorted", HorizontalAlignment.Left);
    232         foreach (User u in usersList.List) {
    233           tvUserControl.Nodes.Add(u.Name);
    234           lvUserControl.Items.Add(new ListViewItem(u.Name, 0, lvunsorted));
    235         }
    236         lvUserControl.BeginUpdate();
    237         lvUserControl.Groups.Add(lvunsorted);
    238         lvUserControl.EndUpdate();
    239         if (flagUser) {
    240           UserClicked();
    241191        }
    242192      }
     
    337287    }
    338288
    339     /// <summary>
    340     /// if one user is clicked, a panel is opened with the details
    341     /// </summary>
    342     private void UserClicked() {
    343       int i = 0;
    344       while (usersList.List[i].Name != nameCurrentUser) {
    345         i++;
    346       }
    347       currentUser = usersList.List[i];
    348       scUserControl.Panel2.Controls.Clear();
    349       scUserControl.Panel2.Controls.Add(plUserDetails);
    350       pbUserControl.Image = ilUserControl.Images[0];
    351       lblUserName.Text = currentUser.Id.ToString();
    352     }
    353 
    354289    #region Eventhandlers
    355290    /// <summary>
     
    376311    }
    377312
     313    private void Refresh() {
     314      foreach (Changes change in changes) {
     315        if (change.Types == Type.Job) {
     316          if (change.ChangeType == Change.Update) {
     317            //if (jobObjects[change.ID].ListView.Groups.ToString() == ) {}
     318            //ListViewItem lvi = new ListViewItem(
     319            //  jobs.List[change.Position].Id.ToString(), 0);
     320          } else if (change.ChangeType == Change.Create) {
     321            ListViewItem lvi = new ListViewItem(
     322              jobs.List[change.Position].Id.ToString(), 0, jobGroup[2]);
     323            jobObjects.Add(change.ID, lvi);
     324            lvJobControl.Items.Add(lvi);
     325
     326          } else if (change.ChangeType == Change.Delete) {
     327            jobObjects.Remove(change.Position);
     328          }
     329
     330        }
     331      }
     332
     333    }
     334
    378335    private void AddJob_Click(object sender, EventArgs e) {
    379336      AddJobForm newForm = new AddJobForm();
    380337      newForm.Show();
    381338      //newForm.addJobEvent += new addDelegate(updaterWoker.RunWorkerAsync);
    382     }
    383 
    384     private void Refresh() {
    385       AddClients();
    386       AddJobs();
    387       AddUsers();
    388     }
    389 
    390     private void AddUser_Click(object sender, EventArgs e) {
    391       AddUserForm newForm = new AddUserForm("User", false);
    392       newForm.Show();
    393       newForm.addUserEvent += new addDelegate(Refresh);
    394     }
    395 
    396     private void AddUserGroup_Click(object sender, EventArgs e) {
    397       AddUserForm newForm = new AddUserForm("User", true);
    398       newForm.Show();
    399       newForm.addUserEvent += new addDelegate(Refresh);                                             
    400339    }
    401340
     
    437376    }
    438377
    439     private void OnLVUserControlClicked(object sender, EventArgs e) {
    440       nameCurrentUser = lvUserControl.SelectedItems[0].Text;
    441       flagUser = true;
    442       UserClicked();
    443     }
    444 
    445     private void OnTVUserControlClicked(object sender, TreeViewEventArgs e) {
    446       bool usergroup = false;
    447       foreach (UserGroup ug in userGroups.List) {
    448         if (tvUserControl.SelectedNode.Text == ug.Name) {
    449           usergroup = true;
    450         }
    451       }
    452       if (usergroup == false) {
    453         nameCurrentUser = tvUserControl.SelectedNode.Text;
    454         flagUser = true;
    455         UserClicked();
    456       }
    457 
    458     }
    459 
    460 
    461378    private void btnClientClose_Click(object sender, EventArgs e) {
    462379      scClientControl.Panel2.Controls.Clear();
     
    469386      scJobControl.Panel2.Controls.Add(lvJobControl);
    470387      flagJob = false;
    471     }
    472 
    473     private void btnUserControlClose_Click(object sender, EventArgs e) {
    474       scUserControl.Panel2.Controls.Clear();
    475       scUserControl.Panel2.Controls.Add(lvUserControl);
    476       flagUser = false;
    477388    }
    478389
     
    493404      clientInfo = clientManager.GetAllClients();
    494405
    495       ResponseList<ClientInfo> clientInfoOldHelp;
     406      IDictionary<int, ClientInfo> clientInfoOldHelp;
    496407
    497408      CloneList(clientInfoOld, out clientInfoOldHelp);
    498409
    499       GetDelta(clientInfoOld.List, clientInfoOldHelp.List);
     410      GetDelta(clientInfoOld.List, clientInfoOldHelp);
    500411      #endregion
    501412
     
    505416      clients = clientManager.GetAllClientGroups();
    506417
    507       ResponseList<ClientGroup> clientsOldHelp;
     418      IDictionary<int, ClientGroup> clientsOldHelp;
    508419
    509420      CloneList(clientsOld, out clientsOldHelp);
    510421
    511       GetDelta(clientsOld.List, clientsOldHelp.List);
     422      GetDelta(clientsOld.List, clientsOldHelp);
    512423      #endregion
    513424
     
    519430      jobs = jobManager.GetAllJobs();
    520431
    521       ResponseList<Job> jobsOldHelp = new ResponseList<Job>();
     432      IDictionary<int, Job> jobsOldHelp;
    522433      CloneList(jobsOld, out jobsOldHelp);
    523434     
    524435      //System.Diagnostics.Debug.WriteLine(jobsOldHelp.List[0].Id.ToString());
    525436
    526       GetDelta(jobsOld.List, jobsOldHelp.List);
     437      GetDelta(jobsOld.List, jobsOldHelp);
    527438
    528439      #endregion
    529440
     441      foreach (Changes change in changes) {
     442        System.Diagnostics.Debug.WriteLine(change.ID + " " + change.ChangeType);
     443      }
     444
    530445    }
    531446    #endregion
     
    533448    #region Helper methods
    534449
    535     private void CloneList(ResponseList<Job> oldList, out ResponseList<Job> newList) {
    536       newList = new ResponseList<Job>();
    537       newList.List = new List<Job>();
    538       foreach (Job item in oldList.List) {
    539         newList.List.Add(item);
    540       }
    541     }
    542 
    543     private void CloneList(ResponseList<ClientInfo> oldList, out ResponseList<ClientInfo> newList) {
    544       newList = new ResponseList<ClientInfo>();
    545       newList.List = new List<ClientInfo>();
    546       foreach (ClientInfo item in oldList.List) {
    547         newList.List.Add(item);
    548       }
    549     }
    550 
    551     private void CloneList(ResponseList<ClientGroup> oldList, out ResponseList<ClientGroup> newList) {
    552       newList = new ResponseList<ClientGroup>();
    553       newList.List = new List<ClientGroup>();
    554       foreach (ClientGroup item in oldList.List) {
    555         newList.List.Add(item);
     450    private void CloneList(ResponseList<Job> oldList, out IDictionary<int, Job> newList) {
     451      newList = new Dictionary<int, Job>();
     452      for (int i = 0; i < oldList.List.Count; i++) {
     453        newList.Add(i, oldList.List[i]);
     454      }
     455    }
     456
     457    private void CloneList(ResponseList<ClientInfo> oldList, out IDictionary<int, ClientInfo> newList) {
     458      newList = new Dictionary<int, ClientInfo>();
     459      for (int i = 0; i < oldList.List.Count; i ++) {
     460        newList.Add(i, oldList.List[i]);
     461      }
     462    }
     463
     464    private void CloneList(ResponseList<ClientGroup> oldList, out IDictionary<int, ClientGroup> newList) {
     465      newList = new Dictionary<int, ClientGroup>();
     466      for (int i = 0; i < oldList.List.Count; i++) {
     467        newList.Add(i, oldList.List[i]);
    556468      }
    557469    }
     
    563475    }
    564476
    565     private void GetDelta(IList<ClientInfo> oldClient, IList<ClientInfo> helpClients) {
     477    private void GetDelta(IList<ClientInfo> oldClient, IDictionary<int, ClientInfo> helpClients) {
    566478      bool found = false;
    567479
    568       foreach (ClientInfo ci in clientInfo.List) {
    569         for (int i = 0; i < oldClient.Count; i++) {
    570           ClientInfo cio = oldClient[i];
     480      for (int i = 0; i < clientInfo.List.Count; i ++) {
     481        ClientInfo ci = clientInfo.List[i];
     482        for (int j = 0; j < oldClient.Count; j++) {
     483          ClientInfo cio = oldClient[j];
    571484          if (ci.Id.Equals(cio.Id)) {
    572485            found = true;
    573486            if (ci.State != cio.State) {
    574               changes.Add(new Changes { Types = Type.Client, ID = ci.Id, ChangeType = Change.Update });
    575             }
    576             for (int j = 0; j < helpClients.Count; j++) {
    577               if (cio.Id.Equals(helpClients[j])) {
    578                 helpClients.RemoveAt(j);
     487              changes.Add(new Changes { Types = Type.Client, ID = ci.Id, ChangeType = Change.Update, Position = i });
     488            }
     489            int removeAt = -1;
     490            foreach (KeyValuePair<int, ClientInfo> kvp in helpClients) {
     491              if (cio.Id.Equals(kvp.Value.Id)) {
     492                removeAt = kvp.Key;
    579493                break;
    580494              }
    581495            }
     496            if (removeAt >= 0) {
     497              helpClients.Remove(removeAt);
     498            }
    582499            break;
    583500          }
     
    588505        found = false;
    589506      }
    590       foreach (ClientInfo ci in helpClients) {
    591         changes.Add(new Changes { Types = Type.Client, ID = ci.Id, ChangeType = Change.Delete });
    592       }
    593 
    594     }
    595 
    596     private void GetDelta(IList<ClientGroup> oldClient, IList<ClientGroup> helpClients) {
     507      foreach (KeyValuePair<int, ClientInfo> kvp in helpClients) {
     508        changes.Add(new Changes { Types = Type.Client, ID = kvp.Value.Id, ChangeType = Change.Delete, Position = kvp.Key });
     509      }
     510
     511    }
     512
     513    private void GetDelta(IList<ClientGroup> oldClient, IDictionary<int, ClientGroup> helpClients) {
    597514
    598515      bool found = false;
    599       foreach (ClientGroup cg in clients.List) {
    600         for (int i = 0; i < oldClient.Count; i++) {
    601           ClientGroup cgo = oldClient[i];
     516      for (int i = 0; i < clients.List.Count; i++) {
     517        ClientGroup cg = clients.List[i];
     518        for (int j = 0; j < oldClient.Count; i++) {
     519          ClientGroup cgo = oldClient[j];
    602520          if (cg.Id.Equals(cgo.Id)) {
    603521            found = true;
     
    606524                if (resource.Id.Equals(resourceold.Id)) {
    607525                  if (resourceold.Name != resource.Name) {
    608                     changes.Add(new Changes { Types = Type.Client, ID = cg.Id, ChangeType = Change.Update });
     526                    changes.Add(new Changes { Types = Type.Client, ID = cg.Id, ChangeType = Change.Update, Position = i });
    609527                  }
    610528                }
    611529              }
    612530            }
    613             for (int j = 0; j < helpClients.Count; j++) {
    614               if (cgo.Id.Equals(helpClients[j])) {
    615                 helpClients.RemoveAt(j);
     531            for (int k = 0; k < helpClients.Count; k++) {
     532              if (cgo.Id.Equals(helpClients[k].Id)) {
     533                helpClients.Remove(k);
    616534                break;
    617535              }
     
    625543        found = false;
    626544      }
    627       foreach (ClientGroup cg in helpClients) {
    628         changes.Add(new Changes { Types = Type.ClientGroup, ID = cg.Id, ChangeType = Change.Delete });
    629       }
    630     }
    631      
    632     private void GetDelta(IList<Job> oldJobs, IList<Job> helpJobs) {
     545      foreach (KeyValuePair<int, ClientGroup> kvp in helpClients) {
     546        changes.Add(new Changes { Types = Type.ClientGroup, ID = kvp.Value.Id, ChangeType = Change.Delete, Position = kvp.Key });
     547      }
     548    }
     549
     550    private void GetDelta(IList<Job> oldJobs, IDictionary<int, Job> helpJobs) {
    633551      bool found = false;
    634       foreach (Job job in jobs.List) {
    635        
    636         for (int i = 0; i < oldJobs.Count; i++) {
    637          
    638           Job jobold = oldJobs[i];
     552      for (int i = 0; i < jobs.List.Count; i ++ ) {
     553        Job job = jobs.List[i];
     554        for (int j = 0; j < oldJobs.Count; j++) {
     555
     556          Job jobold = oldJobs[j];
    639557
    640558          if (job.Id.Equals(jobold.Id)) {
    641559
    642560            found = true;
    643             if (IsEqual(job.Client, jobold.Client)) {
    644               changes.Add(new Changes { Types = Type.Job, ID = job.Id, ChangeType = Change.Update });
     561            if (job.State != State.offline) {
     562              if (!IsEqual(job.Client, jobold.Client)) {
     563                changes.Add(new Changes { Types = Type.Job, ID = job.Id, ChangeType = Change.Update });
     564              }
    645565            } else if (job.DateCalculated != jobold.DateCalculated) {
    646566              changes.Add(new Changes { Types = Type.Job, ID = job.Id, ChangeType = Change.Update });
    647567            }
    648568
    649             for (int j = 0; j < helpJobs.Count; j++) {
    650               if (job.Id.Equals(helpJobs[j].Id)) {
    651                 helpJobs.RemoveAt(j);
     569            int removeAt = -1;
     570            foreach (KeyValuePair<int, Job> kvp in helpJobs) {
     571              if (job.Id.Equals(kvp.Value.Id)) {
     572                removeAt = kvp.Key;
    652573                break;
    653574              }
     575            }
     576            if (removeAt >= 0) {
     577              helpJobs.Remove(removeAt);
    654578            }
    655579            break;
     
    663587        found = false;
    664588      }
    665       foreach (Job job in helpJobs) {
    666         changes.Add(new Changes { Types = Type.Job, ID = job.Id, ChangeType = Change.Delete });
    667         System.Diagnostics.Debug.WriteLine("delete Job: " + job.Id);
     589      foreach (KeyValuePair<int, Job> kvp in helpJobs) {
     590        changes.Add(new Changes { Types = Type.Job, ID = kvp.Value.Id, ChangeType = Change.Delete, Position = kvp.Key });
     591        System.Diagnostics.Debug.WriteLine("delete Job: " + kvp.Value.Id);
    668592      }
    669593    }
     
    671595
    672596    #endregion
     597
     598    private void updaterWoker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) {
     599      Refresh();
     600    }
    673601
    674602
Note: See TracChangeset for help on using the changeset viewer.