예제 #1
0
        private void Property_OnPropertyTransportStatusChange(object sender, OWLOSPropertyWrapperEventArgs e)
        {
            base.Dispatcher.Invoke(() =>
            {
                Brush componentsBrush = (SolidColorBrush)App.Current.Resources["OWLOSInfo"]; //default NetworkStatus.online
                EnableValueEditors();

                if (e.property.networkStatus == NetworkStatus.Erorr)
                {
                    componentsBrush = (SolidColorBrush)App.Current.Resources["OWLOSDanger"];
                }
                else
                if (e.property.networkStatus == NetworkStatus.Reconnect)
                {
                    componentsBrush = (SolidColorBrush)App.Current.Resources["OWLOSInfoAlpha2"];
                    DisableValueEditors();
                }
                else
                if (e.property.networkStatus == NetworkStatus.Offline)
                {
                    componentsBrush = (SolidColorBrush)App.Current.Resources["OWLOSDark"];
                }

                propValueEdit.BorderBrush = propPasswordValueEdit.BorderBrush = propCheckBoxValueEdit.BorderBrush =
                    setButton.BorderBrush = setButton.Foreground = getButton.BorderBrush = getButton.Foreground = componentsBrush;
            });
        }
예제 #2
0
        private void Property_ChangeProperty(object sender, OWLOSPropertyWrapperEventArgs e)
        {
            base.Dispatcher.Invoke(() =>
            {
                ValueToEditors();

                ColorAnimation animation;
                animation             = new ColorAnimation();
                animation.To          = ((SolidColorBrush)App.Current.Resources["OWLOSDanger"]).Color;
                animation.Duration    = new Duration(TimeSpan.FromSeconds(1));
                animation.AutoReverse = true;
                try
                {
                    if (flags.isSelected)
                    {
                        propValue.Foreground = new SolidColorBrush(((SolidColorBrush)App.Current.Resources["OWLOSWarning"]).Color);
                    }
                    else
                    {
                        propValue.Foreground = new SolidColorBrush(((SolidColorBrush)App.Current.Resources["OWLOSInfo"]).Color);
                    }
                    propValue.Foreground.BeginAnimation(SolidColorBrush.ColorProperty, animation);
                }
                catch { }
            });
        }
예제 #3
0
 private void Driver_NewProperty(object sender, OWLOSPropertyWrapperEventArgs e)
 {
     base.Dispatcher.Invoke(() =>
     {
         // driversControl.Text = driversControl.Text + e.property.name + " " + e.property.value + "\n";
         OWLOSDriverPropertyControl propertyControl = new OWLOSDriverPropertyControl(e.property);
         propertiesHolder.Children.Add(propertyControl);
     });
 }
예제 #4
0
 private void Driver_NewProperty(object sender, OWLOSPropertyWrapperEventArgs e)
 {
     base.Dispatcher.Invoke(() =>
     {
         propertyCounter++;
         OWLOSDriverPropertyControl propertyControl = new OWLOSDriverPropertyControl(e.property);
         if ((propertyCounter & 1) > 0)
         {
             propertyControl.Background = (SolidColorBrush)App.Current.Resources["OWLOSSecondaryAlpha2"];
         }
         itemsHolder.Children.Add(propertyControl);
     });
 }
예제 #5
0
 private void Driver_OnPropertyCreate(object sender, OWLOSPropertyWrapperEventArgs e)
 {
     AddNewProperty(e.property);
 }