Esempio n. 1
0
 private void boostFinish()
 {
     DApp.ActiveDocument.PreserveSelection = true;
     DApp.ActiveDocument.ResetSettings();
     DApp.EventsEnabled = true;
     DApp.Optimization  = false;
     DApp.ActiveDocument.EndCommandGroup();
     DApp.Refresh();
 }
Esempio n. 2
0
 /// <summary>
 /// Desables optimization features, close the command group and reflesh UI
 /// </summary>
 /// <param name="app"></param>
 public static void EndDraw(this Corel.Interop.VGCore.Application app)
 {
     if (app.ActiveDocument != null)
     {
         app.ActiveDocument.EndCommandGroup();
         app.ActiveDocument.PreserveSelection = false;
     }
     app.Optimization  = false;
     app.EventsEnabled = true;
     app.Refresh();
 }
Esempio n. 3
0
 protected void EndEvent()
 {
     if (bSettingSaved)
     {
         app.ActiveDocument.EndCommandGroup();
         app.ActiveDocument.RestoreSettings();
     }
     if (EventHide)
     {
         app.Optimization  = false;
         app.EventsEnabled = bEventsEnabled;
     }
     app.Refresh();
 }
Esempio n. 4
0
        private void doSmartTrimMark(object sender, RoutedEventArgs e)
        {
            if (corelApp.Documents.Count == 0)
            {
                return;
            }

            corelApp.ActiveDocument.Unit = cdrUnit.cdrMillimeter;
            ShapeRange sr = new ShapeRange();

            sr = corelApp.ActiveSelectionRange;

            if (sr.Count == 0)
            {
                return;
            }

            if ((chxLeft.IsChecked ?? false) &&
                (chxRight.IsChecked ?? false) &&
                (chxTop.IsChecked ?? false) &&
                (chxBottom.IsChecked ?? false))
            {
                return;
            }

            SmartTrimMark smtm = new SmartTrimMark(corelApp);

            corelApp.Optimization = true;

            var props = new DoMarksProperties(
                tbOffset.Value,
                tbMarkHeight.Value,
                chxOneShootCut.IsChecked ?? false,
                chxCanDecrease.IsChecked ?? false,
                chxWhiteSubMark.IsChecked ?? false,
                chxLeft.IsChecked ?? false,
                chxRight.IsChecked ?? false,
                chxTop.IsChecked ?? false,
                chxBottom.IsChecked ?? false);

            smtm.DoSmartTrimMarks(props, sr);

            corelApp.ActiveDocument.ClearSelection();
            corelApp.Optimization = false;
            corelApp.ActiveWindow.Refresh();
            corelApp.Refresh();
        }