public ControlUI(object app)
 {
     InitializeComponent();
     try
     {
         corelApp         = app as corel.Application;
         stylesController = new Styles.StylesController(this.Resources, corelApp);
         DataSourceFactory dataSourceFactory = new DataSourceFactory();
         dataSourceFactory.AddDataSource("FacaDS", typeof(FacaDataSource));
         dataSourceFactory.Register();
     }
     catch
     {
         global::System.Windows.MessageBox.Show("VGCore Erro");
     }
     btn_Command.Click += (s, e) => {
         try
         {
             DataSourceProxy dsp2 = corelApp.FrameWork.Application.DataContext.GetDataSource("FacaDS");
             dsp2.InvokeMethod("OnDraw");
         }
         catch (Exception err)
         {
             Debug.WriteLine(err.Message);
         }
     };
 }
Example #2
0
        public RenameWarpercs(object app)
        {
            try
            {
                RenameWarpercs.corelApp = app as Application;
                RenameWarpercs.corelApp.OnApplicationEvent += CorelApp_OnApplicationEvent;

                var dsf = new DataSourceFactory();
                dsf.AddDataSource("RenameDataSource", typeof(RenameDataSource));
                dsf.Register();
            }
            catch
            {
                global::System.Windows.MessageBox.Show("VGCore Erro");
            }
        }