Beispiel #1
0
        // TODO: Add in UndoRedo CommandStack and relevant classes
        public SessionManager(SurfaceInkCanvas targetInkCanvas)
        {
            CurrentProject = new Project();
            AddNewPageToProject();
            _SurfacetargetInkCanvas = targetInkCanvas;
            CommonGestureManager = GestureManager.LoadFromFile("gestures.xml");
            ActivePenMode = PenMode.Draw;

            NotifyPropertyChanged("CurrentProject");
            NotifyPropertyChanged("ActivePenMode");
            NotifyPropertyChanged("ActivePenSettings");
        }
Beispiel #2
0
        public SessionManager(InkCanvas targetInkCanvas, Canvas root)
        {
            CurrentProject = new Project();
            CurrentProject.DefaultCanvasSettings.Height = root.Height/3;
            CurrentProject.DefaultCanvasSettings.Width = root.Width/3;
            AddNewPageToProject();
            _targetInkCanvas = targetInkCanvas;
            CommonGestureManager = GestureManager.LoadFromFile("gestures.xml");
            ActivePenMode = PenMode.Draw;

            NotifyPropertyChanged("CurrentProject");
            NotifyPropertyChanged("ActivePenMode");
            NotifyPropertyChanged("ActivePenSettings");
        }
Beispiel #3
0
        public void LoadProject(String fileName)
        {
            CurrentProject = Project.LoadFromFile(fileName);
            if(CurrentProject.PageDictionary.Count>0)
                LoadPage(CurrentProject.PageDictionary[CurrentProject.PageDictionary.Keys.ToList()[0]]);
            ActivePenMode = PenMode.Draw;

            NotifyPropertyChanged("CurrentProject");
            NotifyPropertyChanged("ActivePenMode");
            NotifyPropertyChanged("ActivePenSettings");
        }