void SaveFormConfiguration(object sender, FormClosedEventArgs e)
        {
            ProgramConfiguraton.SaveFormParams(this, ConfigFormOption.Location);
            LocalConfiguration.SaveControlCustomParameter(nUDVisibleTime, "Value", nUDVisibleTime.Value.ToString());

            LocalConfiguration.SaveControlCustomParameter(cBVisionTime, "Checked", cBVisionTime.Checked ? "1" : "0");

            LocalConfiguration.SaveControlCustomParameter(rbAddition, "Checked", rbAddition.Checked ? "1" : "0");
            LocalConfiguration.SaveControlCustomParameter(rbMultiplication, "Checked", rbMultiplication.Checked ? "1" : "0");
            LocalConfiguration.SaveControlCustomParameter(cBTimeForAnswer, "Checked", cBTimeForAnswer.Checked ? "1" : "0");
            LocalConfiguration.SaveControlCustomParameter(cBAddMinus, "Checked", cBAddMinus.Checked ? "1" : "0");

            LocalConfiguration.SaveControlCustomParameter(nUDNumberCount, "Value", nUDNumberCount.Value.ToString());

            LocalConfiguration.SaveControlCustomParameter(nUDTimeForAnswer, "Value", nUDTimeForAnswer.Value.ToString());

            LocalConfiguration.SaveControlCustomParameter(nUDx1Left, "Value", nUDx1Left.Value.ToString());
            LocalConfiguration.SaveControlCustomParameter(nUDx1Right, "Value", nUDx1Right.Value.ToString());
            LocalConfiguration.SaveControlCustomParameter(nUDx2Left, "Value", nUDx2Left.Value.ToString());
            LocalConfiguration.SaveControlCustomParameter(nUDx2Right, "Value", nUDx2Right.Value.ToString());

            train.SaveExeruciseSerie();

            ProgramConfiguraton.SaveXmlConfig();
        }
        private void LoadFormConfiguration()
        {
            ProgramConfiguraton.LoadFormParams(this, ConfigFormOption.Location);

            rbStraight.Checked = LocalConfiguration.LoadControlCustomParameter(rbStraight, "Checked") == "1";
            rbRandom.Checked   = LocalConfiguration.LoadControlCustomParameter(rbRandom, "Checked") == "1";

            if (!rbStraight.Checked && !rbRandom.Checked)
            {
                rbStraight.Checked = true;
            }

            string text = LocalConfiguration.LoadControlCustomParameter(cBList, "SelectedItem");

            if (!string.IsNullOrEmpty(text))
            {
                foreach (var item in cBList.Items)
                {
                    if (item.ToString() == text)
                    {
                        cBList.SelectedItem = item;
                        break;
                    }
                }
            }

            this.FormClosed += new FormClosedEventHandler(SaveFormConfiguration);
        }
Beispiel #3
0
        private void LoadFormConfiguration()
        {
            int temp;

            ProgramConfiguraton.LoadFormParams(this, ConfigFormOption.Location | ConfigFormOption.Size);

            string text;

            text = LocalConfiguration.LoadControlCustomParameter(nUDVisibleTime, "Value");
            if (!string.IsNullOrEmpty(text) && int.TryParse(text, out temp))
            {
                nUDVisibleTime.Value = temp;
            }

            text = LocalConfiguration.LoadControlCustomParameter(nUDTimeNextCircle, "Value");
            if (!string.IsNullOrEmpty(text) && int.TryParse(text, out temp))
            {
                nUDTimeNextCircle.Value = temp;
            }

            chBVisionTime.Checked = LocalConfiguration.LoadControlCustomParameter(chBVisionTime, "Checked") == "1";
            chBNextCircle.Checked = LocalConfiguration.LoadControlCustomParameter(chBNextCircle, "Checked") == "1";

            this.FormClosed += new FormClosedEventHandler(SaveFormConfiguration);
        }
