- Timestamp:
- 07/18/14 12:35:00 (10 years ago)
- Location:
- branches/HiveStatistics/sources
- Files:
-
- 2 deleted
- 40 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/ActionUserInterfaceItem.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/Controls/ControlExtensions.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. … … 21 21 22 22 using System; 23 using System.Collections.Generic;24 23 using System.Runtime.InteropServices; 25 24 using System.Windows.Forms; … … 46 45 } 47 46 } 48 49 public static IEnumerable<Control> GetNestedControls(this Control control, Func<Control, bool> condition = null) {50 if (control == null) yield break;51 if (condition == null) condition = (c) => true;52 53 Queue<Control> unprocessed = new Queue<Control>();54 unprocessed.Enqueue(control);55 56 while (unprocessed.Count > 0) {57 Control c = unprocessed.Dequeue();58 if (condition(c)) yield return c;59 foreach (Control child in c.Controls)60 unprocessed.Enqueue(child);61 }62 }63 47 } 64 48 } -
branches/HiveStatistics/sources/HeuristicLab.MainForm.WindowsForms/3.3/Controls/DragOverTabControl.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/Controls/DragOverTabControl.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/Controls/ProgressView.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. … … 21 21 22 22 using System; 23 using System.ComponentModel; 23 24 using System.Windows.Forms; 24 25 25 26 namespace HeuristicLab.MainForm.WindowsForms { 26 internal sealed partial class ProgressView : UserControl { 27 private const int defaultControlHeight = 88; 28 private const int collapsedControlHeight = 55; 29 30 private readonly Control control; 31 public Control Control { 32 get { return control; } 33 } 34 35 private readonly IProgress content; 36 public IProgress Content { 37 get { return content; } 38 } 39 40 public ProgressView(Control control, IProgress content) 41 : base() { 42 if (control == null) throw new ArgumentNullException("control", "The control is null."); 43 if (content == null) throw new ArgumentNullException("content", "The passed progress is null."); 27 [View("ProgressView")] 28 [Content(typeof(IProgress), true)] 29 public partial class ProgressView : AsynchronousContentView { 30 private const int DefaultCancelTimeoutMs = 3000; 31 private ContentView parentView; 32 33 [Category("Custom"), Description("The time that the process is allowed to exit.")] 34 [DefaultValue(DefaultCancelTimeoutMs)] 35 public int CancelTimeoutMs { get; set; } 36 private bool ShouldSerializeCancelTimeoutMs() { return CancelTimeoutMs != DefaultCancelTimeoutMs; } 37 38 public new IProgress Content { 39 get { return (IProgress)base.Content; } 40 set { base.Content = value; } 41 } 42 43 public ProgressView() { 44 44 InitializeComponent(); 45 46 this.control = control; 47 this.content = content; 48 if (content.ProgressState == ProgressState.Started) 49 ShowProgress(); 50 RegisterContentEvents(); 51 } 52 53 /// <summary> 54 /// Clean up any resources being used. 55 /// </summary> 56 /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> 57 protected override void Dispose(bool disposing) { 58 DeregisterContentEvents(); 59 HideProgress(); 60 61 if (disposing && (components != null)) { 62 components.Dispose(); 63 } 64 base.Dispose(disposing); 65 } 66 67 private void RegisterContentEvents() { 68 content.StatusChanged += new EventHandler(progress_StatusChanged); 69 content.ProgressValueChanged += new EventHandler(progress_ProgressValueChanged); 70 content.ProgressStateChanged += new EventHandler(Content_ProgressStateChanged); 71 content.CanBeCanceledChanged += new EventHandler(Content_CanBeCanceledChanged); 72 } 73 private void DeregisterContentEvents() { 74 content.StatusChanged -= new EventHandler(progress_StatusChanged); 75 content.ProgressValueChanged -= new EventHandler(progress_ProgressValueChanged); 76 content.ProgressStateChanged -= new EventHandler(Content_ProgressStateChanged); 77 content.CanBeCanceledChanged -= new EventHandler(Content_CanBeCanceledChanged); 45 } 46 public ProgressView(IProgress progress) 47 : this() { 48 Content = progress; 49 } 50 public ProgressView(ContentView parentView) 51 : this() { 52 if (parentView == null) throw new ArgumentNullException("parentView", "The parent view is null."); 53 this.parentView = parentView; 54 } 55 public ProgressView(ContentView parentView, IProgress progress) 56 : this(parentView) { 57 Content = progress; 58 } 59 60 protected override void RegisterContentEvents() { 61 Content.StatusChanged += new EventHandler(progress_StatusChanged); 62 Content.ProgressValueChanged += new EventHandler(progress_ProgressValueChanged); 63 Content.ProgressStateChanged += new EventHandler(Content_ProgressStateChanged); 64 Content.CanBeCanceledChanged += new EventHandler(Content_CanBeCanceledChanged); 65 base.RegisterContentEvents(); 66 } 67 68 protected override void DeregisterContentEvents() { 69 base.DeregisterContentEvents(); 70 Content.StatusChanged -= new EventHandler(progress_StatusChanged); 71 Content.ProgressValueChanged -= new EventHandler(progress_ProgressValueChanged); 72 Content.ProgressStateChanged -= new EventHandler(Content_ProgressStateChanged); 73 Content.CanBeCanceledChanged -= new EventHandler(Content_CanBeCanceledChanged); 74 } 75 76 protected override void OnContentChanged() { 77 base.OnContentChanged(); 78 if (Content == null) { 79 HideProgress(); 80 } else { 81 if (Content.ProgressState == ProgressState.Started) 82 ShowProgress(); 83 } 84 } 85 86 protected override void SetEnabledStateOfControls() { 87 base.SetEnabledStateOfControls(); 88 cancelButton.Visible = Content != null && Content.CanBeCanceled; 89 cancelButton.Enabled = Content != null && Content.CanBeCanceled && !ReadOnly; 78 90 } 79 91 80 92 private void ShowProgress() { 81 if ( Control.InvokeRequired) {82 Control.Invoke((Action)ShowProgress);83 return;84 }85 int height = Content.CanBeCanceled ? Height : collapsedControlHeight;86 87 Left = (Control.ClientRectangle.Width / 2) - (Width / 2); 88 Top = (Control.ClientRectangle.Height / 2) - (height / 2);89 Anchor = AnchorStyles.None; 90 91 control.Enabled = false;92 Parent = Control.Parent; 93 BringToFront();94 95 UpdateProgressValue();96 UpdateProgressStatus();97 UpdateCancelButton();98 Visible = true;93 if (InvokeRequired) Invoke((Action)ShowProgress); 94 else { 95 if (parentView != null) { 96 this.Left = (parentView.ClientRectangle.Width / 2) - (this.Width / 2); 97 this.Top = (parentView.ClientRectangle.Height / 2) - (this.Height / 2); 98 this.Anchor = AnchorStyles.None; 99 100 LockBackground(); 101 102 if (!parentView.Controls.Contains(this)) 103 parentView.Controls.Add(this); 104 105 BringToFront(); 106 } 107 UpdateProgressValue(); 108 UpdateProgressStatus(); 109 Visible = true; 110 } 99 111 } 100 112 … … 102 114 if (InvokeRequired) Invoke((Action)HideProgress); 103 115 else { 104 control.Enabled = true; 105 Parent = null; 116 if (parentView != null) { 117 if (parentView.Controls.Contains(this)) 118 parentView.Controls.Remove(this); 119 120 UnlockBackground(); 121 } 106 122 Visible = false; 107 123 } … … 117 133 118 134 private void Content_ProgressStateChanged(object sender, EventArgs e) { 119 switch (content.ProgressState) { 120 case ProgressState.Finished: HideProgress(); break; 121 case ProgressState.Canceled: HideProgress(); break; 122 case ProgressState.Started: ShowProgress(); break; 123 default: throw new NotSupportedException("The progress state " + content.ProgressState + " is not supported by the ProgressView."); 124 } 135 if (Content.ProgressState == ProgressState.Finished 136 || Content.ProgressState == ProgressState.Canceled) 137 HideProgress(); 138 if (Content.ProgressState == ProgressState.Started) 139 ShowProgress(); 125 140 } 126 141 127 142 private void Content_CanBeCanceledChanged(object sender, EventArgs e) { 128 UpdateCancelButton(); 129 } 130 131 private void UpdateCancelButton() { 132 cancelButton.Visible = content != null && content.CanBeCanceled; 133 cancelButton.Enabled = content != null && content.CanBeCanceled; 134 135 if (content != null && content.CanBeCanceled) { 136 Height = defaultControlHeight; 137 } else if (content != null && !content.CanBeCanceled) { 138 Height = collapsedControlHeight; 143 SetEnabledStateOfControls(); 144 } 145 146 private void LockBackground() { 147 if (InvokeRequired) { 148 Invoke((Action)LockBackground); 149 } else { 150 parentView.Locked = true; 151 parentView.ReadOnly = true; 152 Locked = false; 153 ReadOnly = false; 154 } 155 } 156 157 private void UnlockBackground() { 158 if (InvokeRequired) Invoke((Action)UnlockBackground); 159 else { 160 parentView.Locked = false; 161 parentView.ReadOnly = false; 162 Locked = true; 163 ReadOnly = true; 139 164 } 140 165 } … … 143 168 if (InvokeRequired) Invoke((Action)UpdateProgressValue); 144 169 else { 145 if ( content != null) {146 double progressValue = content.ProgressValue;170 if (Content != null) { 171 double progressValue = Content.ProgressValue; 147 172 if (progressValue <= 0.0 || progressValue > 1.0) { 148 progressBar.Style = ProgressBarStyle.Marquee; 173 if (progressBar.Style != ProgressBarStyle.Marquee) 174 progressBar.Style = ProgressBarStyle.Marquee; 149 175 } else { 150 progressBar.Style = ProgressBarStyle.Blocks; 176 if (progressBar.Style != ProgressBarStyle.Blocks) 177 progressBar.Style = ProgressBarStyle.Blocks; 151 178 progressBar.Value = (int)Math.Round(progressBar.Minimum + progressValue * (progressBar.Maximum - progressBar.Minimum)); 152 179 } … … 157 184 private void UpdateProgressStatus() { 158 185 if (InvokeRequired) Invoke((Action)UpdateProgressStatus); 159 else if ( content != null)160 statusLabel.Text = content.Status;186 else if (Content != null) 187 statusLabel.Text = Content.Status; 161 188 } 162 189 163 190 private void cancelButton_Click(object sender, EventArgs e) { 164 content.Cancel(); 191 if (Content != null) { 192 try { 193 Content.Cancel(CancelTimeoutMs); 194 ReadOnly = true; 195 cancelButtonTimer.Interval = CancelTimeoutMs; 196 cancelButtonTimer.Start(); 197 } catch (NotSupportedException nse) { 198 PluginInfrastructure.ErrorHandling.ShowErrorDialog(nse); 199 } 200 } 201 } 202 203 private void cancelButtonTimer_Tick(object sender, EventArgs e) { 204 cancelButtonTimer.Stop(); 205 if (Visible) ReadOnly = false; 165 206 } 166 207 } -
branches/HiveStatistics/sources/HeuristicLab.MainForm.WindowsForms/3.3/Controls/ProgressView.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. … … 27 27 private System.ComponentModel.IContainer components = null; 28 28 29 29 /// <summary> 30 /// Clean up any resources being used. 31 /// </summary> 32 /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> 33 protected override void Dispose(bool disposing) { 34 if (disposing && (components != null)) { 35 components.Dispose(); 36 } 37 base.Dispose(disposing); 38 } 39 30 40 #region Component Designer generated code 31 41 … … 35 45 /// </summary> 36 46 private void InitializeComponent() { 47 this.components = new System.ComponentModel.Container(); 37 48 this.progressBar = new System.Windows.Forms.ProgressBar(); 38 49 this.statusLabel = new System.Windows.Forms.Label(); 39 50 this.cancelButton = new System.Windows.Forms.Button(); 40 51 this.panel = new System.Windows.Forms.Panel(); 52 this.cancelButtonTimer = new System.Windows.Forms.Timer(this.components); 41 53 this.panel.SuspendLayout(); 42 54 this.SuspendLayout(); … … 44 56 // progressBar 45 57 // 46 this.progressBar.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 47 | System.Windows.Forms.AnchorStyles.Right)));58 this.progressBar.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 59 | System.Windows.Forms.AnchorStyles.Right))); 48 60 this.progressBar.Location = new System.Drawing.Point(3, 3); 49 61 this.progressBar.Name = "progressBar"; … … 54 66 // statusLabel 55 67 // 56 this.statusLabel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 57 | System.Windows.Forms.AnchorStyles.Right)));68 this.statusLabel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 69 | System.Windows.Forms.AnchorStyles.Right))); 58 70 this.statusLabel.Location = new System.Drawing.Point(3, 33); 59 71 this.statusLabel.Name = "statusLabel"; … … 74 86 // panel 75 87 // 76 this.panel.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 77 | System.Windows.Forms.AnchorStyles.Left) 78 | System.Windows.Forms.AnchorStyles.Right))); 88 this.panel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 89 | System.Windows.Forms.AnchorStyles.Right))); 79 90 this.panel.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; 80 91 this.panel.Controls.Add(this.progressBar); … … 85 96 this.panel.Size = new System.Drawing.Size(360, 88); 86 97 this.panel.TabIndex = 3; 98 // 99 // cancelButtonTimer 100 // 101 this.cancelButtonTimer.Tick += new System.EventHandler(this.cancelButtonTimer_Tick); 87 102 // 88 103 // ProgressView … … 103 118 private System.Windows.Forms.Button cancelButton; 104 119 private System.Windows.Forms.Panel panel; 120 private System.Windows.Forms.Timer cancelButtonTimer; 105 121 } 106 122 } -
branches/HiveStatistics/sources/HeuristicLab.MainForm.WindowsForms/3.3/Controls/Sidebar.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/Controls/Sidebar.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/Controls/ViewContextMenuStrip.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/Controls/ViewContextMenuStrip.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/Controls/ViewHost.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. … … 51 51 this.toolTip = new System.Windows.Forms.ToolTip(this.components); 52 52 this.configurationLabel = new System.Windows.Forms.Label(); 53 this.helpLabel = new System.Windows.Forms.Label();54 53 this.SuspendLayout(); 55 54 // … … 74 73 this.viewsLabel.Size = new System.Drawing.Size(16, 16); 75 74 this.viewsLabel.TabIndex = 0; 76 this.toolTip.SetToolTip(this.viewsLabel, "Double-click to open a new window of the current view.\r\nRight-click to change cur" + 77 "rent view.\r\nDrag icon to copy or link content to another view."); 75 this.toolTip.SetToolTip(this.viewsLabel, 76 "Double-click to open a new window of the current view." + System.Environment.NewLine + 77 "Right-click to change current view." + System.Environment.NewLine + 78 "Drag icon to copy or link content to another view."); 78 79 this.viewsLabel.DoubleClick += new System.EventHandler(this.viewsLabel_DoubleClick); 79 80 this.viewsLabel.MouseDown += new System.Windows.Forms.MouseEventHandler(this.viewsLabel_MouseDown); … … 101 102 this.configurationLabel.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.configurationLabel_DoubleClick); 102 103 // 103 // helpLabel104 //105 this.helpLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));106 this.helpLabel.Image = HeuristicLab.Common.Resources.VSImageLibrary.Help;107 this.helpLabel.Location = new System.Drawing.Point(211, 44);108 this.helpLabel.Margin = new System.Windows.Forms.Padding(6, 3, 3, 3);109 this.helpLabel.Name = "helpLabel";110 this.helpLabel.Size = new System.Drawing.Size(16, 16);111 this.helpLabel.TabIndex = 3;112 this.toolTip.SetToolTip(this.helpLabel, "Double-click to open help.");113 this.helpLabel.Visible = false;114 this.helpLabel.DoubleClick += new System.EventHandler(this.helpLabel_DoubleClick);115 //116 104 // ViewHost 117 105 // 118 106 this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 119 107 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit; 120 this.Controls.Add(this.helpLabel);121 108 this.Controls.Add(this.viewsLabel); 122 109 this.Controls.Add(this.configurationLabel); … … 134 121 private HeuristicLab.MainForm.WindowsForms.ViewContextMenuStrip viewContextMenuStrip; 135 122 private System.Windows.Forms.Label configurationLabel; 136 private System.Windows.Forms.Label helpLabel;137 123 138 124 } -
branches/HiveStatistics/sources/HeuristicLab.MainForm.WindowsForms/3.3/Controls/ViewHost.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. … … 103 103 configurationLabel.Visible = activeView is IConfigureableView; 104 104 configurationLabel.Enabled = activeView != null && !activeView.Locked; 105 106 helpLabel.Visible = activeView != null && ViewAttribute.HasHelpResourcePath(activeView.GetType());107 helpLabel.Top = CalculateHelpLabelPosY();108 105 } 109 106 } … … 213 210 viewsLabel.Location = new Point(Width - viewsLabel.Margin.Right - viewsLabel.Width, viewsLabel.Margin.Top); 214 211 configurationLabel.Location = new Point(Width - configurationLabel.Margin.Right - configurationLabel.Width, viewsLabel.Bottom + viewsLabel.Margin.Bottom + configurationLabel.Margin.Top); 215 helpLabel.Location = new Point(Width - helpLabel.Margin.Right - helpLabel.Width, CalculateHelpLabelPosY()); 216 } 217 218 private int CalculateHelpLabelPosY() { 219 if (activeView != null && ViewAttribute.HasHelpResourcePath(activeView.GetType()) && !configurationLabel.Visible) { 220 return configurationLabel.Top; 221 } 222 return configurationLabel.Bottom + configurationLabel.Margin.Bottom + helpLabel.Margin.Top; 212 223 213 } 224 214 … … 312 302 ((IConfigureableView)ActiveView).ShowConfiguration(); 313 303 } 314 315 private void helpLabel_DoubleClick(object sender, EventArgs e) {316 using (InfoBox dialog = new InfoBox("Help for " + ViewAttribute.GetViewName(ActiveView.GetType()), ViewAttribute.GetHelpResourcePath(ActiveView.GetType()), ActiveView)) {317 dialog.ShowDialog(this);318 }319 }320 304 #endregion 321 305 } -
branches/HiveStatistics/sources/HeuristicLab.MainForm.WindowsForms/3.3/Dialogs/DefineArithmeticProgressionDialog.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/Dialogs/DefineArithmeticProgressionDialog.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/Dialogs/DefineArithmeticProgressionTimeDialog.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/Dialogs/DefineArithmeticProgressionTimeDialog.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/HeuristicLab.MainForm.WindowsForms-3.3.csproj
r11202 r11203 138 138 <DependentUpon>DefineArithmeticProgressionDialog.cs</DependentUpon> 139 139 </Compile> 140 <Compile Include="Dialogs\InfoBox.cs">141 <SubType>Form</SubType>142 </Compile>143 <Compile Include="Dialogs\InfoBox.Designer.cs">144 <DependentUpon>InfoBox.cs</DependentUpon>145 </Compile>146 140 <Compile Include="Plugin.cs" /> 147 141 <Compile Include="Views\AsynchronousContentView.cs"> … … 272 266 </BootstrapperPackage> 273 267 </ItemGroup> 268 <ItemGroup /> 274 269 <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> 275 270 <!-- To modify your build process, add your task inside one of the targets below and uncomment it. -
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. -
branches/HiveStatistics/sources/HeuristicLab.MainForm.WindowsForms/3.3/MenuItem.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/Plugin.cs.frame
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. … … 26 26 27 27 namespace HeuristicLab.MainForm.WindowsForms { 28 [Plugin("HeuristicLab.MainForm.WindowsForms", "3.3. 10.$WCREV$")]28 [Plugin("HeuristicLab.MainForm.WindowsForms", "3.3.7.$WCREV$")] 29 29 [PluginFile("HeuristicLab.MainForm.WindowsForms-3.3.dll", PluginFileType.Assembly)] 30 30 [PluginDependency("HeuristicLab.Common", "3.3")] -
branches/HiveStatistics/sources/HeuristicLab.MainForm.WindowsForms/3.3/Properties/AssemblyInfo.cs.frame
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. … … 32 32 [assembly: AssemblyCompany("")] 33 33 [assembly: AssemblyProduct("HeuristicLab")] 34 [assembly: AssemblyCopyright("(c) 2002-201 4HEAL")]34 [assembly: AssemblyCopyright("(c) 2002-2012 HEAL")] 35 35 [assembly: AssemblyTrademark("")] 36 36 [assembly: AssemblyCulture("")] … … 54 54 // by using the '*' as shown below: 55 55 [assembly: AssemblyVersion("3.3.0.0")] 56 [assembly: AssemblyFileVersion("3.3. 10.$WCREV$")]56 [assembly: AssemblyFileVersion("3.3.7.$WCREV$")] -
branches/HiveStatistics/sources/HeuristicLab.MainForm.WindowsForms/3.3/ToolBarItem.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/Views/AsynchronousContentView.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/Views/AsynchronousContentView.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/Views/ContentView.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/Views/ContentView.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/Views/View.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/Views/View.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.