Changeset 13338 for branches/RefactorPluginInfrastructure-2522/HeuristicLab.MainForm.WindowsForms/3.3
- Timestamp:
- 11/23/15 16:14:30 (9 years ago)
- Location:
- branches/RefactorPluginInfrastructure-2522/HeuristicLab.MainForm.WindowsForms/3.3
- Files:
-
- 2 edited
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
branches/RefactorPluginInfrastructure-2522/HeuristicLab.MainForm.WindowsForms/3.3/Dialogs/ErrorDialog.Designer.cs
r13337 r13338 20 20 #endregion 21 21 22 namespace HeuristicLab.PluginInfrastructure { 22 using System.Drawing; 23 24 namespace HeuristicLab.MainForm.WindowsForms { 23 25 partial class ErrorDialog { 24 26 /// <summary> … … 68 70 // iconLabel 69 71 // 70 this.iconLabel.Image = global::HeuristicLab.PluginInfrastructure.Resources.Error;72 this.iconLabel.Image = HeuristicLab.Common.Resources.VSImageLibrary.Error; 71 73 this.iconLabel.Location = new System.Drawing.Point(12, 9); 72 74 this.iconLabel.Name = "iconLabel"; … … 155 157 this.Controls.Add(this.iconLabel); 156 158 this.Controls.Add(this.okButton); 157 this.Icon = global::HeuristicLab.PluginInfrastructure.Resources.ErrorIcon;159 // this.Icon = HeuristicLab.Common.Resources.VSImageLibrary.Error; // TODO 158 160 this.MaximizeBox = false; 159 161 this.MinimizeBox = false; -
branches/RefactorPluginInfrastructure-2522/HeuristicLab.MainForm.WindowsForms/3.3/Dialogs/ErrorDialog.cs
r13337 r13338 22 22 using System; 23 23 using System.Windows.Forms; 24 using HeuristicLab.Common; 24 25 25 namespace HeuristicLab. PluginInfrastructure{26 namespace HeuristicLab.MainForm.WindowsForms { 26 27 public partial class ErrorDialog : Form { 27 28 public ErrorDialog() { -
branches/RefactorPluginInfrastructure-2522/HeuristicLab.MainForm.WindowsForms/3.3/HeuristicLab.MainForm.WindowsForms-3.3.csproj
r11623 r13338 144 144 <DependentUpon>DefineArithmeticProgressionDialog.cs</DependentUpon> 145 145 </Compile> 146 <Compile Include="Dialogs\ErrorDialog.cs"> 147 <SubType>Form</SubType> 148 </Compile> 149 <Compile Include="Dialogs\ErrorDialog.Designer.cs"> 150 <DependentUpon>ErrorDialog.cs</DependentUpon> 151 </Compile> 146 152 <Compile Include="Dialogs\InfoBox.cs"> 147 153 <SubType>Form</SubType> -
branches/RefactorPluginInfrastructure-2522/HeuristicLab.MainForm.WindowsForms/3.3/MainForms/MainForm.cs
r12012 r13338 556 556 ((IActionUserInterfaceItem)item.Tag).Execute(); 557 557 } catch (Exception ex) { 558 ErrorHandling.ShowErrorDialog((Control)MainFormManager.MainForm, ex);558 ShowError(ex.Message, ex); 559 559 } 560 560 } … … 600 600 } 601 601 #endregion 602 603 #region Error Handling 604 public void ShowError(string message, Exception exception) { 605 ShowErrorDialog(this, message, exception); 606 } 607 private void ShowErrorDialog(Control owner, string message, Exception exception) { 608 if (owner == null) throw new ArgumentNullException("owner"); 609 if (owner.InvokeRequired) { 610 owner.Invoke(new Action<Control, string, Exception>(ShowErrorDialog), owner, message, exception); 611 } else { 612 using (ErrorDialog dialog = new ErrorDialog(message, exception)) { 613 dialog.ShowDialog(owner); 614 } 615 } 616 } 617 #endregion 602 618 } 603 619 }
Note: See TracChangeset
for help on using the changeset viewer.