Exemplo n.º 1
0
        public virtual void CTPFactoryAvailable(object CTPFactoryInst)
        {
            try
            {
                if (null == CTPFactoryInst)
                {
                    Factory.Console.WriteLine("Warning: null argument received in CTPFactoryAvailable. argument name: CTPFactoryInst");
                    return;
                }

                CustomTaskPaneHandler paneHandler = new CustomTaskPaneHandler();
                paneHandler.ProceedCustomPaneAttributes(TaskPanes, Type, this, CallOnCreateTaskPaneInfo, AttributePane_VisibleStateChange, AttributePane_DockPositionStateChange);
                TaskPaneFactory = paneHandler.CreateCustomPanes <ITaskPane, Excel.Application>(Factory, CTPFactoryInst, TaskPanes, TaskPaneInstances, OnError, Application);
            }
            catch (NetRuntimeSystem.Exception exception)
            {
                Factory.Console.WriteException(exception);
                OnError(ErrorMethodKind.CTPFactoryAvailable, exception);
            }
        }
Exemplo n.º 2
0
        public virtual void CTPFactoryAvailable(object CTPFactoryInst)
        {
            try
            {
                if (null == CTPFactoryInst)
                {
                    Factory.Console.WriteLine("Warning: null argument recieved in CTPFactoryAvailable. argument name: CTPFactoryInst");
                    return;
                }

                CustomTaskPaneHandler paneHandler = new CustomTaskPaneHandler();
                paneHandler.ProceedCustomPaneAttributes(TaskPanes, Type, CallOnCreateTaskPaneInfo, AttributePane_VisibleStateChange, AttributePane_DockPositionStateChange);
                paneHandler.CreateCustomPanes<ITaskPane, MSProject.Application>(Factory, CTPFactoryInst, TaskPanes, TaskPaneInstances, OnError, Application);
            }
            catch (NetRuntimeSystem.Exception exception)
            {
                Factory.Console.WriteException(exception);
                OnError(ErrorMethodKind.CTPFactoryAvailable, exception);
            }
        }