Example #1
0
 //https://msdn.microsoft.com/zh-cn/library/bb687830.aspx
 //Called by Microsoft Excel whenever the XLL is deactivated. The add-in is deactivated when an Excel session ends normally. The add-in can be deactivated by the user during an Excel session, and this function will be called in that case.
 //Excel does not require an XLL to implement and export this function, although it is advisable so that your XLL can unregister functions and commands, release resources, undo customizations, and so on.If functions and commands are not explicitly unregistered by the XLL, Excel does this after calling the xlAutoClose function.
 public void AutoClose()
 {
     // The explicit Uninstall call was added in version 1.0.10,
     // to give us a chance to unhook the WinEvents (which needs to happen on the main thread)
     // No easy plan to do this from the AppDomain unload event, which runs on a ThreadPool thread.
     IntelliSenseServer.Uninstall();
 }
Example #2
0
        public void AutoClose()
        {
            // Dispose Mouse Hook
            MouseHook_Main.M_AppHook.Dispose();

            // Unsubribe ws/wb event
            AddinContext.XlApp.SheetDeactivate    -= XlAppEvent_SheetDeactivate;
            AddinContext.XlApp.WorkbookDeactivate -= XlAppEvent_WorkbookDeactivate;
            AddinContext.XlApp.WorkbookActivate   -= XlAppEvent_WorkbookActivate;

            // It is recommended to unattacth this IntelliSense server
            IntelliSenseServer.Uninstall();
            // Kill Shadow Excel Instance
            AddinContext.XlApp.Quit();
        }
        public void AutoClose()
        {
            IntelliSenseServer.Uninstall();
            Java.Dispose();
            WDSJniPMMLMenuToDelete.Delete(true);
            ExcelCommandBarUtil.UnloadCommandBars();

            __JniPMML            = null;
            Java                 = null;
            pair                 = null;
            java_class_path      = null;
            java_init_classid    = IntPtr.Zero;
            java_init_class_name = null;

            GC.Collect();
            GC.WaitForPendingFinalizers();
            GC.Collect();
            GC.WaitForPendingFinalizers();
        }
Example #4
0
 public void AutoClose()
 {
     IntelliSenseServer.Uninstall();
 }
 public override void Uninstall()
 {
     IntelliSenseServer.Uninstall();
 }
Example #6
0
 void IExcelAddIn.AutoClose()
 {
     IntelliSenseServer.Uninstall();
     Container.Instance.Dispose();
     Settings.Default.Save();
 }
Example #7
0
        public void AutoClose()
        {
#if !DEBUG
            IntelliSenseServer.Uninstall();
#endif
        }