public override void InitializeBinding() { base.InitializeBinding(); _screenBinder = new ScreenBinder <ContainerDTO>(); _screenBinder.Bind(dto => dto.Mode).To(cbContainerMode) .WithValues(dto => _presenter.AllContainerModes()) .AndDisplays(mode => _presenter.ContainerModeDisplayFor(mode)) .OnValueUpdating += (o, e) => OnEvent((() => _presenter.SetContainerMode(e.NewValue))); _screenBinder.Bind(dto => dto.ContainerType) .To(cbContainerType) .WithValues(dto => _presenter.AllContainerTypes()) .OnValueUpdating += onValueUpdating; _screenBinder.Bind(dto => dto.Name) .To(btName) .OnValueUpdating += onNameSet; _screenBinder.Bind(dto => dto.Description) .To(htmlEditor) .OnValueUpdating += onValueUpdating; RegisterValidationFor(_screenBinder, NotifyViewChanged); btName.ButtonClick += (o, e) => OnEvent(_presenter.RenameSubject); }
public override void InitializeBinding() { _screenBinder = new ScreenBinder <IParameterDTO>(); _valueElementBinder = _screenBinder.Bind(p => p.Value) .To(tbValue); _valueElementBinder.OnValueUpdating += (o, e) => ValueChanged(o, e.NewValue); _screenBinder.Bind(p => p.DisplayUnit) .To(cbUnit) .WithValues(p => p.AllUnits) .OnValueUpdating += (o, e) => UnitChanged(o, e.NewValue); _discreteValueElementBinder = _screenBinder.Bind(p => p.Value) .To(cbDiscreteValue) .WithValues(p => p.ListOfValues.Keys) .AndDisplays(p => p.ListOfValues); _discreteValueElementBinder.OnValueUpdating += (o, e) => ValueChanged(o, e.NewValue); _screenBinder.Changed += notifyChange; RegisterValidationFor(_screenBinder, () => Changing()); tbValue.EnterMoveNextControl = true; }
public PopulationPKAnalysisView(IPKAnalysisPivotView populationAnalysisPivotView) { _populationAnalysisPivotView = populationAnalysisPivotView; InitializeComponent(); addPopulationPKAnalysisView(_populationAnalysisPivotView); _screenBinder = new ScreenBinder <PKAnalysisDTO>(); }
public SimulationSubjectConfigurationView() { InitializeComponent(); _screenBinder = new ScreenBinder <SimulationSubjectDTO>(); _uxSimulationSubjectSelection = new UxBuildingBlockSelection(); layoutItemIndividual.FillWith(_uxSimulationSubjectSelection); }
public IndividualTransporterExpressionsView(IImageListRetriever imageListRetriever, IToolTipCreator toolTipCreator) { InitializeComponent(); _imageListRetriever = imageListRetriever; _toolTipCreator = toolTipCreator; _screenBinder = new ScreenBinder <TransporterExpressionDTO>(); gridView.AllowsFiltering = false; _gridViewBinder = new GridViewBinder <TransporterExpressionContainerDTO>(gridView) { BindingMode = BindingMode.OneWay }; gridView.EndGrouping += (o, e) => gridView.ExpandAllGroups(); gridView.GroupFormat = "[#image]{1}"; gridView.CustomColumnSort += customColumnSort; InitializeWithGrid(gridView); panelWarning.Image = ApplicationIcons.Warning; var toolTipController = new ToolTipController(); toolTipController.GetActiveObjectInfo += onToolTipControllerGetActiveObjectInfo; toolTipController.Initialize(_imageListRetriever); gridView.GridControl.ToolTipController = toolTipController; }
protected override void Context() { _binder = new ScreenBinder <IAnInterface>(); _textBox = new MyTextBox(); _source = new AnImplementation(); _source.FirstName = "A valid first name"; }
public ShowOntogenyDataView(Shell shell, IImageListRetriever imageListRetriever) : base(shell) { InitializeComponent(); _screenBinder = new ScreenBinder <ShowOntogenyDataDTO>(); listBoxContainer.ToolTipController = new ToolTipController().Initialize(imageListRetriever); listBoxContainer.ToolTipController.GetActiveObjectInfo += onToolTipControllerGetActiveObjectInfo; }
public ProjectScreen() { InitializeComponent(); _binder = new ScreenBinder <Project>(); _binder.Bind(x => x.Name).To(name); _binder.Bind(x => x.FileName).To(fileName); _binder.Bind(x => x.TestFolder).To(testFolder); _binder.Bind(x => x.BinaryFolder).To(binaryFolder); _binder.Bind(x => x.ConfigurationFileName).To(configurationFile); _binder.Bind(x => x.SystemTypeName).To(systemName); _binder.Bind(x => x.TimeoutInSeconds).To(timeoutInSeconds); _binder.Bind(x => x.NumberOfTestRetries).To(numberOfTestRetries); _binder.Bind(x => x.FixtureAssembly).To(fixtureAssembly); _binder.Bind(x => x.Options.TargetFile).To(testHarnessFileName); _binder.Bind(x => x.Options.FileTemplate).To(testHarnessFileTemplate); _binder.Bind(x => x.Options.MethodTemplate).To(testHarnessMethodTemplate); findFileName.Click += (x, y) => OpenFileDialogAndBindToInput(fileName); findTestFolder.Click += (x, y) => OpenFolderBrowserDialogAndBindToInput(testFolder); findBinaryFolder.Click += (x, y) => OpenFolderBrowserDialogAndBindToInput(binaryFolder); findConfigurationFile.Click += (x, y) => OpenFileDialogAndBindToInput(configurationFile); findFixtureAssembly.Click += (x, y) => OpenFileDialogAndBindToInput(fixtureAssembly); findTestHarnessFile.Click += (x, y) => OpenFileDialogAndBindToInput(testHarnessFileName); }
public ProjectScreen() { InitializeComponent(); _binder = new ScreenBinder<Project>(); _binder.Bind(x => x.Name).To(name); _binder.Bind(x => x.FileName).To(fileName); _binder.Bind(x => x.TestFolder).To(testFolder); _binder.Bind(x => x.BinaryFolder).To(binaryFolder); _binder.Bind(x => x.ConfigurationFileName).To(configurationFile); _binder.Bind(x => x.SystemTypeName).To(systemName); _binder.Bind(x => x.TimeoutInSeconds).To(timeoutInSeconds); _binder.Bind(x => x.FixtureAssembly).To(fixtureAssembly); _binder.Bind(x => x.Options.TargetFile).To(testHarnessFileName); _binder.Bind(x => x.Options.FileTemplate).To(testHarnessFileTemplate); _binder.Bind(x => x.Options.MethodTemplate).To(testHarnessMethodTemplate); findFileName.Click += (x, y) => OpenFileDialogAndBindToInput(fileName); findTestFolder.Click += (x, y) => OpenFolderBrowserDialogAndBindToInput(testFolder); findBinaryFolder.Click += (x, y) => OpenFolderBrowserDialogAndBindToInput(binaryFolder); findConfigurationFile.Click += (x, y) => OpenFileDialogAndBindToInput(configurationFile); findFixtureAssembly.Click += (x, y) => OpenFileDialogAndBindToInput(fixtureAssembly); findTestHarnessFile.Click += (x, y) => OpenFileDialogAndBindToInput(testHarnessFileName); }
public ParameterIdentificationFeedbackView() { InitializeComponent(); _lblInfo = new LabelControl { Parent = this }; _screenBinder = new ScreenBinder <IParameterIdentificationFeedbackPresenter>(); }
public JournalPageEditorView(IImageListRetriever imageListRetriever, IJournalTask journalTask, IClipboardTask clipboardTask) { InitializeComponent(); _imageListRetriever = imageListRetriever; _journalTask = journalTask; _clipboardTask = clipboardTask; _screenBinder = new ScreenBinder <JournalPageDTO>(); }
public ObjectBaseView(IShell shell) : base(shell) { InitializeComponent(); MaximizeBox = false; MinimizeBox = false; Load += (o, e) => activateText(); _screenBinder = new ScreenBinder <ObjectBaseDTO>(); }
public EditQuantityInSimulationView() { InitializeComponent(); _screenBinder = new ScreenBinder<QuantityDTO>(); _baseEditView = new EditBaseInfoView(); tabProperties.Controls.Add(_baseEditView); _baseEditView.Dock = DockStyle.Fill; }
public EditFormulaView() { InitializeComponent(); _screenBinder = new ScreenBinder <FormulaInfoDTO> { BindingMode = BindingMode.TwoWay }; splitFormula.CollapsePanel = SplitCollapsePanel.Panel2; }
public override void InitializeBinding() { //auto bind necessary to allow for error check var schemaButtonRepository = createAddRemoveButtonRepository(); _screenBinder = new ScreenBinder <AdvancedProtocol>(); _screenBinder.Bind(x => x.TimeUnit) .To(cbTimeUnit) .WithValues(x => _presenter.AllTimeUnits()); _gridProtocolBinder = new GridViewBinder <SchemaDTO>(mainView) { ValidationMode = ValidationMode.LeavingCell, BindingMode = BindingMode.OneWay }; var colStartTime = _gridProtocolBinder.AutoBind(x => x.StartTime) .WithCaption(PKSimConstants.UI.StartTime) .WithFormat(schemaDto => schemaDto.StartTimeParameter.ParameterFormatter()) .WithEditorConfiguration((activeEditor, schemaDTO) => _comboBoxUnit.UpdateUnitsFor(activeEditor, schemaDTO.StartTimeParameter)); colStartTime.OnValueUpdating += (dto, valueInGuiUnit) => setParameterValue(dto.StartTimeParameter, valueInGuiUnit.NewValue); colStartTime.XtraColumn.SortOrder = ColumnSortOrder.Ascending; _gridProtocolBinder.AutoBind(x => x.NumberOfRepetitions) .WithCaption(PKSimConstants.UI.NumberOfRepetitions) .OnValueUpdating += (dto, valueInGuiUnit) => setParameterValue(dto.NumberOfRepetitionsParameter, valueInGuiUnit.NewValue); _gridProtocolBinder.AutoBind(x => x.TimeBetweenRepetitions) .WithCaption(PKSimConstants.UI.TimeBetweenRepetitions) .WithFormat(schemaDto => schemaDto.TimeBetweenRepetitionsParameter.ParameterFormatter()) .WithEditorConfiguration((activeEditor, schemaDTO) => _comboBoxUnit.UpdateUnitsFor(activeEditor, schemaDTO.TimeBetweenRepetitionsParameter)) .OnValueUpdating += (dto, valueInGuiUnit) => setParameterValue(dto.TimeBetweenRepetitionsParameter, valueInGuiUnit.NewValue); _gridProtocolBinder.AutoBind(x => x.EndTime) .WithCaption(PKSimConstants.UI.EndTime) .WithFormat(schemaDto => schemaDto.TimeBetweenRepetitionsParameter.ParameterFormatter()) .AsReadOnly(); _comboBoxUnit.ParameterUnitSet += setParameterUnit; _colAddRemoveSchema = _gridProtocolBinder.AddUnboundColumn() .WithCaption(PKSimConstants.UI.EmptyColumn) .WithShowButton(ShowButtonModeEnum.ShowAlways) .WithRepository(dto => schemaButtonRepository) .WithFixedWidth(OSPSuite.UI.UIConstants.Size.EMBEDDED_BUTTON_WIDTH * 2); _gridProtocolBinder.Changed += NotifyViewChanged; _screenBinder.Changed += unitChanged; schemaButtonRepository.ButtonClick += (o, e) => OnEvent(() => schemaButtonRepositoryButtonClick(o, e, _gridProtocolBinder.FocusedElement)); //Create a dummy column for the detail view to avoid auto binding to details gridViewSchemaItems.Columns.AddField("Dummy"); gridViewDynamicParameters.Columns.AddField("Dummy"); gridViewUserDefinedTarget.Columns.AddField("Dummy"); }
public SimulationSelectionForComparisonView() { InitializeComponent(); _gridViewBinder = new GridViewBinder <PopulationSimulationSelectionDTO>(gridView); _screenBinder = new ScreenBinder <SimulationComparisonSelectionDTO>(); _groupingItemBinder = new ScreenBinder <GroupingItemDTO>(); gridView.AllowsFiltering = false; _selectEditor = new UxRepositoryItemCheckEdit(gridView); }
protected override void Context() { _binder = new ScreenBinder <IAnInterface>(); _comboBox = new ComboBox(); sut = _binder.Bind(item => item.ValueFromList).To(_comboBox); _source = new AnImplementation { ValueFromList = "value1" }; }
public SimulationCompoundProtocolView() { InitializeComponent(); _screenBinder = new ScreenBinder <ProtocolSelectionDTO> { SavingMode = SavingMode.Always }; uxProtocolSelection.AllowEmptySelection = true; layoutControl.AutoScroll = false; }
public MoleculeDependentBuilderView() { InitializeComponent(); gridViewExcludedMolecules.AllowsFiltering = false; gridViewIncludedMolecules.AllowsFiltering = false; _screenBinder = new ScreenBinder <MoleculeList>(); _gridViewIncludedBinder = new GridViewBinder <StringDTO>(gridViewIncludedMolecules); _gridViewExcludedBinder = new GridViewBinder <StringDTO>(gridViewExcludedMolecules); }
public IndividualMoleculePropertiesView() { InitializeComponent(); _screenBinder = new ScreenBinder <MoleculePropertiesDTO>(); _uxHalfLifeLiver = new UxParameterDTOEdit(); _uxHalfLifeIntestine = new UxParameterDTOEdit(); _uxReferenceConcentration = new UxParameterDTOEdit(); }
public override void InitializeBinding() { base.InitializeBinding(); _screenBinder = new ScreenBinder <ObjectBaseSummaryDTO>(); _screenBinder.Bind(x => x.EntityName).To(_labelName); _gridViewBinder.Bind(x => x.Key).WithCaption(AppConstants.Captions.Data).AsReadOnly(); _gridViewBinder.Bind(x => x.Value).WithCaption(AppConstants.Captions.Value).AsReadOnly(); }
public override void InitializeBinding() { base.InitializeBinding(); _screenBinder = new ScreenBinder <SumFormulaDTO>(); _screenBinder.Bind(dto => dto.Variable).To(txtVariableName) .OnValueUpdating += (dto, eventArgs) => _presenter.ChangeVariableName(eventArgs.NewValue, eventArgs.OldValue); _screenBinder.Bind(dto => dto.FormulaString).To(lblFormula); }
public ProjectScreen() { InitializeComponent(); _binder = new ScreenBinder<Project>(); _binder.Bind(x => x.Name).To(name); _binder.Bind(x => x.FileName).To(fileName); _binder.Bind(x => x.TestFolder).To(testFolder); _binder.Bind(x => x.BinaryFolder).To(binaryFolder); _binder.Bind(x => x.ConfigurationFileName).To(configurationFile); _binder.Bind(x => x.TestRunnerTypeName).To(typeRunnerName); _binder.Bind(x => x.TimeoutInSeconds).To(timeoutInSeconds); findFileName.Click += (x, y) => OpenFileDialogAndBindToInput(fileName); findTestFolder.Click += (x, y) => OpenFolderBrowserDialogAndBindToInput(testFolder); findBinaryFolder.Click += (x, y) => OpenFolderBrowserDialogAndBindToInput(binaryFolder); findConfigurationFile.Click += (x, y) => OpenFileDialogAndBindToInput(configurationFile); }