Example #1
0
        public void Run()
        {
            var model = RecipeReportService.GetRecipeSelectionModel();

            model.Callback = RunRecipeReport;
            var window = new NetworkReportSelectionView {
                ViewModel = this
            };

            window.Render(model);
            window.ShowDialog();
        }
Example #2
0
 private void RunRecipeReport(RecipeReportSelectionModel model)
 {
     View.StatusUpdate(StatusModel.StartStopWatch);
     View.StatusUpdate(StatusModel.Update("Running Recipe Report"));
     ThreadPool.QueueUserWorkItem(delegate
     {
         try
         {
             View.EnableCancel(true);
             bool wasCancelled;
             RecipeReportService.RunReport(model, View.StatusUpdate, out wasCancelled);
             if (wasCancelled)
             {
                 View.ReportCancelled();
             }
             RenderDocument();
         }
         finally
         {
             View.EnableCancel(false);
             View.StatusUpdate(StatusModel.Completed);
         }
     });
 }
Example #3
0
        public void Delete(string key)
        {
            RecipeReportService.DeleteReport(key);

            RenderDocument();
        }
Example #4
0
 public void CancelReport()
 {
     RecipeReportService.CancelReport();
 }
Example #5
0
 public override RecipeReportModel GetModel()
 {
     return(RecipeReportService.GetModel());
 }