コード例 #1
0
ファイル: ThisAddIn.cs プロジェクト: negabaro/alfresco
 public void RemoveAlfrescoTaskPane()
 {
     this.CustomTaskPanes.Remove(myCustomTaskPane);
     myCustomTaskPane = null;
     if (bNoDocuments == true)
     {
         bNoDocuments = false;
     }
 }
コード例 #2
0
ファイル: ThisAddIn.cs プロジェクト: npalko/uRPC
        private void ThisAddIn_Startup(object sender, System.EventArgs e)
        {
            urpcControl = new UrpcControl();
              pane = CustomTaskPanes.Add(urpcControl, "uRPC");

              Application.WindowActivate +=
            new Excel.AppEvents_WindowActivateEventHandler(
              Application_WindowActivate);
        }
コード例 #3
0
        private void showWpWidget() {

            myUserControl1 = new MyUserControl();
          //  myUserControl2 = new MyUserControl();
            myCustomTaskPane = this.CustomTaskPanes.Add(myUserControl1, "WittyParrot");
          //  myCustomTaskPane = this.CustomTaskPanes.Add(myUserControl2, "WittyParrot");
            myCustomTaskPane.Visible = true;
            myCustomTaskPane.Width = 450;
        }
コード例 #4
0
        private void ThisAddIn_Startup(object sender, System.EventArgs e)
        {
            searchCTP = this.CustomTaskPanes.Add( ThisAddIn.searchUC, "Search");
            searchCTP.Width = 350;

            ThisAddIn.isstarted = true;

            ApplicationInteraction.PowerPointApplication = this.Application;
        }
コード例 #5
0
        private void ThisAddIn_Startup(object sender, System.EventArgs e)
        {
            // myUserControl1 = new FilesList();
             myUserControl1 = new OfficeSideBar();
             myUserControl1.FileSelected += new EventHandler(this.AddLink_Handler);

             myCustomTaskPane = this.CustomTaskPanes.Add(myUserControl1, "My Task Pane");
             myCustomTaskPane.Visible = true;
             myCustomTaskPane.Width = 300;
        }
コード例 #6
0
        private void ThisAddIn_Startup(object sender, System.EventArgs e)
        {
            myUserControl1 = new UserControl1();
            myCustomTaskPane = this.CustomTaskPanes.Add(myUserControl1, "My Task Pane");
            myCustomTaskPane.Visible = true;

            inspectors = this.Application.Inspectors;
            inspectors.NewInspector +=
            new Microsoft.Office.Interop.Outlook.InspectorsEvents_NewInspectorEventHandler(Inspectors_NewInspector);
        }
コード例 #7
0
 public void RemoveQueryServiceTaskPane()
 {
     try
     {
         if (myCustomTaskPane != null && this.CustomTaskPanes.Contains(myCustomTaskPane))
         {
             this.CustomTaskPanes.Remove(myCustomTaskPane);
         }
     }
     catch (Exception) { }
     myCustomTaskPane = null;
 }
コード例 #8
0
        private void ThisAddIn_Startup(object sender, System.EventArgs e)
        {
            activeDocumentTimer_ = new Timer();
            activeDocumentTimer_.Interval = 500;
            activeDocumentTimer_.Tick += activeDocumentTimer__Tick;

            sideBar_ = new ContextSearchBar();
            sideBarPane_ = this.CustomTaskPanes.Add(sideBar_, "Context Search Helper");
            sideBarPane_.Width = 400;
            sideBarPane_.Visible = true;

            activeDocumentTimer_.Start();
        }
コード例 #9
0
        private void ThisAddIn_Startup(object sender, System.EventArgs e)
        {
            explorer = this.Application.ActiveExplorer();

            TaskPane = Globals.ThisAddIn.CustomTaskPanes.Add(new MainContainer(), "Rss Feeds", explorer);
            TaskPane.Visible = false;
            TaskPane.Width = 245;

            //You can set the docking position of the Panel
            TaskPane.DockPosition = Microsoft.Office.Core.MsoCTPDockPosition.msoCTPDockPositionRight;

            //You can also restrict the docking position change.
            TaskPane.DockPositionRestrict = Microsoft.Office.Core.MsoCTPDockPositionRestrict.msoCTPDockPositionRestrictNone;
        }
コード例 #10
0
ファイル: ThisAddIn.cs プロジェクト: NCIP/cadsr-cgmdr
 public void AddQueryServiceTaskPane()
 {
     if (myCustomTaskPane == null)
     {
         queryServiceControl = new ExcelQueryServiceControl();
         myCustomTaskPane = this.CustomTaskPanes.Add(queryServiceControl, "Query Service Control");
         myCustomTaskPane.DockPosition = Microsoft.Office.Core.MsoCTPDockPosition.msoCTPDockPositionRight;
         myCustomTaskPane.Width = 300;
         myCustomTaskPane.Visible = true;
     }
     else if (myCustomTaskPane.Visible == false)
     {
         myCustomTaskPane.Visible = true;
     }
 }
