示例#1
0
        public void DisplayInputQuestions(InputFormParameters form, ICollection <ConnectorParameters> connectors = null)
        {
            InputFormView formView = this.Mapper.Map <InputFormView>(form);

            this.screenData.ScreenSettings = new ScreenSettings <InputFormView>
                                             (
                formView,
                this.Mapper.Map <IEnumerable <ConnectorParameters>, IEnumerable <CommandButtonView> >(connectors),
                ViewType.InputForm,
                new MenuItem {
                Text = formView.Title, Icon = formView.Icon
            }
                                             );
        }
        public void Send(IInputFormParameters parameters)
        {
            if (parameters is TransformTypeParameters)
            {
                var typePar = (parameters as TransformTypeParameters);
                model.Transformation.SetWindowType(typePar.Type.GetValue());

                if (typePar.Type.GetValue() == WindowType.NoWin)
                {
                    paramsView = new InputFormView(this, new TransformContext(model.Transformation.GetTransformConfigs()));
                }
                else
                {
                    if (model.Transformation.GetTransformConfigs() is WindowedTransformStuff)
                    {
                        var stuff = model.Transformation.GetTransformConfigs() as WindowedTransformStuff;
                        paramsView = new InputFormView(this, new WindowTransformContext(stuff));
                    }
                    else
                    {
                        var stuff = new WindowedTransformStuff(model.Transformation.GetTransformConfigs());
                        paramsView = new InputFormView(this, new WindowTransformContext(stuff));
                    }
                }
                paramsView.View();
            }
            else if (parameters is WindowTransformParameters)
            {
                var par = parameters as WindowTransformParameters;
                model.Transformation.SetConfigs(new WindowedTransformStuff(par.Start.GetValue(), par.Step.GetValue(), par.Count.GetValue(),
                                                                           par.WinSize.GetValue(), par.WinStep.GetValue()));
            }
            else if (parameters is TransformParameters)
            {
                var par = parameters as TransformParameters;
                model.Transformation.SetConfigs(new TransformStuff(par.Start.GetValue(), par.Step.GetValue(), par.Count.GetValue()));
            }
            else
            {
                throw new FormatException("Parameters aren't transform configurations!");
            }
        }
示例#3
0
 IEnumerable <ValidationResult> DoValidation(InputFormView vm) => vm.Validate(new ValidationContext(vm, null, null));
示例#4
0
 public AddSignalController(AppModel appModel)
 {
     model = appModel;
     view  = new InputFormView(this, new AddSignalContext());
 }
 public ConfigTransformController(AppModel appModel)
 {
     model      = appModel;
     typeView   = new InputFormView(this, new TransformTypeContext(model.Transformation.GetWindowType()));
     paramsView = new InputFormView(this, new TransformContext(model.Transformation.GetTransformConfigs()));
 }
示例#6
0
        public StartController()
        {
            var view = new InputFormView(this, new StartContext());

            view.View();
        }