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();
        }