コード例 #11
0
ファイル: ThisAddIn.cs プロジェクト: negabaro/alfresco
 public void AddAlfrescoTaskPane(Microsoft.Office.Interop.Word.Document Doc)
 {
     if (bNoDocuments == false)
     {
         myUserControl1 = new UserControl1();
         if (Doc != null)
         {
             myCustomTaskPane = this.CustomTaskPanes.Add(myUserControl1, "Alfresco Task Pane");
         }
         else
         {
             myCustomTaskPane = this.CustomTaskPanes.Add(myUserControl1, "Alfresco Task Pane");
         }
         myCustomTaskPane.Width = 300;
         myCustomTaskPane.Visible = true;
         myUserControl1.AlfServer = strAlfServer;
     }
 }
コード例 #12
0
ファイル: ThisAddIn.cs プロジェクト: Moozz/TinkerBell
        private void ThisAddIn_Startup(object sender, System.EventArgs e)
        {
            taskPaneControl1 = new TinkerBell.MainWindow();

            UserControl userControl1 = new UserControl();

            // Create the ElementHost control for hosting the
            // WPF UserControl.
            ElementHost host = new ElementHost();
            host.Dock = DockStyle.Fill;
            host.Child = taskPaneControl1;

            userControl1.Controls.Add(host);

            taskPaneValue = this.CustomTaskPanes.Add(
                userControl1, "TinkerBell");
            taskPaneValue.Width = 450;
            taskPaneValue.VisibleChanged +=
                new EventHandler(taskPaneValue_VisibleChanged);
        }
コード例 #13
0
        private void InitMainTaskPan()
        {
            Microsoft.Office.Tools.CustomTaskPane pan = null;
            string key = string.Format("{0}({1})", "RuntimeInfo", Globals.ThisAddIn.Application.ActiveWindow.Hwnd);

            if (!Config.TaskPans.ContainsKey(key))
            {
                m_MainTaskPan = new Controls.CustomPans.MainPanHost();
                m_MainTaskPan.BindWorkbook = Common.ActiveBook;
                pan = Globals.ThisAddIn.CustomTaskPanes.Add(m_MainTaskPan, "辅助面板[" + Globals.ThisAddIn.Application.ActiveWindow.Hwnd.ToString() + "]");
                pan.DockPosition         = Microsoft.Office.Core.MsoCTPDockPosition.msoCTPDockPositionRight;
                pan.DockPositionRestrict = Microsoft.Office.Core.MsoCTPDockPositionRestrict.msoCTPDockPositionRestrictNoChange;
                pan.Width            = 300;
                Config.TaskPans[key] = pan;
            }
            else
            {
                pan = Config.TaskPans[key];
            }
            pan.Visible = true;
        }
コード例 #14
0
        private void ThisAddIn_Startup(object sender, System.EventArgs e)
        {
            DB.Give_login_Data_pls_thx(Properties.Settings.Default.Database_Name, Properties.Settings.Default.Database_IP, Properties.Settings.Default.Database_Port, Properties.Settings.Default.Database_Login_Name, Properties.Settings.Default.Database_Login_Password);
            try
            {
                SQL_methods.Open();


                uC_Main_Task_Pane = new UC_Main_Task_Pane();
                CTP_Main          = this.CustomTaskPanes.Add(uC_Main_Task_Pane, "Aufträge:");
                CTP_Main.Visible  = true;
                CTP_Main.Width    = 400;

                Named_Pipes.Start();
            }
            catch (Exception exception)
            {
                MessageBox.Show("Connection to DB failed:" + exception.Message, "Warnung", MessageBoxButtons.OK, MessageBoxIcon.Error);
                Form_parameter from_param = new Form_parameter();
                from_param.Show();
            }
        }
