mirror of https://github.com/quasar/Quasar.git
Remote shell refactor
This commit is contained in:
parent
6c582ff763
commit
567d9dc2f5
|
@ -8,6 +8,9 @@ public static class NativeMethodsHelper
|
||||||
private const int LVM_FIRST = 0x1000;
|
private const int LVM_FIRST = 0x1000;
|
||||||
private const int LVM_SETITEMSTATE = LVM_FIRST + 43;
|
private const int LVM_SETITEMSTATE = LVM_FIRST + 43;
|
||||||
|
|
||||||
|
private const int WM_VSCROLL = 277;
|
||||||
|
private const int SB_PAGEBOTTOM = 7;
|
||||||
|
|
||||||
public static int MakeLong(int wLow, int wHigh)
|
public static int MakeLong(int wLow, int wHigh)
|
||||||
{
|
{
|
||||||
int low = (int)IntLoWord(wLow);
|
int low = (int)IntLoWord(wLow);
|
||||||
|
@ -31,5 +34,10 @@ public static void SetItemState(IntPtr handle, int itemIndex, int mask, int valu
|
||||||
};
|
};
|
||||||
NativeMethods.SendMessageLVItem(handle, LVM_SETITEMSTATE, itemIndex, ref lvItem);
|
NativeMethods.SendMessageLVItem(handle, LVM_SETITEMSTATE, itemIndex, ref lvItem);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void ScrollToBottom(IntPtr handle)
|
||||||
|
{
|
||||||
|
NativeMethods.SendMessage(handle, WM_VSCROLL, SB_PAGEBOTTOM, 0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,6 @@
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using xServer.Core.Helper;
|
using xServer.Core.Helper;
|
||||||
using xServer.Core.Networking;
|
using xServer.Core.Networking;
|
||||||
using xServer.Core.Utilities;
|
|
||||||
|
|
||||||
namespace xServer.Forms
|
namespace xServer.Forms
|
||||||
{
|
{
|
||||||
|
@ -44,7 +43,7 @@ private void FrmRemoteShell_FormClosing(object sender, FormClosingEventArgs e)
|
||||||
|
|
||||||
private void txtConsoleOutput_TextChanged(object sender, EventArgs e)
|
private void txtConsoleOutput_TextChanged(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
NativeMethods.SendMessage(txtConsoleOutput.Handle, 277, 7, 0);
|
NativeMethodsHelper.ScrollToBottom(txtConsoleOutput.Handle);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void txtConsoleInput_KeyDown(object sender, KeyEventArgs e)
|
private void txtConsoleInput_KeyDown(object sender, KeyEventArgs e)
|
||||||
|
|
Loading…
Reference in New Issue