Beispiel #4
0
        private void LoadFormConfiguration()
        {
            ProgramConfiguraton.LoadFormParams(this, ConfigFormOption.Location | ConfigFormOption.Size);

            string text; decimal tmpDecimal;

            text = LocalConfiguration.LoadControlCustomParameter(nUDNumberCount, "Value");
            if (!string.IsNullOrEmpty(text) && decimal.TryParse(text, out tmpDecimal))
            {
                nUDNumberCount.Value = tmpDecimal;
            }

            text = LocalConfiguration.LoadControlCustomParameter(nUDTimeForNumber, "Value");
            if (!string.IsNullOrEmpty(text) && decimal.TryParse(text, out tmpDecimal))
            {
                nUDTimeForNumber.Value = tmpDecimal;
            }

            cBTimeForNumber.Checked = LocalConfiguration.LoadControlCustomParameter(cBTimeForNumber, "Checked") == "1";

            cBCounter.Checked        = LocalConfiguration.LoadControlCustomParameter(cBCounter, "Checked") == "1";
            cBRandomPosition.Checked = LocalConfiguration.LoadControlCustomParameter(cBRandomPosition, "Checked") == "1";
            cBWithNumber.Checked     = LocalConfiguration.LoadControlCustomParameter(cBWithNumber, "Checked") == "1";

            LocalConfiguration.LoadListCheckedItems(this, netCheckedListBox.ListBox);

            this.FormClosed += new FormClosedEventHandler(SaveFormConfiguration);
        }
Beispiel #5
0
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);

            gridFiltersControl.RecreateGridFilters();

            ProgramConfiguraton.LoadGridFilter(gridFiltersControl);
        }
        void SaveFormConfiguration(object sender, FormClosedEventArgs e)
        {
            ProgramConfiguraton.SaveFormParams(this, ConfigFormOption.Location);

            train.SaveExeruciseSerie();

            ProgramConfiguraton.SaveXmlConfig();
        }
        public void LoadFormConfiguration()
        {
            ProgramConfiguraton.LoadFormParams(this, ConfigFormOption.Location | ConfigFormOption.Size | ConfigFormOption.Maximized);

            ProgramConfiguraton.LoadControlsSize(gBQuestion);

            ProgramConfiguraton.LoadDataGridViewParams(dGVList, ConfigDataGridViewOption.Width);
        }
        public void SaveFormConfiguration()
        {
            ProgramConfiguraton.SaveFormParams(this, ConfigFormOption.Location | ConfigFormOption.Maximized | ConfigFormOption.Size);

            ProgramConfiguraton.SaveFormCustomParameter(this, "defaultFilePath", this.defaultFilePath);
            ProgramConfiguraton.SaveFormCustomParameter(this, "defaultFolderPath", this.defaultFolderPath);

            ProgramConfiguraton.SaveXmlConfig();
        }
Beispiel #9
0
        public void SaveFormConfiguration()
        {
            ProgramConfiguraton.SaveFormParams(this, ConfigFormOption.Location | ConfigFormOption.Size | ConfigFormOption.Maximized);

            ProgramConfiguraton.SaveDataGridViewParams(dGVList, ConfigDataGridViewOption.Width);

            ProgramConfiguraton.SaveGridFilter(gridFiltersControl);

            ProgramConfiguraton.SaveDefaultXmlConfig();
        }
        public void SaveFormConfiguration()
        {
            ProgramConfiguraton.SaveFormParams(this, ConfigFormOption.Location | ConfigFormOption.Maximized | ConfigFormOption.Size);

            LocalConfiguration.SaveControllerConfiguration(this, saController);

            LocalConfiguration.SaveFormCustomParameter(this, "LinesCount", tSCBLinesCount.SelectedItem.ToString());

            ProgramConfiguraton.SaveXmlConfig();
        }