コード例 #15
0
        private void ThisAddIn_Startup(object sender, System.EventArgs e)
        {
            /**
             * This section from https://msdn.microsoft.com/en-us/library/bb296010.aspx is for the
             * case where the add in is loaded after outlook is already up, which I don't believe is
             * a use case we need to support, but leave this in case.
             */
            inspectors = this.Application.Inspectors;
            inspectors.NewInspector +=
                new Outlook.InspectorsEvents_NewInspectorEventHandler(
                    Inspectors_NewInspector);

            currentExplorer = this.Application.ActiveExplorer();

            foreach (Outlook.Inspector inspector in inspectors)
            {
                Inspectors_NewInspector(inspector);
            }


            /*
             * create the explorer tagBar
             */
            this.explorerTagBar          = new TagBar();
            this.explorerTagBarDecorator = new OutlookTagBarDecorator(this, explorerTagBar, new OutlookTagBarContext(this.globalTaggingContext));
            explorerTagBar.SetTagBarHelper(this.explorerTagBarDecorator);
            explorerCustomTaskPane = this.CustomTaskPanes.Add(explorerTagBar, "Explorer Tag Bar");
            explorerCustomTaskPane.DockPosition = Office.MsoCTPDockPosition.msoCTPDockPositionTop;
            explorerCustomTaskPane.Height       = 57;
            explorerTagBar.LoadTagList(Utils.GetLatestTagList());
            explorerCustomTaskPane.Visible = true;

            // explorer event
            currentExplorer = this.Application.ActiveExplorer();
            currentExplorer.SelectionChange += new Outlook.ExplorerEvents_10_SelectionChangeEventHandler(CurrentExplorer_SelectionChanged);

            // inspector event
            logger.Debug("WOOHOO Started Addin...");
        }
コード例 #16
0
        private void ThisAddIn_Startup(object sender, System.EventArgs e)
        {
            dbStrategy = new SqliteDBStrategy();

            dashboardUserControl     = new DashBrdUserControl(dbStrategy);
            myCustomTaskPane         = this.CustomTaskPanes.Add(dashboardUserControl, "ExcelPro1");
            myCustomTaskPane.Width   = 300;
            myCustomTaskPane.Visible = true;

            myCustomTaskPane.VisibleChanged += MyCustomTaskPane_VisibleChanged;

            itemUserControl      = new ItemUserControl1(dbStrategy);
            myItemCustomTaskPane = this.CustomTaskPanes.Add(itemUserControl, "Item List");
            myItemCustomTaskPane.DockPosition = Office.MsoCTPDockPosition.msoCTPDockPositionBottom;
            myItemCustomTaskPane.Height       = 350;
            myItemCustomTaskPane.Visible      = false;


            addItemUserControl      = new UI.AddItemUserControl1(dbStrategy);
            myAddItemCustomTaskPane = this.CustomTaskPanes.Add(addItemUserControl, "Add Item");
            myAddItemCustomTaskPane.DockPosition = Office.MsoCTPDockPosition.msoCTPDockPositionRight;
            myAddItemCustomTaskPane.Width        = 300;
            myAddItemCustomTaskPane.Visible      = false;
        }
コード例 #17
0
        void app_DocumentBeforeClose(Word.Document Doc, ref bool Cancel)
        {
            // NET 4 way; see http://msdn.microsoft.com/en-us/library/microsoft.office.tools.word.extensions.aspx
            Document extendedDocument = Globals.Factory.GetVstoObject(Globals.ThisAddIn.Application.ActiveDocument);

            // NET 3.5 way, which requires using Microsoft.Office.Tools.Word.Extensions
            //Document extendedDocument = Application.ActiveDocument.GetVstoObject(Globals.Factory);
            try {
                log.Debug(" = " + extendedDocument.Name);
            } catch (Microsoft.VisualStudio.Tools.Applications.Runtime.ControlNotFoundException) {
                // Too late, its gone...
              /*
                Message=This document might not function as expected because the following control is missing: ThisDocument.
               * Data that relies on this control will not be automatically displayed or updated, and other custom functionality
               * will not be available. Contact your administrator or the author of this document for further assistance.
                  Source=Microsoft.Office.Tools.Word.Implementation
                  StackTrace:
                       at Microsoft.Office.Tools.Word.DocumentImpl.GetObjects()
                       at Microsoft.Office.Tools.Word.DocumentImpl.GetPrimaryControl()
                       at Microsoft.Office.Tools.Word.DocumentImpl.get_Name()
                       at OpenDope_AnswerFormat.ThisAddIn.app_DocumentBeforeClose(Document Doc, Boolean& Cancel) in C:\Users\jharrop\Documents\Visual Studio 2010\Projects\OpenDope_Author_NoXML\trunk\OpenDope_AnswerFormat\OpenDope_AnswerFormat\ThisAddIn.cs:line 158
                  InnerException: System.NullReferenceException
                       HResult=-2147467261
                       Message=Object reference not set to an instance of an object.
                       Source=Microsoft.VisualStudio.Tools.Office.Runtime
                       StackTrace:
                            at Microsoft.VisualStudio.Tools.Office.Runtime.DomainCreator.ExecuteCustomization.Microsoft.Office.Tools.IHostItemProvider.GetHostObject(Type primaryType, String primaryCookie)
                            at Microsoft.Office.Tools.Word.DocumentImpl.GetObjects()
               */

            }

            if (extendedDocument.Tag != null
                && extendedDocument.Tag is FabDocxState) {

                pendingCloseCTP = ((FabDocxState)extendedDocument.Tag).TaskPane;
                log.Debug(".. taskpane identified for closing");
            }
            else
            {
                log.Debug(".. no associated taskpane to close");
            }

            Ribbon.myInvalidate();
        }
