示例#1
0
        protected override IControlFactory GetControlFactory()
        {
            IControlFactory factory = new ControlFactoryVWG();

            GlobalUIRegistry.ControlFactory = factory;
            return(factory);
        }
        protected override IBOComboBoxSelector CreateComboBoxControl()
        {
            ControlFactoryVWG factory = new ControlFactoryVWG();

            GlobalUIRegistry.ControlFactory = factory;
            return(new ComboBoxSelectorVWG());
        }
示例#3
0
        private static IControlFactory GetControlFactory()
        {
            ControlFactoryVWG factory = new ControlFactoryVWG();

            GlobalUIRegistry.ControlFactory = factory;
            return(factory);
        }
        protected override IControlFactory GetControlFactory()
        {
            if ((_factory == null)) _factory = new ControlFactoryVWG();

            GlobalUIRegistry.ControlFactory = _factory;
            return _factory;
        }
 protected override EnumComboBoxMapper CreateComboBox(string propertyName, bool setBO)
 {
     EnumBO bo = new EnumBO();
     ComboBoxVWG comboBox = new ComboBoxVWG();
     IControlFactory controlFactory = new ControlFactoryVWG();
     EnumComboBoxMapper enumComboBoxMapper = new EnumComboBoxMapper(comboBox, propertyName, false, controlFactory);
     if (setBO) enumComboBoxMapper.BusinessObject = bo;
     return enumComboBoxMapper;
 }
        protected override IControlFactory GetControlFactory()
        {
            if ((_factory == null))
            {
                _factory = new ControlFactoryVWG();
            }

            GlobalUIRegistry.ControlFactory = _factory;
            return(_factory);
        }
        protected override EnumComboBoxMapper CreateComboBox(string propertyName, bool setBO)
        {
            EnumBO             bo                 = new EnumBO();
            ComboBoxVWG        comboBox           = new ComboBoxVWG();
            IControlFactory    controlFactory     = new ControlFactoryVWG();
            EnumComboBoxMapper enumComboBoxMapper = new EnumComboBoxMapper(comboBox, propertyName, false, controlFactory);

            if (setBO)
            {
                enumComboBoxMapper.BusinessObject = bo;
            }
            return(enumComboBoxMapper);
        }
示例#8
0
        public GenericGridFilterControlVwg(IGridBase grid)
        {
            this.Grid   = grid;
            this._timer = new Timer()
            {
                Enabled  = true,
                Interval = 500,
            };
            this._timer.Tick += (sender, e) =>
            {
                if ((!this._inFilter) && (this._filterRequired) && (this._lastFilterChanged.AddMilliseconds(this._timer.Interval) < DateTime.Now))
                {
                    this._filterRequired = false;
                    this.DoFilter();
                }
            };

            var factory = new ControlFactoryVWG();

            this._filterLabel   = factory.CreateLabel("Filter:");
            this._filterTextBox = factory.CreateTextBox();
            var txt = this._filterTextBox as TextBox;

            txt.KeyPress += (sender, e) =>
            {
                this._lastFilterChanged = DateTime.Now;
                this._filterRequired    = true;
            };
            var manager = factory.CreateBorderLayoutManager(this);

            manager.AddControl(this._filterLabel, BorderLayoutManager.Position.West);
            manager.AddControl(this._filterTextBox, BorderLayoutManager.Position.Centre);
            var vgap = manager.VerticalGapSize + manager.BorderSize;

            this.Height = this._filterTextBox.Height + 2 * vgap;

            this.FilterStarted += (sender, e) =>
            {
                this.SetUIState(true);
            };
            this.FilterCompleted += (sender, e) =>
            {
                this.SetUIState(false);
            };
        }
        public GenericGridFilterControlVwg(IGridBase grid)
        {
            this.Grid = grid;
            this._timer = new Timer()
            {
                Enabled = true,
                Interval = 500,
            };
            this._timer.Tick += (sender, e) => 
            {
                if ((!this._inFilter) && (this._filterRequired) && (this._lastFilterChanged.AddMilliseconds(this._timer.Interval) < DateTime.Now))
                {
                    this._filterRequired = false;
                    this.DoFilter();
                }
            };

            var factory = new ControlFactoryVWG();
            this._filterLabel = factory.CreateLabel("Filter:");
            this._filterTextBox = factory.CreateTextBox();
            var txt = this._filterTextBox as TextBox;
            txt.KeyPress += (sender, e) =>
                {
                    this._lastFilterChanged = DateTime.Now;
                    this._filterRequired = true;
                };
            var manager = factory.CreateBorderLayoutManager(this);
            manager.AddControl(this._filterLabel, BorderLayoutManager.Position.West);
            manager.AddControl(this._filterTextBox, BorderLayoutManager.Position.Centre);
            var vgap = manager.VerticalGapSize + manager.BorderSize;
            this.Height = this._filterTextBox.Height + 2 * vgap;

            this.FilterStarted += (sender, e) =>
                {
                    this.SetUIState(true);
                };
            this.FilterCompleted += (sender, e) =>
                {
                    this.SetUIState(false);
                };
        }
 protected override IControlFactory GetControlFactory()
 {
     ControlFactoryVWG factory = new ControlFactoryVWG();
     GlobalUIRegistry.ControlFactory = factory;
     return factory;
 }
示例#11
0
 protected override void CreateControlFactory()
 {
     _controlFactory = new ControlFactoryVWG();
     GlobalUIRegistry.ControlFactory = _controlFactory;
 }
 protected override void CreateControlFactory()
 {
     _controlFactory = new ControlFactoryVWG();
     GlobalUIRegistry.ControlFactory = _controlFactory;
 }
 protected override IBOComboBoxSelector CreateComboBoxControl()
 {
     ControlFactoryVWG factory = new ControlFactoryVWG();
     GlobalUIRegistry.ControlFactory = factory;
     return new ComboBoxSelectorVWG();
 }
 private static IControlFactory GetControlFactory()
 {
     ControlFactoryVWG factory = new ControlFactoryVWG();
     GlobalUIRegistry.ControlFactory = factory;
     return factory;
 }