- Timestamp:
- 01/15/09 15:12:22 (15 years ago)
- Location:
- trunk/sources/HeuristicLab.Hive.Server.Console
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Hive.Server.Console/HiveServerManagementConsole.Designer.cs
r1126 r1136 62 62 this.lvUserControl = new System.Windows.Forms.ListView(); 63 63 this.ilUserControl = new System.Windows.Forms.ImageList(this.components); 64 this.lvJobControl = new System.Windows.Forms.ListView(); 65 this.ilJobControl = new System.Windows.Forms.ImageList(this.components); 64 66 this.plClientDetails = new System.Windows.Forms.Panel(); 65 67 this.lblLogin = new System.Windows.Forms.Label(); … … 72 74 this.btnUserControlClose = new System.Windows.Forms.Button(); 73 75 this.pbUserControl = new System.Windows.Forms.PictureBox(); 74 this.lvJobControl = new System.Windows.Forms.ListView();75 this.ilJobControl = new System.Windows.Forms.ImageList(this.components);76 76 this.treeView2 = new System.Windows.Forms.TreeView(); 77 77 this.listView2 = new System.Windows.Forms.ListView(); … … 141 141 this.jobToolStripMenuItem.Size = new System.Drawing.Size(107, 22); 142 142 this.jobToolStripMenuItem.Text = "Job"; 143 this.jobToolStripMenuItem.Click += new System.EventHandler(this. JobToolStripMenuItem1_Click);143 this.jobToolStripMenuItem.Click += new System.EventHandler(this.AddJob_Click); 144 144 // 145 145 // userToolStripMenuItem … … 157 157 this.userToolStripMenuItem1.Size = new System.Drawing.Size(114, 22); 158 158 this.userToolStripMenuItem1.Text = "User"; 159 this.userToolStripMenuItem1.Click += new System.EventHandler(this. UserToolStripMenuItem1_Click);159 this.userToolStripMenuItem1.Click += new System.EventHandler(this.AddUser_Click); 160 160 // 161 161 // groupToolStripMenuItem2 … … 164 164 this.groupToolStripMenuItem2.Size = new System.Drawing.Size(114, 22); 165 165 this.groupToolStripMenuItem2.Text = "Group"; 166 this.groupToolStripMenuItem2.Click += new System.EventHandler(this. GroupToolStripMenuItem2_Click);166 this.groupToolStripMenuItem2.Click += new System.EventHandler(this.AddUserGroup_Click); 167 167 // 168 168 // tcManagementConsole … … 214 214 this.tvClientControl.Size = new System.Drawing.Size(139, 346); 215 215 this.tvClientControl.TabIndex = 0; 216 this.tvClientControl.Click += new System.EventHandler(this.OnTVClientClicked);217 216 // 218 217 // lvClientControl … … 355 354 // 356 355 this.lblProgress.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); 357 this.lblProgress.AutoSize = true;358 356 this.lblProgress.ImageAlign = System.Drawing.ContentAlignment.MiddleRight; 359 this.lblProgress.Location = new System.Drawing.Point(3 61, 99);357 this.lblProgress.Location = new System.Drawing.Point(326, 99); 360 358 this.lblProgress.Name = "lblProgress"; 361 this.lblProgress.Size = new System.Drawing.Size( 58, 13);359 this.lblProgress.Size = new System.Drawing.Size(143, 13); 362 360 this.lblProgress.TabIndex = 8; 363 361 this.lblProgress.Text = "lblProgress"; … … 460 458 this.ilUserControl.TransparentColor = System.Drawing.Color.Transparent; 461 459 this.ilUserControl.Images.SetKeyName(0, "Users.png"); 460 // 461 // lvJobControl 462 // 463 this.lvJobControl.AllowDrop = true; 464 this.lvJobControl.Dock = System.Windows.Forms.DockStyle.Fill; 465 this.lvJobControl.LargeImageList = this.ilJobControl; 466 this.lvJobControl.Location = new System.Drawing.Point(0, 0); 467 this.lvJobControl.MultiSelect = false; 468 this.lvJobControl.Name = "lvJobControl"; 469 this.lvJobControl.Size = new System.Drawing.Size(494, 346); 470 this.lvJobControl.TabIndex = 0; 471 this.lvJobControl.UseCompatibleStateImageBehavior = false; 472 this.lvJobControl.MouseMove += new System.Windows.Forms.MouseEventHandler(this.lvJobControl_MouseMove); 473 this.lvJobControl.Click += new System.EventHandler(this.OnLVJobControlClicked); 474 // 475 // ilJobControl 476 // 477 this.ilJobControl.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("ilJobControl.ImageStream"))); 478 this.ilJobControl.TransparentColor = System.Drawing.Color.Transparent; 479 this.ilJobControl.Images.SetKeyName(0, "PlayHS.png"); 462 480 // 463 481 // plClientDetails … … 559 577 this.pbUserControl.TabStop = false; 560 578 // 561 // lvJobControl562 //563 this.lvJobControl.AllowDrop = true;564 this.lvJobControl.Dock = System.Windows.Forms.DockStyle.Fill;565 this.lvJobControl.LargeImageList = this.ilJobControl;566 this.lvJobControl.Location = new System.Drawing.Point(0, 0);567 this.lvJobControl.MultiSelect = false;568 this.lvJobControl.Name = "lvJobControl";569 this.lvJobControl.Size = new System.Drawing.Size(494, 346);570 this.lvJobControl.TabIndex = 0;571 this.lvJobControl.UseCompatibleStateImageBehavior = false;572 this.lvJobControl.MouseMove += new System.Windows.Forms.MouseEventHandler(this.lvJobControl_MouseMove);573 this.lvJobControl.Click += new System.EventHandler(this.OnLVJobControlClicked);574 //575 // ilJobControl576 //577 this.ilJobControl.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("ilJobControl.ImageStream")));578 this.ilJobControl.TransparentColor = System.Drawing.Color.Transparent;579 this.ilJobControl.Images.SetKeyName(0, "PlayHS.png");580 //581 579 // treeView2 582 580 // … … 600 598 // 601 599 this.timerSyncronize.Interval = 10000; 600 this.timerSyncronize.Tick += new System.EventHandler(this.TickSync); 602 601 // 603 602 // fileSystemWatcher1 -
trunk/sources/HeuristicLab.Hive.Server.Console/HiveServerManagementConsole.cs
r1126 r1136 40 40 public event closeForm closeFormEvent; 41 41 42 ResponseList<ClientGroup> clients = null; 43 ResponseList<ClientInfo> clientInfo = null; 44 ResponseList<Job> jobs = null; 45 ResponseList<UserGroup> userGroups = null; 46 ResponseList<User> usersList = null; 47 ListView lvClientDetails = null; 48 49 Job currentJob = null; 50 ClientInfo currentClient = null; 51 User currentUser = null; 42 #region private variables 43 private ResponseList<ClientGroup> clients = null; 44 private ResponseList<ClientInfo> clientInfo = null; 45 private ResponseList<Job> jobs = null; 46 private ResponseList<UserGroup> userGroups = null; 47 private ResponseList<User> usersList = null; 48 49 private Job currentJob = null; 50 private ClientInfo currentClient = null; 51 private User currentUser = null; 52 private int idxCurrentJob = 0; 53 private int idxCurrentClient = 0; 54 private int idxCurrentUser = 0; 55 private bool flagJob = false; 56 private bool flagClient = false; 57 private bool flagUser = false; 58 59 private ToolTip tt = new ToolTip(); 60 #endregion 52 61 53 62 public HiveServerManagementConsole() { … … 56 65 AddJobs(); 57 66 AddUsers(); 58 59 timerSyncronize.Tick += new EventHandler(TickSync);60 67 timerSyncronize.Start(); 61 68 } 62 69 70 /// <summary> 71 /// event on Ticker 72 /// </summary> 73 /// <param name="obj"></param> 74 /// <param name="e"></param> 63 75 private void TickSync(object obj, EventArgs e) { 64 76 AddClients(); … … 67 79 } 68 80 81 /// <summary> 82 /// Adds clients to ListView and TreeView 83 /// </summary> 69 84 private void AddClients() { 70 85 try { … … 96 111 } 97 112 lvClientControl.Groups.Add(lvunsorted); 113 if (flagClient) { 114 ClientClicked(); 115 } 98 116 } 99 117 catch (Exception ex) { … … 103 121 } 104 122 123 /// <summary> 124 /// Adds jobs to ListView and TreeView 125 /// </summary> 105 126 private void AddJobs() { 106 127 try { … … 137 158 lvJobControl.Groups.Add(lvJobFinished); 138 159 lvJobControl.Groups.Add(lvJobPending); 160 if (flagJob) { 161 JobClicked(); 162 } 139 163 } 140 164 catch (Exception ex) { … … 144 168 } 145 169 170 /// <summary> 171 /// Adds users to ListView and TreeView 172 /// </summary> 146 173 private void AddUsers() { 147 174 try { … … 175 202 } 176 203 lvUserControl.Groups.Add(lvunsorted); 204 if (flagUser) { 205 UserClicked(); 206 } 177 207 } 178 208 catch (Exception ex) { … … 182 212 } 183 213 214 /// <summary> 215 /// if one client is clicked, a panel is opened with the details 216 /// </summary> 217 private void ClientClicked() { 218 currentClient = clientInfo.List[idxCurrentClient]; 219 scClientControl.Panel2.Controls.Clear(); 220 scClientControl.Panel2.Controls.Add(plClientDetails); 221 pbClientControl.Image = ilClientControl.Images[0]; 222 lblClientName.Text = currentClient.Name; 223 lblLogin.Text = currentClient.Login.ToString(); 224 } 225 226 /// <summary> 227 /// if one job is clicked, a panel is opened with the details 228 /// </summary> 229 private void JobClicked() { 230 int yPos = 0; 231 currentJob = jobs.List[idxCurrentJob]; 232 scJobControl.Panel2.Controls.Clear(); 233 scJobControl.Panel2.Controls.Add(plJobDetails); 234 pbJobControl.Image = ilJobControl.Images[0]; 235 lblJobName.Text = currentJob.Id.ToString(); 236 progressJob.Value = (int)(currentJob.Percentage * 100); 237 yPos = progressJob.Location.Y; 238 yPos += 20; 239 lblProgress.Location = new Point( 240 lblProgress.Location.X, yPos); 241 lblProgress.Text = (int)(currentJob.Percentage * 100) + "% calculated"; 242 yPos += 20; 243 lblUserCreatedJob.Location = new Point( 244 lblUserCreatedJob.Location.X, yPos); 245 lblUserCreatedJob.Text = /* currentJob.User.Name + */ " created Job"; 246 yPos += 20; 247 lblJobCreated.Location = new Point( 248 lblJobCreated.Location.X, yPos); 249 lblJobCreated.Text = "Created at "/* + currentJob.User.CreatedJob + */; 250 if (currentJob.ParentJob != null) { 251 yPos += 20; 252 lblParentJob.Location = new Point( 253 lblParentJob.Location.X, yPos); 254 lblParentJob.Text = currentJob.ParentJob.Id + " is parent job"; 255 } 256 yPos += 20; 257 lblPriorityJob.Location = new Point( 258 lblPriorityJob.Location.X, yPos); 259 lblPriorityJob.Text = "Priority of job is " /* + currentJob.Priority */; 260 if (currentJob.Client != null) { 261 yPos += 20; 262 lblClientCalculating.Location = new Point( 263 lblClientCalculating.Location.X, yPos); 264 lblClientCalculating.Text = currentJob.Client.Name + " calculated Job"; 265 yPos += 20; 266 lblJobCalculationBegin.Location = new Point( 267 lblJobCalculationBegin.Location.X, yPos); 268 lblJobCalculationBegin.Text = "Startet calculation at " /* + currentJob.User.CalculationBegin */; 269 yPos += 20; 270 lblJobCalculationEnd.Location = new Point( 271 lblJobCalculationEnd.Location.X, yPos); 272 lblJobCalculationEnd.Text = "Calculation endet at " /* + currentJob.User.CalculationEnd */; 273 } 274 } 275 276 /// <summary> 277 /// if one user is clicked, a panel is opened with the details 278 /// </summary> 279 private void UserClicked() { 280 currentUser = usersList.List[idxCurrentUser]; 281 scUserControl.Panel2.Controls.Clear(); 282 scUserControl.Panel2.Controls.Add(plUserDetails); 283 pbUserControl.Image = ilUserControl.Images[0]; 284 lblUserName.Text = currentUser.Id.ToString(); 285 } 286 287 #region Eventhandler 184 288 /// <summary> 185 289 /// Send event to Login-GUI when closing … … 205 309 } 206 310 207 private void JobToolStripMenuItem1_Click(object sender, EventArgs e) {311 private void AddJob_Click(object sender, EventArgs e) { 208 312 AddJobForm newForm = new AddJobForm(); 209 313 newForm.Show(); 210 314 } 211 315 212 private void UserToolStripMenuItem1_Click(object sender, EventArgs e) {316 private void AddUser_Click(object sender, EventArgs e) { 213 317 AddUserForm newForm = new AddUserForm("User", false); 214 318 newForm.Show(); 215 319 } 216 320 217 private void GroupToolStripMenuItem2_Click(object sender, EventArgs e) {321 private void AddUserGroup_Click(object sender, EventArgs e) { 218 322 AddUserForm newForm = new AddUserForm("User", true); 219 323 newForm.Show(); 220 221 324 } 222 325 223 326 private void OnLVClientClicked(object sender, EventArgs e) { 224 currentClient = clientInfo.List[lvClientControl.SelectedItems[0].Index]; 327 idxCurrentClient = lvClientControl.SelectedItems[0].Index; 328 flagClient = true; 225 329 ClientClicked(); 226 330 } 227 331 228 private void OnTVClientClicked(object sender, EventArgs e) { 229 // currentClient = clientInfo.List[tvClientControl.SelectedNode.Index]; 230 // ClientClicked(); 231 } 232 233 private void ClientClicked() { 234 scClientControl.Panel2.Controls.Clear(); 235 scClientControl.Panel2.Controls.Add(plClientDetails); 236 pbClientControl.Image = ilClientControl.Images[0]; 237 lblClientName.Text = currentClient.Name; 238 lblLogin.Text = currentClient.Login.ToString(); 332 private void OnLVJobControlClicked(object sender, EventArgs e) { 333 idxCurrentJob = lvJobControl.SelectedItems[0].Index; 334 flagJob = true; 335 JobClicked(); 336 } 337 338 private void OnLVUserControlClicked(object sender, EventArgs e) { 339 idxCurrentUser = lvUserControl.SelectedItems[0].Index; 340 flagUser = true; 341 UserClicked(); 239 342 } 240 343 … … 242 345 scClientControl.Panel2.Controls.Clear(); 243 346 scClientControl.Panel2.Controls.Add(lvClientControl); 244 } 245 246 private void OnLVJobControlClicked(object sender, EventArgs e) { 247 currentJob = jobs.List[lvJobControl.SelectedItems[0].Index]; 248 JobClicked(); 249 250 } 251 private void JobClicked() { 252 scJobControl.Panel2.Controls.Clear(); 253 scJobControl.Panel2.Controls.Add(plJobDetails); 254 pbJobControl.Image = ilJobControl.Images[0]; 255 lblJobName.Text = currentJob.Id.ToString(); 256 progressJob.Value = (int)(currentJob.Percentage * 100); 257 lblProgress.Text = (int)(currentJob.Percentage * 100) + "% calculated"; 258 lblUserCreatedJob.Text = /* currentJob.User.Name + */ " created Job"; 259 lblJobCreated.Text = "Created at "/* + currentJob.User.CreatedJob + */; 260 if (currentJob.ParentJob != null) 261 lblParentJob.Text = currentJob.ParentJob.Id + " is parent job"; 262 lblPriorityJob.Text = "Priority of job is " /* + currentJob.Priority */; 263 if (currentJob.Client != null) { 264 lblClientCalculating.Text = currentJob.Client.Name + " calculated Job"; 265 lblJobCalculationBegin.Text = "Startet calculation at " /* + currentJob.User.CalculationBegin */; 266 lblJobCalculationEnd.Text = "Calculation endet at " /* + currentJob.User.CalculationEnd */; 267 } 268 } 269 347 flagClient = false; 348 } 349 270 350 private void btnJobDetailClose_Click(object sender, EventArgs e) { 271 351 scJobControl.Panel2.Controls.Clear(); 272 352 scJobControl.Panel2.Controls.Add(lvJobControl); 273 } 274 275 private void OnLVUserControlClicked(object sender, EventArgs e) { 276 currentUser = usersList.List[lvUserControl.SelectedItems[0].Index]; 277 UserClicked(); 278 } 279 280 private void UserClicked() { 281 scUserControl.Panel2.Controls.Clear(); 282 scUserControl.Panel2.Controls.Add(plUserDetails); 283 pbUserControl.Image = ilUserControl.Images[0]; 284 lblUserName.Text = currentUser.Id.ToString(); 353 flagJob = false; 285 354 } 286 355 … … 288 357 scUserControl.Panel2.Controls.Clear(); 289 358 scUserControl.Panel2.Controls.Add(lvUserControl); 290 }291 292 ToolTip tt = new ToolTip(); 359 flagUser = false; 360 } 361 293 362 private void lvJobControl_MouseMove(object sender, MouseEventArgs e) { 294 363 if ((lvJobControl.GetItemAt(e.X, e.Y) != null) && … … 297 366 } 298 367 } 299 368 #endregion 300 369 } 301 370 } -
trunk/sources/HeuristicLab.Hive.Server.Console/ServiceLocator.cs
r1089 r1136 30 30 Address != String.Empty && 31 31 Port != String.Empty) { 32 33 NetTcpBinding binding = 34 new NetTcpBinding(); 35 36 binding.MaxReceivedMessageSize = 5000000; 37 32 38 ChannelFactory<IServerConsoleFacade> factory = 33 39 new ChannelFactory<IServerConsoleFacade>( 34 new NetTcpBinding(),40 binding, 35 41 new EndpointAddress("net.tcp://" + Address + ":" + Port + "/HiveServerConsole/ServerConsoleFacade")); 36 42
Note: See TracChangeset
for help on using the changeset viewer.