コード例 #18
0
ファイル: ThisAddIn.cs プロジェクト: techlatest/TagUI
 private void ThisAddIn_Startup(object sender, System.EventArgs e)
 {
     tagUITaskPane1           = new TagUITaskPane();
     myCustomTaskPane         = this.CustomTaskPanes.Add(tagUITaskPane1, "TagUI RPA");
     myCustomTaskPane.Visible = true;
 }
コード例 #19
0
        /*
         * Bug: if you cancel the close dialog on a docx which has a ctp,
         * and then close some other docx (which also has a ctp, since event
         * only fires in that case); the ctp belonging to the first
         * docx will be closed!
         *
         * May be able to prevent this by storing a reference to the docx
         * in the ctp, then doing something like doc.Name.
         * If this throws exception "Object has been deleted", then
         * we know we're good to close the CTP.  If it doesn't,
         * then it is probably the wrong document.
         *
         * Implemented this.  But in hindsight, it shouldn't be
         * a problem, because extendedDocument_Shutdown should
         * only fire for docx which has a wedtaskpane.
         *
         * But maybe there are exotic cases, so keep the code...
         */
        /// <summary>
        /// Close the Custom Task Pane when the docx closes
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        public void extendedDocument_Shutdown(object sender, EventArgs e)
        {
            System.Diagnostics.Trace.WriteLine("in document shutdown");

            // sender is Microsoft.Office.Tools.Word.DocumentImpl

            //Document documentClosing = (Document)sender;
            //log.Debug("Document closing: " + documentClosing.Name); // Object has been deleted

            if (pendingCloseCTP != null)
            {
                try
                {
                    removeTaskPane(pendingCloseCTP);
                    pendingCloseCTP = null;
                    //WedTaskPane wedTaskPane = (WedTaskPane)pendingCloseCTP.Control;
                    //string foo = wedTaskPane.associatedDocument.Name;
                    //log.Debug(".. cowardly refusing to close taskpane!");
                }
                catch (Exception ex)
                {
                    log.Error(ex.Message);
                    //removeTaskPane(pendingCloseCTP);
                    //pendingCloseCTP = null;
                    //log.Debug(".. taskpane also closed");
                }
            }
            else
            {
                log.Debug(".. no associated taskpane to close");
            }
        }
コード例 #20
0
 private void ThisAddIn_Startup(object sender, System.EventArgs e)
 {
     helpTaskPane              = Globals.ThisAddIn.CustomTaskPanes.Add(new UserControl2(), "Excel Help");
     helpTaskPane.Visible      = true;
     helpTaskPane.DockPosition = Office.MsoCTPDockPosition.msoCTPDockPositionLeft;
 }
コード例 #21
0
ファイル: ThisAddIn.cs プロジェクト: NCIP/cadsr-cgmdr-nci-uk
 public void AddQueryServiceTaskPane(InfoPath.Window _window)
 {
     if (ctpTaskPane == null)
     {
         ctpTaskPane = this.CustomTaskPanes.Add(new InfoPathQueryServiceControl(), "Query Service Control", _window);
     }
     ctpTaskPane.Visible = true;
 }
コード例 #22
0
ファイル: ThisAddIn.cs プロジェクト: yxjin/PnP-OfficeAddins
 private void ThisAddIn_Startup(object sender, System.EventArgs e)
 {
     this.control          = new CellAnalyzerPane();
     this.taskpane         = this.CustomTaskPanes.Add(this.control, "Cell Analyzer");
     this.taskpane.Visible = true;
 }
コード例 #23
0
ファイル: ThisAddIn.cs プロジェクト: jonashatschek/Fabify
 public void CreateUI()
 {
     myUserControl1           = new MyUserControl();
     myCustomTaskPane         = this.CustomTaskPanes.Add(myUserControl1, "Fabify");
     myCustomTaskPane.Visible = true;
 }
コード例 #24
0
        private void ThisAddIn_Startup(object sender, System.EventArgs e)
        {
            // Custom context menu item event managed
            this.Application.ItemContextMenuDisplay += new Microsoft.Office.Interop.Outlook.ApplicationEvents_11_ItemContextMenuDisplayEventHandler(MenuItem_ItemContextMenuDisplay);

            slxUserControl = new CustomTaskPane.SLX_UserControl();
            slxTaskPane = this.CustomTaskPanes.Add(slxUserControl, "SalesLogix");
            slxTaskPane.Visible = true;
            slxTaskPane.Width = 290;

            activeExplorer = this.Application.ActiveExplorer();

            activeExplorer.SelectionChange += new Outlook.ExplorerEvents_10_SelectionChangeEventHandler(activeExplorer_SelectionChange);

            selectExplorers = this.Application.Explorers;

            selectExplorers.NewExplorer += new Outlook
                .ExplorersEvents_NewExplorerEventHandler(newExplorer_Event);

            AddToolbar();
        }