Beispiel #11
0
        private void LoadFormConfiguration()
        {
            decimal temp; string text;

            ProgramConfiguraton.LoadFormParams(this, ConfigFormOption.Location);

            text = LocalConfiguration.LoadControlCustomParameter(nUDSymbolsCount, "Value");
            if (!string.IsNullOrEmpty(text) && decimal.TryParse(text, out temp))
            {
                nUDSymbolsCount.Value = temp;
            }

            text = LocalConfiguration.LoadControlCustomParameter(nUDWordsCount, "Value");
            if (!string.IsNullOrEmpty(text) && decimal.TryParse(text, out temp))
            {
                nUDWordsCount.Value = temp;
            }

            text = LocalConfiguration.LoadControlCustomParameter(nUDVisibleTime, "Value");
            if (!string.IsNullOrEmpty(text) && decimal.TryParse(text, out temp))
            {
                nUDVisibleTime.Value = temp;
            }

            text = LocalConfiguration.LoadControlCustomParameter(rbSymbols, "Checked");
            rbSymbols.Checked = text == "1";

            text = LocalConfiguration.LoadControlCustomParameter(rbDictionary, "Checked");
            rbDictionary.Checked = text == "1";

            cbRandomSymbols.Checked = LocalConfiguration.LoadControlCustomParameter(cbRandomSymbols, "Checked") == "1";

            cBColor.Checked = LocalConfiguration.LoadControlCustomParameter(cBColor, "Checked") == "1";

            if (!rbDictionary.Checked && !rbSymbols.Checked)
            {
                rbSymbols.Checked = true;
            }

            text = LocalConfiguration.LoadControlCustomParameter(cBDictionary, "SelectedItem");
            if (!string.IsNullOrEmpty(text))
            {
                foreach (var item in cBDictionary.Items)
                {
                    if (item.ToString() == text)
                    {
                        cBDictionary.SelectedItem = item;
                        break;
                    }
                }
            }

            this.FormClosed += new FormClosedEventHandler(SaveFormConfiguration);
        }
        void SaveFormConfiguration(object sender, FormClosedEventArgs e)
        {
            ProgramConfiguraton.SaveFormParams(this, ConfigFormOption.Location);

            LocalConfiguration.SaveControlCustomParameter(nUDVisibleTime, "Value", nUDVisibleTime.Value.ToString());
            LocalConfiguration.SaveControlCustomParameter(cBAutoShow, "Checked", cBAutoShow.Checked ? "1" : "0");

            train.SaveExeruciseSerie();

            ProgramConfiguraton.SaveXmlConfig();
        }
Beispiel #13
0
        void SaveFormConfiguration(object sender, FormClosedEventArgs e)
        {
            ProgramConfiguraton.SaveFormParams(this, ConfigFormOption.Location);
            LocalConfiguration.SaveControlCustomParameter(nUDVisibleTime, "Value", nUDVisibleTime.Value.ToString());

            LocalConfiguration.SaveControlCustomParameter(rbNormal, "Checked", rbNormal.Checked ? "1" : "0");
            LocalConfiguration.SaveControlCustomParameter(rbInverse, "Checked", rbInverse.Checked ? "1" : "0");
            LocalConfiguration.SaveControlCustomParameter(rBRandom, "Checked", rBRandom.Checked ? "1" : "0");

            ProgramConfiguraton.SaveXmlConfig();
        }
Beispiel #14
0
        public void LoadFormConfiguration()
        {
            string text;

            text = ProgramConfiguraton.LoadFormCustomParameter(this, parameterDataBaseFile);

            if (!string.IsNullOrEmpty(text))
            {
                OperateFile(text);
            }
        }
