示例#1
0
 private void UISetup()
 {
     mTaskpaneView = mSWApplication.CreateTaskpaneView2(string.Empty, "Chrono::Engine tools");
     mTaskpaneHost = (SWTaskpaneHost)mTaskpaneView.AddControl(SWTaskpaneHost.SWTASKPANE_PROGID,"");
     mTaskpaneHost.mSWApplication = this.mSWApplication;
     mTaskpaneHost.mSWintegration = this;
 }
示例#2
0
        private void UISetup()
        {
            try {
                Version cv  = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version;
                string  ver = cv.ToString();

                taskpaneView = swApp.CreateTaskpaneView2(Properties.Settings.Default.NetPath +
                                                         Properties.Settings.Default.Icon,
                                                         string.Format(Properties.Resources.Title, ver));

                taskpaneHost              = (SWTaskPaneHost)taskpaneView.AddControl(SWTaskPaneHost.SWTASKPANE_PROGID, string.Empty);
                taskpaneHost.OnRequestSW += new Func <SldWorks>(delegate { return(this.swApp); });

                bool result = taskpaneView.AddStandardButton((int)swTaskPaneBitmapsOptions_e.swTaskPaneBitmapsOptions_Ok, "OK");
                result = taskpaneView.AddStandardButton((int)swTaskPaneBitmapsOptions_e.swTaskPaneBitmapsOptions_Options, "Configuration");
                //result = taskpaneView.AddStandardButton((int)swTaskPaneBitmapsOptions_e.swTaskPaneBitmapsOptions_Close, "Close");
                result = taskpaneView.AddCustomButton(Properties.Settings.Default.NetPath + Properties.Settings.Default.RefreshIcon, "Refresh");
                result = taskpaneView.AddCustomButton(Properties.Settings.Default.NetPath + Properties.Settings.Default.ArchiveIcon, "Archive PDF");
                result = taskpaneView.AddCustomButton(Properties.Settings.Default.NetPath + Properties.Settings.Default.HelpIcon, "Usage Help");

                taskpaneView.TaskPaneToolbarButtonClicked += taskpaneView_TaskPaneToolbarButtonClicked;
                taskpaneHost.cookie = cookie;
                taskpaneHost.Start();
            } catch (Exception e) {
                RedbrickErr.ErrMsg em = new RedbrickErr.ErrMsg(e);
                em.ShowDialog();
            }
        }
示例#3
0
 public void AddTaskPane()
 {
     tpv = iSwApp.CreateTaskpaneView2("", "FTL VAME Explorer");
     tpv.ShowView();
     tph = tpv.AddControl("TestPane", "");
     tph.getSwApp(iSwApp);
     tph.getSwAddin(this);
 }