コード例 #25
0
 private void ThisAddIn_Startup(object sender, System.EventArgs e)
 {
     myPane         = this.CustomTaskPanes.Add(new DataSidePanel(), "Data Panel");
     myPane.Visible = true;
 }
コード例 #26
0
ファイル: ThisAddIn.cs プロジェクト: m24murray/OutlookAddIn1
        // attaches an event handler for newInspector event
        private void ThisAddIn_Startup(object sender, System.EventArgs e)
        {
            Logger.Log("ThisAddIn Starting up");
            inspectors = this.Application.Inspectors; // current instance of office
            inspectors.NewInspector +=
            new Microsoft.Office.Interop.Outlook.InspectorsEvents_NewInspectorEventHandler(Inspectors_NewInspector);

            // set up task pane
            _taskPane = this.CustomTaskPanes.Add(new UserControl1(), "Matt Test");
            _taskPane.Visible = true;
            Logger.Log("Task pane set up");
        }
コード例 #27
0
ファイル: ThisAddIn.cs プロジェクト: techlatest/TagUI
 private void ThisAddIn_Startup(object sender, System.EventArgs e)
 {
     myUserControl1           = new TagUIExcelAddInTaskPane();
     myCustomTaskPane         = this.CustomTaskPanes.Add(myUserControl1, "TagUI RPA");
     myCustomTaskPane.Visible = true;
 }
コード例 #28
0
ファイル: ThisAddIn.cs プロジェクト: Tubbz-alt/EnPI
        public void wizardInit(int step)
        {
            WizardControl wControl = new WizardControl(step);

            wizardPane = this.CustomTaskPanes.Add(wControl, "EnPI Step-by-step Wizard");
        }
コード例 #29
0
ファイル: ThisAddIn.cs プロジェクト: Tubbz-alt/EnPI
 private void Application_WorkbookBeforeClose(Excel.Workbook Wb, ref bool Cancel)
 {
     this.CustomTaskPanes.Remove(wizardPane);
     wizardPane = this.CustomTaskPanes.SingleOrDefault();
 }
コード例 #30
0
        private void ThisAddIn_Startup(object sender, System.EventArgs e)
        {
            myUserControl = new printeco_excel_usercontrol();
            myCustomTaskPane = this.CustomTaskPanes.Add(myUserControl, "PrintEco");
            myCustomTaskPane.DockPosition = Office.MsoCTPDockPosition.msoCTPDockPositionLeft;

            CheckIfMenuBarExists();
            AddMenuBar();
            // addFileCommand();
        }
コード例 #31
0
 /// <summary>
 /// Fired when the CustomTaskPane visibility changes
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 void CustomTaskPane_VisibleChanged(object sender, EventArgs e)
 {
     // Update the ribbon button to reflect the new state
     Microsoft.Office.Tools.CustomTaskPane customTaskPane = (Microsoft.Office.Tools.CustomTaskPane)sender;
     m_Ribbon.ToggleAlfrescoState = customTaskPane.Visible;
 }
コード例 #32
0
ファイル: ThisAddIn.cs プロジェクト: vslab/LiXcel
 private void ThisAddIn_Startup(object sender, System.EventArgs e)
 {
     var taskPaneView = new TaskPaneView();
     _taskPane = this.CustomTaskPanes.Add(taskPaneView, "LiXcel");
     _taskPane.Visible = true;
 }