Beispiel #15
0
        void SaveFormConfiguration(object sender, FormClosedEventArgs e)
        {
            ProgramConfiguraton.SaveFormParams(this, ConfigFormOption.Location | ConfigFormOption.Size);

            LocalConfiguration.SaveControlCustomParameter(nUDVisibleTime, "Value", nUDVisibleTime.Value.ToString());
            LocalConfiguration.SaveControlCustomParameter(nUDTimeNextCircle, "Value", nUDTimeNextCircle.Value.ToString());

            LocalConfiguration.SaveControlCustomParameter(chBVisionTime, "Checked", chBVisionTime.Checked ? "1" : "0");
            LocalConfiguration.SaveControlCustomParameter(chBNextCircle, "Checked", chBNextCircle.Checked ? "1" : "0");

            ProgramConfiguraton.SaveXmlConfig();
        }
        private void FormBookLibrary_Load(object sender, EventArgs e)
        {
            string text = ProgramConfiguraton.LoadFormCustomParameter(this, "DefaultLibraryPath");

            if (!string.IsNullOrEmpty(text))
            {
                if (HandleNewLibraryDirectory(Path.Combine(Environment.CurrentDirectory, text)))
                {
                    ProgramConfiguraton.LoadExpandedTreeNode(tVLibraryTree);
                }
            }
        }
        public void SaveFormConfiguration()
        {
            ProgramConfiguraton.SaveFormParams(this, ConfigFormOption.Location | ConfigFormOption.Maximized | ConfigFormOption.Size);

            ProgramConfiguraton.SaveFormCustomParameter(this, "DefaultLibraryPath", this.defaultLibraryPath);
            if (!string.IsNullOrEmpty(this.defaultLibraryPath) && Directory.Exists(this.defaultLibraryPath))
            {
                ProgramConfiguraton.SaveExpandedTreeNode(tVLibraryTree);
            }

            ProgramConfiguraton.SaveXmlConfig();
        }
Beispiel #18
0
        private void LoadFormConfiguration()
        {
            decimal tempDecimal;
            int     tempInt;
            string  tempString;

            ProgramConfiguraton.LoadFormParams(this, ConfigFormOption.Location);

            LocalConfiguration.LoadListCheckedItems(this, netCheckedListBox.ListBox);

            tempString = LocalConfiguration.LoadControlCustomParameter(cBTestType, "SelectedIndex");
            if (!string.IsNullOrEmpty(tempString) && int.TryParse(tempString, out tempInt))
            {
                if (tempInt >= 0 && tempInt < cBTestType.Items.Count)
                {
                    cBTestType.SelectedIndex = tempInt;
                }
            }

            tempString = LocalConfiguration.LoadControlCustomParameter(nUDRight, "Value");
            if (!string.IsNullOrEmpty(tempString) && decimal.TryParse(tempString, out tempDecimal))
            {
                nUDRight.Value = tempDecimal;
            }

            tempString = LocalConfiguration.LoadControlCustomParameter(nUDLeft, "Value");
            if (!string.IsNullOrEmpty(tempString) && decimal.TryParse(tempString, out tempDecimal))
            {
                nUDLeft.Value = tempDecimal;
            }

            chbValueRange.Checked = LocalConfiguration.LoadControlCustomParameter(chbValueRange, "Checked") == "1";

            rBNumber.Checked      = LocalConfiguration.LoadControlCustomParameter(rBNumber, "Checked") == "0";
            rBCalculation.Checked = LocalConfiguration.LoadControlCustomParameter(rBCalculation, "Checked") == "1";

            if (!rBNumber.Checked && !rBCalculation.Checked)
            {
                rBNumber.Checked = true;
            }

            chBVisionTime.Checked = LocalConfiguration.LoadControlCustomParameter(chBVisionTime, "Checked") == "1";

            tempString = LocalConfiguration.LoadControlCustomParameter(nUDVisibleTime, "Value");
            if (!string.IsNullOrEmpty(tempString) && decimal.TryParse(tempString, out tempDecimal))
            {
                nUDVisibleTime.Value = tempDecimal;
            }

            this.FormClosed += new FormClosedEventHandler(SaveFormConfiguration);
        }
        private void LoadFormConfiguration()
        {
            int temp;

            ActivateControls();

            ProgramConfiguraton.LoadFormParams(this, ConfigFormOption.Location);

            string text = LocalConfiguration.LoadControlCustomParameter(nUDSeriesCount, "Value");

            if (!string.IsNullOrEmpty(text) && int.TryParse(text, out temp))
            {
                nUDSeriesCount.Value = temp;
            }

            text = LocalConfiguration.LoadControlCustomParameter(nUDVisibleTime, "Value");
            if (!string.IsNullOrEmpty(text) && int.TryParse(text, out temp))
            {
                nUDVisibleTime.Value = temp;
            }

            text = LocalConfiguration.LoadControlCustomParameter(nUDAdditionOption, "Value");
            if (!string.IsNullOrEmpty(text) && int.TryParse(text, out temp))
            {
                nUDAdditionOption.Value = temp;
            }

            text = LocalConfiguration.LoadControlCustomParameter(nUDLeft, "Value");
            if (!string.IsNullOrEmpty(text) && int.TryParse(text, out temp))
            {
                nUDLeft.Value = temp;
            }

            text = LocalConfiguration.LoadControlCustomParameter(nUDRight, "Value");
            if (!string.IsNullOrEmpty(text) && int.TryParse(text, out temp))
            {
                nUDRight.Value = temp;
            }

            chBVisionTime.Checked     = LocalConfiguration.LoadControlCustomParameter(chBVisionTime, "Checked") == "1";
            chBAddition.Checked       = LocalConfiguration.LoadControlCustomParameter(chBAddition, "Checked") == "1";
            chBMultiplication.Checked = LocalConfiguration.LoadControlCustomParameter(chBMultiplication, "Checked") == "1";

            if (!chBAddition.Checked && !chBMultiplication.Checked)
            {
                chBAddition.Checked = true;
            }

            this.FormClosed += new FormClosedEventHandler(SaveFormConfiguration);
        }
