Esempio n. 1
0
 /// <summary>
 /// Creates a new view
 /// </summary>
 /// <param name="project">The current project</param>
 /// <returns>Newly created view</returns>
 private View PromptUserToCreateView(Project project)
 {
     View newView = null;
     CreateViewDialog viewDialog = new CreateViewDialog(this, project);
     viewDialog.ShowDialog();
     if (viewDialog.DialogResult == DialogResult.OK)
     {
         string newViewName = viewDialog.ViewName;
         newView = project.CreateView(newViewName);
         // Create a page
         newView.CreatePage(SharedStrings.NEW_PAGE, 0);
     }
     viewDialog.Close();
     return newView;
 }
Esempio n. 2
0
 /// <summary>
 /// Creates a view
 /// </summary>
 /// <returns>View that was created</returns>
 private View PromptUserToCreateView()
 {
     View newView = null;
     Project project = ((ProjectNode)projectTree.Nodes[0]).Project;
     CreateViewDialog viewDialog = new CreateViewDialog(MainForm, project);
     viewDialog.ShowDialog();
     if (viewDialog.DialogResult == DialogResult.OK)
     {
         string newViewName = viewDialog.ViewName;
         newView = project.CreateView(newViewName);
         viewDialog.Close();
     }
     return newView;
 }