コード例 #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
ファイル: Redbrick.cs プロジェクト: kcjuntunen/Redbrick-Addin
        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
ファイル: Addin.cs プロジェクト: blogharu/CS80Project
        /// <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);
        }
コード例 #4
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);
        }
コード例 #5
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);
        }
コード例 #6
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);
     }
 }
コード例 #7
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);
     }
 }
コード例 #8
0
 private void UISetup()
 {
     mTaskpaneView = mSWApplication.CreateTaskpaneView2(string.Empty, "Woo! My first SwAddin");
     mTaskpaneHost = (SWTaskpaneHost)mTaskpaneView.AddControl(SWTaskpaneHost.SWTASKPANE_PROGID, "");
     SWTaskpaneHost.mSWApplication = mSWApplication;
 }
コード例 #9
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;
 }
コード例 #10
0
 private void LoadUI()
 {
     mTaskpaneView = swApp.CreateTaskpaneView2("", "Mpc Export Add-in");
     mTaskpaneHost = (TaskpaneHostUI)mTaskpaneView.AddControl(SWTASKPANE_PROGID, string.Empty);
     mTaskpaneHost.SetSwApp(swApp);
 }