示例#1
0
        protected override VisualItem CreateButton(InputButtonSettings buttonSettings)
        {
            VisualItem item = null;
            if (buttonSettings == _ButtonDropDown)
            {
                item = new VisualDropDownButton();
                ApplyButtonSettings(buttonSettings, item as VisualButton);
            }
            else
                item = base.CreateButton(buttonSettings);

            VisualButton button = item as VisualButton;
            button.ClickAutoRepeat = false;

            if (buttonSettings == _ButtonClear)
            {
                if (buttonSettings.Image == null)
                    button.Image = DevComponents.DotNetBar.BarFunctions.LoadBitmap("SystemImages.DateReset.png");
            }
            else if (buttonSettings == _ButtonFreeText)
            {
                if (buttonSettings.Image == null)
                    button.Image = DevComponents.DotNetBar.BarFunctions.LoadBitmap("SystemImages.FreeText.png");
                button.Checked = buttonSettings.Checked;
            }
            else if (buttonSettings == _ButtonCalculator)
            {
                if (buttonSettings.Image == null)
                    button.Image = DevComponents.DotNetBar.BarFunctions.LoadBitmap("SystemImages.Calculator.png");
                button.Checked = buttonSettings.Checked;
            }

            return item;
        }
示例#2
0
        protected virtual VisualItem CreateButton(InputButtonSettings buttonSettings)
        {
            VisualItem item = null;

            if (buttonSettings == _ButtonDropDown)
            {
                item = new VisualDropDownButton();
                ApplyButtonSettings(buttonSettings, item as VisualButton);
            }
            else
            {
                item = new VisualCustomButton();
                ApplyButtonSettings(buttonSettings, item as VisualButton);
            }

            VisualButton button = item as VisualButton;
            button.ClickAutoRepeat = false;

            if (buttonSettings == _ButtonClear)
            {
                if (buttonSettings.Image == null)
                    button.Image = DevComponents.DotNetBar.BarFunctions.LoadBitmap("SystemImages.DateReset.png");
            }

            return item;
        }