|
5#
楼主 |
发表于 2014-2-25 10:02:46
|
只看该作者
本帖最后由 faunus 于 2014-2-25 10:06 编辑
【调用过程-1】
@@入口
ThisAddIn(global::Microsoft.Office.Tools.Excel.ApplicationFactory factory, global::System.IServiceProvider serviceProvider)
//AddInBase==>protected AddInBase(Factory factory, IServiceProvider serviceProvider, string primaryCookie, string identifier);
: base(factory, serviceProvider, "AddIn", "ThisAddIn")
@@初始:构造函数
ThisAddIn-开始A!
//Globals.Factory==>private static global::Microsoft.Office.Tools.Excel.ApplicationFactory _factory
//factory==>global::Microsoft.Office.Tools.Excel.ApplicationFactory factory
Globals.Factory = factory;
ThisAddIn-结束A!
@@事件:Initialize
Initialize-开始A!
//调用基类
base.Initialize();
//创建Ribbon
public RibbonTestA(): base(Globals.Factory.GetRibbonFactory())
InitializeComponent();
public RibbonTestB(): base(Globals.Factory.GetRibbonFactory())
InitializeComponent();
//ThisAddIn.Application==>internal Microsoft.Office.Interop.Excel.Application Application;
//AddInBase==>protected T GetHostItem<T>(Type type, string cookie) where T : class;
this.Application = this.GetHostItem<Microsoft.Office.Interop.Excel.Application>(typeof(Microsoft.Office.Interop.Excel.Application), "Application");
//Globals.ThisAddIn==>private static ThisAddIn _ThisAddIn;
Globals.ThisAddIn = this;
//Enables visual styles for the application.
//Application==>public static void EnableVisualStyles();
global::System.Windows.Forms.Application.EnableVisualStyles();
//InitializeCachedData
InitializeCachedData-开始A!
if ((this.DataHost == null))
{
return;
}
if (this.DataHost.IsCacheInitialized) {
this.DataHost.FillCachedData(this);
}
InitializeCachedData-结束A!
//InitializeControls
InitializeControls-开始A!
//ThisAddIn.CustomTaskPanes==>internal Microsoft.Office.Tools.CustomTaskPaneCollection CustomTaskPanes;
//ThisAddIn.Factory==>private static global::Microsoft.Office.Tools.Excel.ApplicationFactory _factory;
//interface Factory==>CustomTaskPaneCollection CreateCustomTaskPaneCollection(IServiceProvider serviceProvider, IHostItemProvider hostItemProvider, string primaryCookie, string identifier, object containerComponent);
this.CustomTaskPanes = Globals.Factory.CreateCustomTaskPaneCollection(null, null, "CustomTaskPanes", "CustomTaskPanes", this);
//ThisAddIn.VstoSmartTags==>internal Microsoft.Office.Tools.SmartTagCollection VstoSmartTags;
//ThisAddIn.Factory==>private static global::Microsoft.Office.Tools.Excel.ApplicationFactory _factory;
this.VstoSmartTags = Globals.Factory.CreateSmartTagCollection(null, null, "VstoSmartTags", "VstoSmartTags", this);
InitializeControls-结束A!
//InitializeComponents
InitializeComponents-开始A!
//暂无
InitializeComponents-结束A!
InitializeData
InitializeData-开始A!
//暂无
InitializeData-结束A!
Initialize-结束A!
@@事件:InitializeDataBindings
InitializeDataBindings-开始A!
//BeginInitialization-
BeginInitialization-开始A!
//AddInBase==>public virtual void BeginInit();
this.BeginInit();
//interface CustomTaskPaneCollection==>void BeginInit();
this.CustomTaskPanes.BeginInit();
//interface SmartTagCollection===>void BeginInit();
this.VstoSmartTags.BeginInit();
BeginInitialization-结束A!
//BindToData
BindToData-开始A!
//暂无
BindToData-结束A!
//EndInitialization
EndInitialization-开始A!
//interface SmartTagCollection==>void EndInit();
this.VstoSmartTags.EndInit();
//interface CustomTaskPaneCollection==>void EndInit();
this.CustomTaskPanes.EndInit();
//AddInBase==>public virtual void EndInit();
this.EndInit();
EndInitialization-结束A!
InitializeDataBindings-结束A!
|
|