static void beNotified(IntPtr notifyCode)
        {
            ScNotification notification = (ScNotification)Marshal.PtrToStructure(notifyCode, typeof(ScNotification));

            if (notification.Header.Code == (uint)NppMsg.NPPN_TBMODIFICATION)
            {
                PluginBase._funcItems.RefreshItems();
                WakaTimePackage.SetToolBarIcon();
            }
            else if (notification.Header.Code == (uint)NppMsg.NPPN_SHUTDOWN)
            {
                WakaTimePackage.PluginCleanUp();
                Marshal.FreeHGlobal(_ptrPluginName);
            }
            else
            {
                WakaTimePackage.OnNotification(notification);
            }
        }
Ejemplo n.º 2
0
 protected override void Run()
 {
     var package = new WakaTimePackage();
     package.Initialize();
 }
 static void setInfo(NppData notepadPlusData)
 {
     PluginBase.nppData = notepadPlusData;
     WakaTimePackage.CommandMenuInit();
 }