Index: Core/Common/src/Core.Common.Controls.Swf/Core.Common.Controls.Swf.csproj =================================================================== diff -u -r12056e0413d731a732ad1098c071f325ba5d632f -r3ede22c08da5f2050eb231137a2c6dd552e1ebdf --- Core/Common/src/Core.Common.Controls.Swf/Core.Common.Controls.Swf.csproj (.../Core.Common.Controls.Swf.csproj) (revision 12056e0413d731a732ad1098c071f325ba5d632f) +++ Core/Common/src/Core.Common.Controls.Swf/Core.Common.Controls.Swf.csproj (.../Core.Common.Controls.Swf.csproj) (revision 3ede22c08da5f2050eb231137a2c6dd552e1ebdf) @@ -193,7 +193,6 @@ Component - True Fisheye: Tag 3ede22c08da5f2050eb231137a2c6dd552e1ebdf refers to a dead (removed) revision in file `Core/Common/src/Core.Common.Controls.Swf/ModalHelper.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Core/Common/src/Core.Common.Controls.Swf/Properties/Resources.Designer.cs =================================================================== diff -u -r12056e0413d731a732ad1098c071f325ba5d632f -r3ede22c08da5f2050eb231137a2c6dd552e1ebdf --- Core/Common/src/Core.Common.Controls.Swf/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision 12056e0413d731a732ad1098c071f325ba5d632f) +++ Core/Common/src/Core.Common.Controls.Swf/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision 3ede22c08da5f2050eb231137a2c6dd552e1ebdf) @@ -424,15 +424,6 @@ } /// - /// Looks up a localized string similar to Hoofdvenster niet geïnjecteerd.. - /// - internal static string ModalHelper_ShowModal_Main_window_not_injected { - get { - return ResourceManager.GetString("ModalHelper_ShowModal_Main_window_not_injected", resourceCulture); - } - } - - /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// internal static System.Drawing.Bitmap page_white { Index: Core/Common/src/Core.Common.Controls.Swf/Properties/Resources.resx =================================================================== diff -u -r12056e0413d731a732ad1098c071f325ba5d632f -r3ede22c08da5f2050eb231137a2c6dd552e1ebdf --- Core/Common/src/Core.Common.Controls.Swf/Properties/Resources.resx (.../Resources.resx) (revision 12056e0413d731a732ad1098c071f325ba5d632f) +++ Core/Common/src/Core.Common.Controls.Swf/Properties/Resources.resx (.../Resources.resx) (revision 3ede22c08da5f2050eb231137a2c6dd552e1ebdf) @@ -377,9 +377,6 @@ SelectionChanged event afgevuurd. - - Hoofdvenster niet geïnjecteerd. - {0} exemplaren van {1} zijn met {2} vervangen. Index: Core/Common/src/Core.Common.Controls/Core.Common.Controls.csproj =================================================================== diff -u -r12056e0413d731a732ad1098c071f325ba5d632f -r3ede22c08da5f2050eb231137a2c6dd552e1ebdf --- Core/Common/src/Core.Common.Controls/Core.Common.Controls.csproj (.../Core.Common.Controls.csproj) (revision 12056e0413d731a732ad1098c071f325ba5d632f) +++ Core/Common/src/Core.Common.Controls/Core.Common.Controls.csproj (.../Core.Common.Controls.csproj) (revision 3ede22c08da5f2050eb231137a2c6dd552e1ebdf) @@ -70,20 +70,29 @@ 3.5 + + Properties\GlobalAssembly.cs + + Form + + + DialogBase.cs + Form ExceptionDialog.cs + @@ -125,6 +134,9 @@ + + DialogBase.cs + ExceptionDialog.cs Index: Core/Common/src/Core.Common.Controls/Dialogs/DialogBase.Designer.cs =================================================================== diff -u --- Core/Common/src/Core.Common.Controls/Dialogs/DialogBase.Designer.cs (revision 0) +++ Core/Common/src/Core.Common.Controls/Dialogs/DialogBase.Designer.cs (revision 3ede22c08da5f2050eb231137a2c6dd552e1ebdf) @@ -0,0 +1,50 @@ +namespace Core.Common.Controls.Dialogs +{ + partial class DialogBase + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.SuspendLayout(); + // + // DialogBase + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(550, 281); + this.MaximizeBox = false; + this.MinimizeBox = false; + this.Name = "DialogBase"; + this.ShowInTaskbar = false; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; + this.Text = "DialogBase"; + this.ResumeLayout(false); + + } + + #endregion + } +} \ No newline at end of file Index: Core/Common/src/Core.Common.Controls/Dialogs/DialogBase.cs =================================================================== diff -u --- Core/Common/src/Core.Common.Controls/Dialogs/DialogBase.cs (revision 0) +++ Core/Common/src/Core.Common.Controls/Dialogs/DialogBase.cs (revision 3ede22c08da5f2050eb231137a2c6dd552e1ebdf) @@ -0,0 +1,47 @@ +using System.Windows.Forms; + +namespace Core.Common.Controls.Dialogs +{ + /// + /// Base class for dialogs which should be derived in order to get a consistent look and feel. + /// The base class ensures: + /// + /// + /// the dialog is shown in the center of the parent form ( is set to ); + /// + /// + /// no task bar icon is shown ( is set to false); + /// + /// + /// no minimize control box item is shown ( is set to false); + /// + /// + /// no maximize control box item is shown ( is set to false); + /// + /// + /// the parent form is automatically obtained using . + /// + /// + /// + public partial class DialogBase : Form + { + /// + /// Constructs a new . + /// + protected DialogBase() + { + InitializeComponent(); + } + + /// + /// This method provides a new implementation of . + /// In this new implementation the dialog is shown with an owner, + /// which is automatically derived via . + /// + /// A . + public new DialogResult ShowDialog() + { + return base.ShowDialog(ModalHelper.MainWindow); + } + } +} Index: Core/Common/src/Core.Common.Controls/Dialogs/DialogBase.resx =================================================================== diff -u --- Core/Common/src/Core.Common.Controls/Dialogs/DialogBase.resx (revision 0) +++ Core/Common/src/Core.Common.Controls/Dialogs/DialogBase.resx (revision 3ede22c08da5f2050eb231137a2c6dd552e1ebdf) @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file Index: Core/Common/src/Core.Common.Controls/Dialogs/ExceptionDialog.Designer.cs =================================================================== diff -u -r12056e0413d731a732ad1098c071f325ba5d632f -r3ede22c08da5f2050eb231137a2c6dd552e1ebdf --- Core/Common/src/Core.Common.Controls/Dialogs/ExceptionDialog.Designer.cs (.../ExceptionDialog.Designer.cs) (revision 12056e0413d731a732ad1098c071f325ba5d632f) +++ Core/Common/src/Core.Common.Controls/Dialogs/ExceptionDialog.Designer.cs (.../ExceptionDialog.Designer.cs) (revision 3ede22c08da5f2050eb231137a2c6dd552e1ebdf) @@ -87,20 +87,15 @@ // this.AcceptButton = this.buttonRestart; resources.ApplyResources(this, "$this"); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.CancelButton = this.buttonExit; this.Controls.Add(this.buttonOpenLog); this.Controls.Add(this.buttonExit); this.Controls.Add(this.exceptionTextBox); this.Controls.Add(this.richTextBox1); this.Controls.Add(this.buttonCopyTextToClipboard); this.Controls.Add(this.buttonRestart); - this.MaximizeBox = false; - this.MinimizeBox = false; this.Name = "ExceptionDialog"; - this.ShowInTaskbar = false; this.ResumeLayout(false); - } #endregion Index: Core/Common/src/Core.Common.Controls/Dialogs/ExceptionDialog.cs =================================================================== diff -u -r12056e0413d731a732ad1098c071f325ba5d632f -r3ede22c08da5f2050eb231137a2c6dd552e1ebdf --- Core/Common/src/Core.Common.Controls/Dialogs/ExceptionDialog.cs (.../ExceptionDialog.cs) (revision 12056e0413d731a732ad1098c071f325ba5d632f) +++ Core/Common/src/Core.Common.Controls/Dialogs/ExceptionDialog.cs (.../ExceptionDialog.cs) (revision 3ede22c08da5f2050eb231137a2c6dd552e1ebdf) @@ -7,7 +7,7 @@ namespace Core.Common.Controls.Dialogs { - public partial class ExceptionDialog : Form + public partial class ExceptionDialog : DialogBase { public event EventHandler RestartClicked; Index: Core/Common/src/Core.Common.Controls/Dialogs/ModalHelper.cs =================================================================== diff -u --- Core/Common/src/Core.Common.Controls/Dialogs/ModalHelper.cs (revision 0) +++ Core/Common/src/Core.Common.Controls/Dialogs/ModalHelper.cs (revision 3ede22c08da5f2050eb231137a2c6dd552e1ebdf) @@ -0,0 +1,37 @@ +using System; +using System.Windows.Forms; +using Core.Common.Controls.Properties; + +namespace Core.Common.Controls.Dialogs +{ + public static class ModalHelper + { + private static WeakReference mainWindowRef; + + public static IWin32Window MainWindow + { + get + { + if (mainWindowRef != null) + { + return (IWin32Window) mainWindowRef.Target; + } + return null; + } + set + { + mainWindowRef = value != null ? new WeakReference(value) : null; + } + } + + public static DialogResult ShowModal(Form f) + { + if (MainWindow == null) + { + throw new InvalidOperationException(Resources.ModalHelper_ShowModal_Main_window_not_injected); + } + + return f.ShowDialog(MainWindow); + } + } +} \ No newline at end of file Index: Core/Common/src/Core.Common.Controls/Properties/Resources.Designer.cs =================================================================== diff -u -r12056e0413d731a732ad1098c071f325ba5d632f -r3ede22c08da5f2050eb231137a2c6dd552e1ebdf --- Core/Common/src/Core.Common.Controls/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision 12056e0413d731a732ad1098c071f325ba5d632f) +++ Core/Common/src/Core.Common.Controls/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision 3ede22c08da5f2050eb231137a2c6dd552e1ebdf) @@ -89,5 +89,14 @@ return ResourceManager.GetString("ExceptionDialog_GetExceptionText_Loader_exceptions", resourceCulture); } } + + /// + /// Looks up a localized string similar to Hoofdvenster niet geïnjecteerd.. + /// + internal static string ModalHelper_ShowModal_Main_window_not_injected { + get { + return ResourceManager.GetString("ModalHelper_ShowModal_Main_window_not_injected", resourceCulture); + } + } } } Index: Core/Common/src/Core.Common.Controls/Properties/Resources.resx =================================================================== diff -u -r12056e0413d731a732ad1098c071f325ba5d632f -r3ede22c08da5f2050eb231137a2c6dd552e1ebdf --- Core/Common/src/Core.Common.Controls/Properties/Resources.resx (.../Resources.resx) (revision 12056e0413d731a732ad1098c071f325ba5d632f) +++ Core/Common/src/Core.Common.Controls/Properties/Resources.resx (.../Resources.resx) (revision 3ede22c08da5f2050eb231137a2c6dd552e1ebdf) @@ -129,4 +129,7 @@ Foutmelding van de loader: + + Hoofdvenster niet geïnjecteerd. + \ No newline at end of file Index: Core/Common/src/Core.Common.Gui/Forms/MainWindow/MainWindow.xaml.cs =================================================================== diff -u -r0ea17b610f66d122fd9f0c8ef9db30740be455d8 -r3ede22c08da5f2050eb231137a2c6dd552e1ebdf --- Core/Common/src/Core.Common.Gui/Forms/MainWindow/MainWindow.xaml.cs (.../MainWindow.xaml.cs) (revision 0ea17b610f66d122fd9f0c8ef9db30740be455d8) +++ Core/Common/src/Core.Common.Gui/Forms/MainWindow/MainWindow.xaml.cs (.../MainWindow.xaml.cs) (revision 3ede22c08da5f2050eb231137a2c6dd552e1ebdf) @@ -17,7 +17,7 @@ using System.Windows.Interop; using System.Windows.Media.Imaging; using Core.Common.Controls; -using Core.Common.Controls.Swf; +using Core.Common.Controls.Dialogs; using Core.Common.Gui.Forms.MessageWindow; using Core.Common.Gui.Forms.Options; using Core.Common.Utils; Index: Core/Common/src/Core.Common.Gui/Forms/MessageWindow/MessageWindow.cs =================================================================== diff -u -r343fa44e519ff64bb0d8f8972e08ffcd1b64737f -r3ede22c08da5f2050eb231137a2c6dd552e1ebdf --- Core/Common/src/Core.Common.Gui/Forms/MessageWindow/MessageWindow.cs (.../MessageWindow.cs) (revision 343fa44e519ff64bb0d8f8972e08ffcd1b64737f) +++ Core/Common/src/Core.Common.Gui/Forms/MessageWindow/MessageWindow.cs (.../MessageWindow.cs) (revision 3ede22c08da5f2050eb231137a2c6dd552e1ebdf) @@ -5,7 +5,7 @@ using System.Drawing; using System.Windows.Forms; using Core.Common.Controls; -using Core.Common.Controls.Swf; +using Core.Common.Controls.Dialogs; using Core.Common.Gui.Properties; using log4net.Core; Index: Core/Common/src/Core.Common.Gui/Forms/ProgressDialog/ActivityProgressDialogRunner.cs =================================================================== diff -u -r1f79b34c12554e2b9878f6296168d18232cc9852 -r3ede22c08da5f2050eb231137a2c6dd552e1ebdf --- Core/Common/src/Core.Common.Gui/Forms/ProgressDialog/ActivityProgressDialogRunner.cs (.../ActivityProgressDialogRunner.cs) (revision 1f79b34c12554e2b9878f6296168d18232cc9852) +++ Core/Common/src/Core.Common.Gui/Forms/ProgressDialog/ActivityProgressDialogRunner.cs (.../ActivityProgressDialogRunner.cs) (revision 3ede22c08da5f2050eb231137a2c6dd552e1ebdf) @@ -1,6 +1,6 @@ using System.Collections.Generic; using Core.Common.Base.Service; -using Core.Common.Controls.Swf; +using Core.Common.Controls.Dialogs; namespace Core.Common.Gui.Forms.ProgressDialog { Index: Core/Plugins/src/Core.Plugins.SharpMapGis.Gui/Commands/MapChangeCoordinateSystemCommand.cs =================================================================== diff -u -r7ca30c36a4c796c39a1137d7f504884d766c6e70 -r3ede22c08da5f2050eb231137a2c6dd552e1ebdf --- Core/Plugins/src/Core.Plugins.SharpMapGis.Gui/Commands/MapChangeCoordinateSystemCommand.cs (.../MapChangeCoordinateSystemCommand.cs) (revision 7ca30c36a4c796c39a1137d7f504884d766c6e70) +++ Core/Plugins/src/Core.Plugins.SharpMapGis.Gui/Commands/MapChangeCoordinateSystemCommand.cs (.../MapChangeCoordinateSystemCommand.cs) (revision 3ede22c08da5f2050eb231137a2c6dd552e1ebdf) @@ -1,5 +1,5 @@ using System.Windows.Forms; -using Core.Common.Controls.Swf; +using Core.Common.Controls.Dialogs; using Core.GIS.SharpMap.CoordinateSystems.Transformations; using Core.GIS.SharpMap.Extensions.CoordinateSystems; using Core.GIS.SharpMap.UI.Forms;