private void documentPrintSelectionAction_Execute(object sender, SingleChoiceActionExecuteEventArgs e)
 {
     if (e.SelectedChoiceActionItem.Data is IDocumentData)
     {
         CriteriaOperator criteria = ((BaseObjectSpace)ObjectSpace).GetObjectsCriteria(View.ObjectTypeInfo, e.SelectedObjects);
         SnapDocumentHelper.ShowPrintPreview((IDocumentData)e.SelectedChoiceActionItem.Data, Application.CreateObjectSpace(View.ObjectTypeInfo.Type), criteria);
     }
 }
Exemple #2
0
 public SnapDesigner(SnapDocumentHelper helper)
 {
     InitializeComponent();
     this.helper = helper;
     helper.LoadDocument(snapControl1.Document);
     saveToObjectItem.Enabled = helper.Modified;
     UpdateText();
 }
 private void ShowDesigner(IDocumentData documentData, IObjectSpace objectSpace)
 {
     objectSpace.Committed += delegate { ObjectSpace.Refresh(); };
     SnapDocumentHelper.ShowDesigner(documentData, objectSpace, Application);
 }
        private void showDocumentPrintPreviewAction_Execute(object sender, SimpleActionExecuteEventArgs e)
        {
            IObjectSpace newObjectSpace = Application.CreateObjectSpace(View.ObjectTypeInfo.Type);

            SnapDocumentHelper.ShowPrintPreview((IDocumentData)newObjectSpace.GetObject(View.CurrentObject), newObjectSpace);
        }