public static void OutSideValueChanged(DependencyObject sender, DependencyPropertyChangedEventArgs e) { DeviceOutputView DstView = sender as DeviceOutputView; double NewValue = (double)e.NewValue; ProgressBar.CircleProgressBar.SetValue(ref DstView.ForegroundBar_OutSide, NewValue, true); ProgressBar.CircleProgressBar.SetValue(ref DstView.BackgroundBar_OutSide, NewValue, false); }
public static void IsConnectedChanged( DependencyObject sender, DependencyPropertyChangedEventArgs e) { DeviceOutputView DstView = sender as DeviceOutputView; bool NewValue = (bool)e.NewValue; if (NewValue) { DstView.ConnectImage.Source = DeviceOutputView.ConnImage; DstView.DeviceNameText.Foreground = DeviceOutputView.FontColor_Conn; DstView.DevicePortText.Foreground = DeviceOutputView.FontColor_Conn; } else { DstView.ConnectImage.Source = DeviceOutputView.DisConnImage; DstView.DeviceNameText.Foreground = DeviceOutputView.FontColor_DisConn; DstView.DevicePortText.Foreground = DeviceOutputView.FontColor_DisConn; } }