Ejemplo n.º 1
0
        public void AutoOpen()
        {
            // Add Export Tables to SQL Custom Pane
            System.Windows.Forms.Application.EnableVisualStyles();
            XLIG.ExportTables.CTPManager.InitCTManager();
            // Enable IntelliSense for UDF
            IntelliSenseServer.Install();
            // Ref Current Excel App to Global Var for further usage
            AddinContext.XlApp = (Excel.Application)ExcelDnaUtil.Application;
            // Hook Mouse on First Load
            MouseHook_Main.M_AppHook = Hook.AppEvents();
            MouseHook_Main.Init_Unload(XLIG.Properties.Settings.Default.HScroll);

            // Hook ws event to Ctrl+Tab switch back to old sheet
            AddinContext.XlApp.SheetDeactivate    += XlAppEvent_SheetDeactivate;
            AddinContext.XlApp.WorkbookDeactivate += XlAppEvent_WorkbookDeactivate;
            AddinContext.XlApp.WorkbookActivate   += XlAppEvent_WorkbookActivate;
        }
Ejemplo n.º 2
0
 public void Toggle_HScroll_Control(IRibbonControl control1, bool pressed)
 {
     Settings.Default.HScroll = pressed;
     Settings.Default.Save();
     MouseHook_Main.Init_Unload(pressed);
 }