Esempio n. 1
0
        private void AddTextSample()
        {
            var  workingDoc = PDFViewer.CurrentDocument;
            Page page       = workingDoc.GetPage(PDFViewer.CurrentPageNumber);

            if (page == null)
            {
                return;
            }

            _toolManager.CreateTool(ToolManager.ToolType.e_sticky_note_create);

            PDFViewer.Update();
        }
Esempio n. 2
0
        public ActionResult Create(ToolVM toolVM)
        {
            if (!ModelState.IsValid)
            {
                return(View());
            }


            var tool = new Tool {
                Name = toolVM.Name
            };

            if (toolManager.CreateTool(tool))
            {
                return(RedirectToAction("Index"));
            }
            else
            {
                ModelState.AddModelError("", "Ошибка сохранения данных.");
                return(View());
            }
        }