From 7425e09ebc1ec71f1d0be48825c145fef6f5a4ed Mon Sep 17 00:00:00 2001 From: clowwindy Date: Tue, 4 Aug 2015 02:08:48 -0700 Subject: [PATCH] fix log not scrolled to bottom when first shown --- shadowsocks-csharp/View/LogForm.Designer.cs | 1 + shadowsocks-csharp/View/LogForm.cs | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/shadowsocks-csharp/View/LogForm.Designer.cs b/shadowsocks-csharp/View/LogForm.Designer.cs index e9a0cfbc..7eb921ed 100644 --- a/shadowsocks-csharp/View/LogForm.Designer.cs +++ b/shadowsocks-csharp/View/LogForm.Designer.cs @@ -95,6 +95,7 @@ this.Text = "Log Viewer"; this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.LogForm_FormClosing); this.Load += new System.EventHandler(this.LogForm_Load); + this.Shown += new System.EventHandler(this.LogForm_Shown); this.ResumeLayout(false); this.PerformLayout(); diff --git a/shadowsocks-csharp/View/LogForm.cs b/shadowsocks-csharp/View/LogForm.cs index 3f20dd50..d004b90b 100644 --- a/shadowsocks-csharp/View/LogForm.cs +++ b/shadowsocks-csharp/View/LogForm.cs @@ -105,5 +105,10 @@ namespace Shadowsocks.View { this.Close(); } + + private void LogForm_Shown(object sender, EventArgs e) + { + textBox1.ScrollToCaret(); + } } }