Exemplo n.º 1
0
        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;
        }
Exemplo n.º 2
0
 public void Bind(KynapseePaneModel model)
 {
     model_ = model;
     model_.PropertyChanged += PropertyChangedInModel;
 }
Exemplo n.º 3
0
        /*
        public Kinect Kinect
        {
            get
            {
                if (kinect_ == null)
                    LoadKinect();
                return kinect_;
            }
        }

        public void LoadKinect()
        {
            if (kinect_ != null)
                return;
            try
            {
                kinect_ = new Kinect();
                kinect_.GestureDone += kinect__GestureDone;
                kinect_.Init();
            }
            catch (Exception e)
            {
                kinect_ = null;
            }
            //kinect_.LoadGesturesFromFile("Kynapsee.gestures.txt");
            using (var str = new StringReader(pres_.Tags["KY_Gestures"]))
                kinect_.LoadGesturesFromFile(str);
        }

        public void UnloadKinect()
        {
            if (kinect_ == null)
                return;
            kinect_.Uninit();
            kinect_ = null;
        }
        */
        private void ThisAddIn_Startup(object sender, System.EventArgs e)
        {
            Application.SlideShowBegin += Application_SlideShowBegin;
            Application.SlideShowEnd += Application_SlideShowEnd;
            Application.AfterPresentationOpen += Application_AfterPresentationOpen;
            Application.WindowActivate += Application_WindowActivate;
            Application.SlideSelectionChanged += Application_SlideSelectionChanged;

            Application.PresentationClose += Application_PresentationClose;
            Application.WindowSelectionChange += Application_WindowSelectionChange;
            Application.SlideShowNextSlide += Application_SlideShowNextSlide;

            paneModel_ = new KynapseePaneModel();
            paneModel_.PropertyChanged += paneModel__PropertyChanged;

            pane_ = Globals.Ribbons.KynapseePane;
            pane_.Bind(paneModel_);

            factory_ = Globals.Factory.GetRibbonFactory();
        }