Ejemplo n.º 1
0
        void toggleOutputDialog()
        {
            if (frmOutput == null)
            {
                frmOutput = new Forms.Output(this);

                var _nppTbData = new NppTbData();
                _nppTbData.hClient       = frmOutput.Handle;
                _nppTbData.pszName       = "Ruby. Wow! (Output)";
                _nppTbData.dlgID         = idOutputDlg;
                _nppTbData.uMask         = NppTbMsg.DWS_DF_CONT_BOTTOM;
                _nppTbData.pszModuleName = _pluginModuleName;
                IntPtr _ptrNppTbData = Marshal.AllocHGlobal(Marshal.SizeOf(_nppTbData));
                Marshal.StructureToPtr(_nppTbData, _ptrNppTbData, false);

                Win32.SendMessage(nppData._nppHandle, NppMsg.NPPM_DMMREGASDCKDLG, 0, _ptrNppTbData);
            }
            else
            {
                if (frmOutput.Visible)
                {
                    Win32.SendMessage(nppData._nppHandle, NppMsg.NPPM_DMMHIDE, 0, frmOutput.Handle);
                }
                else
                {
                    Win32.SendMessage(nppData._nppHandle, NppMsg.NPPM_DMMSHOW, 0, frmOutput.Handle);
                }
            }
        }
Ejemplo n.º 2
0
     void toggleOutputDialog()
     {
       if (frmOutput == null)
       {
         frmOutput = new Forms.Output(this);

         var _nppTbData = new NppTbData();
         _nppTbData.hClient = frmOutput.Handle;
         _nppTbData.pszName = "Ruby. Wow! (Output)";
         _nppTbData.dlgID = idOutputDlg;
         _nppTbData.uMask = NppTbMsg.DWS_DF_CONT_BOTTOM;
         _nppTbData.pszModuleName = _pluginModuleName;
         IntPtr _ptrNppTbData = Marshal.AllocHGlobal(Marshal.SizeOf(_nppTbData));
         Marshal.StructureToPtr(_nppTbData, _ptrNppTbData, false);

         Win32.SendMessage(nppData._nppHandle, NppMsg.NPPM_DMMREGASDCKDLG, 0, _ptrNppTbData);
       }
       else
       {
         if(frmOutput.Visible)
           Win32.SendMessage(nppData._nppHandle, NppMsg.NPPM_DMMHIDE, 0, frmOutput.Handle);
         else
           Win32.SendMessage(nppData._nppHandle, NppMsg.NPPM_DMMSHOW, 0, frmOutput.Handle);
       }
     }