コード例 #33
0
        /// <summary>
        /// Show the Alfresco pane
        /// </summary>
        /// <param name="Show"></param>
        private void ShowAlfrescoPane()
        {
            // Try to get active document
            Word.Document activeDoc = null;
            try
            {
                activeDoc = this.Application.ActiveDocument;
            }
            catch
            {
                activeDoc = null;
            }

            // Check Word UI mode
            if (this.Application.ShowWindowsInTaskbar)
            {
                // Multiple window mode
                Microsoft.Office.Tools.CustomTaskPane customTaskPane = this.FindActiveTaskPane();
                if (customTaskPane == null)
                {
                    AlfrescoPane alfrescoPane = new AlfrescoPane();
                    alfrescoPane.WordApplication = this.Application;
                    alfrescoPane.DefaultTemplate = "wcservice/office/";
                    customTaskPane = CustomTaskPanes.Add(alfrescoPane, "Alfresco");
                    try
                    {
                        if (Application.ActiveDocument != null)
                        {
                            alfrescoPane.OnDocumentChanged();
                        }
                        else
                        {
                            alfrescoPane.showHome(false);
                        }
                    }
                    catch
                    {
                        // Almost certainlty as a result of no active document
                        alfrescoPane.showHome(false);
                    }
                }
                customTaskPane.Visible         = true;
                customTaskPane.Width           = ALFRESCO_PANE_WIDTH;
                customTaskPane.VisibleChanged += new EventHandler(CustomTaskPane_VisibleChanged);
            }
            else
            {
                // Single window mode
            }

            /*
             * if (m_CustomTaskPane == null)
             * {
             * m_CustomTaskPane = CustomTaskPanes.Add(m_AlfrescoPane, "Alfresco");
             * m_CustomTaskPane.VisibleChanged += new EventHandler(CustomTaskPane_VisibleChanged);
             * }
             *
             * if (m_AlfrescoPane == null)
             * {
             * m_AlfrescoPane = new AlfrescoPane();
             * m_AlfrescoPane.WordApplication = Application;
             * m_AlfrescoPane.DefaultTemplate = "wcservice/office/";
             * }
             *
             * if (Show)
             * {
             * AddCustomTaskPane();
             * m_CustomTaskPane.Visible = true;
             * m_CustomTaskPane.Width = ALFRESCO_PANE_WIDTH;
             * m_AlfrescoPane.Show();
             * if (Application.ActiveDocument != null)
             * {
             *    m_AlfrescoPane.OnDocumentChanged();
             * }
             * else
             * {
             *    m_AlfrescoPane.showHome(false);
             * }
             * }
             */
        }
コード例 #34
0
 private void ThisAddIn_Startup(object sender, System.EventArgs e)
 {
     _taskPane         = this.CustomTaskPanes.Add(new SimpleControl(), "Contoso");
     _taskPane.Visible = true;
 }
コード例 #35
0
 private void ThisAddIn_Startup(object sender, System.EventArgs e)
 {
     _view                     = new MasterView();
     _myCustomTaskPane         = this.CustomTaskPanes.Add(_view, "Denna");
     _myCustomTaskPane.Visible = true;
 }
コード例 #36
0
 private void ThisAddIn_Startup(object sender, System.EventArgs e)
 {
     tagListControl        = new TagListControl();
     tagListTaskPane       = this.CustomTaskPanes.Add(tagListControl, "RSML Tag Selection");
     tagListTaskPane.Width = 250;
 }
コード例 #37
0
ファイル: ThisAddIn.cs プロジェクト: jetlive/skiaming
 private void ThisAddIn_Startup(object sender, System.EventArgs e)
 {
     _taskPane = this.CustomTaskPanes.Add(new SimpleControl(), "Contoso");
     _taskPane.Visible = true;
 }
コード例 #38
0
 internal void ThisAddIn_Startup(object sender, System.EventArgs e)
 {
     taskPane       = this.CustomTaskPanes.Add(new TaskPaneInterface(), "Chemistry Report Checker");
     taskPane.Width = 400;
 }
