예제 #1
0
 public Docker(object app)
 {
     InitializeComponent();
     appDRAW = (Corel.Interop.VGCore.Application)app;
     //appDRAW.SelectionChange += new Corel.Interop.VGCore.DIDrawApplicationEvents_SelectionChangeEventHandler(SelectionChange);
     appDRAW.SelectionChange += new Corel.Interop.VGCore.DIVGApplicationEvents_SelectionChangeEventHandler(SelectionChange);
 }
        public FacaCaixaAutoUI(Corel.Interop.VGCore.Application app)
        {
            InitializeComponent();
            if (FacaBase.app == null)
            {
                FacaBase.app = app;
            }

            styleController       = new CorelStyles.StyleController(this.Resources, app);
            manager               = new FacaManager();
            listaComboBox         = manager.ListaClass();
            comboBox1.ItemsSource = listaComboBox.Keys;
            exp = new Regex("^(?<num>[0-9]{0,}[,.]?[0-9]{0,})", RegexOptions.IgnoreCase | RegexOptions.Compiled);

            comboBox1.SelectedIndex = -1;
            #if DEBUG
            comboBox1.SelectedIndex  = 1;
            textBox_Altura.Text      = "100";
            textBox_Largura.Text     = "60";
            textBox_Comprimento.Text = "90";
            #endif

            comboBox1_SelectionChanged(null, null);
            img_bonus.Source = FacaCaixaAuto.Properties.Resources.bonus630.ConvertToBitmapSource();
        }
예제 #3
0
        public void StartCore(string filePath, Corel.Interop.VGCore.Application corelApp)
        {
            if (corelApp != null)
            {
                InCorel                      = true;
                CorelAutomation              = new CorelAutomation(corelApp, this);
                this.app                     = corelApp;
                corelApp.OnApplicationEvent += CorelApp_OnApplicationEvent;
            }
            FileInfo file = null;

            try
            {
                FileInfo fileOri = new FileInfo(filePath);
                Title = filePath;
                try
                {
                    if (!Directory.Exists(workerFolder))
                    {
                        Directory.CreateDirectory(workerFolder);
                    }
                }
                catch (IOException ioE)
                {
                    if (ErrorFound != null)
                    {
                        ErrorFound("Erro - " + ioE.Message);
                    }
                    return;
                }
                string newPath = workerFolder + "\\" + fileOri.Name;
                if (File.Exists(newPath))
                {
                    File.Delete(newPath);
                }
                file = fileOri.CopyTo(newPath);
            }
            catch (IOException ioErro)
            {
                if (ErrorFound != null)
                {
                    ErrorFound("Erro - " + ioErro.Message);
                }
                return;
            }
            inputCommands          = new InputCommands(this);
            commands               = (typeof(InputCommands)).GetMethods(BindingFlags.Public | BindingFlags.Instance);
            xmlDecoder             = new XMLDecoder();
            xmlDecoder.LoadFinish += XmlDecoder_LoadFinish;
            Thread thread = new Thread(new ParameterizedThreadStart(LoadFile));

            thread.IsBackground = true;
            thread.Start(file);
        }
예제 #4
0
 public DetailsViewModel(Core core) : base(core)
 {
     corelAutomation   = new CorelAutomation(core.CorelApp, core);
     this.core         = core;
     corelApp          = core.CorelApp;
     RunBindCommand    = new ViewModels.Commands.AttributeCommand(attributeContentExec, attributeContentCanExec);
     RunMacroCommand   = new ViewModels.Commands.AttributeCommand(attributeMacro, attributeCanMacro);
     SearchGuidCommand = new ViewModels.Commands.AttributeCommand(attributeSearchGuid, attributeCanSearchGuid);
     SearchItemCommand = new ViewModels.Commands.AttributeCommand(attributeSearchItem, attributeCanSearchItem);
     CopyCommand       = new ViewModels.Commands.AttributeCommand(attributeCopy, attributeCanCopy);
 }
예제 #5
0
        /// <summary>
        ///   Displays a message box that has a message, title bar caption, button, and icon;
        ///     and that returns a result.
        /// </summary>
        /// <param name="message">A System.String that specifies the text to display.</param>
        /// <param name="caption"A System.String that specifies the title bar caption to display.></param>
        /// <param name="buttons">A MessageBoxButton value that specifies which button or buttons
        ///     to display.</param>
        /// <returns>A MessageBoxResult value that specifies which message box button
        ///    is clicked by the user.</returns>
        public static DialogResult MsgShow(this Corel.Interop.VGCore.Application corelApp, string message, string caption, DialogButtons buttons)
        {
            try
            {
#if X7
                int result = (int)System.Windows.MessageBox.Show(message, caption, (System.Windows.MessageBoxButton)((int)buttons));
#elif X8
                int result = (int)System.Windows.MessageBox.Show(message, caption, (System.Windows.MessageBoxButton)((int)buttons));
#else
                int result = corelApp.FrameWork.ShowMessageBox(message, caption, (int)buttons);
#endif
                return((DialogResult)result);
            }
            catch { return(DialogResult.Ignor); }
        }
예제 #6
0
 /// <summary>
 /// Displays a message box that has a message and title bar caption; and that returns
 ///    a result.
 /// </summary>
 /// <param name="message">A System.String that specifies the text to display.</param>
 /// <param name="caption">A System.String that specifies the title bar caption to display.</param>
 /// <returns>  A MessageBoxResult value that specifies which message box button
 ///     is clicked by the user.</returns>
 public static DialogResult MsgShow(this Corel.Interop.VGCore.Application corelApp, string message, string caption)
 {
     return(corelApp.MsgShow(message, caption, DialogButtons.Ok));
 }
 /// <summary>
 /// Controller Styles of control, for more colors includes here in StyleKeys and Colors.xaml
 /// </summary>
 /// <param name="resource"></param>
 /// <param name="app"></param>
 public StylesController(ResourceDictionary resource, Corel.Interop.VGCore.Application app)
 {
     Resources = resource;
     corelApp  = app;
     corelApp.OnApplicationEvent += CorelApp_OnApplicationEvent;
 }
        //public XMLTagWindow(Corel.Interop.VGCore.Application app, string filePath)
        //{
        //    InitializeComponent();
        //    this.app = app;
        //    core = new Core();

        //}
        public XMLTagWindow(object app, string filePath)
        {
            InitializeComponent();
            this.app = app as Corel.Interop.VGCore.Application;
            core     = new Core();
        }
 public ButtonSample(object app)
 {
     InitializeComponent();
     appDraw = (Corel.Interop.VGCore.Application)app;
 }
예제 #10
0
파일: frmImport.cs 프로젝트: dannisliang/VS
 public frmImport(Corel.Interop.VGCore.Application app)
 {
     InitializeComponent();
     this.application = app;
 }
예제 #11
0
파일: frmAlign.cs 프로젝트: dannisliang/VS
 public frmAlign(Corel.Interop.VGCore.Application app) : base(app)
 {
     InitializeComponent();
 }
 public MySlider(object app)
 {
     InitializeComponent();
     appDraw = (Corel.Interop.VGCore.Application)app;
 }
예제 #13
0
 public frmRemoveViews(Corel.Interop.VGCore.Application app)
     : base(app)
 {
     InitializeComponent();
 }