public TransitionsViewModel(KynapseePaneModel submodel)
        {
            submodel_ = submodel;

            Gestures = submodel_.Presentation.GetNuiModel();
            Methods = new List<TransitionMethod>()
                          {
                              TransitionMethod.NextSlide,
                              TransitionMethod.PreviousSlide,
                              TransitionMethod.TargetSlide
                          };

            sr_ = submodel_.SlideRange;
            set_ = sr_.GetTransitions(submodel_.Presentation, Gestures);
            Transitions = new ObservableCollection<TransitionItem>(set_.Transitions.Select((x)
                => new TransitionItem(this, x)));

            NewTransitionCommand = new RelayCommand(NewTransition);

            submodel_.PropertyChanged += KynapseePropertyChanged;
        }
 void KynapseePropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
 {
     switch (e.PropertyName)
     {
         case "Presentation":
             if (submodel_.Presentation != null)
                 Gestures = submodel_.Presentation.GetNuiModel();
             break;
         case "SlideRange":
             sr_ = submodel_.SlideRange;
             set_ = sr_.GetTransitions(submodel_.Presentation, Gestures);
             Transitions = new ObservableCollection<TransitionItem>(set_.Transitions.Select((x)
                 => new TransitionItem(this, x)));
             break;
     }
 }
 public static void SetTransitions(this SlideRange sr, TransitionSet model)
 {
     for (int i = 1; i <= sr.Count; i++)
         sr[i].Tags.Add(TagTransitions, model.ToString());
 }
 public static void SetTransitions(this Slide sr, TransitionSet model)
 {
     sr.Tags.Add(TagTransitions, model.ToString());
 }
Beispiel #5
0
        void LoadSlideGestures()
        {
            provider_.ClearGestures();

            transitions_ = win_.View.Slide.GetTransitions(win_.Presentation, gestures_);
            foreach (var tr in transitions_.Transitions)
            {
                provider_.AddOrUpdateGesture(tr.Gesture);
            }
        }