예제 #1
0
 void InitConditions()
 {
     List<Condition> conditionList = LetterManager.GetConditionsList();
     try
     {
         for (int i = 0; i < conditionList.Count; i++)
         {
             _checkBoxeslist[i].Text = conditionList[i].Text;
             _checkBoxeslist[i].Name = conditionList[i].Id.ToString();
             if (conditionList[i].IsChecked)
             {
                 _checkBoxeslist[i].Checked = true;
             }
             else
             {
                 _checkBoxeslist[i].Checked = false;
             }
             this.Controls.Add(_checkBoxeslist[i]);
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("Exception from WinFormsFace.Form_main.InitConditions() " + ex.Message);
     }
 }
예제 #2
0
 void ResetControls(bool isAdrChange = false)
 {
     this.Height = 271 + (LetterManager.GetConditionsList().Count * 24);
     LetterManager.ResetData();
     ClearCreditorsCombo();
     ClearRegsCombo();
     ClearReadyRegsCombo();
     if (!isAdrChange)
     {
         ClearAdrCombo();
         InitAdrCombo();
     }
     ClearTemplateCombo();
     toolStripLabel_pins.Text = "0";
     toolStrip_template.Text = "";
     button_load_file.Text = "Загрузить из файла";
     button_add_reg.Enabled = false;
     button_remove_reg.Enabled = false;
     button_letter_report.Enabled = false;
     button_to_generate.Enabled = false;
     InitCreditorsCombo();
     InitTemplateCombo();
     InitConditions();
     textBox_summa.Text = "0";
     button_load_file.Enabled = false;
     comboBox_creditors.Enabled = false;
     comboBox_regs.Enabled = false;
     comboBox_ready_regs.Enabled = false;
 }
예제 #3
0
 void FillCheckBoxList()
 {
     try
     {
         for (int i = 0; i < LetterManager.GetConditionsList().Count; i++)
         {
             CheckBox cb = new CheckBox();
             cb.Left = 50;
             cb.Top = 170 + (i * 24);
             cb.Width = 350;
             _checkBoxeslist.Add(cb);
         }
         CreateHandlers();
     }
     catch (Exception ex)
     {
         MessageBox.Show("Exception from WinFormsFace.Form_main.FillCheckBoxList() " + ex.Message);
     }
 }