Changeset 11203 for branches/HiveStatistics/sources/HeuristicLab.MainForm.WindowsForms/3.3/MainForms
- Timestamp:
- 07/18/14 12:35:00 (11 years ago)
- Location:
- branches/HiveStatistics/sources
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HiveStatistics/sources
- Property svn:ignore
-
old new 8 8 FxCopResults.txt 9 9 Google.ProtocolBuffers-0.9.1.dll 10 Google.ProtocolBuffers-2.4.1.473.dll11 10 HeuristicLab 3.3.5.1.ReSharper.user 12 11 HeuristicLab 3.3.6.0.ReSharper.user 13 12 HeuristicLab.4.5.resharper.user 14 13 HeuristicLab.ExtLibs.6.0.ReSharper.user 15 HeuristicLab.Scripting.Development16 14 HeuristicLab.resharper.user 17 15 ProtoGen.exe … … 19 17 _ReSharper.HeuristicLab 20 18 _ReSharper.HeuristicLab 3.3 21 _ReSharper.HeuristicLab 3.3 Tests22 19 _ReSharper.HeuristicLab.ExtLibs 23 20 bin 24 21 protoc.exe 22 _ReSharper.HeuristicLab 3.3 Tests 23 Google.ProtocolBuffers-2.4.1.473.dll
-
- Property svn:mergeinfo changed
- Property svn:ignore
-
branches/HiveStatistics/sources/HeuristicLab.MainForm.WindowsForms/3.3/MainForms/DockForm.Designer.cs
r11202 r11203 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/HiveStatistics/sources/HeuristicLab.MainForm.WindowsForms/3.3/MainForms/DockForm.cs
r11202 r11203 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/HiveStatistics/sources/HeuristicLab.MainForm.WindowsForms/3.3/MainForms/DockingMainForm.Designer.cs
r11202 r11203 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/HiveStatistics/sources/HeuristicLab.MainForm.WindowsForms/3.3/MainForms/DockingMainForm.cs
r11202 r11203 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/HiveStatistics/sources/HeuristicLab.MainForm.WindowsForms/3.3/MainForms/DocumentForm.Designer.cs
r11202 r11203 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/HiveStatistics/sources/HeuristicLab.MainForm.WindowsForms/3.3/MainForms/DocumentForm.cs
r11202 r11203 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/HiveStatistics/sources/HeuristicLab.MainForm.WindowsForms/3.3/MainForms/MainForm.Designer.cs
r11202 r11203 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/HiveStatistics/sources/HeuristicLab.MainForm.WindowsForms/3.3/MainForms/MainForm.cs
r11202 r11203 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 345 345 #endregion 346 346 347 #region progress views348 private readonly Dictionary<IContent, IProgress> contentProgressLookup = new Dictionary<IContent, IProgress>();349 private readonly Dictionary<Control, IProgress> viewProgressLookup = new Dictionary<Control, IProgress>();350 private readonly List<ProgressView> progressViews = new List<ProgressView>();351 352 /// <summary>353 /// Adds a <see cref="ProgressView"/> to the <see cref="ContentView"/>s showing the specified content.354 /// </summary>355 public IProgress AddOperationProgressToContent(IContent content, string progressMessage, bool addToObjectGraphObjects = true) {356 if (InvokeRequired) {357 IProgress result = (IProgress)Invoke((Func<IContent, string, bool, IProgress>)AddOperationProgressToContent, content, progressMessage, addToObjectGraphObjects);358 return result;359 }360 if (contentProgressLookup.ContainsKey(content))361 throw new ArgumentException("A progress is already registered for the specified content.", "content");362 363 var contentViews = views.Keys.OfType<ContentView>();364 if (!contentViews.Any(v => v.Content == content))365 throw new ArgumentException("The content is not displayed in a top-level view", "content");366 367 if (addToObjectGraphObjects) {368 var containedObjects = content.GetObjectGraphObjects();369 contentViews = contentViews.Where(v => containedObjects.Contains(v.Content));370 } else371 contentViews = contentViews.Where(v => v.Content == content);372 373 var progress = new Progress(progressMessage, ProgressState.Started);374 foreach (var contentView in contentViews) {375 progressViews.Add(new ProgressView(contentView, progress));376 }377 378 contentProgressLookup[content] = progress;379 return progress;380 }381 382 /// <summary>383 /// Adds a <see cref="ProgressView"/> to the specified view.384 /// </summary>385 public IProgress AddOperationProgressToView(Control control, string progressMessage) {386 var progress = new Progress(progressMessage, ProgressState.Started);387 AddOperationProgressToView(control, progress);388 return progress;389 }390 391 public void AddOperationProgressToView(Control control, IProgress progress) {392 if (InvokeRequired) {393 Invoke((Action<Control, IProgress>)AddOperationProgressToView, control, progress);394 return;395 }396 if (control == null) throw new ArgumentNullException("control", "The view must not be null.");397 if (progress == null) throw new ArgumentNullException("progress", "The progress must not be null.");398 399 IProgress oldProgress;400 if (viewProgressLookup.TryGetValue(control, out oldProgress)) {401 foreach (var progressView in progressViews.Where(v => v.Content == oldProgress).ToList()) {402 progressView.Dispose();403 progressViews.Remove(progressView);404 }405 viewProgressLookup.Remove(control);406 }407 408 progressViews.Add(new ProgressView(control, progress));409 viewProgressLookup[control] = progress;410 }411 412 /// <summary>413 /// Removes an existing <see cref="ProgressView"/> from the <see cref="ContentView"/>s showing the specified content.414 /// </summary>415 public void RemoveOperationProgressFromContent(IContent content, bool finishProgress = true) {416 if (InvokeRequired) {417 Invoke((Action<IContent, bool>)RemoveOperationProgressFromContent, content, finishProgress);418 return;419 }420 421 IProgress progress;422 if (!contentProgressLookup.TryGetValue(content, out progress))423 throw new ArgumentException("No progress is registered for the specified content.", "content");424 425 if (finishProgress) progress.Finish();426 foreach (var progressView in progressViews.Where(v => v.Content == progress).ToList()) {427 progressView.Dispose();428 progressViews.Remove(progressView);429 }430 contentProgressLookup.Remove(content);431 432 }433 434 /// <summary>435 /// Removes an existing <see cref="ProgressView"/> from the specified view.436 /// </summary>437 public void RemoveOperationProgressFromView(Control control, bool finishProgress = true) {438 if (InvokeRequired) {439 Invoke((Action<Control, bool>)RemoveOperationProgressFromView, control, finishProgress);440 return;441 }442 443 IProgress progress;444 if (!viewProgressLookup.TryGetValue(control, out progress))445 throw new ArgumentException("No progress is registered for the specified control.", "control");446 447 if (finishProgress) progress.Finish();448 foreach (var progressView in progressViews.Where(v => v.Content == progress).ToList()) {449 progressView.Dispose();450 progressViews.Remove(progressView);451 }452 viewProgressLookup.Remove(control);453 }454 #endregion455 456 347 #region create menu and toolbar 457 348 private void CreateGUI() { … … 495 386 ToolStripMenuItem item = new ToolStripMenuItem(); 496 387 this.SetToolStripItemProperties(item, menuItem); 497 this.InsertItem(menuItem.Structure, typeof(ToolStripMenuItem), item, menuStrip.Items);498 388 if (menuItem is MenuItem) { 499 389 MenuItem menuItemBase = (MenuItem)menuItem; … … 502 392 item.DisplayStyle = menuItemBase.ToolStripItemDisplayStyle; 503 393 } 394 this.InsertItem(menuItem.Structure, typeof(ToolStripMenuItem), item, menuStrip.Items); 504 395 } 505 396 … … 555 446 try { 556 447 ((IActionUserInterfaceItem)item.Tag).Execute(); 557 } catch (Exception ex) { 448 } 449 catch (Exception ex) { 558 450 ErrorHandling.ShowErrorDialog((Control)MainFormManager.MainForm, ex); 559 451 } -
branches/HiveStatistics/sources/HeuristicLab.MainForm.WindowsForms/3.3/MainForms/MultipleDocumentMainForm.Designer.cs
r11202 r11203 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/HiveStatistics/sources/HeuristicLab.MainForm.WindowsForms/3.3/MainForms/MultipleDocumentMainForm.cs
r11202 r11203 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/HiveStatistics/sources/HeuristicLab.MainForm.WindowsForms/3.3/MainForms/SingleDocumentMainForm.Designer.cs
r11202 r11203 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/HiveStatistics/sources/HeuristicLab.MainForm.WindowsForms/3.3/MainForms/SingleDocumentMainForm.cs
r11202 r11203 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab.
Note: See TracChangeset
for help on using the changeset viewer.