Beispiel #20
0
        protected override void OnFormClosed(FormClosedEventArgs e)
        {
            ProgramConfiguraton.SaveFormParams(this, ConfigFormOption.Location);

#if DEBUG
            ProgramConfiguraton.SaveFormCustomParameter(this, "LocalSettingFolder_Debug", Config.LocalSettingFolder);
#else
            ProgramConfiguraton.SaveFormCustomParameter(this, "LocalSettingFolder", Config.LocalSettingFolder);
#endif

            ProgramConfiguraton.SaveFormCustomParameter(this, "ClickedButton", this.clickedButton);

            ProgramConfiguraton.SaveXmlConfig();

            base.OnFormClosed(e);
        }
        void SaveFormConfiguration(object sender, FormClosedEventArgs e)
        {
            ProgramConfiguraton.SaveFormParams(this, ConfigFormOption.Location);

            LocalConfiguration.SaveControlCustomParameter(rbStraight, "Checked", rbStraight.Checked ? "1" : "0");
            LocalConfiguration.SaveControlCustomParameter(rbRandom, "Checked", rbRandom.Checked ? "1" : "0");

            if (cBList.SelectedItem != null)
            {
                LocalConfiguration.SaveControlCustomParameter(cBList, "SelectedItem", cBList.SelectedItem.ToString());
            }

            train.Stop();

            ProgramConfiguraton.SaveXmlConfig();
        }
        void SaveFormConfiguration(object sender, FormClosedEventArgs e)
        {
            ProgramConfiguraton.SaveFormParams(this, ConfigFormOption.Location);
            LocalConfiguration.SaveControlCustomParameter(nUDSeriesCount, "Value", nUDSeriesCount.Value.ToString());
            LocalConfiguration.SaveControlCustomParameter(nUDVisibleTime, "Value", nUDVisibleTime.Value.ToString());

            LocalConfiguration.SaveControlCustomParameter(nUDAdditionOption, "Value", nUDAdditionOption.Value.ToString());
            LocalConfiguration.SaveControlCustomParameter(nUDLeft, "Value", nUDLeft.Value.ToString());
            LocalConfiguration.SaveControlCustomParameter(nUDRight, "Value", nUDRight.Value.ToString());

            LocalConfiguration.SaveControlCustomParameter(chBVisionTime, "Checked", chBVisionTime.Checked ? "1" : "0");
            LocalConfiguration.SaveControlCustomParameter(chBAddition, "Checked", chBAddition.Checked ? "1" : "0");
            LocalConfiguration.SaveControlCustomParameter(chBMultiplication, "Checked", chBMultiplication.Checked ? "1" : "0");

            ProgramConfiguraton.SaveXmlConfig();
        }
        private void LoadFormConfiguration()
        {
            ProgramConfiguraton.LoadFormParams(this, ConfigFormOption.Location | ConfigFormOption.Size);

            string text; decimal tmpDecimal;

            text = LocalConfiguration.LoadControlCustomParameter(nUDQuestionCount, "Value");
            if (!string.IsNullOrEmpty(text) && decimal.TryParse(text, out tmpDecimal))
            {
                nUDQuestionCount.Value = tmpDecimal;
            }

            text = LocalConfiguration.LoadControlCustomParameter(nUDTimeForWord, "Value");
            if (!string.IsNullOrEmpty(text) && decimal.TryParse(text, out tmpDecimal))
            {
                nUDTimeForWord.Value = tmpDecimal;
            }

            cBWithoutOldTest.Checked = LocalConfiguration.LoadControlCustomParameter(cBWithoutOldTest, "Checked") == "1";
            text = LocalConfiguration.LoadControlCustomParameter(nUDOldTestWords, "Value");
            if (!string.IsNullOrEmpty(text) && decimal.TryParse(text, out tmpDecimal))
            {
                nUDOldTestWords.Value = tmpDecimal;
            }

            cBWordsRepeat.Checked = LocalConfiguration.LoadControlCustomParameter(cBWordsRepeat, "Checked") == "1";
            cBTimeForWord.Checked = LocalConfiguration.LoadControlCustomParameter(cBTimeForWord, "Checked") == "1";

            cBCounter.Checked        = LocalConfiguration.LoadControlCustomParameter(cBCounter, "Checked") == "1";
            cBRandomPosition.Checked = LocalConfiguration.LoadControlCustomParameter(cBRandomPosition, "Checked") == "1";
            cBWithNumber.Checked     = LocalConfiguration.LoadControlCustomParameter(cBWithNumber, "Checked") == "1";

            text = LocalConfiguration.LoadControlCustomParameter(cBDictionary, "SelectedItem");
            if (!string.IsNullOrEmpty(text))
            {
                foreach (var item in cBDictionary.Items)
                {
                    if (item.ToString() == text)
                    {
                        cBDictionary.SelectedItem = item;
                        break;
                    }
                }
            }

            this.FormClosed += new FormClosedEventHandler(SaveFormConfiguration);
        }
        private void LoadFormConfiguration()
        {
            ProgramConfiguraton.LoadFormParams(this, ConfigFormOption.Location);

            string tempText;

            foreach (Control item in gBTimers.Controls)
            {
                if (item is DateTimePicker)
                {
                    DateTimePicker dtp = item as DateTimePicker;

                    tempText = LocalConfiguration.LoadControlCustomParameter(dtp, "Time");
                    if (!string.IsNullOrEmpty(tempText))
                    {
                        double lg;
                        if (double.TryParse(tempText, out lg))
                        {
                            TimeSpan span = TimeSpan.FromSeconds(lg);

                            dtp.Value = DateTime.Today.Add(span);
                        }
                    }
                }
            }

            tempText = LocalConfiguration.LoadControlCustomParameter(cbTimer, "SelectedIndex");
            if (!string.IsNullOrEmpty(tempText))
            {
                int ind = 0;
                if (int.TryParse(tempText, out ind))
                {
                    if (ind < cbTimer.Items.Count)
                    {
                        cbTimer.SelectedIndex = ind;
                    }
                }
            }

            tempText = LocalConfiguration.LoadControlCustomParameter(chBWithInterruption, "Checked");
            if (!string.IsNullOrEmpty(tempText))
            {
                chBWithInterruption.Checked = tempText == "1";
            }

            this.FormClosed += new FormClosedEventHandler(SaveFormConfiguration);
        }
