예제 #1
0
        public void SetXML(string xml)
        {
            this.SetText(xml);
            NppMenuCmd mnuCmd = NppMenuCmd.IDM_LANG_XML;

            Win32.SendMessage(PluginBase.nppData._nppHandle, (uint)NppMsg.NPPM_MENUCOMMAND, 0, mnuCmd);
        }
예제 #2
0
 private void btnClose_Click(object sender, EventArgs e)
 {
     try
     {
         NppMenuCmd mnuCmd = NppMenuCmd.IDM_FILE_CLOSE;
         Win32.SendMessage(PluginBase.nppData._nppHandle, (uint)NppMsg.NPPM_MENUCOMMAND, 0, mnuCmd);
     }
     catch (Exception ex)
     {
         MessageBox.Show("An unexpected error occurred. " + ex.Message, "Close Document Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
예제 #3
0
 public static extern IntPtr SendMessage(IntPtr hWnd, NppMsg Msg, int wParam, NppMenuCmd lParam);
예제 #4
0
 /// <summary>
 /// You should try to avoid calling this method in your plugin code. Rather use one of the gateways such as
 /// <see cref="ScintillaGateway"/> or <see cref="NotepadPPGateway"/>.
 /// If gateways are missing or incomplete, please help extend them and send your code to the project
 /// at https://github.com/kbilsted/NotepadPlusPlusPluginPack.Net
 /// </summary>
 public static IntPtr SendMessage(IntPtr hWnd, uint Msg, int wParam, NppMenuCmd lParam)
 {
     return(SendMessage(hWnd, (UInt32)Msg, new IntPtr(wParam), new IntPtr((uint)lParam)));
 }
예제 #5
0
 public static extern IntPtr SendMessage(IntPtr hWnd, NppMsg Msg, int wParam, NppMenuCmd lParam);
예제 #6
0
 IntPtr send(NppMsg command, int wParam, NppMenuCmd lParam)
 {
     return(Win32.SendMessage(PluginBase.nppData._nppHandle, (uint)command, wParam, lParam));
 }
예제 #7
0
 /// <summary>
 /// Allows to execute one of Npp's command
 /// </summary>
 /// <param name="cmd"></param>
 public static void RunCommand(NppMenuCmd cmd)
 {
     Win32Api.SendMessage(Handle, NppMsg.NPPM_MENUCOMMAND, 0, cmd);
 }
예제 #8
0
 /// <summary>
 /// Sends the menu command.
 /// </summary>
 /// <param name="editor">The editor.</param>
 /// <param name="command">The command.</param>
 /// <returns></returns>
 public static IntPtr SendMenuCommand(this NotepadPPGateway editor, NppMenuCmd command)
 => Win32.SendMessage(editor.Handle, (uint)NppMsg.NPPM_MENUCOMMAND, 0, NppMenuCmd.IDM_FILE_NEW);
예제 #9
0
 internal static IntPtr SendMenuCmd(IntPtr hWnd, NppMenuCmd wParam, int lParam)
 {
     return(Win32.SendMessage(hWnd, (uint)WinMsg.WM_COMMAND, (int)wParam, lParam));
 }
예제 #10
0
 public static IntPtr SendMenuCommand(NppMenuCmd command)
 => Win32.SendMessage(Npp.Editor.Handle, (uint)NppMsg.NPPM_MENUCOMMAND, 0, NppMenuCmd.IDM_FILE_NEW);
예제 #11
0
파일: Npp.cs 프로젝트: jcaillon/3P
 /// <summary>
 /// Allows to execute one of Npp's command
 /// </summary>
 /// <param name="cmd"></param>
 public static void RunCommand(NppMenuCmd cmd)
 {
     WinApi.SendMessage(HandleNpp, NppMsg.NPPM_MENUCOMMAND, 0, cmd);
 }