From c3df63d4c8589f93acb11202a44b0276375ba2e5 Mon Sep 17 00:00:00 2001 From: luvletter2333 Date: Sun, 13 Jun 2021 02:28:23 +0800 Subject: [PATCH] fix Converter format * fix FontSize Input * fix Ctrl + Space shortcut * refine resizing --- Form1.Designer.cs | 10 +- Form1.cs | 5 +- Form1.resx | 300 ++++++++++++++-------------------------------- Render_Form.cs | 1 - 4 files changed, 98 insertions(+), 218 deletions(-) diff --git a/Form1.Designer.cs b/Form1.Designer.cs index 0eeebb7..b8a7e86 100644 --- a/Form1.Designer.cs +++ b/Form1.Designer.cs @@ -186,8 +186,8 @@ private void InitializeComponent() // lst_File // this.lst_File.AllowDrop = true; - this.lst_File.FormattingEnabled = true; resources.ApplyResources(this.lst_File, "lst_File"); + this.lst_File.FormattingEnabled = true; this.lst_File.Name = "lst_File"; this.lst_File.SelectedIndexChanged += new System.EventHandler(this.lst_File_SelectedIndexChanged); this.lst_File.DragDrop += new System.Windows.Forms.DragEventHandler(this.Lst_File_DragDrop); @@ -222,8 +222,8 @@ private void InitializeComponent() // // btn_Lock_Font // - this.btn_Lock_Font.ForeColor = System.Drawing.Color.Red; resources.ApplyResources(this.btn_Lock_Font, "btn_Lock_Font"); + this.btn_Lock_Font.ForeColor = System.Drawing.Color.Red; this.btn_Lock_Font.Name = "btn_Lock_Font"; this.btn_Lock_Font.UseVisualStyleBackColor = true; this.btn_Lock_Font.Click += new System.EventHandler(this.btn_Lock_Font_Click); @@ -386,6 +386,7 @@ private void InitializeComponent() // // panel_renderConfig // + resources.ApplyResources(this.panel_renderConfig, "panel_renderConfig"); this.panel_renderConfig.Controls.Add(this.txt_fadeTime); this.panel_renderConfig.Controls.Add(this.label9); this.panel_renderConfig.Controls.Add(this.scroll_fadeTime); @@ -407,7 +408,6 @@ private void InitializeComponent() this.panel_renderConfig.Controls.Add(this.scroll_sub2X); this.panel_renderConfig.Controls.Add(this.scroll_sub1Y); this.panel_renderConfig.Controls.Add(this.label5); - resources.ApplyResources(this.panel_renderConfig, "panel_renderConfig"); this.panel_renderConfig.Name = "panel_renderConfig"; this.panel_renderConfig.TabStop = false; // @@ -490,15 +490,15 @@ private void InitializeComponent() // // btn_saveConfig // - this.btn_saveConfig.ForeColor = System.Drawing.Color.Black; resources.ApplyResources(this.btn_saveConfig, "btn_saveConfig"); + this.btn_saveConfig.ForeColor = System.Drawing.Color.Black; this.btn_saveConfig.Name = "btn_saveConfig"; this.btn_saveConfig.UseVisualStyleBackColor = true; // // btn_loadConfig // - this.btn_loadConfig.ForeColor = System.Drawing.Color.Black; resources.ApplyResources(this.btn_loadConfig, "btn_loadConfig"); + this.btn_loadConfig.ForeColor = System.Drawing.Color.Black; this.btn_loadConfig.Name = "btn_loadConfig"; this.btn_loadConfig.UseVisualStyleBackColor = true; // diff --git a/Form1.cs b/Form1.cs index 24bcc7f..4ec6af3 100644 --- a/Form1.cs +++ b/Form1.cs @@ -111,7 +111,7 @@ private void Form1_Load(object sender, EventArgs e) private void Form1_KeyDown(object sender, KeyEventArgs e) { var keyData = e.KeyData; - if (keyData == (Keys.Control | Keys.Space)) + if (keyData == (Keys.Control | Keys.ProcessKey)) { //Fade to Blank Console.WriteLine("ShortCut: Ctrl + Space"); btn_Clear_Fade_Click(); @@ -645,7 +645,8 @@ private void txt_sub2Y_TextChanged(object sender, EventArgs e) private void txt_fontSize_TextChanged(object sender, EventArgs e) { - renderConfig.fontSize = scroll_fontSize.Value = Convert.ToInt32(txt_fontSize.Text); + renderConfig.fontSize = Convert.ToSingle(txt_fontSize.Text); + scroll_fontSize.Value = (int) renderConfig.fontSize * 10; NotifyChanges(); } diff --git a/Form1.resx b/Form1.resx index 92bc796..220b7a0 100644 --- a/Form1.resx +++ b/Form1.resx @@ -335,6 +335,10 @@ 19 + + + Top, Bottom, Left + True @@ -395,6 +399,9 @@ 17 + + Top, Bottom, Left + True @@ -425,6 +432,9 @@ 16 + + Bottom, Left + 1440, 565 @@ -449,6 +459,9 @@ 15 + + Bottom, Left + 1265, 565 @@ -473,6 +486,9 @@ 14 + + Bottom, Left + 1265, 657 @@ -521,6 +537,9 @@ 12 + + Top, Bottom, Left + 18 @@ -545,6 +564,9 @@ 11 + + Top, Bottom, Left + 宋体, 12pt @@ -656,6 +678,9 @@ 10 + + Bottom, Left + 12, 1123 @@ -680,6 +705,9 @@ 10 + + Bottom, Left + 1440, 657 @@ -704,7 +732,6 @@ 7 - NoControl @@ -963,54 +990,6 @@ 6 - - rdo_Render_FullScreen - - - System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - gp_render_mode - - - 0 - - - rdo_Render_NDI - - - System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - gp_render_mode - - - 1 - - - 635, 11 - - - 232, 63 - - - 38 - - - Render Mode - - - gp_render_mode - - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - 4 - True @@ -1065,6 +1044,30 @@ 1 + + 635, 11 + + + 232, 63 + + + 38 + + + Render Mode + + + gp_render_mode + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 4 + 873, 15 @@ -1314,167 +1317,8 @@ 14 - - txt_fadeTime - - - System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - panel_renderConfig - - - 0 - - - label9 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - panel_renderConfig - - - 1 - - - scroll_fadeTime - - - System.Windows.Forms.HScrollBar, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - panel_renderConfig - - - 2 - - - btn_sync_sub2X - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - panel_renderConfig - - - 3 - - - txt_fontSize - - - System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - panel_renderConfig - - - 4 - - - label8 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - panel_renderConfig - - - 5 - - - scroll_fontSize - - - System.Windows.Forms.HScrollBar, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - panel_renderConfig - - - 6 - - - txt_sub2Y - - - System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - panel_renderConfig - - - 7 - - - txt_sub2X - - - System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - panel_renderConfig - - - 8 - - - txt_sub1Y - - - System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - panel_renderConfig - - - 9 - - - txt_sub1X - - - System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - panel_renderConfig - - - 12 - - - 13, 755 - - - 2, 3, 2, 3 - - - 2, 3, 2, 3 - - - 1586, 362 - - - 41 - - - Render Control Panel - - - panel_renderConfig - - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - 2 + + Bottom, Left 1474, 321 @@ -1758,6 +1602,39 @@ 12 + + 13, 755 + + + 2, 3, 2, 3 + + + 2, 3, 2, 3 + + + 1586, 362 + + + 41 + + + Render Control Panel + + + panel_renderConfig + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 2 + + + Bottom, Left + NoControl @@ -1785,6 +1662,9 @@ 1 + + Bottom, Left + NoControl diff --git a/Render_Form.cs b/Render_Form.cs index ac36e2d..81b9f7a 100644 --- a/Render_Form.cs +++ b/Render_Form.cs @@ -232,7 +232,6 @@ protected override void OnRenderFrame(FrameEventArgs e) { if (isChange || isFading) { - Console.WriteLine("Rerender"); lock (syncLock) { GenerateBmp();