Index: Core/Common/src/Core.Common.Controls.Swf/Core.Common.Controls.Swf.csproj =================================================================== diff -u -r045f766f6da1214f0a810d537952cf1f170a4d99 -rd9aa9bb832f858854e0b94b1eb86bc91358d8ea0 --- Core/Common/src/Core.Common.Controls.Swf/Core.Common.Controls.Swf.csproj (.../Core.Common.Controls.Swf.csproj) (revision 045f766f6da1214f0a810d537952cf1f170a4d99) +++ Core/Common/src/Core.Common.Controls.Swf/Core.Common.Controls.Swf.csproj (.../Core.Common.Controls.Swf.csproj) (revision d9aa9bb832f858854e0b94b1eb86bc91358d8ea0) @@ -210,12 +210,6 @@ Component - - Form - - - InputTextDialog.cs - @@ -298,9 +292,6 @@ HtmlPageView.cs Designer - - InputTextDialog.cs - OpenUrlDialog.cs Designer Fisheye: Tag d9aa9bb832f858854e0b94b1eb86bc91358d8ea0 refers to a dead (removed) revision in file `Core/Common/src/Core.Common.Controls.Swf/InputTextDialog.Designer.cs'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag d9aa9bb832f858854e0b94b1eb86bc91358d8ea0 refers to a dead (removed) revision in file `Core/Common/src/Core.Common.Controls.Swf/InputTextDialog.cs'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag d9aa9bb832f858854e0b94b1eb86bc91358d8ea0 refers to a dead (removed) revision in file `Core/Common/src/Core.Common.Controls.Swf/InputTextDialog.resx'. Fisheye: No comparison available. Pass `N' to diff? Index: Core/Common/src/Core.Common.Controls.Swf/Properties/Resources.Designer.cs =================================================================== diff -u -r045f766f6da1214f0a810d537952cf1f170a4d99 -rd9aa9bb832f858854e0b94b1eb86bc91358d8ea0 --- Core/Common/src/Core.Common.Controls.Swf/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision 045f766f6da1214f0a810d537952cf1f170a4d99) +++ Core/Common/src/Core.Common.Controls.Swf/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision d9aa9bb832f858854e0b94b1eb86bc91358d8ea0) @@ -435,15 +435,6 @@ } /// - /// Looks up a localized string similar to Controleer of de invoer geldig is.. - /// - internal static string InputTextDialog_InputTextDialog_Please_verify_the_input_is_valid { - get { - return ResourceManager.GetString("InputTextDialog_InputTextDialog_Please_verify_the_input_is_valid", resourceCulture); - } - } - - /// /// Looks up a localized string similar to Verwijderen is niet geïmplementeerd voor dit type databron.. /// internal static string KeyEvent_Deletion_not_implemented_for_this_type_of_datasource { Index: Core/Common/src/Core.Common.Controls.Swf/Properties/Resources.resx =================================================================== diff -u -r045f766f6da1214f0a810d537952cf1f170a4d99 -rd9aa9bb832f858854e0b94b1eb86bc91358d8ea0 --- Core/Common/src/Core.Common.Controls.Swf/Properties/Resources.resx (.../Resources.resx) (revision 045f766f6da1214f0a810d537952cf1f170a4d99) +++ Core/Common/src/Core.Common.Controls.Swf/Properties/Resources.resx (.../Resources.resx) (revision d9aa9bb832f858854e0b94b1eb86bc91358d8ea0) @@ -388,9 +388,6 @@ Hoofdvenster niet geïnjecteerd. - - Controleer of de invoer geldig is. - {0} exemplaren van {1} zijn met {2} vervangen. Index: Core/Plugins/src/Core.Plugins.SharpMapGis.Gui/Core.Plugins.SharpMapGis.Gui.csproj =================================================================== diff -u -r5dc6b11ada2c7d2e4ca14413b1ddca577ba34d08 -rd9aa9bb832f858854e0b94b1eb86bc91358d8ea0 --- Core/Plugins/src/Core.Plugins.SharpMapGis.Gui/Core.Plugins.SharpMapGis.Gui.csproj (.../Core.Plugins.SharpMapGis.Gui.csproj) (revision 5dc6b11ada2c7d2e4ca14413b1ddca577ba34d08) +++ Core/Plugins/src/Core.Plugins.SharpMapGis.Gui/Core.Plugins.SharpMapGis.Gui.csproj (.../Core.Plugins.SharpMapGis.Gui.csproj) (revision d9aa9bb832f858854e0b94b1eb86bc91358d8ea0) @@ -84,6 +84,12 @@ + + Form + + + InputTextDialog.cs + @@ -130,6 +136,9 @@ + + InputTextDialog.cs + MapLegendView.cs Designer Index: Core/Plugins/src/Core.Plugins.SharpMapGis.Gui/Forms/InputTextDialog.Designer.cs =================================================================== diff -u --- Core/Plugins/src/Core.Plugins.SharpMapGis.Gui/Forms/InputTextDialog.Designer.cs (revision 0) +++ Core/Plugins/src/Core.Plugins.SharpMapGis.Gui/Forms/InputTextDialog.Designer.cs (revision d9aa9bb832f858854e0b94b1eb86bc91358d8ea0) @@ -0,0 +1,95 @@ +namespace Core.Plugins.SharpMapGis.Gui.Forms +{ + partial class InputTextDialog + { + /// + /// 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.components = new System.ComponentModel.Container(); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(InputTextDialog)); + this.ButtonOk = new System.Windows.Forms.Button(); + this.ButtonCancel = new System.Windows.Forms.Button(); + this.textBox1 = new System.Windows.Forms.TextBox(); + this.errorProvider = new System.Windows.Forms.ErrorProvider(this.components); + ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit(); + this.SuspendLayout(); + // + // ButtonOk + // + resources.ApplyResources(this.ButtonOk, "ButtonOk"); + this.ButtonOk.DialogResult = System.Windows.Forms.DialogResult.OK; + this.ButtonOk.Name = "ButtonOk"; + this.ButtonOk.UseVisualStyleBackColor = true; + this.ButtonOk.Click += new System.EventHandler(this.ButtonOkClick); + // + // ButtonCancel + // + resources.ApplyResources(this.ButtonCancel, "ButtonCancel"); + this.ButtonCancel.CausesValidation = false; + this.ButtonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; + this.ButtonCancel.Name = "ButtonCancel"; + this.ButtonCancel.UseVisualStyleBackColor = true; + this.ButtonCancel.Click += new System.EventHandler(this.ButtonCancelClick); + // + // textBox1 + // + resources.ApplyResources(this.textBox1, "textBox1"); + this.textBox1.Name = "textBox1"; + // + // errorProvider + // + this.errorProvider.ContainerControl = this; + // + // InputTextDialog + // + this.AcceptButton = this.ButtonOk; + resources.ApplyResources(this, "$this"); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.CancelButton = this.ButtonCancel; + this.Controls.Add(this.textBox1); + this.Controls.Add(this.ButtonCancel); + this.Controls.Add(this.ButtonOk); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; + this.MaximizeBox = false; + this.MinimizeBox = false; + this.Name = "InputTextDialog"; + this.ShowIcon = false; + this.ShowInTaskbar = false; + this.Activated += new System.EventHandler(this.InputTextDialogActivated); + ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.Button ButtonOk; + private System.Windows.Forms.Button ButtonCancel; + private System.Windows.Forms.TextBox textBox1; + private System.Windows.Forms.ErrorProvider errorProvider; + } +} \ No newline at end of file Index: Core/Plugins/src/Core.Plugins.SharpMapGis.Gui/Forms/InputTextDialog.cs =================================================================== diff -u --- Core/Plugins/src/Core.Plugins.SharpMapGis.Gui/Forms/InputTextDialog.cs (revision 0) +++ Core/Plugins/src/Core.Plugins.SharpMapGis.Gui/Forms/InputTextDialog.cs (revision d9aa9bb832f858854e0b94b1eb86bc91358d8ea0) @@ -0,0 +1,116 @@ +using System; +using System.ComponentModel; +using System.Windows.Forms; +using Core.Common.Controls.Swf.Properties; +using Core.Plugins.SharpMapGis.Gui.Properties; + +namespace Core.Plugins.SharpMapGis.Gui.Forms +{ + /// + /// Simple input box dialog + /// + public partial class InputTextDialog : Form + { + private bool escapeButtonPressed; + + public InputTextDialog() + { + InitializeComponent(); + InitialText = ""; + textBox1.Validating += textBox1_Validating; + errorProvider.SetIconAlignment(ButtonOk, ErrorIconAlignment.MiddleLeft); + ValidationErrorMsg = Resources.InputTextDialog_InputTextDialog_Please_verify_the_input_is_valid; + } + + public bool Multiline + { + get + { + return textBox1.Multiline; + } + set + { + textBox1.Multiline = value; + AcceptButton = value ? null : ButtonOk; + } + } + + /// + /// Text the user entered in the dialog + /// + public string EnteredText + { + get + { + return textBox1.Text; + } + set + { + textBox1.Text = value; + } + } + + public string InitialText { get; set; } + + public Predicate ValidationMethod { get; set; } + + public string ValidationErrorMsg { get; set; } + + protected override bool ProcessDialogKey(Keys keyData) + { + if (keyData == Keys.Escape) + { + escapeButtonPressed = true; + } + return base.ProcessDialogKey(keyData); + } + + private void textBox1_Validating(object sender, CancelEventArgs e) + { + if (escapeButtonPressed) + { + // no validation on cancel + escapeButtonPressed = false; + e.Cancel = false; + return; + } + + if (!DoValidate()) + { + e.Cancel = true; + return; + } + errorProvider.SetError(ButtonOk, string.Empty); + } + + private bool DoValidate() + { + if (ValidationMethod != null) + { + if (!ValidationMethod(textBox1.Text)) + { + errorProvider.SetError(ButtonOk, ValidationErrorMsg); + return false; + } + } + return true; + } + + private void ButtonOkClick(object sender, EventArgs e) + { + DialogResult = DialogResult.OK; + } + + private void ButtonCancelClick(object sender, EventArgs e) + { + DialogResult = DialogResult.Cancel; + } + + private void InputTextDialogActivated(object sender, EventArgs e) + { + //set focus to the textbox when the dialog is shown + textBox1.Text = InitialText; + textBox1.Focus(); + } + } +} \ No newline at end of file Index: Core/Plugins/src/Core.Plugins.SharpMapGis.Gui/Forms/InputTextDialog.resx =================================================================== diff -u --- Core/Plugins/src/Core.Plugins.SharpMapGis.Gui/Forms/InputTextDialog.resx (revision 0) +++ Core/Plugins/src/Core.Plugins.SharpMapGis.Gui/Forms/InputTextDialog.resx (revision d9aa9bb832f858854e0b94b1eb86bc91358d8ea0) @@ -0,0 +1,231 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + + + Bottom, Right + + + + 85, 38 + + + 75, 23 + + + + 0 + + + OK + + + ButtonOk + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 2 + + + Bottom, Right + + + 166, 38 + + + 75, 23 + + + 1 + + + Annuleren + + + ButtonCancel + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 1 + + + Top, Bottom, Left, Right + + + 12, 12 + + + 227, 20 + + + 2 + + + textBox1 + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 0 + + + 17, 17 + + + True + + + 6, 13 + + + 251, 65 + + + CenterParent + + + Zoeken … + + + errorProvider + + + System.Windows.Forms.ErrorProvider, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + InputTextDialog + + + System.Windows.Forms.Form, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file Index: Core/Plugins/src/Core.Plugins.SharpMapGis.Gui/Properties/Resources.Designer.cs =================================================================== diff -u -r83b9621346f7f3ca887096468de965815eb609ac -rd9aa9bb832f858854e0b94b1eb86bc91358d8ea0 --- Core/Plugins/src/Core.Plugins.SharpMapGis.Gui/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision 83b9621346f7f3ca887096468de965815eb609ac) +++ Core/Plugins/src/Core.Plugins.SharpMapGis.Gui/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision d9aa9bb832f858854e0b94b1eb86bc91358d8ea0) @@ -1,7 +1,7 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:4.0.30319.34209 +// Runtime Version:4.0.30319.18063 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -400,6 +400,15 @@ } /// + /// Looks up a localized string similar to Controleer of de invoer geldig is.. + /// + public static string InputTextDialog_InputTextDialog_Please_verify_the_input_is_valid { + get { + return ResourceManager.GetString("InputTextDialog_InputTextDialog_Please_verify_the_input_is_valid", resourceCulture); + } + } + + /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// public static System.Drawing.Bitmap LassoSelect { Index: Core/Plugins/src/Core.Plugins.SharpMapGis.Gui/Properties/Resources.resx =================================================================== diff -u -r83b9621346f7f3ca887096468de965815eb609ac -rd9aa9bb832f858854e0b94b1eb86bc91358d8ea0 --- Core/Plugins/src/Core.Plugins.SharpMapGis.Gui/Properties/Resources.resx (.../Resources.resx) (revision 83b9621346f7f3ca887096468de965815eb609ac) +++ Core/Plugins/src/Core.Plugins.SharpMapGis.Gui/Properties/Resources.resx (.../Resources.resx) (revision d9aa9bb832f858854e0b94b1eb86bc91358d8ea0) @@ -752,4 +752,7 @@ Shape-bestand (*.shp)|*.shp + + Controleer of de invoer geldig is. + \ No newline at end of file