Remove unused Lua/SyncTextBox

This commit is contained in:
adelikat 2019-11-30 10:12:29 -06:00
parent ecc9899f92
commit 2d65d2b66a
2 changed files with 0 additions and 34 deletions

View File

@ -972,9 +972,6 @@
<Compile Include="tools\Lua\LuaWinform.Designer.cs">
<DependentUpon>LuaWinform.cs</DependentUpon>
</Compile>
<Compile Include="tools\Lua\SyncTextBox.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="tools\Macros\MacroInput.ButtonSelect.cs">
<SubType>Form</SubType>
</Compile>

View File

@ -1,31 +0,0 @@
using System;
using System.Windows.Forms;
using System.Runtime.InteropServices;
internal class SyncTextBox : RichTextBox
{
public SyncTextBox()
{
this.Multiline = true;
this.ScrollBars = RichTextBoxScrollBars.Vertical;
}
public Control Buddy { get; set; }
private static bool scrolling; // In case buddy tries to scroll us
protected override void WndProc(ref Message m)
{
base.WndProc(ref m);
// Trap WM_VSCROLL message and pass to buddy
if ((m.Msg == 0x115 || m.Msg == 0x20a) && !scrolling && Buddy != null && Buddy.IsHandleCreated)
{
scrolling = true;
SendMessage(Buddy.Handle, m.Msg, m.WParam, m.LParam);
scrolling = false;
}
}
[DllImport("user32.dll", CharSet = CharSet.Auto)]
private static extern IntPtr SendMessage(IntPtr hWnd, int msg, IntPtr wp, IntPtr lp);
}