diff --git a/LrcHelper/App.config b/LrcHelper/App.config index de27714..877624e 100644 --- a/LrcHelper/App.config +++ b/LrcHelper/App.config @@ -1,6 +1,6 @@ - + diff --git a/LrcHelper/LrcDownloader.Designer.cs b/LrcHelper/LrcDownloader.Designer.cs index 7607f9a..254d8a5 100644 --- a/LrcHelper/LrcDownloader.Designer.cs +++ b/LrcHelper/LrcDownloader.Designer.cs @@ -58,6 +58,7 @@ private void InitializeComponent() this.AdvancedSettingscheckBox = new System.Windows.Forms.CheckBox(); this.toolTip1 = new System.Windows.Forms.ToolTip(this.components); this.needhelplabel = new System.Windows.Forms.Label(); + this.EncodingcomboBox = new System.Windows.Forms.ComboBox(); this.StatusgroupBox.SuspendLayout(); this.AdvancedSettingsgroupBox.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.DelayMsecnumericUpDown)).BeginInit(); @@ -66,39 +67,39 @@ private void InitializeComponent() // // IDtextBox // - this.IDtextBox.Location = new System.Drawing.Point(58, 9); - this.IDtextBox.Margin = new System.Windows.Forms.Padding(4); + this.IDtextBox.Location = new System.Drawing.Point(97, 15); + this.IDtextBox.Margin = new System.Windows.Forms.Padding(7); this.IDtextBox.Name = "IDtextBox"; - this.IDtextBox.Size = new System.Drawing.Size(148, 28); + this.IDtextBox.Size = new System.Drawing.Size(244, 42); this.IDtextBox.TabIndex = 0; // // IDlabel // this.IDlabel.AutoSize = true; - this.IDlabel.Location = new System.Drawing.Point(18, 14); - this.IDlabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.IDlabel.Location = new System.Drawing.Point(30, 23); + this.IDlabel.Margin = new System.Windows.Forms.Padding(7, 0, 7, 0); this.IDlabel.Name = "IDlabel"; - this.IDlabel.Size = new System.Drawing.Size(35, 18); + this.IDlabel.Size = new System.Drawing.Size(58, 30); this.IDlabel.TabIndex = 1; this.IDlabel.Text = "ID:"; // // Functionlabel // this.Functionlabel.AutoSize = true; - this.Functionlabel.Location = new System.Drawing.Point(15, 58); - this.Functionlabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.Functionlabel.Location = new System.Drawing.Point(25, 97); + this.Functionlabel.Margin = new System.Windows.Forms.Padding(7, 0, 7, 0); this.Functionlabel.Name = "Functionlabel"; - this.Functionlabel.Size = new System.Drawing.Size(71, 18); + this.Functionlabel.Size = new System.Drawing.Size(118, 30); this.Functionlabel.TabIndex = 2; this.Functionlabel.Text = "这是..."; // // MusicradioButton // this.MusicradioButton.AutoSize = true; - this.MusicradioButton.Location = new System.Drawing.Point(124, 56); - this.MusicradioButton.Margin = new System.Windows.Forms.Padding(4); + this.MusicradioButton.Location = new System.Drawing.Point(207, 93); + this.MusicradioButton.Margin = new System.Windows.Forms.Padding(7); this.MusicradioButton.Name = "MusicradioButton"; - this.MusicradioButton.Size = new System.Drawing.Size(69, 22); + this.MusicradioButton.Size = new System.Drawing.Size(110, 34); this.MusicradioButton.TabIndex = 3; this.MusicradioButton.TabStop = true; this.MusicradioButton.Text = "单曲"; @@ -107,10 +108,10 @@ private void InitializeComponent() // PlaylistradioButton // this.PlaylistradioButton.AutoSize = true; - this.PlaylistradioButton.Location = new System.Drawing.Point(201, 56); - this.PlaylistradioButton.Margin = new System.Windows.Forms.Padding(4); + this.PlaylistradioButton.Location = new System.Drawing.Point(335, 93); + this.PlaylistradioButton.Margin = new System.Windows.Forms.Padding(7); this.PlaylistradioButton.Name = "PlaylistradioButton"; - this.PlaylistradioButton.Size = new System.Drawing.Size(69, 22); + this.PlaylistradioButton.Size = new System.Drawing.Size(110, 34); this.PlaylistradioButton.TabIndex = 4; this.PlaylistradioButton.TabStop = true; this.PlaylistradioButton.Text = "歌单"; @@ -118,10 +119,10 @@ private void InitializeComponent() // // GETbutton // - this.GETbutton.Location = new System.Drawing.Point(218, 6); - this.GETbutton.Margin = new System.Windows.Forms.Padding(4); + this.GETbutton.Location = new System.Drawing.Point(363, 10); + this.GETbutton.Margin = new System.Windows.Forms.Padding(7); this.GETbutton.Name = "GETbutton"; - this.GETbutton.Size = new System.Drawing.Size(112, 34); + this.GETbutton.Size = new System.Drawing.Size(187, 57); this.GETbutton.TabIndex = 5; this.GETbutton.Text = "下载"; this.GETbutton.UseVisualStyleBackColor = true; @@ -130,20 +131,20 @@ private void InitializeComponent() // Copyrightlabel // this.Copyrightlabel.AutoSize = true; - this.Copyrightlabel.Location = new System.Drawing.Point(337, 251); - this.Copyrightlabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.Copyrightlabel.Location = new System.Drawing.Point(562, 418); + this.Copyrightlabel.Margin = new System.Windows.Forms.Padding(7, 0, 7, 0); this.Copyrightlabel.Name = "Copyrightlabel"; - this.Copyrightlabel.Size = new System.Drawing.Size(251, 36); + this.Copyrightlabel.Size = new System.Drawing.Size(418, 60); this.Copyrightlabel.TabIndex = 6; this.Copyrightlabel.Text = "Email:hi@luu.moe\r\ngithub.com/ludoux/lrchelper"; // // Cancelbutton // this.Cancelbutton.Enabled = false; - this.Cancelbutton.Location = new System.Drawing.Point(339, 6); - this.Cancelbutton.Margin = new System.Windows.Forms.Padding(4); + this.Cancelbutton.Location = new System.Drawing.Point(565, 10); + this.Cancelbutton.Margin = new System.Windows.Forms.Padding(7); this.Cancelbutton.Name = "Cancelbutton"; - this.Cancelbutton.Size = new System.Drawing.Size(112, 34); + this.Cancelbutton.Size = new System.Drawing.Size(187, 57); this.Cancelbutton.TabIndex = 7; this.Cancelbutton.Text = "取消"; this.Cancelbutton.UseVisualStyleBackColor = true; @@ -156,11 +157,11 @@ private void InitializeComponent() this.StatusgroupBox.Controls.Add(this.StatusPDFinishedlabel); this.StatusgroupBox.Controls.Add(this.StatusPDTotallabel); this.StatusgroupBox.Controls.Add(this.StatusInfolabel); - this.StatusgroupBox.Location = new System.Drawing.Point(328, 88); - this.StatusgroupBox.Margin = new System.Windows.Forms.Padding(4); + this.StatusgroupBox.Location = new System.Drawing.Point(547, 147); + this.StatusgroupBox.Margin = new System.Windows.Forms.Padding(7); this.StatusgroupBox.Name = "StatusgroupBox"; - this.StatusgroupBox.Padding = new System.Windows.Forms.Padding(4); - this.StatusgroupBox.Size = new System.Drawing.Size(300, 150); + this.StatusgroupBox.Padding = new System.Windows.Forms.Padding(7); + this.StatusgroupBox.Size = new System.Drawing.Size(500, 250); this.StatusgroupBox.TabIndex = 8; this.StatusgroupBox.TabStop = false; this.StatusgroupBox.Text = "状态"; @@ -168,49 +169,49 @@ private void InitializeComponent() // StatusPDTotalCountlabel // this.StatusPDTotalCountlabel.AutoSize = true; - this.StatusPDTotalCountlabel.Location = new System.Drawing.Point(132, 72); - this.StatusPDTotalCountlabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.StatusPDTotalCountlabel.Location = new System.Drawing.Point(220, 120); + this.StatusPDTotalCountlabel.Margin = new System.Windows.Forms.Padding(7, 0, 7, 0); this.StatusPDTotalCountlabel.Name = "StatusPDTotalCountlabel"; - this.StatusPDTotalCountlabel.Size = new System.Drawing.Size(17, 18); + this.StatusPDTotalCountlabel.Size = new System.Drawing.Size(28, 30); this.StatusPDTotalCountlabel.TabIndex = 4; this.StatusPDTotalCountlabel.Text = "0"; // // StatusPDFinishedCountlabel // this.StatusPDFinishedCountlabel.AutoSize = true; - this.StatusPDFinishedCountlabel.Location = new System.Drawing.Point(132, 90); - this.StatusPDFinishedCountlabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.StatusPDFinishedCountlabel.Location = new System.Drawing.Point(220, 150); + this.StatusPDFinishedCountlabel.Margin = new System.Windows.Forms.Padding(7, 0, 7, 0); this.StatusPDFinishedCountlabel.Name = "StatusPDFinishedCountlabel"; - this.StatusPDFinishedCountlabel.Size = new System.Drawing.Size(17, 18); + this.StatusPDFinishedCountlabel.Size = new System.Drawing.Size(28, 30); this.StatusPDFinishedCountlabel.TabIndex = 3; this.StatusPDFinishedCountlabel.Text = "0"; // // StatusPDFinishedlabel // this.StatusPDFinishedlabel.AutoSize = true; - this.StatusPDFinishedlabel.Location = new System.Drawing.Point(62, 90); - this.StatusPDFinishedlabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.StatusPDFinishedlabel.Location = new System.Drawing.Point(103, 150); + this.StatusPDFinishedlabel.Margin = new System.Windows.Forms.Padding(7, 0, 7, 0); this.StatusPDFinishedlabel.Name = "StatusPDFinishedlabel"; - this.StatusPDFinishedlabel.Size = new System.Drawing.Size(35, 18); + this.StatusPDFinishedlabel.Size = new System.Drawing.Size(58, 30); this.StatusPDFinishedlabel.TabIndex = 2; this.StatusPDFinishedlabel.Text = "已:"; // // StatusPDTotallabel // this.StatusPDTotallabel.AutoSize = true; - this.StatusPDTotallabel.Location = new System.Drawing.Point(62, 72); - this.StatusPDTotallabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.StatusPDTotallabel.Location = new System.Drawing.Point(103, 120); + this.StatusPDTotallabel.Margin = new System.Windows.Forms.Padding(7, 0, 7, 0); this.StatusPDTotallabel.Name = "StatusPDTotallabel"; - this.StatusPDTotallabel.Size = new System.Drawing.Size(35, 18); + this.StatusPDTotallabel.Size = new System.Drawing.Size(58, 30); this.StatusPDTotallabel.TabIndex = 1; this.StatusPDTotallabel.Text = "总:"; // // StatusInfolabel // - this.StatusInfolabel.Location = new System.Drawing.Point(9, 26); - this.StatusInfolabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.StatusInfolabel.Location = new System.Drawing.Point(15, 43); + this.StatusInfolabel.Margin = new System.Windows.Forms.Padding(7, 0, 7, 0); this.StatusInfolabel.Name = "StatusInfolabel"; - this.StatusInfolabel.Size = new System.Drawing.Size(282, 46); + this.StatusInfolabel.Size = new System.Drawing.Size(470, 77); this.StatusInfolabel.TabIndex = 0; this.StatusInfolabel.Text = "状态信息"; this.StatusInfolabel.MouseHover += new System.EventHandler(this.StatusInfolabel_MouseHover); @@ -220,10 +221,10 @@ private void InitializeComponent() this.AutoSetcheckBox.AutoSize = true; this.AutoSetcheckBox.Checked = true; this.AutoSetcheckBox.CheckState = System.Windows.Forms.CheckState.Checked; - this.AutoSetcheckBox.Location = new System.Drawing.Point(511, 54); - this.AutoSetcheckBox.Margin = new System.Windows.Forms.Padding(4); + this.AutoSetcheckBox.Location = new System.Drawing.Point(852, 90); + this.AutoSetcheckBox.Margin = new System.Windows.Forms.Padding(7); this.AutoSetcheckBox.Name = "AutoSetcheckBox"; - this.AutoSetcheckBox.Size = new System.Drawing.Size(106, 22); + this.AutoSetcheckBox.Size = new System.Drawing.Size(171, 34); this.AutoSetcheckBox.TabIndex = 9; this.AutoSetcheckBox.Text = "Auto-Set"; this.toolTip1.SetToolTip(this.AutoSetcheckBox, "从剪切板的链接中自动设置 ID"); @@ -232,10 +233,10 @@ private void InitializeComponent() // AlbumradioButton // this.AlbumradioButton.AutoSize = true; - this.AlbumradioButton.Location = new System.Drawing.Point(278, 56); - this.AlbumradioButton.Margin = new System.Windows.Forms.Padding(4); + this.AlbumradioButton.Location = new System.Drawing.Point(463, 93); + this.AlbumradioButton.Margin = new System.Windows.Forms.Padding(7); this.AlbumradioButton.Name = "AlbumradioButton"; - this.AlbumradioButton.Size = new System.Drawing.Size(69, 22); + this.AlbumradioButton.Size = new System.Drawing.Size(110, 34); this.AlbumradioButton.TabIndex = 10; this.AlbumradioButton.TabStop = true; this.AlbumradioButton.Text = "专辑"; @@ -243,6 +244,7 @@ private void InitializeComponent() // // AdvancedSettingsgroupBox // + this.AdvancedSettingsgroupBox.Controls.Add(this.EncodingcomboBox); this.AdvancedSettingsgroupBox.Controls.Add(this.ReviseRawcheckBox); this.AdvancedSettingsgroupBox.Controls.Add(this.Savelabel); this.AdvancedSettingsgroupBox.Controls.Add(this.FilenamePatterncomboBox); @@ -251,11 +253,11 @@ private void InitializeComponent() this.AdvancedSettingsgroupBox.Controls.Add(this.DelayMseclabel); this.AdvancedSettingsgroupBox.Controls.Add(this.LyricsStylenumericUpDown); this.AdvancedSettingsgroupBox.Controls.Add(this.LyricsStylelabel); - this.AdvancedSettingsgroupBox.Location = new System.Drawing.Point(18, 93); - this.AdvancedSettingsgroupBox.Margin = new System.Windows.Forms.Padding(4); + this.AdvancedSettingsgroupBox.Location = new System.Drawing.Point(30, 155); + this.AdvancedSettingsgroupBox.Margin = new System.Windows.Forms.Padding(7); this.AdvancedSettingsgroupBox.Name = "AdvancedSettingsgroupBox"; - this.AdvancedSettingsgroupBox.Padding = new System.Windows.Forms.Padding(4); - this.AdvancedSettingsgroupBox.Size = new System.Drawing.Size(300, 194); + this.AdvancedSettingsgroupBox.Padding = new System.Windows.Forms.Padding(7); + this.AdvancedSettingsgroupBox.Size = new System.Drawing.Size(500, 323); this.AdvancedSettingsgroupBox.TabIndex = 11; this.AdvancedSettingsgroupBox.TabStop = false; this.AdvancedSettingsgroupBox.Visible = false; @@ -264,10 +266,10 @@ private void InitializeComponent() // this.ReviseRawcheckBox.AutoSize = true; this.ReviseRawcheckBox.ForeColor = System.Drawing.SystemColors.ControlDark; - this.ReviseRawcheckBox.Location = new System.Drawing.Point(12, 160); - this.ReviseRawcheckBox.Margin = new System.Windows.Forms.Padding(4); + this.ReviseRawcheckBox.Location = new System.Drawing.Point(20, 267); + this.ReviseRawcheckBox.Margin = new System.Windows.Forms.Padding(7); this.ReviseRawcheckBox.Name = "ReviseRawcheckBox"; - this.ReviseRawcheckBox.Size = new System.Drawing.Size(115, 22); + this.ReviseRawcheckBox.Size = new System.Drawing.Size(186, 34); this.ReviseRawcheckBox.TabIndex = 20; this.ReviseRawcheckBox.Text = "ReviseRaw"; this.ReviseRawcheckBox.UseVisualStyleBackColor = true; @@ -278,10 +280,10 @@ private void InitializeComponent() this.Savelabel.Cursor = System.Windows.Forms.Cursors.Hand; this.Savelabel.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Underline, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.Savelabel.ForeColor = System.Drawing.Color.Blue; - this.Savelabel.Location = new System.Drawing.Point(232, 21); - this.Savelabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.Savelabel.Location = new System.Drawing.Point(387, 35); + this.Savelabel.Margin = new System.Windows.Forms.Padding(7, 0, 7, 0); this.Savelabel.Name = "Savelabel"; - this.Savelabel.Size = new System.Drawing.Size(44, 18); + this.Savelabel.Size = new System.Drawing.Size(73, 30); this.Savelabel.TabIndex = 19; this.Savelabel.Text = "保存"; this.toolTip1.SetToolTip(this.Savelabel, "软件将在下次启动时自动加载已保存的高级设置"); @@ -295,10 +297,10 @@ private void InitializeComponent() "[track number]. [title].lrc", "[artist] - [title].lrc", "[title] - [artist].lrc"}); - this.FilenamePatterncomboBox.Location = new System.Drawing.Point(12, 124); - this.FilenamePatterncomboBox.Margin = new System.Windows.Forms.Padding(4); + this.FilenamePatterncomboBox.Location = new System.Drawing.Point(20, 207); + this.FilenamePatterncomboBox.Margin = new System.Windows.Forms.Padding(7); this.FilenamePatterncomboBox.Name = "FilenamePatterncomboBox"; - this.FilenamePatterncomboBox.Size = new System.Drawing.Size(262, 26); + this.FilenamePatterncomboBox.Size = new System.Drawing.Size(434, 38); this.FilenamePatterncomboBox.TabIndex = 18; this.FilenamePatterncomboBox.Text = "[title].lrc"; this.toolTip1.SetToolTip(this.FilenamePatterncomboBox, "支持:[title][track number][album][artist]"); @@ -306,10 +308,10 @@ private void InitializeComponent() // FilenamePatternLabel // this.FilenamePatternLabel.AutoSize = true; - this.FilenamePatternLabel.Location = new System.Drawing.Point(9, 102); - this.FilenamePatternLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.FilenamePatternLabel.Location = new System.Drawing.Point(15, 170); + this.FilenamePatternLabel.Margin = new System.Windows.Forms.Padding(7, 0, 7, 0); this.FilenamePatternLabel.Name = "FilenamePatternLabel"; - this.FilenamePatternLabel.Size = new System.Drawing.Size(107, 18); + this.FilenamePatternLabel.Size = new System.Drawing.Size(178, 30); this.FilenamePatternLabel.TabIndex = 17; this.FilenamePatternLabel.Text = "文件名样式:"; // @@ -320,8 +322,8 @@ private void InitializeComponent() 0, 0, 0}); - this.DelayMsecnumericUpDown.Location = new System.Drawing.Point(134, 58); - this.DelayMsecnumericUpDown.Margin = new System.Windows.Forms.Padding(4); + this.DelayMsecnumericUpDown.Location = new System.Drawing.Point(223, 97); + this.DelayMsecnumericUpDown.Margin = new System.Windows.Forms.Padding(7); this.DelayMsecnumericUpDown.Maximum = new decimal(new int[] { 400, 0, @@ -333,7 +335,7 @@ private void InitializeComponent() 0, -2147483648}); this.DelayMsecnumericUpDown.Name = "DelayMsecnumericUpDown"; - this.DelayMsecnumericUpDown.Size = new System.Drawing.Size(57, 28); + this.DelayMsecnumericUpDown.Size = new System.Drawing.Size(95, 42); this.DelayMsecnumericUpDown.TabIndex = 16; this.toolTip1.SetToolTip(this.DelayMsecnumericUpDown, "100 意味着 1sec"); this.DelayMsecnumericUpDown.Value = new decimal(new int[] { @@ -345,35 +347,35 @@ private void InitializeComponent() // DelayMseclabel // this.DelayMseclabel.AutoSize = true; - this.DelayMseclabel.Location = new System.Drawing.Point(8, 60); - this.DelayMseclabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.DelayMseclabel.Location = new System.Drawing.Point(13, 100); + this.DelayMseclabel.Margin = new System.Windows.Forms.Padding(7, 0, 7, 0); this.DelayMseclabel.Name = "DelayMseclabel"; - this.DelayMseclabel.Size = new System.Drawing.Size(89, 18); + this.DelayMseclabel.Size = new System.Drawing.Size(148, 30); this.DelayMseclabel.TabIndex = 15; this.DelayMseclabel.Text = "延迟Msec:"; this.toolTip1.SetToolTip(this.DelayMseclabel, "How long should the translyrics be delayed?"); // // LyricsStylenumericUpDown // - this.LyricsStylenumericUpDown.Location = new System.Drawing.Point(134, 24); - this.LyricsStylenumericUpDown.Margin = new System.Windows.Forms.Padding(4); + this.LyricsStylenumericUpDown.Location = new System.Drawing.Point(223, 40); + this.LyricsStylenumericUpDown.Margin = new System.Windows.Forms.Padding(7); this.LyricsStylenumericUpDown.Maximum = new decimal(new int[] { 1, 0, 0, 0}); this.LyricsStylenumericUpDown.Name = "LyricsStylenumericUpDown"; - this.LyricsStylenumericUpDown.Size = new System.Drawing.Size(45, 28); + this.LyricsStylenumericUpDown.Size = new System.Drawing.Size(75, 42); this.LyricsStylenumericUpDown.TabIndex = 14; this.toolTip1.SetToolTip(this.LyricsStylenumericUpDown, "0:歌词原文和翻译将分行\r\n1:歌词原文和翻译将尽可能同行"); // // LyricsStylelabel // this.LyricsStylelabel.AutoSize = true; - this.LyricsStylelabel.Location = new System.Drawing.Point(9, 27); - this.LyricsStylelabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.LyricsStylelabel.Location = new System.Drawing.Point(15, 45); + this.LyricsStylelabel.Margin = new System.Windows.Forms.Padding(7, 0, 7, 0); this.LyricsStylelabel.Name = "LyricsStylelabel"; - this.LyricsStylelabel.Size = new System.Drawing.Size(89, 18); + this.LyricsStylelabel.Size = new System.Drawing.Size(148, 30); this.LyricsStylelabel.TabIndex = 13; this.LyricsStylelabel.Text = "歌词样式:"; this.toolTip1.SetToolTip(this.LyricsStylelabel, "Different styles for different environment."); @@ -381,10 +383,10 @@ private void InitializeComponent() // AdvancedSettingscheckBox // this.AdvancedSettingscheckBox.AutoSize = true; - this.AdvancedSettingscheckBox.Location = new System.Drawing.Point(21, 90); - this.AdvancedSettingscheckBox.Margin = new System.Windows.Forms.Padding(4); + this.AdvancedSettingscheckBox.Location = new System.Drawing.Point(35, 150); + this.AdvancedSettingscheckBox.Margin = new System.Windows.Forms.Padding(7); this.AdvancedSettingscheckBox.Name = "AdvancedSettingscheckBox"; - this.AdvancedSettingscheckBox.Size = new System.Drawing.Size(106, 22); + this.AdvancedSettingscheckBox.Size = new System.Drawing.Size(171, 34); this.AdvancedSettingscheckBox.TabIndex = 12; this.AdvancedSettingscheckBox.Text = "高级设置"; this.toolTip1.SetToolTip(this.AdvancedSettingscheckBox, "More features but less stable."); @@ -405,19 +407,33 @@ private void InitializeComponent() this.needhelplabel.Cursor = System.Windows.Forms.Cursors.Hand; this.needhelplabel.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Underline, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.needhelplabel.ForeColor = System.Drawing.Color.Blue; - this.needhelplabel.Location = new System.Drawing.Point(508, 19); - this.needhelplabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.needhelplabel.Location = new System.Drawing.Point(847, 32); + this.needhelplabel.Margin = new System.Windows.Forms.Padding(7, 0, 7, 0); this.needhelplabel.Name = "needhelplabel"; - this.needhelplabel.Size = new System.Drawing.Size(98, 18); + this.needhelplabel.Size = new System.Drawing.Size(163, 30); this.needhelplabel.TabIndex = 19; this.needhelplabel.Text = "Need Help?"; this.needhelplabel.Click += new System.EventHandler(this.needhelplabel_Click); // + // EncodingcomboBox + // + this.EncodingcomboBox.FormattingEnabled = true; + this.EncodingcomboBox.Items.AddRange(new object[] { + "UTF-8", + "GB2312"}); + this.EncodingcomboBox.Location = new System.Drawing.Point(279, 265); + this.EncodingcomboBox.Margin = new System.Windows.Forms.Padding(7); + this.EncodingcomboBox.Name = "EncodingcomboBox"; + this.EncodingcomboBox.Size = new System.Drawing.Size(175, 38); + this.EncodingcomboBox.TabIndex = 21; + this.EncodingcomboBox.Text = "UTF-8"; + this.toolTip1.SetToolTip(this.EncodingcomboBox, "歌词文件的字符编码"); + // // LrcDownloader // - this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 18F); + this.AutoScaleDimensions = new System.Drawing.SizeF(15F, 30F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(647, 302); + this.ClientSize = new System.Drawing.Size(1078, 503); this.Controls.Add(this.needhelplabel); this.Controls.Add(this.AdvancedSettingscheckBox); this.Controls.Add(this.AdvancedSettingsgroupBox); @@ -434,7 +450,7 @@ private void InitializeComponent() this.Controls.Add(this.IDtextBox); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); - this.Margin = new System.Windows.Forms.Padding(4); + this.Margin = new System.Windows.Forms.Padding(7); this.MaximizeBox = false; this.Name = "LrcDownloader"; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; @@ -482,5 +498,6 @@ private void InitializeComponent() private System.Windows.Forms.Label needhelplabel; private System.Windows.Forms.Label Savelabel; private System.Windows.Forms.CheckBox ReviseRawcheckBox; + private System.Windows.Forms.ComboBox EncodingcomboBox; } } \ No newline at end of file diff --git a/LrcHelper/LrcDownloader.cs b/LrcHelper/LrcDownloader.cs index d61441b..8ece1c8 100644 --- a/LrcHelper/LrcDownloader.cs +++ b/LrcHelper/LrcDownloader.cs @@ -23,6 +23,7 @@ public LrcDownloader() private void GETbutton_Click(object sender, EventArgs e) { string filenamePattern = FilenamePatterncomboBox.Text; + string enc = EncodingcomboBox.Text; GETbutton.Enabled = false; StatusInfolabel.Text = "状态信息"; StatusPDFinishedCountlabel.Text = "0"; @@ -38,7 +39,9 @@ private void GETbutton_Click(object sender, EventArgs e) string Log = ""; LyricsStatus status = LyricsStatus.UNSURED; if (ReviseRawcheckBox.Checked == false) - Log = DownloadLrc(".\\", filenamePattern, m, modelIndex, delayMsec, out status, out string filePath);//正常的自动化操作 + { + Log = DownloadLrc(".\\", filenamePattern, m, modelIndex, delayMsec, out status, out string filePath, fileEncoding: enc);//正常的自动化操作 + } else { HttpRequest hr = new HttpRequest(); @@ -51,8 +54,7 @@ private void GETbutton_Click(object sender, EventArgs e) Clipboard.SetText(sContentTransLyrics, TextDataFormat.UnicodeText); if (MessageBox.Show("TransLyrics raw text has been set is in the clipboard. Please follow these guide below." + Environment.NewLine + Environment.NewLine + "==========" + Environment.NewLine + @"1. Use Notepad++ to read(such as ""paste"") text from the clipboard." + Environment.NewLine + @"2. Try to revise the text. The most mistake we face is wrong typo. (You can search "".lrc guidance"" to learn more.)" + Environment.NewLine + @"3. After revising, please set revised text to the clipboard(such as ""copy"")" + Environment.NewLine + @"4. Click ""Yes"" button. Software will use the revised text instead of the raw text." + Environment.NewLine + "==========" + Environment.NewLine + Environment.NewLine + @"**If you don't know why you're seeing this messagebox now or you don't know what to do, just click ""No"" button. Don't worry, nothing wrong will happen.**" + Environment.NewLine + @"You can click the blue label ""Need Help?"" in the LrcDownloader Form to learn more about this function.", "TransLyrics raw text - ReviseRaw(Func)_Step 2", MessageBoxButtons.YesNo, MessageBoxIcon.Information, MessageBoxDefaultButton.Button2) == DialogResult.Yes) sContentTransLyrics = Clipboard.GetText(TextDataFormat.UnicodeText); - - Log = DownloadLrc(".\\", filenamePattern, m, modelIndex, delayMsec, out status, out string filePath,revisedsContentOriLyricsForUserReviseFunc: sContentOriLyrics, revisedsContentTransLyricsForUserReviseFunc: sContentTransLyrics); + Log = DownloadLrc(".\\", filenamePattern, m, modelIndex, delayMsec, out status, out string filePath,revisedsContentOriLyricsForUserReviseFunc: sContentOriLyrics, revisedsContentTransLyricsForUserReviseFunc: sContentTransLyrics, fileEncoding: enc); } sw.Stop(); if (Log == "") @@ -94,7 +96,7 @@ private void GETbutton_Click(object sender, EventArgs e) Music m = new Music(idList[i], i + 1); try { - ErrorLog = DownloadLrc(@".\\" + FormatFileName.CleanInvalidFileName(pl.Name) + @"\", filenamePattern, m, modelIndex, delayMsec, out status,out filePath); + ErrorLog = DownloadLrc(@".\\" + FormatFileName.CleanInvalidFileName(pl.Name) + @"\", filenamePattern, m, modelIndex, delayMsec, out status,out filePath, fileEncoding: enc); } catch(Exception ex) { @@ -172,7 +174,7 @@ private void GETbutton_Click(object sender, EventArgs e) string filePath = ""; try { - ErrorLog = DownloadLrc(@".\\" + FormatFileName.CleanInvalidFileName(a.Name) + @"\", filenamePattern, m, modelIndex, delayMsec, out status, out filePath); + ErrorLog = DownloadLrc(@".\\" + FormatFileName.CleanInvalidFileName(a.Name) + @"\", filenamePattern, m, modelIndex, delayMsec, out status, out filePath, fileEncoding: enc); } catch (Exception ex) { @@ -286,7 +288,7 @@ private void Savelabel_Click(object sender, EventArgs e) { try { - File.WriteAllText(".\\AdvancedSettings.txt", string.Format("Version:{0}\r\nTime:{1}\r\nLyricsStyle:{2}\r\nDelayMsec:{3}\r\nFilenamePattern:{4}\r\n***DO NOT CHANGE ANY TEXT AND/OR ENCODING***\r\n***If you don't want to use these settings ever, just delete this file.***", FileVersionInfo.GetVersionInfo(Application.ExecutablePath).FileVersion, DateTime.Now.ToString(), LyricsStylenumericUpDown.Value.ToString(), DelayMsecnumericUpDown.Value.ToString(), FilenamePatterncomboBox.Text), Encoding.UTF8); + File.WriteAllText(".\\AdvancedSettings.txt", string.Format("Version:{0}\r\nTime:{1}\r\nLyricsStyle:{2}\r\nDelayMsec:{3}\r\nFilenamePattern:{4}\r\nEncoding:{5}\r\n***DO NOT CHANGE ANY TEXT AND/OR ENCODING***\r\n***If you don't want to use these settings ever, just delete this file.***", FileVersionInfo.GetVersionInfo(Application.ExecutablePath).FileVersion, DateTime.Now.ToString(), LyricsStylenumericUpDown.Value.ToString(), DelayMsecnumericUpDown.Value.ToString(), FilenamePatterncomboBox.Text, EncodingcomboBox.Text), Encoding.UTF8); } catch (Exception) { @@ -305,7 +307,7 @@ private void LrcDownloader_Load(object sender, EventArgs e) LyricsStylenumericUpDown.Value = Convert.ToDecimal(Regex.Match(settings, @"(?<=LyricsStyle:)\d+?(?=\r\n)", RegexOptions.IgnoreCase).Value.ToString()); DelayMsecnumericUpDown.Value = Convert.ToDecimal(Regex.Match(settings, @"(?<=DelayMsec:)(-)*\d+?(?=\r\n)", RegexOptions.IgnoreCase).Value.ToString()); //05-13 修正数值为负数的时候无匹配(变成""),不能进行Convert.ToDecimal("")。 FilenamePatterncomboBox.Text = Regex.Match(settings, @"(?<=FilenamePattern:).+?(?=\r\n)", RegexOptions.IgnoreCase).Value.ToString(); - + EncodingcomboBox.Text = Regex.Match(settings, @"(?<=Encoding:).+?(?=\r\n)", RegexOptions.IgnoreCase).Value.ToString(); } } diff --git a/LrcHelper/LrcHelper.csproj b/LrcHelper/LrcHelper.csproj index 8b64a99..3e82c27 100644 --- a/LrcHelper/LrcHelper.csproj +++ b/LrcHelper/LrcHelper.csproj @@ -9,7 +9,7 @@ Properties LrcHelper 163lrc - v4.7.2 + v4.5 512 true false @@ -70,7 +70,8 @@ LrcHelper_TemporaryKey.pfx - 163lrc512.ico + + @@ -152,7 +153,6 @@ - diff --git a/LrcHelper/Properties/AssemblyInfo.cs b/LrcHelper/Properties/AssemblyInfo.cs index 4a5dadc..cae7d07 100644 --- a/LrcHelper/Properties/AssemblyInfo.cs +++ b/LrcHelper/Properties/AssemblyInfo.cs @@ -11,7 +11,7 @@ [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("163lrc")] -[assembly: AssemblyCopyright("Copyright © 2019 ludoux")] +[assembly: AssemblyCopyright("Copyright © 2020 ludoux")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] @@ -34,6 +34,6 @@ // 方法是按如下所示使用“*”: : // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("2.1.1.0")] +[assembly: AssemblyFileVersion("2.2.0.0")] [assembly: NeutralResourcesLanguage("en-001")] diff --git a/LrcHelper/Properties/Settings.Designer.cs b/LrcHelper/Properties/Settings.Designer.cs index fd3455b..0f726b4 100644 --- a/LrcHelper/Properties/Settings.Designer.cs +++ b/LrcHelper/Properties/Settings.Designer.cs @@ -12,7 +12,7 @@ namespace LrcHelper.Properties { [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.1.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.4.0.0")] internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));