コード例 #1
0
 protected virtual void OnPropertyChanged(PropertyNotificationEventArgs args)
 {
     PropertyChangedEventHandler handler = PropertyChanged;
     if (handler != null)
     {
         handler(this, args);
     }
 }
コード例 #2
0
 protected override void OnPropertyChanged(PropertyNotificationEventArgs args)
 {
     if (args.PropertyName.Equals("Visual"))
     {
         _display = args.NewValue as OpenFalconTextureDisplay;
         OnRefresh();
     }
     base.OnPropertyChanged(args);
 }
コード例 #3
0
ファイル: CompositeVisual.cs プロジェクト: Heliflyer/helios
 protected override void OnPropertyChanged(PropertyNotificationEventArgs args)
 {
     if (args.PropertyName.Equals("Width") || args.PropertyName.Equals("Height"))
     {
         double scaleX = Width / NativeSize.Width;
         double scaleY = Height / NativeSize.Height;
         ScaleChildrenInt(scaleX, scaleY);
     }            
     base.OnPropertyChanged(args);
 }
コード例 #4
0
 protected void OnPropertyChanged(string childPropertyName, PropertyNotificationEventArgs args)
 {
     OnPropertyChanged(new PropertyNotificationEventArgs(this, childPropertyName, args));
 }
コード例 #5
0
        protected override void OnPropertyChanged(PropertyNotificationEventArgs args)
        {
            if (args.PropertyName.Equals("Width") || args.PropertyName.Equals("Height"))
            {
                double scaleX = Width / NativeSize.Width;
                double scaleY = Height / NativeSize.Height;

                _guardUpRegion = GuardedToggleSwitch.GuardUpRegion; 
                _guardUpRegion.Scale(scaleX, scaleY);
                _switchRegion = GuardedToggleSwitch.SwitchRegion;
                _switchRegion.Scale(scaleX, scaleY);
                _guardDownRegion = GuardedToggleSwitch.GuardDownRegion;
                _guardDownRegion.Scale(scaleX, scaleY);
            }
            base.OnPropertyChanged(args);
        }
コード例 #6
0
 /// <summary>
 /// Constructs a child notification event based of childs propertynotification
 /// </summary>
 /// <param name="eventSource">Object whose child object has a property changed.</param>
 /// <param name="childPropertyName">Name of the property which represents the child object whose property has chagned.</param>
 /// <param name="childNotification">Event args for child's property notification.</param>
 public PropertyNotificationEventArgs(object eventSource, string childPropertyName, PropertyNotificationEventArgs childNotification)
     : this(eventSource, childPropertyName, null, null, childNotification.IsUndoable)
 {
     _childNotification = childNotification;
 }
コード例 #7
0
ファイル: HatSwitch.cs プロジェクト: Heliflyer/helios
 protected override void OnPropertyChanged(PropertyNotificationEventArgs args)
 {
     if (args.PropertyName.Equals("Width") || args.PropertyName.Equals("Height"))
     {
         UpdatePoints();
     }
     base.OnPropertyChanged(args);
 }
コード例 #8
0
ファイル: PushButton.cs プロジェクト: Heliflyer/helios
 protected override void OnPropertyChanged(PropertyNotificationEventArgs args)
 {
     OnDisplayUpdate();
     base.OnPropertyChanged(args);
 }
コード例 #9
0
ファイル: RotarySwitch.cs プロジェクト: Heliflyer/helios
 void PositionChanged(object sender, RotarySwitchPositionChangeArgs e)
 {
     PropertyNotificationEventArgs args = new PropertyNotificationEventArgs(e.Position, e.PropertyName, e.OldValue, e.NewValue, true);
     if (e.PropertyName.Equals("Rotation"))
     {
         _rotation = Positions[CurrentPosition - 1].Rotation;
     }
     OnPropertyChanged("Positions", args);
     UpdateValueHelp();
     Refresh();
 }
コード例 #10
0
 /// <summary>
 /// Constructs a child notification event based of childs propertynotification
 /// </summary>
 /// <param name="eventSource">Object whose child object has a property changed.</param>
 /// <param name="childPropertyName">Name of the property which represents the child object whose property has chagned.</param>
 /// <param name="childNotification">Event args for child's property notification.</param>
 public PropertyNotificationEventArgs(object eventSource, string childPropertyName, PropertyNotificationEventArgs childNotification)
     : this(eventSource, childPropertyName, null, null, childNotification.IsUndoable)
 {
     _childNotification = childNotification;
 }
コード例 #11
0
ファイル: UndoManager.cs プロジェクト: Heliflyer/helios
 public void AddPropertyChange(object sender, PropertyNotificationEventArgs notification)
 {
     if (notification != null && notification.IsUndoable)
     {
         while (notification.HasChildNotification)
         {
             notification = notification.ChildNotification;
         }
         AddPropertyChange(notification.EventSource, notification.PropertyName, notification.OldValue, notification.NewValue);
     }
 }