/[RomCheater]/trunk/RomCheater.PluginFramework/Core/ScratchPad.cs
ViewVC logotype

Diff of /trunk/RomCheater.PluginFramework/Core/ScratchPad.cs

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

--- trunk/RomCheater.PluginFramework/Core/ScratchPad.cs	2013/06/18 11:37:38	719
+++ trunk/RomCheater.PluginFramework/Core/ScratchPad.cs	2013/06/18 11:39:17	720
@@ -30,6 +30,7 @@
     {
 
         private UserControlPlugin plugin;
+        private bool PostInitDone = false;
         public ScratchPad(UserControlPlugin plugin)
         {
             this.plugin = plugin;
@@ -174,17 +175,14 @@
         }
 
 
-
-        private bool InitDone = false;
-
         private void PerformPostInit()
         {
-            if (!InitDone)
+            if (!PostInitDone)
             {
                 txtScratchPad.Clear();
                 txtScratchPad.Font = new System.Drawing.Font(txtScratchPad.Font, FontStyle.Regular);
                 txtScratchPad.ForeColor = Color.Black;
-                InitDone = true;
+                PostInitDone = true;
             }  
         }
         private void txtScratchPad_MouseDown(object sender, MouseEventArgs e)
@@ -233,7 +231,7 @@
 
         private void ScratchPad_FormClosing(object sender, FormClosingEventArgs e)
         {
-            if (txtScratchPad.Text != string.Empty)
+            if (txtScratchPad.Text != string.Empty && PostInitDone)
             {
                 DialogResult result = MessageBox.Show("Would you like to save the ScratchPad data before Closing?", "", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1);
                 if (result == DialogResult.Cancel)

 

  ViewVC Help
Powered by ViewVC 1.1.22