void NetOffice.Tools.Native.IDTExtensibility2.OnConnection(object application, ext_ConnectMode ConnectMode, object AddInInst, ref Array custom) { try { if (AttributeReflector.GetTweakAttribute(Type).Enabled == true) { string registryEndPoint = TryDetectHostRegistryKey(Application); if (null != registryEndPoint) { Tweaks.ApplyTweaks(Factory, this, Type, registryEndPoint, IsLoadedFromSystem); } } if (custom.Length > 0) { object firstCustomItem = custom.GetValue(1); string tryString = null != firstCustomItem?firstCustomItem.ToString() : String.Empty; System.Int32.TryParse(tryString, out _automationCode); } this.Application = Factory.CreateObjectFromComProxy(null, application, true); Utils = OnCreateUtils(); TryCreateCustomObject(AddInInst); RaiseOnConnection(Application, ConnectMode, AddInInst, ref custom); } catch (NetRuntimeSystem.Exception exception) { NetOffice.DebugConsole.Default.WriteException(exception); OnError(ErrorMethodKind.OnConnection, exception); } }
void IDTExtensibility2.OnStartupComplete(ref Array custom) { try { Tweaks.ApplyTweaks(Factory, this, Type, "Word"); RaiseOnStartupComplete(ref custom); } catch (NetRuntimeSystem.Exception exception) { NetOffice.DebugConsole.Default.WriteException(exception); OnError(ErrorMethodKind.OnStartupComplete, exception); } }
void IDTExtensibility2.OnStartupComplete(ref Array custom) { try { Tweaks.ApplyTweaks(Factory, this, Type, "Excel"); RaiseOnStartupComplete(ref custom); } catch (Exception exception) { Factory.Console.WriteException(exception); OnError(ErrorMethodKind.OnStartupComplete, exception); } }
void IDTExtensibility2.OnStartupComplete(ref Array custom) { try { Tweaks.ApplyTweaks(Factory, this, Type, "Excel", IsLoadedFromSystem); LoadingTimeElapsed = (DateTime.Now - _creationTime); RaiseOnStartupComplete(ref custom); } catch (Exception exception) { Factory.Console.WriteException(exception); OnError(ErrorMethodKind.OnStartupComplete, exception); } }
void IDTExtensibility2.OnConnection(object Application, ext_ConnectMode ConnectMode, object AddInInst, ref Array custom) { if (AttributeHelper.GetTweakAttribute(Type).Enabled == true) { string registryEndPoint = TryDetectHostRegistryKey(Application); if (null != registryEndPoint) { Tweaks.ApplyTweaks(Factory, this, Type, registryEndPoint); } } this.Application = Factory.CreateObjectFromComProxy(null, Application); RaiseOnConnection(Application, ConnectMode, AddInInst, ref custom); }
void IDTExtensibility2.OnStartupComplete(ref Array custom) { try { Tweaks.ApplyTweaks(Factory, this, Type, "PowerPoint", IsLoadedFromSystem); LoadingTimeElapsed = (DateTime.Now - _creationTime); RaiseOnStartupComplete(ref custom); } catch (NetRuntimeSystem.Exception exception) { NetOffice.DebugConsole.Default.WriteException(exception); OnError(ErrorMethodKind.OnStartupComplete, exception); } }
void IDTExtensibility2.OnStartupComplete(ref Array custom) { Tweaks.ApplyTweaks(Factory, this, Type, "Outlook"); RaiseOnStartupComplete(ref custom); }