Browse Source

Исправление мелких ошибок

Вячеслав Терешенко 2 years ago
parent
commit
271a02a0e4

+ 9 - 5
ImpulseVision/ApplicationParameters.cs

@@ -310,15 +310,19 @@ namespace ImpulseVision
         private int GetCountDay()
         {
             int CountDay = 2;
-            RegistryKey Reg = Registry.CurrentUser.OpenSubKey("Software\\ImpulseVisionApp");
-            if (Reg != null)
+            try
             {
-                if(Reg.GetValue("countDay") != null)
+                RegistryKey Reg = Registry.CurrentUser.OpenSubKey("Software\\ImpulseVisionApp");
+                if (Reg != null)
                 {
-                    CountDay = (int)Reg.GetValue("countDay");
+                    if (Reg.GetValue("countDay") != null)
+                    {
+                        CountDay = (int)Reg.GetValue("countDay");
+                    }
                 }
+                Reg.Close();
             }
-            Reg.Close();
+            catch { }
             return CountDay;
         }
         /// <summary>

+ 0 - 1
ImpulseVision/FormAutorize.cs

@@ -90,7 +90,6 @@ values ('{LblUserID.Text.Trim()}',GETDATE())";
             if(File.Exists(Application.StartupPath+"\\autorun.txt"))
             {
                 this.WindowState = FormWindowState.Minimized;
-                //this.ShowInTaskbar = false;
                 this.Hide();
                 Notify.Visible = true;
             }

+ 1 - 0
ImpulseVision/FormMain.Designer.cs

@@ -768,6 +768,7 @@
             this.TbxLogin.TextInput = "";
             this.TbxLogin.TextPreview = "Логин";
             this.TbxLogin.UseSystemPasswordChar = false;
+            this.TbxLogin.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.TbxLogin_KeyPress);
             // 
             // GbxSystemParameters
             // 

+ 5 - 0
ImpulseVision/FormMain.cs

@@ -1211,5 +1211,10 @@ where [Login] = '{login}'";
             }
 
         }
+
+        private void TbxLogin_KeyPress(object sender, KeyPressEventArgs e)
+        {
+            e.Handled = true;
+        }
     }
 }

BIN
ImpulseVision/bin/Debug/ImpulseVision.exe


+ 0 - 0
ImpulseVision/bin/Debug/autorun.txt