Exemplo n.º 1
0
        public void intervalChange(GropByType interval)
        {
            ModelingConfig config = model.getConfig();

            config.setInterval(interval);
            commandsStore.executeCommand(
                new UpdateConfigCommand <ModelingReport, ModelingConfig>(model, config));
        }
Exemplo n.º 2
0
        public void flagUseCovarChange(bool flag)
        {
            ModelingConfig config = model.getConfig();

            config.setWithKovar(flag);
            commandsStore.executeCommand(
                new UpdateConfigCommand <ModelingReport, ModelingConfig>(model, config));
        }
Exemplo n.º 3
0
 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);
     }
 }
Exemplo n.º 4
0
        //Подписка на модель с данными о количестве и процентном соотношении лицензий
        public void notify()
        {
            HandModifiedDataState result = handModifiedDataModel.getResult();
            ModelingConfig        config = model.getConfig();

            config.UnicSoftwareNames         = result.unicSoftwareNames;
            config.NumberOfPurcharedLicenses = result.numberOfPurcharedLicenses;
            config.Percents        = result.percents;
            config.NotifyObservers = false;
            UpdateConfigCommand <ModelingReport, ModelingConfig> command =
                new UpdateConfigCommand <ModelingReport, ModelingConfig>(model, config);

            command.execute();
            //commandsStore.executeCommand(
            //      new UpdateConfigCommand<ModelingReport, ModelingConfig>(model, config));
        }
Exemplo n.º 5
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;
        }
Exemplo n.º 6
0
 public void setConfig(ModelingConfig config)
 {
     this.config = config;
 }