Example #1
0
 public ViewInfo ChangeViewGroup(ViewGroup viewGroup)
 {
     return ChangeProp(ImClone(this), im => im.ViewGroup = viewGroup);
 }
 public override void ImportViewsFromFile(Control control, ViewGroup viewGroup, string fileName)
 {
     ViewSpec[] views;
     try
     {
         views = LoadViews(fileName).ToArray();
     }
     catch (Exception x)
     {
         ShowMessageBox(control, string.Format("Failure loading {0}:\n{1}", fileName, x.InnerException), MessageBoxButtons.OK);
         return;
     }
     if (views.Length == 0)
     {
         ShowMessageBox(control, "No views were found in that file.", MessageBoxButtons.OK);
         return;
     }
     CopyViewsToGroup(control, viewGroup, new ViewSpecList(views));
 }
Example #3
0
 protected void VerifyReportsImported(ViewGroup viewGroup, ReportInfo reportInfo)
 {
     foreach (var expectedReport in reportInfo.ReportOrViewSpecs)
     {
         var foundReports = Settings.Default.PersistedViews.GetViewSpecList(viewGroup.Id).ViewSpecs
             .Where(viewSpec => viewSpec.Name == expectedReport.Name)
             .ToArray();
         Assert.AreEqual(1, foundReports.Length);
     }
 }
 public override void ImportViews(Control owner, ViewGroup viewGroup)
 {
     using (var importDialog = new OpenFileDialog
     {
         InitialDirectory = Settings.Default.ExportResultsDirectory,
         CheckPathExists = true,
         Filter = ViewFileFilter,
     })
     {
         importDialog.ShowDialog(owner);
         if (string.IsNullOrEmpty(importDialog.FileName))
         {
             return;
         }
         ImportViewsFromFile(owner, viewGroup, importDialog.FileName);
     }
 }
 protected override ViewEditor CreateViewEditor(ViewGroup viewGroup, ViewSpec viewSpec)
 {
     var viewEditor = base.CreateViewEditor(viewGroup, viewSpec);
     viewEditor.SetViewTransformer(new DocumentViewTransformer());
     viewEditor.AddViewEditorWidget(new PivotReplicateAndIsotopeLabelWidget {Dock = DockStyle.Left});
     #if DEBUG
     viewEditor.ShowSourceTab = true;
     #else
     viewEditor.ShowSourceTab = false;
     #endif
     if (EnablePreview)
     {
         viewEditor.PreviewButtonVisible = true;
         viewEditor.Text = Resources.DocumentGridViewContext_CreateViewEditor_Edit_Report;
     }
     return viewEditor;
 }
Example #6
0
 public override void ImportViewsFromFile(Control control, ViewGroup viewGroup, string fileName)
 {
     throw new NotSupportedException();
 }
Example #7
0
 public override void ImportViews(Control owner, ViewGroup viewGroup)
 {
     throw new NotSupportedException();
 }
Example #8
0
 public override void CopyViewsToGroup(Control control, ViewGroup viewGroup, ViewSpecList viewSpecList)
 {
     throw new NotSupportedException();
 }