コード例 #39
0
        private void ThisAddIn_Startup(object sender, System.EventArgs e)
        {
            try
            {
                if (this.Application.Caption.IndexOf("LGSL+") > -1)
                {
                    var width = 0;



                    //USERCONTROL DE GAUCHE AVEC TABLE LAYOUT PANNEL
                    myUserControl1 = new InterfaceVert();
                    //set Width du au UserControl Docking

                    width            = myUserControl1.Width;
                    myCustomTaskPane = this.CustomTaskPanes.Add(myUserControl1, "XLApp");

                    //set Width du au UserControl Docking
                    myCustomTaskPane.Width = width;

                    myCustomTaskPane.DockPosition =
                        Office.MsoCTPDockPosition.msoCTPDockPositionLeft;

                    myCustomTaskPane.DockPositionRestrict = Office.MsoCTPDockPositionRestrict.msoCTPDockPositionRestrictNoChange;

                    myCustomTaskPane.VisibleChanged +=
                        new EventHandler(myCustomTaskPane_VisibleChanged);

                    //////myCustomTaskPane.Visible = true;
                    Globals.Ribbons.ManageTaskPaneRibbon.toggleButton1.Checked = myCustomTaskPane.Visible;
                    if (this.Application.Caption.IndexOf("LGSL+") > -1)
                    {
                        this.Application.Run("ShowOrHideUserControlCheckBoxInCSharp");                                                 //met myUserControl1 visible
                    }
                    //FIN USERCONTROL DE GAUCHE AVEC TABLE LAYOUT PANNEL

                    //TEST NEW USERCONTROL InterfaceData :
                    myUserControlInterfaceData = new VerifProjet();
                    width = myUserControlInterfaceData.Width;
                    myCustomTaskPaneInterfaceData = this.CustomTaskPanes.Add(myUserControlInterfaceData, "Data applicatif");

                    //set Width du au UserControl Docking
                    myCustomTaskPaneInterfaceData.Width = width;

                    myCustomTaskPaneInterfaceData.DockPosition =
                        Office.MsoCTPDockPosition.msoCTPDockPositionLeft;

                    myCustomTaskPaneInterfaceData.DockPositionRestrict = Office.MsoCTPDockPositionRestrict.msoCTPDockPositionRestrictNoChange;

                    myCustomTaskPaneInterfaceData.VisibleChanged +=
                        new EventHandler(myCustomTaskPaneInterfaceData_VisibleChanged);
                    //myCustomTaskPaneVerificationProjetTemp.VisibleChanged +=
                    //    new EventHandler(myCustomTaskPaneVerificationProjetTemp_VisibleChanged);
                    //FIN TEST


                    //TEST InteractSousTraitant :
                    myUserControlInterfaceSousTrait = new InteractSousTrait();
                    width = myUserControlInterfaceSousTrait.Width;
                    myCustomTaskPaneInterfaceSousTrait = this.CustomTaskPanes.Add(myUserControlInterfaceSousTrait, " ");

                    //set Width du au UserControl Docking
                    myCustomTaskPaneInterfaceSousTrait.Width = width;

                    myCustomTaskPaneInterfaceSousTrait.DockPosition =
                        Office.MsoCTPDockPosition.msoCTPDockPositionLeft;

                    myCustomTaskPaneInterfaceSousTrait.DockPositionRestrict = Office.MsoCTPDockPositionRestrict.msoCTPDockPositionRestrictNoChange;

                    myCustomTaskPaneInterfaceSousTrait.VisibleChanged +=
                        new EventHandler(myCustomTaskPaneInterfaceSousTrait_VisibleChanged);
                    //FIN TEST


                    //TEST NEW USERCONTROL VERIFPROJET :
                    myUserControlVerificationProjet = new VerifProjet();
                    width = myUserControlVerificationProjet.Width;
                    myCustomTaskPaneVerificationProjet = this.CustomTaskPanes.Add(myUserControlVerificationProjet, "Vérification rapide");

                    //set Width du au UserControl Docking
                    myCustomTaskPaneVerificationProjet.Width = width;

                    myCustomTaskPaneVerificationProjet.DockPosition =
                        Office.MsoCTPDockPosition.msoCTPDockPositionRight;

                    myCustomTaskPaneVerificationProjet.DockPositionRestrict = Office.MsoCTPDockPositionRestrict.msoCTPDockPositionRestrictNoChange;

                    myCustomTaskPaneVerificationProjet.VisibleChanged +=
                        new EventHandler(myCustomTaskPaneVerificationProjet_VisibleChanged);
                    //FIN TEST


                    //// TEST USERCONTROL WPF
                    myUserControlWPF = new UserControl2(); // UserContron2.cs
                    width            = myUserControlWPF.Width;
                    int height = myUserControlWPF.Height;
                    myCustomTaskPaneWPFEstImp = this.CustomTaskPanes.Add(myUserControlWPF, "XLApp - Estimation imposition");

                    myCustomTaskPaneWPFEstImp.DockPosition = Office.MsoCTPDockPosition.msoCTPDockPositionFloating;
                    //myUserControlWPF.SizeChanged -= UserControl2_SizeChanged;
                    myCustomTaskPaneWPFEstImp.Height = height + 45;
                    myCustomTaskPaneWPFEstImp.Width  = width + 15;

                    myCustomTaskPaneWPFEstImp.DockPositionRestrict = Office.MsoCTPDockPositionRestrict.msoCTPDockPositionRestrictNoChange;

                    myCustomTaskPaneWPFEstImp.Control.SizeChanged += new EventHandler(Control_SizeChanged);
                    //myCustomTaskPaneWPF.Control.MinimumSize = new System.Drawing.Size(100, 100);
                    //myCustomTaskPaneWPF.Control.MaximumSize = new System.Drawing.Size(myCustomTaskPaneWPF.Width, myCustomTaskPaneWPF.Height);


                    //SetCustomPanePositionWhenFloating(myCustomTaskPaneWPF, (int)this.Application.Left, (int)this.Application.Top);
                    //myCustomTaskPaneWPF.DockPositionRestrict = Office.MsoCTPDockPositionRestrict.msoCTPDockPositionRestrictNoChange;

                    //myCustomTaskPaneWPF.VisibleChanged +=
                    //        new EventHandler(myCustomTaskPaneWPF_VisibleChanged);
                    //FIN TEST

                    //pour image custom:
                    defineCustomCommandBarImages();
                }
                else
                {
                    AddInUtilities.UnConnectAddin();
                    //AddInUtilities.InitiateFirstLaunch();
                }
            }
            catch
            {
            }
        }
コード例 #40
0
 private void ThisAddIn_Startup(object sender, System.EventArgs e)
 {
     _taskPane         = this.CustomTaskPanes.Add(new pane(), "LawByYourSide");
     _taskPane.Visible = true;
 }
