public void numberOfModelingStartsChange(int number)
 {
     try
     {
         ModelingConfig config = model.getConfig();
         config.setNumberOfStartsModeling(number);
         commandsStore.executeCommand(
             new UpdateConfigCommand <ModelingReport, ModelingConfig>(model, config));
     }
     catch (Exception ex)
     {
         ExceptionHandler.getInstance().processing(ex);
     }
 }
Esempio n. 2
0
        public ModelingView(Form1 form, ModelingModel model)
        {
            this.form = form;
            form.dataGridView2Elem.Rows.Clear();
            form.dataGridView2Elem.Columns.Clear();
            form.dataGridView2Elem.RowHeadersVisible = false;
            //добавили колонки
            DataGridViewTextBoxColumn coefficient5;

            coefficient5            = new DataGridViewTextBoxColumn();
            coefficient5.Name       = "Тип лицензии";
            coefficient5.HeaderText = "Тип лицензии";
            coefficient5.Width      = 150;
            form.dataGridView2Elem.Columns.Add(coefficient5);
            DataGridViewTextBoxColumn coefficient6;

            coefficient6            = new DataGridViewTextBoxColumn();
            coefficient6.Name       = "Максимальное количество заявок";
            coefficient6.HeaderText = "Максимальное количество заявок";
            coefficient6.Width      = 100;
            form.dataGridView2Elem.Columns.Add(coefficient6);
            DataGridViewTextBoxColumn coefficient7;

            coefficient7            = new DataGridViewTextBoxColumn();
            coefficient7.Name       = "Среднее количество заявок";
            coefficient7.HeaderText = "Среднее количество заявок";
            coefficient7.Width      = 100;
            form.dataGridView2Elem.Columns.Add(coefficient7);
            form.progressBar1Elem.Value = 0;


            this.model = model;
            this.model.subscribe(this);
            config = new ModelingConfig(
                "D:\\Files\\MsVisualProjects\\Diplom\\Логи\\testlogs\\Database3.accdb",
                BasicType.year);
            config.setWithKovar(false);
            config.setNumberOfStartsModeling(1);
            model.setConfig(config);
            form.progressBar1Elem.Value = 0;
        }