public void SetCurrentLanguage(LangType language)
 {
     Win32.SendMessage(PluginBase.nppData._nppHandle, (uint)NppMsg.NPPM_SETCURRENTLANGTYPE, Unused, (int)language);
 }
 public void ClearIndicator()
 {
     Win32.SendMessage(PluginBase.nppData._nppHandle, (uint)Resource.NPPM_INTERNAL_CLEARINDICATOR, Unused, Unused);
 }
 public void FileNew()
 {
     Win32.SendMessage(PluginBase.nppData._nppHandle, (uint)NppMsg.NPPM_MENUCOMMAND, Unused, NppMenuCmd.IDM_FILE_NEW);
 }
示例#4
0
 public NotepadPPGateway FileExit()
 {
     Win32.SendMessage(PluginBase.nppData._nppHandle, (uint)NppMsg.NPPM_MENUCOMMAND, Unused, NppMenuCmd.IDM_FILE_EXIT);
     return(this);
 }
示例#5
0
 public NotepadPPGateway Open(string file)
 {
     Win32.SendMessage(PluginBase.nppData._nppHandle, (uint)NppMsg.NPPM_DOOPEN, Unused, file);
     return(this);
 }
示例#6
0
 IntPtr send(NppMsg command, IntPtr wParam, IntPtr lParam)
 {
     return(Win32.SendMessage(PluginBase.nppData._nppHandle, (uint)command, wParam, lParam));
 }
示例#7
0
 public NotepadPPGateway ReloadFile(string file, bool showAlert)
 {
     Win32.SendMessage(PluginBase.nppData._nppHandle, (uint)NppMsg.NPPM_RELOADFILE, showAlert ? 1 : 0, file);
     return(this);
 }
示例#8
0
 /// <summary>
 /// Open a file for editing in Notepad++, pretty much like using the app's
 /// File - Open menu.
 /// </summary>
 /// <param name="path">The path to the file to open.</param>
 /// <returns>True on success.</returns>
 public bool OpenFile(string path)
 => Win32.SendMessage(
     PluginBase.nppData._nppHandle, (uint)NppMsg.NPPM_DOOPEN, Unused, path).ToInt32()
 != 0;
示例#9
0
 public NotepadPPGateway SetCurrentLanguage(LangType language)
 {
     Win32.SendMessage(PluginBase.nppData._nppHandle, (uint)NppMsg.NPPM_SETCURRENTLANGTYPE, Unused, (int)language);
     return(this);
 }
示例#10
0
 internal static IntPtr GetCurrentBufferId()
 {
     return(Win32.SendMessage(nppData._nppHandle, (uint)NppMsg.NPPM_GETCURRENTBUFFERID, 0, 0));
 }
 /// <summary>
 /// Opens the given text file in a new document.
 /// This method was added to the source code to open the configuration file from the plugin menu, but can be used for any accessible file.
 /// </summary>
 /// <param name="path">Full path to text file.</param>
 public void OpenFile(string path)
 {
     Win32.SendMessage(PluginBase.nppData._nppHandle, (uint)NppMsg.NPPM_DOOPEN, 0, path);
 }
 /// <summary>
 /// This method close the currentfile file
 /// </summary>
 public void CloseCurrentFile()
 {
     //Win32.SendMessage(PluginBase.nppData._nppHandle, (uint)NppMsg.NPPM_MENUCOMMAND, Unused, NppMenuCmd.IDM_FILE_NEW);
     Win32.SendMessage(PluginBase.nppData._nppHandle, (uint)NppMsg.NPPM_MENUCOMMAND, 0, NppMenuCmd.IDM_FILE_CLOSE);
 }
 /// <summary>
 /// This method open file with path
 /// </summary>
 public void openFile(string path)
 {
     //Win32.SendMessage(PluginBase.nppData._nppHandle, (uint)NppMsg.NPPM_MENUCOMMAND, Unused, NppMenuCmd.IDM_FILE_NEW);
     //Win32.SendMessage(PluginBase.nppData._nppHandle, (uint)NppMsg.NPPM_MENUCOMMAND, 0, NppMenuCmd.IDM_FILE_OPEN);
     Win32.SendMessage(PluginBase.nppData._nppHandle, (uint)NppMsg.NPPM_DOOPEN, 0, path);
 }
 /// <summary>
 /// This method save the currentfile file to given Path
 /// </summary>
 public void SaveCurrentFile(string filePath)
 {
     Win32.SendMessage(PluginBase.nppData._nppHandle, (uint)NppMsg.NPPM_SAVECURRENTFILEAS, 0, filePath);
 }