void layer_PropertyChanged(object sender, PropertyChangedEventArgs e)
 {
     if (e.Name == ShapeLayer._.Name)
     {
         lblLayerName.Text      = _layer.Name;
         this.lblLayerName.Text = _layer.Name;
     }
     if (e.Name == ShapeLayer._.IsVisible)
     {
         this.Layer.IsVisible = Convert.ToBoolean(e.NewValue);
     }
     UndoService.AddPropertyChangedAction(sender, e.Name, e.NewValue, e.OldValue);
 }
 private void OnLayerPropertyChanged(object sender, PropertyChangedEventArgs e)
 {
     if (e.Name == EffectPropertyName)
     {
         if (Effect.IsEmpty)
         {
             _ctlLayer.RemoveEffect(Effect.Type);
         }
         else
         {
             _ctlLayer.AppendEffect(Effect.Type);
         }
         UndoService.AddPropertyChangedAction(sender, new PropertyItem(e.Name, e.NewValue, e.OldValue));
     }
 }
Exemplo n.º 3
0
        /// <summary>
        /// proxy property changed event
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void OnProxyPropertyChanged(object sender, PropertyChangedEventArgs e)
        {
            UndoService.AddPropertyChangedAction(sender, e.Name, e.NewValue, e.OldValue);
            AppointmentInfo _proxy = sender as AppointmentInfo;

            if (sender is AppointmentInfo)
            {
                switch (e.Name)
                {
                case AppointmentInfo._.AllDay:
                    _appointment.AllDay = _proxy.AllDay;
                    break;

                case AppointmentInfo._.Description:
                    _appointment.Subject = _proxy.Subject;
                    break;

                case AppointmentInfo._.Duration:
                    _appointment.Duration = _proxy.Duration;
                    break;

                case AppointmentInfo._.End:
                    _appointment.End = _proxy.End;
                    break;

                case AppointmentInfo._.HasReminder:
                    _appointment.HasReminder = _proxy.HasReminder;
                    break;

                case AppointmentInfo._.LabelId:
                    _appointment.LabelId = _proxy.LabelId;
                    break;

                case AppointmentInfo._.Location:
                    _appointment.Location = _proxy.Location;
                    break;

                case AppointmentInfo._.ResourceId:
                    _appointment.ResourceId = _proxy.ResourceId;
                    break;

                case AppointmentInfo._.Start:
                    _appointment.Start = _proxy.Start;
                    break;

                case AppointmentInfo._.StatusId:
                    _appointment.StatusId = _proxy.StatusId;
                    break;

                case AppointmentInfo._.Subject:
                    _appointment.Subject = _proxy.Subject;
                    break;
                }
            }
            else
            {
                if (_appointment.RecurrenceInfo == null)
                {
                    return;
                }
                switch (e.Name)
                {
                case PWRecurrenceInfo._.AllDay:
                    _appointment.RecurrenceInfo.AllDay = _proxy.RecurrenceInfo.AllDay;
                    break;

                case PWRecurrenceInfo._.DayNumber:
                    _appointment.RecurrenceInfo.DayNumber = _proxy.RecurrenceInfo.DayNumber;
                    break;

                case PWRecurrenceInfo._.Duration:
                    _appointment.RecurrenceInfo.Duration = _proxy.RecurrenceInfo.Duration;
                    break;

                case PWRecurrenceInfo._.End:
                    _appointment.RecurrenceInfo.End = _proxy.RecurrenceInfo.End;
                    break;

                case PWRecurrenceInfo._.Month:
                    _appointment.RecurrenceInfo.Month = _proxy.RecurrenceInfo.Month;
                    break;

                case PWRecurrenceInfo._.OccurrenceCount:
                    _appointment.RecurrenceInfo.OccurrenceCount = _proxy.RecurrenceInfo.OccurrenceCount;
                    break;

                case PWRecurrenceInfo._.Periodicity:
                    _appointment.RecurrenceInfo.Periodicity = _proxy.RecurrenceInfo.Periodicity;
                    break;

                case PWRecurrenceInfo._.Range:
                    _appointment.RecurrenceInfo.Range = (RecurrenceRange)_proxy.RecurrenceInfo.Range;
                    break;

                case PWRecurrenceInfo._.Start:
                    _appointment.RecurrenceInfo.Start = _proxy.RecurrenceInfo.Start;
                    break;

                case PWRecurrenceInfo._.Type:
                    _appointment.RecurrenceInfo.Type = (RecurrenceType)_proxy.RecurrenceInfo.Type;
                    break;

                case PWRecurrenceInfo._.WeekDays:
                    _appointment.RecurrenceInfo.WeekDays = (WeekDays)_proxy.RecurrenceInfo.WeekDays;
                    break;

                case PWRecurrenceInfo._.WeekOfMonth:
                    _appointment.RecurrenceInfo.WeekOfMonth = (WeekOfMonth)_proxy.RecurrenceInfo.WeekOfMonth;
                    break;
                }
            }
        }
 void OnEffectPropertyChanged(object sender, ProWrite.Entity.PropertyChangedEventArgs e)
 {
     UndoService.BeginTransaction("Changed the " + e.Name + " Property");
     UndoService.AddPropertyChangedAction(sender, e.Name, e.NewValue, e.OldValue);
     UndoService.Commit();
 }