Lua Writer - faster drawing

This commit is contained in:
adelikat 2012-07-22 19:54:40 +00:00
parent f45238132e
commit e56de584e3
4 changed files with 181 additions and 156 deletions

View File

@ -357,6 +357,9 @@
<Compile Include="tools\LuaWriter.designer.cs"> <Compile Include="tools\LuaWriter.designer.cs">
<DependentUpon>LuaWriter.cs</DependentUpon> <DependentUpon>LuaWriter.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="tools\LuaWriterBox.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="tools\WatchCommon.cs" /> <Compile Include="tools\WatchCommon.cs" />
<EmbeddedResource Include="AVOut\FFmpegWriterForm.resx"> <EmbeddedResource Include="AVOut\FFmpegWriterForm.resx">
<DependentUpon>FFmpegWriterForm.cs</DependentUpon> <DependentUpon>FFmpegWriterForm.cs</DependentUpon>

View File

@ -29,7 +29,7 @@
private void InitializeComponent() private void InitializeComponent()
{ {
this.components = new System.ComponentModel.Container(); this.components = new System.ComponentModel.Container();
this.LuaText = new System.Windows.Forms.RichTextBox(); this.LuaText = new LuaWriterBox();
this.timer = new System.Windows.Forms.Timer(this.components); this.timer = new System.Windows.Forms.Timer(this.components);
this.SuspendLayout(); this.SuspendLayout();
// //
@ -58,13 +58,14 @@
this.Controls.Add(this.LuaText); this.Controls.Add(this.LuaText);
this.Name = "LuaWriter"; this.Name = "LuaWriter";
this.Text = "LuaWriter"; this.Text = "LuaWriter";
this.Load += new System.EventHandler(this.LuaWriter_Load);
this.ResumeLayout(false); this.ResumeLayout(false);
} }
#endregion #endregion
private System.Windows.Forms.RichTextBox LuaText; private LuaWriterBox LuaText;
private System.Windows.Forms.Timer timer; private System.Windows.Forms.Timer timer;
} }
} }

View File

@ -161,5 +161,9 @@ namespace BizHawk.MultiClient
} }
} }
private void LuaWriter_Load(object sender, EventArgs e)
{
}
} }
} }

View File

@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace BizHawk.MultiClient
{
class LuaWriterBox : RichTextBox
{
public LuaWriterBox()
{
SetStyle(ControlStyles.AllPaintingInWmPaint, true);
SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
}
}
}