From bc4f639fb4f51881beae6be92bac3a31371450cb Mon Sep 17 00:00:00 2001 From: fumiichan <35658068+fumiichan@users.noreply.github.com> Date: Mon, 16 Sep 2024 21:29:56 +0900 Subject: [PATCH 01/15] Update RestSharp dependency --- DiscordBee.csproj | 396 +++++++++++++++++++++++----------------------- 1 file changed, 198 insertions(+), 198 deletions(-) diff --git a/DiscordBee.csproj b/DiscordBee.csproj index 544aaa5..52914e4 100644 --- a/DiscordBee.csproj +++ b/DiscordBee.csproj @@ -1,210 +1,210 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {F5D46BA1-6F21-40EF-9695-46105CCACD08} - Library - Properties - MusicBeePlugin - mb_DiscordBee - v4.8 - 512 - - - 3.5 - - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - - - - true - embedded - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - false - - - embedded - true - bin\Release\ - TRACE - prompt - 4 - false - true - - - true - bin\x86\Debug\ - DEBUG;TRACE - full - x86 - prompt - true - true - false - - - bin\x86\Release\ - TRACE - true - pdbonly - x86 - prompt - false - false - false - - - OnOutputUpdated - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Form - - - PlaceholderTableWindow.cs - - - - - Form - - - SettingsWindow.cs - - - Form - - - UploaderHealth.cs - - - - - - - - - - - False - Microsoft .NET Framework 4 %28x86 and x64%29 - true - - - False - .NET Framework 3.5 SP1 Client Profile - false - - - False - .NET Framework 3.5 SP1 - false - - - False - Windows Installer 3.1 - true - - - - - PlaceholderTableWindow.cs - - - SettingsWindow.cs - - - UploaderHealth.cs - - - - - 1.1.3.18 - - - 13.0.3 - - - 109.0.1 - - - 109.0.1 - - - - - - - - - - - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {F5D46BA1-6F21-40EF-9695-46105CCACD08} + Library + Properties + MusicBeePlugin + mb_DiscordBee + v4.8 + 512 + + + 3.5 + + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + false + true + + + + true + embedded + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + false + + + embedded + true + bin\Release\ + TRACE + prompt + 4 + false + true + + + true + bin\x86\Debug\ + DEBUG;TRACE + full + x86 + prompt + true + true + false + + + bin\x86\Release\ + TRACE + true + pdbonly + x86 + prompt + false + false + false + + + OnOutputUpdated + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Form + + + PlaceholderTableWindow.cs + + + + + Form + + + SettingsWindow.cs + + + Form + + + UploaderHealth.cs + + + + + + + + + + + False + Microsoft .NET Framework 4 %28x86 and x64%29 + true + + + False + .NET Framework 3.5 SP1 Client Profile + false + + + False + .NET Framework 3.5 SP1 + false + + + False + Windows Installer 3.1 + true + + + + + PlaceholderTableWindow.cs + + + SettingsWindow.cs + + + UploaderHealth.cs + + + + + 1.1.3.18 + + + 13.0.3 + + + 112.0.0 + + + 112.0.0 + + + + + + + + + + + @echo on powershell -NoProfile -Command "Start-Process cmd -ArgumentList('/C', 'mkdir \"$(TargetDir)DiscordBee\"')" powershell -NoProfile -Command "Start-Process cmd -ArgumentList('/C', 'move \"$(TargetDir)*.*\" \"$(TargetDir)DiscordBee\"')" powershell -NoProfile -Command "Start-Process cmd -ArgumentList('/C', 'move \"$(TargetDir)DiscordBee\mb*.*\" \"$(TargetDir)\"')" -if $(ConfigurationName) == Debug powershell -NoProfile -Command "Start-Process cmd -ArgumentList('/C', 'xcopy \"$(TargetDir)*.*\" \"C:\Program Files (x86)\MusicBee\Plugins\" /S /Y')" -Verb RunAs && exit - +if $(ConfigurationName) == Debug powershell -NoProfile -Command "Start-Process cmd -ArgumentList('/C', 'xcopy \"$(TargetDir)*.*\" \"C:\Program Files (x86)\MusicBee\Plugins\" /S /Y')" -Verb RunAs && exit + + --> \ No newline at end of file From 25f4d9dcc75ef940ae8e0f891d0f904831bf44ea Mon Sep 17 00:00:00 2001 From: fumiichan <35658068+fumiichan@users.noreply.github.com> Date: Mon, 16 Sep 2024 21:43:44 +0900 Subject: [PATCH 02/15] Experimental: changing type to Playing --- .gitmodules | 4 ++ 3rdparty/discord-rpc-sharp | 1 + DiscordBee.cs | 3 +- DiscordBee.csproj | 10 ++-- DiscordBee.sln | 100 ++++++++++++++++++++----------------- 5 files changed, 68 insertions(+), 50 deletions(-) create mode 100644 .gitmodules create mode 160000 3rdparty/discord-rpc-sharp diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..c4b1719 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,4 @@ +[submodule "3rdparty/discord-rpc-sharp"] + path = 3rdparty/discord-rpc-sharp + url = https://github.com/na-2n/discord-rpc-csharp.git + branch = feature/activity-type diff --git a/3rdparty/discord-rpc-sharp b/3rdparty/discord-rpc-sharp new file mode 160000 index 0000000..3e3614c --- /dev/null +++ b/3rdparty/discord-rpc-sharp @@ -0,0 +1 @@ +Subproject commit 3e3614c88d73dd1b28379d6c94a08b04991c8bd2 diff --git a/DiscordBee.cs b/DiscordBee.cs index 9da9812..cb6eacb 100644 --- a/DiscordBee.cs +++ b/DiscordBee.cs @@ -252,7 +252,8 @@ private void UpdateDiscordPresence(PlayState playerGetPlayState) { Assets = new Assets(), Party = new Party(), - Timestamps = new Timestamps() + Timestamps = new Timestamps(), + Type = ActivityType.Playing }; // Discord allows only strings with a min length of 2 or the update fails diff --git a/DiscordBee.csproj b/DiscordBee.csproj index 52914e4..587037b 100644 --- a/DiscordBee.csproj +++ b/DiscordBee.csproj @@ -171,9 +171,6 @@ - - 1.1.3.18 - 13.0.3 @@ -190,7 +187,12 @@ - + + + {4af0c232-feb9-426e-9ca2-ac3813498a0e} + DiscordRPC + + @echo on diff --git a/DiscordBee.sln b/DiscordBee.sln index a9fae4e..03e0064 100644 --- a/DiscordBee.sln +++ b/DiscordBee.sln @@ -1,45 +1,55 @@ -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 17 -VisualStudioVersion = 17.0.31612.314 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DiscordBee", "DiscordBee.csproj", "{F5D46BA1-6F21-40EF-9695-46105CCACD08}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{8F1B1E1B-6E5B-448B-A06F-EA5B5713A675}" - ProjectSection(SolutionItems) = preProject - .editorconfig = .editorconfig - EndProjectSection -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tests", "Tests\Tests.csproj", "{B6364AD2-6708-4459-9AD7-AF7DF4CF9B85}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Debug|x86 = Debug|x86 - Release|Any CPU = Release|Any CPU - Release|x86 = Release|x86 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {F5D46BA1-6F21-40EF-9695-46105CCACD08}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {F5D46BA1-6F21-40EF-9695-46105CCACD08}.Debug|Any CPU.Build.0 = Debug|Any CPU - {F5D46BA1-6F21-40EF-9695-46105CCACD08}.Debug|x86.ActiveCfg = Debug|x86 - {F5D46BA1-6F21-40EF-9695-46105CCACD08}.Debug|x86.Build.0 = Debug|x86 - {F5D46BA1-6F21-40EF-9695-46105CCACD08}.Release|Any CPU.ActiveCfg = Release|Any CPU - {F5D46BA1-6F21-40EF-9695-46105CCACD08}.Release|Any CPU.Build.0 = Release|Any CPU - {F5D46BA1-6F21-40EF-9695-46105CCACD08}.Release|x86.ActiveCfg = Release|x86 - {F5D46BA1-6F21-40EF-9695-46105CCACD08}.Release|x86.Build.0 = Release|x86 - {B6364AD2-6708-4459-9AD7-AF7DF4CF9B85}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {B6364AD2-6708-4459-9AD7-AF7DF4CF9B85}.Debug|Any CPU.Build.0 = Debug|Any CPU - {B6364AD2-6708-4459-9AD7-AF7DF4CF9B85}.Debug|x86.ActiveCfg = Debug|Any CPU - {B6364AD2-6708-4459-9AD7-AF7DF4CF9B85}.Debug|x86.Build.0 = Debug|Any CPU - {B6364AD2-6708-4459-9AD7-AF7DF4CF9B85}.Release|Any CPU.ActiveCfg = Release|Any CPU - {B6364AD2-6708-4459-9AD7-AF7DF4CF9B85}.Release|Any CPU.Build.0 = Release|Any CPU - {B6364AD2-6708-4459-9AD7-AF7DF4CF9B85}.Release|x86.ActiveCfg = Release|Any CPU - {B6364AD2-6708-4459-9AD7-AF7DF4CF9B85}.Release|x86.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {72C98A12-0694-4F41-A637-0F071393E20D} - EndGlobalSection -EndGlobal +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31612.314 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DiscordBee", "DiscordBee.csproj", "{F5D46BA1-6F21-40EF-9695-46105CCACD08}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{8F1B1E1B-6E5B-448B-A06F-EA5B5713A675}" + ProjectSection(SolutionItems) = preProject + .editorconfig = .editorconfig + EndProjectSection +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tests", "Tests\Tests.csproj", "{B6364AD2-6708-4459-9AD7-AF7DF4CF9B85}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DiscordRPC", "3rdparty\discord-rpc-sharp\DiscordRPC\DiscordRPC.csproj", "{4AF0C232-FEB9-426E-9CA2-AC3813498A0E}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Debug|x86 = Debug|x86 + Release|Any CPU = Release|Any CPU + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {F5D46BA1-6F21-40EF-9695-46105CCACD08}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F5D46BA1-6F21-40EF-9695-46105CCACD08}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F5D46BA1-6F21-40EF-9695-46105CCACD08}.Debug|x86.ActiveCfg = Debug|x86 + {F5D46BA1-6F21-40EF-9695-46105CCACD08}.Debug|x86.Build.0 = Debug|x86 + {F5D46BA1-6F21-40EF-9695-46105CCACD08}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F5D46BA1-6F21-40EF-9695-46105CCACD08}.Release|Any CPU.Build.0 = Release|Any CPU + {F5D46BA1-6F21-40EF-9695-46105CCACD08}.Release|x86.ActiveCfg = Release|x86 + {F5D46BA1-6F21-40EF-9695-46105CCACD08}.Release|x86.Build.0 = Release|x86 + {B6364AD2-6708-4459-9AD7-AF7DF4CF9B85}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B6364AD2-6708-4459-9AD7-AF7DF4CF9B85}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B6364AD2-6708-4459-9AD7-AF7DF4CF9B85}.Debug|x86.ActiveCfg = Debug|Any CPU + {B6364AD2-6708-4459-9AD7-AF7DF4CF9B85}.Debug|x86.Build.0 = Debug|Any CPU + {B6364AD2-6708-4459-9AD7-AF7DF4CF9B85}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B6364AD2-6708-4459-9AD7-AF7DF4CF9B85}.Release|Any CPU.Build.0 = Release|Any CPU + {B6364AD2-6708-4459-9AD7-AF7DF4CF9B85}.Release|x86.ActiveCfg = Release|Any CPU + {B6364AD2-6708-4459-9AD7-AF7DF4CF9B85}.Release|x86.Build.0 = Release|Any CPU + {4AF0C232-FEB9-426E-9CA2-AC3813498A0E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4AF0C232-FEB9-426E-9CA2-AC3813498A0E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4AF0C232-FEB9-426E-9CA2-AC3813498A0E}.Debug|x86.ActiveCfg = Debug|Any CPU + {4AF0C232-FEB9-426E-9CA2-AC3813498A0E}.Debug|x86.Build.0 = Debug|Any CPU + {4AF0C232-FEB9-426E-9CA2-AC3813498A0E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4AF0C232-FEB9-426E-9CA2-AC3813498A0E}.Release|Any CPU.Build.0 = Release|Any CPU + {4AF0C232-FEB9-426E-9CA2-AC3813498A0E}.Release|x86.ActiveCfg = Release|Any CPU + {4AF0C232-FEB9-426E-9CA2-AC3813498A0E}.Release|x86.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {72C98A12-0694-4F41-A637-0F071393E20D} + EndGlobalSection +EndGlobal From c9fa0eee68d121c0fb6ba3d351881710aa7ee190 Mon Sep 17 00:00:00 2001 From: fumiichan <35658068+fumiichan@users.noreply.github.com> Date: Mon, 16 Sep 2024 21:44:23 +0900 Subject: [PATCH 03/15] Experimental: changing type to Listening --- DiscordBee.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DiscordBee.cs b/DiscordBee.cs index cb6eacb..6103ab1 100644 --- a/DiscordBee.cs +++ b/DiscordBee.cs @@ -253,7 +253,7 @@ private void UpdateDiscordPresence(PlayState playerGetPlayState) Assets = new Assets(), Party = new Party(), Timestamps = new Timestamps(), - Type = ActivityType.Playing + Type = ActivityType.Listening }; // Discord allows only strings with a min length of 2 or the update fails From 9d7261eeb0cff6bcced99ae715f0e3585dc139db Mon Sep 17 00:00:00 2001 From: fumiichan <35658068+fumiichan@users.noreply.github.com> Date: Mon, 16 Sep 2024 22:05:25 +0900 Subject: [PATCH 04/15] Refactor: use TryParse instead of Parse and trycatch --- DiscordBee.cs | 38 +++++++++++++++----------------------- 1 file changed, 15 insertions(+), 23 deletions(-) diff --git a/DiscordBee.cs b/DiscordBee.cs index 6103ab1..25c4dfd 100644 --- a/DiscordBee.cs +++ b/DiscordBee.cs @@ -377,32 +377,24 @@ void SetImage(string name, bool forceHideSmallImage = false) _discordPresence.Details = padString(_layoutHandler.Render(_settings.PresenceDetails, metaDataDict, _settings.Separator)); - var trackcnt = -1; - var trackno = -1; - try - { - trackcnt = int.Parse(_layoutHandler.Render(_settings.PresenceTrackCnt, metaDataDict, _settings.Separator)); - trackno = int.Parse(_layoutHandler.Render(_settings.PresenceTrackNo, metaDataDict, _settings.Separator)); - } -#pragma warning disable RCS1075 // Avoid empty catch clause that catches System.Exception. - catch (Exception) -#pragma warning restore RCS1075 // Avoid empty catch clause that catches System.Exception. - { - // ignored - } + var trackcnt = _layoutHandler.Render(_settings.PresenceTrackCnt, metaDataDict, _settings.Separator); + var trackno = _layoutHandler.Render(_settings.PresenceTrackNo, metaDataDict, _settings.Separator); - if (trackcnt < trackno || trackcnt <= 0 || trackno <= 0) - { - _discordPresence.Party = null; - } - else + if (int.TryParse(trackcnt, out var trackCount) && int.TryParse(trackno, out var trackNumber)) { - _discordPresence.Party = new Party + if (trackCount < trackNumber || trackCount <= 0 || trackNumber <= 0) { - ID = "aaaa", - Max = trackcnt, - Size = trackno - }; + _discordPresence.Party = null; + } + else + { + _discordPresence.Party = new Party + { + ID = "aaaa", + Max = trackCount, + Size = trackNumber + }; + } } if (!_settings.UpdatePresenceWhenStopped && (playerGetPlayState == PlayState.Paused || playerGetPlayState == PlayState.Stopped)) From 45177c9b609fc8511b03ccc49098f88d5886f5a8 Mon Sep 17 00:00:00 2001 From: fumiichan <35658068+fumiichan@users.noreply.github.com> Date: Tue, 17 Sep 2024 22:21:11 +0900 Subject: [PATCH 05/15] Experimental: display progress bar instead of elapsed/remaining time --- DiscordBee.cs | 21 +- Settings.cs | 8 - UI/SettingsWindow.Designer.cs | 1004 ++++++++++++++++----------------- UI/SettingsWindow.cs | 2 - UI/SettingsWindow.resx | 238 ++++---- 5 files changed, 617 insertions(+), 656 deletions(-) diff --git a/DiscordBee.cs b/DiscordBee.cs index 25c4dfd..999bb32 100644 --- a/DiscordBee.cs +++ b/DiscordBee.cs @@ -341,18 +341,9 @@ void SetImage(string name, bool forceHideSmallImage = false) if (_settings.ShowTime) { - if (_settings.ShowRemainingTime) - { - // show remaining time - // subtract current track position from total duration for position seeking - var totalRemainingDuration = _mbApiInterface.NowPlaying_GetDuration() - _mbApiInterface.Player_GetPosition(); - _discordPresence.Timestamps.EndUnixMilliseconds = (ulong)(Math.Round(t.TotalSeconds) + Math.Round(totalRemainingDuration / 1000.0)); - } - else - { - // show elapsed time - _discordPresence.Timestamps.StartUnixMilliseconds = (ulong)(Math.Round(t.TotalSeconds) - Math.Round(_mbApiInterface.Player_GetPosition() / 1000.0)); - } + var totalRemainingDuration = _mbApiInterface.NowPlaying_GetDuration() - _mbApiInterface.Player_GetPosition(); + _discordPresence.Timestamps.EndUnixMilliseconds = (ulong)(Math.Round(t.TotalSeconds) + Math.Round(totalRemainingDuration / 1000.0)); + _discordPresence.Timestamps.StartUnixMilliseconds = (ulong)(Math.Round(t.TotalSeconds) - Math.Round(_mbApiInterface.Player_GetPosition() / 1000.0)); } switch (playerGetPlayState) @@ -382,11 +373,7 @@ void SetImage(string name, bool forceHideSmallImage = false) if (int.TryParse(trackcnt, out var trackCount) && int.TryParse(trackno, out var trackNumber)) { - if (trackCount < trackNumber || trackCount <= 0 || trackNumber <= 0) - { - _discordPresence.Party = null; - } - else + if (trackCount > trackNumber && trackCount > 0 && trackNumber > 0) { _discordPresence.Party = new Party { diff --git a/Settings.cs b/Settings.cs index 82bc38f..7acf5e6 100644 --- a/Settings.cs +++ b/Settings.cs @@ -139,14 +139,6 @@ public bool ShowTime set => SetIfChanged("_showTime", value); } - [DataMember] private bool? _showRemainingTime; - - public bool ShowRemainingTime - { - get => _showRemainingTime == true; - set => SetIfChanged("_showRemainingTime", value); - } - [DataMember] private bool? _textOnly; public bool TextOnly diff --git a/UI/SettingsWindow.Designer.cs b/UI/SettingsWindow.Designer.cs index af52651..5cd1859 100644 --- a/UI/SettingsWindow.Designer.cs +++ b/UI/SettingsWindow.Designer.cs @@ -28,515 +28,500 @@ protected override void Dispose(bool disposing) /// private void InitializeComponent() { - this.textBoxSmallImage = new System.Windows.Forms.TextBox(); - this.label4 = new System.Windows.Forms.Label(); - this.textBoxTrackCnt = new System.Windows.Forms.TextBox(); - this.label3 = new System.Windows.Forms.Label(); - this.textBoxTrackNo = new System.Windows.Forms.TextBox(); - this.label2 = new System.Windows.Forms.Label(); - this.textBoxState = new System.Windows.Forms.TextBox(); - this.textBoxDetails = new System.Windows.Forms.TextBox(); - this.label1 = new System.Windows.Forms.Label(); - this.textBoxLargeImage = new System.Windows.Forms.TextBox(); - this.checkBoxTextOnly = new System.Windows.Forms.CheckBox(); - this.checkBoxShowRemainingTime = new System.Windows.Forms.CheckBox(); - this.checkBoxPresenceUpdate = new System.Windows.Forms.CheckBox(); - this.textBoxSeparator = new System.Windows.Forms.TextBox(); - this.label5 = new System.Windows.Forms.Label(); - this.buttonRestoreDefaults = new System.Windows.Forms.Button(); - this.buttonSaveClose = new System.Windows.Forms.Button(); - this.buttonPlaceholders = new System.Windows.Forms.Button(); - this.panel2 = new System.Windows.Forms.Panel(); - this.labelImgurClientId = new System.Windows.Forms.Label(); - this.textBoxImgurClientId = new System.Windows.Forms.TextBox(); - this.customButtonToggle = new System.Windows.Forms.CheckBox(); - this.checkBoxShowOnlyNonPlayingState = new System.Windows.Forms.CheckBox(); - this.checkBoxShowPlayState = new System.Windows.Forms.CheckBox(); - this.checkBoxShowTime = new System.Windows.Forms.CheckBox(); - this.checkBoxArtworkUpload = new System.Windows.Forms.CheckBox(); - this.labelDiscordAppId = new System.Windows.Forms.Label(); - this.textBoxDiscordAppId = new System.Windows.Forms.TextBox(); - this.panel3 = new System.Windows.Forms.Panel(); - this.panel4 = new System.Windows.Forms.Panel(); - this.label9 = new System.Windows.Forms.Label(); - this.customButtonUrl = new System.Windows.Forms.TextBox(); - this.label8 = new System.Windows.Forms.Label(); - this.customButtonLabel = new System.Windows.Forms.TextBox(); - this.panel2.SuspendLayout(); - this.panel3.SuspendLayout(); - this.panel4.SuspendLayout(); - this.SuspendLayout(); - // - // textBoxSmallImage - // - this.textBoxSmallImage.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(114)))), ((int)(((byte)(137)))), ((int)(((byte)(218))))); - this.textBoxSmallImage.Font = new System.Drawing.Font("Arial", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.textBoxSmallImage.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(226)))), ((int)(((byte)(230)))), ((int)(((byte)(246))))); - this.textBoxSmallImage.Location = new System.Drawing.Point(12, 71); - this.textBoxSmallImage.Name = "textBoxSmallImage"; - this.textBoxSmallImage.Size = new System.Drawing.Size(90, 25); - this.textBoxSmallImage.TabIndex = 9; - this.textBoxSmallImage.Text = "Small Image Text"; - // - // label4 - // - this.label4.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.label4.AutoSize = true; - this.label4.Font = new System.Drawing.Font("Arial", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label4.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(226)))), ((int)(((byte)(230)))), ((int)(((byte)(246))))); - this.label4.Location = new System.Drawing.Point(492, 66); - this.label4.Name = "label4"; - this.label4.Size = new System.Drawing.Size(13, 17); - this.label4.TabIndex = 8; - this.label4.Text = ")"; - // - // textBoxTrackCnt - // - this.textBoxTrackCnt.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.textBoxTrackCnt.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(114)))), ((int)(((byte)(137)))), ((int)(((byte)(218))))); - this.textBoxTrackCnt.Font = new System.Drawing.Font("Arial", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.textBoxTrackCnt.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(226)))), ((int)(((byte)(230)))), ((int)(((byte)(246))))); - this.textBoxTrackCnt.Location = new System.Drawing.Point(414, 63); - this.textBoxTrackCnt.Name = "textBoxTrackCnt"; - this.textBoxTrackCnt.Size = new System.Drawing.Size(74, 25); - this.textBoxTrackCnt.TabIndex = 7; - this.textBoxTrackCnt.Text = "PartyMax"; - // - // label3 - // - this.label3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.label3.AutoSize = true; - this.label3.Font = new System.Drawing.Font("Arial", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(226)))), ((int)(((byte)(230)))), ((int)(((byte)(246))))); - this.label3.Location = new System.Drawing.Point(388, 66); - this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(20, 17); - this.label3.TabIndex = 6; - this.label3.Text = "of"; - // - // textBoxTrackNo - // - this.textBoxTrackNo.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.textBoxTrackNo.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(114)))), ((int)(((byte)(137)))), ((int)(((byte)(218))))); - this.textBoxTrackNo.Font = new System.Drawing.Font("Arial", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.textBoxTrackNo.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(226)))), ((int)(((byte)(230)))), ((int)(((byte)(246))))); - this.textBoxTrackNo.Location = new System.Drawing.Point(310, 63); - this.textBoxTrackNo.Name = "textBoxTrackNo"; - this.textBoxTrackNo.Size = new System.Drawing.Size(74, 25); - this.textBoxTrackNo.TabIndex = 5; - this.textBoxTrackNo.Text = "PartyNo"; - // - // label2 - // - this.label2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.label2.AutoSize = true; - this.label2.Font = new System.Drawing.Font("Arial", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(226)))), ((int)(((byte)(230)))), ((int)(((byte)(246))))); - this.label2.Location = new System.Drawing.Point(291, 66); - this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(13, 17); - this.label2.TabIndex = 4; - this.label2.Text = "("; - // - // textBoxState - // - this.textBoxState.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.textBoxState.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(114)))), ((int)(((byte)(137)))), ((int)(((byte)(218))))); - this.textBoxState.Font = new System.Drawing.Font("Arial", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.textBoxState.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(226)))), ((int)(((byte)(230)))), ((int)(((byte)(246))))); - this.textBoxState.Location = new System.Drawing.Point(108, 63); - this.textBoxState.Name = "textBoxState"; - this.textBoxState.Size = new System.Drawing.Size(177, 25); - this.textBoxState.TabIndex = 3; - this.textBoxState.Text = "Presence state"; - // - // textBoxDetails - // - this.textBoxDetails.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.textBoxDetails.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(114)))), ((int)(((byte)(137)))), ((int)(((byte)(218))))); - this.textBoxDetails.Font = new System.Drawing.Font("Arial", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.textBoxDetails.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(226)))), ((int)(((byte)(230)))), ((int)(((byte)(246))))); - this.textBoxDetails.Location = new System.Drawing.Point(108, 32); - this.textBoxDetails.Name = "textBoxDetails"; - this.textBoxDetails.Size = new System.Drawing.Size(276, 25); - this.textBoxDetails.TabIndex = 2; - this.textBoxDetails.Text = "Presence details"; - // - // label1 - // - this.label1.AutoSize = true; - this.label1.Font = new System.Drawing.Font("Arial", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(226)))), ((int)(((byte)(230)))), ((int)(((byte)(246))))); - this.label1.Location = new System.Drawing.Point(108, 10); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(84, 19); - this.label1.TabIndex = 1; - this.label1.Text = "MusicBee"; - // - // textBoxLargeImage - // - this.textBoxLargeImage.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(114)))), ((int)(((byte)(137)))), ((int)(((byte)(218))))); - this.textBoxLargeImage.Font = new System.Drawing.Font("Arial", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.textBoxLargeImage.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(226)))), ((int)(((byte)(230)))), ((int)(((byte)(246))))); - this.textBoxLargeImage.Location = new System.Drawing.Point(12, 9); - this.textBoxLargeImage.Multiline = true; - this.textBoxLargeImage.Name = "textBoxLargeImage"; - this.textBoxLargeImage.Size = new System.Drawing.Size(90, 60); - this.textBoxLargeImage.TabIndex = 0; - this.textBoxLargeImage.Text = "Large Image Text"; - // - // checkBoxTextOnly - // - this.checkBoxTextOnly.AutoSize = true; - this.checkBoxTextOnly.ForeColor = System.Drawing.Color.Black; - this.checkBoxTextOnly.Location = new System.Drawing.Point(266, 91); - this.checkBoxTextOnly.Margin = new System.Windows.Forms.Padding(4); - this.checkBoxTextOnly.Name = "checkBoxTextOnly"; - this.checkBoxTextOnly.Padding = new System.Windows.Forms.Padding(2); - this.checkBoxTextOnly.Size = new System.Drawing.Size(176, 21); - this.checkBoxTextOnly.TabIndex = 7; - this.checkBoxTextOnly.Text = "Remove images from presence"; - this.checkBoxTextOnly.UseVisualStyleBackColor = true; - // - // checkBoxShowRemainingTime - // - this.checkBoxShowRemainingTime.AutoSize = true; - this.checkBoxShowRemainingTime.ForeColor = System.Drawing.Color.Black; - this.checkBoxShowRemainingTime.Location = new System.Drawing.Point(266, 64); - this.checkBoxShowRemainingTime.Margin = new System.Windows.Forms.Padding(4); - this.checkBoxShowRemainingTime.Name = "checkBoxShowRemainingTime"; - this.checkBoxShowRemainingTime.Padding = new System.Windows.Forms.Padding(2); - this.checkBoxShowRemainingTime.Size = new System.Drawing.Size(216, 21); - this.checkBoxShowRemainingTime.TabIndex = 6; - this.checkBoxShowRemainingTime.Text = "Show remaining instead of elapsed time"; - this.checkBoxShowRemainingTime.UseVisualStyleBackColor = true; - // - // checkBoxPresenceUpdate - // - this.checkBoxPresenceUpdate.AutoSize = true; - this.checkBoxPresenceUpdate.ForeColor = System.Drawing.Color.Black; - this.checkBoxPresenceUpdate.Location = new System.Drawing.Point(266, 6); - this.checkBoxPresenceUpdate.Margin = new System.Windows.Forms.Padding(4); - this.checkBoxPresenceUpdate.Name = "checkBoxPresenceUpdate"; - this.checkBoxPresenceUpdate.Padding = new System.Windows.Forms.Padding(2); - this.checkBoxPresenceUpdate.Size = new System.Drawing.Size(224, 21); - this.checkBoxPresenceUpdate.TabIndex = 5; - this.checkBoxPresenceUpdate.Text = "Show presence when no music is playing"; - this.checkBoxPresenceUpdate.UseVisualStyleBackColor = true; - // - // textBoxSeparator - // - this.textBoxSeparator.Font = new System.Drawing.Font("Arial", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.textBoxSeparator.Location = new System.Drawing.Point(87, 3); - this.textBoxSeparator.Name = "textBoxSeparator"; - this.textBoxSeparator.Size = new System.Drawing.Size(87, 25); - this.textBoxSeparator.TabIndex = 4; - // - // label5 - // - this.label5.AutoSize = true; - this.label5.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label5.ForeColor = System.Drawing.Color.Black; - this.label5.Location = new System.Drawing.Point(14, 7); - this.label5.Name = "label5"; - this.label5.Size = new System.Drawing.Size(70, 15); - this.label5.TabIndex = 0; - this.label5.Text = "Separators:"; - // - // buttonRestoreDefaults - // - this.buttonRestoreDefaults.AutoSize = true; - this.buttonRestoreDefaults.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; - this.buttonRestoreDefaults.Dock = System.Windows.Forms.DockStyle.Right; - this.buttonRestoreDefaults.Location = new System.Drawing.Point(316, 0); - this.buttonRestoreDefaults.Margin = new System.Windows.Forms.Padding(10); - this.buttonRestoreDefaults.Name = "buttonRestoreDefaults"; - this.buttonRestoreDefaults.Padding = new System.Windows.Forms.Padding(5); - this.buttonRestoreDefaults.Size = new System.Drawing.Size(106, 30); - this.buttonRestoreDefaults.TabIndex = 2; - this.buttonRestoreDefaults.Text = "Restore Defaults"; - this.buttonRestoreDefaults.UseVisualStyleBackColor = true; - this.buttonRestoreDefaults.Click += new System.EventHandler(this.buttonRestoreDefaults_Click); - // - // buttonSaveClose - // - this.buttonSaveClose.AutoSize = true; - this.buttonSaveClose.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; - this.buttonSaveClose.Dock = System.Windows.Forms.DockStyle.Right; - this.buttonSaveClose.Location = new System.Drawing.Point(422, 0); - this.buttonSaveClose.Margin = new System.Windows.Forms.Padding(10); - this.buttonSaveClose.Name = "buttonSaveClose"; - this.buttonSaveClose.Padding = new System.Windows.Forms.Padding(5); - this.buttonSaveClose.Size = new System.Drawing.Size(102, 30); - this.buttonSaveClose.TabIndex = 0; - this.buttonSaveClose.Text = "Save and Close"; - this.buttonSaveClose.UseVisualStyleBackColor = true; - this.buttonSaveClose.Click += new System.EventHandler(this.buttonSaveClose_Click); - // - // buttonPlaceholders - // - this.buttonPlaceholders.AutoSize = true; - this.buttonPlaceholders.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; - this.buttonPlaceholders.Dock = System.Windows.Forms.DockStyle.Left; - this.buttonPlaceholders.Location = new System.Drawing.Point(0, 0); - this.buttonPlaceholders.Margin = new System.Windows.Forms.Padding(10); - this.buttonPlaceholders.Name = "buttonPlaceholders"; - this.buttonPlaceholders.Padding = new System.Windows.Forms.Padding(5); - this.buttonPlaceholders.Size = new System.Drawing.Size(88, 30); - this.buttonPlaceholders.TabIndex = 1; - this.buttonPlaceholders.Text = "Placeholders"; - this.buttonPlaceholders.UseVisualStyleBackColor = true; - this.buttonPlaceholders.Click += new System.EventHandler(this.buttonPlaceholders_Click); - // - // panel2 - // - this.panel2.AutoSize = true; - this.panel2.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; - this.panel2.BackColor = System.Drawing.Color.Transparent; - this.panel2.Controls.Add(this.labelImgurClientId); - this.panel2.Controls.Add(this.textBoxImgurClientId); - this.panel2.Controls.Add(this.customButtonToggle); - this.panel2.Controls.Add(this.checkBoxShowOnlyNonPlayingState); - this.panel2.Controls.Add(this.checkBoxShowPlayState); - this.panel2.Controls.Add(this.checkBoxShowTime); - this.panel2.Controls.Add(this.checkBoxArtworkUpload); - this.panel2.Controls.Add(this.labelDiscordAppId); - this.panel2.Controls.Add(this.textBoxDiscordAppId); - this.panel2.Controls.Add(this.label5); - this.panel2.Controls.Add(this.textBoxSeparator); - this.panel2.Controls.Add(this.checkBoxShowRemainingTime); - this.panel2.Controls.Add(this.checkBoxTextOnly); - this.panel2.Controls.Add(this.checkBoxPresenceUpdate); - this.panel2.Dock = System.Windows.Forms.DockStyle.Fill; - this.panel2.Location = new System.Drawing.Point(0, 157); - this.panel2.MinimumSize = new System.Drawing.Size(0, 100); - this.panel2.Name = "panel2"; - this.panel2.Size = new System.Drawing.Size(524, 204); - this.panel2.TabIndex = 1; - // - // labelImgurClientId - // - this.labelImgurClientId.AutoSize = true; - this.labelImgurClientId.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.labelImgurClientId.ForeColor = System.Drawing.Color.Black; - this.labelImgurClientId.Location = new System.Drawing.Point(14, 65); - this.labelImgurClientId.Name = "labelImgurClientId"; - this.labelImgurClientId.Size = new System.Drawing.Size(88, 15); - this.labelImgurClientId.TabIndex = 19; - this.labelImgurClientId.Text = "Imgur Client ID"; - // - // textBoxImgurClientId - // - this.textBoxImgurClientId.Font = new System.Drawing.Font("Arial", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.textBoxImgurClientId.Location = new System.Drawing.Point(108, 62); - this.textBoxImgurClientId.Name = "textBoxImgurClientId"; - this.textBoxImgurClientId.Size = new System.Drawing.Size(151, 25); - this.textBoxImgurClientId.TabIndex = 20; - this.textBoxImgurClientId.TextChanged += new System.EventHandler(this.textBoxImgurClientId_TextChanged); - // - // customButtonToggle - // - this.customButtonToggle.AutoSize = true; - this.customButtonToggle.ForeColor = System.Drawing.Color.Black; - this.customButtonToggle.Location = new System.Drawing.Point(266, 118); - this.customButtonToggle.Margin = new System.Windows.Forms.Padding(4); - this.customButtonToggle.Name = "customButtonToggle"; - this.customButtonToggle.Padding = new System.Windows.Forms.Padding(2); - this.customButtonToggle.Size = new System.Drawing.Size(135, 21); - this.customButtonToggle.TabIndex = 18; - this.customButtonToggle.Text = "Enable Custom Button"; - this.customButtonToggle.UseVisualStyleBackColor = true; - // - // checkBoxShowOnlyNonPlayingState - // - this.checkBoxShowOnlyNonPlayingState.AutoSize = true; - this.checkBoxShowOnlyNonPlayingState.Checked = true; - this.checkBoxShowOnlyNonPlayingState.CheckState = System.Windows.Forms.CheckState.Checked; - this.checkBoxShowOnlyNonPlayingState.ForeColor = System.Drawing.Color.Black; - this.checkBoxShowOnlyNonPlayingState.Location = new System.Drawing.Point(17, 145); - this.checkBoxShowOnlyNonPlayingState.Margin = new System.Windows.Forms.Padding(4); - this.checkBoxShowOnlyNonPlayingState.Name = "checkBoxShowOnlyNonPlayingState"; - this.checkBoxShowOnlyNonPlayingState.Padding = new System.Windows.Forms.Padding(2); - this.checkBoxShowOnlyNonPlayingState.Size = new System.Drawing.Size(210, 21); - this.checkBoxShowOnlyNonPlayingState.TabIndex = 13; - this.checkBoxShowOnlyNonPlayingState.Text = "Don\'t show playing state when playing"; - this.checkBoxShowOnlyNonPlayingState.UseVisualStyleBackColor = true; - // - // checkBoxShowPlayState - // - this.checkBoxShowPlayState.AutoSize = true; - this.checkBoxShowPlayState.Checked = true; - this.checkBoxShowPlayState.CheckState = System.Windows.Forms.CheckState.Checked; - this.checkBoxShowPlayState.ForeColor = System.Drawing.Color.Black; - this.checkBoxShowPlayState.Location = new System.Drawing.Point(17, 118); - this.checkBoxShowPlayState.Margin = new System.Windows.Forms.Padding(4); - this.checkBoxShowPlayState.Name = "checkBoxShowPlayState"; - this.checkBoxShowPlayState.Padding = new System.Windows.Forms.Padding(2); - this.checkBoxShowPlayState.Size = new System.Drawing.Size(195, 21); - this.checkBoxShowPlayState.TabIndex = 12; - this.checkBoxShowPlayState.Text = "Show playing state on album cover"; - this.checkBoxShowPlayState.UseVisualStyleBackColor = true; - // - // checkBoxShowTime - // - this.checkBoxShowTime.AutoSize = true; - this.checkBoxShowTime.Checked = true; - this.checkBoxShowTime.CheckState = System.Windows.Forms.CheckState.Checked; - this.checkBoxShowTime.ForeColor = System.Drawing.Color.Black; - this.checkBoxShowTime.Location = new System.Drawing.Point(266, 34); - this.checkBoxShowTime.Margin = new System.Windows.Forms.Padding(4); - this.checkBoxShowTime.Name = "checkBoxShowTime"; - this.checkBoxShowTime.Padding = new System.Windows.Forms.Padding(2); - this.checkBoxShowTime.Size = new System.Drawing.Size(79, 21); - this.checkBoxShowTime.TabIndex = 11; - this.checkBoxShowTime.Text = "Show time"; - this.checkBoxShowTime.UseVisualStyleBackColor = true; - // - // checkBoxArtworkUpload - // - this.checkBoxArtworkUpload.AutoSize = true; - this.checkBoxArtworkUpload.BackColor = System.Drawing.Color.Transparent; - this.checkBoxArtworkUpload.ForeColor = System.Drawing.Color.Black; - this.checkBoxArtworkUpload.Location = new System.Drawing.Point(17, 91); - this.checkBoxArtworkUpload.Margin = new System.Windows.Forms.Padding(4); - this.checkBoxArtworkUpload.Name = "checkBoxArtworkUpload"; - this.checkBoxArtworkUpload.Padding = new System.Windows.Forms.Padding(2); - this.checkBoxArtworkUpload.Size = new System.Drawing.Size(130, 21); - this.checkBoxArtworkUpload.TabIndex = 10; - this.checkBoxArtworkUpload.Text = "Upload album covers"; - this.checkBoxArtworkUpload.UseVisualStyleBackColor = false; - this.checkBoxArtworkUpload.CheckedChanged += new System.EventHandler(this.checkBoxArtworkUpload_CheckedChanged); - // - // labelDiscordAppId - // - this.labelDiscordAppId.AutoSize = true; - this.labelDiscordAppId.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.labelDiscordAppId.ForeColor = System.Drawing.Color.Black; - this.labelDiscordAppId.Location = new System.Drawing.Point(14, 35); - this.labelDiscordAppId.Name = "labelDiscordAppId"; - this.labelDiscordAppId.Size = new System.Drawing.Size(91, 15); - this.labelDiscordAppId.TabIndex = 8; - this.labelDiscordAppId.Text = "Discord App ID:"; - // - // textBoxDiscordAppId - // - this.textBoxDiscordAppId.Font = new System.Drawing.Font("Arial", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.textBoxDiscordAppId.Location = new System.Drawing.Point(108, 32); - this.textBoxDiscordAppId.Name = "textBoxDiscordAppId"; - this.textBoxDiscordAppId.Size = new System.Drawing.Size(151, 25); - this.textBoxDiscordAppId.TabIndex = 9; - this.textBoxDiscordAppId.TextChanged += new System.EventHandler(this.textBoxDiscordAppId_TextChanged); - // - // panel3 - // - this.panel3.AutoScroll = true; - this.panel3.AutoSize = true; - this.panel3.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; - this.panel3.BackColor = System.Drawing.Color.Transparent; - this.panel3.Controls.Add(this.buttonRestoreDefaults); - this.panel3.Controls.Add(this.buttonPlaceholders); - this.panel3.Controls.Add(this.buttonSaveClose); - this.panel3.Dock = System.Windows.Forms.DockStyle.Bottom; - this.panel3.Location = new System.Drawing.Point(0, 361); - this.panel3.MinimumSize = new System.Drawing.Size(0, 30); - this.panel3.Name = "panel3"; - this.panel3.Size = new System.Drawing.Size(524, 30); - this.panel3.TabIndex = 2; - // - // panel4 - // - this.panel4.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; - this.panel4.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(114)))), ((int)(((byte)(137)))), ((int)(((byte)(218))))); - this.panel4.Controls.Add(this.label9); - this.panel4.Controls.Add(this.customButtonUrl); - this.panel4.Controls.Add(this.label8); - this.panel4.Controls.Add(this.customButtonLabel); - this.panel4.Controls.Add(this.textBoxSmallImage); - this.panel4.Controls.Add(this.textBoxLargeImage); - this.panel4.Controls.Add(this.label4); - this.panel4.Controls.Add(this.label1); - this.panel4.Controls.Add(this.textBoxTrackCnt); - this.panel4.Controls.Add(this.textBoxDetails); - this.panel4.Controls.Add(this.label3); - this.panel4.Controls.Add(this.textBoxState); - this.panel4.Controls.Add(this.textBoxTrackNo); - this.panel4.Controls.Add(this.label2); - this.panel4.Dock = System.Windows.Forms.DockStyle.Top; - this.panel4.Location = new System.Drawing.Point(0, 0); - this.panel4.Name = "panel4"; - this.panel4.Size = new System.Drawing.Size(524, 157); - this.panel4.TabIndex = 1; - // - // label9 - // - this.label9.AutoSize = true; - this.label9.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label9.ForeColor = System.Drawing.Color.White; - this.label9.Location = new System.Drawing.Point(198, 99); - this.label9.Name = "label9"; - this.label9.Size = new System.Drawing.Size(241, 15); - this.label9.TabIndex = 19; - this.label9.Text = "Custom Button Url (Supports Placeholders)"; - // - // customButtonUrl - // - this.customButtonUrl.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.customButtonUrl.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(114)))), ((int)(((byte)(137)))), ((int)(((byte)(218))))); - this.customButtonUrl.Font = new System.Drawing.Font("Arial", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.customButtonUrl.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(226)))), ((int)(((byte)(230)))), ((int)(((byte)(246))))); - this.customButtonUrl.Location = new System.Drawing.Point(198, 117); - this.customButtonUrl.Name = "customButtonUrl"; - this.customButtonUrl.Size = new System.Drawing.Size(290, 25); - this.customButtonUrl.TabIndex = 20; - this.customButtonUrl.TextChanged += new System.EventHandler(this.customButtonUrl_TextChanged); - // - // label8 - // - this.label8.AutoSize = true; - this.label8.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label8.ForeColor = System.Drawing.Color.White; - this.label8.Location = new System.Drawing.Point(9, 99); - this.label8.Name = "label8"; - this.label8.Size = new System.Drawing.Size(124, 15); - this.label8.TabIndex = 19; - this.label8.Text = "Custom Button Label:"; - // - // customButtonLabel - // - this.customButtonLabel.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(114)))), ((int)(((byte)(137)))), ((int)(((byte)(218))))); - this.customButtonLabel.Font = new System.Drawing.Font("Arial", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.customButtonLabel.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(226)))), ((int)(((byte)(230)))), ((int)(((byte)(246))))); - this.customButtonLabel.Location = new System.Drawing.Point(12, 117); - this.customButtonLabel.Name = "customButtonLabel"; - this.customButtonLabel.Size = new System.Drawing.Size(177, 25); - this.customButtonLabel.TabIndex = 10; - // - // SettingsWindow - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.AutoSize = true; - this.BackColor = System.Drawing.Color.White; - this.ClientSize = new System.Drawing.Size(524, 391); - this.Controls.Add(this.panel2); - this.Controls.Add(this.panel3); - this.Controls.Add(this.panel4); - this.MinimumSize = new System.Drawing.Size(523, 274); - this.Name = "SettingsWindow"; - this.ShowIcon = false; - this.Text = "DiscordBee Settings"; - this.panel2.ResumeLayout(false); - this.panel2.PerformLayout(); - this.panel3.ResumeLayout(false); - this.panel3.PerformLayout(); - this.panel4.ResumeLayout(false); - this.panel4.PerformLayout(); - this.ResumeLayout(false); - this.PerformLayout(); - + this.textBoxSmallImage = new System.Windows.Forms.TextBox(); + this.label4 = new System.Windows.Forms.Label(); + this.textBoxTrackCnt = new System.Windows.Forms.TextBox(); + this.label3 = new System.Windows.Forms.Label(); + this.textBoxTrackNo = new System.Windows.Forms.TextBox(); + this.label2 = new System.Windows.Forms.Label(); + this.textBoxState = new System.Windows.Forms.TextBox(); + this.textBoxDetails = new System.Windows.Forms.TextBox(); + this.label1 = new System.Windows.Forms.Label(); + this.textBoxLargeImage = new System.Windows.Forms.TextBox(); + this.checkBoxTextOnly = new System.Windows.Forms.CheckBox(); + this.checkBoxPresenceUpdate = new System.Windows.Forms.CheckBox(); + this.textBoxSeparator = new System.Windows.Forms.TextBox(); + this.label5 = new System.Windows.Forms.Label(); + this.buttonRestoreDefaults = new System.Windows.Forms.Button(); + this.buttonSaveClose = new System.Windows.Forms.Button(); + this.buttonPlaceholders = new System.Windows.Forms.Button(); + this.panel2 = new System.Windows.Forms.Panel(); + this.labelImgurClientId = new System.Windows.Forms.Label(); + this.textBoxImgurClientId = new System.Windows.Forms.TextBox(); + this.customButtonToggle = new System.Windows.Forms.CheckBox(); + this.checkBoxShowOnlyNonPlayingState = new System.Windows.Forms.CheckBox(); + this.checkBoxShowPlayState = new System.Windows.Forms.CheckBox(); + this.checkBoxShowTime = new System.Windows.Forms.CheckBox(); + this.checkBoxArtworkUpload = new System.Windows.Forms.CheckBox(); + this.labelDiscordAppId = new System.Windows.Forms.Label(); + this.textBoxDiscordAppId = new System.Windows.Forms.TextBox(); + this.panel3 = new System.Windows.Forms.Panel(); + this.panel4 = new System.Windows.Forms.Panel(); + this.label9 = new System.Windows.Forms.Label(); + this.customButtonUrl = new System.Windows.Forms.TextBox(); + this.label8 = new System.Windows.Forms.Label(); + this.customButtonLabel = new System.Windows.Forms.TextBox(); + this.panel2.SuspendLayout(); + this.panel3.SuspendLayout(); + this.panel4.SuspendLayout(); + this.SuspendLayout(); + // + // textBoxSmallImage + // + this.textBoxSmallImage.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(114)))), ((int)(((byte)(137)))), ((int)(((byte)(218))))); + this.textBoxSmallImage.Font = new System.Drawing.Font("Arial", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.textBoxSmallImage.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(226)))), ((int)(((byte)(230)))), ((int)(((byte)(246))))); + this.textBoxSmallImage.Location = new System.Drawing.Point(12, 71); + this.textBoxSmallImage.Name = "textBoxSmallImage"; + this.textBoxSmallImage.Size = new System.Drawing.Size(90, 25); + this.textBoxSmallImage.TabIndex = 9; + this.textBoxSmallImage.Text = "Small Image Text"; + // + // label4 + // + this.label4.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.label4.AutoSize = true; + this.label4.Font = new System.Drawing.Font("Arial", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label4.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(226)))), ((int)(((byte)(230)))), ((int)(((byte)(246))))); + this.label4.Location = new System.Drawing.Point(492, 66); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(13, 17); + this.label4.TabIndex = 8; + this.label4.Text = ")"; + // + // textBoxTrackCnt + // + this.textBoxTrackCnt.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.textBoxTrackCnt.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(114)))), ((int)(((byte)(137)))), ((int)(((byte)(218))))); + this.textBoxTrackCnt.Font = new System.Drawing.Font("Arial", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.textBoxTrackCnt.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(226)))), ((int)(((byte)(230)))), ((int)(((byte)(246))))); + this.textBoxTrackCnt.Location = new System.Drawing.Point(414, 63); + this.textBoxTrackCnt.Name = "textBoxTrackCnt"; + this.textBoxTrackCnt.Size = new System.Drawing.Size(74, 25); + this.textBoxTrackCnt.TabIndex = 7; + this.textBoxTrackCnt.Text = "PartyMax"; + // + // label3 + // + this.label3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.label3.AutoSize = true; + this.label3.Font = new System.Drawing.Font("Arial", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(226)))), ((int)(((byte)(230)))), ((int)(((byte)(246))))); + this.label3.Location = new System.Drawing.Point(388, 66); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(20, 17); + this.label3.TabIndex = 6; + this.label3.Text = "of"; + // + // textBoxTrackNo + // + this.textBoxTrackNo.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.textBoxTrackNo.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(114)))), ((int)(((byte)(137)))), ((int)(((byte)(218))))); + this.textBoxTrackNo.Font = new System.Drawing.Font("Arial", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.textBoxTrackNo.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(226)))), ((int)(((byte)(230)))), ((int)(((byte)(246))))); + this.textBoxTrackNo.Location = new System.Drawing.Point(310, 63); + this.textBoxTrackNo.Name = "textBoxTrackNo"; + this.textBoxTrackNo.Size = new System.Drawing.Size(74, 25); + this.textBoxTrackNo.TabIndex = 5; + this.textBoxTrackNo.Text = "PartyNo"; + // + // label2 + // + this.label2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.label2.AutoSize = true; + this.label2.Font = new System.Drawing.Font("Arial", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(226)))), ((int)(((byte)(230)))), ((int)(((byte)(246))))); + this.label2.Location = new System.Drawing.Point(291, 66); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(13, 17); + this.label2.TabIndex = 4; + this.label2.Text = "("; + // + // textBoxState + // + this.textBoxState.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.textBoxState.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(114)))), ((int)(((byte)(137)))), ((int)(((byte)(218))))); + this.textBoxState.Font = new System.Drawing.Font("Arial", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.textBoxState.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(226)))), ((int)(((byte)(230)))), ((int)(((byte)(246))))); + this.textBoxState.Location = new System.Drawing.Point(108, 63); + this.textBoxState.Name = "textBoxState"; + this.textBoxState.Size = new System.Drawing.Size(177, 25); + this.textBoxState.TabIndex = 3; + this.textBoxState.Text = "Presence state"; + // + // textBoxDetails + // + this.textBoxDetails.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.textBoxDetails.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(114)))), ((int)(((byte)(137)))), ((int)(((byte)(218))))); + this.textBoxDetails.Font = new System.Drawing.Font("Arial", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.textBoxDetails.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(226)))), ((int)(((byte)(230)))), ((int)(((byte)(246))))); + this.textBoxDetails.Location = new System.Drawing.Point(108, 32); + this.textBoxDetails.Name = "textBoxDetails"; + this.textBoxDetails.Size = new System.Drawing.Size(276, 25); + this.textBoxDetails.TabIndex = 2; + this.textBoxDetails.Text = "Presence details"; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Font = new System.Drawing.Font("Arial", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(226)))), ((int)(((byte)(230)))), ((int)(((byte)(246))))); + this.label1.Location = new System.Drawing.Point(108, 10); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(84, 19); + this.label1.TabIndex = 1; + this.label1.Text = "MusicBee"; + // + // textBoxLargeImage + // + this.textBoxLargeImage.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(114)))), ((int)(((byte)(137)))), ((int)(((byte)(218))))); + this.textBoxLargeImage.Font = new System.Drawing.Font("Arial", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.textBoxLargeImage.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(226)))), ((int)(((byte)(230)))), ((int)(((byte)(246))))); + this.textBoxLargeImage.Location = new System.Drawing.Point(12, 9); + this.textBoxLargeImage.Multiline = true; + this.textBoxLargeImage.Name = "textBoxLargeImage"; + this.textBoxLargeImage.Size = new System.Drawing.Size(90, 60); + this.textBoxLargeImage.TabIndex = 0; + this.textBoxLargeImage.Text = "Large Image Text"; + // + // checkBoxTextOnly + // + this.checkBoxTextOnly.AutoSize = true; + this.checkBoxTextOnly.ForeColor = System.Drawing.Color.Black; + this.checkBoxTextOnly.Location = new System.Drawing.Point(266, 60); + this.checkBoxTextOnly.Margin = new System.Windows.Forms.Padding(4); + this.checkBoxTextOnly.Name = "checkBoxTextOnly"; + this.checkBoxTextOnly.Padding = new System.Windows.Forms.Padding(2); + this.checkBoxTextOnly.Size = new System.Drawing.Size(176, 21); + this.checkBoxTextOnly.TabIndex = 7; + this.checkBoxTextOnly.Text = "Remove images from presence"; + this.checkBoxTextOnly.UseVisualStyleBackColor = true; + // + // checkBoxPresenceUpdate + // + this.checkBoxPresenceUpdate.AutoSize = true; + this.checkBoxPresenceUpdate.ForeColor = System.Drawing.Color.Black; + this.checkBoxPresenceUpdate.Location = new System.Drawing.Point(266, 6); + this.checkBoxPresenceUpdate.Margin = new System.Windows.Forms.Padding(4); + this.checkBoxPresenceUpdate.Name = "checkBoxPresenceUpdate"; + this.checkBoxPresenceUpdate.Padding = new System.Windows.Forms.Padding(2); + this.checkBoxPresenceUpdate.Size = new System.Drawing.Size(224, 21); + this.checkBoxPresenceUpdate.TabIndex = 5; + this.checkBoxPresenceUpdate.Text = "Show presence when no music is playing"; + this.checkBoxPresenceUpdate.UseVisualStyleBackColor = true; + // + // textBoxSeparator + // + this.textBoxSeparator.Font = new System.Drawing.Font("Arial", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.textBoxSeparator.Location = new System.Drawing.Point(87, 3); + this.textBoxSeparator.Name = "textBoxSeparator"; + this.textBoxSeparator.Size = new System.Drawing.Size(87, 25); + this.textBoxSeparator.TabIndex = 4; + // + // label5 + // + this.label5.AutoSize = true; + this.label5.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label5.ForeColor = System.Drawing.Color.Black; + this.label5.Location = new System.Drawing.Point(14, 7); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(70, 15); + this.label5.TabIndex = 0; + this.label5.Text = "Separators:"; + // + // buttonRestoreDefaults + // + this.buttonRestoreDefaults.AutoSize = true; + this.buttonRestoreDefaults.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.buttonRestoreDefaults.Dock = System.Windows.Forms.DockStyle.Right; + this.buttonRestoreDefaults.Location = new System.Drawing.Point(316, 0); + this.buttonRestoreDefaults.Margin = new System.Windows.Forms.Padding(10); + this.buttonRestoreDefaults.Name = "buttonRestoreDefaults"; + this.buttonRestoreDefaults.Padding = new System.Windows.Forms.Padding(5); + this.buttonRestoreDefaults.Size = new System.Drawing.Size(106, 30); + this.buttonRestoreDefaults.TabIndex = 2; + this.buttonRestoreDefaults.Text = "Restore Defaults"; + this.buttonRestoreDefaults.UseVisualStyleBackColor = true; + this.buttonRestoreDefaults.Click += new System.EventHandler(this.buttonRestoreDefaults_Click); + // + // buttonSaveClose + // + this.buttonSaveClose.AutoSize = true; + this.buttonSaveClose.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.buttonSaveClose.Dock = System.Windows.Forms.DockStyle.Right; + this.buttonSaveClose.Location = new System.Drawing.Point(422, 0); + this.buttonSaveClose.Margin = new System.Windows.Forms.Padding(10); + this.buttonSaveClose.Name = "buttonSaveClose"; + this.buttonSaveClose.Padding = new System.Windows.Forms.Padding(5); + this.buttonSaveClose.Size = new System.Drawing.Size(102, 30); + this.buttonSaveClose.TabIndex = 0; + this.buttonSaveClose.Text = "Save and Close"; + this.buttonSaveClose.UseVisualStyleBackColor = true; + this.buttonSaveClose.Click += new System.EventHandler(this.buttonSaveClose_Click); + // + // buttonPlaceholders + // + this.buttonPlaceholders.AutoSize = true; + this.buttonPlaceholders.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.buttonPlaceholders.Dock = System.Windows.Forms.DockStyle.Left; + this.buttonPlaceholders.Location = new System.Drawing.Point(0, 0); + this.buttonPlaceholders.Margin = new System.Windows.Forms.Padding(10); + this.buttonPlaceholders.Name = "buttonPlaceholders"; + this.buttonPlaceholders.Padding = new System.Windows.Forms.Padding(5); + this.buttonPlaceholders.Size = new System.Drawing.Size(88, 30); + this.buttonPlaceholders.TabIndex = 1; + this.buttonPlaceholders.Text = "Placeholders"; + this.buttonPlaceholders.UseVisualStyleBackColor = true; + this.buttonPlaceholders.Click += new System.EventHandler(this.buttonPlaceholders_Click); + // + // panel2 + // + this.panel2.AutoSize = true; + this.panel2.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.panel2.BackColor = System.Drawing.Color.Transparent; + this.panel2.Controls.Add(this.labelImgurClientId); + this.panel2.Controls.Add(this.textBoxImgurClientId); + this.panel2.Controls.Add(this.customButtonToggle); + this.panel2.Controls.Add(this.checkBoxShowOnlyNonPlayingState); + this.panel2.Controls.Add(this.checkBoxShowPlayState); + this.panel2.Controls.Add(this.checkBoxShowTime); + this.panel2.Controls.Add(this.checkBoxArtworkUpload); + this.panel2.Controls.Add(this.labelDiscordAppId); + this.panel2.Controls.Add(this.textBoxDiscordAppId); + this.panel2.Controls.Add(this.label5); + this.panel2.Controls.Add(this.textBoxSeparator); + this.panel2.Controls.Add(this.checkBoxTextOnly); + this.panel2.Controls.Add(this.checkBoxPresenceUpdate); + this.panel2.Dock = System.Windows.Forms.DockStyle.Fill; + this.panel2.Location = new System.Drawing.Point(0, 157); + this.panel2.MinimumSize = new System.Drawing.Size(0, 100); + this.panel2.Name = "panel2"; + this.panel2.Size = new System.Drawing.Size(524, 204); + this.panel2.TabIndex = 1; + // + // labelImgurClientId + // + this.labelImgurClientId.AutoSize = true; + this.labelImgurClientId.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.labelImgurClientId.ForeColor = System.Drawing.Color.Black; + this.labelImgurClientId.Location = new System.Drawing.Point(14, 65); + this.labelImgurClientId.Name = "labelImgurClientId"; + this.labelImgurClientId.Size = new System.Drawing.Size(88, 15); + this.labelImgurClientId.TabIndex = 19; + this.labelImgurClientId.Text = "Imgur Client ID"; + // + // textBoxImgurClientId + // + this.textBoxImgurClientId.Font = new System.Drawing.Font("Arial", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.textBoxImgurClientId.Location = new System.Drawing.Point(108, 62); + this.textBoxImgurClientId.Name = "textBoxImgurClientId"; + this.textBoxImgurClientId.Size = new System.Drawing.Size(151, 25); + this.textBoxImgurClientId.TabIndex = 20; + this.textBoxImgurClientId.TextChanged += new System.EventHandler(this.textBoxImgurClientId_TextChanged); + // + // customButtonToggle + // + this.customButtonToggle.AutoSize = true; + this.customButtonToggle.ForeColor = System.Drawing.Color.Black; + this.customButtonToggle.Location = new System.Drawing.Point(266, 84); + this.customButtonToggle.Margin = new System.Windows.Forms.Padding(4); + this.customButtonToggle.Name = "customButtonToggle"; + this.customButtonToggle.Padding = new System.Windows.Forms.Padding(2); + this.customButtonToggle.Size = new System.Drawing.Size(135, 21); + this.customButtonToggle.TabIndex = 18; + this.customButtonToggle.Text = "Enable Custom Button"; + this.customButtonToggle.UseVisualStyleBackColor = true; + // + // checkBoxShowOnlyNonPlayingState + // + this.checkBoxShowOnlyNonPlayingState.AutoSize = true; + this.checkBoxShowOnlyNonPlayingState.Checked = true; + this.checkBoxShowOnlyNonPlayingState.CheckState = System.Windows.Forms.CheckState.Checked; + this.checkBoxShowOnlyNonPlayingState.ForeColor = System.Drawing.Color.Black; + this.checkBoxShowOnlyNonPlayingState.Location = new System.Drawing.Point(17, 145); + this.checkBoxShowOnlyNonPlayingState.Margin = new System.Windows.Forms.Padding(4); + this.checkBoxShowOnlyNonPlayingState.Name = "checkBoxShowOnlyNonPlayingState"; + this.checkBoxShowOnlyNonPlayingState.Padding = new System.Windows.Forms.Padding(2); + this.checkBoxShowOnlyNonPlayingState.Size = new System.Drawing.Size(210, 21); + this.checkBoxShowOnlyNonPlayingState.TabIndex = 13; + this.checkBoxShowOnlyNonPlayingState.Text = "Don\'t show playing state when playing"; + this.checkBoxShowOnlyNonPlayingState.UseVisualStyleBackColor = true; + // + // checkBoxShowPlayState + // + this.checkBoxShowPlayState.AutoSize = true; + this.checkBoxShowPlayState.Checked = true; + this.checkBoxShowPlayState.CheckState = System.Windows.Forms.CheckState.Checked; + this.checkBoxShowPlayState.ForeColor = System.Drawing.Color.Black; + this.checkBoxShowPlayState.Location = new System.Drawing.Point(17, 118); + this.checkBoxShowPlayState.Margin = new System.Windows.Forms.Padding(4); + this.checkBoxShowPlayState.Name = "checkBoxShowPlayState"; + this.checkBoxShowPlayState.Padding = new System.Windows.Forms.Padding(2); + this.checkBoxShowPlayState.Size = new System.Drawing.Size(195, 21); + this.checkBoxShowPlayState.TabIndex = 12; + this.checkBoxShowPlayState.Text = "Show playing state on album cover"; + this.checkBoxShowPlayState.UseVisualStyleBackColor = true; + // + // checkBoxShowTime + // + this.checkBoxShowTime.AutoSize = true; + this.checkBoxShowTime.Checked = true; + this.checkBoxShowTime.CheckState = System.Windows.Forms.CheckState.Checked; + this.checkBoxShowTime.ForeColor = System.Drawing.Color.Black; + this.checkBoxShowTime.Location = new System.Drawing.Point(266, 34); + this.checkBoxShowTime.Margin = new System.Windows.Forms.Padding(4); + this.checkBoxShowTime.Name = "checkBoxShowTime"; + this.checkBoxShowTime.Padding = new System.Windows.Forms.Padding(2); + this.checkBoxShowTime.Size = new System.Drawing.Size(79, 21); + this.checkBoxShowTime.TabIndex = 11; + this.checkBoxShowTime.Text = "Show time"; + this.checkBoxShowTime.UseVisualStyleBackColor = true; + // + // checkBoxArtworkUpload + // + this.checkBoxArtworkUpload.AutoSize = true; + this.checkBoxArtworkUpload.BackColor = System.Drawing.Color.Transparent; + this.checkBoxArtworkUpload.ForeColor = System.Drawing.Color.Black; + this.checkBoxArtworkUpload.Location = new System.Drawing.Point(17, 91); + this.checkBoxArtworkUpload.Margin = new System.Windows.Forms.Padding(4); + this.checkBoxArtworkUpload.Name = "checkBoxArtworkUpload"; + this.checkBoxArtworkUpload.Padding = new System.Windows.Forms.Padding(2); + this.checkBoxArtworkUpload.Size = new System.Drawing.Size(130, 21); + this.checkBoxArtworkUpload.TabIndex = 10; + this.checkBoxArtworkUpload.Text = "Upload album covers"; + this.checkBoxArtworkUpload.UseVisualStyleBackColor = false; + this.checkBoxArtworkUpload.CheckedChanged += new System.EventHandler(this.checkBoxArtworkUpload_CheckedChanged); + // + // labelDiscordAppId + // + this.labelDiscordAppId.AutoSize = true; + this.labelDiscordAppId.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.labelDiscordAppId.ForeColor = System.Drawing.Color.Black; + this.labelDiscordAppId.Location = new System.Drawing.Point(14, 35); + this.labelDiscordAppId.Name = "labelDiscordAppId"; + this.labelDiscordAppId.Size = new System.Drawing.Size(91, 15); + this.labelDiscordAppId.TabIndex = 8; + this.labelDiscordAppId.Text = "Discord App ID:"; + // + // textBoxDiscordAppId + // + this.textBoxDiscordAppId.Font = new System.Drawing.Font("Arial", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.textBoxDiscordAppId.Location = new System.Drawing.Point(108, 32); + this.textBoxDiscordAppId.Name = "textBoxDiscordAppId"; + this.textBoxDiscordAppId.Size = new System.Drawing.Size(151, 25); + this.textBoxDiscordAppId.TabIndex = 9; + this.textBoxDiscordAppId.TextChanged += new System.EventHandler(this.textBoxDiscordAppId_TextChanged); + // + // panel3 + // + this.panel3.AutoScroll = true; + this.panel3.AutoSize = true; + this.panel3.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.panel3.BackColor = System.Drawing.Color.Transparent; + this.panel3.Controls.Add(this.buttonRestoreDefaults); + this.panel3.Controls.Add(this.buttonPlaceholders); + this.panel3.Controls.Add(this.buttonSaveClose); + this.panel3.Dock = System.Windows.Forms.DockStyle.Bottom; + this.panel3.Location = new System.Drawing.Point(0, 361); + this.panel3.MinimumSize = new System.Drawing.Size(0, 30); + this.panel3.Name = "panel3"; + this.panel3.Size = new System.Drawing.Size(524, 30); + this.panel3.TabIndex = 2; + // + // panel4 + // + this.panel4.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.panel4.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(114)))), ((int)(((byte)(137)))), ((int)(((byte)(218))))); + this.panel4.Controls.Add(this.label9); + this.panel4.Controls.Add(this.customButtonUrl); + this.panel4.Controls.Add(this.label8); + this.panel4.Controls.Add(this.customButtonLabel); + this.panel4.Controls.Add(this.textBoxSmallImage); + this.panel4.Controls.Add(this.textBoxLargeImage); + this.panel4.Controls.Add(this.label4); + this.panel4.Controls.Add(this.label1); + this.panel4.Controls.Add(this.textBoxTrackCnt); + this.panel4.Controls.Add(this.textBoxDetails); + this.panel4.Controls.Add(this.label3); + this.panel4.Controls.Add(this.textBoxState); + this.panel4.Controls.Add(this.textBoxTrackNo); + this.panel4.Controls.Add(this.label2); + this.panel4.Dock = System.Windows.Forms.DockStyle.Top; + this.panel4.Location = new System.Drawing.Point(0, 0); + this.panel4.Name = "panel4"; + this.panel4.Size = new System.Drawing.Size(524, 157); + this.panel4.TabIndex = 1; + // + // label9 + // + this.label9.AutoSize = true; + this.label9.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label9.ForeColor = System.Drawing.Color.White; + this.label9.Location = new System.Drawing.Point(198, 99); + this.label9.Name = "label9"; + this.label9.Size = new System.Drawing.Size(241, 15); + this.label9.TabIndex = 19; + this.label9.Text = "Custom Button Url (Supports Placeholders)"; + // + // customButtonUrl + // + this.customButtonUrl.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.customButtonUrl.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(114)))), ((int)(((byte)(137)))), ((int)(((byte)(218))))); + this.customButtonUrl.Font = new System.Drawing.Font("Arial", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.customButtonUrl.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(226)))), ((int)(((byte)(230)))), ((int)(((byte)(246))))); + this.customButtonUrl.Location = new System.Drawing.Point(198, 117); + this.customButtonUrl.Name = "customButtonUrl"; + this.customButtonUrl.Size = new System.Drawing.Size(290, 25); + this.customButtonUrl.TabIndex = 20; + this.customButtonUrl.TextChanged += new System.EventHandler(this.customButtonUrl_TextChanged); + // + // label8 + // + this.label8.AutoSize = true; + this.label8.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label8.ForeColor = System.Drawing.Color.White; + this.label8.Location = new System.Drawing.Point(9, 99); + this.label8.Name = "label8"; + this.label8.Size = new System.Drawing.Size(124, 15); + this.label8.TabIndex = 19; + this.label8.Text = "Custom Button Label:"; + // + // customButtonLabel + // + this.customButtonLabel.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(114)))), ((int)(((byte)(137)))), ((int)(((byte)(218))))); + this.customButtonLabel.Font = new System.Drawing.Font("Arial", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.customButtonLabel.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(226)))), ((int)(((byte)(230)))), ((int)(((byte)(246))))); + this.customButtonLabel.Location = new System.Drawing.Point(12, 117); + this.customButtonLabel.Name = "customButtonLabel"; + this.customButtonLabel.Size = new System.Drawing.Size(177, 25); + this.customButtonLabel.TabIndex = 10; + // + // SettingsWindow + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.AutoSize = true; + this.BackColor = System.Drawing.Color.White; + this.ClientSize = new System.Drawing.Size(524, 391); + this.Controls.Add(this.panel2); + this.Controls.Add(this.panel3); + this.Controls.Add(this.panel4); + this.MinimumSize = new System.Drawing.Size(523, 274); + this.Name = "SettingsWindow"; + this.ShowIcon = false; + this.Text = "DiscordBee Settings"; + this.panel2.ResumeLayout(false); + this.panel2.PerformLayout(); + this.panel3.ResumeLayout(false); + this.panel3.PerformLayout(); + this.panel4.ResumeLayout(false); + this.panel4.PerformLayout(); + this.ResumeLayout(false); + this.PerformLayout(); + } private System.Windows.Forms.TextBox customButtonUrl; @@ -561,7 +546,6 @@ private void InitializeComponent() private System.Windows.Forms.Label label5; private System.Windows.Forms.Button buttonRestoreDefaults; private System.Windows.Forms.CheckBox checkBoxPresenceUpdate; - private System.Windows.Forms.CheckBox checkBoxShowRemainingTime; private System.Windows.Forms.TextBox textBoxSmallImage; private System.Windows.Forms.CheckBox checkBoxTextOnly; private System.Windows.Forms.Panel panel2; diff --git a/UI/SettingsWindow.cs b/UI/SettingsWindow.cs index 2784dc4..0445dd8 100644 --- a/UI/SettingsWindow.cs +++ b/UI/SettingsWindow.cs @@ -61,7 +61,6 @@ private void UpdateValues(Settings settings) textBoxImgurClientId.Text = settings.ImgurClientId.Equals(Settings.defaults["ImgurClientId"]) ? "" : settings.ImgurClientId; checkBoxPresenceUpdate.Checked = settings.UpdatePresenceWhenStopped; checkBoxShowTime.Checked = settings.ShowTime; - checkBoxShowRemainingTime.Checked = settings.ShowRemainingTime; checkBoxTextOnly.Checked = settings.TextOnly; checkBoxShowPlayState.Checked = settings.ShowPlayState; checkBoxShowOnlyNonPlayingState.Checked = settings.ShowOnlyNonPlayingState; @@ -105,7 +104,6 @@ private void buttonSaveClose_Click(object sender, EventArgs e) _settings.ImgurClientId = string.IsNullOrWhiteSpace(textBoxImgurClientId.Text) ? null : textBoxImgurClientId.Text; _settings.UpdatePresenceWhenStopped = checkBoxPresenceUpdate.Checked; _settings.ShowTime = checkBoxShowTime.Checked; - _settings.ShowRemainingTime = checkBoxShowRemainingTime.Checked; _settings.TextOnly = checkBoxTextOnly.Checked; _settings.ShowPlayState = checkBoxShowPlayState.Checked; _settings.ShowOnlyNonPlayingState = checkBoxShowOnlyNonPlayingState.Checked; diff --git a/UI/SettingsWindow.resx b/UI/SettingsWindow.resx index d58980a..c7e0d4b 100644 --- a/UI/SettingsWindow.resx +++ b/UI/SettingsWindow.resx @@ -1,120 +1,120 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + \ No newline at end of file From 8e00be6bb1fc5c4313289ac5c7e850996144d1a4 Mon Sep 17 00:00:00 2001 From: fumiichan <35658068+fumiichan@users.noreply.github.com> Date: Thu, 19 Sep 2024 03:44:32 +0900 Subject: [PATCH 06/15] A bit of cleanup --- DiscordBee.cs | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/DiscordBee.cs b/DiscordBee.cs index 999bb32..96fa433 100644 --- a/DiscordBee.cs +++ b/DiscordBee.cs @@ -251,8 +251,6 @@ private void UpdateDiscordPresence(PlayState playerGetPlayState) RichPresence _discordPresence = new RichPresence { Assets = new Assets(), - Party = new Party(), - Timestamps = new Timestamps(), Type = ActivityType.Listening }; @@ -339,11 +337,14 @@ void SetImage(string name, bool forceHideSmallImage = false) var t = DateTime.UtcNow.Subtract(new DateTime(1970, 1, 1)); - if (_settings.ShowTime) + if (_settings.ShowTime && playerGetPlayState == PlayState.Playing) { var totalRemainingDuration = _mbApiInterface.NowPlaying_GetDuration() - _mbApiInterface.Player_GetPosition(); - _discordPresence.Timestamps.EndUnixMilliseconds = (ulong)(Math.Round(t.TotalSeconds) + Math.Round(totalRemainingDuration / 1000.0)); - _discordPresence.Timestamps.StartUnixMilliseconds = (ulong)(Math.Round(t.TotalSeconds) - Math.Round(_mbApiInterface.Player_GetPosition() / 1000.0)); + _discordPresence.Timestamps = new Timestamps + { + StartUnixMilliseconds = (ulong)(Math.Round(t.TotalSeconds) - Math.Round(_mbApiInterface.Player_GetPosition() / 1000.0)), + EndUnixMilliseconds = (ulong)(Math.Round(t.TotalSeconds) + Math.Round(totalRemainingDuration / 1000.0)) + }; } switch (playerGetPlayState) @@ -353,13 +354,9 @@ void SetImage(string name, bool forceHideSmallImage = false) break; case PlayState.Stopped: SetImage(AssetManager.ASSET_STOP); - _discordPresence.Timestamps.Start = null; - _discordPresence.Timestamps.End = null; break; case PlayState.Paused: SetImage(AssetManager.ASSET_PAUSE); - _discordPresence.Timestamps.Start = null; - _discordPresence.Timestamps.End = null; break; case PlayState.Undefined: case PlayState.Loading: From f758953e04becb6d3b108a88c6f2855e6a3186fb Mon Sep 17 00:00:00 2001 From: fumiichan <35658068+fumiichan@users.noreply.github.com> Date: Thu, 19 Sep 2024 03:51:34 +0900 Subject: [PATCH 07/15] Refactor: Use GetAsync/PostAsync instead due to deprecation --- ImgurClient/ImgurClient.cs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/ImgurClient/ImgurClient.cs b/ImgurClient/ImgurClient.cs index a2dee4a..eba512d 100644 --- a/ImgurClient/ImgurClient.cs +++ b/ImgurClient/ImgurClient.cs @@ -4,8 +4,6 @@ namespace MusicBeePlugin.ImgurClient using RestSharp; using RestSharp.Serializers.NewtonsoftJson; using System; - using System.Net; - using System.Threading; using System.Threading.Tasks; public class ImgurClient : IDisposable @@ -21,7 +19,7 @@ public ImgurClient(string clientId) ThrowOnAnyError = true, FollowRedirects = true, PreAuthenticate = true, - MaxTimeout = 20 * 1000, + Timeout = TimeSpan.FromSeconds(20), //Proxy = new WebProxy("http://localhost:8080"), ConfigureMessageHandler = orig => { @@ -67,13 +65,13 @@ public async Task UploadImage(string title, string dataB64, string a public async Task GetAlbum(string albumHash) { - var response = await _client.GetJsonAsync>("album/{albumHash}", new { albumHash }); + var response = await _client.GetAsync>("album/{albumHash}", new { albumHash }); return GetResponseData(response); } public async Task GetAlbumImages(string albumHash) { - var response = await _client.GetJsonAsync>("album/{albumHash}/images", new { albumHash }); + var response = await _client.GetAsync>("album/{albumHash}/images", new { albumHash }); return GetResponseData(response); } From f21bc4626a06da81471724edd7c963ff9ad7822f Mon Sep 17 00:00:00 2001 From: fumiichan <35658068+fumiichan@users.noreply.github.com> Date: Thu, 19 Sep 2024 05:11:16 +0900 Subject: [PATCH 08/15] Experimental: Add secondary button In this commit removes configuration "Enable Custom Button" in favour of having the users pick one, all, or none of the buttons to appear. --- DiscordBee.cs | 46 +++++++++++++------- Settings.cs | 50 ++++++++++++++++++++-- UI/SettingsWindow.Designer.cs | 80 +++++++++++++++++++++++++---------- UI/SettingsWindow.cs | 37 ++++++++++------ 4 files changed, 160 insertions(+), 53 deletions(-) diff --git a/DiscordBee.cs b/DiscordBee.cs index 96fa433..6d5720b 100644 --- a/DiscordBee.cs +++ b/DiscordBee.cs @@ -9,6 +9,7 @@ namespace MusicBeePlugin using System.Collections.Generic; using System.Diagnostics; using System.IO; + using System.Linq; using System.Reflection; using System.Text; using System.Text.RegularExpressions; @@ -257,7 +258,7 @@ private void UpdateDiscordPresence(PlayState playerGetPlayState) // Discord allows only strings with a min length of 2 or the update fails // so add some exotic space (Mongolian vowel separator) to the string if it is smaller // Discord also disallows strings bigger than 128bytes so handle that as well - string padString(string input) + string padString(string input, int maxLength = 128) { if (!string.IsNullOrEmpty(input)) { @@ -265,9 +266,9 @@ string padString(string input) { return input + "\u180E"; } - if (Encoding.UTF8.GetBytes(input).Length > 128) + if (Encoding.UTF8.GetBytes(input).Length > maxLength) { - byte[] buffer = new byte[128]; + byte[] buffer = new byte[maxLength]; char[] inputChars = input.ToCharArray(); Encoding.UTF8.GetEncoder().Convert( chars: inputChars, @@ -287,23 +288,38 @@ string padString(string input) } // Button Functionality - if (_settings.ShowButton) + bool tryCreateButton(string label, string uriValue, out Button button) { - var uri = _layoutHandler.RenderUrl(_settings.ButtonUrl, metaDataDict, '\\'); - Debug.WriteLine($"Url: {uri}"); - - // Validate the URL again. - if (ValidationHelpers.ValidateUri(uri)) + var uri = _layoutHandler.RenderUrl(uriValue, metaDataDict, '\\'); + if (ValidationHelpers.ValidateUri(uriValue) && !string.IsNullOrEmpty(label)) { - _discordPresence.Buttons = new Button[] + button = new Button { - new Button - { - Label = padString(_settings.ButtonLabel), - Url = uri - } + Label = padString(label, 32), + Url = uri }; + + return true; } + + button = null; + return false; + } + + var buttons = new List