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); }
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); }
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); }
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); }
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); }
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); }
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); }
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() { int temp; ProgramConfiguraton.LoadFormParams(this, ConfigFormOption.Location); string text = LocalConfiguration.LoadControlCustomParameter(nUDVisibleTime, "Value"); if (!string.IsNullOrEmpty(text) && int.TryParse(text, out temp)) { nUDVisibleTime.Value = temp; } text = LocalConfiguration.LoadControlCustomParameter(nUDTimeForAnswer, "Value"); if (!string.IsNullOrEmpty(text) && int.TryParse(text, out temp)) { nUDTimeForAnswer.Value = temp; } cBVisionTime.Checked = LocalConfiguration.LoadControlCustomParameter(cBVisionTime, "Checked") == "1"; cBTimeForAnswer.Checked = LocalConfiguration.LoadControlCustomParameter(cBTimeForAnswer, "Checked") == "1"; rbNumber.Checked = LocalConfiguration.LoadControlCustomParameter(rbNumber, "Checked") == "1"; rbSum.Checked = LocalConfiguration.LoadControlCustomParameter(rbSum, "Checked") == "1"; if (!rbSum.Checked && !rbNumber.Checked) { rbNumber.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); }
private void LoadFormConfiguration() { int temp; ProgramConfiguraton.LoadFormParams(this, ConfigFormOption.Location); string text = LocalConfiguration.LoadControlCustomParameter(nUDSymbolsCount, "Value"); if (!string.IsNullOrEmpty(text) && int.TryParse(text, out temp)) { nUDSymbolsCount.Value = temp; } text = LocalConfiguration.LoadControlCustomParameter(nUDVisibleTime, "Value"); if (!string.IsNullOrEmpty(text) && int.TryParse(text, out temp)) { nUDVisibleTime.Value = temp; } text = LocalConfiguration.LoadControlCustomParameter(nUDTimeForAnswer, "Value"); if (!string.IsNullOrEmpty(text) && int.TryParse(text, out temp)) { nUDTimeForAnswer.Value = temp; } rbNumbers.Checked = LocalConfiguration.LoadControlCustomParameter(rbNumbers, "Checked") == "1"; rbNumbersAndSymbols.Checked = LocalConfiguration.LoadControlCustomParameter(rbNumbersAndSymbols, "Checked") == "1"; if (!rbNumbers.Checked && !rbNumbersAndSymbols.Checked) { rbNumbers.Checked = true; } rBEyesight.Checked = LocalConfiguration.LoadControlCustomParameter(rBEyesight, "Checked") == "1"; rBHearing.Checked = LocalConfiguration.LoadControlCustomParameter(rBHearing, "Checked") == "1"; if (!rBEyesight.Checked && !rBHearing.Checked) { rBEyesight.Checked = true; } cBTimeForAnswer.Checked = LocalConfiguration.LoadControlCustomParameter(cBTimeForAnswer, "Checked") == "1"; this.FormClosed += new FormClosedEventHandler(SaveFormConfiguration); }
private void LoadFormConfiguration() { int temp; ProgramConfiguraton.LoadFormParams(this, ConfigFormOption.Location); string text = LocalConfiguration.LoadControlCustomParameter(nUDVisibleTime, "Value"); if (!string.IsNullOrEmpty(text) && int.TryParse(text, out temp)) { nUDVisibleTime.Value = temp; } rbNormal.Checked = LocalConfiguration.LoadControlCustomParameter(rbNormal, "Checked") == "1"; rbInverse.Checked = LocalConfiguration.LoadControlCustomParameter(rbInverse, "Checked") == "1"; rBRandom.Checked = LocalConfiguration.LoadControlCustomParameter(rBRandom, "Checked") == "1"; if (!rbNormal.Checked && !rbInverse.Checked && !rBRandom.Checked) { rbNormal.Checked = true; } this.FormClosed += new FormClosedEventHandler(SaveFormConfiguration); }
private void LoadFormConfiguration() { decimal tmpDecimal; ProgramConfiguraton.LoadFormParams(this, ConfigFormOption.Location); string text = LocalConfiguration.LoadControlCustomParameter(nUDVisibleTime, "Value"); if (!string.IsNullOrEmpty(text) && decimal.TryParse(text, out tmpDecimal)) { nUDVisibleTime.Value = tmpDecimal; } text = LocalConfiguration.LoadControlCustomParameter(nUDNumberCount, "Value"); if (!string.IsNullOrEmpty(text) && decimal.TryParse(text, out tmpDecimal)) { nUDNumberCount.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"; rbAddition.Checked = LocalConfiguration.LoadControlCustomParameter(rbAddition, "Checked") == "1"; rbMultiplication.Checked = LocalConfiguration.LoadControlCustomParameter(rbMultiplication, "Checked") == "1"; cBTimeForAnswer.Checked = LocalConfiguration.LoadControlCustomParameter(cBTimeForAnswer, "Checked") == "1"; cBAddMinus.Checked = LocalConfiguration.LoadControlCustomParameter(cBAddMinus, "Checked") == "1"; if (!rbMultiplication.Checked && !rbAddition.Checked) { rbMultiplication.Checked = true; } text = LocalConfiguration.LoadControlCustomParameter(nUDx1Left, "Value"); if (!string.IsNullOrEmpty(text) && decimal.TryParse(text, out tmpDecimal)) { nUDx1Left.Value = tmpDecimal; } text = LocalConfiguration.LoadControlCustomParameter(nUDx1Right, "Value"); if (!string.IsNullOrEmpty(text) && decimal.TryParse(text, out tmpDecimal)) { nUDx1Right.Value = tmpDecimal; } text = LocalConfiguration.LoadControlCustomParameter(nUDx2Left, "Value"); if (!string.IsNullOrEmpty(text) && decimal.TryParse(text, out tmpDecimal)) { nUDx2Left.Value = tmpDecimal; } text = LocalConfiguration.LoadControlCustomParameter(nUDx2Right, "Value"); if (!string.IsNullOrEmpty(text) && decimal.TryParse(text, out tmpDecimal)) { nUDx2Right.Value = tmpDecimal; } this.FormClosed += new FormClosedEventHandler(SaveFormConfiguration); }