コード例 #1
0
 protected override void OnPropertyChanged(Helios.ComponentModel.PropertyNotificationEventArgs args)
 {
     if (args.PropertyName.Equals("Visual"))
     {
         _textDisplay = args.NewValue as TextDisplay;
     }
     base.OnPropertyChanged(args);
 }
コード例 #2
0
        private void TurnTextDisplayOff(object sender, RoutedEventArgs e)
        {
            TextDisplay textDisplay = Control as TextDisplay;

            if (textDisplay != null)
            {
                textDisplay.TextValue = "0";
            }
        }
コード例 #3
0
        private void HeliosTestTextBox_TextChanged(object sender, TextChangedEventArgs e)
        {
            HeliosTextBox textBox     = sender as HeliosTextBox;
            TextDisplay   textDisplay = Control as TextDisplay;

            if (textDisplay != null)
            {
                textDisplay.TextValue = textBox.Text;
            }
        }
コード例 #4
0
        private void BottomPaddingChanged(object sender, RoutedPropertyChangedEventArgs <double> e)
        {
            Slider slider = sender as Slider;

            if (!System.Windows.Input.Keyboard.Modifiers.HasFlag(ModifierKeys.Shift) && slider != null && slider.IsFocused)
            {
                TextDisplay textDisplay = Control as TextDisplay;
                if (textDisplay != null)
                {
                    textDisplay.TextFormat.PaddingTop = textDisplay.TextFormat.PaddingBottom;
                }
            }
        }