Ejemplo n.º 1
0
        private void Settings_Load(object sender, EventArgs e)
        {
            tbMitelDataLogPath.Text = MiConfig.GetLogPath();

            cbShowDebug.Checked         = MiConfig.GetShowDebug();
            cbConnectOnStartup.Checked  = MiConfig.GetConnectOnStartup();
            cbShowNotifications.Checked = MiConfig.GetShowNotifications();
            cbShowSplash.Checked        = MiConfig.GetShowSplash();
            cbMinimiseToTray.Checked    = MiConfig.GetMinimiseToTray();

            //Get the registry setting
            RegistryKey rkApp = Registry.CurrentUser.OpenSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run", true);

            if (rkApp.GetValue("MiSMDR") == null)
            {
                cbStartWithWindows.Checked = false;
            }
            else
            {
                cbStartWithWindows.Checked = true;
            }

            //Load the database strings
            string[] pieces = MiConfig.GetConnectionString("MiDatabaseString").Split(new string[] { ";" }, StringSplitOptions.None);
            tbCallRecordLoc.Text = pieces[0].Remove(0, 12);
            pieces                 = MiConfig.GetConnectionString("MiDemoString").Split(new string[] { ";" }, StringSplitOptions.None);
            tbDemoRecords.Text     = pieces[0].Remove(0, 12);
            tbCallRecordLimit.Text = MiConfig.GetRecordLimit().ToString();
        }
Ejemplo n.º 2
0
 private void SplashScreen_Load(object sender, EventArgs e)
 {
     linkLabel1.Links.Remove(linkLabel1.Links[0]);
     linkLabel1.Links.Add(0, linkLabel1.Text.Length, "http://www.MiSMDR.info");
     if (MiConfig.GetShowSplash())
     {
         this.WindowState = FormWindowState.Normal;
     }
     else
     {
         this.WindowState = FormWindowState.Minimized;
     }
 }
Ejemplo n.º 3
0
 private void SetText(string text)
 {
     // InvokeRequired required compares the thread ID of the
     // calling thread to the thread ID of the creating thread.
     // If these threads are different, it returns true.
     if (MiConfig.GetShowSplash())
     {
         Thread.Sleep(20);
     }
     if (this.lbStatus.InvokeRequired)
     {
         SetTextCallback d = new SetTextCallback(SetText);
         this.Invoke(d, new object[] { text });
     }
     else
     {
         this.lbStatus.Text = text;
     }
 }