static void beNotified(IntPtr notifyCode) { SCNotification nc = (SCNotification)Marshal.PtrToStructure(notifyCode, typeof(SCNotification)); if (nc.nmhdr.code == (uint)NppMsg.NPPN_TBMODIFICATION) { PluginBase._funcItems.RefreshItems(); PluginBase.SetToolBarIcon(); } else if (nc.nmhdr.code == (uint)SciMsg.SCN_CHARADDED) { PluginBase.doInsertHtmlCloseTag((char)nc.ch); } else if (nc.nmhdr.code == (uint)NppMsg.NPPN_SHUTDOWN) { PluginBase.PluginCleanUp(); Marshal.FreeHGlobal(_ptrPluginName); } }
private void SnippetInfo_MouseUp(object sender, MouseEventArgs e) { lock (this) { if (ManageMouseClickEvents) { m_selected = !m_selected; UpdateItemBackground(); } } frmAddSnippet window = ClientUtils.PrepareViewSnippetForm(PluginBase.Current, SnippetId) as frmAddSnippet; #if DOCKED PluginBase.OpenForm(window, PluginBase.VIEWSNIP_MENU_LABEL, PluginBase.ID_ADD_SNIPPET_CMD); #else window.Show(); #endif }
private void publishw_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) { string errorMsg = e.Result as string; progressBar.Visible = false; if (string.IsNullOrEmpty(errorMsg)) { ErrorTxt.Text = string.Empty; ErrorTxt.Visible = false; // Close the window PluginBase.CloseForm(this); } else { ErrorTxt.Text = errorMsg; ErrorTxt.Visible = true; } publishClicked = false; }
private void bgw_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) { AboutResultReport res = e.Result as AboutResultReport; progressBar.Visible = false; if (!res.newServer.Equals(res.oldServer, StringComparison.InvariantCultureIgnoreCase)) // we have changed something { User us = res.currentUser; IPluginManager thisPackage = PluginBase.Current; ClientUtils.CloseObsoleteFormsFromAbout(thisPackage); // cleanup and close obsolete objects if ((us == null) || (us.ID <= 0)) { string errorMsg = res.error; if (!errorMsg.IsNullOrWhiteSpaceOrEOF()) { SetError(errorMsg); // only display the message } else { // invalid login on the new server! ClientUtils.ManageInvalidLoginOnNewServerFromAbout(thisPackage, UserPlugin.Current, res.oldServer, res.newServer); // Close the window PluginBase.CloseForm(this); } UpdateClicked = false; return; } // save new server path UserPlugin.Current.SaveUserPreferences(); } UpdateClicked = false; }
static void setInfo(NppData notepadPlusData) { PluginBase.nppData = notepadPlusData; PluginBase.CommandMenuInit(); }
public static void About() { PluginBase.About(); }
public static void Login_Logout() { PluginBase.Login_Logout(); }
public static void SearchSnippets() { PluginBase.SearchSnip(); }
public static void AddSnippet() { PluginBase.AddSnip(); }
public static void Init() { PluginBase.CommandMenuInit(); }