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(); }
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()); } }