Index: Core/Common/src/Core.Common.Gui/Core.Common.Gui.csproj =================================================================== diff -u -rc321601e82e383960d4bb357d72b56da81fae253 -r687f68519e8e01e867ffbd3dbba58d52f7e9e2e9 --- Core/Common/src/Core.Common.Gui/Core.Common.Gui.csproj (.../Core.Common.Gui.csproj) (revision c321601e82e383960d4bb357d72b56da81fae253) +++ Core/Common/src/Core.Common.Gui/Core.Common.Gui.csproj (.../Core.Common.Gui.csproj) (revision 687f68519e8e01e867ffbd3dbba58d52f7e9e2e9) @@ -164,18 +164,11 @@ - UserControl + Form GeneralOptionsControl.cs - - - Form - - - OptionsDialog.cs - Component @@ -333,10 +326,6 @@ GeneralOptionsControl.cs Designer - - OptionsDialog.cs - Designer - ActivityProgressDialog.cs Index: Core/Common/src/Core.Common.Gui/Forms/MainWindow/MainWindow.xaml.cs =================================================================== diff -u -r2b1937d120d50436169ef18d9fce57d4400d1bbe -r687f68519e8e01e867ffbd3dbba58d52f7e9e2e9 --- Core/Common/src/Core.Common.Gui/Forms/MainWindow/MainWindow.xaml.cs (.../MainWindow.xaml.cs) (revision 2b1937d120d50436169ef18d9fce57d4400d1bbe) +++ Core/Common/src/Core.Common.Gui/Forms/MainWindow/MainWindow.xaml.cs (.../MainWindow.xaml.cs) (revision 687f68519e8e01e867ffbd3dbba58d52f7e9e2e9) @@ -1008,25 +1008,14 @@ private void OnFileOptionsClicked(object sender, RoutedEventArgs e) { - var optionsDialog = new OptionsDialog.OptionsDialog() + var optionsDialog = new GeneralOptionsControl { - OptionsControls = - { - CreateGeneralOptions() - } - }; - - optionsDialog.ShowDialog(); - } - - private GeneralOptionsControl CreateGeneralOptions() - { - return new GeneralOptionsControl - { UserSettings = Gui.UserSettings, ColorTheme = (ColorTheme) Gui.UserSettings["colorTheme"], OnAcceptChanges = ApplyColorTheme }; + + optionsDialog.ShowDialog(); } private void ApplyColorTheme(GeneralOptionsControl control) Index: Core/Common/src/Core.Common.Gui/Forms/OptionsDialog/GeneralOptionsControl.Designer.cs =================================================================== diff -u -re3fe000640536463811a1051aedf6da711ee0f56 -r687f68519e8e01e867ffbd3dbba58d52f7e9e2e9 --- Core/Common/src/Core.Common.Gui/Forms/OptionsDialog/GeneralOptionsControl.Designer.cs (.../GeneralOptionsControl.Designer.cs) (revision e3fe000640536463811a1051aedf6da711ee0f56) +++ Core/Common/src/Core.Common.Gui/Forms/OptionsDialog/GeneralOptionsControl.Designer.cs (.../GeneralOptionsControl.Designer.cs) (revision 687f68519e8e01e867ffbd3dbba58d52f7e9e2e9) @@ -30,6 +30,8 @@ { System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(GeneralOptionsControl)); this.groupBoxUserSettings = new System.Windows.Forms.GroupBox(); + this.buttonCancel = new System.Windows.Forms.Button(); + this.buttonOk = new System.Windows.Forms.Button(); this.comboBoxTheme = new System.Windows.Forms.ComboBox(); this.label1 = new System.Windows.Forms.Label(); this.checkBoxStartPage = new System.Windows.Forms.CheckBox(); @@ -39,12 +41,30 @@ // groupBoxUserSettings // resources.ApplyResources(this.groupBoxUserSettings, "groupBoxUserSettings"); + this.groupBoxUserSettings.Controls.Add(this.buttonCancel); + this.groupBoxUserSettings.Controls.Add(this.buttonOk); this.groupBoxUserSettings.Controls.Add(this.comboBoxTheme); this.groupBoxUserSettings.Controls.Add(this.label1); this.groupBoxUserSettings.Controls.Add(this.checkBoxStartPage); this.groupBoxUserSettings.Name = "groupBoxUserSettings"; this.groupBoxUserSettings.TabStop = false; // + // buttonCancel + // + resources.ApplyResources(this.buttonCancel, "buttonCancel"); + this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; + this.buttonCancel.Name = "buttonCancel"; + this.buttonCancel.UseVisualStyleBackColor = true; + this.buttonCancel.Click += new System.EventHandler(this.buttonCancel_Click); + // + // 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.buttonOk_Click); + // // comboBoxTheme // this.comboBoxTheme.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; @@ -68,10 +88,15 @@ // // GeneralOptionsControl // + this.AcceptButton = this.buttonOk; resources.ApplyResources(this, "$this"); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.CancelButton = this.buttonCancel; this.Controls.Add(this.groupBoxUserSettings); + this.MaximizeBox = false; + this.MinimizeBox = false; this.Name = "GeneralOptionsControl"; + this.ShowInTaskbar = false; this.groupBoxUserSettings.ResumeLayout(false); this.groupBoxUserSettings.PerformLayout(); this.ResumeLayout(false); @@ -84,5 +109,7 @@ private System.Windows.Forms.CheckBox checkBoxStartPage; private System.Windows.Forms.ComboBox comboBoxTheme; private System.Windows.Forms.Label label1; + private System.Windows.Forms.Button buttonCancel; + private System.Windows.Forms.Button buttonOk; } } \ No newline at end of file Index: Core/Common/src/Core.Common.Gui/Forms/OptionsDialog/GeneralOptionsControl.cs =================================================================== diff -u -re3fe000640536463811a1051aedf6da711ee0f56 -r687f68519e8e01e867ffbd3dbba58d52f7e9e2e9 --- Core/Common/src/Core.Common.Gui/Forms/OptionsDialog/GeneralOptionsControl.cs (.../GeneralOptionsControl.cs) (revision e3fe000640536463811a1051aedf6da711ee0f56) +++ Core/Common/src/Core.Common.Gui/Forms/OptionsDialog/GeneralOptionsControl.cs (.../GeneralOptionsControl.cs) (revision 687f68519e8e01e867ffbd3dbba58d52f7e9e2e9) @@ -3,12 +3,11 @@ using System.Configuration; using System.Security.Permissions; using System.Windows.Forms; -using Core.Common.Gui.Properties; using Core.Common.Utils.Reflection; namespace Core.Common.Gui.Forms.OptionsDialog { - public partial class GeneralOptionsControl : UserControl, IOptionsControl + public partial class GeneralOptionsControl : Form { private ApplicationSettingsBase userSettings; @@ -45,32 +44,16 @@ // TODO: Call this method public Action OnAcceptChanges { get; set; } - public string Title + private void AcceptChanges() { - get - { - return Resources.GeneralOptionsControl_Title_General; - } - } - - public string Category - { - get - { - return Resources.GeneralOptionsControl_Title_General; - } - } - - public void AcceptChanges() - { SetValuesToSettings(); if (OnAcceptChanges != null) { OnAcceptChanges(this); } } - public void DeclineChanges() + private void DeclineChanges() { SetSettingsValuesToControls(); } @@ -138,5 +121,25 @@ /// public string DisplayName { get; set; } } + + protected override void OnFormClosed(FormClosedEventArgs e) + { + if (DialogResult != DialogResult.OK) + { + DeclineChanges(); + } + + base.OnFormClosed(e); + } + + private void buttonOk_Click(object sender, EventArgs e) + { + AcceptChanges(); + } + + private void buttonCancel_Click(object sender, EventArgs e) + { + DeclineChanges(); + } } } \ No newline at end of file Index: Core/Common/src/Core.Common.Gui/Forms/OptionsDialog/GeneralOptionsControl.resx =================================================================== diff -u -rc321601e82e383960d4bb357d72b56da81fae253 -r687f68519e8e01e867ffbd3dbba58d52f7e9e2e9 --- Core/Common/src/Core.Common.Gui/Forms/OptionsDialog/GeneralOptionsControl.resx (.../GeneralOptionsControl.resx) (revision c321601e82e383960d4bb357d72b56da81fae253) +++ Core/Common/src/Core.Common.Gui/Forms/OptionsDialog/GeneralOptionsControl.resx (.../GeneralOptionsControl.resx) (revision 687f68519e8e01e867ffbd3dbba58d52f7e9e2e9) @@ -121,14 +121,74 @@ GrowAndShrink + + Bottom, Right + + + NoControl + + + 386, 156 + + + 75, 23 + + + + 10 + + + Annuleren + + + buttonCancel + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBoxUserSettings + + + 0 + + + Bottom, Right + + + NoControl + + + 305, 155 + + + 75, 23 + + + 9 + + + OK + + + buttonOk + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBoxUserSettings + + + 1 + 83, 45 86, 21 - 8 @@ -142,7 +202,7 @@ groupBoxUserSettings - 0 + 2 True @@ -169,7 +229,7 @@ groupBoxUserSettings - 1 + 3 True @@ -178,7 +238,7 @@ 8, 21 - 188, 17 + 106, 17 3 @@ -196,7 +256,7 @@ groupBoxUserSettings - 2 + 4 Fill @@ -205,13 +265,13 @@ 0, 0 - 489, 229 + 473, 191 0 - Gebruikersinstellingen + Algemeen groupBoxUserSettings @@ -234,13 +294,40 @@ GrowAndShrink - - 489, 229 + + 473, 191 + + + AAABAAEAEBAAAAAAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAQAQAAAAAAAAAAAAAAAAAAAAA + AAD///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af// + /wH///8B////Af///wG3opP/Y0k1/2NJNf9jSTX/Y0k1/2NJNf9jSTX/Y0k1/2NJNf9jSTX/Y0k1//// + /wH///8B////Af///wH///8Bt6KT//////+3opP/t6KT/7eik/+3opP/t6KT/7eik/+3opP/t6KT/2NJ + Nf////8B////Af///wH///8B////Abeik/////////////z6+f/38e7/8efh/+zd1f/m08n/4cq9/7ei + k/9jSTX/////Af///wH///8B////Af///wG3opP//////9zc3P+ZmZn/6+rp//Xt6f/f1M3/2svE/9rH + vf/Br6P/Y0k1/////wH///8B////Af///wH///8Bt6KT//////9nZ2f//////5eXl//48/D/o5iQ/52R + h/+XioD/ybit/2ZNOf////8B////Af///wH///8B////Abqllv//////zs7O/2lpaf/e3t7/+/j3//bv + 6//w5d//69vT/72qnf9mTDj/////Af///wH///8B////Af///wG+qZr///////////////////////79 + /P/59fL/9Ovm/+7h2v+3opP/ZEo2/////wH///8B////Af///wH///8Bw66e//////+0r6r/Qzw7/8C6 + t///////4t3a/9zU0P/b0cv/vaqc/2NJNf////8B////Af///wH///8B////Aciyo///////JiQi/83N + zf9gVlP//////6idlf+jmZH/qqCX/8W1qf9jSTX/////Af///wH///8B////Af///wHMtqf//////6yk + nv8oJST/tbCs/////////////f38/82/tP/Ht6v/ZEo2/////wH///8B////Af///wH///8B0bur//// + /////////////////////////////7eik/9kSjb/ZEo2/2RKNv////8B////Af///wH///8B////AdW/ + r/////////////////////////////////+5pJX/1MW6/2RKNv/Js6SN////Af///wH///8B////Af// + /wHYwrL/////////////////////////////////wKuc/2RKNv/Js6SL////Af///wH///8B////Af// + /wH///8B2MKy/9jCsv/YwrL/2MKy/9jCsv/Uvq7/z7mp/8mzpP/Js6SL////Af///wH///8B////Af// + /wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af// + /wH///8BAAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA + //8AAP//AAD//w== + + + + Opties + GeneralOptionsControl - System.Windows.Forms.UserControl, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Windows.Forms.Form, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 \ No newline at end of file Fisheye: Tag 687f68519e8e01e867ffbd3dbba58d52f7e9e2e9 refers to a dead (removed) revision in file `Core/Common/src/Core.Common.Gui/Forms/OptionsDialog/IOptionsControl.cs'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 687f68519e8e01e867ffbd3dbba58d52f7e9e2e9 refers to a dead (removed) revision in file `Core/Common/src/Core.Common.Gui/Forms/OptionsDialog/OptionsDialog.Designer.cs'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 687f68519e8e01e867ffbd3dbba58d52f7e9e2e9 refers to a dead (removed) revision in file `Core/Common/src/Core.Common.Gui/Forms/OptionsDialog/OptionsDialog.cs'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 687f68519e8e01e867ffbd3dbba58d52f7e9e2e9 refers to a dead (removed) revision in file `Core/Common/src/Core.Common.Gui/Forms/OptionsDialog/OptionsDialog.resx'. Fisheye: No comparison available. Pass `N' to diff? Index: Core/Common/src/Core.Common.Gui/Properties/Resources.Designer.cs =================================================================== diff -u -rc321601e82e383960d4bb357d72b56da81fae253 -r687f68519e8e01e867ffbd3dbba58d52f7e9e2e9 --- Core/Common/src/Core.Common.Gui/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision c321601e82e383960d4bb357d72b56da81fae253) +++ Core/Common/src/Core.Common.Gui/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision 687f68519e8e01e867ffbd3dbba58d52f7e9e2e9) @@ -1047,15 +1047,6 @@ } /// - /// Looks up a localized string similar to Algemeen. - /// - public static string GeneralOptionsControl_Title_General { - get { - return ResourceManager.GetString("GeneralOptionsControl_Title_General", resourceCulture); - } - } - - /// /// Looks up a localized string similar to Generiek. /// public static string Generic { Index: Core/Common/src/Core.Common.Gui/Properties/Resources.resx =================================================================== diff -u -rc321601e82e383960d4bb357d72b56da81fae253 -r687f68519e8e01e867ffbd3dbba58d52f7e9e2e9 --- Core/Common/src/Core.Common.Gui/Properties/Resources.resx (.../Resources.resx) (revision c321601e82e383960d4bb357d72b56da81fae253) +++ Core/Common/src/Core.Common.Gui/Properties/Resources.resx (.../Resources.resx) (revision 687f68519e8e01e867ffbd3dbba58d52f7e9e2e9) @@ -242,9 +242,6 @@ ../Resources/cog_add.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - Algemeen - Documentvenster is al toegevoegd. Activeer de weergave in plaats van het toe te voegen.