Author: gedmurphy
Date: Tue Apr 22 16:02:30 2008
New Revision: 33112
URL:
http://svn.reactos.org/svn/reactos?rev=33112&view=rev
Log:
correctly close and dispose the app when 'hide when minimized' isn't
selected.
Modified:
trunk/tools/Message Translator/GUI/Program.cs
Modified: trunk/tools/Message Translator/GUI/Program.cs
URL:
http://svn.reactos.org/svn/reactos/trunk/tools/Message%20Translator/GUI/Pro…
==============================================================================
--- trunk/tools/Message Translator/GUI/Program.cs [iso-8859-1] (original)
+++ trunk/tools/Message Translator/GUI/Program.cs [iso-8859-1] Tue Apr 22 16:02:30 2008
@@ -35,12 +35,19 @@
// create the notify icon and it's associated context menu
InitializeContext();
+ if (!HideOnMinimize())
+ ShowForm();
+ }
+
+ private bool HideOnMinimize()
+ {
string regPath = @"Software\ReactOS\MsgTrans";
string keyName = "HideOnMin";
+
RegistryKey rk = Registry.CurrentUser.CreateSubKey(regPath);
string hideOnMin = rk.GetValue(keyName).ToString();
- if (Convert.ToBoolean(hideOnMin) == false)
- ShowForm();
+
+ return Convert.ToBoolean(hideOnMin);
}
private void InitializeContext()
@@ -133,6 +140,9 @@
{
// null out the main form so we know to create a new one.
this.mainForm = null;
+
+ if (!HideOnMinimize())
+ ExitThread();
}
protected override void ExitThreadCore()