private static void CreateSampleProject(Document document, string name, params string[] actions)
 {
     Project project = document.NewProject();
     project.Name = name;
     foreach (string action in actions)
         CreateSampleAction(project, action);
 }
 public ViewModelLocator()
 {
     Document document = new Document();
     CreateSampleData(document);
     ProjectSelection projectSelection = new ProjectSelection();
     _main = new MainViewModel(document, projectSelection);
 }
 private static void CreateSampleData(Document document)
 {
     CreateSampleProject(document, "Get off of Tatooine",
         "Find the boy",
         "Bet on the pod races",
         "Buy hyperdrive",
         "Install hyperdrive");
     CreateSampleProject(document, "Fix the sink",
         "Buy parts at hardware store",
         "Install parts",
         "Go back to hardware store",
         "Smash finger with wrench",
         "Call plumber");
     CreateSampleProject(document, "Build Windows 8 app",
         "Download SDK",
         "Build app",
         "...",
         "Profit!");
 }
Esempio n. 4
0
 public MainViewModel(Document document, ProjectSelection projectSelection)
 {
     _document = document;
     _projectSelection = projectSelection;
 }