Esempio n. 1
0
        public override void DataBind(Types.IField value)
        {
            if (!(value is Types.Angle))
            {
                throw new Exception("Cannot bind " + value.ToString() + " to Angle control.");
            }

            this.value = (value as Types.Angle);
            this.txtLower.DataBindings.Clear();
            this.txtLower.DataBindings.Add(new Binding("Text", this.value, "ValueDegrees"));
        }
Esempio n. 2
0
        public override void DataBind(Types.IField value)
        {
            if (!(value is Types.CharInteger))
            {
                throw new Exception("Cannot bind " + value.ToString() + " to CharInteger control.");
            }

            this.value = (value as Types.CharInteger);
            this.txtValue.DataBindings.Clear();
            this.txtValue.DataBindings.Add(new Binding("Text", this.value, "Value"));
        }
Esempio n. 3
0
        public override void DataBind(Types.IField value)
        {
            if (!(value is Types.RealFraction))
            {
                throw new Exception("Cannot bind " + value.GetType().ToString() + " to RealFraction control.");
            }

            this.value = (value as Types.RealFraction);
            this.txtValue.DataBindings.Clear();
            this.txtValue.DataBindings.Add(new Binding("Text", this.value, "Value"));
        }
Esempio n. 4
0
        public override void DataBind(Types.IField value)
        {
            if (!(value is Types.Enum))
            {
                throw new Exception("Cannot bind " + value.ToString() + " to Enum control.");
            }

            this.value = (Types.Enum)value;
            this.cboValue.DataBindings.Clear();
            this.cboValue.DataBindings.Add(new Binding("SelectedIndex", this.value, "Value"));
        }
        public override void DataBind(Types.IField value)
        {
            if (!(value is Types.ShortBlockIndex))
            {
                throw new Exception("Cannot bind " + value.ToString() + " to ShortBlockIndex control.");
            }

            this.value = (value as Types.ShortBlockIndex);
            // Don't databind for now - just leave it blank.
            //      this.txtValue.DataBindings.Clear();
            //      this.txtValue.DataBindings.Add(new Binding("Text", this.value, "Value"));
        }
        public override void DataBind(Types.IField value)
        {
            if (!(value is Types.RealEulerAngles2D))
            {
                throw new Exception("Cannot bind " + value.ToString() + " to RealEulerAngles2D control.");
            }

            this.value = (value as Types.RealEulerAngles2D);
            this.txtY.DataBindings.Clear();
            this.txtY.DataBindings.Add(new Binding("Text", this.value, "Y"));
            this.txtP.DataBindings.Clear();
            this.txtP.DataBindings.Add(new Binding("Text", this.value, "P"));
        }
Esempio n. 7
0
        public override void DataBind(Types.IField value)
        {
            if (!(value is Types.Flags))
            {
                throw new Exception("Cannot bind " + value.ToString() + " to Flags control.");
            }

            if (this.value != null)
            {
                this.value.ValueChanged -= new EventHandler(value_ValueChanged);
            }
            this.value = (Types.Flags)value;
            this.value.ValueChanged += new EventHandler(value_ValueChanged);
            UpdateValue();
        }
        public override void DataBind(Types.IField value)
        {
            if (!(value is Types.RealARGBColor))
            {
                throw new Exception("Cannot bind " + value.ToString() + " to RealARGBColor control.");
            }

            this.value = (value as Types.RealARGBColor);
            this.txtA.DataBindings.Clear();
            this.txtA.DataBindings.Add(new Binding("Text", this.value, "A"));
            this.txtR.DataBindings.Clear();
            this.txtR.DataBindings.Add(new Binding("Text", this.value, "R"));
            this.txtG.DataBindings.Clear();
            this.txtG.DataBindings.Add(new Binding("Text", this.value, "G"));
            this.txtB.DataBindings.Clear();
            this.txtB.DataBindings.Add(new Binding("Text", this.value, "B"));
        }