/// <summary> /// Sets the Controls to the Current State of the Properties /// </summary> public void setConfigurationControls() { //Sets controls to the current properties values in the program TxtDashboardDirectory.Text = directory; TxtExcelFile.Text = excelFile; TxtPrefix.Text = prefix; CboToProgram.SelectedIndex = CboToProgram.FindString(lastProgram.getProgram()); CbGenerateExcels.Checked = isGenerateExcels; CbSaveInDB.Checked = isSaveInDB; CbDeleteExcels.Checked = isDeleteExcels; CbGenerateOne.Checked = isGenerateOne; CbAcumulatedExcel.Checked = isAcumulatedExcel; if (isAutomaticProgram) { RbAutomaticProgram.Checked = true; } else { RbToProgram.Checked = true; } PaToProgram.Enabled = RbToProgram.Checked; foreach (Program program in Enum.GetValues(typeof(Program))) { if (!ignoredPrograms.Contains(program)) { CboToProgram.Items.Add(program.getProgram()); } } }
/// <summary> /// Sets the Properties to the Current State of the Controls /// </summary> public void setConfigurationProperties() { //Sets properties to the current configuration controls in the program directory = TxtDashboardDirectory.Text; excelFile = TxtExcelFile.Text; prefix = TxtPrefix.Text; lastProgram = CboToProgram.GetItemText(CboToProgram.SelectedItem).getProgram(); isGenerateExcels = CbGenerateExcels.Checked; isSaveInDB = CbSaveInDB.Checked; isDeleteExcels = CbDeleteExcels.Checked; isGenerateOne = CbGenerateOne.Checked; isAcumulatedExcel = CbAcumulatedExcel.Checked; isAutomaticProgram = RbAutomaticProgram.Checked; }