示例#1
0
        private void InitializeForm()
        {
            InitializeComponent();

            _validateController = new ValidationController()
            {
                OKButton = _buttonOK,
            };

            _validateController.RegisterControl(_textObjectName, ValidateObjectName);
            _validateController.RegisterControl(_textSource, ValidateSourceFile);
            _validateController.RegisterControl(_numMaskLeft,
                                                ValidationController.ValidateLessEq("Left Mask Bound", _numMaskLeft, "Right Mask Bound", _numMaskRight));
            _validateController.RegisterControl(_numMaskRight,
                                                ValidationController.ValidateGreaterEq("Right Mask Bound", _numMaskRight, "Left Mask Bound", _numMaskLeft));
            _validateController.RegisterControl(_numMaskTop,
                                                ValidationController.ValidateLessEq("Top Mask Bound", _numMaskTop, "Bottom Mask Bound", _numMaskBottom));
            _validateController.RegisterControl(_numMaskBottom,
                                                ValidationController.ValidateGreaterEq("Bottom Mask Bound", _numMaskBottom, "Top Mask Bound", _numMaskTop));
            _validateController.RegisterControl(_numOriginX,
                                                ValidationController.ValidateNumericUpDownFunc("Origin X", _numOriginX));
            _validateController.RegisterControl(_numOriginY,
                                                ValidationController.ValidateNumericUpDownFunc("Origin Y", _numOriginY));

            InitializeObjectPreview();
        }
示例#2
0
        private void InitializeForm()
        {
            InitializeComponent();

            _validateController = new ValidationController()
            {
                OKButton = _okButton,
            };

            _validateController.RegisterControl(_nameField, ValidateName);
            _validateController.RegisterControl(_opacityField,
                                                ValidationController.ValidateNumericUpDownFunc("Opacity", _opacityField));
            _validateController.RegisterControl(_gridWidthField,
                                                ValidationController.ValidateNumericUpDownFunc("Grid Width", _gridWidthField));
            _validateController.RegisterControl(_gridHeightField,
                                                ValidationController.ValidateNumericUpDownFunc("Grid Height", _gridHeightField));
        }
示例#3
0
        private void InitializeForm()
        {
            InitializeComponent();

            _validateController = new ValidationController()
            {
                OKButton = _buttonOK,
            };

            _validateController.RegisterControl(_name, ValidateName);
            _validateController.RegisterControl(_originXField,
                                                ValidationController.ValidateNumericUpDownFunc("Origin X", _originXField));
            _validateController.RegisterControl(_originYField,
                                                ValidationController.ValidateNumericUpDownFunc("Origin Y", _originYField));
            _validateController.RegisterControl(_levelWidth,
                                                ValidationController.ValidateNumericUpDownFunc("Level Width", _levelWidth));
            _validateController.RegisterControl(_levelHeight,
                                                ValidationController.ValidateNumericUpDownFunc("Level Height", _levelHeight));
        }
示例#4
0
        public NameChangeForm(string name)
        {
            InitializeComponent();

            Name          = name;
            OriginalName  = name;
            ReservedNames = new List <string>();

            _validateController = new ValidationController()
            {
                OKButton = _buttonOK,
            };

            _validateController.RegisterControl(_fieldName,
                                                ValidationController.ValidateNonEmptyName("Name", _fieldName, ReservedNameEnumerator));
        }
示例#5
0
        private void InitializeForm()
        {
            InitializeComponent();

            _validateController = new ValidationController()
            {
                OKButton = _buttonOk,
            };

            _validateController.RegisterControl(_nameField, ValidateName);

            _validateController.RegisterValidationFunc(ValidateTileSize);

            _layerContext = new LocalLayerContext(this);

            InitializeLayers();
        }