示例#4
0
        /// <summary>
        /// Function Name: LoadUI
        /// Description: Loads the UI to SolidWorks
        /// </summary>
        /// <returns>Returns success bolean</returns>
        private void LoadUI()
        {
            // Add add-ins icon
            var imagePath = Path.Combine(Path.GetDirectoryName(typeof(Addin).Assembly.CodeBase).Replace(@"file:\", ""), "logo-small.png");

            mTaskpaneView = swApp.CreateTaskpaneView2(imagePath, "CS80 Project");

            // Load UI
            mMainUI = (MainUI)mTaskpaneView.AddControl(Addin.SWTASKPANE_PROGID, string.Empty);
            mMainUI.setSolidWorksSingleton(this);
        }
示例#5
0
        /// <summary>
        /// Create our Taskpane and inject our HostUI
        /// </summary>
        private void LoadUI()
        {
            //Find location to our taskpane icon
            var imagePath = Path.Combine(Path.GetDirectoryName(typeof(StationBuilder3DAddIn).Assembly.CodeBase).Replace(@"file:\", string.Empty), "Options.bmp");

            //Create our Taskpane
            mTaskPaneView = mSolidWorksApplication.CreateTaskpaneView2(imagePath, "StationBuilder3DAddIn");

            //Load our UI into the taskpane
            stationBuilder3dHost = (StationBuilder3DHostUI)mTaskPaneView.AddControl(StationBuilder3DAddIn.SWTASKPANE_PROGID, string.Empty);
        }
示例#6
0
        private void AddLogPage()
        {
            string[] img = { @"E:\ownCloud\Projects\Resources\20x.png", @"E:\ownCloud\Projects\Resources\32x.png",
                             @"E:\ownCloud\Projects\Resources\40x.png", @"E:\ownCloud\Projects\Resources\64x.png",
                             @"E:\ownCloud\Projects\Resources\96x.png", @"E:\ownCloud\Projects\Resources\128x.png" };

            logPageView = swApp.CreateTaskpaneView3(img, "Log Page");
            tpHost      = logPageView.AddControl(TP_PROGID, string.Empty);
            LogPage     = new wpfLogPage();
            tpHost.AddWpfControl(LogPage);
        }
示例#7
0
        /// <summary>
        /// Create our Taskpane and inject our host UI
        /// </summary>
        private void LoadUI()
        {
            // Find location to our taskpane icon
            var imagePath = Path.Combine(Path.GetDirectoryName(typeof(TaskpaneIntegration).Assembly.CodeBase).Replace(@"file:\", string.Empty), "logo-small.png");

            // Create our Taskpane
            mTaskpaneView = mSolidWorksApplication.CreateTaskpaneView2(imagePath, "Woo! My first SwAddin");

            // Load our UI into the taskpane
            mTaskpaneHost = (TaskpaneHostUI)mTaskpaneView.AddControl(TaskpaneIntegration.SWTASKPANE_PROGID, string.Empty);
        }
示例#8
0
 private void UISetup()
 {
     try
     {
         string imagePath;
         imagePath     = @"\Resources\Theme.png";
         mTaskpaneView = SWApplication.CreateTaskpaneView2(imagePath, "3DSearch");
         mTaskpaneHost = (LittlePane)mTaskpaneView.AddControl(Loader.SWTASKPANE_PROGID, "");
     }
     catch (Exception e)
     {
         System.Windows.Forms.MessageBox.Show(e.Message);
     }
 }
示例#9
0
 private void UISetup()
 {
     try
     {
         string imagePath;
         imagePath     = @"\Resources\THeme.png";
         mTaskpaneView = SWApplication.CreateTaskpaneView2(imagePath, "AirVentsCAD");
         //bool res = mTaskpaneView.AddCustomButton(imagePath, "Just testing");
         mTaskpaneHost = (LittleTaskPane)mTaskpaneView.AddControl(Class1.SWTASKPANE_PROGID, "");
     }
     catch (Exception e)
     {
         System.Windows.Forms.MessageBox.Show(e.Message);
     }
 }
示例#10
0
 private void UISetup()
 {
     mTaskpaneView       = mSWApplication.CreateTaskpaneView2(string.Empty, "sauron: computer vision-ize your models");
     mTaskpaneHost       = (SWTaskpaneHost)mTaskpaneView.AddControl(SWTaskpaneHost.SWTASKPANE_PROGID, "");
     mTaskpaneHost.swApp = mSWApplication;
 }
示例#11
0
 private void Taskpanesetup()
 {
     mTaskpaneView = iSwApp.CreateTaskpaneView2("C:\\Users\\thornm\\Desktop\\DEV\\CSharpAddin\\CSharpAddin\\IGTLOGO.bmp", "IGT Customizations");
     mTaskpaneHost = (SWTaskpaneHost)mTaskpaneView.AddControl(SWTaskpaneHost.SWTASKPANE_PROGID, "");
     mTaskpaneHost.iswapplication = iSwApp;
 }
示例#12
0
 private void UISetup()
 {
     mTaskpaneView = mSWApplication.CreateTaskpaneView2(string.Empty, "Chrono::Engine tools");
     mTaskpaneHost = (SWTaskpaneHost)mTaskpaneView.AddControl(SWTaskpaneHost.SWTASKPANE_PROGID,"");
     mTaskpaneHost.mSWApplication = this.mSWApplication;
     mTaskpaneHost.mSWintegration = this;
 }
示例#13
0
 //UI method to add task pane and remove task pane
 public void AddTaskPane()
 {
     myTaskPaneView = iSwApp.CreateTaskpaneView2("", "Custom Property Pane");
     myTaskPaneHost = myTaskPaneView.AddControl("Compac_CustomProperty_TaskPane","");
      _objTaskPaneControl = (UserControl1)myTaskPaneView.GetControl();
     if (_objTaskPaneControl != null)
     {
         _objTaskPaneControl.swApp = iSwApp;
         //_objTaskPaneControl.Load += new EventHandler(_objTaskPaneControl_Load);
     }
     DataGridView gridView=(DataGridView)_objTaskPaneControl.Controls.Find("dataGridView1",true).FirstOrDefault();
     if(gridView!=null)
     {
         //this.tableTableAdapter.Fill(this.addInDataSet1.Table);
     }
 }
示例#14
0
        private void UISetup()
        {
            try {
            Version cv = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version;
            string ver = cv.ToString();

            taskpaneView = swApp.CreateTaskpaneView2(Properties.Settings.Default.NetPath +
            Properties.Settings.Default.Icon,
            string.Format(Properties.Resources.Title, ver));

            taskpaneHost = (SWTaskPaneHost)taskpaneView.AddControl(SWTaskPaneHost.SWTASKPANE_PROGID, string.Empty);
            taskpaneHost.OnRequestSW += new Func<SldWorks>(delegate { return this.swApp; });

            bool result = taskpaneView.AddStandardButton((int)swTaskPaneBitmapsOptions_e.swTaskPaneBitmapsOptions_Ok, "OK");
            result = taskpaneView.AddStandardButton((int)swTaskPaneBitmapsOptions_e.swTaskPaneBitmapsOptions_Options, "Configuration");
            //result = taskpaneView.AddStandardButton((int)swTaskPaneBitmapsOptions_e.swTaskPaneBitmapsOptions_Close, "Close");
            result = taskpaneView.AddCustomButton(Properties.Settings.Default.NetPath + Properties.Settings.Default.RefreshIcon, "Refresh");
            result = taskpaneView.AddCustomButton(Properties.Settings.Default.NetPath + Properties.Settings.Default.ArchiveIcon, "Archive PDF");
            result = taskpaneView.AddCustomButton(Properties.Settings.Default.NetPath + Properties.Settings.Default.HelpIcon, "Usage Help");

            taskpaneView.TaskPaneToolbarButtonClicked += taskpaneView_TaskPaneToolbarButtonClicked;
            taskpaneHost.cookie = cookie;
            taskpaneHost.Start();
              } catch (Exception e) {
            RedbrickErr.ErrMsg em = new RedbrickErr.ErrMsg(e);
            em.ShowDialog();
              }
        }
示例#15
0
 public void AddTaskPane()
 {
     tpv = iSwApp.CreateTaskpaneView2("", "FTL VAME Explorer");
     tpv.ShowView();
     tph = tpv.AddControl("TestPane", "");
     tph.getSwApp(iSwApp);
     tph.getSwAddin(this);
 }
 private void UISetup()
 {
     mTaskpaneView = mSWApplication.CreateTaskpaneView2(string.Empty, "Woo! My first SwAddin");
     mTaskpaneHost = (SWTaskpaneHost)mTaskpaneView.AddControl(SWTaskpaneHost.SWTASKPANE_PROGID, "");
     SWTaskpaneHost.mSWApplication = mSWApplication;
 }
示例#17
0
 private void LoadUI()
 {
     mTaskpaneView = swApp.CreateTaskpaneView2("", "Mpc Export Add-in");
     mTaskpaneHost = (TaskpaneHostUI)mTaskpaneView.AddControl(SWTASKPANE_PROGID, string.Empty);
     mTaskpaneHost.SetSwApp(swApp);
 }