public static NetworkReportSelectionModel GetNetworkSelectionModel()
        {
            var model = new NetworkReportSelectionModel
            {
                Files = XmlDal.CacheModel.Files.Select(n => n.Path).ToList()
            };

            return(model);
        }
        public static void RunReport(NetworkReportSelectionModel model, Action <IStatusModel> statusUpdate, out bool cancelled)
        {
            try
            {
                Args = new AnalyzeNetworkArgs
                {
                    StatusUpdate = statusUpdate,
                    Model        = model,
                    Report       = XmlDal.CacheModel.GetNetworkReport(model.ReportName)
                };

                var tool = new AnalyzeNetworkLoop {
                    Args = Args
                };
                tool.Execute(out cancelled);
            }
            finally
            {
                statusUpdate(StatusModel.Completed);
            }
        }
Exemplo n.º 3
0
 private void RunNetworkReport(NetworkReportSelectionModel model)
 {
     View.StatusUpdate(StatusModel.Update("Running Network Report"));
     ThreadPool.QueueUserWorkItem(delegate
     {
         try
         {
             View.EnableCancel(true);
             bool wasCancelled;
             NetworkReportService.RunReport(model, View.StatusUpdate, out wasCancelled);
             if (wasCancelled)
             {
                 View.ReportCancelled();
             }
             RenderDocument();
         }
         finally
         {
             View.EnableCancel(false);
             View.StatusUpdate(StatusModel.Completed);
         }
     });
 }
Exemplo n.º 4
0
 public void Render(NetworkReportSelectionModel model)
 {
     tbReportName.Text = ReportService.GenerateReportName();
     Model             = model;
     RenderFiles();
 }