Beispiel #25
0
        public App()
        {
            if (!mutex.WaitOne(TimeSpan.FromSeconds(1), false))
            {
                return;
            }

            try
            {
                ProgramConfiguraton.LoadXmlConfig();

                //Application.Run(new FormSelect());

                ProgramConfiguraton.SaveXmlConfig();
            }
            finally { mutex.ReleaseMutex(); }
        }
Beispiel #26
0
        void SaveFormConfiguration(object sender, FormClosedEventArgs e)
        {
            ProgramConfiguraton.SaveFormParams(this, ConfigFormOption.Location);
            LocalConfiguration.SaveControlCustomParameter(nUDSymbolsCount, "Value", nUDSymbolsCount.Value.ToString());
            LocalConfiguration.SaveControlCustomParameter(nUDVisibleTime, "Value", nUDVisibleTime.Value.ToString());
            LocalConfiguration.SaveControlCustomParameter(nUDTimeForAnswer, "Value", nUDTimeForAnswer.Value.ToString());

            LocalConfiguration.SaveControlCustomParameter(rbNumbers, "Checked", rbNumbers.Checked ? "1" : "0");
            LocalConfiguration.SaveControlCustomParameter(rbNumbersAndSymbols, "Checked", rbNumbersAndSymbols.Checked ? "1" : "0");

            LocalConfiguration.SaveControlCustomParameter(cBVisionTime, "Checked", cBVisionTime.Checked ? "1" : "0");
            LocalConfiguration.SaveControlCustomParameter(cBTimeForAnswer, "Checked", cBTimeForAnswer.Checked ? "1" : "0");

            train.SaveExeruciseSerie();

            ProgramConfiguraton.SaveXmlConfig();
        }
