- Timestamp:
- 04/02/09 13:30:13 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/Hive_Management_Console_Refactoring_Ticket508/HeuristicLab.Hive.Server.Console/HiveServerManagementConsole.cs
r1451 r1479 107 107 item = new ListViewItem(ci.Name, count, lvg); 108 108 } 109 item.Tag = ci.Id; 109 110 lvClientControl.Items.Add(item); 110 111 clientInfoObjects.Add(ci.Id, item); … … 137 138 item = new ListViewItem(ci.Name, count, lvunsorted); 138 139 } 139 140 item.Tag = ci.Id; 140 141 lvClientControl.Items.Add(item); 141 142 count = (count + 1) % 3; … … 350 351 351 352 } else if (change.ChangeType == Change.Delete) { 352 jobObjects.Remove(change. Position);353 jobObjects.Remove(change.ID); 353 354 for (int i = 0; i < lvJobControl.Items.Count; i++) { 354 lvJobControl.Items[i].Remove(); 355 if (change.ID.ToString() == lvJobControl.Items[i].Text.ToString()) { 356 lvJobControl.Items[i].Remove(); 357 break; 358 } 355 359 } 356 360 } … … 359 363 private void RefreshClient(Changes change) { 360 364 if (change.ChangeType == Change.Update) { 365 for (int i = 0; i < lvClientControl.Items.Count; i++) { 366 if (lvClientControl.Items[i].Tag.ToString() == change.ID.ToString()) { 367 State state = clientInfo.List[change.Position].State; 368 System.Diagnostics.Debug.WriteLine(lvClientControl.Items[i].Text.ToString()); 369 if ((state == State.offline) || (state == State.nullState)) { 370 lvClientControl.Items[i].ImageIndex = 3; 371 } else { 372 lvClientControl.Items[i].ImageIndex = 1; 373 } 374 lvClientControl.Refresh(); 375 } 376 } 377 361 378 362 379 } else if (change.ChangeType == Change.Create) { 363 380 364 381 } else if (change.ChangeType == Change.Delete) { 382 clientInfoObjects.Remove(change.ID); 383 for (int i = 0; i < lvClientControl.Items.Count; i++) { 384 if (change.ID.ToString() == lvClientControl.Items[i].Text.ToString()) { 385 lvClientControl.Items[i].Remove(); 386 break; 387 } 388 } 365 389 366 390 }
Note: See TracChangeset
for help on using the changeset viewer.