Exemple #1
0
        /// <summary>
        ///     Updates this attribute editor's properties
        /// </summary>
        public void UpdateComponent()
        {
            // Set the help text
            AttributeName.Text = Attribute.Name;
            UseTip.SetToolTip(CheckBox, Attribute.Description);

            CheckBox.Checked = (bool)Field.GetValue(Owner);
        }
Exemple #2
0
        /// <summary>
        ///     Creates a new editor that can trigger Recompiles for an IDataConnectionComponent
        /// </summary>
        public FunctionButtonComponent(object owner, MethodInfo method, FunctionButtonAttribute attribute)
        {
            _owner     = owner;
            _method    = method;
            _attribute = attribute;
            InitializeComponent();

            FunctionButton.Enabled = true;
            FunctionButton.Text    = _attribute.Name;
            UseTip.SetToolTip(FunctionButton, _attribute.Description);
        }
        /// <summary>
        ///     Updates this attribute editor's properties
        /// </summary>
        public void UpdateComponent()
        {
            // Set the help text
            AttributeName.Text = Attribute.Name;
            UseTip.SetToolTip(InputText, Attribute.Description);

            // Set the max
            InputText.MaxLength = Attribute.Maximum;

            InputText.Text = (string)Field.GetValue(Owner);
        }
Exemple #4
0
        /// <summary>
        ///     Updates this attribute editor's properties
        /// </summary>
        public void UpdateComponent()
        {
            // Set the help text
            AttributeName.Text = Attribute.Name;
            UseTip.SetToolTip(InputControl, Attribute.Description);

            // Set the min/max
            InputControl.Minimum = Attribute.Minimum;
            InputControl.Maximum = Attribute.Maximum;

            InputControl.Value = (decimal)((int)Field.GetValue(Owner));
        }
Exemple #5
0
        /// <summary>
        ///     Updates this attribute editor's properties
        /// </summary>
        public void UpdateComponent()
        {
            // Set the help text
            AttributeName.Text = Attribute.Name;
            UseTip.SetToolTip(InputText, Attribute.Description);

            // Set the filters
            FileDialogOpen.Filter = Attribute.Filter;
            FileDialogSave.Filter = Attribute.Filter;

            _isSave = Attribute.IsSave;

            InputText.Text = (string)Field.GetValue(Owner);
        }
Exemple #6
0
        /// <summary>
        ///     Updates this attribute editor's properties
        /// </summary>
        public void UpdateComponent()
        {
            // Set the help text
            AttributeName.Text = Attribute.Name;
            UseTip.SetToolTip(InputControl, Attribute.Description);

            // Set the min/max
            InputControl.Minimum = NumberUtil.ClampToDecimal(Attribute.Minimum);
            InputControl.Maximum = NumberUtil.ClampToDecimal(Attribute.Maximum);

            var realValue = (double)Field.GetValue(Owner);

            InputControl.Value = NumberUtil.ClampToDecimal(realValue);
        }
Exemple #7
0
        /// <summary>
        ///     Updates this attribute editor's properties
        /// </summary>
        public void UpdateComponent()
        {
            // Set the help text
            AttributeName.Text = Attribute.Name;
            UseTip.SetToolTip(InputControl, Attribute.Description);

            // Set the contents
            InputControl.Items.Clear();
            int selectedIndex = -1;
            var realVal       = Field.GetValue(Owner);

            for (var k = 0; k < Attribute.Values.Length; k += 2)
            {
                InputControl.Items.Add(Attribute.Values[k]);
                if (Attribute.Values[k + 1].Equals(realVal))
                {
                    selectedIndex = k / 2;
                }
            }

            // Set the default selection
            InputControl.SelectedIndex = selectedIndex;
        }