Beispiel #27
0
        private void LoadFormConfiguration()
        {
            string  text;
            decimal tmpDecimal;

            ProgramConfiguraton.LoadFormParams(this, ConfigFormOption.Location);

            text = LocalConfiguration.LoadControlCustomParameter(nUDVisibleTime, "Value");
            if (!string.IsNullOrEmpty(text) && decimal.TryParse(text, out tmpDecimal))
            {
                nUDVisibleTime.Value = tmpDecimal;
            }

            text = LocalConfiguration.LoadControlCustomParameter(nUDTimeForAnswer, "Value");
            if (!string.IsNullOrEmpty(text) && decimal.TryParse(text, out tmpDecimal))
            {
                nUDTimeForAnswer.Value = tmpDecimal;
            }

            cBVisionTime.Checked    = LocalConfiguration.LoadControlCustomParameter(cBVisionTime, "Checked") == "1";
            cBTimeForAnswer.Checked = LocalConfiguration.LoadControlCustomParameter(cBTimeForAnswer, "Checked") == "1";

            rBDayOfWeek.Checked = LocalConfiguration.LoadControlCustomParameter(rBDayOfWeek, "Checked") == "1";
            rBYear.Checked      = LocalConfiguration.LoadControlCustomParameter(rBYear, "Checked") == "1";
            rBYear12.Checked    = LocalConfiguration.LoadControlCustomParameter(rBYear12, "Checked") == "1";
            rBMonth.Checked     = LocalConfiguration.LoadControlCustomParameter(rBMonth, "Checked") == "1";

            if (!rBDayOfWeek.Checked && !rBYear.Checked && !rBYear12.Checked && !rBMonth.Checked)
            {
                rBDayOfWeek.Checked = true;
            }

            text = LocalConfiguration.LoadControlCustomParameter(nUDRight, "Value");
            if (!string.IsNullOrEmpty(text) && decimal.TryParse(text, out tmpDecimal))
            {
                nUDRight.Value = tmpDecimal;
            }

            text = LocalConfiguration.LoadControlCustomParameter(nUDLeft, "Value");
            if (!string.IsNullOrEmpty(text) && decimal.TryParse(text, out tmpDecimal))
            {
                nUDLeft.Value = tmpDecimal;
            }

            this.FormClosed += new FormClosedEventHandler(SaveFormConfiguration);
        }
        private void LoadFormConfiguration()
        {
            decimal tmpDecimal;

            ProgramConfiguraton.LoadFormParams(this, ConfigFormOption.Location);

            string text = LocalConfiguration.LoadControlCustomParameter(nUDSymbolsCount, "Value");

            if (!string.IsNullOrEmpty(text) && decimal.TryParse(text, out tmpDecimal))
            {
                nUDSymbolsCount.Value = tmpDecimal;
            }

            text = LocalConfiguration.LoadControlCustomParameter(nUDVisibleTime, "Value");
            if (!string.IsNullOrEmpty(text) && decimal.TryParse(text, out tmpDecimal))
            {
                nUDVisibleTime.Value = tmpDecimal;
            }

            text = LocalConfiguration.LoadControlCustomParameter(nUDTimeForAnswer, "Value");
            if (!string.IsNullOrEmpty(text) && decimal.TryParse(text, out tmpDecimal))
            {
                nUDTimeForAnswer.Value = tmpDecimal;
            }

            text = LocalConfiguration.LoadControlCustomParameter(nUDRight, "Value");
            if (!string.IsNullOrEmpty(text) && decimal.TryParse(text, out tmpDecimal))
            {
                nUDRight.Value = tmpDecimal;
            }

            text = LocalConfiguration.LoadControlCustomParameter(nUDLeft, "Value");
            if (!string.IsNullOrEmpty(text) && decimal.TryParse(text, out tmpDecimal))
            {
                nUDLeft.Value = tmpDecimal;
            }

            chbValueRange.Checked = LocalConfiguration.LoadControlCustomParameter(chbValueRange, "Checked") == "1";

            chBTimeForAnswer.Checked = LocalConfiguration.LoadControlCustomParameter(chBTimeForAnswer, "Checked") == "1";
            chBAutoShow.Checked      = LocalConfiguration.LoadControlCustomParameter(chBAutoShow, "Checked") == "1";

            LocalConfiguration.LoadListCheckedItems(this, netCheckedListBox.ListBox);

            this.FormClosed += new FormClosedEventHandler(SaveFormConfiguration);
        }
        private void LoadFormConfiguration()
        {
            string text;
            int    temp;

            ProgramConfiguraton.LoadFormParams(this, ConfigFormOption.Location);

            cBAutoShow.Checked = LocalConfiguration.LoadControlCustomParameter(cBAutoShow, "Checked") == "1";

            text = LocalConfiguration.LoadControlCustomParameter(nUDVisibleTime, "Value");
            if (!string.IsNullOrEmpty(text) && int.TryParse(text, out temp))
            {
                nUDVisibleTime.Value = temp;
            }

            this.FormClosed += new FormClosedEventHandler(SaveFormConfiguration);
        }
Beispiel #30
0
        void SaveFormConfiguration(object sender, FormClosedEventArgs e)
        {
            ProgramConfiguraton.SaveFormParams(this, ConfigFormOption.Location | ConfigFormOption.Size);

            LocalConfiguration.SaveControlCustomParameter(nUDNumberCount, "Value", nUDNumberCount.Value.ToString());
            LocalConfiguration.SaveControlCustomParameter(nUDTimeForNumber, "Value", nUDTimeForNumber.Value.ToString());

            LocalConfiguration.SaveControlCustomParameter(cBTimeForNumber, "Checked", cBTimeForNumber.Checked ? "1" : "0");

            LocalConfiguration.SaveControlCustomParameter(cBCounter, "Checked", cBCounter.Checked ? "1" : "0");
            LocalConfiguration.SaveControlCustomParameter(cBRandomPosition, "Checked", cBRandomPosition.Checked ? "1" : "0");
            LocalConfiguration.SaveControlCustomParameter(cBWithNumber, "Checked", cBWithNumber.Checked ? "1" : "0");

            LocalConfiguration.SaveListCheckedItems(this, netCheckedListBox.ListBox);

            ProgramConfiguraton.SaveXmlConfig();
        }