From 03fdf17d5bf1a354adface8239c09ed6bbca266e Mon Sep 17 00:00:00 2001 From: kudzu_cp <6d05c8c8ef5431987001abfdb2eadc9593ac9498> Date: Wed, 11 Jul 2012 18:01:24 +0000 Subject: [PATCH] --- .../Cosmos.Build.Builder/MainWindow.xaml | 2 +- .../Cosmos.Build.Builder/MainWindow.xaml.cs | 20 ++++++++++++------- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/source2/Build/Cosmos.Build.Builder/MainWindow.xaml b/source2/Build/Cosmos.Build.Builder/MainWindow.xaml index aac945b40..be667165e 100644 --- a/source2/Build/Cosmos.Build.Builder/MainWindow.xaml +++ b/source2/Build/Cosmos.Build.Builder/MainWindow.xaml @@ -1,7 +1,7 @@  + Title="Cosmos Kit Builder" Height="496" Width="709" Loaded="Window_Loaded" Icon="/Cosmos.Build.Builder;component/Cosmos.ico" Closed="Window_Closed" SizeChanged="Window_SizeChanged"> diff --git a/source2/Build/Cosmos.Build.Builder/MainWindow.xaml.cs b/source2/Build/Cosmos.Build.Builder/MainWindow.xaml.cs index ad9d8f6de..038a5b902 100644 --- a/source2/Build/Cosmos.Build.Builder/MainWindow.xaml.cs +++ b/source2/Build/Cosmos.Build.Builder/MainWindow.xaml.cs @@ -240,12 +240,12 @@ namespace Cosmos.Build.Builder { mContent.Inlines.Add(aLine); mContent.Inlines.Add(new LineBreak()); - }); + }); } void Window_Loaded(object sender, RoutedEventArgs e) { - Left = Properties.Settings.Default.Location.X; - Top = Properties.Settings.Default.Location.Y; + Left = Properties.Settings.Default.Location.X; + Top = Properties.Settings.Default.Location.Y; string xAppPath = System.AppDomain.CurrentDomain.BaseDirectory; mCosmosPath = Path.GetFullPath(xAppPath + @"..\..\..\..\..\"); if (App.InstallTask) { @@ -261,10 +261,16 @@ namespace Cosmos.Build.Builder { Clipboard.SetText(mClipboard.ToString()); } - private void Window_Closed(object sender, EventArgs e) - { - Properties.Settings.Default.Location = new System.Drawing.Point((int)Left, (int)Top); - Properties.Settings.Default.Save(); + private void Window_Closed(object sender, EventArgs e) { + Properties.Settings.Default.Location = new System.Drawing.Point((int)Left, (int)Top); + Properties.Settings.Default.Save(); + } + + private void Window_SizeChanged(object sender, SizeChangedEventArgs e) { + // User had unminimized window, or maximized it, or otherwise manually intervened. + if (WindowState != System.Windows.WindowState.Minimized) { + mPreventAutoClose = true; + } } }