Exemple #1
0
 public BuildingBlockSelectionEditBinder(IPropertyBinderNotifier <TObjectType, TBuildingBlock> propertyBinder, UxBuildingBlockSelection buildingBlockSelection)
     : base(propertyBinder)
 {
     _buildingBlockSelection = buildingBlockSelection;
     _buildingBlockSelection.BuildingBlockSelectionChanged += buildingBlockSelectionChanged;
     _buildingBlockSelection.InitializeFor <TBuildingBlock>();
 }
 public SimulationSubjectConfigurationView()
 {
     InitializeComponent();
     _screenBinder = new ScreenBinder <SimulationSubjectDTO>();
     _uxSimulationSubjectSelection = new UxBuildingBlockSelection();
     layoutItemIndividual.FillWith(_uxSimulationSubjectSelection);
 }
        public ImportPopulationSettingsView()
        {
            InitializeComponent();
            gridView.AllowsFiltering  = false;
            gridView.ShowRowIndicator = false;
            gridView.OptionsSelection.EnableAppearanceFocusedRow = true;

            _uxIndividualSelection = new UxBuildingBlockSelection();
            _screenBinder          = new ScreenBinder <ImportPopulationSettingsDTO>();
            _filePathRepository.Buttons[0].Kind = ButtonPredefines.Ellipsis;

            _gridViewBinder = new GridViewBinder <PopulationFileSelectionDTO>(gridView)
            {
                BindingMode = BindingMode.TwoWay
            };
        }
Exemple #4
0
        public static void FillWith(this LayoutControlItem layoutControlItem, UxBuildingBlockSelection buildingBlockSelection)
        {
            var panel = layoutControlItem.Control as PanelControl;

            if (panel == null)
            {
                return;
            }
            panel.Margin = new Padding(0);
            panel.FillWith((IView)buildingBlockSelection);
            panel.BorderStyle = BorderStyles.NoBorder;
            var size = new Size(layoutControlItem.Size.Width, UIConstants.Size.BUILDING_BLOCK_SELECTION_SIZE);

            layoutControlItem.SizeConstraintsType = SizeConstraintsType.Custom;
            layoutControlItem.MinSize             = size;
            layoutControlItem.Size = size;
        }
Exemple #5
0
        public ImportPopulationSimulationView(Shell shell) : base(shell)
        {
            InitializeComponent();
            _uxPopulationSelection = new UxBuildingBlockSelection();
            _screenBinder          = new ScreenBinder <ImportPopulationSimulationDTO>();

            rbBuildingBockSelection.Tag   = PopulationImportMode.BuildingBlock;
            rbPopulationFileSelection.Tag = PopulationImportMode.File;
            rbPopulationSizeSelection.Tag = PopulationImportMode.Size;

            _allRadioButtons = new Cache <PopulationImportMode, RadioButton>(importModeFrom)
            {
                rbBuildingBockSelection,
                rbPopulationFileSelection,
                rbPopulationSizeSelection
            };
        }
Exemple #6
0
        public RandomPopulationSettingsView()
        {
            InitializeComponent();
            gridViewParameters.AllowsFiltering = false;
            _gridViewBinder = new GridViewBinder <ParameterRangeDTO>(gridViewParameters)
            {
                ValidationMode = ValidationMode.LeavingCell,
                BindingMode    = BindingMode.TwoWay
            };

            _settingsBinder              = new ScreenBinder <PopulationSettingsDTO>();
            _uxIndividualSelection       = new UxBuildingBlockSelection();
            _repositoryForUnits          = new UxRepositoryItemComboBox(gridViewParameters);
            _discreteParameterRepository = new UxRepositoryItemComboBox(gridViewParameters);
            _repositoryForDiscreteUnits  = new UxRepositoryItemComboBox(gridViewParameters)
            {
                AllowDropDownWhenReadOnly = DefaultBoolean.False, ReadOnly = true
            };
            _repositoryForDiscreteUnits.Buttons.Clear();

            gridViewParameters.RowCellStyle += updateRowCellStyle;

            gridViewParameters.ShowColumnHeaders = false;
        }
Exemple #7
0
        public static BuildingBlockSelectionEditBinder <TObjectType, TBuildingBlock> To <TObjectType, TBuildingBlock>(this IScreenToElementBinder <TObjectType, TBuildingBlock> screenToElementBinder,
                                                                                                                      UxBuildingBlockSelection buildingBlockSelection)
            where TBuildingBlock : IPKSimBuildingBlock
        {
            var element = new BuildingBlockSelectionEditBinder <TObjectType, TBuildingBlock>(screenToElementBinder.PropertyBinder, buildingBlockSelection);

            screenToElementBinder.ScreenBinder.AddElement(element);
            return(element);
        }