Exemplo n.º 1
0
        private void InitializeMisc()
        {
            bool beta = Properties.Settings.Default.BetaRelease;

            if (beta) this.Text += " (beta)";

            ActiveKeyboardList.Add(DefaultLayout);

            using (AboutKeyMagic aboutDlg = new AboutKeyMagic())
            {
                lblAboutTitle.Text = String.Format("About {0} {1} {2}", AboutKeyMagic.AssemblyTitle, AboutKeyMagic.AssemblyVersion, beta ? "(beta)" : "");
            }

            is64bit = InternalCheckIsWow64();

            if (Environment.OSVersion.Version.Major >= 6)
            {
                isVistaOrLater = true;
            }

            isAdmin = IsUserAdministrator();

            // Check every 15 days
            if (Properties.Settings.Default.LastCheckUpdateDate.Add(new TimeSpan(15, 0, 0, 0)) < DateTime.Now)
            {
                Debug.WriteLine("Will check for update. " + Properties.Settings.Default.LastCheckUpdateDate.Add(new TimeSpan(15, 0, 0, 0)) + " < " + DateTime.Now);
                Thread autoCheckUpdate = new Thread(new ThreadStart(delegate()
                {
                    // Wait for 5 minutes
                    Thread.Sleep(new TimeSpan(0, 5, 0));
                    CheckForUpdates(true);
                }));

                threads["AutoCheckUpdate"] = autoCheckUpdate;
                autoCheckUpdate.Start();
            }

            new Thread(new ThreadStart(delegate()
            {
                Thread.Sleep(new TimeSpan(0, 5, 0));
                ReportUserInfo();
            }));
        }
Exemplo n.º 2
0
 private void aboutToolStripMenuItem_Click(object sender, EventArgs e)
 {
     AboutKeyMagic about = new AboutKeyMagic();
     about.ShowDialog(this);
 }