コード例 #41
0
        //</Snippet4>

        //<Snippet5>
        private void ThisAddIn_Startup(object sender, System.EventArgs e)
        {
            myUserControl1           = new MyUserControl();
            myCustomTaskPane         = this.CustomTaskPanes.Add(myUserControl1, "Calendar");
            myCustomTaskPane.Visible = true;
        }
コード例 #42
0
ファイル: TestRibbon.cs プロジェクト: caerang/TIL
 public void OnCustomTaskPane(Office.IRibbonControl control)
 {
     myUserControl1 = new MyUserControl();
     myCustomTaskPane = Globals.ThisAddIn.CustomTaskPanes.Add(myUserControl1, "Calendar");
     myCustomTaskPane.Visible = true;
 }
コード例 #43
0
ファイル: ThisAddIn.cs プロジェクト: flomey/LawByYourSide
 private void ThisAddIn_Startup(object sender, System.EventArgs e)
 {
     _taskPane = this.CustomTaskPanes.Add(new pane(), "LawByYourSide");
     _taskPane.Visible = true;
 }
コード例 #44
0
 private void ThisAddIn_Startup(object sender, System.EventArgs e)
 {
     taskPane         = this.CustomTaskPanes.Add(new UserControl1(), "My Task Pane");
     taskPane.Visible = true;
 }
コード例 #45
0
 private void ThisAddIn_Startup(object sender, System.EventArgs e)
 {
     VariablePane         = this.CustomTaskPanes.Add(VariableControl, "文档内部变量");
     VariablePane.Visible = false;
 }
コード例 #46
0
 private void ThisAddIn_Startup(object sender, System.EventArgs e)
 {
     MyPanel         = this.CustomTaskPanes.Add(new Panel(), "Side Panel");
     MyPanel.Width   = 800;
     MyPanel.Visible = false;
 }
コード例 #47
0
ファイル: ThisAddIn.cs プロジェクト: MiguelRa/OfficeGengo
        // addin startup event handler. Here we initialize and show the task pane.
        private void ThisAddIn_Startup(object sender, System.EventArgs e)
        {
            // create and show myCustomTaskPane
            ucTranslationPanel = new UCTranslationPanel();
            tpTranslationPanel = this.CustomTaskPanes.Add(ucTranslationPanel, _taskPaneTitle);
            tpTranslationPanel.DockPosition = Office.MsoCTPDockPosition.msoCTPDockPositionRight;
            tpTranslationPanel.DockPositionRestrict = Office.MsoCTPDockPositionRestrict.msoCTPDockPositionRestrictNoHorizontal;
            tpTranslationPanel.Width = widthTaskPaneDocked;
            tpTranslationPanel.Visible = true;
            tpTranslationPanel.VisibleChanged += new EventHandler(taskPaneValue_VisibleChanged);
            tpTranslationPanel.DockPositionChanged += new EventHandler(myCustomTaskPane_DockPositionChanged);

            // add menu item to View menu
            // * get View Menu
            string viewMenuID = "30004";
            Office.CommandBarPopup viewMenu = (Office.CommandBarPopup)this.Application.ActiveExplorer().
                                                CommandBars.ActiveMenuBar.FindControl(Office.MsoControlType.msoControlPopup,
                                                                viewMenuID, Type.Missing, true, true);

            // * add menu item
            miToogleTranslationPanel = (Office.CommandBarButton)viewMenu.Controls.Add(Office.MsoControlType.msoControlButton, missing,
                                                                            missing, 1, true);
            //miToogleTranslationPanel.Style = Office.MsoButtonStyle.msoButtonIconAndCaption;
            miToogleTranslationPanel.Caption = _viewMenuItemText;
            miToogleTranslationPanel.FaceId = 65;
            miToogleTranslationPanel.Tag = "c123";
            miToogleTranslationPanel.State = Office.MsoButtonState.msoButtonDown;
            miToogleTranslationPanel.Click += new Office._CommandBarButtonEvents_ClickEventHandler(viewTaskPane_Click);
        }
コード例 #48
0
ファイル: Soylent.cs プロジェクト: tummykung/soylent
        void Application_DocumentChange()
        {
            Word.Document doc = this.Application.ActiveDocument;
            // If the document is already open, don't worry about it.  If not (e.g. created a new document, loaded old), set up its panel
            if (!soylentMap.Keys.Contains<Word.Document>(doc)){
                SoylentPanel soylent = new SoylentPanel();

                HITView = this.CustomTaskPanes.Add(soylent, "Soylent");
                HITView.VisibleChanged += new EventHandler(hitviewVisibleChanged);
                //HITView.Visible = true;

                addDocToMap(soylent);
            }
        }