Index: src/DeltaShell/DeltaShell.Gui/Forms/OptionsDialog/OptionsDialog.cs =================================================================== diff -u -r8f6ae890fed8e8eae3a32f9c0498a10f82e0ddf9 -r5fc71a385897af92ccb092f2f969b5709afab85a --- src/DeltaShell/DeltaShell.Gui/Forms/OptionsDialog/OptionsDialog.cs (.../OptionsDialog.cs) (revision 8f6ae890fed8e8eae3a32f9c0498a10f82e0ddf9) +++ src/DeltaShell/DeltaShell.Gui/Forms/OptionsDialog/OptionsDialog.cs (.../OptionsDialog.cs) (revision 5fc71a385897af92ccb092f2f969b5709afab85a) @@ -13,7 +13,7 @@ public partial class OptionsDialog : Form { private readonly EventedList optionsControls; - + public OptionsDialog() { InitializeComponent(); @@ -23,8 +23,26 @@ treeView1.AfterSelect += TreeViewSelectionChanged; } - public IList OptionsControls { get { return optionsControls; } } + public IList OptionsControls + { + get + { + return optionsControls; + } + } + protected override void OnFormClosed(FormClosedEventArgs e) + { + if (DialogResult != DialogResult.OK) + { + foreach (var control in OptionsControls) + { + control.DeclineChanges(); + } + } + base.OnFormClosed(e); + } + private void TreeViewSelectionChanged(object sender, TreeViewEventArgs e) { var selectedNode = e.Node; @@ -105,17 +123,5 @@ control.DeclineChanges(); } } - - protected override void OnFormClosed(FormClosedEventArgs e) - { - if (DialogResult != DialogResult.OK) - { - foreach (var control in OptionsControls) - { - control.DeclineChanges(); - } - } - base.OnFormClosed(e); - } } } \ No newline at end of file