From 5d6598517782b44a2523428a791f3e9a83d87da4 Mon Sep 17 00:00:00 2001 From: MaikEight Date: Sat, 15 Apr 2023 22:27:20 +0200 Subject: [PATCH 01/40] =?UTF-8?q?=F0=9F=90=9B=20Fixed=20the=20snackbar=20m?= =?UTF-8?q?essage=20"Data=20refreshing=20failed."=20appearing=20after=20do?= =?UTF-8?q?ing=20captcha.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ExaltAccountManager/UI/UIAccounts.cs | 1 + .../Debug/exaltaccountmanager.exe.licenses | Bin 4305 -> 4272 bytes 2 files changed, 1 insertion(+) diff --git a/ExaltAccountManager/UI/UIAccounts.cs b/ExaltAccountManager/UI/UIAccounts.cs index 09e09656..00098058 100644 --- a/ExaltAccountManager/UI/UIAccounts.cs +++ b/ExaltAccountManager/UI/UIAccounts.cs @@ -575,6 +575,7 @@ private bool RenewTokenFinished(MK_EAM_Lib.AccountInfo _info) if (_info.requestState == MK_EAM_Lib.AccountInfo.RequestState.Captcha) { CaptchaSolverUiUtils.Show(_info, frm, frm.UseDarkmode, frm.LogEvent, "EAM AccUI", frm.accountStatsPath, frm.itemsSaveFilePath, frm.GetDeviceUniqueIdentifier(), string.IsNullOrEmpty(_info.Name), true, RenewTokenFinished_Invoker); + return true; } if (_info.requestState == MK_EAM_Lib.AccountInfo.RequestState.Success) diff --git a/ExaltAccountManager/obj/Debug/exaltaccountmanager.exe.licenses b/ExaltAccountManager/obj/Debug/exaltaccountmanager.exe.licenses index 4aa33adbc3ddfd8ae30c2242f84046d828a2cf7c..d0afeeda0ffa8d9525fe5916da6a3dbdc468c135 100644 GIT binary patch delta 32 ncmcbpxIuA)3a_wysAqU)o?CuVZm~{4QEF~xY3}9--b!Wwy6g){ delta 16 Xcmdm>cu{eK3h!hUZtKl Date: Sat, 15 Apr 2023 22:30:51 +0200 Subject: [PATCH 02/40] =?UTF-8?q?=F0=9F=92=84=20Added=20a=20new=20snackbar?= =?UTF-8?q?=20message=20"Captcha=20failed,=20please=20try=20again.",=20if?= =?UTF-8?q?=20the=20captcha=20aid=20returns=20anything=20other=20than=20OK?= =?UTF-8?q?.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ExaltAccountManager/UI/UIAccounts.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ExaltAccountManager/UI/UIAccounts.cs b/ExaltAccountManager/UI/UIAccounts.cs index 00098058..b84deff6 100644 --- a/ExaltAccountManager/UI/UIAccounts.cs +++ b/ExaltAccountManager/UI/UIAccounts.cs @@ -574,7 +574,13 @@ private bool RenewTokenFinished(MK_EAM_Lib.AccountInfo _info) if (_info.requestState == MK_EAM_Lib.AccountInfo.RequestState.Captcha) { - CaptchaSolverUiUtils.Show(_info, frm, frm.UseDarkmode, frm.LogEvent, "EAM AccUI", frm.accountStatsPath, frm.itemsSaveFilePath, frm.GetDeviceUniqueIdentifier(), string.IsNullOrEmpty(_info.Name), true, RenewTokenFinished_Invoker); + bool result = CaptchaSolverUiUtils.Show(_info, frm, frm.UseDarkmode, frm.LogEvent, "EAM AccUI", frm.accountStatsPath, frm.itemsSaveFilePath, frm.GetDeviceUniqueIdentifier(), string.IsNullOrEmpty(_info.Name), true, RenewTokenFinished_Invoker); + + if (!result) + { + frm.ShowSnackbar("Captcha failed, please try again.", Bunifu.UI.WinForms.BunifuSnackbar.MessageTypes.Error, 5000); + } + return true; } From 795a8ec57ba584c40efc041bfe671899be809b37 Mon Sep 17 00:00:00 2001 From: MaikEight Date: Sun, 16 Apr 2023 23:09:33 +0200 Subject: [PATCH 03/40] =?UTF-8?q?=F0=9F=8E=A8=20Update=20readme.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 919e953e..69d16eb9 100644 --- a/README.md +++ b/README.md @@ -121,7 +121,7 @@ Ping Checker | Vault Peeker ![Ping checker](https://i.imgur.com/txUcbFT.gif) | ![Vault Peeker](https://i.imgur.com/IfFbpMy.png) ## Need support or have questions? 📝 -Just join my discord server and leave me a message in the help-request / general channel and you will be surprised about the response times! +Join my Discord server and leave a message in the help-request or general channel. I respond to inquiries promptly! Don't have discord? @@ -142,10 +142,14 @@ If you want to contribut to this project, please leave me a message in discord a Can't code but want to help anyways? -Preview-testers and feedback is important aswell, if you have a minute to write me your thought about EAM and how it could be improved, please do. +Version-Tests and feedback are important aswell, if you have a minute to write me your thought about EAM and how it could be improved, please do. If you want, you can donate a buck or two, any money generated will be re-invested into this project. -Last puchase: The awesome, custom made application-logo. +Puchases: +- The awesome, custom made application-logo. +- The domain exalt-account-manager.eu. +- A VPS to host the "Analytics"- and "General Services"-API aswell as potential other EAM-services. +- An Open Source Code Signing Certificate to ensure authenticity and integrity of the software. Any help is greatly appreciated 🍻 From 00ca92f1247bf31122868f77e6ea19141e2990ae Mon Sep 17 00:00:00 2001 From: MaikEight Date: Thu, 20 Apr 2023 01:51:16 +0200 Subject: [PATCH 04/40] =?UTF-8?q?=F0=9F=93=9C=20Added=20the=20Contributor?= =?UTF-8?q?=20Covenant=20Code=20of=20Conduct?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CODE_OF_CONDUCT.md | 133 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 133 insertions(+) create mode 100644 CODE_OF_CONDUCT.md diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 00000000..11c149b1 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,133 @@ + +# Contributor Covenant Code of Conduct + +## Our Pledge + +We as members, contributors, and leaders pledge to make participation in our +Exalt Account Manager contributor community a harassment-free experience for everyone, regardless of age, body +size, visible or invisible disability, ethnicity, sex characteristics, gender +identity and expression, level of experience, education, socio-economic status, +nationality, personal appearance, race, caste, color, religion, or sexual +identity and orientation. + +We pledge to act and interact in ways that contribute to an open, welcoming, +diverse, inclusive, and healthy community. + +## Our Standards + +Examples of behavior that contributes to a positive environment for our +community include: + +* Demonstrating empathy and kindness toward other people +* Being respectful of differing opinions, viewpoints, and experiences +* Giving and gracefully accepting constructive feedback +* Accepting responsibility and apologizing to those affected by our mistakes, + and learning from the experience +* Focusing on what is best not just for us as individuals, but for the overall + community + +Examples of unacceptable behavior include: + +* The use of sexualized language or imagery, and sexual attention or advances of + any kind +* Trolling, insulting or derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or email address, + without their explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Enforcement Responsibilities + +Community leaders are responsible for clarifying and enforcing our standards of +acceptable behavior and will take appropriate and fair corrective action in +response to any behavior that they deem inappropriate, threatening, offensive, +or harmful. + +Community leaders have the right and responsibility to remove, edit, or reject +comments, commits, code, wiki edits, issues, and other contributions that are +not aligned to this Code of Conduct, and will communicate reasons for moderation +decisions when appropriate. + +## Scope + +This Code of Conduct applies within all community spaces, and also applies when +an individual is officially representing the community in public spaces. +Examples of representing our community include using an official e-mail address, +posting via an official social media account, or acting as an appointed +representative at an online or offline event. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported to the community leaders responsible for enforcement at +[mail@maik8.de](mailto:mail@maik8.de). +All complaints will be reviewed and investigated promptly and fairly. + +All community leaders are obligated to respect the privacy and security of the +reporter of any incident. + +## Enforcement Guidelines + +Community leaders will follow these Community Impact Guidelines in determining +the consequences for any action they deem in violation of this Code of Conduct: + +### 1. Correction + +**Community Impact**: Use of inappropriate language or other behavior deemed +unprofessional or unwelcome in the community. + +**Consequence**: A private, written warning from community leaders, providing +clarity around the nature of the violation and an explanation of why the +behavior was inappropriate. A public apology may be requested. + +### 2. Warning + +**Community Impact**: A violation through a single incident or series of +actions. + +**Consequence**: A warning with consequences for continued behavior. No +interaction with the people involved, including unsolicited interaction with +those enforcing the Code of Conduct, for a specified period of time. This +includes avoiding interactions in community spaces as well as external channels +like social media. Violating these terms may lead to a temporary or permanent +ban. + +### 3. Temporary Ban + +**Community Impact**: A serious violation of community standards, including +sustained inappropriate behavior. + +**Consequence**: A temporary ban from any sort of interaction or public +communication with the community for a specified period of time. No public or +private interaction with the people involved, including unsolicited interaction +with those enforcing the Code of Conduct, is allowed during this period. +Violating these terms may lead to a permanent ban. + +### 4. Permanent Ban + +**Community Impact**: Demonstrating a pattern of violation of community +standards, including sustained inappropriate behavior, harassment of an +individual, or aggression toward or disparagement of classes of individuals. + +**Consequence**: A permanent ban from any sort of public interaction within the +community. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], +version 2.1, available at +[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1]. + +Community Impact Guidelines were inspired by +[Mozilla's code of conduct enforcement ladder][Mozilla CoC]. + +For answers to common questions about this code of conduct, see the FAQ at +[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at +[https://www.contributor-covenant.org/translations][translations]. + +[homepage]: https://www.contributor-covenant.org +[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html +[Mozilla CoC]: https://github.com/mozilla/diversity +[FAQ]: https://www.contributor-covenant.org/faq +[translations]: https://www.contributor-covenant.org/translations From e6e57d26a7f970e6fbe7742a6ebd0d73797e7617 Mon Sep 17 00:00:00 2001 From: MaikEight Date: Sat, 13 May 2023 23:45:13 +0200 Subject: [PATCH 05/40] =?UTF-8?q?=E2=9C=A8Added=20a=20new=20class=20for=20?= =?UTF-8?q?DiscordUser=20data?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../General/Responses/DiscordUser.cs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 Libraries/MK_EAM_General_Services_Lib/General/Responses/DiscordUser.cs diff --git a/Libraries/MK_EAM_General_Services_Lib/General/Responses/DiscordUser.cs b/Libraries/MK_EAM_General_Services_Lib/General/Responses/DiscordUser.cs new file mode 100644 index 00000000..b37b8b46 --- /dev/null +++ b/Libraries/MK_EAM_General_Services_Lib/General/Responses/DiscordUser.cs @@ -0,0 +1,16 @@ +using System; + +namespace MK_EAM_General_Services_Lib.General.Responses +{ + [System.Serializable] + public sealed class DiscordUser + { + public Guid DiscordUserId { get; set; } + public DateTime LastSeen { get; set; } + public DateTime FirstSeen { get; set; } + public int AmountOfAccounts { get; set; } + public int AmountOfSessions { get; set; } + public int minutesOfEamUseTime { get; set; } + public bool EasterEggFound { get; set; } + } +} From 760dd5fc92daaaa33545718323da4de88b56cf50 Mon Sep 17 00:00:00 2001 From: MaikEight Date: Sun, 14 May 2023 01:53:01 +0200 Subject: [PATCH 06/40] =?UTF-8?q?=F0=9F=90=9BFixed=20skipping=20the=20anal?= =?UTF-8?q?ytics=20for=20login=20into=20an=20account=20with=20the=20"close?= =?UTF-8?q?AfterConnection=20option=20set=20to=20true".?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- EAM Vault Peeker/FrmMain.cs | 4 ---- ExaltAccountManager/UI/UIAccounts.cs | 28 +++++++++++++++++++++------- 2 files changed, 21 insertions(+), 11 deletions(-) diff --git a/EAM Vault Peeker/FrmMain.cs b/EAM Vault Peeker/FrmMain.cs index ba4c056a..02fd7f28 100644 --- a/EAM Vault Peeker/FrmMain.cs +++ b/EAM Vault Peeker/FrmMain.cs @@ -4,14 +4,10 @@ using MK_EAM_Lib; using System; using System.Collections.Generic; -using System.ComponentModel; -using System.Data; using System.Drawing; using System.IO; using System.Linq; -using System.Runtime.InteropServices; using System.Runtime.Serialization.Formatters.Binary; -using System.Text; using System.Threading.Tasks; using System.Windows.Forms; diff --git a/ExaltAccountManager/UI/UIAccounts.cs b/ExaltAccountManager/UI/UIAccounts.cs index b84deff6..bb88e4eb 100644 --- a/ExaltAccountManager/UI/UIAccounts.cs +++ b/ExaltAccountManager/UI/UIAccounts.cs @@ -422,8 +422,27 @@ private bool StartGameForAccount(MK_EAM_Lib.AccountInfo _info) SaveLoginStats(_info); + Task analyticsAddLogin = null; + if (!frm.OptionsData.analyticsOptions.OptOut) + { + analyticsAddLogin = AnalyticsClient.Instance?.AddLogin(frm.GetAnalyticsEmailHash(_info.Email), GetServerName(_info.serverName)); + } + if (frm.OptionsData.closeAfterConnection) - { Environment.Exit(0); } + { + //Hide the form during the closing process + frm.WindowState = FormWindowState.Minimized; + frm.ShowInTaskbar = false; + + try + { + if (analyticsAddLogin != null) + analyticsAddLogin.Wait(5000); + } + catch { } + + Environment.Exit(0); + } else { if (!dicAccountsToProcesses.ContainsKey(_info)) @@ -447,12 +466,7 @@ private bool StartGameForAccount(MK_EAM_Lib.AccountInfo _info) string state = frm.OptionsData.discordOptions.ShowAccountNames ? "Ingame as " + _info.name + " 🎮" : "Playing rotmg 🎮"; DiscordHelper.SetState(state); DiscordHelper.ApplyPresence(); - } - - if (!frm.OptionsData.analyticsOptions.OptOut) - { - AnalyticsClient.Instance?.AddLogin(frm.GetAnalyticsEmailHash(_info.Email), GetServerName(_info.serverName)); - } + } } catch { From 63f7251240c4763d8b67cf4d1472bfdd2bbd90b2 Mon Sep 17 00:00:00 2001 From: MaikEight Date: Tue, 16 May 2023 01:34:08 +0200 Subject: [PATCH 07/40] =?UTF-8?q?=F0=9F=97=91=EF=B8=8F=20Test...?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- NotificationMessages/test | 1 + 1 file changed, 1 insertion(+) create mode 100644 NotificationMessages/test diff --git a/NotificationMessages/test b/NotificationMessages/test new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/NotificationMessages/test @@ -0,0 +1 @@ + From 0be927f9c656cb6a99608d69cd69a4140e3bfc25 Mon Sep 17 00:00:00 2001 From: MaikEight Date: Tue, 16 May 2023 01:39:54 +0200 Subject: [PATCH 08/40] =?UTF-8?q?=F0=9F=94=A5=20Deleted=20the=20test=20fil?= =?UTF-8?q?e?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- NotificationMessages/test | 1 - 1 file changed, 1 deletion(-) delete mode 100644 NotificationMessages/test diff --git a/NotificationMessages/test b/NotificationMessages/test deleted file mode 100644 index 8b137891..00000000 --- a/NotificationMessages/test +++ /dev/null @@ -1 +0,0 @@ - From 75da0d7246a0817990831e2a4bd501924d5994fb Mon Sep 17 00:00:00 2001 From: MaikEight Date: Thu, 18 May 2023 18:08:08 +0200 Subject: [PATCH 09/40] =?UTF-8?q?=F0=9F=90=9B=20Fixed=20the=20HttpClientHa?= =?UTF-8?q?ndler=20for=20localhost=20sessions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Utils/WebrequestUtils.cs | 20 ++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/Libraries/MK_EAM_General_Services_Lib/Utils/WebrequestUtils.cs b/Libraries/MK_EAM_General_Services_Lib/Utils/WebrequestUtils.cs index 60e18cde..c1ff2353 100644 --- a/Libraries/MK_EAM_General_Services_Lib/Utils/WebrequestUtils.cs +++ b/Libraries/MK_EAM_General_Services_Lib/Utils/WebrequestUtils.cs @@ -7,15 +7,15 @@ namespace MK_EAM_General_Services_Lib.Utils { public static class WebrequestUtils { - private static HttpClientHandler handler = new HttpClientHandler() - { - ServerCertificateCustomValidationCallback = (message, cert, chain, errors) => { return true; } - }; - private static bool UseHandler(string url) => url.StartsWith("https://localhost"); public static async Task SendPostRequest(string url, object data) { + HttpClientHandler handler = new HttpClientHandler() + { + ServerCertificateCustomValidationCallback = (message, cert, chain, errors) => { return true; } + }; + using (var client = UseHandler(url) ? new HttpClient(handler) : new HttpClient()) { string json = JsonConvert.SerializeObject(data); @@ -26,6 +26,11 @@ public static async Task SendPostRequest(string url, object public static async Task SendGetRequest(string url) { + HttpClientHandler handler = new HttpClientHandler() + { + ServerCertificateCustomValidationCallback = (message, cert, chain, errors) => { return true; } + }; + using (var client = UseHandler(url) ? new HttpClient(handler) : new HttpClient()) { return await client.GetAsync(url); @@ -34,6 +39,11 @@ public static async Task SendGetRequest(string url) public static async Task SendDeleteRequest(string url, object data) { + HttpClientHandler handler = new HttpClientHandler() + { + ServerCertificateCustomValidationCallback = (message, cert, chain, errors) => { return true; } + }; + using (var client = UseHandler(url) ? new HttpClient(handler) : new HttpClient()) { HttpRequestMessage request = new HttpRequestMessage(HttpMethod.Delete, url); From e58b4fc196e8e730d0ac5a02e16e28bf77d8236e Mon Sep 17 00:00:00 2001 From: MaikEight Date: Thu, 18 May 2023 18:09:07 +0200 Subject: [PATCH 10/40] =?UTF-8?q?=E2=9C=A8=20Added=20support=20for=20the?= =?UTF-8?q?=20new=20discord=20related=20endpoints?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Requests/SetDiscordUserIdRequest.cs | 13 ++++ .../General/Responses/DiscordUser.cs | 2 +- .../General/Responses/DiscordUsersResponse.cs | 11 ++++ .../GeneralServicesClient.cs | 63 ++++++++++++++++++- 4 files changed, 87 insertions(+), 2 deletions(-) create mode 100644 Libraries/MK_EAM_General_Services_Lib/General/Requests/SetDiscordUserIdRequest.cs create mode 100644 Libraries/MK_EAM_General_Services_Lib/General/Responses/DiscordUsersResponse.cs diff --git a/Libraries/MK_EAM_General_Services_Lib/General/Requests/SetDiscordUserIdRequest.cs b/Libraries/MK_EAM_General_Services_Lib/General/Requests/SetDiscordUserIdRequest.cs new file mode 100644 index 00000000..382e9048 --- /dev/null +++ b/Libraries/MK_EAM_General_Services_Lib/General/Requests/SetDiscordUserIdRequest.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace MK_EAM_General_Services_Lib.General.Requests +{ + [System.Serializable] + public class SetDiscordUserIdRequest + { + public string DiscordUserId { get; set; } + public string ClientIdHash { get; set; } + } +} diff --git a/Libraries/MK_EAM_General_Services_Lib/General/Responses/DiscordUser.cs b/Libraries/MK_EAM_General_Services_Lib/General/Responses/DiscordUser.cs index b37b8b46..15a180b2 100644 --- a/Libraries/MK_EAM_General_Services_Lib/General/Responses/DiscordUser.cs +++ b/Libraries/MK_EAM_General_Services_Lib/General/Responses/DiscordUser.cs @@ -5,7 +5,7 @@ namespace MK_EAM_General_Services_Lib.General.Responses [System.Serializable] public sealed class DiscordUser { - public Guid DiscordUserId { get; set; } + public string DiscordUserId { get; set; } public DateTime LastSeen { get; set; } public DateTime FirstSeen { get; set; } public int AmountOfAccounts { get; set; } diff --git a/Libraries/MK_EAM_General_Services_Lib/General/Responses/DiscordUsersResponse.cs b/Libraries/MK_EAM_General_Services_Lib/General/Responses/DiscordUsersResponse.cs new file mode 100644 index 00000000..a862c2f6 --- /dev/null +++ b/Libraries/MK_EAM_General_Services_Lib/General/Responses/DiscordUsersResponse.cs @@ -0,0 +1,11 @@ +using System.Collections.Generic; + +namespace MK_EAM_General_Services_Lib.General.Responses +{ + [System.Serializable] + public class DiscordUsersResponse + { + public List Users { get; set; } + public List FailedUserIds { get; set; } + } +} diff --git a/Libraries/MK_EAM_General_Services_Lib/GeneralServicesClient.cs b/Libraries/MK_EAM_General_Services_Lib/GeneralServicesClient.cs index 68cc4f5b..ce94523d 100644 --- a/Libraries/MK_EAM_General_Services_Lib/GeneralServicesClient.cs +++ b/Libraries/MK_EAM_General_Services_Lib/GeneralServicesClient.cs @@ -61,7 +61,7 @@ public async Task GetEamReleaseInfo() HttpResponseMessage responseMessage = await resp; responseMessage.EnsureSuccessStatusCode(); if (responseMessage.StatusCode == HttpStatusCode.OK) - { + { return JsonConvert.DeserializeObject(await responseMessage.Content.ReadAsStringAsync()); } } @@ -224,5 +224,66 @@ public async Task PostPoll(Guid pollId, int entryId, string clientIdHa #endregion } + + public async Task GetDiscordUser(string clientIdHash) + { + #region GetDiscordUser + + try + { + Task resp = Utils.WebrequestUtils.SendGetRequest(BASE_URL + $"v1/Discord/user-by-clientIdHash?clientIdHash={clientIdHash}"); + + HttpResponseMessage responseMessage = await resp; + + switch (responseMessage.StatusCode) + { + case HttpStatusCode.OK: + return JsonConvert.DeserializeObject(await responseMessage.Content.ReadAsStringAsync()); + case HttpStatusCode.NotFound: + return new DiscordUser() + { + DiscordUserId = "NotFound" + }; + default: + return null; + } + } + catch (Exception e) + { + Console.WriteLine(e); + } + + return null; + + #endregion + } + + public async Task PostDiscordUser(string clientIdHash, string discordUserId) + { + #region PostPoll + + MK_EAM_General_Services_Lib.General.Requests.SetDiscordUserIdRequest req = new General.Requests.SetDiscordUserIdRequest() + { + ClientIdHash = clientIdHash, + DiscordUserId = discordUserId + }; + + try + { + Task resp = Utils.WebrequestUtils.SendPostRequest(BASE_URL + "v1/Discord/user", req); + + HttpResponseMessage responseMessage = await resp; + responseMessage.EnsureSuccessStatusCode(); + if (responseMessage.StatusCode == HttpStatusCode.OK) + { + return JsonConvert.DeserializeObject(await responseMessage.Content.ReadAsStringAsync()); + } + } + catch { } + + return null; + + #endregion + } } } From a764b2a69ae097776f6c9e1693e3839b48432d95 Mon Sep 17 00:00:00 2001 From: MaikEight Date: Thu, 18 May 2023 18:11:38 +0200 Subject: [PATCH 11/40] =?UTF-8?q?=E2=9C=A8=20First=20discord=20<->=20EAM?= =?UTF-8?q?=20stats=20connection=20PoC=20=F0=9F=91=94=20Updated=20the=20ca?= =?UTF-8?q?ptcha=20solver=20to=20be=20more=20descriptive?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... PingChecker.csproj.GenerateResource.cache | Bin 2553 -> 2553 bytes ...Vault Peeker.csproj.GenerateResource.cache | Bin 3200 -> 3200 bytes EAM_Installer/wix/EAM_Installer.g.wxs | 64 ++++++------- ExaltAccountManager/DiscordHelper.cs | 26 +++++- ExaltAccountManager/FrmMain.cs | 84 ++++++++++++++++++ .../Debug/exaltaccountmanager.exe.licenses | Bin 4272 -> 4305 bytes Libraries/MK_EAM_Analytics/AnalyticsClient.cs | 2 +- .../FrmCaptchaSolver.Designer.cs | 10 +-- .../FrmCaptchaSolver.cs | 4 +- Libraries/MK_EAM_Discord_Lib/Discord.cs | 38 +++++++- 10 files changed, 185 insertions(+), 43 deletions(-) diff --git a/EAM PingChecker/obj/Debug/EAM PingChecker.csproj.GenerateResource.cache b/EAM PingChecker/obj/Debug/EAM PingChecker.csproj.GenerateResource.cache index 4c1363c2a4386525ed95a03f75fb0eb9d2c72345..43b6e5d107b83dfb4103b15c385a7f1cbaaed2bb 100644 GIT binary patch delta 17 Ycmew<{8M;>HXF;Vg2Xz@jfN*U0YAG2vj6}9 delta 17 Zcmew<{8M;>Hruvq=jCj)HyWPc1OP}J2W=Fw%~so4l2~WC(a@g<05qWm!vFvP delta 17 YcmZpWY>=Fw&GuhCyXCa`Mniud064S;NB{r; diff --git a/EAM_Installer/wix/EAM_Installer.g.wxs b/EAM_Installer/wix/EAM_Installer.g.wxs index e51a2b50..b408d4b6 100644 --- a/EAM_Installer/wix/EAM_Installer.g.wxs +++ b/EAM_Installer/wix/EAM_Installer.g.wxs @@ -6,7 +6,7 @@ --> - + @@ -15,23 +15,23 @@ - + - + - + - + - + @@ -42,49 +42,49 @@ - + - + - + - + - + - + - + - + - + - + - + @@ -92,47 +92,47 @@ - + - + - + - + - + - + - + - + - + - + - + @@ -140,7 +140,7 @@ - + @@ -151,7 +151,7 @@ - + @@ -163,7 +163,7 @@ - + @@ -173,7 +173,7 @@ - + diff --git a/ExaltAccountManager/DiscordHelper.cs b/ExaltAccountManager/DiscordHelper.cs index 34048bc5..e11b79bb 100644 --- a/ExaltAccountManager/DiscordHelper.cs +++ b/ExaltAccountManager/DiscordHelper.cs @@ -1,4 +1,5 @@ -using MK_EAM_Discord_Lib; +using MK_EAM_Analytics.Data; +using MK_EAM_Discord_Lib; using System; using System.Collections.Generic; using System.Diagnostics; @@ -40,6 +41,20 @@ public static DateTime Timestamp private static bool isInitialized = false; + public static bool IsConnected + { + get => isConnected; + set + { + isConnected = value; + + OnDiscordConnectionChanged?.Invoke(null, isConnected); + } + } + private static bool isConnected = false; + + public static event EventHandler OnDiscordConnectionChanged; + public static void Initialize(DiscordOptions _discordOptions, FrmMain _frm, bool autoEvents = false, bool _updateOnChange = true) { discordOptions = _discordOptions; @@ -47,6 +62,9 @@ public static void Initialize(DiscordOptions _discordOptions, FrmMain _frm, bool frm.ThemeChanged += Frm_ThemeChanged; updateOnChange = _updateOnChange; + Discord.OnConnected += (object sender, EventArgs e) => IsConnected = true; + Discord.OnDisconnected += (object sender, EventArgs e) => IsConnected = false; + Discord.Initialize(APPLICATION_ID, autoEvents: autoEvents); Discord.UpdateOnChange = false; Discord.AddButton("Get Exalt Account Manager here", "https://github.com/MaikEight/ExaltAccountManager/releases/latest"); @@ -59,7 +77,7 @@ public static void Initialize(DiscordOptions _discordOptions, FrmMain _frm, bool Discord.LargeImageKey = imageKey; Discord.LargeImageText = "Exalt Account Manager"; Discord.UpdateOnChange = updateOnChange; - Discord.ApplyPresence(); + Discord.ApplyPresence(); } private static void Frm_ThemeChanged(object sender, EventArgs e) @@ -71,6 +89,10 @@ private static void Frm_ThemeChanged(object sender, EventArgs e) Discord.ApplyPresence(); } + public static object GetUser() => Discord.GetDiscordUser(); + public static ulong GetUserId() => Discord.GetDiscordUserId(); + public static string GetUserName() => Discord.GetDiscordUserName(); + public static void SetLlamaState() { if (!isInitialized) diff --git a/ExaltAccountManager/FrmMain.cs b/ExaltAccountManager/FrmMain.cs index 5d0888a1..a15be55e 100644 --- a/ExaltAccountManager/FrmMain.cs +++ b/ExaltAccountManager/FrmMain.cs @@ -19,6 +19,7 @@ using System.Windows.Forms; using System.Threading.Tasks; using System.Diagnostics; +using MK_EAM_General_Services_Lib.General.Responses; namespace ExaltAccountManager { @@ -100,6 +101,8 @@ public bool HasNewNews } private bool hasNewNews = false; public DateTime LastNewsViewed { get; internal set; } = DateTime.MinValue; + public DiscordUser DiscordUser { get; internal set; } = null; + private GameUpdater gameUpdater { get; set; } private UIAccounts uiAccounts; @@ -429,6 +432,7 @@ public FrmMain(string[] args) OptionsData.discordOptions = new DiscordOptions() { ShowAccountNames = true, ShowMenus = true, ShowState = true }; } + DiscordHelper.OnDiscordConnectionChanged += DiscordHelper_OnDiscordConnectionChanged; DiscordHelper.Initialize(OptionsData.discordOptions, this, autoEvents: false, @@ -509,6 +513,84 @@ public FrmMain(string[] args) this.Show(); } + private void DiscordHelper_OnDiscordConnectionChanged(object sender, bool isConnected) + { + if (isConnected && DiscordUser == null) + { + //Request discord user + //If no user is found, ask if the user wants to create a connection + ThreadPool.QueueUserWorkItem(new WaitCallback(async (object obj) => + { + CancellationToken token = (CancellationToken)obj; + try + { + Task task = GeneralServicesClient.Instance?.GetDiscordUser(GetAPIClientIdHash(false)); + while (!task.IsCompleted) + { + if (token.IsCancellationRequested) + { + LogEvent(new MK_EAM_Lib.LogData( + "EAM", + MK_EAM_Lib.LogEventType.APIError, + "Failed to fetch stored discord user data.")); + + return; + } + + await Task.Delay(50, token); + } + DiscordUser = task.Result; + + if (DiscordUser != null && DiscordUser.DiscordUserId.Equals("NotFound")) + { //No discord user found + DiscordUser = null; + if (MessageBox.Show("No Discord user found for this EAM-Account." + Environment.NewLine + + $"Would you like connect {DiscordHelper.GetUserName()} with your EAM-Account?" + Environment.NewLine + + "This would allow the EAM-Discord-Bot to grant you roles based on certain achievements.", + "No Discord user found", + MessageBoxButtons.YesNo, + MessageBoxIcon.Question, MessageBoxDefaultButton.Button1, MessageBoxOptions.ServiceNotification, false) == DialogResult.Yes) + { + ulong discordId = DiscordHelper.GetUserId(); + if (discordId == ulong.MaxValue) + { + LogEvent(new MK_EAM_Lib.LogData( + "EAM", + MK_EAM_Lib.LogEventType.EAMError, + "Failed to set discord user id.")); + return; + } + + GeneralServicesClient.Instance?.PostDiscordUser(GetAPIClientIdHash(false), discordId.ToString()); + while (!task.IsCompleted) + { + if (token.IsCancellationRequested) + { + LogEvent(new MK_EAM_Lib.LogData( + "EAM", + MK_EAM_Lib.LogEventType.APIError, + "Failed to fetch stored discord user data.")); + + return; + } + + await Task.Delay(50, token); + } + DiscordUser = task.Result; + } + } + } + catch (Exception ex) + { + LogEvent(new MK_EAM_Lib.LogData( + "EAM", + MK_EAM_Lib.LogEventType.APIError, + "Failed to fetch stored discord user data." + Environment.NewLine + "Exception: " + ex.Message)); + } + }), cancellationTokenSource.Token); + } + } + private void FrmMain_Load(object sender, EventArgs e) { timerLoadUI.Start(); @@ -1719,6 +1801,8 @@ private void timerLoadUI_Tick(object sender, EventArgs e) DiscordHelper.UpdateMenu(DiscordHelper.Menu.Accounts); DiscordHelper.ApplyPresence(); + var usr = DiscordHelper.GetUser(); + timerDiscordUpdater.Start(); if (uiEAMNews == null) diff --git a/ExaltAccountManager/obj/Debug/exaltaccountmanager.exe.licenses b/ExaltAccountManager/obj/Debug/exaltaccountmanager.exe.licenses index d0afeeda0ffa8d9525fe5916da6a3dbdc468c135..4aa33adbc3ddfd8ae30c2242f84046d828a2cf7c 100644 GIT binary patch delta 16 Xcmdm>cu{eK3h!hUZtKl AddCaptchaResult(DateTime startTime, CaptchaResult captc return false; #endregion - } + } } } diff --git a/Libraries/MK_EAM_Captcha_Solver_UI_Lib/FrmCaptchaSolver.Designer.cs b/Libraries/MK_EAM_Captcha_Solver_UI_Lib/FrmCaptchaSolver.Designer.cs index 307a47f2..e0997761 100644 --- a/Libraries/MK_EAM_Captcha_Solver_UI_Lib/FrmCaptchaSolver.Designer.cs +++ b/Libraries/MK_EAM_Captcha_Solver_UI_Lib/FrmCaptchaSolver.Designer.cs @@ -489,15 +489,16 @@ private void InitializeComponent() // label2 // this.label2.AutoEllipsis = true; - this.label2.AutoSize = true; + this.label2.Dock = System.Windows.Forms.DockStyle.Fill; this.label2.Font = new System.Drawing.Font("Segoe UI Semibold", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label2.Location = new System.Drawing.Point(74, 3); + this.label2.Location = new System.Drawing.Point(0, 0); this.label2.Margin = new System.Windows.Forms.Padding(0); this.label2.MaximumSize = new System.Drawing.Size(290, 0); this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(142, 21); + this.label2.Size = new System.Drawing.Size(290, 29); this.label2.TabIndex = 9; - this.label2.Text = "Find the following"; + this.label2.Text = "Find the following in order"; + this.label2.TextAlign = System.Drawing.ContentAlignment.TopCenter; this.label2.UseMnemonic = false; // // formDock @@ -575,7 +576,6 @@ private void InitializeComponent() ((System.ComponentModel.ISupportInitialize)(this.pbCaptchaMain)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.pbCaptchaQuestion)).EndInit(); this.pCaptchaText.ResumeLayout(false); - this.pCaptchaText.PerformLayout(); this.ResumeLayout(false); } diff --git a/Libraries/MK_EAM_Captcha_Solver_UI_Lib/FrmCaptchaSolver.cs b/Libraries/MK_EAM_Captcha_Solver_UI_Lib/FrmCaptchaSolver.cs index aa869ce6..61f95a3a 100644 --- a/Libraries/MK_EAM_Captcha_Solver_UI_Lib/FrmCaptchaSolver.cs +++ b/Libraries/MK_EAM_Captcha_Solver_UI_Lib/FrmCaptchaSolver.cs @@ -44,7 +44,7 @@ protected override CreateParams CreateParams public FrmCaptchaSolver(AccountInfo _accountInfo, bool useDarkmode = false) { InitializeComponent(); - + formDock.SubscribeControlsToDragEvents(new Control[] { pHeader, pbHeader, lEAMHead, lHeaderCaptchaAid, lBeta }); accountInfo = _accountInfo; @@ -169,7 +169,7 @@ private bool RequestChallengeUpdateUI(CaptchaSolverUtils.CaptchaRefreshResponse } lTriesLeft.Text = $"Tries left\n{captchaRefresh.submitsLeft}"; - pbCaptchaQuestion.LoadAsync(captchaRefresh.qimg); + pbCaptchaQuestion.LoadAsync(captchaRefresh.qimg); pbCaptchaMain.LoadAsync(captchaRefresh.img); pContent.Visible = diff --git a/Libraries/MK_EAM_Discord_Lib/Discord.cs b/Libraries/MK_EAM_Discord_Lib/Discord.cs index 4e1a5531..420ea750 100644 --- a/Libraries/MK_EAM_Discord_Lib/Discord.cs +++ b/Libraries/MK_EAM_Discord_Lib/Discord.cs @@ -164,7 +164,14 @@ public static bool UseTimestamp #endregion - #endregion + #endregion + + #region Events + + public static event EventHandler OnConnected; + public static event EventHandler OnDisconnected; + + #endregion public static void Initialize(string applicationId, bool autoEvents = true) { @@ -176,6 +183,9 @@ public static void Initialize(string applicationId, bool autoEvents = true) timestamp = DateTime.Now; IsInitialized = UpdateOnChange = true; + + client.OnConnectionEstablished += (sender, e) => OnConnected?.Invoke(sender, EventArgs.Empty); + client.OnConnectionFailed += (sender, e) => OnDisconnected?.Invoke(sender, EventArgs.Empty); } public static void ApplyPresence() @@ -202,6 +212,30 @@ public static void ApplyPresence() client.Invoke(); } + public static object GetDiscordUser() + { + if (!IsInitialized) + return null; + + return client.CurrentUser; + } + + public static string GetDiscordUserName() + { + if (!IsInitialized) + return null; + + return client.CurrentUser.Username + "#" + client.CurrentUser.Discriminator; + } + + public static ulong GetDiscordUserId() + { + if (!IsInitialized) + return ulong.MaxValue; + + return client.CurrentUser.ID; + } + public static void AddButton(string label, string url) { if (!IsInitialized) return; @@ -225,6 +259,8 @@ public static void Shutdown() if (!IsInitialized) return; client.ClearPresence(); + client.OnConnectionEstablished -= (sender, e) => OnConnected?.Invoke(sender, EventArgs.Empty); + client.OnConnectionFailed -= (sender, e) => OnDisconnected?.Invoke(sender, EventArgs.Empty); client.Dispose(); IsInitialized = false; } From 98f0fe21fd0893e8dedebebc94d5e7e86800f224 Mon Sep 17 00:00:00 2001 From: MaikEight Date: Sun, 14 May 2023 15:12:13 +0200 Subject: [PATCH 12/40] =?UTF-8?q?=F0=9F=94=96Updated=20NotificationMessage?= =?UTF-8?q?=20for=20EAM=203.1.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- EAMNotificationMessage | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/EAMNotificationMessage b/EAMNotificationMessage index e9ff808d..857423c9 100644 --- a/EAMNotificationMessage +++ b/EAMNotificationMessage @@ -1,7 +1,7 @@ { - "id":3, + "id":4, "type":1, - "message":"Version 3.1.0 is now available, it includes: Captcha Support, News, Installer, bug fixes and much more!", + "message":"Version 3.1.1 is now available, it includes: Captcha Support, News, Installer, bug fixes and much more!", "link":"https://github.com/MaikEight/ExaltAccountManager/releases/latest", "linkM":"https://github.com/MaikEight/ExaltAccountManager/releases/latest", "forceShow":true From 49950ff48eb2e19e8c723982a360fd51c188be1e Mon Sep 17 00:00:00 2001 From: MaikEight Date: Sun, 14 May 2023 15:14:14 +0200 Subject: [PATCH 13/40] Update EAMNotificationMessage.2_2_3 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 🔖Updated NotificationMessage for EAM 3.1.1 --- NotificationMessages/EAMNotificationMessage.2_2_3 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/NotificationMessages/EAMNotificationMessage.2_2_3 b/NotificationMessages/EAMNotificationMessage.2_2_3 index 96317c7b..14771e62 100644 --- a/NotificationMessages/EAMNotificationMessage.2_2_3 +++ b/NotificationMessages/EAMNotificationMessage.2_2_3 @@ -1,7 +1,7 @@ { - "id":2, + "id":3, "type":1, - "message":"Version 3.1.0 is now available, it includes: Captcha Support, News, Installer, bug fixes and much more!", + "message":"Version 3.1.1 is now available, it includes: Captcha Support, News, Installer, bug fixes and much more!", "link":"https://github.com/MaikEight/ExaltAccountManager/releases/latest", "linkM":"https://github.com/MaikEight/ExaltAccountManager/releases/latest", "forceShow":true From 96af110cb1d78b7ef4433da3856ac717f62b9d47 Mon Sep 17 00:00:00 2001 From: MaikEight Date: Sun, 14 May 2023 15:14:43 +0200 Subject: [PATCH 14/40] =?UTF-8?q?=F0=9F=94=96Updated=20NotificationMessage?= =?UTF-8?q?=20for=20EAM=203.1.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- NotificationMessages/EAMNotificationMessage.3_0_0 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/NotificationMessages/EAMNotificationMessage.3_0_0 b/NotificationMessages/EAMNotificationMessage.3_0_0 index e9ff808d..857423c9 100644 --- a/NotificationMessages/EAMNotificationMessage.3_0_0 +++ b/NotificationMessages/EAMNotificationMessage.3_0_0 @@ -1,7 +1,7 @@ { - "id":3, + "id":4, "type":1, - "message":"Version 3.1.0 is now available, it includes: Captcha Support, News, Installer, bug fixes and much more!", + "message":"Version 3.1.1 is now available, it includes: Captcha Support, News, Installer, bug fixes and much more!", "link":"https://github.com/MaikEight/ExaltAccountManager/releases/latest", "linkM":"https://github.com/MaikEight/ExaltAccountManager/releases/latest", "forceShow":true From 9cadbb4cb43d2717203f975f2d12ce9503ac2278 Mon Sep 17 00:00:00 2001 From: MaikEight Date: Sat, 20 May 2023 23:31:31 +0200 Subject: [PATCH 15/40] =?UTF-8?q?=F0=9F=90=9B=20Fixed=20discord=20invite?= =?UTF-8?q?=20link?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DesignTimeResolveAssemblyReferences.cache | Bin 28158 -> 29347 bytes ExaltAccountManager/FrmMain.cs | 49 +++++++++++++++++- ExaltAccountManager/UI/UIAbout.Designer.cs | 7 +++ ExaltAccountManager/UI/UIAbout.cs | 20 ++++++- ExaltAccountManager/UI/UIAbout.resx | 3 ++ ExaltAccountManager/UI/UIHelp.cs | 2 +- 6 files changed, 76 insertions(+), 5 deletions(-) diff --git a/EAM Vault Peeker/obj/Debug/DesignTimeResolveAssemblyReferences.cache b/EAM Vault Peeker/obj/Debug/DesignTimeResolveAssemblyReferences.cache index 830947d689068963421171c74541c5e1781d5260..60690f19846ca2c4ff47c0616d16e2c75cfcd559 100644 GIT binary patch delta 64 zcmex&n{n||Mh-ScB?blt#`wtsjKLeD7w1ks6cxZ|IC-O>0)I+Q4kIH_lEGs4QWJyQ Tlbxcc0%hh4DQx}`ozDyait-et delta 23 fcmZ4dl=0tfMh-ScMFs{2#`wtsjKLeD7v};1Sp^3N diff --git a/ExaltAccountManager/FrmMain.cs b/ExaltAccountManager/FrmMain.cs index a15be55e..8136d8bc 100644 --- a/ExaltAccountManager/FrmMain.cs +++ b/ExaltAccountManager/FrmMain.cs @@ -20,13 +20,17 @@ using System.Threading.Tasks; using System.Diagnostics; using MK_EAM_General_Services_Lib.General.Responses; +using System.Drawing.Text; namespace ExaltAccountManager { public sealed partial class FrmMain : Form { - public readonly Version version = new Version(3, 1, 1); + public readonly Version version = new Version(3, 2, 0); public const string GITHUB_PROJECT_URL = "https://github.com/MaikEight/ExaltAccountManager"; + public const string DISCORD_INVITE_URL = "https://discord.exalt-account-manager.eu"; + public string API_BASE_URL { get; internal set; } = "https://api.exalt-account-manager.eu/"; + public event EventHandler ThemeChanged; private System.Timers.Timer saveAccountsTimer; @@ -88,7 +92,7 @@ public OptionsData OptionsData private OptionsData optionsDataValue = new OptionsData(); private bool drawConfigChangesIcon = false; public NotificationOptions notOpt = new NotificationOptions(); - public string API_BASE_URL { get; internal set; } = "https://api.exalt-account-manager.eu/"; + private EAMNotificationMessageSaveFile notificationSaveFile = new EAMNotificationMessageSaveFile(); public bool HasNewNews { @@ -2011,6 +2015,47 @@ public void RemoveShadowForm() public void SwitchLlamaState(bool showLlama) => pbHeader.Image = showLlama ? Properties.Resources.llama : Properties.Resources.ic_account_balance_wallet_white_48dp; + public void ShowEamLogoGif(string _url, Action action) + { + string url = API_BASE_URL + _url; + + PictureBox pbDev = new PictureBox() + { + BackColor = Color.Transparent, + SizeMode = PictureBoxSizeMode.Zoom, + Dock = DockStyle.Fill, + Visible = false, + Tag = "Dev" + }; + pHeader.Controls.Add(pbDev); + pbDev.BringToFront(); + + pbDev.LoadAsync(url); + pbDev.LoadCompleted += Execute; + + void Execute(object sender, EventArgs e) + { + pbDev.Visible = true; + action?.Invoke(this, EventArgs.Empty); + pbDev.LoadCompleted -= Execute; + } + } + + public void HideEamLogoGif() + { + PictureBox pb = pHeader.Controls.OfType() + .Where(p => p.Tag.Equals("Dev")) + .FirstOrDefault(); + if (pb != null) + { + pb.Visible = false; + pHeader.Controls.Remove(pb); + pb.Image = null; + pb.Dispose(); + pb = null; + } + } + private void FrmMain_SizeChanged(object sender, EventArgs e) { if (frmShadowHost != null) diff --git a/ExaltAccountManager/UI/UIAbout.Designer.cs b/ExaltAccountManager/UI/UIAbout.Designer.cs index a27e10a0..1edc9533 100644 --- a/ExaltAccountManager/UI/UIAbout.Designer.cs +++ b/ExaltAccountManager/UI/UIAbout.Designer.cs @@ -75,6 +75,7 @@ private void InitializeComponent() this.btnShowCredits = new Bunifu.UI.WinForms.BunifuButton.BunifuButton(); this.label8 = new System.Windows.Forms.Label(); this.bunifuSeparator6 = new Bunifu.UI.WinForms.BunifuSeparator(); + this.timerLogoGif = new System.Windows.Forms.Timer(this.components); bunifuElipse = new Bunifu.Framework.UI.BunifuElipse(this.components); ((System.ComponentModel.ISupportInitialize)(this.pbDeveloper)).BeginInit(); this.bunifuShadowPanel3.SuspendLayout(); @@ -850,6 +851,11 @@ private void InitializeComponent() this.bunifuSeparator6.Size = new System.Drawing.Size(104, 10); this.bunifuSeparator6.TabIndex = 13; // + // timerLogoGif + // + this.timerLogoGif.Interval = 5750; + this.timerLogoGif.Tick += new System.EventHandler(this.timerLogoGif_Tick); + // // UIAbout // this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 17F); @@ -940,5 +946,6 @@ private void InitializeComponent() private System.Windows.Forms.Label label8; private Bunifu.UI.WinForms.BunifuSeparator bunifuSeparator6; private Bunifu.UI.WinForms.BunifuButton.BunifuButton btnShowCredits; + private System.Windows.Forms.Timer timerLogoGif; } } diff --git a/ExaltAccountManager/UI/UIAbout.cs b/ExaltAccountManager/UI/UIAbout.cs index 95e64f9e..59fd1756 100644 --- a/ExaltAccountManager/UI/UIAbout.cs +++ b/ExaltAccountManager/UI/UIAbout.cs @@ -12,6 +12,7 @@ public sealed partial class UIAbout : UserControl private FrmMain frm; private EleCredits eleCredits; + private const string eamLogoGifUrl = "v1/ExaltAccountManager/logo/gif"; public UIAbout(FrmMain _frm) { InitializeComponent(); @@ -52,8 +53,13 @@ public void ApplyTheme(object sender, EventArgs e) pbThanks.Image = frm.UseDarkmode ? Properties.Resources.birthday_cake_1_white_36px : Properties.Resources.birthday_cake_1_36px; } + private bool isInProgress = false; + private void pbDev_Click(object sender, EventArgs e) { + if(isInProgress) return; + + isInProgress = true; pbDevIcon.Image = Properties.Resources.llama; frm.SwitchLlamaState(true); DiscordHelper.SetLlamaState(); @@ -70,7 +76,7 @@ private void pbDev_Click(object sender, EventArgs e) private void pbBMAC_Click(object sender, EventArgs e) => linkBuyMeACoffe_LinkClicked(null, null); private void linkBuyMeACoffe_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) => System.Diagnostics.Process.Start("https://www.buymeacoffee.com/Maik8"); private void pbDiscord_Click(object sender, EventArgs e) => linkDiscord_LinkClicked(null, null); - private void linkDiscord_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) => System.Diagnostics.Process.Start("https://discord.gg/VNfxgPqbJ7"); + private void linkDiscord_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) => System.Diagnostics.Process.Start(FrmMain.DISCORD_INVITE_URL); private void pbEmail_Click(object sender, EventArgs e) => linkEmail_LinkClicked(null, null); private void linkEmail_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) => System.Diagnostics.Process.Start("mailto:mail@maik8.de"); private void pbRealmeye_Click(object sender, EventArgs e) => System.Diagnostics.Process.Start("https://www.realmeye.com/forum/u/MaikEight"); @@ -92,7 +98,17 @@ private void timerLlama_Tick(object sender, EventArgs e) { timerLlama.Stop(); pbDevIcon.Image = frm.UseDarkmode ? Properties.Resources.ic_code_white_36dp : Properties.Resources.ic_code_black_36dp; + frm.ShowEamLogoGif(eamLogoGifUrl, (object s, EventArgs args) => { + timerLogoGif.Start(); + }); + } + + private void timerLogoGif_Tick(object sender, EventArgs e) + { + timerLogoGif.Stop(); frm.SwitchLlamaState(false); + frm.HideEamLogoGif(); + isInProgress = false; } private void pbReddit_MouseEnter(object sender, EventArgs e) @@ -136,6 +152,6 @@ private void btnShowCredits_Click(object sender, EventArgs e) eleCredits.ResetScrollbar(); frm.ShowShadowForm(eleCredits); - } + } } } diff --git a/ExaltAccountManager/UI/UIAbout.resx b/ExaltAccountManager/UI/UIAbout.resx index 4340cde0..ea6b1092 100644 --- a/ExaltAccountManager/UI/UIAbout.resx +++ b/ExaltAccountManager/UI/UIAbout.resx @@ -179,4 +179,7 @@ o729TQDwWXIBEZdRqIzkN28AAAAASUVORK5CYII= + + 223, 17 + \ No newline at end of file diff --git a/ExaltAccountManager/UI/UIHelp.cs b/ExaltAccountManager/UI/UIHelp.cs index 9f4c3671..6968b917 100644 --- a/ExaltAccountManager/UI/UIHelp.cs +++ b/ExaltAccountManager/UI/UIHelp.cs @@ -162,7 +162,7 @@ private void pbEmail_MouseLeave(object sender, EventArgs e) pbMailMini.Image = frm.UseDarkmode ? Properties.Resources.ic_email_white_24dp : Properties.Resources.ic_email_black_24dp; } - private void pbDiscord_Click(object sender, EventArgs e) => System.Diagnostics.Process.Start("https://discord.gg/VNfxgPqbJ7"); + private void pbDiscord_Click(object sender, EventArgs e) => System.Diagnostics.Process.Start(FrmMain.DISCORD_INVITE_URL); private void pbDiscord_MouseEnter(object sender, EventArgs e) { From 491cd09971a1ca3c09c4b6570445941ca9550dd1 Mon Sep 17 00:00:00 2001 From: MaikEight Date: Sun, 21 May 2023 22:59:36 +0200 Subject: [PATCH 16/40] =?UTF-8?q?=E2=9C=A8=20Added=20an=20auto-select=20of?= =?UTF-8?q?=20the=20first=20result=20of=20an=20accounts=20querry?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ExaltAccountManager/UI/UIAccounts.cs | 3 +++ ExaltAccountManager/UI/UIEAMNews.cs | 1 + 2 files changed, 4 insertions(+) diff --git a/ExaltAccountManager/UI/UIAccounts.cs b/ExaltAccountManager/UI/UIAccounts.cs index bb88e4eb..515b88b5 100644 --- a/ExaltAccountManager/UI/UIAccounts.cs +++ b/ExaltAccountManager/UI/UIAccounts.cs @@ -1339,6 +1339,9 @@ private void tbSortQuerry_TextChanged(object sender, EventArgs e) toggleAllowDragNDrop.Enabled = !useQuerry; if (useQuerry) toggleAllowDragNDrop.Checked = false; + + if (dataGridView.Rows.Count > 0) + dataGridView.Rows[0].Selected = true; } #endregion diff --git a/ExaltAccountManager/UI/UIEAMNews.cs b/ExaltAccountManager/UI/UIEAMNews.cs index 7b713db3..bb14a160 100644 --- a/ExaltAccountManager/UI/UIEAMNews.cs +++ b/ExaltAccountManager/UI/UIEAMNews.cs @@ -132,6 +132,7 @@ private void FetchNews(DateTime date, string clientIdHash, int amount) await Task.Delay(50, token); } + List result = task.Result; if (result != null && result.Count > 0) { From 958afa010f57d2ca5f3ec1460d3fd0f99a52fe98 Mon Sep 17 00:00:00 2001 From: MaikEight Date: Sun, 21 May 2023 23:03:27 +0200 Subject: [PATCH 17/40] =?UTF-8?q?=F0=9F=94=A7=20Lowered=20the=20amount=20o?= =?UTF-8?q?f=20time=20the=20"Refresh=20data"-button=20is=20locked=2060s=20?= =?UTF-8?q?->=2015s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ExaltAccountManager/UI/UIAccounts.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ExaltAccountManager/UI/UIAccounts.cs b/ExaltAccountManager/UI/UIAccounts.cs index 515b88b5..20152a45 100644 --- a/ExaltAccountManager/UI/UIAccounts.cs +++ b/ExaltAccountManager/UI/UIAccounts.cs @@ -571,7 +571,7 @@ private void btnRenewToken_Click(object sender, EventArgs e) timerRenewChangeColor.Start(); MK_EAM_Lib.AccountInfo info = GetAccountInfo(dataGridView.SelectedRows[0].Index); - dicLockRenewInfoToTime.Add(info, DateTime.Now.AddSeconds(60)); + dicLockRenewInfoToTime.Add(info, DateTime.Now.AddSeconds(15)); info.PerformWebrequest(frm, frm.LogEvent, "EAM AccUI", frm.accountStatsPath, frm.itemsSaveFilePath, frm.GetDeviceUniqueIdentifier(), string.IsNullOrEmpty(info.Name), true, RenewTokenFinished_Invoker); From 6c2a4cea841eb90beca6b50e0b2814635c6e3ca9 Mon Sep 17 00:00:00 2001 From: MaikEight Date: Sun, 21 May 2023 23:11:45 +0200 Subject: [PATCH 18/40] =?UTF-8?q?=F0=9F=90=9B=20Changed=20the=20default=20?= =?UTF-8?q?export=20location=20due=20to=20authorization=20problems=20on=20?= =?UTF-8?q?installed=20versions=20of=20EAM?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ExaltAccountManager/UI/Elements/EleExport.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ExaltAccountManager/UI/Elements/EleExport.cs b/ExaltAccountManager/UI/Elements/EleExport.cs index 84b0660e..f49346d1 100644 --- a/ExaltAccountManager/UI/Elements/EleExport.cs +++ b/ExaltAccountManager/UI/Elements/EleExport.cs @@ -52,7 +52,7 @@ public EleExport(FrmMain _frm, UIImportExport _uiImportExport) AddAccountsToDatagrid(); - tbPath.Text = System.IO.Path.Combine(Application.StartupPath, $"{fileName}.EAMexport"); + tbPath.Text = System.IO.Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Desktop), $"{fileName}.EAMexport"); dropExport.SelectedIndex = 0; } From 1d5176f5f87f0f8ee1c3fb02ea545b3f664c54fd Mon Sep 17 00:00:00 2001 From: MaikEight Date: Mon, 22 May 2023 00:03:10 +0200 Subject: [PATCH 19/40] =?UTF-8?q?=E2=AC=86=EF=B8=8F=20updated=20dependenci?= =?UTF-8?q?es?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... Login Service.csproj.FileListAbsolute.txt | 6 ++ .../obj/Debug/EAM Daily Login Service.exe | Bin 45056 -> 45056 bytes .../obj/Debug/EAM Daily Login Service.pdb | Bin 73216 -> 73216 bytes .../obj/Release/EAM Daily Login Service.exe | Bin 43520 -> 43520 bytes .../obj/Release/EAM Daily Login Service.pdb | Bin 65024 -> 65024 bytes EAM PingChecker/EAM PingChecker.csproj | 4 +- EAM PingChecker/packages.config | 8 +- EAM Statistics/EAM Statistics.csproj | 4 +- ...M Statistics.csproj.GenerateResource.cache | Bin 4519 -> 4519 bytes EAM Statistics/packages.config | 8 +- EAM Tasktray Tool/EAM Tasktray Tool.csproj | 4 +- EAM Tasktray Tool/packages.config | 8 +- EAM Vault Peeker/EAM Vault Peeker.csproj | 4 +- ...Vault Peeker.csproj.GenerateResource.cache | Bin 3200 -> 3200 bytes EAM Vault Peeker/packages.config | 8 +- EAM_Installer/EAM_Installer.csproj | 2 +- EAM_Installer/wix/EAM_Installer.g.wxs | 69 ++++++++++-------- .../ExaltAccountManager.csproj | 4 +- .../DesignTimeResolveAssemblyReferences.cache | Bin 92337 -> 92337 bytes ExaltAccountManager/packages.config | 8 +- .../MK_EAM_Captcha_Solver_UI_Lib.csproj | 4 +- .../packages.config | 8 +- 22 files changed, 80 insertions(+), 69 deletions(-) diff --git a/EAM Daily Login Service/obj/Debug/EAM Daily Login Service.csproj.FileListAbsolute.txt b/EAM Daily Login Service/obj/Debug/EAM Daily Login Service.csproj.FileListAbsolute.txt index 5186e114..70af734f 100644 --- a/EAM Daily Login Service/obj/Debug/EAM Daily Login Service.csproj.FileListAbsolute.txt +++ b/EAM Daily Login Service/obj/Debug/EAM Daily Login Service.csproj.FileListAbsolute.txt @@ -176,3 +176,9 @@ C:\Users\Maik8\source\repos\ExaltAccountManager\EAM Daily Login Service\bin\Debu C:\Users\Maik8\source\repos\ExaltAccountManager\EAM Daily Login Service\bin\Debug\Bunifu.UI.WinForms.dll C:\Users\Maik8\source\repos\ExaltAccountManager\EAM Daily Login Service\bin\Debug\Bunifu.UI.WinForms.xml C:\Users\Maik8\source\repos\ExaltAccountManager\EAM Daily Login Service\bin\Debug\Bunifu.Licensing.pdb +C:\Users\Maik8\source\repos\ExaltAccountManager\EAM Daily Login Service\bin\Debug\MK_EAM_Captcha_Solver_UI_Lib.dll +C:\Users\Maik8\source\repos\ExaltAccountManager\EAM Daily Login Service\bin\Debug\RestSharp.dll +C:\Users\Maik8\source\repos\ExaltAccountManager\EAM Daily Login Service\bin\Debug\MK_EAM_Updater_Lib.pdb +C:\Users\Maik8\source\repos\ExaltAccountManager\EAM Daily Login Service\bin\Debug\MK_EAM_Captcha_Solver_UI_Lib.pdb +C:\Users\Maik8\source\repos\ExaltAccountManager\EAM Daily Login Service\bin\Debug\MK_EAM_Captcha_Solver_UI_Lib.dll.config +C:\Users\Maik8\source\repos\ExaltAccountManager\EAM Daily Login Service\bin\Debug\RestSharp.xml diff --git a/EAM Daily Login Service/obj/Debug/EAM Daily Login Service.exe b/EAM Daily Login Service/obj/Debug/EAM Daily Login Service.exe index 8685e2e2f536602b8ef937b29982f173f0f5c5b1..2cdd04ef5f09c612bf36e759149e07d0faea3bd4 100644 GIT binary patch delta 70 zcmV-M0J;Bw-~xc)0+5IVO||lsv5ata5D)+Orn>`qL4_Y)D$vjalCunU*a!qbZpFTn c=zcU1YOSir4x5HfiP260|7l|Yvn+qqFqFd}g8%>k delta 70 zcmV-M0J;Bw-~xc)0+5IV5@xr+v5ata5JUBVKHR9(K&^HSxmT_>_p=Ok*a!s2=_H?% c=zcU16?AU^{G13M5y01HC|lQ@G(sQIg{fhpVX8%i^=rHq?IrW|FA zndm6JdBe>LKGp=F@fwp2UkGn@co8BEme{_5nK6V*!XfYIK1QHy*4kCa`DVBIbzbyi X{GXZ3uw90ak%tALal3;M;{k2}q7yQ` delta 189 zcmZqJ!_u&aWdn;)L==OKAU^{G13M5y01LwxMsWr{BWGm=T?G?8Q#}J+Gd&|?Ln8}4 zLlbQ?Q^OQvqZA7RL-XXc1K8v_#89>x6@08IK=U;w8@>?U?C>H)8Z5DW12ba?m&EaxD)SkEvQIJ!CmB`$b!?rY YK0iUkQfj*lA0rP7LgRJ^A;tsT0NAZE)c^nh diff --git a/EAM Daily Login Service/obj/Release/EAM Daily Login Service.exe b/EAM Daily Login Service/obj/Release/EAM Daily Login Service.exe index a20ab2eee58cbb05360c4a3ff8980eac4101fa5b..61bf511b691657998346f73462d388282f0d5164 100644 GIT binary patch delta 69 zcmV-L0J{Hx)B=Fi0+5IVVoAfpv5cf|5L01Sb8xPaO^s#uTIm@`wzEKRLd?Sqqt bcr_4AeZOe)GR#V(WwCsrQgKkT%y=|0Qi>n0 delta 69 zcmV-L0J{Hx)B=Fi0+5IV)JL=Hv5cf|5M^jjPus&EK#BKh6Z<+C*Rw!yL}ku8&l bcr_4o3U&NSnbJh2*agJ*M$7TD%y=|0V8|ej diff --git a/EAM Daily Login Service/obj/Release/EAM Daily Login Service.pdb b/EAM Daily Login Service/obj/Release/EAM Daily Login Service.pdb index 27440c20850d8003675b357637ed1aeb10f2769f..0d6dd93d7c99216dd1e0a6d564c5e16d01c0d95e 100644 GIT binary patch delta 185 zcmZqp!`$$Pc>{}3co>6?AU^{G13M5y01HC|lQ@G(sQIg{fhpVX8%i^=rHq?IrmSR) zndm6JdBffcKGp=F@fwp2&j@dJI1?fXm3SJ$C87Ja`4%Hk(x-NR#%H55UQ1Fp)+`Jv Q4A?C5frkZI+m{2J0Ik?IBme*a delta 186 zcmZqp!`$$Pc>{}3L==OKAU^{G13M5y01LwxMsWr{BWGm=T?G?8Q#}J+Gd&|?Ln8}4 zLlbQ?Q^OQvqZA7RL-XXc1K8v_#89?86@08IK=U;w8=eu~>~JPT5-RaDgi9iFqV6q5pkxVG=^w9|mt2 - + - + \ No newline at end of file diff --git a/EAM PingChecker/packages.config b/EAM PingChecker/packages.config index f2b0a271..1036116b 100644 --- a/EAM PingChecker/packages.config +++ b/EAM PingChecker/packages.config @@ -5,13 +5,13 @@ - - + + - + @@ -50,7 +50,7 @@ - + diff --git a/EAM Statistics/EAM Statistics.csproj b/EAM Statistics/EAM Statistics.csproj index a0c76dd7..bbb77123 100644 --- a/EAM Statistics/EAM Statistics.csproj +++ b/EAM Statistics/EAM Statistics.csproj @@ -636,10 +636,10 @@ - + - + \ No newline at end of file diff --git a/EAM Statistics/obj/Debug/EAM Statistics.csproj.GenerateResource.cache b/EAM Statistics/obj/Debug/EAM Statistics.csproj.GenerateResource.cache index ddc74efc479c34e29244101daf7338ec94593280..bd3a94b9b3cc08e6580441f7892d917018531149 100644 GIT binary patch delta 17 YcmZ3kyj*!gBHNPiqQpAOjp+`806lUBdH?_b delta 17 YcmZ3kyj*!gB3nq0<|Z5Mjp+`806I(t7XSbN diff --git a/EAM Statistics/packages.config b/EAM Statistics/packages.config index df6f474e..02fc61d4 100644 --- a/EAM Statistics/packages.config +++ b/EAM Statistics/packages.config @@ -4,13 +4,13 @@ - - + + - + @@ -49,7 +49,7 @@ - + diff --git a/EAM Tasktray Tool/EAM Tasktray Tool.csproj b/EAM Tasktray Tool/EAM Tasktray Tool.csproj index 5804037f..293faa3a 100644 --- a/EAM Tasktray Tool/EAM Tasktray Tool.csproj +++ b/EAM Tasktray Tool/EAM Tasktray Tool.csproj @@ -412,10 +412,10 @@ - + - + \ No newline at end of file diff --git a/EAM Tasktray Tool/packages.config b/EAM Tasktray Tool/packages.config index df6f474e..02fc61d4 100644 --- a/EAM Tasktray Tool/packages.config +++ b/EAM Tasktray Tool/packages.config @@ -4,13 +4,13 @@ - - + + - + @@ -49,7 +49,7 @@ - + diff --git a/EAM Vault Peeker/EAM Vault Peeker.csproj b/EAM Vault Peeker/EAM Vault Peeker.csproj index 87346b4a..202c4e2a 100644 --- a/EAM Vault Peeker/EAM Vault Peeker.csproj +++ b/EAM Vault Peeker/EAM Vault Peeker.csproj @@ -477,10 +477,10 @@ - + - + \ No newline at end of file diff --git a/EAM Vault Peeker/obj/Debug/EAM Vault Peeker.csproj.GenerateResource.cache b/EAM Vault Peeker/obj/Debug/EAM Vault Peeker.csproj.GenerateResource.cache index 129d25a9e0fd875872456292d6e0885dc48b4f42..dccf0b318088a831e5389cb3296aad6c097bcfc2 100644 GIT binary patch delta 18 ZcmZpWY>?b=oSUsxr8Ke5a`IX3%>X|I2M+)M delta 18 acmZpWY>?b=oSW@u{=vf2=9ABIZw3HL#0Yf& diff --git a/EAM Vault Peeker/packages.config b/EAM Vault Peeker/packages.config index df6f474e..02fc61d4 100644 --- a/EAM Vault Peeker/packages.config +++ b/EAM Vault Peeker/packages.config @@ -4,13 +4,13 @@ - - + + - + @@ -49,7 +49,7 @@ - + diff --git a/EAM_Installer/EAM_Installer.csproj b/EAM_Installer/EAM_Installer.csproj index 3f08ced4..25322c0e 100644 --- a/EAM_Installer/EAM_Installer.csproj +++ b/EAM_Installer/EAM_Installer.csproj @@ -17,7 +17,7 @@ - + diff --git a/EAM_Installer/wix/EAM_Installer.g.wxs b/EAM_Installer/wix/EAM_Installer.g.wxs index b408d4b6..ac6eec71 100644 --- a/EAM_Installer/wix/EAM_Installer.g.wxs +++ b/EAM_Installer/wix/EAM_Installer.g.wxs @@ -6,7 +6,7 @@ --> - + @@ -15,23 +15,27 @@ - + + + + + - + - + - + - + @@ -42,49 +46,49 @@ - + - + - + - + - + - + - + - + - + - + - + @@ -92,47 +96,47 @@ - + - + - + - + - + - + - + - + - + - + - + @@ -140,7 +144,7 @@ - + @@ -151,7 +155,7 @@ - + @@ -163,7 +167,7 @@ - + @@ -173,7 +177,7 @@ - + @@ -196,6 +200,7 @@ + diff --git a/ExaltAccountManager/ExaltAccountManager.csproj b/ExaltAccountManager/ExaltAccountManager.csproj index 262ccc2f..892a2f67 100644 --- a/ExaltAccountManager/ExaltAccountManager.csproj +++ b/ExaltAccountManager/ExaltAccountManager.csproj @@ -1513,10 +1513,10 @@ - + - + \ No newline at end of file diff --git a/ExaltAccountManager/obj/Debug/DesignTimeResolveAssemblyReferences.cache b/ExaltAccountManager/obj/Debug/DesignTimeResolveAssemblyReferences.cache index 5dfb6bee7fe2c50b06d1c9ce301870b2c9483e55..092f51d31ba47311e791a8fea2b001b04312da03 100644 GIT binary patch delta 23 fcmdmZk#*xm)(!71rtgerbZj=T+-_jW*r*Qxg`x?R delta 22 ecmdmZk#*xm)(!71Cg<=vHXB%OH?U-E)CT}}tO)P` diff --git a/ExaltAccountManager/packages.config b/ExaltAccountManager/packages.config index feaf86dd..35fe045d 100644 --- a/ExaltAccountManager/packages.config +++ b/ExaltAccountManager/packages.config @@ -6,16 +6,16 @@ - + - + - + @@ -54,7 +54,7 @@ - + diff --git a/Libraries/MK_EAM_Captcha_Solver_UI_Lib/MK_EAM_Captcha_Solver_UI_Lib.csproj b/Libraries/MK_EAM_Captcha_Solver_UI_Lib/MK_EAM_Captcha_Solver_UI_Lib.csproj index a6c5330a..d25655ce 100644 --- a/Libraries/MK_EAM_Captcha_Solver_UI_Lib/MK_EAM_Captcha_Solver_UI_Lib.csproj +++ b/Libraries/MK_EAM_Captcha_Solver_UI_Lib/MK_EAM_Captcha_Solver_UI_Lib.csproj @@ -396,10 +396,10 @@ - + - + \ No newline at end of file diff --git a/Libraries/MK_EAM_Captcha_Solver_UI_Lib/packages.config b/Libraries/MK_EAM_Captcha_Solver_UI_Lib/packages.config index df6f474e..02fc61d4 100644 --- a/Libraries/MK_EAM_Captcha_Solver_UI_Lib/packages.config +++ b/Libraries/MK_EAM_Captcha_Solver_UI_Lib/packages.config @@ -4,13 +4,13 @@ - - + + - + @@ -49,7 +49,7 @@ - + From 0a1d952d3af7d003e44aa660b3e04beef344bdd5 Mon Sep 17 00:00:00 2001 From: MaikEight Date: Sat, 27 May 2023 23:18:46 +0200 Subject: [PATCH 20/40] =?UTF-8?q?=F0=9F=8E=A8=20Sealed=20some=20classes=20?= =?UTF-8?q?and=20added=20a=20deconstructor=20to=20UIAccounts?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../UI/Elements/EleAnalyticsSettings.cs | 2 +- ExaltAccountManager/UI/Elements/EleCredits.cs | 2 +- ExaltAccountManager/UI/Elements/EleDiscordSettings.cs | 10 +++++++++- ExaltAccountManager/UI/Elements/EleEAMNewsView.cs | 2 +- .../UI/Elements/EleGameUpdateAndNotifications.cs | 2 +- ExaltAccountManager/UI/UIAccounts.cs | 5 +++++ 6 files changed, 18 insertions(+), 5 deletions(-) diff --git a/ExaltAccountManager/UI/Elements/EleAnalyticsSettings.cs b/ExaltAccountManager/UI/Elements/EleAnalyticsSettings.cs index f5f07f47..1d8ce88f 100644 --- a/ExaltAccountManager/UI/Elements/EleAnalyticsSettings.cs +++ b/ExaltAccountManager/UI/Elements/EleAnalyticsSettings.cs @@ -12,7 +12,7 @@ namespace ExaltAccountManager.UI.Elements { - public partial class EleAnalyticsSettings : UserControl + public sealed partial class EleAnalyticsSettings : UserControl { private FrmMain frm; private CancellationTokenSource cancellationTokenSource = new CancellationTokenSource(); diff --git a/ExaltAccountManager/UI/Elements/EleCredits.cs b/ExaltAccountManager/UI/Elements/EleCredits.cs index 7385f9df..77982185 100644 --- a/ExaltAccountManager/UI/Elements/EleCredits.cs +++ b/ExaltAccountManager/UI/Elements/EleCredits.cs @@ -12,7 +12,7 @@ namespace ExaltAccountManager.UI.Elements { - public partial class EleCredits : UserControl + public sealed partial class EleCredits : UserControl { private const string licenseDotNet = "https://dotnet.microsoft.com/en-us/platform/free"; private const string licenseNewtonsoftJson = "Newtonsoft.Json.License"; diff --git a/ExaltAccountManager/UI/Elements/EleDiscordSettings.cs b/ExaltAccountManager/UI/Elements/EleDiscordSettings.cs index b433a0ae..e0f6fc17 100644 --- a/ExaltAccountManager/UI/Elements/EleDiscordSettings.cs +++ b/ExaltAccountManager/UI/Elements/EleDiscordSettings.cs @@ -5,7 +5,7 @@ namespace ExaltAccountManager.UI.Elements { - public partial class EleDiscordSettings : UserControl + public sealed partial class EleDiscordSettings : UserControl { private FrmMain frm; @@ -15,6 +15,8 @@ public EleDiscordSettings(FrmMain _frm) frm = _frm; + toggleUseDiscord.Checked = !frm.OptionsData.discordOptions.OptOut; + toggleShowAccountNames.Checked = frm.OptionsData.discordOptions.ShowAccountNames; toggleShowMenus.Checked = frm.OptionsData.discordOptions.ShowMenus; toggleDiscord.Checked = frm.OptionsData.discordOptions.ShowState; @@ -69,6 +71,7 @@ private void pbClose_MouseLeave(object sender, EventArgs e) private void btnSave_Click(object sender, EventArgs e) { + frm.OptionsData.discordOptions.OptOut = !toggleUseDiscord.Checked; frm.OptionsData.discordOptions.ShowAccountNames = toggleShowAccountNames.Checked; frm.OptionsData.discordOptions.ShowMenus = toggleShowMenus.Checked; frm.OptionsData.discordOptions.ShowState = toggleDiscord.Checked; @@ -78,5 +81,10 @@ private void btnSave_Click(object sender, EventArgs e) frm.RemoveShadowForm(); } + + private void toggleUseDiscord_CheckedChanged(object sender, EventArgs e) + { + pCover.Visible = !toggleUseDiscord.Checked; + } } } diff --git a/ExaltAccountManager/UI/Elements/EleEAMNewsView.cs b/ExaltAccountManager/UI/Elements/EleEAMNewsView.cs index 9a439af7..3ab4e3de 100644 --- a/ExaltAccountManager/UI/Elements/EleEAMNewsView.cs +++ b/ExaltAccountManager/UI/Elements/EleEAMNewsView.cs @@ -8,7 +8,7 @@ namespace ExaltAccountManager.UI.Elements { - public partial class EleEAMNewsView : UserControl + public sealed partial class EleEAMNewsView : UserControl { public NewsData NewsData { get; internal set; } private FrmMain frm; diff --git a/ExaltAccountManager/UI/Elements/EleGameUpdateAndNotifications.cs b/ExaltAccountManager/UI/Elements/EleGameUpdateAndNotifications.cs index e3be4520..979d8a24 100644 --- a/ExaltAccountManager/UI/Elements/EleGameUpdateAndNotifications.cs +++ b/ExaltAccountManager/UI/Elements/EleGameUpdateAndNotifications.cs @@ -5,7 +5,7 @@ namespace ExaltAccountManager.UI.Elements { - public partial class EleGameUpdateAndNotifications : UserControl + public sealed partial class EleGameUpdateAndNotifications : UserControl { private FrmMain frm; diff --git a/ExaltAccountManager/UI/UIAccounts.cs b/ExaltAccountManager/UI/UIAccounts.cs index 20152a45..f7cbaf8e 100644 --- a/ExaltAccountManager/UI/UIAccounts.cs +++ b/ExaltAccountManager/UI/UIAccounts.cs @@ -66,6 +66,11 @@ public UIAccounts(FrmMain _frm) timerLoadProcesses.Start(); } + ~UIAccounts() + { + frm.ThemeChanged -= ApplyTheme; + } + private void UIAccounts_Load(object sender, EventArgs e) { isInit = true; From 168808db1203761b47dc2a55580ac0b203a81f25 Mon Sep 17 00:00:00 2001 From: MaikEight Date: Sat, 27 May 2023 23:20:41 +0200 Subject: [PATCH 21/40] =?UTF-8?q?=E2=9C=A8=20Added=20a=20new=20popup=20for?= =?UTF-8?q?=20the=20new=20discord=20integration=20=E2=9C=A8=20Added=20an?= =?UTF-8?q?=20opt-out=20for=20the=20the=20discord=20rich=20presence?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ExaltAccountManager/DiscordHelper.cs | 15 + .../ExaltAccountManager.csproj | 9 + ExaltAccountManager/FrmControlHost.cs | 1 - .../FrmDiscordPopup.Designer.cs | 506 ++++++++++++++++++ ExaltAccountManager/FrmDiscordPopup.cs | 131 +++++ ExaltAccountManager/FrmDiscordPopup.resx | 152 ++++++ ExaltAccountManager/FrmMain.cs | 180 ++++--- ExaltAccountManager/FrmShadowHost.Designer.cs | 1 + ExaltAccountManager/FrmShadowHost.cs | 5 + ExaltAccountManager/OLD/FrmOptions.cs | 3 +- .../Elements/EleDiscordSettings.Designer.cs | 108 ++-- ExaltAccountManager/UI/UIChangelog.cs | 20 + ExaltAccountManager/UI/UIOptions.Designer.cs | 1 + 13 files changed, 1037 insertions(+), 95 deletions(-) create mode 100644 ExaltAccountManager/FrmDiscordPopup.Designer.cs create mode 100644 ExaltAccountManager/FrmDiscordPopup.cs create mode 100644 ExaltAccountManager/FrmDiscordPopup.resx diff --git a/ExaltAccountManager/DiscordHelper.cs b/ExaltAccountManager/DiscordHelper.cs index e11b79bb..3898e336 100644 --- a/ExaltAccountManager/DiscordHelper.cs +++ b/ExaltAccountManager/DiscordHelper.cs @@ -417,4 +417,19 @@ public enum Menu Llama, } } + + [System.Serializable] + public sealed class DiscordPopupSettings + { + public DateTime LastQuestion { get; set; } + public DiscordpopupResult LastDiscordPopupResult { get; set; } + + [System.Serializable] + public enum DiscordpopupResult + { + Yes = 0, + No = 1, + Never = 2 + } + } } diff --git a/ExaltAccountManager/ExaltAccountManager.csproj b/ExaltAccountManager/ExaltAccountManager.csproj index 892a2f67..f1e6677f 100644 --- a/ExaltAccountManager/ExaltAccountManager.csproj +++ b/ExaltAccountManager/ExaltAccountManager.csproj @@ -397,6 +397,12 @@ AccountUI.cs + + Form + + + FrmDiscordPopup.cs + UserControl @@ -820,6 +826,9 @@ AccountUI.cs + + FrmDiscordPopup.cs + AccountUIHeader.cs diff --git a/ExaltAccountManager/FrmControlHost.cs b/ExaltAccountManager/FrmControlHost.cs index c3397a03..af18b9d3 100644 --- a/ExaltAccountManager/FrmControlHost.cs +++ b/ExaltAccountManager/FrmControlHost.cs @@ -60,6 +60,5 @@ public void RemoveControl() ctrToHost = null; } } - } } diff --git a/ExaltAccountManager/FrmDiscordPopup.Designer.cs b/ExaltAccountManager/FrmDiscordPopup.Designer.cs new file mode 100644 index 00000000..b89c0643 --- /dev/null +++ b/ExaltAccountManager/FrmDiscordPopup.Designer.cs @@ -0,0 +1,506 @@ +namespace ExaltAccountManager +{ + partial class FrmDiscordPopup + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmDiscordPopup)); + Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderEdges borderEdges10 = new Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderEdges(); + Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderEdges borderEdges11 = new Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderEdges(); + Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderEdges borderEdges12 = new Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderEdges(); + this.pTop = new System.Windows.Forms.Panel(); + this.pHeader = new System.Windows.Forms.Panel(); + this.pbHeader = new System.Windows.Forms.PictureBox(); + this.lHeaderEAM = new System.Windows.Forms.Label(); + this.shadow = new Bunifu.UI.WinForms.BunifuShadowPanel(); + this.btnYeah = new Bunifu.UI.WinForms.BunifuButton.BunifuButton(); + this.lQuestion = new System.Windows.Forms.Label(); + this.lHeadline = new System.Windows.Forms.Label(); + this.pContent = new System.Windows.Forms.Panel(); + this.pTopBar = new System.Windows.Forms.Panel(); + this.btnLater = new Bunifu.UI.WinForms.BunifuButton.BunifuButton(); + this.btnNever = new Bunifu.UI.WinForms.BunifuButton.BunifuButton(); + this.pbClose = new System.Windows.Forms.PictureBox(); + this.pTop.SuspendLayout(); + this.pHeader.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.pbHeader)).BeginInit(); + this.shadow.SuspendLayout(); + this.pContent.SuspendLayout(); + this.pTopBar.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.pbClose)).BeginInit(); + this.SuspendLayout(); + // + // pTop + // + this.pTop.Controls.Add(this.pTopBar); + this.pTop.Controls.Add(this.pHeader); + this.pTop.Dock = System.Windows.Forms.DockStyle.Top; + this.pTop.Location = new System.Drawing.Point(0, 0); + this.pTop.Name = "pTop"; + this.pTop.Size = new System.Drawing.Size(500, 64); + this.pTop.TabIndex = 0; + // + // pHeader + // + this.pHeader.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(98)))), ((int)(((byte)(0)))), ((int)(((byte)(238))))); + this.pHeader.Controls.Add(this.pbHeader); + this.pHeader.Controls.Add(this.lHeaderEAM); + this.pHeader.Dock = System.Windows.Forms.DockStyle.Left; + this.pHeader.Location = new System.Drawing.Point(0, 0); + this.pHeader.Name = "pHeader"; + this.pHeader.Size = new System.Drawing.Size(175, 64); + this.pHeader.TabIndex = 1; + // + // pbHeader + // + this.pbHeader.Image = global::ExaltAccountManager.Properties.Resources.logo; + this.pbHeader.Location = new System.Drawing.Point(8, 8); + this.pbHeader.Name = "pbHeader"; + this.pbHeader.Size = new System.Drawing.Size(48, 48); + this.pbHeader.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; + this.pbHeader.TabIndex = 7; + this.pbHeader.TabStop = false; + // + // lHeaderEAM + // + this.lHeaderEAM.Font = new System.Drawing.Font("Segoe UI Black", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lHeaderEAM.ForeColor = System.Drawing.Color.White; + this.lHeaderEAM.Location = new System.Drawing.Point(55, 2); + this.lHeaderEAM.Name = "lHeaderEAM"; + this.lHeaderEAM.Size = new System.Drawing.Size(115, 60); + this.lHeaderEAM.TabIndex = 8; + this.lHeaderEAM.Text = "Exalt Account Manager"; + this.lHeaderEAM.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // shadow + // + this.shadow.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.shadow.BackColor = System.Drawing.Color.White; + this.shadow.BorderColor = System.Drawing.Color.WhiteSmoke; + this.shadow.BorderRadius = 9; + this.shadow.BorderThickness = 1; + this.shadow.Controls.Add(this.btnNever); + this.shadow.Controls.Add(this.btnLater); + this.shadow.Controls.Add(this.btnYeah); + this.shadow.Controls.Add(this.lQuestion); + this.shadow.Controls.Add(this.lHeadline); + this.shadow.FillStyle = Bunifu.UI.WinForms.BunifuShadowPanel.FillStyles.Solid; + this.shadow.GradientMode = Bunifu.UI.WinForms.BunifuShadowPanel.GradientModes.Vertical; + this.shadow.Location = new System.Drawing.Point(10, 10); + this.shadow.Name = "shadow"; + this.shadow.PanelColor = System.Drawing.Color.White; + this.shadow.PanelColor2 = System.Drawing.Color.White; + this.shadow.ShadowColor = System.Drawing.Color.DarkGray; + this.shadow.ShadowDept = 2; + this.shadow.ShadowDepth = 4; + this.shadow.ShadowStyle = Bunifu.UI.WinForms.BunifuShadowPanel.ShadowStyles.Surrounded; + this.shadow.ShadowTopLeftVisible = false; + this.shadow.Size = new System.Drawing.Size(480, 225); + this.shadow.Style = Bunifu.UI.WinForms.BunifuShadowPanel.BevelStyles.Flat; + this.shadow.TabIndex = 21; + // + // btnYeah + // + this.btnYeah.AllowAnimations = true; + this.btnYeah.AllowMouseEffects = true; + this.btnYeah.AllowToggling = false; + this.btnYeah.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.btnYeah.AnimationSpeed = 200; + this.btnYeah.AutoGenerateColors = false; + this.btnYeah.AutoRoundBorders = false; + this.btnYeah.AutoSizeLeftIcon = true; + this.btnYeah.AutoSizeRightIcon = true; + this.btnYeah.BackColor = System.Drawing.Color.Transparent; + this.btnYeah.BackColor1 = System.Drawing.Color.FromArgb(((int)(((byte)(175)))), ((int)(((byte)(98)))), ((int)(((byte)(0)))), ((int)(((byte)(238))))); + this.btnYeah.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("btnYeah.BackgroundImage"))); + this.btnYeah.BorderStyle = Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderStyles.Solid; + this.btnYeah.ButtonText = "Yeah, one connection please!"; + this.btnYeah.ButtonTextMarginLeft = 0; + this.btnYeah.ColorContrastOnClick = 45; + this.btnYeah.ColorContrastOnHover = 45; + this.btnYeah.Cursor = System.Windows.Forms.Cursors.Default; + borderEdges10.BottomLeft = true; + borderEdges10.BottomRight = true; + borderEdges10.TopLeft = true; + borderEdges10.TopRight = true; + this.btnYeah.CustomizableEdges = borderEdges10; + this.btnYeah.DialogResult = System.Windows.Forms.DialogResult.None; + this.btnYeah.DisabledBorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(191)))), ((int)(((byte)(191)))), ((int)(((byte)(191))))); + this.btnYeah.DisabledFillColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); + this.btnYeah.DisabledForecolor = System.Drawing.Color.FromArgb(((int)(((byte)(168)))), ((int)(((byte)(160)))), ((int)(((byte)(168))))); + this.btnYeah.FocusState = Bunifu.UI.WinForms.BunifuButton.BunifuButton.ButtonStates.Hover; + this.btnYeah.Font = new System.Drawing.Font("Segoe UI Semibold", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnYeah.ForeColor = System.Drawing.Color.White; + this.btnYeah.IconLeft = global::ExaltAccountManager.Properties.Resources.discord_new_outline_white_24px; + this.btnYeah.IconLeftAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.btnYeah.IconLeftCursor = System.Windows.Forms.Cursors.Default; + this.btnYeah.IconLeftPadding = new System.Windows.Forms.Padding(15, 3, 1, 3); + this.btnYeah.IconMarginLeft = 11; + this.btnYeah.IconPadding = 6; + this.btnYeah.IconRight = null; + this.btnYeah.IconRightAlign = System.Drawing.ContentAlignment.MiddleRight; + this.btnYeah.IconRightCursor = System.Windows.Forms.Cursors.Default; + this.btnYeah.IconRightPadding = new System.Windows.Forms.Padding(3, 3, 7, 3); + this.btnYeah.IconSize = 10; + this.btnYeah.IdleBorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(175)))), ((int)(((byte)(98)))), ((int)(((byte)(0)))), ((int)(((byte)(238))))); + this.btnYeah.IdleBorderRadius = 5; + this.btnYeah.IdleBorderThickness = 1; + this.btnYeah.IdleFillColor = System.Drawing.Color.FromArgb(((int)(((byte)(175)))), ((int)(((byte)(98)))), ((int)(((byte)(0)))), ((int)(((byte)(238))))); + this.btnYeah.IdleIconLeftImage = global::ExaltAccountManager.Properties.Resources.discord_new_outline_white_24px; + this.btnYeah.IdleIconRightImage = null; + this.btnYeah.IndicateFocus = false; + this.btnYeah.Location = new System.Drawing.Point(16, 141); + this.btnYeah.Name = "btnYeah"; + this.btnYeah.OnDisabledState.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(191)))), ((int)(((byte)(191)))), ((int)(((byte)(191))))); + this.btnYeah.OnDisabledState.BorderRadius = 5; + this.btnYeah.OnDisabledState.BorderStyle = Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderStyles.Solid; + this.btnYeah.OnDisabledState.BorderThickness = 1; + this.btnYeah.OnDisabledState.FillColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); + this.btnYeah.OnDisabledState.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(168)))), ((int)(((byte)(160)))), ((int)(((byte)(168))))); + this.btnYeah.OnDisabledState.IconLeftImage = null; + this.btnYeah.OnDisabledState.IconRightImage = null; + this.btnYeah.onHoverState.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(98)))), ((int)(((byte)(0)))), ((int)(((byte)(238))))); + this.btnYeah.onHoverState.BorderRadius = 5; + this.btnYeah.onHoverState.BorderStyle = Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderStyles.Solid; + this.btnYeah.onHoverState.BorderThickness = 1; + this.btnYeah.onHoverState.FillColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(98)))), ((int)(((byte)(0)))), ((int)(((byte)(238))))); + this.btnYeah.onHoverState.ForeColor = System.Drawing.Color.White; + this.btnYeah.onHoverState.IconLeftImage = global::ExaltAccountManager.Properties.Resources.discord_new_white_24px; + this.btnYeah.onHoverState.IconRightImage = null; + this.btnYeah.OnIdleState.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(175)))), ((int)(((byte)(98)))), ((int)(((byte)(0)))), ((int)(((byte)(238))))); + this.btnYeah.OnIdleState.BorderRadius = 5; + this.btnYeah.OnIdleState.BorderStyle = Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderStyles.Solid; + this.btnYeah.OnIdleState.BorderThickness = 1; + this.btnYeah.OnIdleState.FillColor = System.Drawing.Color.FromArgb(((int)(((byte)(175)))), ((int)(((byte)(98)))), ((int)(((byte)(0)))), ((int)(((byte)(238))))); + this.btnYeah.OnIdleState.ForeColor = System.Drawing.Color.White; + this.btnYeah.OnIdleState.IconLeftImage = global::ExaltAccountManager.Properties.Resources.discord_new_outline_white_24px; + this.btnYeah.OnIdleState.IconRightImage = null; + this.btnYeah.OnPressedState.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(225)))), ((int)(((byte)(98)))), ((int)(((byte)(0)))), ((int)(((byte)(238))))); + this.btnYeah.OnPressedState.BorderRadius = 5; + this.btnYeah.OnPressedState.BorderStyle = Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderStyles.Solid; + this.btnYeah.OnPressedState.BorderThickness = 1; + this.btnYeah.OnPressedState.FillColor = System.Drawing.Color.FromArgb(((int)(((byte)(225)))), ((int)(((byte)(98)))), ((int)(((byte)(0)))), ((int)(((byte)(238))))); + this.btnYeah.OnPressedState.ForeColor = System.Drawing.Color.White; + this.btnYeah.OnPressedState.IconLeftImage = null; + this.btnYeah.OnPressedState.IconRightImage = null; + this.btnYeah.Size = new System.Drawing.Size(446, 31); + this.btnYeah.TabIndex = 25; + this.btnYeah.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.btnYeah.TextAlignment = System.Windows.Forms.HorizontalAlignment.Center; + this.btnYeah.TextMarginLeft = 0; + this.btnYeah.TextPadding = new System.Windows.Forms.Padding(0, 0, 15, 0); + this.btnYeah.UseDefaultRadiusAndThickness = true; + this.btnYeah.Click += new System.EventHandler(this.btnYeah_Click); + // + // lQuestion + // + this.lQuestion.Font = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lQuestion.Location = new System.Drawing.Point(12, 41); + this.lQuestion.Name = "lQuestion"; + this.lQuestion.Size = new System.Drawing.Size(456, 91); + this.lQuestion.TabIndex = 21; + this.lQuestion.Text = "Do you want to connect your discord account ({0}) with this EAM account?\r\nThis wo" + + "uld grant you special roles and more on the Exalt Account Manager discord server" + + "."; + this.lQuestion.UseMnemonic = false; + // + // lHeadline + // + this.lHeadline.AutoSize = true; + this.lHeadline.Font = new System.Drawing.Font("Segoe UI Semibold", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lHeadline.Location = new System.Drawing.Point(12, 12); + this.lHeadline.Name = "lHeadline"; + this.lHeadline.Size = new System.Drawing.Size(158, 21); + this.lHeadline.TabIndex = 7; + this.lHeadline.Text = "Update discord user"; + // + // pContent + // + this.pContent.Controls.Add(this.shadow); + this.pContent.Dock = System.Windows.Forms.DockStyle.Fill; + this.pContent.Location = new System.Drawing.Point(0, 64); + this.pContent.Name = "pContent"; + this.pContent.Size = new System.Drawing.Size(500, 245); + this.pContent.TabIndex = 22; + // + // pTopBar + // + this.pTopBar.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(250)))), ((int)(((byte)(250)))), ((int)(((byte)(250))))); + this.pTopBar.Controls.Add(this.pbClose); + this.pTopBar.Dock = System.Windows.Forms.DockStyle.Top; + this.pTopBar.Location = new System.Drawing.Point(175, 0); + this.pTopBar.Name = "pTopBar"; + this.pTopBar.Size = new System.Drawing.Size(325, 24); + this.pTopBar.TabIndex = 2; + // + // btnLater + // + this.btnLater.AllowAnimations = true; + this.btnLater.AllowMouseEffects = true; + this.btnLater.AllowToggling = false; + this.btnLater.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.btnLater.AnimationSpeed = 200; + this.btnLater.AutoGenerateColors = false; + this.btnLater.AutoRoundBorders = false; + this.btnLater.AutoSizeLeftIcon = true; + this.btnLater.AutoSizeRightIcon = true; + this.btnLater.BackColor = System.Drawing.Color.Transparent; + this.btnLater.BackColor1 = System.Drawing.Color.FromArgb(((int)(((byte)(175)))), ((int)(((byte)(98)))), ((int)(((byte)(0)))), ((int)(((byte)(238))))); + this.btnLater.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("btnLater.BackgroundImage"))); + this.btnLater.BorderStyle = Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderStyles.Solid; + this.btnLater.ButtonText = "Maybe later"; + this.btnLater.ButtonTextMarginLeft = 0; + this.btnLater.ColorContrastOnClick = 45; + this.btnLater.ColorContrastOnHover = 45; + this.btnLater.Cursor = System.Windows.Forms.Cursors.Default; + borderEdges11.BottomLeft = true; + borderEdges11.BottomRight = true; + borderEdges11.TopLeft = true; + borderEdges11.TopRight = true; + this.btnLater.CustomizableEdges = borderEdges11; + this.btnLater.DialogResult = System.Windows.Forms.DialogResult.None; + this.btnLater.DisabledBorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(191)))), ((int)(((byte)(191)))), ((int)(((byte)(191))))); + this.btnLater.DisabledFillColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); + this.btnLater.DisabledForecolor = System.Drawing.Color.FromArgb(((int)(((byte)(168)))), ((int)(((byte)(160)))), ((int)(((byte)(168))))); + this.btnLater.FocusState = Bunifu.UI.WinForms.BunifuButton.BunifuButton.ButtonStates.Hover; + this.btnLater.Font = new System.Drawing.Font("Segoe UI Semibold", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnLater.ForeColor = System.Drawing.Color.White; + this.btnLater.IconLeft = global::ExaltAccountManager.Properties.Resources.delivery_time_white_24px; + this.btnLater.IconLeftAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.btnLater.IconLeftCursor = System.Windows.Forms.Cursors.Default; + this.btnLater.IconLeftPadding = new System.Windows.Forms.Padding(15, 3, 1, 3); + this.btnLater.IconMarginLeft = 11; + this.btnLater.IconPadding = 6; + this.btnLater.IconRight = null; + this.btnLater.IconRightAlign = System.Drawing.ContentAlignment.MiddleRight; + this.btnLater.IconRightCursor = System.Windows.Forms.Cursors.Default; + this.btnLater.IconRightPadding = new System.Windows.Forms.Padding(3, 3, 7, 3); + this.btnLater.IconSize = 10; + this.btnLater.IdleBorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(175)))), ((int)(((byte)(98)))), ((int)(((byte)(0)))), ((int)(((byte)(238))))); + this.btnLater.IdleBorderRadius = 5; + this.btnLater.IdleBorderThickness = 1; + this.btnLater.IdleFillColor = System.Drawing.Color.FromArgb(((int)(((byte)(175)))), ((int)(((byte)(98)))), ((int)(((byte)(0)))), ((int)(((byte)(238))))); + this.btnLater.IdleIconLeftImage = global::ExaltAccountManager.Properties.Resources.delivery_time_white_24px; + this.btnLater.IdleIconRightImage = null; + this.btnLater.IndicateFocus = false; + this.btnLater.Location = new System.Drawing.Point(16, 178); + this.btnLater.Name = "btnLater"; + this.btnLater.OnDisabledState.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(191)))), ((int)(((byte)(191)))), ((int)(((byte)(191))))); + this.btnLater.OnDisabledState.BorderRadius = 5; + this.btnLater.OnDisabledState.BorderStyle = Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderStyles.Solid; + this.btnLater.OnDisabledState.BorderThickness = 1; + this.btnLater.OnDisabledState.FillColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); + this.btnLater.OnDisabledState.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(168)))), ((int)(((byte)(160)))), ((int)(((byte)(168))))); + this.btnLater.OnDisabledState.IconLeftImage = null; + this.btnLater.OnDisabledState.IconRightImage = null; + this.btnLater.onHoverState.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(98)))), ((int)(((byte)(0)))), ((int)(((byte)(238))))); + this.btnLater.onHoverState.BorderRadius = 5; + this.btnLater.onHoverState.BorderStyle = Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderStyles.Solid; + this.btnLater.onHoverState.BorderThickness = 1; + this.btnLater.onHoverState.FillColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(98)))), ((int)(((byte)(0)))), ((int)(((byte)(238))))); + this.btnLater.onHoverState.ForeColor = System.Drawing.Color.White; + this.btnLater.onHoverState.IconLeftImage = global::ExaltAccountManager.Properties.Resources.delivery_time_white_24px; + this.btnLater.onHoverState.IconRightImage = null; + this.btnLater.OnIdleState.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(175)))), ((int)(((byte)(98)))), ((int)(((byte)(0)))), ((int)(((byte)(238))))); + this.btnLater.OnIdleState.BorderRadius = 5; + this.btnLater.OnIdleState.BorderStyle = Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderStyles.Solid; + this.btnLater.OnIdleState.BorderThickness = 1; + this.btnLater.OnIdleState.FillColor = System.Drawing.Color.FromArgb(((int)(((byte)(175)))), ((int)(((byte)(98)))), ((int)(((byte)(0)))), ((int)(((byte)(238))))); + this.btnLater.OnIdleState.ForeColor = System.Drawing.Color.White; + this.btnLater.OnIdleState.IconLeftImage = global::ExaltAccountManager.Properties.Resources.delivery_time_white_24px; + this.btnLater.OnIdleState.IconRightImage = null; + this.btnLater.OnPressedState.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(225)))), ((int)(((byte)(98)))), ((int)(((byte)(0)))), ((int)(((byte)(238))))); + this.btnLater.OnPressedState.BorderRadius = 5; + this.btnLater.OnPressedState.BorderStyle = Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderStyles.Solid; + this.btnLater.OnPressedState.BorderThickness = 1; + this.btnLater.OnPressedState.FillColor = System.Drawing.Color.FromArgb(((int)(((byte)(225)))), ((int)(((byte)(98)))), ((int)(((byte)(0)))), ((int)(((byte)(238))))); + this.btnLater.OnPressedState.ForeColor = System.Drawing.Color.White; + this.btnLater.OnPressedState.IconLeftImage = null; + this.btnLater.OnPressedState.IconRightImage = null; + this.btnLater.Size = new System.Drawing.Size(261, 31); + this.btnLater.TabIndex = 26; + this.btnLater.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.btnLater.TextAlignment = System.Windows.Forms.HorizontalAlignment.Center; + this.btnLater.TextMarginLeft = 0; + this.btnLater.TextPadding = new System.Windows.Forms.Padding(0, 0, 15, 0); + this.btnLater.UseDefaultRadiusAndThickness = true; + this.btnLater.Click += new System.EventHandler(this.btnLater_Click); + // + // btnNever + // + this.btnNever.AllowAnimations = true; + this.btnNever.AllowMouseEffects = true; + this.btnNever.AllowToggling = false; + this.btnNever.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.btnNever.AnimationSpeed = 200; + this.btnNever.AutoGenerateColors = false; + this.btnNever.AutoRoundBorders = false; + this.btnNever.AutoSizeLeftIcon = true; + this.btnNever.AutoSizeRightIcon = true; + this.btnNever.BackColor = System.Drawing.Color.Transparent; + this.btnNever.BackColor1 = System.Drawing.Color.FromArgb(((int)(((byte)(175)))), ((int)(((byte)(98)))), ((int)(((byte)(0)))), ((int)(((byte)(238))))); + this.btnNever.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("btnNever.BackgroundImage"))); + this.btnNever.BorderStyle = Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderStyles.Solid; + this.btnNever.ButtonText = "Don\'t ask me again"; + this.btnNever.ButtonTextMarginLeft = 0; + this.btnNever.ColorContrastOnClick = 45; + this.btnNever.ColorContrastOnHover = 45; + this.btnNever.Cursor = System.Windows.Forms.Cursors.Default; + borderEdges12.BottomLeft = true; + borderEdges12.BottomRight = true; + borderEdges12.TopLeft = true; + borderEdges12.TopRight = true; + this.btnNever.CustomizableEdges = borderEdges12; + this.btnNever.DialogResult = System.Windows.Forms.DialogResult.None; + this.btnNever.DisabledBorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(191)))), ((int)(((byte)(191)))), ((int)(((byte)(191))))); + this.btnNever.DisabledFillColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); + this.btnNever.DisabledForecolor = System.Drawing.Color.FromArgb(((int)(((byte)(168)))), ((int)(((byte)(160)))), ((int)(((byte)(168))))); + this.btnNever.FocusState = Bunifu.UI.WinForms.BunifuButton.BunifuButton.ButtonStates.Hover; + this.btnNever.Font = new System.Drawing.Font("Segoe UI Semibold", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnNever.ForeColor = System.Drawing.Color.White; + this.btnNever.IconLeft = global::ExaltAccountManager.Properties.Resources.ic_do_not_disturb_white_36dp; + this.btnNever.IconLeftAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.btnNever.IconLeftCursor = System.Windows.Forms.Cursors.Default; + this.btnNever.IconLeftPadding = new System.Windows.Forms.Padding(15, 3, 1, 3); + this.btnNever.IconMarginLeft = 11; + this.btnNever.IconPadding = 6; + this.btnNever.IconRight = null; + this.btnNever.IconRightAlign = System.Drawing.ContentAlignment.MiddleRight; + this.btnNever.IconRightCursor = System.Windows.Forms.Cursors.Default; + this.btnNever.IconRightPadding = new System.Windows.Forms.Padding(3, 3, 7, 3); + this.btnNever.IconSize = 10; + this.btnNever.IdleBorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(175)))), ((int)(((byte)(98)))), ((int)(((byte)(0)))), ((int)(((byte)(238))))); + this.btnNever.IdleBorderRadius = 5; + this.btnNever.IdleBorderThickness = 1; + this.btnNever.IdleFillColor = System.Drawing.Color.FromArgb(((int)(((byte)(175)))), ((int)(((byte)(98)))), ((int)(((byte)(0)))), ((int)(((byte)(238))))); + this.btnNever.IdleIconLeftImage = global::ExaltAccountManager.Properties.Resources.ic_do_not_disturb_white_36dp; + this.btnNever.IdleIconRightImage = null; + this.btnNever.IndicateFocus = false; + this.btnNever.Location = new System.Drawing.Point(283, 178); + this.btnNever.Name = "btnNever"; + this.btnNever.OnDisabledState.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(191)))), ((int)(((byte)(191)))), ((int)(((byte)(191))))); + this.btnNever.OnDisabledState.BorderRadius = 5; + this.btnNever.OnDisabledState.BorderStyle = Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderStyles.Solid; + this.btnNever.OnDisabledState.BorderThickness = 1; + this.btnNever.OnDisabledState.FillColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); + this.btnNever.OnDisabledState.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(168)))), ((int)(((byte)(160)))), ((int)(((byte)(168))))); + this.btnNever.OnDisabledState.IconLeftImage = null; + this.btnNever.OnDisabledState.IconRightImage = null; + this.btnNever.onHoverState.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(98)))), ((int)(((byte)(0)))), ((int)(((byte)(238))))); + this.btnNever.onHoverState.BorderRadius = 5; + this.btnNever.onHoverState.BorderStyle = Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderStyles.Solid; + this.btnNever.onHoverState.BorderThickness = 1; + this.btnNever.onHoverState.FillColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(98)))), ((int)(((byte)(0)))), ((int)(((byte)(238))))); + this.btnNever.onHoverState.ForeColor = System.Drawing.Color.White; + this.btnNever.onHoverState.IconLeftImage = global::ExaltAccountManager.Properties.Resources.ic_do_not_disturb_white_36dp; + this.btnNever.onHoverState.IconRightImage = null; + this.btnNever.OnIdleState.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(175)))), ((int)(((byte)(98)))), ((int)(((byte)(0)))), ((int)(((byte)(238))))); + this.btnNever.OnIdleState.BorderRadius = 5; + this.btnNever.OnIdleState.BorderStyle = Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderStyles.Solid; + this.btnNever.OnIdleState.BorderThickness = 1; + this.btnNever.OnIdleState.FillColor = System.Drawing.Color.FromArgb(((int)(((byte)(175)))), ((int)(((byte)(98)))), ((int)(((byte)(0)))), ((int)(((byte)(238))))); + this.btnNever.OnIdleState.ForeColor = System.Drawing.Color.White; + this.btnNever.OnIdleState.IconLeftImage = global::ExaltAccountManager.Properties.Resources.ic_do_not_disturb_white_36dp; + this.btnNever.OnIdleState.IconRightImage = null; + this.btnNever.OnPressedState.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(225)))), ((int)(((byte)(98)))), ((int)(((byte)(0)))), ((int)(((byte)(238))))); + this.btnNever.OnPressedState.BorderRadius = 5; + this.btnNever.OnPressedState.BorderStyle = Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderStyles.Solid; + this.btnNever.OnPressedState.BorderThickness = 1; + this.btnNever.OnPressedState.FillColor = System.Drawing.Color.FromArgb(((int)(((byte)(225)))), ((int)(((byte)(98)))), ((int)(((byte)(0)))), ((int)(((byte)(238))))); + this.btnNever.OnPressedState.ForeColor = System.Drawing.Color.White; + this.btnNever.OnPressedState.IconLeftImage = null; + this.btnNever.OnPressedState.IconRightImage = null; + this.btnNever.Size = new System.Drawing.Size(179, 31); + this.btnNever.TabIndex = 27; + this.btnNever.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + this.btnNever.TextAlignment = System.Windows.Forms.HorizontalAlignment.Center; + this.btnNever.TextMarginLeft = 0; + this.btnNever.TextPadding = new System.Windows.Forms.Padding(0, 0, 15, 0); + this.btnNever.UseDefaultRadiusAndThickness = true; + this.btnNever.Click += new System.EventHandler(this.btnNever_Click); + // + // pbClose + // + this.pbClose.Dock = System.Windows.Forms.DockStyle.Right; + this.pbClose.Image = global::ExaltAccountManager.Properties.Resources.ic_close_black_24dp; + this.pbClose.Location = new System.Drawing.Point(301, 0); + this.pbClose.Name = "pbClose"; + this.pbClose.Size = new System.Drawing.Size(24, 24); + this.pbClose.TabIndex = 8; + this.pbClose.TabStop = false; + this.pbClose.Click += new System.EventHandler(this.pbClose_Click); + this.pbClose.MouseDown += new System.Windows.Forms.MouseEventHandler(this.pbClose_MouseDown); + this.pbClose.MouseEnter += new System.EventHandler(this.pbClose_MouseEnter); + this.pbClose.MouseLeave += new System.EventHandler(this.pbClose_MouseLeave); + // + // FrmDiscordPopup + // + this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 17F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.White; + this.ClientSize = new System.Drawing.Size(500, 309); + this.Controls.Add(this.pContent); + this.Controls.Add(this.pTop); + this.DoubleBuffered = true; + this.Font = new System.Drawing.Font("Segoe UI Semibold", 9.75F, System.Drawing.FontStyle.Bold); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; + this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.Name = "FrmDiscordPopup"; + this.StartPosition = System.Windows.Forms.FormStartPosition.Manual; + this.pTop.ResumeLayout(false); + this.pHeader.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.pbHeader)).EndInit(); + this.shadow.ResumeLayout(false); + this.shadow.PerformLayout(); + this.pContent.ResumeLayout(false); + this.pTopBar.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.pbClose)).EndInit(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Panel pTop; + private System.Windows.Forms.Panel pHeader; + private System.Windows.Forms.PictureBox pbHeader; + private System.Windows.Forms.Label lHeaderEAM; + private Bunifu.UI.WinForms.BunifuShadowPanel shadow; + private Bunifu.UI.WinForms.BunifuButton.BunifuButton btnYeah; + private System.Windows.Forms.Label lQuestion; + private System.Windows.Forms.Label lHeadline; + private System.Windows.Forms.Panel pTopBar; + private System.Windows.Forms.Panel pContent; + private Bunifu.UI.WinForms.BunifuButton.BunifuButton btnNever; + private Bunifu.UI.WinForms.BunifuButton.BunifuButton btnLater; + private System.Windows.Forms.PictureBox pbClose; + } +} \ No newline at end of file diff --git a/ExaltAccountManager/FrmDiscordPopup.cs b/ExaltAccountManager/FrmDiscordPopup.cs new file mode 100644 index 00000000..3b466f1d --- /dev/null +++ b/ExaltAccountManager/FrmDiscordPopup.cs @@ -0,0 +1,131 @@ +using System; +using System.Drawing; +using System.Windows.Forms; +using MK_EAM_Analytics; +using Newtonsoft.Json; + +namespace ExaltAccountManager +{ + public sealed partial class FrmDiscordPopup : Form + { + FrmMain frm; + + public FrmDiscordPopup(FrmMain _frm) + { + InitializeComponent(); + frm = _frm; + + MK_EAM_Lib.FormsUtils.SuspendDrawing(this); + + lQuestion.Text = string.Format(lQuestion.Text, DiscordHelper.GetUserName()); + + frm.ThemeChanged += ApplyTheme; + ApplyTheme(this, EventArgs.Empty); + + MK_EAM_Lib.FormsUtils.ResumeDrawing(this); + } + + ~FrmDiscordPopup() + { + frm.ThemeChanged -= ApplyTheme; + } + + private void ApplyTheme(object sender, EventArgs e) + { + #region ApplyTheme + + Color def = ColorScheme.GetColorDef(frm.UseDarkmode); + Color second = ColorScheme.GetColorSecond(frm.UseDarkmode); + Color third = ColorScheme.GetColorThird(frm.UseDarkmode); + Color font = ColorScheme.GetColorFont(frm.UseDarkmode); + + this.ForeColor = font; + this.BackColor = pTop.BackColor = def; + + pTopBar.BackColor = second; + + shadow.PanelColor = shadow.BackColor = shadow.PanelColor2 = def; + + shadow.BorderColor = second; + shadow.ShadowColor = frm.UseDarkmode ? Color.FromArgb(45, 20, 20, 20) : Color.FromArgb(25, 0, 0, 0); + + pbClose.Image = frm.UseDarkmode ? Properties.Resources.ic_close_white_24dp : Properties.Resources.ic_close_black_24dp; + pbClose.BackColor = pTopBar.BackColor; + #endregion + } + + private void btnYeah_Click(object sender, EventArgs e) + { + SaveSettings(new DiscordPopupSettings() + { + LastQuestion = DateTime.Now, + LastDiscordPopupResult = DiscordPopupSettings.DiscordpopupResult.Yes, + }); + + this.DialogResult = DialogResult.OK; + this.Close(); + } + + private void btnLater_Click(object sender, EventArgs e) + { + SaveSettings(new DiscordPopupSettings() + { + LastQuestion = DateTime.Now, + LastDiscordPopupResult = DiscordPopupSettings.DiscordpopupResult.No, + }); + + this.DialogResult = DialogResult.Cancel; + this.Close(); + } + + private void btnNever_Click(object sender, EventArgs e) + { + SaveSettings(new DiscordPopupSettings() + { + LastQuestion = DateTime.Now, + LastDiscordPopupResult = DiscordPopupSettings.DiscordpopupResult.Never, + }); + + this.DialogResult = DialogResult.Abort; + this.Close(); + } + + private void SaveSettings(DiscordPopupSettings settings) + { + try + { + System.IO.File.WriteAllText(frm.pathDiscordPopups, JsonConvert.SerializeObject(settings)); + } + catch + { + frm.LogEvent( + new MK_EAM_Lib.LogData( + "Discord Popup", + MK_EAM_Lib.LogEventType.Error, + "Failed to save DiscordPopupSettings to file") + ); + } + } + + private void pbClose_Click(object sender, EventArgs e) + { + this.Visible = false; + this.Close(); + } + + private void pbClose_MouseDown(object sender, MouseEventArgs e) => pbClose.BackColor = Color.Red; + + + private void pbClose_MouseEnter(object sender, EventArgs e) + { + pbClose.BackColor = Color.Crimson; + pbClose.Image = Properties.Resources.ic_close_white_24dp; + } + + private void pbClose_MouseLeave(object sender, EventArgs e) + { + pbClose.BackColor = pTopBar.BackColor; + pbClose.Image = frm.UseDarkmode ? Properties.Resources.ic_close_white_24dp : Properties.Resources.ic_close_black_24dp; + } + } +} diff --git a/ExaltAccountManager/FrmDiscordPopup.resx b/ExaltAccountManager/FrmDiscordPopup.resx new file mode 100644 index 00000000..51567b40 --- /dev/null +++ b/ExaltAccountManager/FrmDiscordPopup.resx @@ -0,0 +1,152 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + + + + iVBORw0KGgoAAAANSUhEUgAAAb4AAAAfCAYAAACYuqgWAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAELSURBVHhe7dixSQRBGIbhP7EgY3M7MJXdO9BKrgcrMBUV + BAMR9IyuE9nbswOdNd4K5nsGnlmG+fOXnVrWpk7nY813Yx0PANCf+e66psv/6G3reDHU9Nku3poHAOhQ + a9y8H+r7qoaa79vhdWUIAHry1LxX25bfwLUBAOjNQfgASCJ8AEQRPgCiCB8AUYQPgCjCB0AU4QMgivAB + EEX4AIgifABEET4AoggfAFGED4AowgdAFOEDIIrwARBF+ACIInwARBE+AKIIHwBRhA+AKMIHQBThAyCK + 8AEQ5VCbOj4PNb2sXAJATx7Hmr5a+E6bseb9ygAAdGT6aN9dLWtbP7ftsDx5AkCvdjf1e/YHk8XFg8l6 + N28AAAAASUVORK5CYII= + + + + + iVBORw0KGgoAAAANSUhEUgAAAQUAAAAfCAYAAADurNjYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAADySURBVHhe7d0/SsRAGMbhr/FA1vbewFaSFfQke4c9ga2o + IFiI4J9qbyLZ6A10Iha+kBvME3gShpk2P5Lqq+Xa1OfxWPNurMMe6NG8O6/p9DcIF3U4GWp6bRtPzQ3Q + pfb+z29DfZzVUPN1WzyuHAL6ctc8V7stnw9rB4D+7EUB+E8UgCAKQBAFIIgCEEQBCKIABFEAgigAQRSA + IApAEAUgiAIQRAEIogAEUQCCKABBFIAgCkAQBSCIAhBEAQiiAARRAMK+NnW4H2p6WNkE+nI71vS+DJfd + LDPkVg4AXZle2nP7N2T266otlt8IoF/by/o++gGUVg+smg9MTwAAAABJRU5ErkJggg== + + + + + iVBORw0KGgoAAAANSUhEUgAAALMAAAAfCAYAAACsyvxmAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAADpSURBVHhe7dw9CsIwGIfxd/FAzu7ewFXSCnqS3sETuIoK + goMIfky9iaTRG+gbccwF8ucp/FpCMj6ETq/lp7XXuLG0bmzogbqk9dzi9BfywoZJsHjzjbPbApXxbtM9 + 2HNmwdLGF6fCIaAWe3cxf+XrunQAqElPzFBBzJBBzJBBzJBBzJBBzJBBzJBBzJBBzJBBzJBBzJBBzJBB + zJBBzJBBzJBBzJBBzJBBzJBBzJBBzJBBzJBBzJBBzJBBzJDRW2vDIVg8FjaBWuwai488NLHNs7oKB4BK + xKt/u//wxPfKF/l3A6hRt7TP6AvE/T5aw8agrgAAAABJRU5ErkJggg== + + + \ No newline at end of file diff --git a/ExaltAccountManager/FrmMain.cs b/ExaltAccountManager/FrmMain.cs index 8136d8bc..4dd7a998 100644 --- a/ExaltAccountManager/FrmMain.cs +++ b/ExaltAccountManager/FrmMain.cs @@ -21,6 +21,8 @@ using System.Diagnostics; using MK_EAM_General_Services_Lib.General.Responses; using System.Drawing.Text; +using Newtonsoft.Json; +using Newtonsoft.Json.Linq; namespace ExaltAccountManager { @@ -263,28 +265,29 @@ private UIState uiState #region Paths - public static string saveFilePath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "ExaltAccountManager"); - - public string optionsPath = Path.Combine(saveFilePath, "EAM.options"); - public string accountsPath = Path.Combine(saveFilePath, "EAM.accounts"); - public string accountOrdersPath = Path.Combine(saveFilePath, "EAM.accountOrders"); - public string dailyLoginsPath = Path.Combine(saveFilePath, "EAM.DailyLoginsV2"); - public string notificationOptionsPath = Path.Combine(saveFilePath, "EAM.NotificationOptions"); - public string serverCollectionPath = Path.Combine(saveFilePath, "EAM.ServerCollection"); - public string accountStatsPath = Path.Combine(saveFilePath, "Stats"); - public string pathLogs = Path.Combine(saveFilePath, "EAM.Logs"); - public string pathNews = Path.Combine(saveFilePath, "EAM.News"); - public string lastUpdateCheckPath = Path.Combine(saveFilePath, "EAM.LastUpdateCheck"); - public string lastNotificationCheckPath = Path.Combine(saveFilePath, "EAM.LastNotificationCheck"); - public string forceHWIDFilePath = Path.Combine(saveFilePath, "EAM.HWID"); - public string itemsSaveFilePath = Path.Combine(saveFilePath, "EAM.ItemsSaveFile"); - public string privacyPolicyPath = Path.Combine(saveFilePath, "EAM_Privacy_Policy.txt"); - public string activeVaultPeekerAccountsPath = Path.Combine(saveFilePath, "EAM.ActiveVaultPeekerAccounts"); - public string getClientHWIDToolPath = Path.Combine(Application.StartupPath, "EAM_GetClientHWID"); - public string pingCheckerExePath = Path.Combine(Application.StartupPath, "EAM PingChecker.exe"); - public string statisticsExePath = Path.Combine(Application.StartupPath, "EAM Statistics.exe"); - public string vaultPeekerExePath = Path.Combine(Application.StartupPath, "EAM Vault Peeker.exe"); - public string dailyServiceExePath = Path.Combine(Application.StartupPath, "DailyService", "EAM Daily Login Service.exe"); + public static readonly string saveFilePath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "ExaltAccountManager"); + + public readonly string optionsPath = Path.Combine(saveFilePath, "EAM.options"); + public readonly string accountsPath = Path.Combine(saveFilePath, "EAM.accounts"); + public readonly string accountOrdersPath = Path.Combine(saveFilePath, "EAM.accountOrders"); + public readonly string dailyLoginsPath = Path.Combine(saveFilePath, "EAM.DailyLoginsV2"); + public readonly string notificationOptionsPath = Path.Combine(saveFilePath, "EAM.NotificationOptions"); + public readonly string serverCollectionPath = Path.Combine(saveFilePath, "EAM.ServerCollection"); + public readonly string accountStatsPath = Path.Combine(saveFilePath, "Stats"); + public readonly string pathLogs = Path.Combine(saveFilePath, "EAM.Logs"); + public readonly string pathNews = Path.Combine(saveFilePath, "EAM.News"); + public readonly string pathDiscordPopups = Path.Combine(saveFilePath, "EAM.DiscordPopup"); + public readonly string lastUpdateCheckPath = Path.Combine(saveFilePath, "EAM.LastUpdateCheck"); + public readonly string lastNotificationCheckPath = Path.Combine(saveFilePath, "EAM.LastNotificationCheck"); + public readonly string forceHWIDFilePath = Path.Combine(saveFilePath, "EAM.HWID"); + public readonly string itemsSaveFilePath = Path.Combine(saveFilePath, "EAM.ItemsSaveFile"); + public readonly string privacyPolicyPath = Path.Combine(saveFilePath, "EAM_Privacy_Policy.txt"); + public readonly string activeVaultPeekerAccountsPath = Path.Combine(saveFilePath, "EAM.ActiveVaultPeekerAccounts"); + public readonly string getClientHWIDToolPath = Path.Combine(Application.StartupPath, "EAM_GetClientHWID"); + public readonly string pingCheckerExePath = Path.Combine(Application.StartupPath, "EAM PingChecker.exe"); + public readonly string statisticsExePath = Path.Combine(Application.StartupPath, "EAM Statistics.exe"); + public readonly string dailyServiceExePath = Path.Combine(Application.StartupPath, "DailyService", "EAM Daily Login Service.exe"); + public readonly string vaultPeekerExePath = Path.Combine(Application.StartupPath, "EAM Vault Peeker.exe"); #endregion @@ -436,11 +439,14 @@ public FrmMain(string[] args) OptionsData.discordOptions = new DiscordOptions() { ShowAccountNames = true, ShowMenus = true, ShowState = true }; } - DiscordHelper.OnDiscordConnectionChanged += DiscordHelper_OnDiscordConnectionChanged; - DiscordHelper.Initialize(OptionsData.discordOptions, - this, - autoEvents: false, - _updateOnChange: false); + if (!OptionsData.discordOptions.OptOut) + { + DiscordHelper.OnDiscordConnectionChanged += DiscordHelper_OnDiscordConnectionChanged; + DiscordHelper.Initialize(OptionsData.discordOptions, + this, + autoEvents: false, + _updateOnChange: false); + } #endregion @@ -519,6 +525,25 @@ public FrmMain(string[] args) private void DiscordHelper_OnDiscordConnectionChanged(object sender, bool isConnected) { + if (File.Exists(pathDiscordPopups)) + { + try + { + DiscordPopupSettings settings = JsonConvert.DeserializeObject(File.ReadAllText(pathDiscordPopups)); + + if (settings.LastDiscordPopupResult == DiscordPopupSettings.DiscordpopupResult.Never || + (DateTime.Now - settings.LastQuestion).TotalDays <= 7 || + settings.LastDiscordPopupResult == DiscordPopupSettings.DiscordpopupResult.Yes) + { + return; + } + } + catch { } + } + + cancellationTokenSource = new CancellationTokenSource(); + cancellationTokenSource.CancelAfter(10000); + if (isConnected && DiscordUser == null) { //Request discord user @@ -545,43 +570,19 @@ private void DiscordHelper_OnDiscordConnectionChanged(object sender, bool isConn } DiscordUser = task.Result; + if (DiscordUser != null && DiscordUser.DiscordUserId.Equals("NotFound")) { //No discord user found - DiscordUser = null; - if (MessageBox.Show("No Discord user found for this EAM-Account." + Environment.NewLine + - $"Would you like connect {DiscordHelper.GetUserName()} with your EAM-Account?" + Environment.NewLine + - "This would allow the EAM-Discord-Bot to grant you roles based on certain achievements.", - "No Discord user found", - MessageBoxButtons.YesNo, - MessageBoxIcon.Question, MessageBoxDefaultButton.Button1, MessageBoxOptions.ServiceNotification, false) == DialogResult.Yes) + + DiscordUserConnectionInvoker(DiscordUser, token); + } + else if (DiscordUser != null) + { + File.WriteAllText(pathDiscordPopups, JsonConvert.SerializeObject(new DiscordPopupSettings() { - ulong discordId = DiscordHelper.GetUserId(); - if (discordId == ulong.MaxValue) - { - LogEvent(new MK_EAM_Lib.LogData( - "EAM", - MK_EAM_Lib.LogEventType.EAMError, - "Failed to set discord user id.")); - return; - } - - GeneralServicesClient.Instance?.PostDiscordUser(GetAPIClientIdHash(false), discordId.ToString()); - while (!task.IsCompleted) - { - if (token.IsCancellationRequested) - { - LogEvent(new MK_EAM_Lib.LogData( - "EAM", - MK_EAM_Lib.LogEventType.APIError, - "Failed to fetch stored discord user data.")); - - return; - } - - await Task.Delay(50, token); - } - DiscordUser = task.Result; - } + LastQuestion = DateTime.Now, + LastDiscordPopupResult = DiscordPopupSettings.DiscordpopupResult.Yes + })); } } catch (Exception ex) @@ -595,6 +596,43 @@ private void DiscordHelper_OnDiscordConnectionChanged(object sender, bool isConn } } + private void DiscordUserConnectionInvoker(DiscordUser dcUser, CancellationToken token) => DiscordUserConnection(dcUser, token); + private bool DiscordUserConnection(DiscordUser dcUser, CancellationToken token) + { + if (this.InvokeRequired) + return (bool)this.Invoke((Func)DiscordUserConnection, dcUser, token); + + DiscordUser = null; + using (FrmDiscordPopup popup = new FrmDiscordPopup(this)) + { + popup.Location = new Point(this.Location.X + (this.Width - popup.Width) / 2, this.Location.Y + (this.Height - popup.Height) / 2); + if (ShowShadowFormDialog(popup) == DialogResult.OK) + { + FetchDiscordUser(); + return true; + } + } + + return false; + } + + private async void FetchDiscordUser() + { + ulong discordId = DiscordHelper.GetUserId(); + if (discordId == ulong.MaxValue) + { + LogEvent(new MK_EAM_Lib.LogData( + "EAM", + MK_EAM_Lib.LogEventType.EAMError, + "Failed to set discord user id.")); + return; + } + + DiscordUser = await GeneralServicesClient.Instance?.PostDiscordUser(GetAPIClientIdHash(false), discordId.ToString()); + + } + + private void FrmMain_Load(object sender, EventArgs e) { timerLoadUI.Start(); @@ -1943,6 +1981,26 @@ private void FrmMain_LocationChanged(object sender, EventArgs e) m_PreviousLocation = Location; } + public DialogResult ShowShadowFormDialog(Form form) + { + if (frmShadowHost == null) + { + frmShadowHost = new FrmShadowHost(this); + frmShadowHost.Size = new Size(this.Size.Width - 1, this.Size.Height - 25); + frmShadowHost.Location = new Point(this.Left, this.Top + 24); + frmShadowHost.Owner = this; + frmShadowHost.TopLevel = true; + } + else + frmShadowHost.RemoveControl(); + + frmShadowHost.Show(); + DialogResult result = frmShadowHost.ShowFormDialog(form); + + RemoveShadowForm(); + return result; + } + public void ShowShadowForm(Control ctr) { if (frmShadowHost == null) diff --git a/ExaltAccountManager/FrmShadowHost.Designer.cs b/ExaltAccountManager/FrmShadowHost.Designer.cs index 0e3095f6..c8261f45 100644 --- a/ExaltAccountManager/FrmShadowHost.Designer.cs +++ b/ExaltAccountManager/FrmShadowHost.Designer.cs @@ -36,6 +36,7 @@ private void InitializeComponent() this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 17F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(853, 552); + this.DoubleBuffered = true; this.Font = new System.Drawing.Font("Segoe UI Semibold", 9.75F, System.Drawing.FontStyle.Bold); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); diff --git a/ExaltAccountManager/FrmShadowHost.cs b/ExaltAccountManager/FrmShadowHost.cs index 38f1fcec..837ed7ae 100644 --- a/ExaltAccountManager/FrmShadowHost.cs +++ b/ExaltAccountManager/FrmShadowHost.cs @@ -46,6 +46,11 @@ public void ShowControl(Control ctr) frmHost.Show(); } + public DialogResult ShowFormDialog(Form form) + { + return form.ShowDialog(this); + } + public void RemoveControl() { frmHost.RemoveControl(); diff --git a/ExaltAccountManager/OLD/FrmOptions.cs b/ExaltAccountManager/OLD/FrmOptions.cs index 984638b3..740295c2 100644 --- a/ExaltAccountManager/OLD/FrmOptions.cs +++ b/ExaltAccountManager/OLD/FrmOptions.cs @@ -7,7 +7,7 @@ namespace ExaltAccountManager { - public partial class FrmOptions : Form + public sealed partial class FrmOptions : Form { FrmMainOLD frm; Pen p = new Pen(Color.Black); @@ -402,6 +402,7 @@ public sealed class OptionsData [System.Serializable] public sealed class DiscordOptions { + public bool OptOut { get; set; } = false; public bool ShowAccountNames { get; set; } = true; public bool ShowMenus { get; set; } = true; diff --git a/ExaltAccountManager/UI/Elements/EleDiscordSettings.Designer.cs b/ExaltAccountManager/UI/Elements/EleDiscordSettings.Designer.cs index dc9aafd2..8d19a8f2 100644 --- a/ExaltAccountManager/UI/Elements/EleDiscordSettings.Designer.cs +++ b/ExaltAccountManager/UI/Elements/EleDiscordSettings.Designer.cs @@ -29,8 +29,9 @@ protected override void Dispose(bool disposing) private void InitializeComponent() { System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(EleDiscordSettings)); - Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderEdges borderEdges1 = new Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderEdges(); + Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderEdges borderEdges3 = new Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderEdges(); this.shadow = new Bunifu.UI.WinForms.BunifuShadowPanel(); + this.toggleDiscord = new Bunifu.UI.WinForms.BunifuToggleSwitch2(); this.btnSave = new Bunifu.UI.WinForms.BunifuButton.BunifuButton(); this.pbClose = new Bunifu.UI.WinForms.BunifuPictureBox(); this.bunifuSeparator2 = new Bunifu.UI.WinForms.BunifuSeparator(); @@ -40,7 +41,9 @@ private void InitializeComponent() this.label6 = new System.Windows.Forms.Label(); this.lSearchForRotmgUpdates = new System.Windows.Forms.Label(); this.toggleShowAccountNames = new Bunifu.UI.WinForms.BunifuToggleSwitch2(); - this.toggleDiscord = new Bunifu.UI.WinForms.BunifuToggleSwitch2(); + this.label1 = new System.Windows.Forms.Label(); + this.toggleUseDiscord = new Bunifu.UI.WinForms.BunifuToggleSwitch2(); + this.pCover = new System.Windows.Forms.Panel(); this.shadow.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.pbClose)).BeginInit(); this.SuspendLayout(); @@ -51,6 +54,9 @@ private void InitializeComponent() this.shadow.BorderColor = System.Drawing.Color.WhiteSmoke; this.shadow.BorderRadius = 9; this.shadow.BorderThickness = 1; + this.shadow.Controls.Add(this.pCover); + this.shadow.Controls.Add(this.label1); + this.shadow.Controls.Add(this.toggleUseDiscord); this.shadow.Controls.Add(this.toggleDiscord); this.shadow.Controls.Add(this.btnSave); this.shadow.Controls.Add(this.pbClose); @@ -73,16 +79,32 @@ private void InitializeComponent() this.shadow.ShadowDepth = 4; this.shadow.ShadowStyle = Bunifu.UI.WinForms.BunifuShadowPanel.ShadowStyles.Surrounded; this.shadow.ShadowTopLeftVisible = false; - this.shadow.Size = new System.Drawing.Size(471, 223); + this.shadow.Size = new System.Drawing.Size(471, 273); this.shadow.Style = Bunifu.UI.WinForms.BunifuShadowPanel.BevelStyles.Flat; this.shadow.TabIndex = 20; // + // toggleDiscord + // + this.toggleDiscord.BackColor = System.Drawing.Color.Transparent; + this.toggleDiscord.Checked = false; + this.toggleDiscord.CheckedBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(156)))), ((int)(((byte)(95)))), ((int)(((byte)(244))))); + this.toggleDiscord.CheckedSwitchColor = System.Drawing.Color.White; + this.toggleDiscord.CheckedSwitchStyle = Bunifu.UI.WinForms.BunifuToggleSwitch2.SwitchStyles.Outline; + this.toggleDiscord.Location = new System.Drawing.Point(263, 136); + this.toggleDiscord.Name = "toggleDiscord"; + this.toggleDiscord.OutlineThickness = 2; + this.toggleDiscord.Size = new System.Drawing.Size(44, 19); + this.toggleDiscord.TabIndex = 28; + this.toggleDiscord.UncheckedBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(189)))), ((int)(((byte)(189)))), ((int)(((byte)(189))))); + this.toggleDiscord.UncheckedSwitchColor = System.Drawing.Color.White; + this.toggleDiscord.UncheckedSwitchStyle = Bunifu.UI.WinForms.BunifuToggleSwitch2.SwitchStyles.Outline; + // // btnSave // this.btnSave.AllowAnimations = true; this.btnSave.AllowMouseEffects = true; this.btnSave.AllowToggling = false; - this.btnSave.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + this.btnSave.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.btnSave.AnimationSpeed = 200; this.btnSave.AutoGenerateColors = false; @@ -98,11 +120,11 @@ private void InitializeComponent() this.btnSave.ColorContrastOnClick = 45; this.btnSave.ColorContrastOnHover = 45; this.btnSave.Cursor = System.Windows.Forms.Cursors.Default; - borderEdges1.BottomLeft = true; - borderEdges1.BottomRight = true; - borderEdges1.TopLeft = true; - borderEdges1.TopRight = true; - this.btnSave.CustomizableEdges = borderEdges1; + borderEdges3.BottomLeft = true; + borderEdges3.BottomRight = true; + borderEdges3.TopLeft = true; + borderEdges3.TopRight = true; + this.btnSave.CustomizableEdges = borderEdges3; this.btnSave.DialogResult = System.Windows.Forms.DialogResult.None; this.btnSave.DisabledBorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(191)))), ((int)(((byte)(191)))), ((int)(((byte)(191))))); this.btnSave.DisabledFillColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); @@ -128,7 +150,7 @@ private void InitializeComponent() this.btnSave.IdleIconLeftImage = global::ExaltAccountManager.Properties.Resources.save_Outline_36px; this.btnSave.IdleIconRightImage = null; this.btnSave.IndicateFocus = false; - this.btnSave.Location = new System.Drawing.Point(16, 176); + this.btnSave.Location = new System.Drawing.Point(16, 226); this.btnSave.Name = "btnSave"; this.btnSave.OnDisabledState.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(191)))), ((int)(((byte)(191)))), ((int)(((byte)(191))))); this.btnSave.OnDisabledState.BorderRadius = 5; @@ -200,7 +222,7 @@ private void InitializeComponent() this.bunifuSeparator2.LineColor = System.Drawing.Color.Silver; this.bunifuSeparator2.LineStyle = Bunifu.UI.WinForms.BunifuSeparator.LineStyles.Solid; this.bunifuSeparator2.LineThickness = 1; - this.bunifuSeparator2.Location = new System.Drawing.Point(227, 53); + this.bunifuSeparator2.Location = new System.Drawing.Point(227, 103); this.bunifuSeparator2.Margin = new System.Windows.Forms.Padding(7); this.bunifuSeparator2.Name = "bunifuSeparator2"; this.bunifuSeparator2.Orientation = Bunifu.UI.WinForms.BunifuSeparator.LineOrientation.Vertical; @@ -211,7 +233,7 @@ private void InitializeComponent() // this.lGetMessagesAndWarnings.AutoSize = true; this.lGetMessagesAndWarnings.Font = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lGetMessagesAndWarnings.Location = new System.Drawing.Point(259, 58); + this.lGetMessagesAndWarnings.Location = new System.Drawing.Point(259, 108); this.lGetMessagesAndWarnings.Name = "lGetMessagesAndWarnings"; this.lGetMessagesAndWarnings.Size = new System.Drawing.Size(87, 21); this.lGetMessagesAndWarnings.TabIndex = 19; @@ -222,7 +244,7 @@ private void InitializeComponent() // this.lGetEAMUpdateNotifications.AutoSize = true; this.lGetEAMUpdateNotifications.Font = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lGetEAMUpdateNotifications.Location = new System.Drawing.Point(12, 116); + this.lGetEAMUpdateNotifications.Location = new System.Drawing.Point(12, 166); this.lGetEAMUpdateNotifications.Name = "lGetEAMUpdateNotifications"; this.lGetEAMUpdateNotifications.Size = new System.Drawing.Size(147, 21); this.lGetEAMUpdateNotifications.TabIndex = 17; @@ -235,7 +257,7 @@ private void InitializeComponent() this.toggleShowMenus.CheckedBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(156)))), ((int)(((byte)(95)))), ((int)(((byte)(244))))); this.toggleShowMenus.CheckedSwitchColor = System.Drawing.Color.White; this.toggleShowMenus.CheckedSwitchStyle = Bunifu.UI.WinForms.BunifuToggleSwitch2.SwitchStyles.Outline; - this.toggleShowMenus.Location = new System.Drawing.Point(16, 144); + this.toggleShowMenus.Location = new System.Drawing.Point(16, 194); this.toggleShowMenus.Name = "toggleShowMenus"; this.toggleShowMenus.OutlineThickness = 2; this.toggleShowMenus.Size = new System.Drawing.Size(44, 19); @@ -259,7 +281,7 @@ private void InitializeComponent() // this.lSearchForRotmgUpdates.AutoSize = true; this.lSearchForRotmgUpdates.Font = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lSearchForRotmgUpdates.Location = new System.Drawing.Point(12, 58); + this.lSearchForRotmgUpdates.Location = new System.Drawing.Point(12, 108); this.lSearchForRotmgUpdates.Name = "lSearchForRotmgUpdates"; this.lSearchForRotmgUpdates.Size = new System.Drawing.Size(162, 21); this.lSearchForRotmgUpdates.TabIndex = 12; @@ -272,7 +294,7 @@ private void InitializeComponent() this.toggleShowAccountNames.CheckedBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(156)))), ((int)(((byte)(95)))), ((int)(((byte)(244))))); this.toggleShowAccountNames.CheckedSwitchColor = System.Drawing.Color.White; this.toggleShowAccountNames.CheckedSwitchStyle = Bunifu.UI.WinForms.BunifuToggleSwitch2.SwitchStyles.Outline; - this.toggleShowAccountNames.Location = new System.Drawing.Point(16, 86); + this.toggleShowAccountNames.Location = new System.Drawing.Point(16, 136); this.toggleShowAccountNames.Name = "toggleShowAccountNames"; this.toggleShowAccountNames.OutlineThickness = 2; this.toggleShowAccountNames.Size = new System.Drawing.Size(44, 19); @@ -281,21 +303,40 @@ private void InitializeComponent() this.toggleShowAccountNames.UncheckedSwitchColor = System.Drawing.Color.White; this.toggleShowAccountNames.UncheckedSwitchStyle = Bunifu.UI.WinForms.BunifuToggleSwitch2.SwitchStyles.Outline; // - // toggleDiscord + // label1 // - this.toggleDiscord.BackColor = System.Drawing.Color.Transparent; - this.toggleDiscord.Checked = false; - this.toggleDiscord.CheckedBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(156)))), ((int)(((byte)(95)))), ((int)(((byte)(244))))); - this.toggleDiscord.CheckedSwitchColor = System.Drawing.Color.White; - this.toggleDiscord.CheckedSwitchStyle = Bunifu.UI.WinForms.BunifuToggleSwitch2.SwitchStyles.Outline; - this.toggleDiscord.Location = new System.Drawing.Point(263, 86); - this.toggleDiscord.Name = "toggleDiscord"; - this.toggleDiscord.OutlineThickness = 2; - this.toggleDiscord.Size = new System.Drawing.Size(44, 19); - this.toggleDiscord.TabIndex = 28; - this.toggleDiscord.UncheckedBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(189)))), ((int)(((byte)(189)))), ((int)(((byte)(189))))); - this.toggleDiscord.UncheckedSwitchColor = System.Drawing.Color.White; - this.toggleDiscord.UncheckedSwitchStyle = Bunifu.UI.WinForms.BunifuToggleSwitch2.SwitchStyles.Outline; + this.label1.AutoSize = true; + this.label1.Font = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label1.Location = new System.Drawing.Point(12, 46); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(171, 21); + this.label1.TabIndex = 30; + this.label1.Text = "Use discord integration"; + // + // toggleUseDiscord + // + this.toggleUseDiscord.BackColor = System.Drawing.Color.Transparent; + this.toggleUseDiscord.Checked = true; + this.toggleUseDiscord.CheckedBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(156)))), ((int)(((byte)(95)))), ((int)(((byte)(244))))); + this.toggleUseDiscord.CheckedSwitchColor = System.Drawing.Color.White; + this.toggleUseDiscord.CheckedSwitchStyle = Bunifu.UI.WinForms.BunifuToggleSwitch2.SwitchStyles.Outline; + this.toggleUseDiscord.Location = new System.Drawing.Point(16, 74); + this.toggleUseDiscord.Name = "toggleUseDiscord"; + this.toggleUseDiscord.OutlineThickness = 2; + this.toggleUseDiscord.Size = new System.Drawing.Size(44, 19); + this.toggleUseDiscord.TabIndex = 29; + this.toggleUseDiscord.UncheckedBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(189)))), ((int)(((byte)(189)))), ((int)(((byte)(189))))); + this.toggleUseDiscord.UncheckedSwitchColor = System.Drawing.Color.White; + this.toggleUseDiscord.UncheckedSwitchStyle = Bunifu.UI.WinForms.BunifuToggleSwitch2.SwitchStyles.Outline; + this.toggleUseDiscord.CheckedChanged += new System.EventHandler(this.toggleUseDiscord_CheckedChanged); + // + // pCover + // + this.pCover.Location = new System.Drawing.Point(17, 99); + this.pCover.Name = "pCover"; + this.pCover.Size = new System.Drawing.Size(438, 117); + this.pCover.TabIndex = 31; + this.pCover.Visible = false; // // EleDiscordSettings // @@ -305,9 +346,9 @@ private void InitializeComponent() this.Controls.Add(this.shadow); this.DoubleBuffered = true; this.Font = new System.Drawing.Font("Segoe UI Semibold", 9.75F, System.Drawing.FontStyle.Bold); - this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.Margin = new System.Windows.Forms.Padding(4); this.Name = "EleDiscordSettings"; - this.Size = new System.Drawing.Size(471, 223); + this.Size = new System.Drawing.Size(471, 273); this.shadow.ResumeLayout(false); this.shadow.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.pbClose)).EndInit(); @@ -328,5 +369,8 @@ private void InitializeComponent() private System.Windows.Forms.Label lSearchForRotmgUpdates; private Bunifu.UI.WinForms.BunifuToggleSwitch2 toggleShowAccountNames; private Bunifu.UI.WinForms.BunifuToggleSwitch2 toggleDiscord; + private System.Windows.Forms.Label label1; + private Bunifu.UI.WinForms.BunifuToggleSwitch2 toggleUseDiscord; + private System.Windows.Forms.Panel pCover; } } diff --git a/ExaltAccountManager/UI/UIChangelog.cs b/ExaltAccountManager/UI/UIChangelog.cs index aff9d04e..aeb10102 100644 --- a/ExaltAccountManager/UI/UIChangelog.cs +++ b/ExaltAccountManager/UI/UIChangelog.cs @@ -12,6 +12,26 @@ public sealed partial class UIChangelog : UserControl private readonly BindingList changelogEntries = new BindingList() { + new ChangelogEntry() + { + ReleaseDate = new DateTime(2023, 05, 26), + Version = new Version(3, 2, 0), + Name = "Discord integration update, and bug fixes", + Description = $"DISCORD INTEGRATION{Environment.NewLine}{Environment.NewLine}" + + $"- Added an opt-out for the discord integration. :({Environment.NewLine}" + + $"- Added an option to link your discord user with your EAM-account.{Environment.NewLine}" + + $"   This allows you to earn cool roles and bonuses on the EAM-Discord server.{Environment.NewLine}{Environment.NewLine}" + + $"MISCELLANEOUS{Environment.NewLine}" + + $"- Made the Captcha Aid more descriptive.{Environment.NewLine}" + + $"- Made the Accounts list select the first in the list upon filtering by{Environment.NewLine}" + + $"   accountname / email.{Environment.NewLine}" + + $"- Reduced the time \"Refresh data\"-button is \"blocked\" after use.{Environment.NewLine}{Environment.NewLine}" + + $"- The Llama did upgrade!" + + $"BUG FIXES{Environment.NewLine}" + + $"- Fixed the snackbar displaying and error after a successfull captcha.{Environment.NewLine}" + + $"- Fixed the default export location to bot be inside the application folder, since this{Environment.NewLine}" + + $"   leads to unauthorized exceptions on installed versions.{Environment.NewLine}{Environment.NewLine}" + }, new ChangelogEntry() { ReleaseDate = new DateTime(2023, 04, 11), diff --git a/ExaltAccountManager/UI/UIOptions.Designer.cs b/ExaltAccountManager/UI/UIOptions.Designer.cs index b804869f..723ddb1e 100644 --- a/ExaltAccountManager/UI/UIOptions.Designer.cs +++ b/ExaltAccountManager/UI/UIOptions.Designer.cs @@ -313,6 +313,7 @@ private void InitializeComponent() this.tbPath.BorderColorIdle = System.Drawing.Color.Silver; this.tbPath.BorderRadius = 1; this.tbPath.BorderThickness = 2; + this.tbPath.CharacterCase = Bunifu.UI.WinForms.BunifuTextBox.CharacterCases.Normal; this.tbPath.CharacterCasing = System.Windows.Forms.CharacterCasing.Normal; this.tbPath.Cursor = System.Windows.Forms.Cursors.IBeam; this.tbPath.DefaultFont = new System.Drawing.Font("Segoe UI", 9.25F); From cc93aafb4e6a08311896b33d7c9fa8355cf135f1 Mon Sep 17 00:00:00 2001 From: MaikEight Date: Sun, 28 May 2023 02:27:17 +0200 Subject: [PATCH 22/40] =?UTF-8?q?=F0=9F=90=9B=20Fixed=20default=20path=20t?= =?UTF-8?q?o=20prevent=20unauthorized=20exceptions=20when=20saving=20reque?= =?UTF-8?q?sted=20AnalyticsUserData?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ExaltAccountManager/UI/Elements/EleAnalyticsSettings.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ExaltAccountManager/UI/Elements/EleAnalyticsSettings.cs b/ExaltAccountManager/UI/Elements/EleAnalyticsSettings.cs index 1d8ce88f..0cdb2ec7 100644 --- a/ExaltAccountManager/UI/Elements/EleAnalyticsSettings.cs +++ b/ExaltAccountManager/UI/Elements/EleAnalyticsSettings.cs @@ -26,7 +26,11 @@ public EleAnalyticsSettings(FrmMain _frm) toggleAnonymize.Checked = frm.OptionsData.analyticsOptions.Anonymization; toggleSendAnalytics.Checked = !frm.OptionsData.analyticsOptions.OptOut; - if (frm.OptionsData.analyticsOptions.OptOut || frm.OptionsData.analyticsOptions.Anonymization || AnalyticsClient.Instance == null || AnalyticsClient.Instance?.SessionId == Guid.Empty || AnalyticsClient.Instance?.SessionId == Guid.Parse("45414D20-0000-6279-0000-204D61696B38")) + if (frm.OptionsData.analyticsOptions.OptOut || + frm.OptionsData.analyticsOptions.Anonymization || + AnalyticsClient.Instance == null || + AnalyticsClient.Instance?.SessionId == Guid.Empty || + AnalyticsClient.Instance?.SessionId == Guid.Parse("45414D20-0000-6279-0000-204D61696B38")) { btnRequestData.Enabled = btnDelete.Enabled = false; @@ -118,7 +122,7 @@ private void btnRequestData_Click(object sender, EventArgs e) string json = JsonConvert.SerializeObject(result, Formatting.Indented); try { - string path = System.IO.Path.Combine(Application.StartupPath, "AnalyticsUserData.txt"); + string path = System.IO.Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), "AnalyticsUserData.txt"); if (System.IO.File.Exists(path)) System.IO.File.Delete(path); System.IO.File.WriteAllText(path, json); From 761c329a204215642370cd27c6adfd140245fd3c Mon Sep 17 00:00:00 2001 From: MaikEight Date: Sun, 28 May 2023 02:31:00 +0200 Subject: [PATCH 23/40] =?UTF-8?q?=E2=9C=A8=20Added=20a=20new=20button=20in?= =?UTF-8?q?=20the=20discord=20settings=20that=20opens=20the=20new=20discor?= =?UTF-8?q?d=20popup=20(FrmDiscordPopup)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../FrmDiscordPopup.Designer.cs | 458 +++++++++--------- ExaltAccountManager/FrmDiscordPopup.cs | 14 +- ExaltAccountManager/FrmDiscordPopup.resx | 30 +- ExaltAccountManager/FrmMain.cs | 9 +- .../Elements/EleDiscordSettings.Designer.cs | 183 +++++-- .../UI/Elements/EleDiscordSettings.cs | 32 +- .../UI/Elements/EleDiscordSettings.resx | 10 + ExaltAccountManager/UI/UIDailyLogins.cs | 3 +- ExaltAccountManager/UI/UIOptions.cs | 34 +- 9 files changed, 445 insertions(+), 328 deletions(-) diff --git a/ExaltAccountManager/FrmDiscordPopup.Designer.cs b/ExaltAccountManager/FrmDiscordPopup.Designer.cs index b89c0643..3af5a360 100644 --- a/ExaltAccountManager/FrmDiscordPopup.Designer.cs +++ b/ExaltAccountManager/FrmDiscordPopup.Designer.cs @@ -29,29 +29,29 @@ protected override void Dispose(bool disposing) private void InitializeComponent() { System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmDiscordPopup)); - Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderEdges borderEdges10 = new Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderEdges(); - Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderEdges borderEdges11 = new Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderEdges(); - Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderEdges borderEdges12 = new Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderEdges(); + Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderEdges borderEdges4 = new Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderEdges(); + Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderEdges borderEdges5 = new Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderEdges(); + Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderEdges borderEdges6 = new Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderEdges(); this.pTop = new System.Windows.Forms.Panel(); + this.pTopBar = new System.Windows.Forms.Panel(); + this.pbClose = new System.Windows.Forms.PictureBox(); this.pHeader = new System.Windows.Forms.Panel(); this.pbHeader = new System.Windows.Forms.PictureBox(); this.lHeaderEAM = new System.Windows.Forms.Label(); this.shadow = new Bunifu.UI.WinForms.BunifuShadowPanel(); + this.btnNever = new Bunifu.UI.WinForms.BunifuButton.BunifuButton(); + this.btnLater = new Bunifu.UI.WinForms.BunifuButton.BunifuButton(); this.btnYeah = new Bunifu.UI.WinForms.BunifuButton.BunifuButton(); this.lQuestion = new System.Windows.Forms.Label(); this.lHeadline = new System.Windows.Forms.Label(); this.pContent = new System.Windows.Forms.Panel(); - this.pTopBar = new System.Windows.Forms.Panel(); - this.btnLater = new Bunifu.UI.WinForms.BunifuButton.BunifuButton(); - this.btnNever = new Bunifu.UI.WinForms.BunifuButton.BunifuButton(); - this.pbClose = new System.Windows.Forms.PictureBox(); this.pTop.SuspendLayout(); + this.pTopBar.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.pbClose)).BeginInit(); this.pHeader.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.pbHeader)).BeginInit(); this.shadow.SuspendLayout(); this.pContent.SuspendLayout(); - this.pTopBar.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.pbClose)).BeginInit(); this.SuspendLayout(); // // pTop @@ -64,6 +64,30 @@ private void InitializeComponent() this.pTop.Size = new System.Drawing.Size(500, 64); this.pTop.TabIndex = 0; // + // pTopBar + // + this.pTopBar.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(250)))), ((int)(((byte)(250)))), ((int)(((byte)(250))))); + this.pTopBar.Controls.Add(this.pbClose); + this.pTopBar.Dock = System.Windows.Forms.DockStyle.Top; + this.pTopBar.Location = new System.Drawing.Point(175, 0); + this.pTopBar.Name = "pTopBar"; + this.pTopBar.Size = new System.Drawing.Size(325, 24); + this.pTopBar.TabIndex = 2; + // + // pbClose + // + this.pbClose.Dock = System.Windows.Forms.DockStyle.Right; + this.pbClose.Image = global::ExaltAccountManager.Properties.Resources.ic_close_black_24dp; + this.pbClose.Location = new System.Drawing.Point(301, 0); + this.pbClose.Name = "pbClose"; + this.pbClose.Size = new System.Drawing.Size(24, 24); + this.pbClose.TabIndex = 8; + this.pbClose.TabStop = false; + this.pbClose.Click += new System.EventHandler(this.pbClose_Click); + this.pbClose.MouseDown += new System.Windows.Forms.MouseEventHandler(this.pbClose_MouseDown); + this.pbClose.MouseEnter += new System.EventHandler(this.pbClose_MouseEnter); + this.pbClose.MouseLeave += new System.EventHandler(this.pbClose_MouseLeave); + // // pHeader // this.pHeader.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(98)))), ((int)(((byte)(0)))), ((int)(((byte)(238))))); @@ -124,6 +148,194 @@ private void InitializeComponent() this.shadow.Style = Bunifu.UI.WinForms.BunifuShadowPanel.BevelStyles.Flat; this.shadow.TabIndex = 21; // + // btnNever + // + this.btnNever.AllowAnimations = true; + this.btnNever.AllowMouseEffects = true; + this.btnNever.AllowToggling = false; + this.btnNever.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.btnNever.AnimationSpeed = 200; + this.btnNever.AutoGenerateColors = false; + this.btnNever.AutoRoundBorders = false; + this.btnNever.AutoSizeLeftIcon = true; + this.btnNever.AutoSizeRightIcon = true; + this.btnNever.BackColor = System.Drawing.Color.Transparent; + this.btnNever.BackColor1 = System.Drawing.Color.FromArgb(((int)(((byte)(175)))), ((int)(((byte)(98)))), ((int)(((byte)(0)))), ((int)(((byte)(238))))); + this.btnNever.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("btnNever.BackgroundImage"))); + this.btnNever.BorderStyle = Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderStyles.Solid; + this.btnNever.ButtonText = "Don\'t ask me again"; + this.btnNever.ButtonTextMarginLeft = 0; + this.btnNever.ColorContrastOnClick = 45; + this.btnNever.ColorContrastOnHover = 45; + this.btnNever.Cursor = System.Windows.Forms.Cursors.Default; + borderEdges4.BottomLeft = true; + borderEdges4.BottomRight = true; + borderEdges4.TopLeft = true; + borderEdges4.TopRight = true; + this.btnNever.CustomizableEdges = borderEdges4; + this.btnNever.DialogResult = System.Windows.Forms.DialogResult.None; + this.btnNever.DisabledBorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(191)))), ((int)(((byte)(191)))), ((int)(((byte)(191))))); + this.btnNever.DisabledFillColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); + this.btnNever.DisabledForecolor = System.Drawing.Color.FromArgb(((int)(((byte)(168)))), ((int)(((byte)(160)))), ((int)(((byte)(168))))); + this.btnNever.FocusState = Bunifu.UI.WinForms.BunifuButton.BunifuButton.ButtonStates.Hover; + this.btnNever.Font = new System.Drawing.Font("Segoe UI Semibold", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnNever.ForeColor = System.Drawing.Color.White; + this.btnNever.IconLeft = global::ExaltAccountManager.Properties.Resources.ic_do_not_disturb_white_36dp; + this.btnNever.IconLeftAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.btnNever.IconLeftCursor = System.Windows.Forms.Cursors.Default; + this.btnNever.IconLeftPadding = new System.Windows.Forms.Padding(15, 3, 1, 3); + this.btnNever.IconMarginLeft = 11; + this.btnNever.IconPadding = 6; + this.btnNever.IconRight = null; + this.btnNever.IconRightAlign = System.Drawing.ContentAlignment.MiddleRight; + this.btnNever.IconRightCursor = System.Windows.Forms.Cursors.Default; + this.btnNever.IconRightPadding = new System.Windows.Forms.Padding(3, 3, 7, 3); + this.btnNever.IconSize = 10; + this.btnNever.IdleBorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(175)))), ((int)(((byte)(98)))), ((int)(((byte)(0)))), ((int)(((byte)(238))))); + this.btnNever.IdleBorderRadius = 5; + this.btnNever.IdleBorderThickness = 1; + this.btnNever.IdleFillColor = System.Drawing.Color.FromArgb(((int)(((byte)(175)))), ((int)(((byte)(98)))), ((int)(((byte)(0)))), ((int)(((byte)(238))))); + this.btnNever.IdleIconLeftImage = global::ExaltAccountManager.Properties.Resources.ic_do_not_disturb_white_36dp; + this.btnNever.IdleIconRightImage = null; + this.btnNever.IndicateFocus = false; + this.btnNever.Location = new System.Drawing.Point(283, 178); + this.btnNever.Name = "btnNever"; + this.btnNever.OnDisabledState.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(191)))), ((int)(((byte)(191)))), ((int)(((byte)(191))))); + this.btnNever.OnDisabledState.BorderRadius = 5; + this.btnNever.OnDisabledState.BorderStyle = Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderStyles.Solid; + this.btnNever.OnDisabledState.BorderThickness = 1; + this.btnNever.OnDisabledState.FillColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); + this.btnNever.OnDisabledState.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(168)))), ((int)(((byte)(160)))), ((int)(((byte)(168))))); + this.btnNever.OnDisabledState.IconLeftImage = null; + this.btnNever.OnDisabledState.IconRightImage = null; + this.btnNever.onHoverState.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(98)))), ((int)(((byte)(0)))), ((int)(((byte)(238))))); + this.btnNever.onHoverState.BorderRadius = 5; + this.btnNever.onHoverState.BorderStyle = Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderStyles.Solid; + this.btnNever.onHoverState.BorderThickness = 1; + this.btnNever.onHoverState.FillColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(98)))), ((int)(((byte)(0)))), ((int)(((byte)(238))))); + this.btnNever.onHoverState.ForeColor = System.Drawing.Color.White; + this.btnNever.onHoverState.IconLeftImage = global::ExaltAccountManager.Properties.Resources.ic_do_not_disturb_white_36dp; + this.btnNever.onHoverState.IconRightImage = null; + this.btnNever.OnIdleState.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(175)))), ((int)(((byte)(98)))), ((int)(((byte)(0)))), ((int)(((byte)(238))))); + this.btnNever.OnIdleState.BorderRadius = 5; + this.btnNever.OnIdleState.BorderStyle = Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderStyles.Solid; + this.btnNever.OnIdleState.BorderThickness = 1; + this.btnNever.OnIdleState.FillColor = System.Drawing.Color.FromArgb(((int)(((byte)(175)))), ((int)(((byte)(98)))), ((int)(((byte)(0)))), ((int)(((byte)(238))))); + this.btnNever.OnIdleState.ForeColor = System.Drawing.Color.White; + this.btnNever.OnIdleState.IconLeftImage = global::ExaltAccountManager.Properties.Resources.ic_do_not_disturb_white_36dp; + this.btnNever.OnIdleState.IconRightImage = null; + this.btnNever.OnPressedState.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(225)))), ((int)(((byte)(98)))), ((int)(((byte)(0)))), ((int)(((byte)(238))))); + this.btnNever.OnPressedState.BorderRadius = 5; + this.btnNever.OnPressedState.BorderStyle = Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderStyles.Solid; + this.btnNever.OnPressedState.BorderThickness = 1; + this.btnNever.OnPressedState.FillColor = System.Drawing.Color.FromArgb(((int)(((byte)(225)))), ((int)(((byte)(98)))), ((int)(((byte)(0)))), ((int)(((byte)(238))))); + this.btnNever.OnPressedState.ForeColor = System.Drawing.Color.White; + this.btnNever.OnPressedState.IconLeftImage = null; + this.btnNever.OnPressedState.IconRightImage = null; + this.btnNever.Size = new System.Drawing.Size(179, 31); + this.btnNever.TabIndex = 27; + this.btnNever.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + this.btnNever.TextAlignment = System.Windows.Forms.HorizontalAlignment.Center; + this.btnNever.TextMarginLeft = 0; + this.btnNever.TextPadding = new System.Windows.Forms.Padding(0, 0, 15, 0); + this.btnNever.UseDefaultRadiusAndThickness = true; + this.btnNever.Click += new System.EventHandler(this.btnNever_Click); + // + // btnLater + // + this.btnLater.AllowAnimations = true; + this.btnLater.AllowMouseEffects = true; + this.btnLater.AllowToggling = false; + this.btnLater.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.btnLater.AnimationSpeed = 200; + this.btnLater.AutoGenerateColors = false; + this.btnLater.AutoRoundBorders = false; + this.btnLater.AutoSizeLeftIcon = true; + this.btnLater.AutoSizeRightIcon = true; + this.btnLater.BackColor = System.Drawing.Color.Transparent; + this.btnLater.BackColor1 = System.Drawing.Color.FromArgb(((int)(((byte)(175)))), ((int)(((byte)(98)))), ((int)(((byte)(0)))), ((int)(((byte)(238))))); + this.btnLater.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("btnLater.BackgroundImage"))); + this.btnLater.BorderStyle = Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderStyles.Solid; + this.btnLater.ButtonText = "Maybe later"; + this.btnLater.ButtonTextMarginLeft = 0; + this.btnLater.ColorContrastOnClick = 45; + this.btnLater.ColorContrastOnHover = 45; + this.btnLater.Cursor = System.Windows.Forms.Cursors.Default; + borderEdges5.BottomLeft = true; + borderEdges5.BottomRight = true; + borderEdges5.TopLeft = true; + borderEdges5.TopRight = true; + this.btnLater.CustomizableEdges = borderEdges5; + this.btnLater.DialogResult = System.Windows.Forms.DialogResult.None; + this.btnLater.DisabledBorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(191)))), ((int)(((byte)(191)))), ((int)(((byte)(191))))); + this.btnLater.DisabledFillColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); + this.btnLater.DisabledForecolor = System.Drawing.Color.FromArgb(((int)(((byte)(168)))), ((int)(((byte)(160)))), ((int)(((byte)(168))))); + this.btnLater.FocusState = Bunifu.UI.WinForms.BunifuButton.BunifuButton.ButtonStates.Hover; + this.btnLater.Font = new System.Drawing.Font("Segoe UI Semibold", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnLater.ForeColor = System.Drawing.Color.White; + this.btnLater.IconLeft = global::ExaltAccountManager.Properties.Resources.delivery_time_white_24px; + this.btnLater.IconLeftAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.btnLater.IconLeftCursor = System.Windows.Forms.Cursors.Default; + this.btnLater.IconLeftPadding = new System.Windows.Forms.Padding(15, 3, 1, 3); + this.btnLater.IconMarginLeft = 11; + this.btnLater.IconPadding = 6; + this.btnLater.IconRight = null; + this.btnLater.IconRightAlign = System.Drawing.ContentAlignment.MiddleRight; + this.btnLater.IconRightCursor = System.Windows.Forms.Cursors.Default; + this.btnLater.IconRightPadding = new System.Windows.Forms.Padding(3, 3, 7, 3); + this.btnLater.IconSize = 10; + this.btnLater.IdleBorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(175)))), ((int)(((byte)(98)))), ((int)(((byte)(0)))), ((int)(((byte)(238))))); + this.btnLater.IdleBorderRadius = 5; + this.btnLater.IdleBorderThickness = 1; + this.btnLater.IdleFillColor = System.Drawing.Color.FromArgb(((int)(((byte)(175)))), ((int)(((byte)(98)))), ((int)(((byte)(0)))), ((int)(((byte)(238))))); + this.btnLater.IdleIconLeftImage = global::ExaltAccountManager.Properties.Resources.delivery_time_white_24px; + this.btnLater.IdleIconRightImage = null; + this.btnLater.IndicateFocus = false; + this.btnLater.Location = new System.Drawing.Point(16, 178); + this.btnLater.Name = "btnLater"; + this.btnLater.OnDisabledState.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(191)))), ((int)(((byte)(191)))), ((int)(((byte)(191))))); + this.btnLater.OnDisabledState.BorderRadius = 5; + this.btnLater.OnDisabledState.BorderStyle = Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderStyles.Solid; + this.btnLater.OnDisabledState.BorderThickness = 1; + this.btnLater.OnDisabledState.FillColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); + this.btnLater.OnDisabledState.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(168)))), ((int)(((byte)(160)))), ((int)(((byte)(168))))); + this.btnLater.OnDisabledState.IconLeftImage = null; + this.btnLater.OnDisabledState.IconRightImage = null; + this.btnLater.onHoverState.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(98)))), ((int)(((byte)(0)))), ((int)(((byte)(238))))); + this.btnLater.onHoverState.BorderRadius = 5; + this.btnLater.onHoverState.BorderStyle = Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderStyles.Solid; + this.btnLater.onHoverState.BorderThickness = 1; + this.btnLater.onHoverState.FillColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(98)))), ((int)(((byte)(0)))), ((int)(((byte)(238))))); + this.btnLater.onHoverState.ForeColor = System.Drawing.Color.White; + this.btnLater.onHoverState.IconLeftImage = global::ExaltAccountManager.Properties.Resources.delivery_time_white_24px; + this.btnLater.onHoverState.IconRightImage = null; + this.btnLater.OnIdleState.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(175)))), ((int)(((byte)(98)))), ((int)(((byte)(0)))), ((int)(((byte)(238))))); + this.btnLater.OnIdleState.BorderRadius = 5; + this.btnLater.OnIdleState.BorderStyle = Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderStyles.Solid; + this.btnLater.OnIdleState.BorderThickness = 1; + this.btnLater.OnIdleState.FillColor = System.Drawing.Color.FromArgb(((int)(((byte)(175)))), ((int)(((byte)(98)))), ((int)(((byte)(0)))), ((int)(((byte)(238))))); + this.btnLater.OnIdleState.ForeColor = System.Drawing.Color.White; + this.btnLater.OnIdleState.IconLeftImage = global::ExaltAccountManager.Properties.Resources.delivery_time_white_24px; + this.btnLater.OnIdleState.IconRightImage = null; + this.btnLater.OnPressedState.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(225)))), ((int)(((byte)(98)))), ((int)(((byte)(0)))), ((int)(((byte)(238))))); + this.btnLater.OnPressedState.BorderRadius = 5; + this.btnLater.OnPressedState.BorderStyle = Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderStyles.Solid; + this.btnLater.OnPressedState.BorderThickness = 1; + this.btnLater.OnPressedState.FillColor = System.Drawing.Color.FromArgb(((int)(((byte)(225)))), ((int)(((byte)(98)))), ((int)(((byte)(0)))), ((int)(((byte)(238))))); + this.btnLater.OnPressedState.ForeColor = System.Drawing.Color.White; + this.btnLater.OnPressedState.IconLeftImage = null; + this.btnLater.OnPressedState.IconRightImage = null; + this.btnLater.Size = new System.Drawing.Size(261, 31); + this.btnLater.TabIndex = 26; + this.btnLater.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.btnLater.TextAlignment = System.Windows.Forms.HorizontalAlignment.Center; + this.btnLater.TextMarginLeft = 0; + this.btnLater.TextPadding = new System.Windows.Forms.Padding(0, 0, 15, 0); + this.btnLater.UseDefaultRadiusAndThickness = true; + this.btnLater.Click += new System.EventHandler(this.btnLater_Click); + // // btnYeah // this.btnYeah.AllowAnimations = true; @@ -145,11 +357,11 @@ private void InitializeComponent() this.btnYeah.ColorContrastOnClick = 45; this.btnYeah.ColorContrastOnHover = 45; this.btnYeah.Cursor = System.Windows.Forms.Cursors.Default; - borderEdges10.BottomLeft = true; - borderEdges10.BottomRight = true; - borderEdges10.TopLeft = true; - borderEdges10.TopRight = true; - this.btnYeah.CustomizableEdges = borderEdges10; + borderEdges6.BottomLeft = true; + borderEdges6.BottomRight = true; + borderEdges6.TopLeft = true; + borderEdges6.TopRight = true; + this.btnYeah.CustomizableEdges = borderEdges6; this.btnYeah.DialogResult = System.Windows.Forms.DialogResult.None; this.btnYeah.DisabledBorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(191)))), ((int)(((byte)(191)))), ((int)(((byte)(191))))); this.btnYeah.DisabledFillColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); @@ -249,218 +461,6 @@ private void InitializeComponent() this.pContent.Size = new System.Drawing.Size(500, 245); this.pContent.TabIndex = 22; // - // pTopBar - // - this.pTopBar.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(250)))), ((int)(((byte)(250)))), ((int)(((byte)(250))))); - this.pTopBar.Controls.Add(this.pbClose); - this.pTopBar.Dock = System.Windows.Forms.DockStyle.Top; - this.pTopBar.Location = new System.Drawing.Point(175, 0); - this.pTopBar.Name = "pTopBar"; - this.pTopBar.Size = new System.Drawing.Size(325, 24); - this.pTopBar.TabIndex = 2; - // - // btnLater - // - this.btnLater.AllowAnimations = true; - this.btnLater.AllowMouseEffects = true; - this.btnLater.AllowToggling = false; - this.btnLater.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.btnLater.AnimationSpeed = 200; - this.btnLater.AutoGenerateColors = false; - this.btnLater.AutoRoundBorders = false; - this.btnLater.AutoSizeLeftIcon = true; - this.btnLater.AutoSizeRightIcon = true; - this.btnLater.BackColor = System.Drawing.Color.Transparent; - this.btnLater.BackColor1 = System.Drawing.Color.FromArgb(((int)(((byte)(175)))), ((int)(((byte)(98)))), ((int)(((byte)(0)))), ((int)(((byte)(238))))); - this.btnLater.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("btnLater.BackgroundImage"))); - this.btnLater.BorderStyle = Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderStyles.Solid; - this.btnLater.ButtonText = "Maybe later"; - this.btnLater.ButtonTextMarginLeft = 0; - this.btnLater.ColorContrastOnClick = 45; - this.btnLater.ColorContrastOnHover = 45; - this.btnLater.Cursor = System.Windows.Forms.Cursors.Default; - borderEdges11.BottomLeft = true; - borderEdges11.BottomRight = true; - borderEdges11.TopLeft = true; - borderEdges11.TopRight = true; - this.btnLater.CustomizableEdges = borderEdges11; - this.btnLater.DialogResult = System.Windows.Forms.DialogResult.None; - this.btnLater.DisabledBorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(191)))), ((int)(((byte)(191)))), ((int)(((byte)(191))))); - this.btnLater.DisabledFillColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); - this.btnLater.DisabledForecolor = System.Drawing.Color.FromArgb(((int)(((byte)(168)))), ((int)(((byte)(160)))), ((int)(((byte)(168))))); - this.btnLater.FocusState = Bunifu.UI.WinForms.BunifuButton.BunifuButton.ButtonStates.Hover; - this.btnLater.Font = new System.Drawing.Font("Segoe UI Semibold", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnLater.ForeColor = System.Drawing.Color.White; - this.btnLater.IconLeft = global::ExaltAccountManager.Properties.Resources.delivery_time_white_24px; - this.btnLater.IconLeftAlign = System.Drawing.ContentAlignment.MiddleLeft; - this.btnLater.IconLeftCursor = System.Windows.Forms.Cursors.Default; - this.btnLater.IconLeftPadding = new System.Windows.Forms.Padding(15, 3, 1, 3); - this.btnLater.IconMarginLeft = 11; - this.btnLater.IconPadding = 6; - this.btnLater.IconRight = null; - this.btnLater.IconRightAlign = System.Drawing.ContentAlignment.MiddleRight; - this.btnLater.IconRightCursor = System.Windows.Forms.Cursors.Default; - this.btnLater.IconRightPadding = new System.Windows.Forms.Padding(3, 3, 7, 3); - this.btnLater.IconSize = 10; - this.btnLater.IdleBorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(175)))), ((int)(((byte)(98)))), ((int)(((byte)(0)))), ((int)(((byte)(238))))); - this.btnLater.IdleBorderRadius = 5; - this.btnLater.IdleBorderThickness = 1; - this.btnLater.IdleFillColor = System.Drawing.Color.FromArgb(((int)(((byte)(175)))), ((int)(((byte)(98)))), ((int)(((byte)(0)))), ((int)(((byte)(238))))); - this.btnLater.IdleIconLeftImage = global::ExaltAccountManager.Properties.Resources.delivery_time_white_24px; - this.btnLater.IdleIconRightImage = null; - this.btnLater.IndicateFocus = false; - this.btnLater.Location = new System.Drawing.Point(16, 178); - this.btnLater.Name = "btnLater"; - this.btnLater.OnDisabledState.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(191)))), ((int)(((byte)(191)))), ((int)(((byte)(191))))); - this.btnLater.OnDisabledState.BorderRadius = 5; - this.btnLater.OnDisabledState.BorderStyle = Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderStyles.Solid; - this.btnLater.OnDisabledState.BorderThickness = 1; - this.btnLater.OnDisabledState.FillColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); - this.btnLater.OnDisabledState.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(168)))), ((int)(((byte)(160)))), ((int)(((byte)(168))))); - this.btnLater.OnDisabledState.IconLeftImage = null; - this.btnLater.OnDisabledState.IconRightImage = null; - this.btnLater.onHoverState.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(98)))), ((int)(((byte)(0)))), ((int)(((byte)(238))))); - this.btnLater.onHoverState.BorderRadius = 5; - this.btnLater.onHoverState.BorderStyle = Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderStyles.Solid; - this.btnLater.onHoverState.BorderThickness = 1; - this.btnLater.onHoverState.FillColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(98)))), ((int)(((byte)(0)))), ((int)(((byte)(238))))); - this.btnLater.onHoverState.ForeColor = System.Drawing.Color.White; - this.btnLater.onHoverState.IconLeftImage = global::ExaltAccountManager.Properties.Resources.delivery_time_white_24px; - this.btnLater.onHoverState.IconRightImage = null; - this.btnLater.OnIdleState.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(175)))), ((int)(((byte)(98)))), ((int)(((byte)(0)))), ((int)(((byte)(238))))); - this.btnLater.OnIdleState.BorderRadius = 5; - this.btnLater.OnIdleState.BorderStyle = Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderStyles.Solid; - this.btnLater.OnIdleState.BorderThickness = 1; - this.btnLater.OnIdleState.FillColor = System.Drawing.Color.FromArgb(((int)(((byte)(175)))), ((int)(((byte)(98)))), ((int)(((byte)(0)))), ((int)(((byte)(238))))); - this.btnLater.OnIdleState.ForeColor = System.Drawing.Color.White; - this.btnLater.OnIdleState.IconLeftImage = global::ExaltAccountManager.Properties.Resources.delivery_time_white_24px; - this.btnLater.OnIdleState.IconRightImage = null; - this.btnLater.OnPressedState.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(225)))), ((int)(((byte)(98)))), ((int)(((byte)(0)))), ((int)(((byte)(238))))); - this.btnLater.OnPressedState.BorderRadius = 5; - this.btnLater.OnPressedState.BorderStyle = Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderStyles.Solid; - this.btnLater.OnPressedState.BorderThickness = 1; - this.btnLater.OnPressedState.FillColor = System.Drawing.Color.FromArgb(((int)(((byte)(225)))), ((int)(((byte)(98)))), ((int)(((byte)(0)))), ((int)(((byte)(238))))); - this.btnLater.OnPressedState.ForeColor = System.Drawing.Color.White; - this.btnLater.OnPressedState.IconLeftImage = null; - this.btnLater.OnPressedState.IconRightImage = null; - this.btnLater.Size = new System.Drawing.Size(261, 31); - this.btnLater.TabIndex = 26; - this.btnLater.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - this.btnLater.TextAlignment = System.Windows.Forms.HorizontalAlignment.Center; - this.btnLater.TextMarginLeft = 0; - this.btnLater.TextPadding = new System.Windows.Forms.Padding(0, 0, 15, 0); - this.btnLater.UseDefaultRadiusAndThickness = true; - this.btnLater.Click += new System.EventHandler(this.btnLater_Click); - // - // btnNever - // - this.btnNever.AllowAnimations = true; - this.btnNever.AllowMouseEffects = true; - this.btnNever.AllowToggling = false; - this.btnNever.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.btnNever.AnimationSpeed = 200; - this.btnNever.AutoGenerateColors = false; - this.btnNever.AutoRoundBorders = false; - this.btnNever.AutoSizeLeftIcon = true; - this.btnNever.AutoSizeRightIcon = true; - this.btnNever.BackColor = System.Drawing.Color.Transparent; - this.btnNever.BackColor1 = System.Drawing.Color.FromArgb(((int)(((byte)(175)))), ((int)(((byte)(98)))), ((int)(((byte)(0)))), ((int)(((byte)(238))))); - this.btnNever.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("btnNever.BackgroundImage"))); - this.btnNever.BorderStyle = Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderStyles.Solid; - this.btnNever.ButtonText = "Don\'t ask me again"; - this.btnNever.ButtonTextMarginLeft = 0; - this.btnNever.ColorContrastOnClick = 45; - this.btnNever.ColorContrastOnHover = 45; - this.btnNever.Cursor = System.Windows.Forms.Cursors.Default; - borderEdges12.BottomLeft = true; - borderEdges12.BottomRight = true; - borderEdges12.TopLeft = true; - borderEdges12.TopRight = true; - this.btnNever.CustomizableEdges = borderEdges12; - this.btnNever.DialogResult = System.Windows.Forms.DialogResult.None; - this.btnNever.DisabledBorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(191)))), ((int)(((byte)(191)))), ((int)(((byte)(191))))); - this.btnNever.DisabledFillColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); - this.btnNever.DisabledForecolor = System.Drawing.Color.FromArgb(((int)(((byte)(168)))), ((int)(((byte)(160)))), ((int)(((byte)(168))))); - this.btnNever.FocusState = Bunifu.UI.WinForms.BunifuButton.BunifuButton.ButtonStates.Hover; - this.btnNever.Font = new System.Drawing.Font("Segoe UI Semibold", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnNever.ForeColor = System.Drawing.Color.White; - this.btnNever.IconLeft = global::ExaltAccountManager.Properties.Resources.ic_do_not_disturb_white_36dp; - this.btnNever.IconLeftAlign = System.Drawing.ContentAlignment.MiddleLeft; - this.btnNever.IconLeftCursor = System.Windows.Forms.Cursors.Default; - this.btnNever.IconLeftPadding = new System.Windows.Forms.Padding(15, 3, 1, 3); - this.btnNever.IconMarginLeft = 11; - this.btnNever.IconPadding = 6; - this.btnNever.IconRight = null; - this.btnNever.IconRightAlign = System.Drawing.ContentAlignment.MiddleRight; - this.btnNever.IconRightCursor = System.Windows.Forms.Cursors.Default; - this.btnNever.IconRightPadding = new System.Windows.Forms.Padding(3, 3, 7, 3); - this.btnNever.IconSize = 10; - this.btnNever.IdleBorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(175)))), ((int)(((byte)(98)))), ((int)(((byte)(0)))), ((int)(((byte)(238))))); - this.btnNever.IdleBorderRadius = 5; - this.btnNever.IdleBorderThickness = 1; - this.btnNever.IdleFillColor = System.Drawing.Color.FromArgb(((int)(((byte)(175)))), ((int)(((byte)(98)))), ((int)(((byte)(0)))), ((int)(((byte)(238))))); - this.btnNever.IdleIconLeftImage = global::ExaltAccountManager.Properties.Resources.ic_do_not_disturb_white_36dp; - this.btnNever.IdleIconRightImage = null; - this.btnNever.IndicateFocus = false; - this.btnNever.Location = new System.Drawing.Point(283, 178); - this.btnNever.Name = "btnNever"; - this.btnNever.OnDisabledState.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(191)))), ((int)(((byte)(191)))), ((int)(((byte)(191))))); - this.btnNever.OnDisabledState.BorderRadius = 5; - this.btnNever.OnDisabledState.BorderStyle = Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderStyles.Solid; - this.btnNever.OnDisabledState.BorderThickness = 1; - this.btnNever.OnDisabledState.FillColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); - this.btnNever.OnDisabledState.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(168)))), ((int)(((byte)(160)))), ((int)(((byte)(168))))); - this.btnNever.OnDisabledState.IconLeftImage = null; - this.btnNever.OnDisabledState.IconRightImage = null; - this.btnNever.onHoverState.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(98)))), ((int)(((byte)(0)))), ((int)(((byte)(238))))); - this.btnNever.onHoverState.BorderRadius = 5; - this.btnNever.onHoverState.BorderStyle = Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderStyles.Solid; - this.btnNever.onHoverState.BorderThickness = 1; - this.btnNever.onHoverState.FillColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(98)))), ((int)(((byte)(0)))), ((int)(((byte)(238))))); - this.btnNever.onHoverState.ForeColor = System.Drawing.Color.White; - this.btnNever.onHoverState.IconLeftImage = global::ExaltAccountManager.Properties.Resources.ic_do_not_disturb_white_36dp; - this.btnNever.onHoverState.IconRightImage = null; - this.btnNever.OnIdleState.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(175)))), ((int)(((byte)(98)))), ((int)(((byte)(0)))), ((int)(((byte)(238))))); - this.btnNever.OnIdleState.BorderRadius = 5; - this.btnNever.OnIdleState.BorderStyle = Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderStyles.Solid; - this.btnNever.OnIdleState.BorderThickness = 1; - this.btnNever.OnIdleState.FillColor = System.Drawing.Color.FromArgb(((int)(((byte)(175)))), ((int)(((byte)(98)))), ((int)(((byte)(0)))), ((int)(((byte)(238))))); - this.btnNever.OnIdleState.ForeColor = System.Drawing.Color.White; - this.btnNever.OnIdleState.IconLeftImage = global::ExaltAccountManager.Properties.Resources.ic_do_not_disturb_white_36dp; - this.btnNever.OnIdleState.IconRightImage = null; - this.btnNever.OnPressedState.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(225)))), ((int)(((byte)(98)))), ((int)(((byte)(0)))), ((int)(((byte)(238))))); - this.btnNever.OnPressedState.BorderRadius = 5; - this.btnNever.OnPressedState.BorderStyle = Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderStyles.Solid; - this.btnNever.OnPressedState.BorderThickness = 1; - this.btnNever.OnPressedState.FillColor = System.Drawing.Color.FromArgb(((int)(((byte)(225)))), ((int)(((byte)(98)))), ((int)(((byte)(0)))), ((int)(((byte)(238))))); - this.btnNever.OnPressedState.ForeColor = System.Drawing.Color.White; - this.btnNever.OnPressedState.IconLeftImage = null; - this.btnNever.OnPressedState.IconRightImage = null; - this.btnNever.Size = new System.Drawing.Size(179, 31); - this.btnNever.TabIndex = 27; - this.btnNever.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - this.btnNever.TextAlignment = System.Windows.Forms.HorizontalAlignment.Center; - this.btnNever.TextMarginLeft = 0; - this.btnNever.TextPadding = new System.Windows.Forms.Padding(0, 0, 15, 0); - this.btnNever.UseDefaultRadiusAndThickness = true; - this.btnNever.Click += new System.EventHandler(this.btnNever_Click); - // - // pbClose - // - this.pbClose.Dock = System.Windows.Forms.DockStyle.Right; - this.pbClose.Image = global::ExaltAccountManager.Properties.Resources.ic_close_black_24dp; - this.pbClose.Location = new System.Drawing.Point(301, 0); - this.pbClose.Name = "pbClose"; - this.pbClose.Size = new System.Drawing.Size(24, 24); - this.pbClose.TabIndex = 8; - this.pbClose.TabStop = false; - this.pbClose.Click += new System.EventHandler(this.pbClose_Click); - this.pbClose.MouseDown += new System.Windows.Forms.MouseEventHandler(this.pbClose_MouseDown); - this.pbClose.MouseEnter += new System.EventHandler(this.pbClose_MouseEnter); - this.pbClose.MouseLeave += new System.EventHandler(this.pbClose_MouseLeave); - // // FrmDiscordPopup // this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 17F); @@ -472,17 +472,17 @@ private void InitializeComponent() this.DoubleBuffered = true; this.Font = new System.Drawing.Font("Segoe UI Semibold", 9.75F, System.Drawing.FontStyle.Bold); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; - this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.Margin = new System.Windows.Forms.Padding(4); this.Name = "FrmDiscordPopup"; this.StartPosition = System.Windows.Forms.FormStartPosition.Manual; this.pTop.ResumeLayout(false); + this.pTopBar.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.pbClose)).EndInit(); this.pHeader.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.pbHeader)).EndInit(); this.shadow.ResumeLayout(false); this.shadow.PerformLayout(); this.pContent.ResumeLayout(false); - this.pTopBar.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.pbClose)).EndInit(); this.ResumeLayout(false); } diff --git a/ExaltAccountManager/FrmDiscordPopup.cs b/ExaltAccountManager/FrmDiscordPopup.cs index 3b466f1d..13cbd320 100644 --- a/ExaltAccountManager/FrmDiscordPopup.cs +++ b/ExaltAccountManager/FrmDiscordPopup.cs @@ -1,7 +1,6 @@ using System; using System.Drawing; using System.Windows.Forms; -using MK_EAM_Analytics; using Newtonsoft.Json; namespace ExaltAccountManager @@ -15,19 +14,16 @@ public FrmDiscordPopup(FrmMain _frm) InitializeComponent(); frm = _frm; - MK_EAM_Lib.FormsUtils.SuspendDrawing(this); - lQuestion.Text = string.Format(lQuestion.Text, DiscordHelper.GetUserName()); frm.ThemeChanged += ApplyTheme; + this.Disposed += (s, e) => + { + frm.ThemeChanged -= ApplyTheme; + }; ApplyTheme(this, EventArgs.Empty); - MK_EAM_Lib.FormsUtils.ResumeDrawing(this); - } - - ~FrmDiscordPopup() - { - frm.ThemeChanged -= ApplyTheme; + this.BringToFront(); } private void ApplyTheme(object sender, EventArgs e) diff --git a/ExaltAccountManager/FrmDiscordPopup.resx b/ExaltAccountManager/FrmDiscordPopup.resx index 51567b40..05033abf 100644 --- a/ExaltAccountManager/FrmDiscordPopup.resx +++ b/ExaltAccountManager/FrmDiscordPopup.resx @@ -118,15 +118,14 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + - iVBORw0KGgoAAAANSUhEUgAAAb4AAAAfCAYAAACYuqgWAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 - YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAELSURBVHhe7dixSQRBGIbhP7EgY3M7MJXdO9BKrgcrMBUV - BAMR9IyuE9nbswOdNd4K5nsGnlmG+fOXnVrWpk7nY813Yx0PANCf+e66psv/6G3reDHU9Nku3poHAOhQ - a9y8H+r7qoaa79vhdWUIAHry1LxX25bfwLUBAOjNQfgASCJ8AEQRPgCiCB8AUYQPgCjCB0AU4QMgivAB - EEX4AIgifABEET4AoggfAFGED4AowgdAFOEDIIrwARBF+ACIInwARBE+AKIIHwBRhA+AKMIHQBThAyCK - 8AEQ5VCbOj4PNb2sXAJATx7Hmr5a+E6bseb9ygAAdGT6aN9dLWtbP7ftsDx5AkCvdjf1e/YHk8XFg8l6 - N28AAAAASUVORK5CYII= + iVBORw0KGgoAAAANSUhEUgAAALMAAAAfCAYAAACsyvxmAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAADpSURBVHhe7dw9CsIwGIfxd/FAzu7ewFXSCnqS3sETuIoK + goMIfky9iaTRG+gbccwF8ucp/FpCMj6ETq/lp7XXuLG0bmzogbqk9dzi9BfywoZJsHjzjbPbApXxbtM9 + 2HNmwdLGF6fCIaAWe3cxf+XrunQAqElPzFBBzJBBzJBBzJBBzJBBzJBBzJBBzJBBzJBBzJBBzJBBzJBB + zJBBzJBBzJBBzJBBzJBBzJBBzJBBzJBBzJBBzJBBzJBBzJDRW2vDIVg8FjaBWuwai488NLHNs7oKB4BK + xKt/u//wxPfKF/l3A6hRt7TP6AvE/T5aw8agrgAAAABJRU5ErkJggg== @@ -139,14 +138,15 @@ LDPkVg4AXZle2nP7N2T266otlt8IoF/by/o++gGUVg+smg9MTwAAAABJRU5ErkJggg== - + - iVBORw0KGgoAAAANSUhEUgAAALMAAAAfCAYAAACsyvxmAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 - YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAADpSURBVHhe7dw9CsIwGIfxd/FAzu7ewFXSCnqS3sETuIoK - goMIfky9iaTRG+gbccwF8ucp/FpCMj6ETq/lp7XXuLG0bmzogbqk9dzi9BfywoZJsHjzjbPbApXxbtM9 - 2HNmwdLGF6fCIaAWe3cxf+XrunQAqElPzFBBzJBBzJBBzJBBzJBBzJBBzJBBzJBBzJBBzJBBzJBBzJBB - zJBBzJBBzJBBzJBBzJBBzJBBzJBBzJBBzJBBzJBBzJBBzJDRW2vDIVg8FjaBWuwai488NLHNs7oKB4BK - xKt/u//wxPfKF/l3A6hRt7TP6AvE/T5aw8agrgAAAABJRU5ErkJggg== + iVBORw0KGgoAAAANSUhEUgAAAb4AAAAfCAYAAACYuqgWAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAELSURBVHhe7dixSQRBGIbhP7EgY3M7MJXdO9BKrgcrMBUV + BAMR9IyuE9nbswOdNd4K5nsGnlmG+fOXnVrWpk7nY813Yx0PANCf+e66psv/6G3reDHU9Nku3poHAOhQ + a9y8H+r7qoaa79vhdWUIAHry1LxX25bfwLUBAOjNQfgASCJ8AEQRPgCiCB8AUYQPgCjCB0AU4QMgivAB + EEX4AIgifABEET4AoggfAFGED4AowgdAFOEDIIrwARBF+ACIInwARBE+AKIIHwBRhA+AKMIHQBThAyCK + 8AEQ5VCbOj4PNb2sXAJATx7Hmr5a+E6bseb9ygAAdGT6aN9dLWtbP7ftsDx5AkCvdjf1e/YHk8XFg8l6 + N28AAAAASUVORK5CYII= \ No newline at end of file diff --git a/ExaltAccountManager/FrmMain.cs b/ExaltAccountManager/FrmMain.cs index 4dd7a998..96b57447 100644 --- a/ExaltAccountManager/FrmMain.cs +++ b/ExaltAccountManager/FrmMain.cs @@ -525,6 +525,7 @@ public FrmMain(string[] args) private void DiscordHelper_OnDiscordConnectionChanged(object sender, bool isConnected) { + bool hasDiscordUser = false; if (File.Exists(pathDiscordPopups)) { try @@ -535,7 +536,7 @@ private void DiscordHelper_OnDiscordConnectionChanged(object sender, bool isConn (DateTime.Now - settings.LastQuestion).TotalDays <= 7 || settings.LastDiscordPopupResult == DiscordPopupSettings.DiscordpopupResult.Yes) { - return; + hasDiscordUser = true; } } catch { } @@ -570,8 +571,7 @@ private void DiscordHelper_OnDiscordConnectionChanged(object sender, bool isConn } DiscordUser = task.Result; - - if (DiscordUser != null && DiscordUser.DiscordUserId.Equals("NotFound")) + if (!hasDiscordUser && DiscordUser != null && DiscordUser.DiscordUserId.Equals("NotFound")) { //No discord user found DiscordUserConnectionInvoker(DiscordUser, token); @@ -597,7 +597,7 @@ private void DiscordHelper_OnDiscordConnectionChanged(object sender, bool isConn } private void DiscordUserConnectionInvoker(DiscordUser dcUser, CancellationToken token) => DiscordUserConnection(dcUser, token); - private bool DiscordUserConnection(DiscordUser dcUser, CancellationToken token) + public bool DiscordUserConnection(DiscordUser dcUser, CancellationToken token) { if (this.InvokeRequired) return (bool)this.Invoke((Func)DiscordUserConnection, dcUser, token); @@ -1995,6 +1995,7 @@ public DialogResult ShowShadowFormDialog(Form form) frmShadowHost.RemoveControl(); frmShadowHost.Show(); + DialogResult result = frmShadowHost.ShowFormDialog(form); RemoveShadowForm(); diff --git a/ExaltAccountManager/UI/Elements/EleDiscordSettings.Designer.cs b/ExaltAccountManager/UI/Elements/EleDiscordSettings.Designer.cs index 8d19a8f2..47951141 100644 --- a/ExaltAccountManager/UI/Elements/EleDiscordSettings.Designer.cs +++ b/ExaltAccountManager/UI/Elements/EleDiscordSettings.Designer.cs @@ -28,9 +28,13 @@ protected override void Dispose(bool disposing) /// private void InitializeComponent() { + Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderEdges borderEdges2 = new Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderEdges(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(EleDiscordSettings)); - Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderEdges borderEdges3 = new Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderEdges(); + Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderEdges borderEdges1 = new Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderEdges(); this.shadow = new Bunifu.UI.WinForms.BunifuShadowPanel(); + this.pCover = new System.Windows.Forms.Panel(); + this.label1 = new System.Windows.Forms.Label(); + this.toggleUseDiscord = new Bunifu.UI.WinForms.BunifuToggleSwitch2(); this.toggleDiscord = new Bunifu.UI.WinForms.BunifuToggleSwitch2(); this.btnSave = new Bunifu.UI.WinForms.BunifuButton.BunifuButton(); this.pbClose = new Bunifu.UI.WinForms.BunifuPictureBox(); @@ -41,9 +45,7 @@ private void InitializeComponent() this.label6 = new System.Windows.Forms.Label(); this.lSearchForRotmgUpdates = new System.Windows.Forms.Label(); this.toggleShowAccountNames = new Bunifu.UI.WinForms.BunifuToggleSwitch2(); - this.label1 = new System.Windows.Forms.Label(); - this.toggleUseDiscord = new Bunifu.UI.WinForms.BunifuToggleSwitch2(); - this.pCover = new System.Windows.Forms.Panel(); + this.btnConnectDiscord = new Bunifu.UI.WinForms.BunifuButton.BunifuButton(); this.shadow.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.pbClose)).BeginInit(); this.SuspendLayout(); @@ -54,6 +56,7 @@ private void InitializeComponent() this.shadow.BorderColor = System.Drawing.Color.WhiteSmoke; this.shadow.BorderRadius = 9; this.shadow.BorderThickness = 1; + this.shadow.Controls.Add(this.btnConnectDiscord); this.shadow.Controls.Add(this.pCover); this.shadow.Controls.Add(this.label1); this.shadow.Controls.Add(this.toggleUseDiscord); @@ -83,6 +86,41 @@ private void InitializeComponent() this.shadow.Style = Bunifu.UI.WinForms.BunifuShadowPanel.BevelStyles.Flat; this.shadow.TabIndex = 20; // + // pCover + // + this.pCover.Location = new System.Drawing.Point(17, 99); + this.pCover.Name = "pCover"; + this.pCover.Size = new System.Drawing.Size(438, 117); + this.pCover.TabIndex = 31; + this.pCover.Visible = false; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Font = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label1.Location = new System.Drawing.Point(12, 46); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(171, 21); + this.label1.TabIndex = 30; + this.label1.Text = "Use discord integration"; + // + // toggleUseDiscord + // + this.toggleUseDiscord.BackColor = System.Drawing.Color.Transparent; + this.toggleUseDiscord.Checked = true; + this.toggleUseDiscord.CheckedBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(156)))), ((int)(((byte)(95)))), ((int)(((byte)(244))))); + this.toggleUseDiscord.CheckedSwitchColor = System.Drawing.Color.White; + this.toggleUseDiscord.CheckedSwitchStyle = Bunifu.UI.WinForms.BunifuToggleSwitch2.SwitchStyles.Outline; + this.toggleUseDiscord.Location = new System.Drawing.Point(16, 74); + this.toggleUseDiscord.Name = "toggleUseDiscord"; + this.toggleUseDiscord.OutlineThickness = 2; + this.toggleUseDiscord.Size = new System.Drawing.Size(44, 19); + this.toggleUseDiscord.TabIndex = 29; + this.toggleUseDiscord.UncheckedBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(189)))), ((int)(((byte)(189)))), ((int)(((byte)(189))))); + this.toggleUseDiscord.UncheckedSwitchColor = System.Drawing.Color.White; + this.toggleUseDiscord.UncheckedSwitchStyle = Bunifu.UI.WinForms.BunifuToggleSwitch2.SwitchStyles.Outline; + this.toggleUseDiscord.CheckedChanged += new System.EventHandler(this.toggleUseDiscord_CheckedChanged); + // // toggleDiscord // this.toggleDiscord.BackColor = System.Drawing.Color.Transparent; @@ -120,11 +158,11 @@ private void InitializeComponent() this.btnSave.ColorContrastOnClick = 45; this.btnSave.ColorContrastOnHover = 45; this.btnSave.Cursor = System.Windows.Forms.Cursors.Default; - borderEdges3.BottomLeft = true; - borderEdges3.BottomRight = true; - borderEdges3.TopLeft = true; - borderEdges3.TopRight = true; - this.btnSave.CustomizableEdges = borderEdges3; + borderEdges2.BottomLeft = true; + borderEdges2.BottomRight = true; + borderEdges2.TopLeft = true; + borderEdges2.TopRight = true; + this.btnSave.CustomizableEdges = borderEdges2; this.btnSave.DialogResult = System.Windows.Forms.DialogResult.None; this.btnSave.DisabledBorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(191)))), ((int)(((byte)(191)))), ((int)(((byte)(191))))); this.btnSave.DisabledFillColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); @@ -303,40 +341,100 @@ private void InitializeComponent() this.toggleShowAccountNames.UncheckedSwitchColor = System.Drawing.Color.White; this.toggleShowAccountNames.UncheckedSwitchStyle = Bunifu.UI.WinForms.BunifuToggleSwitch2.SwitchStyles.Outline; // - // label1 + // btnConnectDiscord // - this.label1.AutoSize = true; - this.label1.Font = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label1.Location = new System.Drawing.Point(12, 46); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(171, 21); - this.label1.TabIndex = 30; - this.label1.Text = "Use discord integration"; - // - // toggleUseDiscord - // - this.toggleUseDiscord.BackColor = System.Drawing.Color.Transparent; - this.toggleUseDiscord.Checked = true; - this.toggleUseDiscord.CheckedBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(156)))), ((int)(((byte)(95)))), ((int)(((byte)(244))))); - this.toggleUseDiscord.CheckedSwitchColor = System.Drawing.Color.White; - this.toggleUseDiscord.CheckedSwitchStyle = Bunifu.UI.WinForms.BunifuToggleSwitch2.SwitchStyles.Outline; - this.toggleUseDiscord.Location = new System.Drawing.Point(16, 74); - this.toggleUseDiscord.Name = "toggleUseDiscord"; - this.toggleUseDiscord.OutlineThickness = 2; - this.toggleUseDiscord.Size = new System.Drawing.Size(44, 19); - this.toggleUseDiscord.TabIndex = 29; - this.toggleUseDiscord.UncheckedBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(189)))), ((int)(((byte)(189)))), ((int)(((byte)(189))))); - this.toggleUseDiscord.UncheckedSwitchColor = System.Drawing.Color.White; - this.toggleUseDiscord.UncheckedSwitchStyle = Bunifu.UI.WinForms.BunifuToggleSwitch2.SwitchStyles.Outline; - this.toggleUseDiscord.CheckedChanged += new System.EventHandler(this.toggleUseDiscord_CheckedChanged); - // - // pCover - // - this.pCover.Location = new System.Drawing.Point(17, 99); - this.pCover.Name = "pCover"; - this.pCover.Size = new System.Drawing.Size(438, 117); - this.pCover.TabIndex = 31; - this.pCover.Visible = false; + this.btnConnectDiscord.AllowAnimations = true; + this.btnConnectDiscord.AllowMouseEffects = true; + this.btnConnectDiscord.AllowToggling = false; + this.btnConnectDiscord.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.btnConnectDiscord.AnimationSpeed = 200; + this.btnConnectDiscord.AutoGenerateColors = false; + this.btnConnectDiscord.AutoRoundBorders = false; + this.btnConnectDiscord.AutoSizeLeftIcon = true; + this.btnConnectDiscord.AutoSizeRightIcon = true; + this.btnConnectDiscord.BackColor = System.Drawing.Color.Transparent; + this.btnConnectDiscord.BackColor1 = System.Drawing.Color.FromArgb(((int)(((byte)(175)))), ((int)(((byte)(98)))), ((int)(((byte)(0)))), ((int)(((byte)(238))))); + this.btnConnectDiscord.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("btnConnectDiscord.BackgroundImage"))); + this.btnConnectDiscord.BorderStyle = Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderStyles.Solid; + this.btnConnectDiscord.ButtonText = "Connect discord with EAM"; + this.btnConnectDiscord.ButtonTextMarginLeft = 0; + this.btnConnectDiscord.ColorContrastOnClick = 45; + this.btnConnectDiscord.ColorContrastOnHover = 45; + this.btnConnectDiscord.Cursor = System.Windows.Forms.Cursors.Default; + borderEdges1.BottomLeft = true; + borderEdges1.BottomRight = true; + borderEdges1.TopLeft = true; + borderEdges1.TopRight = true; + this.btnConnectDiscord.CustomizableEdges = borderEdges1; + this.btnConnectDiscord.DialogResult = System.Windows.Forms.DialogResult.None; + this.btnConnectDiscord.DisabledBorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(191)))), ((int)(((byte)(191)))), ((int)(((byte)(191))))); + this.btnConnectDiscord.DisabledFillColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); + this.btnConnectDiscord.DisabledForecolor = System.Drawing.Color.FromArgb(((int)(((byte)(168)))), ((int)(((byte)(160)))), ((int)(((byte)(168))))); + this.btnConnectDiscord.FocusState = Bunifu.UI.WinForms.BunifuButton.BunifuButton.ButtonStates.Hover; + this.btnConnectDiscord.Font = new System.Drawing.Font("Segoe UI Semibold", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnConnectDiscord.ForeColor = System.Drawing.Color.White; + this.btnConnectDiscord.IconLeft = global::ExaltAccountManager.Properties.Resources.discord_new_outline_white_24px; + this.btnConnectDiscord.IconLeftAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.btnConnectDiscord.IconLeftCursor = System.Windows.Forms.Cursors.Default; + this.btnConnectDiscord.IconLeftPadding = new System.Windows.Forms.Padding(15, 3, 1, 3); + this.btnConnectDiscord.IconMarginLeft = 11; + this.btnConnectDiscord.IconPadding = 6; + this.btnConnectDiscord.IconRight = null; + this.btnConnectDiscord.IconRightAlign = System.Drawing.ContentAlignment.MiddleRight; + this.btnConnectDiscord.IconRightCursor = System.Windows.Forms.Cursors.Default; + this.btnConnectDiscord.IconRightPadding = new System.Windows.Forms.Padding(3, 3, 7, 3); + this.btnConnectDiscord.IconSize = 10; + this.btnConnectDiscord.IdleBorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(175)))), ((int)(((byte)(98)))), ((int)(((byte)(0)))), ((int)(((byte)(238))))); + this.btnConnectDiscord.IdleBorderRadius = 5; + this.btnConnectDiscord.IdleBorderThickness = 1; + this.btnConnectDiscord.IdleFillColor = System.Drawing.Color.FromArgb(((int)(((byte)(175)))), ((int)(((byte)(98)))), ((int)(((byte)(0)))), ((int)(((byte)(238))))); + this.btnConnectDiscord.IdleIconLeftImage = global::ExaltAccountManager.Properties.Resources.discord_new_outline_white_24px; + this.btnConnectDiscord.IdleIconRightImage = null; + this.btnConnectDiscord.IndicateFocus = false; + this.btnConnectDiscord.Location = new System.Drawing.Point(227, 62); + this.btnConnectDiscord.Name = "btnConnectDiscord"; + this.btnConnectDiscord.OnDisabledState.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(191)))), ((int)(((byte)(191)))), ((int)(((byte)(191))))); + this.btnConnectDiscord.OnDisabledState.BorderRadius = 5; + this.btnConnectDiscord.OnDisabledState.BorderStyle = Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderStyles.Solid; + this.btnConnectDiscord.OnDisabledState.BorderThickness = 1; + this.btnConnectDiscord.OnDisabledState.FillColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); + this.btnConnectDiscord.OnDisabledState.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(168)))), ((int)(((byte)(160)))), ((int)(((byte)(168))))); + this.btnConnectDiscord.OnDisabledState.IconLeftImage = null; + this.btnConnectDiscord.OnDisabledState.IconRightImage = null; + this.btnConnectDiscord.onHoverState.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(98)))), ((int)(((byte)(0)))), ((int)(((byte)(238))))); + this.btnConnectDiscord.onHoverState.BorderRadius = 5; + this.btnConnectDiscord.onHoverState.BorderStyle = Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderStyles.Solid; + this.btnConnectDiscord.onHoverState.BorderThickness = 1; + this.btnConnectDiscord.onHoverState.FillColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(98)))), ((int)(((byte)(0)))), ((int)(((byte)(238))))); + this.btnConnectDiscord.onHoverState.ForeColor = System.Drawing.Color.White; + this.btnConnectDiscord.onHoverState.IconLeftImage = global::ExaltAccountManager.Properties.Resources.discord_new_white_24px; + this.btnConnectDiscord.onHoverState.IconRightImage = null; + this.btnConnectDiscord.OnIdleState.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(175)))), ((int)(((byte)(98)))), ((int)(((byte)(0)))), ((int)(((byte)(238))))); + this.btnConnectDiscord.OnIdleState.BorderRadius = 5; + this.btnConnectDiscord.OnIdleState.BorderStyle = Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderStyles.Solid; + this.btnConnectDiscord.OnIdleState.BorderThickness = 1; + this.btnConnectDiscord.OnIdleState.FillColor = System.Drawing.Color.FromArgb(((int)(((byte)(175)))), ((int)(((byte)(98)))), ((int)(((byte)(0)))), ((int)(((byte)(238))))); + this.btnConnectDiscord.OnIdleState.ForeColor = System.Drawing.Color.White; + this.btnConnectDiscord.OnIdleState.IconLeftImage = global::ExaltAccountManager.Properties.Resources.discord_new_outline_white_24px; + this.btnConnectDiscord.OnIdleState.IconRightImage = null; + this.btnConnectDiscord.OnPressedState.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(225)))), ((int)(((byte)(98)))), ((int)(((byte)(0)))), ((int)(((byte)(238))))); + this.btnConnectDiscord.OnPressedState.BorderRadius = 5; + this.btnConnectDiscord.OnPressedState.BorderStyle = Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderStyles.Solid; + this.btnConnectDiscord.OnPressedState.BorderThickness = 1; + this.btnConnectDiscord.OnPressedState.FillColor = System.Drawing.Color.FromArgb(((int)(((byte)(225)))), ((int)(((byte)(98)))), ((int)(((byte)(0)))), ((int)(((byte)(238))))); + this.btnConnectDiscord.OnPressedState.ForeColor = System.Drawing.Color.White; + this.btnConnectDiscord.OnPressedState.IconLeftImage = null; + this.btnConnectDiscord.OnPressedState.IconRightImage = null; + this.btnConnectDiscord.Size = new System.Drawing.Size(228, 31); + this.btnConnectDiscord.TabIndex = 32; + this.btnConnectDiscord.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + this.btnConnectDiscord.TextAlignment = System.Windows.Forms.HorizontalAlignment.Center; + this.btnConnectDiscord.TextMarginLeft = 0; + this.btnConnectDiscord.TextPadding = new System.Windows.Forms.Padding(0, 0, 15, 0); + this.btnConnectDiscord.UseDefaultRadiusAndThickness = true; + this.btnConnectDiscord.Visible = false; + this.btnConnectDiscord.Click += new System.EventHandler(this.btnConnectDiscord_Click); // // EleDiscordSettings // @@ -372,5 +470,6 @@ private void InitializeComponent() private System.Windows.Forms.Label label1; private Bunifu.UI.WinForms.BunifuToggleSwitch2 toggleUseDiscord; private System.Windows.Forms.Panel pCover; + private Bunifu.UI.WinForms.BunifuButton.BunifuButton btnConnectDiscord; } } diff --git a/ExaltAccountManager/UI/Elements/EleDiscordSettings.cs b/ExaltAccountManager/UI/Elements/EleDiscordSettings.cs index e0f6fc17..b9f04de5 100644 --- a/ExaltAccountManager/UI/Elements/EleDiscordSettings.cs +++ b/ExaltAccountManager/UI/Elements/EleDiscordSettings.cs @@ -1,6 +1,8 @@ -using System; +using Newtonsoft.Json; +using System; using System.Drawing; using System.Linq; +using System.Threading; using System.Windows.Forms; namespace ExaltAccountManager.UI.Elements @@ -8,6 +10,7 @@ namespace ExaltAccountManager.UI.Elements public sealed partial class EleDiscordSettings : UserControl { private FrmMain frm; + private CancellationTokenSource cancellationTokenSource; public EleDiscordSettings(FrmMain _frm) { @@ -15,12 +18,29 @@ public EleDiscordSettings(FrmMain _frm) frm = _frm; - toggleUseDiscord.Checked = !frm.OptionsData.discordOptions.OptOut; + toggleUseDiscord.Checked = !frm.OptionsData.discordOptions.OptOut; toggleShowAccountNames.Checked = frm.OptionsData.discordOptions.ShowAccountNames; toggleShowMenus.Checked = frm.OptionsData.discordOptions.ShowMenus; toggleDiscord.Checked = frm.OptionsData.discordOptions.ShowState; + + if ((frm.DiscordUser == null || (frm.DiscordUser != null && frm.DiscordUser.DiscordUserId.Equals("NotFound")) && DiscordHelper.IsConnected)) + { + btnConnectDiscord.Visible = true; + + if (System.IO.File.Exists(frm.pathDiscordPopups)) + { + try + { + DiscordPopupSettings settings = JsonConvert.DeserializeObject(System.IO.File.ReadAllText(frm.pathDiscordPopups)); + + btnConnectDiscord.Visible = settings.LastDiscordPopupResult != DiscordPopupSettings.DiscordpopupResult.Yes; + } + catch { } + } + } + ApplyTheme(this, EventArgs.Empty); frm.ThemeChanged += ApplyTheme; @@ -86,5 +106,13 @@ private void toggleUseDiscord_CheckedChanged(object sender, EventArgs e) { pCover.Visible = !toggleUseDiscord.Checked; } + + private void btnConnectDiscord_Click(object sender, EventArgs e) + { + cancellationTokenSource = new CancellationTokenSource(); + cancellationTokenSource.CancelAfter(7500); + + frm.DiscordUserConnection(null, cancellationTokenSource.Token); + } } } diff --git a/ExaltAccountManager/UI/Elements/EleDiscordSettings.resx b/ExaltAccountManager/UI/Elements/EleDiscordSettings.resx index 3040395a..600489e4 100644 --- a/ExaltAccountManager/UI/Elements/EleDiscordSettings.resx +++ b/ExaltAccountManager/UI/Elements/EleDiscordSettings.resx @@ -118,6 +118,16 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + iVBORw0KGgoAAAANSUhEUgAAAOQAAAAfCAYAAAD3AmFXAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAADySURBVHhe7d09SsVAFIbh07gga3t3YCtJBF3J3cNdga2o + IFiI4E91dyJJdAc6EcvU8SuewJMwzLQvk+7U8gz1edzXvO9rOgBbm/fnNZ7+xnhR00lX42vbeGpugM21 + 9ua3rj7Oqqv5ui0eVw4B27lrnqu9lmtz7QCwrYMgIYcgIYggIYggIYggIYggIYggIYggIYggIYggIYgg + IYggIYggIYggIYggIYggIYggIYggIYggIYggIYggIYggIYggIYggIcihhpruuxofVjaB7dz2Nb4vg3aG + Za7AygFgM+NL++7+Bu58XbXF8usK/I/dZX0f/QCnJRX5xVr05AAAAABJRU5ErkJggg== + + iVBORw0KGgoAAAANSUhEUgAAAbcAAAAfCAYAAABkr4PcAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 diff --git a/ExaltAccountManager/UI/UIDailyLogins.cs b/ExaltAccountManager/UI/UIDailyLogins.cs index d162f87e..372a2266 100644 --- a/ExaltAccountManager/UI/UIDailyLogins.cs +++ b/ExaltAccountManager/UI/UIDailyLogins.cs @@ -36,8 +36,7 @@ public UIDailyLogins(FrmMain _frm) frm = _frm; frm.ThemeChanged += ApplyTheme; - this.Disposed += (object sender, EventArgs e) => frm.ThemeChanged -= ApplyTheme; - + this.Disposed += (object sender, EventArgs e) => frm.ThemeChanged -= ApplyTheme; if (File.Exists(frm.dailyLoginsPath)) { diff --git a/ExaltAccountManager/UI/UIOptions.cs b/ExaltAccountManager/UI/UIOptions.cs index 09dafe57..03e29853 100644 --- a/ExaltAccountManager/UI/UIOptions.cs +++ b/ExaltAccountManager/UI/UIOptions.cs @@ -12,22 +12,6 @@ public sealed partial class UIOptions : UserControl public bool[] GameUpdateAndNotifications = { true, true, true, true }; - //private bool HasChanges - //{ - // get => hasChanges; - // set - // { - // hasChanges = value; - - // if (frm != null) - // { - - // } - // } - - //} - //private bool hasChanges = false; - public UIOptions(FrmMain _frm) { InitializeComponent(); @@ -99,7 +83,7 @@ public void ApplyOptions() { if (dropServers.Items.Count == 0) dropServers.Items.Add("Last server (Deca default)"); - //if (frm.OptionsData.serverToJoin.Equals("Last")) + dropServers.SelectedIndex = 0; } @@ -237,31 +221,31 @@ private void tbPath_TextChanged(object sender, EventArgs e) private void btnSnackbar_Click(object sender, EventArgs e) { - lHeadline.Focus(); - Elements.EleSnackbarOptions eleSnackbarOptions = new Elements.EleSnackbarOptions(frm); frm.ShowShadowForm(eleSnackbarOptions); + + lHeadline.Focus(); } private void btnGameUpdaterAndNotificationSettings_Click(object sender, EventArgs e) { - lHeadline.Focus(); - frm.ShowShadowForm(new Elements.EleGameUpdateAndNotifications(frm)); + + lHeadline.Focus(); } private void btnDiscord_Click(object sender, EventArgs e) { - lHeadline.Focus(); - frm.ShowShadowForm(new Elements.EleDiscordSettings(frm)); + + lHeadline.Focus(); } private void btnAnalytics_Click(object sender, EventArgs e) { - lHeadline.Focus(); - frm.ShowShadowForm(new Elements.EleAnalyticsSettings(frm)); + + lHeadline.Focus(); } private void dropServers_SelectedIndexChanged(object sender, EventArgs e) From d31bc7b4d4d892782f77dfcb53f5682cbbed8a6b Mon Sep 17 00:00:00 2001 From: MaikEight Date: Sun, 28 May 2023 03:57:04 +0200 Subject: [PATCH 24/40] =?UTF-8?q?=E2=9C=A8=20Added=20a=20new=20view=20for?= =?UTF-8?q?=20own=20EAM=20usage=20data=20(requires=20a=20connected=20disco?= =?UTF-8?q?rdUserId=20AND=20analytics=20enabled?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ExaltAccountManager.csproj | 13 + ExaltAccountManager/FrmControlHost.cs | 8 + ExaltAccountManager/FrmMain.Designer.cs | 953 +++++++++--------- ExaltAccountManager/FrmMain.cs | 61 +- .../Properties/Resources.Designer.cs | 40 + ExaltAccountManager/Properties/Resources.resx | 12 + .../Resources/male_user_black_24px.png | Bin 0 -> 518 bytes .../male_user_outline_black_24px.png | Bin 0 -> 624 bytes .../male_user_outline_white_24px.png | Bin 0 -> 661 bytes .../Resources/male_user_white_24px.png | Bin 0 -> 557 bytes .../UI/Elements/EleAnalyticsSettings.cs | 1 + .../UI/Elements/EleDiscordUser.Designer.cs | 169 ++++ .../UI/Elements/EleDiscordUser.cs | 87 ++ .../UI/Elements/EleDiscordUser.resx | 128 +++ 14 files changed, 1003 insertions(+), 469 deletions(-) create mode 100644 ExaltAccountManager/Resources/male_user_black_24px.png create mode 100644 ExaltAccountManager/Resources/male_user_outline_black_24px.png create mode 100644 ExaltAccountManager/Resources/male_user_outline_white_24px.png create mode 100644 ExaltAccountManager/Resources/male_user_white_24px.png create mode 100644 ExaltAccountManager/UI/Elements/EleDiscordUser.Designer.cs create mode 100644 ExaltAccountManager/UI/Elements/EleDiscordUser.cs create mode 100644 ExaltAccountManager/UI/Elements/EleDiscordUser.resx diff --git a/ExaltAccountManager/ExaltAccountManager.csproj b/ExaltAccountManager/ExaltAccountManager.csproj index f1e6677f..4595bb59 100644 --- a/ExaltAccountManager/ExaltAccountManager.csproj +++ b/ExaltAccountManager/ExaltAccountManager.csproj @@ -721,6 +721,12 @@ EleNewsPoll.cs + + UserControl + + + EleDiscordUser.cs + UserControl @@ -996,6 +1002,9 @@ EleNewsPoll.cs + + EleDiscordUser.cs + EleQNA.cs @@ -1092,6 +1101,10 @@ + + + + diff --git a/ExaltAccountManager/FrmControlHost.cs b/ExaltAccountManager/FrmControlHost.cs index af18b9d3..3ae6c677 100644 --- a/ExaltAccountManager/FrmControlHost.cs +++ b/ExaltAccountManager/FrmControlHost.cs @@ -57,8 +57,16 @@ public void RemoveControl() { this.Controls.Remove(ctrToHost); ctrToHost.SizeChanged -= CtrToHost_SizeChanged; + if (ctrToHost is IDisposeOfControl doDipose && doDipose.DisposeOfControl) + ctrToHost.Dispose(); + ctrToHost = null; } } } + + public interface IDisposeOfControl + { + bool DisposeOfControl { get; } + } } diff --git a/ExaltAccountManager/FrmMain.Designer.cs b/ExaltAccountManager/FrmMain.Designer.cs index 7dbd5265..02b81758 100644 --- a/ExaltAccountManager/FrmMain.Designer.cs +++ b/ExaltAccountManager/FrmMain.Designer.cs @@ -34,27 +34,13 @@ private void InitializeComponent() this.pLeftSide = new System.Windows.Forms.Panel(); this.pSideButtons = new System.Windows.Forms.Panel(); this.pUpdate = new System.Windows.Forms.Panel(); - this.btnEAMUpdate = new Bunifu.UI.WinForms.BunifuButton.BunifuButton(); this.pBottom = new System.Windows.Forms.Panel(); this.lVersion = new System.Windows.Forms.Label(); - this.pSideBar = new System.Windows.Forms.PictureBox(); - this.btnAbout = new System.Windows.Forms.Button(); - this.btnLogs = new System.Windows.Forms.Button(); - this.btnHelp = new System.Windows.Forms.Button(); - this.btnOptions = new System.Windows.Forms.Button(); - this.btnModules = new System.Windows.Forms.Button(); - this.btnAddAccount = new System.Windows.Forms.Button(); - this.btnNews = new System.Windows.Forms.Button(); - this.btnAccounts = new System.Windows.Forms.Button(); - this.btnGameUpdater = new System.Windows.Forms.Button(); this.pSpacer = new System.Windows.Forms.Panel(); this.pHeader = new System.Windows.Forms.Panel(); - this.pbHeader = new System.Windows.Forms.PictureBox(); this.lHeaderEAM = new System.Windows.Forms.Label(); this.pTop = new System.Windows.Forms.Panel(); this.btnSwitchDesign = new System.Windows.Forms.Button(); - this.pbMinimize = new System.Windows.Forms.PictureBox(); - this.pbClose = new System.Windows.Forms.PictureBox(); this.lTitle = new System.Windows.Forms.Label(); this.pContent = new System.Windows.Forms.Panel(); this.bunifuForm = new Bunifu.UI.WinForms.BunifuFormDock(); @@ -63,16 +49,32 @@ private void InitializeComponent() this.timerLoadUI = new System.Windows.Forms.Timer(this.components); this.toolTip = new Bunifu.UI.WinForms.BunifuToolTip(this.components); this.timerDiscordUpdater = new System.Windows.Forms.Timer(this.components); + this.pbMinimize = new System.Windows.Forms.PictureBox(); + this.pbClose = new System.Windows.Forms.PictureBox(); + this.btnEAMUpdate = new Bunifu.UI.WinForms.BunifuButton.BunifuButton(); + this.pSideBar = new System.Windows.Forms.PictureBox(); + this.btnAbout = new System.Windows.Forms.Button(); + this.btnLogs = new System.Windows.Forms.Button(); + this.btnHelp = new System.Windows.Forms.Button(); + this.btnOptions = new System.Windows.Forms.Button(); + this.btnModules = new System.Windows.Forms.Button(); + this.btnAddAccount = new System.Windows.Forms.Button(); + this.btnNews = new System.Windows.Forms.Button(); + this.btnAccounts = new System.Windows.Forms.Button(); + this.btnGameUpdater = new System.Windows.Forms.Button(); + this.pbHeader = new System.Windows.Forms.PictureBox(); + this.pbShowDiscordUser = new System.Windows.Forms.PictureBox(); this.pLeftSide.SuspendLayout(); this.pSideButtons.SuspendLayout(); this.pUpdate.SuspendLayout(); this.pBottom.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.pSideBar)).BeginInit(); this.pHeader.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.pbHeader)).BeginInit(); this.pTop.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.pbMinimize)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.pbClose)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.pSideBar)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.pbHeader)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.pbShowDiscordUser)).BeginInit(); this.SuspendLayout(); // // pLeftSide @@ -127,102 +129,6 @@ private void InitializeComponent() this.toolTip.SetToolTipTitle(this.pUpdate, ""); this.pUpdate.Visible = false; // - // btnEAMUpdate - // - this.btnEAMUpdate.AllowAnimations = true; - this.btnEAMUpdate.AllowMouseEffects = true; - this.btnEAMUpdate.AllowToggling = false; - this.btnEAMUpdate.AnimationSpeed = 200; - this.btnEAMUpdate.AutoGenerateColors = false; - this.btnEAMUpdate.AutoRoundBorders = false; - this.btnEAMUpdate.AutoSizeLeftIcon = true; - this.btnEAMUpdate.AutoSizeRightIcon = true; - this.btnEAMUpdate.BackColor = System.Drawing.Color.Transparent; - this.btnEAMUpdate.BackColor1 = System.Drawing.Color.FromArgb(((int)(((byte)(175)))), ((int)(((byte)(98)))), ((int)(((byte)(0)))), ((int)(((byte)(238))))); - this.btnEAMUpdate.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("btnEAMUpdate.BackgroundImage"))); - this.btnEAMUpdate.BorderStyle = Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderStyles.Solid; - this.btnEAMUpdate.ButtonText = "Update EAM"; - this.btnEAMUpdate.ButtonTextMarginLeft = 0; - this.btnEAMUpdate.ColorContrastOnClick = 45; - this.btnEAMUpdate.ColorContrastOnHover = 45; - this.btnEAMUpdate.Cursor = System.Windows.Forms.Cursors.Default; - borderEdges1.BottomLeft = true; - borderEdges1.BottomRight = true; - borderEdges1.TopLeft = true; - borderEdges1.TopRight = true; - this.btnEAMUpdate.CustomizableEdges = borderEdges1; - this.btnEAMUpdate.DialogResult = System.Windows.Forms.DialogResult.None; - this.btnEAMUpdate.DisabledBorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(191)))), ((int)(((byte)(191)))), ((int)(((byte)(191))))); - this.btnEAMUpdate.DisabledFillColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); - this.btnEAMUpdate.DisabledForecolor = System.Drawing.Color.FromArgb(((int)(((byte)(168)))), ((int)(((byte)(160)))), ((int)(((byte)(168))))); - this.btnEAMUpdate.Dock = System.Windows.Forms.DockStyle.Fill; - this.btnEAMUpdate.FocusState = Bunifu.UI.WinForms.BunifuButton.BunifuButton.ButtonStates.Hover; - this.btnEAMUpdate.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnEAMUpdate.ForeColor = System.Drawing.Color.White; - this.btnEAMUpdate.IconLeft = global::ExaltAccountManager.Properties.Resources._2; - this.btnEAMUpdate.IconLeftAlign = System.Drawing.ContentAlignment.MiddleLeft; - this.btnEAMUpdate.IconLeftCursor = System.Windows.Forms.Cursors.Default; - this.btnEAMUpdate.IconLeftPadding = new System.Windows.Forms.Padding(5, 3, 1, 3); - this.btnEAMUpdate.IconMarginLeft = 11; - this.btnEAMUpdate.IconPadding = 4; - this.btnEAMUpdate.IconRight = null; - this.btnEAMUpdate.IconRightAlign = System.Drawing.ContentAlignment.MiddleRight; - this.btnEAMUpdate.IconRightCursor = System.Windows.Forms.Cursors.Default; - this.btnEAMUpdate.IconRightPadding = new System.Windows.Forms.Padding(3, 3, 7, 3); - this.btnEAMUpdate.IconSize = 10; - this.btnEAMUpdate.IdleBorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(175)))), ((int)(((byte)(98)))), ((int)(((byte)(0)))), ((int)(((byte)(238))))); - this.btnEAMUpdate.IdleBorderRadius = 5; - this.btnEAMUpdate.IdleBorderThickness = 1; - this.btnEAMUpdate.IdleFillColor = System.Drawing.Color.FromArgb(((int)(((byte)(175)))), ((int)(((byte)(98)))), ((int)(((byte)(0)))), ((int)(((byte)(238))))); - this.btnEAMUpdate.IdleIconLeftImage = global::ExaltAccountManager.Properties.Resources._2; - this.btnEAMUpdate.IdleIconRightImage = null; - this.btnEAMUpdate.IndicateFocus = false; - this.btnEAMUpdate.Location = new System.Drawing.Point(5, 0); - this.btnEAMUpdate.Name = "btnEAMUpdate"; - this.btnEAMUpdate.OnDisabledState.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(191)))), ((int)(((byte)(191)))), ((int)(((byte)(191))))); - this.btnEAMUpdate.OnDisabledState.BorderRadius = 5; - this.btnEAMUpdate.OnDisabledState.BorderStyle = Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderStyles.Solid; - this.btnEAMUpdate.OnDisabledState.BorderThickness = 1; - this.btnEAMUpdate.OnDisabledState.FillColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); - this.btnEAMUpdate.OnDisabledState.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(168)))), ((int)(((byte)(160)))), ((int)(((byte)(168))))); - this.btnEAMUpdate.OnDisabledState.IconLeftImage = null; - this.btnEAMUpdate.OnDisabledState.IconRightImage = null; - this.btnEAMUpdate.onHoverState.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(98)))), ((int)(((byte)(0)))), ((int)(((byte)(238))))); - this.btnEAMUpdate.onHoverState.BorderRadius = 5; - this.btnEAMUpdate.onHoverState.BorderStyle = Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderStyles.Solid; - this.btnEAMUpdate.onHoverState.BorderThickness = 1; - this.btnEAMUpdate.onHoverState.FillColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(98)))), ((int)(((byte)(0)))), ((int)(((byte)(238))))); - this.btnEAMUpdate.onHoverState.ForeColor = System.Drawing.Color.White; - this.btnEAMUpdate.onHoverState.IconLeftImage = null; - this.btnEAMUpdate.onHoverState.IconRightImage = null; - this.btnEAMUpdate.OnIdleState.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(175)))), ((int)(((byte)(98)))), ((int)(((byte)(0)))), ((int)(((byte)(238))))); - this.btnEAMUpdate.OnIdleState.BorderRadius = 5; - this.btnEAMUpdate.OnIdleState.BorderStyle = Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderStyles.Solid; - this.btnEAMUpdate.OnIdleState.BorderThickness = 1; - this.btnEAMUpdate.OnIdleState.FillColor = System.Drawing.Color.FromArgb(((int)(((byte)(175)))), ((int)(((byte)(98)))), ((int)(((byte)(0)))), ((int)(((byte)(238))))); - this.btnEAMUpdate.OnIdleState.ForeColor = System.Drawing.Color.White; - this.btnEAMUpdate.OnIdleState.IconLeftImage = global::ExaltAccountManager.Properties.Resources._2; - this.btnEAMUpdate.OnIdleState.IconRightImage = null; - this.btnEAMUpdate.OnPressedState.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(225)))), ((int)(((byte)(98)))), ((int)(((byte)(0)))), ((int)(((byte)(238))))); - this.btnEAMUpdate.OnPressedState.BorderRadius = 5; - this.btnEAMUpdate.OnPressedState.BorderStyle = Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderStyles.Solid; - this.btnEAMUpdate.OnPressedState.BorderThickness = 1; - this.btnEAMUpdate.OnPressedState.FillColor = System.Drawing.Color.FromArgb(((int)(((byte)(225)))), ((int)(((byte)(98)))), ((int)(((byte)(0)))), ((int)(((byte)(238))))); - this.btnEAMUpdate.OnPressedState.ForeColor = System.Drawing.Color.White; - this.btnEAMUpdate.OnPressedState.IconLeftImage = null; - this.btnEAMUpdate.OnPressedState.IconRightImage = null; - this.btnEAMUpdate.Size = new System.Drawing.Size(165, 31); - this.btnEAMUpdate.TabIndex = 25; - this.btnEAMUpdate.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - this.btnEAMUpdate.TextAlignment = System.Windows.Forms.HorizontalAlignment.Center; - this.btnEAMUpdate.TextMarginLeft = 0; - this.btnEAMUpdate.TextPadding = new System.Windows.Forms.Padding(13, 0, 15, 0); - this.toolTip.SetToolTip(this.btnEAMUpdate, ""); - this.toolTip.SetToolTipIcon(this.btnEAMUpdate, null); - this.toolTip.SetToolTipTitle(this.btnEAMUpdate, ""); - this.btnEAMUpdate.UseDefaultRadiusAndThickness = true; - this.btnEAMUpdate.Click += new System.EventHandler(this.btnEAMUpdate_Click); - // // pBottom // this.pBottom.Controls.Add(this.lVersion); @@ -251,319 +157,49 @@ private void InitializeComponent() this.toolTip.SetToolTipTitle(this.lVersion, ""); this.lVersion.Paint += new System.Windows.Forms.PaintEventHandler(this.lVersion_Paint); // - // pSideBar - // - this.pSideBar.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(225)))), ((int)(((byte)(98)))), ((int)(((byte)(0)))), ((int)(((byte)(238))))); - this.pSideBar.Location = new System.Drawing.Point(0, 3); - this.pSideBar.Name = "pSideBar"; - this.pSideBar.Size = new System.Drawing.Size(5, 30); - this.pSideBar.TabIndex = 5; - this.pSideBar.TabStop = false; - this.toolTip.SetToolTip(this.pSideBar, ""); - this.toolTip.SetToolTipIcon(this.pSideBar, null); - this.toolTip.SetToolTipTitle(this.pSideBar, ""); - // - // btnAbout + // pSpacer // - this.btnAbout.Dock = System.Windows.Forms.DockStyle.Top; - this.btnAbout.FlatAppearance.BorderSize = 0; - this.btnAbout.FlatAppearance.MouseDownBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(225)))), ((int)(((byte)(98)))), ((int)(((byte)(0)))), ((int)(((byte)(238))))); - this.btnAbout.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(98)))), ((int)(((byte)(0)))), ((int)(((byte)(238))))); - this.btnAbout.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnAbout.Font = new System.Drawing.Font("Segoe UI", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnAbout.Image = global::ExaltAccountManager.Properties.Resources.ic_info_outline_black_24dp2; - this.btnAbout.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; - this.btnAbout.Location = new System.Drawing.Point(0, 320); - this.btnAbout.Margin = new System.Windows.Forms.Padding(0); - this.btnAbout.Name = "btnAbout"; - this.btnAbout.Padding = new System.Windows.Forms.Padding(10, 0, 0, 0); - this.btnAbout.Size = new System.Drawing.Size(175, 40); - this.btnAbout.TabIndex = 8; - this.btnAbout.Text = " About EAM"; - this.btnAbout.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - this.btnAbout.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText; - this.toolTip.SetToolTip(this.btnAbout, ""); - this.toolTip.SetToolTipIcon(this.btnAbout, null); - this.toolTip.SetToolTipTitle(this.btnAbout, ""); - this.btnAbout.UseVisualStyleBackColor = true; - this.btnAbout.Click += new System.EventHandler(this.btnAbout_Click); - this.btnAbout.MouseEnter += new System.EventHandler(this.btnAbout_MouseEnter); - this.btnAbout.MouseLeave += new System.EventHandler(this.btnAbout_MouseLeave); + this.pSpacer.Dock = System.Windows.Forms.DockStyle.Top; + this.pSpacer.Location = new System.Drawing.Point(0, 64); + this.pSpacer.Name = "pSpacer"; + this.pSpacer.Size = new System.Drawing.Size(175, 2); + this.pSpacer.TabIndex = 6; + this.toolTip.SetToolTip(this.pSpacer, ""); + this.toolTip.SetToolTipIcon(this.pSpacer, null); + this.toolTip.SetToolTipTitle(this.pSpacer, ""); // - // btnLogs + // pHeader // - this.btnLogs.Dock = System.Windows.Forms.DockStyle.Top; - this.btnLogs.FlatAppearance.BorderSize = 0; - this.btnLogs.FlatAppearance.MouseDownBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(225)))), ((int)(((byte)(98)))), ((int)(((byte)(0)))), ((int)(((byte)(238))))); - this.btnLogs.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(98)))), ((int)(((byte)(0)))), ((int)(((byte)(238))))); - this.btnLogs.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnLogs.Font = new System.Drawing.Font("Segoe UI", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnLogs.Image = global::ExaltAccountManager.Properties.Resources.activity_history_outline_24px; - this.btnLogs.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; - this.btnLogs.Location = new System.Drawing.Point(0, 280); - this.btnLogs.Margin = new System.Windows.Forms.Padding(0); - this.btnLogs.Name = "btnLogs"; - this.btnLogs.Padding = new System.Windows.Forms.Padding(10, 0, 0, 0); - this.btnLogs.Size = new System.Drawing.Size(175, 40); - this.btnLogs.TabIndex = 7; - this.btnLogs.Text = " Logs"; - this.btnLogs.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - this.btnLogs.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText; - this.toolTip.SetToolTip(this.btnLogs, ""); - this.toolTip.SetToolTipIcon(this.btnLogs, null); - this.toolTip.SetToolTipTitle(this.btnLogs, ""); - this.btnLogs.UseVisualStyleBackColor = true; - this.btnLogs.Click += new System.EventHandler(this.btnLogs_Click); - this.btnLogs.MouseEnter += new System.EventHandler(this.btnLogs_MouseEnter); - this.btnLogs.MouseLeave += new System.EventHandler(this.btnLogs_MouseLeave); + this.pHeader.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(98)))), ((int)(((byte)(0)))), ((int)(((byte)(238))))); + this.pHeader.Controls.Add(this.pbHeader); + this.pHeader.Controls.Add(this.lHeaderEAM); + this.pHeader.Dock = System.Windows.Forms.DockStyle.Top; + this.pHeader.Location = new System.Drawing.Point(0, 0); + this.pHeader.Name = "pHeader"; + this.pHeader.Size = new System.Drawing.Size(175, 64); + this.pHeader.TabIndex = 5; + this.toolTip.SetToolTip(this.pHeader, ""); + this.toolTip.SetToolTipIcon(this.pHeader, null); + this.toolTip.SetToolTipTitle(this.pHeader, ""); // - // btnHelp + // lHeaderEAM // - this.btnHelp.Dock = System.Windows.Forms.DockStyle.Top; - this.btnHelp.FlatAppearance.BorderSize = 0; - this.btnHelp.FlatAppearance.MouseDownBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(225)))), ((int)(((byte)(98)))), ((int)(((byte)(0)))), ((int)(((byte)(238))))); - this.btnHelp.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(98)))), ((int)(((byte)(0)))), ((int)(((byte)(238))))); - this.btnHelp.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnHelp.Font = new System.Drawing.Font("Segoe UI", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnHelp.Image = global::ExaltAccountManager.Properties.Resources.ic_help_outline_black_24dp; - this.btnHelp.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; - this.btnHelp.Location = new System.Drawing.Point(0, 240); - this.btnHelp.Margin = new System.Windows.Forms.Padding(0); - this.btnHelp.Name = "btnHelp"; - this.btnHelp.Padding = new System.Windows.Forms.Padding(10, 0, 0, 0); - this.btnHelp.Size = new System.Drawing.Size(175, 40); - this.btnHelp.TabIndex = 6; - this.btnHelp.Text = " Help"; - this.btnHelp.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - this.btnHelp.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText; - this.toolTip.SetToolTip(this.btnHelp, ""); - this.toolTip.SetToolTipIcon(this.btnHelp, null); - this.toolTip.SetToolTipTitle(this.btnHelp, ""); - this.btnHelp.UseVisualStyleBackColor = true; - this.btnHelp.Click += new System.EventHandler(this.btnHelp_Click); - this.btnHelp.MouseEnter += new System.EventHandler(this.btnHelp_MouseEnter); - this.btnHelp.MouseLeave += new System.EventHandler(this.btnHelp_MouseLeave); + this.lHeaderEAM.Font = new System.Drawing.Font("Segoe UI Black", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lHeaderEAM.ForeColor = System.Drawing.Color.White; + this.lHeaderEAM.Location = new System.Drawing.Point(55, 2); + this.lHeaderEAM.Name = "lHeaderEAM"; + this.lHeaderEAM.Size = new System.Drawing.Size(115, 60); + this.lHeaderEAM.TabIndex = 5; + this.lHeaderEAM.Text = "Exalt Account Manager"; + this.lHeaderEAM.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.toolTip.SetToolTip(this.lHeaderEAM, ""); + this.toolTip.SetToolTipIcon(this.lHeaderEAM, null); + this.toolTip.SetToolTipTitle(this.lHeaderEAM, ""); // - // btnOptions - // - this.btnOptions.Dock = System.Windows.Forms.DockStyle.Top; - this.btnOptions.FlatAppearance.BorderSize = 0; - this.btnOptions.FlatAppearance.MouseDownBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(225)))), ((int)(((byte)(98)))), ((int)(((byte)(0)))), ((int)(((byte)(238))))); - this.btnOptions.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(98)))), ((int)(((byte)(0)))), ((int)(((byte)(238))))); - this.btnOptions.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnOptions.Font = new System.Drawing.Font("Segoe UI", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnOptions.Image = global::ExaltAccountManager.Properties.Resources.settings_outline_24px; - this.btnOptions.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; - this.btnOptions.Location = new System.Drawing.Point(0, 200); - this.btnOptions.Margin = new System.Windows.Forms.Padding(0); - this.btnOptions.Name = "btnOptions"; - this.btnOptions.Padding = new System.Windows.Forms.Padding(10, 0, 0, 0); - this.btnOptions.Size = new System.Drawing.Size(175, 40); - this.btnOptions.TabIndex = 5; - this.btnOptions.Text = " Options"; - this.btnOptions.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - this.btnOptions.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText; - this.toolTip.SetToolTip(this.btnOptions, ""); - this.toolTip.SetToolTipIcon(this.btnOptions, null); - this.toolTip.SetToolTipTitle(this.btnOptions, ""); - this.btnOptions.UseVisualStyleBackColor = true; - this.btnOptions.Click += new System.EventHandler(this.btnOptions_Click); - this.btnOptions.Paint += new System.Windows.Forms.PaintEventHandler(this.btnOptions_Paint); - this.btnOptions.MouseEnter += new System.EventHandler(this.btnOptions_MouseEnter); - this.btnOptions.MouseLeave += new System.EventHandler(this.btnOptions_MouseLeave); - // - // btnModules - // - this.btnModules.Dock = System.Windows.Forms.DockStyle.Top; - this.btnModules.FlatAppearance.BorderSize = 0; - this.btnModules.FlatAppearance.MouseDownBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(225)))), ((int)(((byte)(98)))), ((int)(((byte)(0)))), ((int)(((byte)(238))))); - this.btnModules.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(98)))), ((int)(((byte)(0)))), ((int)(((byte)(238))))); - this.btnModules.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnModules.Font = new System.Drawing.Font("Segoe UI", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnModules.Image = global::ExaltAccountManager.Properties.Resources.dashboard_layout_outline_24px; - this.btnModules.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; - this.btnModules.Location = new System.Drawing.Point(0, 160); - this.btnModules.Margin = new System.Windows.Forms.Padding(0); - this.btnModules.Name = "btnModules"; - this.btnModules.Padding = new System.Windows.Forms.Padding(10, 0, 0, 0); - this.btnModules.Size = new System.Drawing.Size(175, 40); - this.btnModules.TabIndex = 4; - this.btnModules.Text = " Modules"; - this.btnModules.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - this.btnModules.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText; - this.toolTip.SetToolTip(this.btnModules, ""); - this.toolTip.SetToolTipIcon(this.btnModules, null); - this.toolTip.SetToolTipTitle(this.btnModules, ""); - this.btnModules.UseVisualStyleBackColor = true; - this.btnModules.Click += new System.EventHandler(this.btnModules_Click); - this.btnModules.MouseEnter += new System.EventHandler(this.btnModules_MouseEnter); - this.btnModules.MouseLeave += new System.EventHandler(this.btnModules_MouseLeave); - // - // btnAddAccount - // - this.btnAddAccount.Dock = System.Windows.Forms.DockStyle.Top; - this.btnAddAccount.FlatAppearance.BorderSize = 0; - this.btnAddAccount.FlatAppearance.MouseDownBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(225)))), ((int)(((byte)(98)))), ((int)(((byte)(0)))), ((int)(((byte)(238))))); - this.btnAddAccount.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(98)))), ((int)(((byte)(0)))), ((int)(((byte)(238))))); - this.btnAddAccount.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnAddAccount.Font = new System.Drawing.Font("Segoe UI", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnAddAccount.Image = global::ExaltAccountManager.Properties.Resources.add_user_outline_24px; - this.btnAddAccount.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; - this.btnAddAccount.Location = new System.Drawing.Point(0, 120); - this.btnAddAccount.Margin = new System.Windows.Forms.Padding(0); - this.btnAddAccount.Name = "btnAddAccount"; - this.btnAddAccount.Padding = new System.Windows.Forms.Padding(10, 0, 0, 0); - this.btnAddAccount.Size = new System.Drawing.Size(175, 40); - this.btnAddAccount.TabIndex = 3; - this.btnAddAccount.Text = " Add Account"; - this.btnAddAccount.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - this.btnAddAccount.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText; - this.toolTip.SetToolTip(this.btnAddAccount, ""); - this.toolTip.SetToolTipIcon(this.btnAddAccount, null); - this.toolTip.SetToolTipTitle(this.btnAddAccount, ""); - this.btnAddAccount.UseVisualStyleBackColor = true; - this.btnAddAccount.Click += new System.EventHandler(this.btnAddAccount_Click); - this.btnAddAccount.MouseEnter += new System.EventHandler(this.btnAddAccount_MouseEnter); - this.btnAddAccount.MouseLeave += new System.EventHandler(this.btnAddAccount_MouseLeave); - // - // btnNews - // - this.btnNews.Dock = System.Windows.Forms.DockStyle.Top; - this.btnNews.FlatAppearance.BorderSize = 0; - this.btnNews.FlatAppearance.MouseDownBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(225)))), ((int)(((byte)(98)))), ((int)(((byte)(0)))), ((int)(((byte)(238))))); - this.btnNews.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(98)))), ((int)(((byte)(0)))), ((int)(((byte)(238))))); - this.btnNews.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnNews.Font = new System.Drawing.Font("Segoe UI", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnNews.Image = global::ExaltAccountManager.Properties.Resources.news_outline_black_24px; - this.btnNews.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; - this.btnNews.Location = new System.Drawing.Point(0, 80); - this.btnNews.Margin = new System.Windows.Forms.Padding(0); - this.btnNews.Name = "btnNews"; - this.btnNews.Padding = new System.Windows.Forms.Padding(10, 0, 0, 0); - this.btnNews.Size = new System.Drawing.Size(175, 40); - this.btnNews.TabIndex = 27; - this.btnNews.Text = " News"; - this.btnNews.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - this.btnNews.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText; - this.toolTip.SetToolTip(this.btnNews, ""); - this.toolTip.SetToolTipIcon(this.btnNews, null); - this.toolTip.SetToolTipTitle(this.btnNews, ""); - this.btnNews.UseVisualStyleBackColor = true; - this.btnNews.Click += new System.EventHandler(this.btnNews_Click); - this.btnNews.Paint += new System.Windows.Forms.PaintEventHandler(this.btnNews_Paint); - this.btnNews.MouseEnter += new System.EventHandler(this.btnNews_MouseEnter); - this.btnNews.MouseLeave += new System.EventHandler(this.btnNews_MouseLeave); - // - // btnAccounts - // - this.btnAccounts.Dock = System.Windows.Forms.DockStyle.Top; - this.btnAccounts.FlatAppearance.BorderSize = 0; - this.btnAccounts.FlatAppearance.MouseDownBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(225)))), ((int)(((byte)(98)))), ((int)(((byte)(0)))), ((int)(((byte)(238))))); - this.btnAccounts.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(98)))), ((int)(((byte)(0)))), ((int)(((byte)(238))))); - this.btnAccounts.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnAccounts.Font = new System.Drawing.Font("Segoe UI", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnAccounts.Image = global::ExaltAccountManager.Properties.Resources.ic_people_outline_black_24dp; - this.btnAccounts.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; - this.btnAccounts.Location = new System.Drawing.Point(0, 40); - this.btnAccounts.Margin = new System.Windows.Forms.Padding(0); - this.btnAccounts.Name = "btnAccounts"; - this.btnAccounts.Padding = new System.Windows.Forms.Padding(10, 0, 0, 0); - this.btnAccounts.Size = new System.Drawing.Size(175, 40); - this.btnAccounts.TabIndex = 2; - this.btnAccounts.Text = " Accounts"; - this.btnAccounts.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - this.btnAccounts.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText; - this.toolTip.SetToolTip(this.btnAccounts, ""); - this.toolTip.SetToolTipIcon(this.btnAccounts, null); - this.toolTip.SetToolTipTitle(this.btnAccounts, ""); - this.btnAccounts.UseVisualStyleBackColor = true; - this.btnAccounts.Click += new System.EventHandler(this.btnAccounts_Click); - this.btnAccounts.MouseEnter += new System.EventHandler(this.btnAccounts_MouseEnter); - this.btnAccounts.MouseLeave += new System.EventHandler(this.btnAccounts_MouseLeave); - // - // btnGameUpdater - // - this.btnGameUpdater.Dock = System.Windows.Forms.DockStyle.Top; - this.btnGameUpdater.FlatAppearance.BorderSize = 0; - this.btnGameUpdater.FlatAppearance.MouseDownBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(225)))), ((int)(((byte)(98)))), ((int)(((byte)(0)))), ((int)(((byte)(238))))); - this.btnGameUpdater.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(98)))), ((int)(((byte)(0)))), ((int)(((byte)(238))))); - this.btnGameUpdater.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnGameUpdater.Font = new System.Drawing.Font("Segoe UI", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnGameUpdater.Image = global::ExaltAccountManager.Properties.Resources.update_left_rotation_24px; - this.btnGameUpdater.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; - this.btnGameUpdater.Location = new System.Drawing.Point(0, 0); - this.btnGameUpdater.Margin = new System.Windows.Forms.Padding(0); - this.btnGameUpdater.Name = "btnGameUpdater"; - this.btnGameUpdater.Padding = new System.Windows.Forms.Padding(10, 0, 0, 0); - this.btnGameUpdater.Size = new System.Drawing.Size(175, 40); - this.btnGameUpdater.TabIndex = 1; - this.btnGameUpdater.Text = " Game Updater"; - this.btnGameUpdater.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - this.btnGameUpdater.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText; - this.toolTip.SetToolTip(this.btnGameUpdater, ""); - this.toolTip.SetToolTipIcon(this.btnGameUpdater, null); - this.toolTip.SetToolTipTitle(this.btnGameUpdater, ""); - this.btnGameUpdater.UseVisualStyleBackColor = true; - this.btnGameUpdater.Visible = false; - this.btnGameUpdater.Click += new System.EventHandler(this.btnGameUpdater_Click); - this.btnGameUpdater.MouseEnter += new System.EventHandler(this.btnGameUpdater_MouseEnter); - this.btnGameUpdater.MouseLeave += new System.EventHandler(this.btnGameUpdater_MouseLeave); - // - // pSpacer - // - this.pSpacer.Dock = System.Windows.Forms.DockStyle.Top; - this.pSpacer.Location = new System.Drawing.Point(0, 64); - this.pSpacer.Name = "pSpacer"; - this.pSpacer.Size = new System.Drawing.Size(175, 2); - this.pSpacer.TabIndex = 6; - this.toolTip.SetToolTip(this.pSpacer, ""); - this.toolTip.SetToolTipIcon(this.pSpacer, null); - this.toolTip.SetToolTipTitle(this.pSpacer, ""); - // - // pHeader - // - this.pHeader.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(98)))), ((int)(((byte)(0)))), ((int)(((byte)(238))))); - this.pHeader.Controls.Add(this.pbHeader); - this.pHeader.Controls.Add(this.lHeaderEAM); - this.pHeader.Dock = System.Windows.Forms.DockStyle.Top; - this.pHeader.Location = new System.Drawing.Point(0, 0); - this.pHeader.Name = "pHeader"; - this.pHeader.Size = new System.Drawing.Size(175, 64); - this.pHeader.TabIndex = 5; - this.toolTip.SetToolTip(this.pHeader, ""); - this.toolTip.SetToolTipIcon(this.pHeader, null); - this.toolTip.SetToolTipTitle(this.pHeader, ""); - // - // pbHeader - // - this.pbHeader.Image = global::ExaltAccountManager.Properties.Resources.logo; - this.pbHeader.Location = new System.Drawing.Point(8, 8); - this.pbHeader.Name = "pbHeader"; - this.pbHeader.Size = new System.Drawing.Size(48, 48); - this.pbHeader.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; - this.pbHeader.TabIndex = 6; - this.pbHeader.TabStop = false; - this.toolTip.SetToolTip(this.pbHeader, ""); - this.toolTip.SetToolTipIcon(this.pbHeader, null); - this.toolTip.SetToolTipTitle(this.pbHeader, ""); - // - // lHeaderEAM - // - this.lHeaderEAM.Font = new System.Drawing.Font("Segoe UI Black", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lHeaderEAM.ForeColor = System.Drawing.Color.White; - this.lHeaderEAM.Location = new System.Drawing.Point(55, 2); - this.lHeaderEAM.Name = "lHeaderEAM"; - this.lHeaderEAM.Size = new System.Drawing.Size(115, 60); - this.lHeaderEAM.TabIndex = 5; - this.lHeaderEAM.Text = "Exalt Account Manager"; - this.lHeaderEAM.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - this.toolTip.SetToolTip(this.lHeaderEAM, ""); - this.toolTip.SetToolTipIcon(this.lHeaderEAM, null); - this.toolTip.SetToolTipTitle(this.lHeaderEAM, ""); - // - // pTop + // pTop // this.pTop.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(250)))), ((int)(((byte)(250)))), ((int)(((byte)(250))))); + this.pTop.Controls.Add(this.pbShowDiscordUser); this.pTop.Controls.Add(this.btnSwitchDesign); this.pTop.Controls.Add(this.pbMinimize); this.pTop.Controls.Add(this.pbClose); @@ -579,7 +215,6 @@ private void InitializeComponent() // // btnSwitchDesign // - this.btnSwitchDesign.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.btnSwitchDesign.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnSwitchDesign.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; this.btnSwitchDesign.Location = new System.Drawing.Point(526, -2); @@ -593,43 +228,6 @@ private void InitializeComponent() this.btnSwitchDesign.UseVisualStyleBackColor = true; this.btnSwitchDesign.Click += new System.EventHandler(this.btnSwitchDesign_Click); // - // pbMinimize - // - this.pbMinimize.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.pbMinimize.Image = global::ExaltAccountManager.Properties.Resources.baseline_minimize_black_24dp; - this.pbMinimize.Location = new System.Drawing.Point(630, 0); - this.pbMinimize.Name = "pbMinimize"; - this.pbMinimize.Size = new System.Drawing.Size(24, 24); - this.pbMinimize.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; - this.pbMinimize.TabIndex = 8; - this.pbMinimize.TabStop = false; - this.toolTip.SetToolTip(this.pbMinimize, ""); - this.toolTip.SetToolTipIcon(this.pbMinimize, null); - this.toolTip.SetToolTipTitle(this.pbMinimize, ""); - this.pbMinimize.Click += new System.EventHandler(this.pbMinimize_Click); - this.pbMinimize.MouseDown += new System.Windows.Forms.MouseEventHandler(this.pbMinimize_MouseDown); - this.pbMinimize.MouseEnter += new System.EventHandler(this.pbMinimize_MouseEnter); - this.pbMinimize.MouseLeave += new System.EventHandler(this.pbMinimize_MouseLeave); - this.pbMinimize.MouseUp += new System.Windows.Forms.MouseEventHandler(this.pbMinimize_MouseUp); - // - // pbClose - // - this.pbClose.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.pbClose.Image = global::ExaltAccountManager.Properties.Resources.ic_close_black_24dp; - this.pbClose.Location = new System.Drawing.Point(654, 0); - this.pbClose.Name = "pbClose"; - this.pbClose.Size = new System.Drawing.Size(24, 24); - this.pbClose.TabIndex = 7; - this.pbClose.TabStop = false; - this.toolTip.SetToolTip(this.pbClose, ""); - this.toolTip.SetToolTipIcon(this.pbClose, null); - this.toolTip.SetToolTipTitle(this.pbClose, ""); - this.pbClose.Click += new System.EventHandler(this.pbClose_Click); - this.pbClose.MouseDown += new System.Windows.Forms.MouseEventHandler(this.pbClose_MouseDown); - this.pbClose.MouseEnter += new System.EventHandler(this.pbClose_MouseEnter); - this.pbClose.MouseLeave += new System.EventHandler(this.pbClose_MouseLeave); - this.pbClose.MouseUp += new System.Windows.Forms.MouseEventHandler(this.pbClose_MouseUp); - // // lTitle // this.lTitle.AutoSize = true; @@ -817,16 +415,437 @@ private void InitializeComponent() this.timerDiscordUpdater.Interval = 5000; this.timerDiscordUpdater.Tick += new System.EventHandler(this.timerDiscordUpdater_Tick); // - // FrmMain + // pbMinimize // - this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 17F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.BackColor = System.Drawing.Color.White; - this.ClientSize = new System.Drawing.Size(853, 576); - this.Controls.Add(this.pContent); - this.Controls.Add(this.pTop); - this.Controls.Add(this.pLeftSide); - this.DoubleBuffered = true; + this.pbMinimize.Image = global::ExaltAccountManager.Properties.Resources.baseline_minimize_black_24dp; + this.pbMinimize.Location = new System.Drawing.Point(630, 0); + this.pbMinimize.Name = "pbMinimize"; + this.pbMinimize.Size = new System.Drawing.Size(24, 24); + this.pbMinimize.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; + this.pbMinimize.TabIndex = 8; + this.pbMinimize.TabStop = false; + this.toolTip.SetToolTip(this.pbMinimize, ""); + this.toolTip.SetToolTipIcon(this.pbMinimize, null); + this.toolTip.SetToolTipTitle(this.pbMinimize, ""); + this.pbMinimize.Click += new System.EventHandler(this.pbMinimize_Click); + this.pbMinimize.MouseDown += new System.Windows.Forms.MouseEventHandler(this.pbMinimize_MouseDown); + this.pbMinimize.MouseEnter += new System.EventHandler(this.pbMinimize_MouseEnter); + this.pbMinimize.MouseLeave += new System.EventHandler(this.pbMinimize_MouseLeave); + this.pbMinimize.MouseUp += new System.Windows.Forms.MouseEventHandler(this.pbMinimize_MouseUp); + // + // pbClose + // + this.pbClose.Image = global::ExaltAccountManager.Properties.Resources.ic_close_black_24dp; + this.pbClose.Location = new System.Drawing.Point(654, 0); + this.pbClose.Name = "pbClose"; + this.pbClose.Size = new System.Drawing.Size(24, 24); + this.pbClose.TabIndex = 7; + this.pbClose.TabStop = false; + this.toolTip.SetToolTip(this.pbClose, ""); + this.toolTip.SetToolTipIcon(this.pbClose, null); + this.toolTip.SetToolTipTitle(this.pbClose, ""); + this.pbClose.Click += new System.EventHandler(this.pbClose_Click); + this.pbClose.MouseDown += new System.Windows.Forms.MouseEventHandler(this.pbClose_MouseDown); + this.pbClose.MouseEnter += new System.EventHandler(this.pbClose_MouseEnter); + this.pbClose.MouseLeave += new System.EventHandler(this.pbClose_MouseLeave); + this.pbClose.MouseUp += new System.Windows.Forms.MouseEventHandler(this.pbClose_MouseUp); + // + // btnEAMUpdate + // + this.btnEAMUpdate.AllowAnimations = true; + this.btnEAMUpdate.AllowMouseEffects = true; + this.btnEAMUpdate.AllowToggling = false; + this.btnEAMUpdate.AnimationSpeed = 200; + this.btnEAMUpdate.AutoGenerateColors = false; + this.btnEAMUpdate.AutoRoundBorders = false; + this.btnEAMUpdate.AutoSizeLeftIcon = true; + this.btnEAMUpdate.AutoSizeRightIcon = true; + this.btnEAMUpdate.BackColor = System.Drawing.Color.Transparent; + this.btnEAMUpdate.BackColor1 = System.Drawing.Color.FromArgb(((int)(((byte)(175)))), ((int)(((byte)(98)))), ((int)(((byte)(0)))), ((int)(((byte)(238))))); + this.btnEAMUpdate.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("btnEAMUpdate.BackgroundImage"))); + this.btnEAMUpdate.BorderStyle = Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderStyles.Solid; + this.btnEAMUpdate.ButtonText = "Update EAM"; + this.btnEAMUpdate.ButtonTextMarginLeft = 0; + this.btnEAMUpdate.ColorContrastOnClick = 45; + this.btnEAMUpdate.ColorContrastOnHover = 45; + this.btnEAMUpdate.Cursor = System.Windows.Forms.Cursors.Default; + borderEdges1.BottomLeft = true; + borderEdges1.BottomRight = true; + borderEdges1.TopLeft = true; + borderEdges1.TopRight = true; + this.btnEAMUpdate.CustomizableEdges = borderEdges1; + this.btnEAMUpdate.DialogResult = System.Windows.Forms.DialogResult.None; + this.btnEAMUpdate.DisabledBorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(191)))), ((int)(((byte)(191)))), ((int)(((byte)(191))))); + this.btnEAMUpdate.DisabledFillColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); + this.btnEAMUpdate.DisabledForecolor = System.Drawing.Color.FromArgb(((int)(((byte)(168)))), ((int)(((byte)(160)))), ((int)(((byte)(168))))); + this.btnEAMUpdate.Dock = System.Windows.Forms.DockStyle.Fill; + this.btnEAMUpdate.FocusState = Bunifu.UI.WinForms.BunifuButton.BunifuButton.ButtonStates.Hover; + this.btnEAMUpdate.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnEAMUpdate.ForeColor = System.Drawing.Color.White; + this.btnEAMUpdate.IconLeft = global::ExaltAccountManager.Properties.Resources._2; + this.btnEAMUpdate.IconLeftAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.btnEAMUpdate.IconLeftCursor = System.Windows.Forms.Cursors.Default; + this.btnEAMUpdate.IconLeftPadding = new System.Windows.Forms.Padding(5, 3, 1, 3); + this.btnEAMUpdate.IconMarginLeft = 11; + this.btnEAMUpdate.IconPadding = 4; + this.btnEAMUpdate.IconRight = null; + this.btnEAMUpdate.IconRightAlign = System.Drawing.ContentAlignment.MiddleRight; + this.btnEAMUpdate.IconRightCursor = System.Windows.Forms.Cursors.Default; + this.btnEAMUpdate.IconRightPadding = new System.Windows.Forms.Padding(3, 3, 7, 3); + this.btnEAMUpdate.IconSize = 10; + this.btnEAMUpdate.IdleBorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(175)))), ((int)(((byte)(98)))), ((int)(((byte)(0)))), ((int)(((byte)(238))))); + this.btnEAMUpdate.IdleBorderRadius = 5; + this.btnEAMUpdate.IdleBorderThickness = 1; + this.btnEAMUpdate.IdleFillColor = System.Drawing.Color.FromArgb(((int)(((byte)(175)))), ((int)(((byte)(98)))), ((int)(((byte)(0)))), ((int)(((byte)(238))))); + this.btnEAMUpdate.IdleIconLeftImage = global::ExaltAccountManager.Properties.Resources._2; + this.btnEAMUpdate.IdleIconRightImage = null; + this.btnEAMUpdate.IndicateFocus = false; + this.btnEAMUpdate.Location = new System.Drawing.Point(5, 0); + this.btnEAMUpdate.Name = "btnEAMUpdate"; + this.btnEAMUpdate.OnDisabledState.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(191)))), ((int)(((byte)(191)))), ((int)(((byte)(191))))); + this.btnEAMUpdate.OnDisabledState.BorderRadius = 5; + this.btnEAMUpdate.OnDisabledState.BorderStyle = Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderStyles.Solid; + this.btnEAMUpdate.OnDisabledState.BorderThickness = 1; + this.btnEAMUpdate.OnDisabledState.FillColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); + this.btnEAMUpdate.OnDisabledState.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(168)))), ((int)(((byte)(160)))), ((int)(((byte)(168))))); + this.btnEAMUpdate.OnDisabledState.IconLeftImage = null; + this.btnEAMUpdate.OnDisabledState.IconRightImage = null; + this.btnEAMUpdate.onHoverState.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(98)))), ((int)(((byte)(0)))), ((int)(((byte)(238))))); + this.btnEAMUpdate.onHoverState.BorderRadius = 5; + this.btnEAMUpdate.onHoverState.BorderStyle = Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderStyles.Solid; + this.btnEAMUpdate.onHoverState.BorderThickness = 1; + this.btnEAMUpdate.onHoverState.FillColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(98)))), ((int)(((byte)(0)))), ((int)(((byte)(238))))); + this.btnEAMUpdate.onHoverState.ForeColor = System.Drawing.Color.White; + this.btnEAMUpdate.onHoverState.IconLeftImage = null; + this.btnEAMUpdate.onHoverState.IconRightImage = null; + this.btnEAMUpdate.OnIdleState.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(175)))), ((int)(((byte)(98)))), ((int)(((byte)(0)))), ((int)(((byte)(238))))); + this.btnEAMUpdate.OnIdleState.BorderRadius = 5; + this.btnEAMUpdate.OnIdleState.BorderStyle = Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderStyles.Solid; + this.btnEAMUpdate.OnIdleState.BorderThickness = 1; + this.btnEAMUpdate.OnIdleState.FillColor = System.Drawing.Color.FromArgb(((int)(((byte)(175)))), ((int)(((byte)(98)))), ((int)(((byte)(0)))), ((int)(((byte)(238))))); + this.btnEAMUpdate.OnIdleState.ForeColor = System.Drawing.Color.White; + this.btnEAMUpdate.OnIdleState.IconLeftImage = global::ExaltAccountManager.Properties.Resources._2; + this.btnEAMUpdate.OnIdleState.IconRightImage = null; + this.btnEAMUpdate.OnPressedState.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(225)))), ((int)(((byte)(98)))), ((int)(((byte)(0)))), ((int)(((byte)(238))))); + this.btnEAMUpdate.OnPressedState.BorderRadius = 5; + this.btnEAMUpdate.OnPressedState.BorderStyle = Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderStyles.Solid; + this.btnEAMUpdate.OnPressedState.BorderThickness = 1; + this.btnEAMUpdate.OnPressedState.FillColor = System.Drawing.Color.FromArgb(((int)(((byte)(225)))), ((int)(((byte)(98)))), ((int)(((byte)(0)))), ((int)(((byte)(238))))); + this.btnEAMUpdate.OnPressedState.ForeColor = System.Drawing.Color.White; + this.btnEAMUpdate.OnPressedState.IconLeftImage = null; + this.btnEAMUpdate.OnPressedState.IconRightImage = null; + this.btnEAMUpdate.Size = new System.Drawing.Size(165, 31); + this.btnEAMUpdate.TabIndex = 25; + this.btnEAMUpdate.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.btnEAMUpdate.TextAlignment = System.Windows.Forms.HorizontalAlignment.Center; + this.btnEAMUpdate.TextMarginLeft = 0; + this.btnEAMUpdate.TextPadding = new System.Windows.Forms.Padding(13, 0, 15, 0); + this.toolTip.SetToolTip(this.btnEAMUpdate, ""); + this.toolTip.SetToolTipIcon(this.btnEAMUpdate, null); + this.toolTip.SetToolTipTitle(this.btnEAMUpdate, ""); + this.btnEAMUpdate.UseDefaultRadiusAndThickness = true; + this.btnEAMUpdate.Click += new System.EventHandler(this.btnEAMUpdate_Click); + // + // pSideBar + // + this.pSideBar.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(225)))), ((int)(((byte)(98)))), ((int)(((byte)(0)))), ((int)(((byte)(238))))); + this.pSideBar.Location = new System.Drawing.Point(0, 3); + this.pSideBar.Name = "pSideBar"; + this.pSideBar.Size = new System.Drawing.Size(5, 30); + this.pSideBar.TabIndex = 5; + this.pSideBar.TabStop = false; + this.toolTip.SetToolTip(this.pSideBar, ""); + this.toolTip.SetToolTipIcon(this.pSideBar, null); + this.toolTip.SetToolTipTitle(this.pSideBar, ""); + // + // btnAbout + // + this.btnAbout.Dock = System.Windows.Forms.DockStyle.Top; + this.btnAbout.FlatAppearance.BorderSize = 0; + this.btnAbout.FlatAppearance.MouseDownBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(225)))), ((int)(((byte)(98)))), ((int)(((byte)(0)))), ((int)(((byte)(238))))); + this.btnAbout.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(98)))), ((int)(((byte)(0)))), ((int)(((byte)(238))))); + this.btnAbout.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnAbout.Font = new System.Drawing.Font("Segoe UI", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnAbout.Image = global::ExaltAccountManager.Properties.Resources.ic_info_outline_black_24dp2; + this.btnAbout.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.btnAbout.Location = new System.Drawing.Point(0, 320); + this.btnAbout.Margin = new System.Windows.Forms.Padding(0); + this.btnAbout.Name = "btnAbout"; + this.btnAbout.Padding = new System.Windows.Forms.Padding(10, 0, 0, 0); + this.btnAbout.Size = new System.Drawing.Size(175, 40); + this.btnAbout.TabIndex = 8; + this.btnAbout.Text = " About EAM"; + this.btnAbout.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.btnAbout.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText; + this.toolTip.SetToolTip(this.btnAbout, ""); + this.toolTip.SetToolTipIcon(this.btnAbout, null); + this.toolTip.SetToolTipTitle(this.btnAbout, ""); + this.btnAbout.UseVisualStyleBackColor = true; + this.btnAbout.Click += new System.EventHandler(this.btnAbout_Click); + this.btnAbout.MouseEnter += new System.EventHandler(this.btnAbout_MouseEnter); + this.btnAbout.MouseLeave += new System.EventHandler(this.btnAbout_MouseLeave); + // + // btnLogs + // + this.btnLogs.Dock = System.Windows.Forms.DockStyle.Top; + this.btnLogs.FlatAppearance.BorderSize = 0; + this.btnLogs.FlatAppearance.MouseDownBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(225)))), ((int)(((byte)(98)))), ((int)(((byte)(0)))), ((int)(((byte)(238))))); + this.btnLogs.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(98)))), ((int)(((byte)(0)))), ((int)(((byte)(238))))); + this.btnLogs.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnLogs.Font = new System.Drawing.Font("Segoe UI", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnLogs.Image = global::ExaltAccountManager.Properties.Resources.activity_history_outline_24px; + this.btnLogs.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.btnLogs.Location = new System.Drawing.Point(0, 280); + this.btnLogs.Margin = new System.Windows.Forms.Padding(0); + this.btnLogs.Name = "btnLogs"; + this.btnLogs.Padding = new System.Windows.Forms.Padding(10, 0, 0, 0); + this.btnLogs.Size = new System.Drawing.Size(175, 40); + this.btnLogs.TabIndex = 7; + this.btnLogs.Text = " Logs"; + this.btnLogs.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.btnLogs.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText; + this.toolTip.SetToolTip(this.btnLogs, ""); + this.toolTip.SetToolTipIcon(this.btnLogs, null); + this.toolTip.SetToolTipTitle(this.btnLogs, ""); + this.btnLogs.UseVisualStyleBackColor = true; + this.btnLogs.Click += new System.EventHandler(this.btnLogs_Click); + this.btnLogs.MouseEnter += new System.EventHandler(this.btnLogs_MouseEnter); + this.btnLogs.MouseLeave += new System.EventHandler(this.btnLogs_MouseLeave); + // + // btnHelp + // + this.btnHelp.Dock = System.Windows.Forms.DockStyle.Top; + this.btnHelp.FlatAppearance.BorderSize = 0; + this.btnHelp.FlatAppearance.MouseDownBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(225)))), ((int)(((byte)(98)))), ((int)(((byte)(0)))), ((int)(((byte)(238))))); + this.btnHelp.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(98)))), ((int)(((byte)(0)))), ((int)(((byte)(238))))); + this.btnHelp.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnHelp.Font = new System.Drawing.Font("Segoe UI", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnHelp.Image = global::ExaltAccountManager.Properties.Resources.ic_help_outline_black_24dp; + this.btnHelp.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.btnHelp.Location = new System.Drawing.Point(0, 240); + this.btnHelp.Margin = new System.Windows.Forms.Padding(0); + this.btnHelp.Name = "btnHelp"; + this.btnHelp.Padding = new System.Windows.Forms.Padding(10, 0, 0, 0); + this.btnHelp.Size = new System.Drawing.Size(175, 40); + this.btnHelp.TabIndex = 6; + this.btnHelp.Text = " Help"; + this.btnHelp.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.btnHelp.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText; + this.toolTip.SetToolTip(this.btnHelp, ""); + this.toolTip.SetToolTipIcon(this.btnHelp, null); + this.toolTip.SetToolTipTitle(this.btnHelp, ""); + this.btnHelp.UseVisualStyleBackColor = true; + this.btnHelp.Click += new System.EventHandler(this.btnHelp_Click); + this.btnHelp.MouseEnter += new System.EventHandler(this.btnHelp_MouseEnter); + this.btnHelp.MouseLeave += new System.EventHandler(this.btnHelp_MouseLeave); + // + // btnOptions + // + this.btnOptions.Dock = System.Windows.Forms.DockStyle.Top; + this.btnOptions.FlatAppearance.BorderSize = 0; + this.btnOptions.FlatAppearance.MouseDownBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(225)))), ((int)(((byte)(98)))), ((int)(((byte)(0)))), ((int)(((byte)(238))))); + this.btnOptions.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(98)))), ((int)(((byte)(0)))), ((int)(((byte)(238))))); + this.btnOptions.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnOptions.Font = new System.Drawing.Font("Segoe UI", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnOptions.Image = global::ExaltAccountManager.Properties.Resources.settings_outline_24px; + this.btnOptions.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.btnOptions.Location = new System.Drawing.Point(0, 200); + this.btnOptions.Margin = new System.Windows.Forms.Padding(0); + this.btnOptions.Name = "btnOptions"; + this.btnOptions.Padding = new System.Windows.Forms.Padding(10, 0, 0, 0); + this.btnOptions.Size = new System.Drawing.Size(175, 40); + this.btnOptions.TabIndex = 5; + this.btnOptions.Text = " Options"; + this.btnOptions.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.btnOptions.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText; + this.toolTip.SetToolTip(this.btnOptions, ""); + this.toolTip.SetToolTipIcon(this.btnOptions, null); + this.toolTip.SetToolTipTitle(this.btnOptions, ""); + this.btnOptions.UseVisualStyleBackColor = true; + this.btnOptions.Click += new System.EventHandler(this.btnOptions_Click); + this.btnOptions.Paint += new System.Windows.Forms.PaintEventHandler(this.btnOptions_Paint); + this.btnOptions.MouseEnter += new System.EventHandler(this.btnOptions_MouseEnter); + this.btnOptions.MouseLeave += new System.EventHandler(this.btnOptions_MouseLeave); + // + // btnModules + // + this.btnModules.Dock = System.Windows.Forms.DockStyle.Top; + this.btnModules.FlatAppearance.BorderSize = 0; + this.btnModules.FlatAppearance.MouseDownBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(225)))), ((int)(((byte)(98)))), ((int)(((byte)(0)))), ((int)(((byte)(238))))); + this.btnModules.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(98)))), ((int)(((byte)(0)))), ((int)(((byte)(238))))); + this.btnModules.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnModules.Font = new System.Drawing.Font("Segoe UI", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnModules.Image = global::ExaltAccountManager.Properties.Resources.dashboard_layout_outline_24px; + this.btnModules.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.btnModules.Location = new System.Drawing.Point(0, 160); + this.btnModules.Margin = new System.Windows.Forms.Padding(0); + this.btnModules.Name = "btnModules"; + this.btnModules.Padding = new System.Windows.Forms.Padding(10, 0, 0, 0); + this.btnModules.Size = new System.Drawing.Size(175, 40); + this.btnModules.TabIndex = 4; + this.btnModules.Text = " Modules"; + this.btnModules.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.btnModules.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText; + this.toolTip.SetToolTip(this.btnModules, ""); + this.toolTip.SetToolTipIcon(this.btnModules, null); + this.toolTip.SetToolTipTitle(this.btnModules, ""); + this.btnModules.UseVisualStyleBackColor = true; + this.btnModules.Click += new System.EventHandler(this.btnModules_Click); + this.btnModules.MouseEnter += new System.EventHandler(this.btnModules_MouseEnter); + this.btnModules.MouseLeave += new System.EventHandler(this.btnModules_MouseLeave); + // + // btnAddAccount + // + this.btnAddAccount.Dock = System.Windows.Forms.DockStyle.Top; + this.btnAddAccount.FlatAppearance.BorderSize = 0; + this.btnAddAccount.FlatAppearance.MouseDownBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(225)))), ((int)(((byte)(98)))), ((int)(((byte)(0)))), ((int)(((byte)(238))))); + this.btnAddAccount.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(98)))), ((int)(((byte)(0)))), ((int)(((byte)(238))))); + this.btnAddAccount.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnAddAccount.Font = new System.Drawing.Font("Segoe UI", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnAddAccount.Image = global::ExaltAccountManager.Properties.Resources.add_user_outline_24px; + this.btnAddAccount.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.btnAddAccount.Location = new System.Drawing.Point(0, 120); + this.btnAddAccount.Margin = new System.Windows.Forms.Padding(0); + this.btnAddAccount.Name = "btnAddAccount"; + this.btnAddAccount.Padding = new System.Windows.Forms.Padding(10, 0, 0, 0); + this.btnAddAccount.Size = new System.Drawing.Size(175, 40); + this.btnAddAccount.TabIndex = 3; + this.btnAddAccount.Text = " Add Account"; + this.btnAddAccount.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.btnAddAccount.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText; + this.toolTip.SetToolTip(this.btnAddAccount, ""); + this.toolTip.SetToolTipIcon(this.btnAddAccount, null); + this.toolTip.SetToolTipTitle(this.btnAddAccount, ""); + this.btnAddAccount.UseVisualStyleBackColor = true; + this.btnAddAccount.Click += new System.EventHandler(this.btnAddAccount_Click); + this.btnAddAccount.MouseEnter += new System.EventHandler(this.btnAddAccount_MouseEnter); + this.btnAddAccount.MouseLeave += new System.EventHandler(this.btnAddAccount_MouseLeave); + // + // btnNews + // + this.btnNews.Dock = System.Windows.Forms.DockStyle.Top; + this.btnNews.FlatAppearance.BorderSize = 0; + this.btnNews.FlatAppearance.MouseDownBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(225)))), ((int)(((byte)(98)))), ((int)(((byte)(0)))), ((int)(((byte)(238))))); + this.btnNews.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(98)))), ((int)(((byte)(0)))), ((int)(((byte)(238))))); + this.btnNews.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnNews.Font = new System.Drawing.Font("Segoe UI", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnNews.Image = global::ExaltAccountManager.Properties.Resources.news_outline_black_24px; + this.btnNews.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.btnNews.Location = new System.Drawing.Point(0, 80); + this.btnNews.Margin = new System.Windows.Forms.Padding(0); + this.btnNews.Name = "btnNews"; + this.btnNews.Padding = new System.Windows.Forms.Padding(10, 0, 0, 0); + this.btnNews.Size = new System.Drawing.Size(175, 40); + this.btnNews.TabIndex = 27; + this.btnNews.Text = " News"; + this.btnNews.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.btnNews.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText; + this.toolTip.SetToolTip(this.btnNews, ""); + this.toolTip.SetToolTipIcon(this.btnNews, null); + this.toolTip.SetToolTipTitle(this.btnNews, ""); + this.btnNews.UseVisualStyleBackColor = true; + this.btnNews.Click += new System.EventHandler(this.btnNews_Click); + this.btnNews.Paint += new System.Windows.Forms.PaintEventHandler(this.btnNews_Paint); + this.btnNews.MouseEnter += new System.EventHandler(this.btnNews_MouseEnter); + this.btnNews.MouseLeave += new System.EventHandler(this.btnNews_MouseLeave); + // + // btnAccounts + // + this.btnAccounts.Dock = System.Windows.Forms.DockStyle.Top; + this.btnAccounts.FlatAppearance.BorderSize = 0; + this.btnAccounts.FlatAppearance.MouseDownBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(225)))), ((int)(((byte)(98)))), ((int)(((byte)(0)))), ((int)(((byte)(238))))); + this.btnAccounts.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(98)))), ((int)(((byte)(0)))), ((int)(((byte)(238))))); + this.btnAccounts.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnAccounts.Font = new System.Drawing.Font("Segoe UI", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnAccounts.Image = global::ExaltAccountManager.Properties.Resources.ic_people_outline_black_24dp; + this.btnAccounts.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.btnAccounts.Location = new System.Drawing.Point(0, 40); + this.btnAccounts.Margin = new System.Windows.Forms.Padding(0); + this.btnAccounts.Name = "btnAccounts"; + this.btnAccounts.Padding = new System.Windows.Forms.Padding(10, 0, 0, 0); + this.btnAccounts.Size = new System.Drawing.Size(175, 40); + this.btnAccounts.TabIndex = 2; + this.btnAccounts.Text = " Accounts"; + this.btnAccounts.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.btnAccounts.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText; + this.toolTip.SetToolTip(this.btnAccounts, ""); + this.toolTip.SetToolTipIcon(this.btnAccounts, null); + this.toolTip.SetToolTipTitle(this.btnAccounts, ""); + this.btnAccounts.UseVisualStyleBackColor = true; + this.btnAccounts.Click += new System.EventHandler(this.btnAccounts_Click); + this.btnAccounts.MouseEnter += new System.EventHandler(this.btnAccounts_MouseEnter); + this.btnAccounts.MouseLeave += new System.EventHandler(this.btnAccounts_MouseLeave); + // + // btnGameUpdater + // + this.btnGameUpdater.Dock = System.Windows.Forms.DockStyle.Top; + this.btnGameUpdater.FlatAppearance.BorderSize = 0; + this.btnGameUpdater.FlatAppearance.MouseDownBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(225)))), ((int)(((byte)(98)))), ((int)(((byte)(0)))), ((int)(((byte)(238))))); + this.btnGameUpdater.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(98)))), ((int)(((byte)(0)))), ((int)(((byte)(238))))); + this.btnGameUpdater.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnGameUpdater.Font = new System.Drawing.Font("Segoe UI", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnGameUpdater.Image = global::ExaltAccountManager.Properties.Resources.update_left_rotation_24px; + this.btnGameUpdater.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.btnGameUpdater.Location = new System.Drawing.Point(0, 0); + this.btnGameUpdater.Margin = new System.Windows.Forms.Padding(0); + this.btnGameUpdater.Name = "btnGameUpdater"; + this.btnGameUpdater.Padding = new System.Windows.Forms.Padding(10, 0, 0, 0); + this.btnGameUpdater.Size = new System.Drawing.Size(175, 40); + this.btnGameUpdater.TabIndex = 1; + this.btnGameUpdater.Text = " Game Updater"; + this.btnGameUpdater.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.btnGameUpdater.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText; + this.toolTip.SetToolTip(this.btnGameUpdater, ""); + this.toolTip.SetToolTipIcon(this.btnGameUpdater, null); + this.toolTip.SetToolTipTitle(this.btnGameUpdater, ""); + this.btnGameUpdater.UseVisualStyleBackColor = true; + this.btnGameUpdater.Visible = false; + this.btnGameUpdater.Click += new System.EventHandler(this.btnGameUpdater_Click); + this.btnGameUpdater.MouseEnter += new System.EventHandler(this.btnGameUpdater_MouseEnter); + this.btnGameUpdater.MouseLeave += new System.EventHandler(this.btnGameUpdater_MouseLeave); + // + // pbHeader + // + this.pbHeader.Image = global::ExaltAccountManager.Properties.Resources.logo; + this.pbHeader.Location = new System.Drawing.Point(8, 8); + this.pbHeader.Name = "pbHeader"; + this.pbHeader.Size = new System.Drawing.Size(48, 48); + this.pbHeader.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; + this.pbHeader.TabIndex = 6; + this.pbHeader.TabStop = false; + this.toolTip.SetToolTip(this.pbHeader, ""); + this.toolTip.SetToolTipIcon(this.pbHeader, null); + this.toolTip.SetToolTipTitle(this.pbHeader, ""); + // + // pbShowDiscordUser + // + this.pbShowDiscordUser.Image = global::ExaltAccountManager.Properties.Resources.male_user_outline_black_24px; + this.pbShowDiscordUser.Location = new System.Drawing.Point(497, 0); + this.pbShowDiscordUser.Name = "pbShowDiscordUser"; + this.pbShowDiscordUser.Size = new System.Drawing.Size(28, 24); + this.pbShowDiscordUser.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage; + this.pbShowDiscordUser.TabIndex = 11; + this.pbShowDiscordUser.TabStop = false; + this.toolTip.SetToolTip(this.pbShowDiscordUser, ""); + this.toolTip.SetToolTipIcon(this.pbShowDiscordUser, null); + this.toolTip.SetToolTipTitle(this.pbShowDiscordUser, ""); + this.pbShowDiscordUser.Visible = false; + this.pbShowDiscordUser.Click += new System.EventHandler(this.pbShowDiscordUser_Click); + this.pbShowDiscordUser.MouseDown += new System.Windows.Forms.MouseEventHandler(this.pbShowDiscordUser_MouseDown); + this.pbShowDiscordUser.MouseEnter += new System.EventHandler(this.pbShowDiscordUser_MouseEnter); + this.pbShowDiscordUser.MouseLeave += new System.EventHandler(this.pbShowDiscordUser_MouseLeave); + this.pbShowDiscordUser.MouseUp += new System.Windows.Forms.MouseEventHandler(this.pbShowDiscordUser_MouseUp); + // + // FrmMain + // + this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 17F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.White; + this.ClientSize = new System.Drawing.Size(853, 576); + this.Controls.Add(this.pContent); + this.Controls.Add(this.pTop); + this.Controls.Add(this.pLeftSide); + this.DoubleBuffered = true; this.Font = new System.Drawing.Font("Segoe UI Semibold", 9.75F, System.Drawing.FontStyle.Bold); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); @@ -845,13 +864,14 @@ private void InitializeComponent() this.pUpdate.ResumeLayout(false); this.pBottom.ResumeLayout(false); this.pBottom.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.pSideBar)).EndInit(); this.pHeader.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.pbHeader)).EndInit(); this.pTop.ResumeLayout(false); this.pTop.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.pbMinimize)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.pbClose)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.pSideBar)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.pbHeader)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.pbShowDiscordUser)).EndInit(); this.ResumeLayout(false); } @@ -890,5 +910,6 @@ private void InitializeComponent() private System.Windows.Forms.Panel pUpdate; private System.Windows.Forms.Timer timerDiscordUpdater; private System.Windows.Forms.Button btnNews; + private System.Windows.Forms.PictureBox pbShowDiscordUser; } } \ No newline at end of file diff --git a/ExaltAccountManager/FrmMain.cs b/ExaltAccountManager/FrmMain.cs index 96b57447..05ce2e5d 100644 --- a/ExaltAccountManager/FrmMain.cs +++ b/ExaltAccountManager/FrmMain.cs @@ -107,7 +107,30 @@ public bool HasNewNews } private bool hasNewNews = false; public DateTime LastNewsViewed { get; internal set; } = DateTime.MinValue; - public DiscordUser DiscordUser { get; internal set; } = null; + public DiscordUser DiscordUser + { + get => discordUser; + internal set + { + discordUser = value; + + DiscordUserChanged(); + + + bool DiscordUserChanged() + { + if (this.InvokeRequired) + return (bool)this.Invoke((Func)DiscordUserChanged); + + pbShowDiscordUser.Visible = discordUser != null; + + return false; + } + } + } + private DiscordUser discordUser = null; + + private bool hasDiscordUserUiOpen = false; private GameUpdater gameUpdater { get; set; } @@ -571,6 +594,7 @@ private void DiscordHelper_OnDiscordConnectionChanged(object sender, bool isConn } DiscordUser = task.Result; + if (!hasDiscordUser && DiscordUser != null && DiscordUser.DiscordUserId.Equals("NotFound")) { //No discord user found @@ -767,11 +791,12 @@ public void ApplyTheme(object sender, EventArgs e) Color font = ColorScheme.GetColorFont(useDarkmode); this.BackColor = pContent.BackColor = def; - pSideButtons.BackColor = pTop.BackColor = pbClose.BackColor = pbMinimize.BackColor = second; + pSideButtons.BackColor = pTop.BackColor = pbClose.BackColor = pbMinimize.BackColor = pbShowDiscordUser.BackColor = second; this.ForeColor = font; pbClose.Image = useDarkmode ? Properties.Resources.ic_close_white_24dp : Properties.Resources.ic_close_black_24dp; pbMinimize.Image = UseDarkmode ? Properties.Resources.baseline_minimize_white_24dp : Properties.Resources.baseline_minimize_black_24dp; + pbShowDiscordUser.Image = UseDarkmode ? Properties.Resources.male_user_outline_white_24px : Properties.Resources.male_user_outline_black_24px; if (gameUpdater != null && GameUpdater.Instance.UpdateRequired) lVersion.ForeColor = UseDarkmode ? Color.Orange : Color.DarkOrange; @@ -1508,6 +1533,34 @@ private void pbClose_MouseLeave(object sender, EventArgs e) #endregion + #region Button Discord User + + private void pbShowDiscordUser_Click(object sender, EventArgs e) + { + if (hasDiscordUserUiOpen) + return; + + hasDiscordUserUiOpen = true; + ShowShadowForm(new EleDiscordUser(this)); + } + + private void pbShowDiscordUser_MouseDown(object sender, MouseEventArgs e) => pbShowDiscordUser.BackColor = UseDarkmode ? Color.FromArgb(200, 75, 75, 75) : Color.FromArgb(75, 50, 50, 50); + private void pbShowDiscordUser_MouseUp(object sender, MouseEventArgs e) => pbShowDiscordUser.BackColor = UseDarkmode ? Color.FromArgb(125, 75, 75, 75) : Color.FromArgb(50, 50, 50, 50); + + private void pbShowDiscordUser_MouseEnter(object sender, EventArgs e) + { + pbShowDiscordUser.Image = UseDarkmode ? Properties.Resources.male_user_white_24px : Properties.Resources.male_user_black_24px; + pbShowDiscordUser.BackColor = UseDarkmode ? Color.FromArgb(125, 75, 75, 75) : Color.FromArgb(50, 50, 50, 50); + } + + private void pbShowDiscordUser_MouseLeave(object sender, EventArgs e) + { + pbShowDiscordUser.Image = UseDarkmode ? Properties.Resources.male_user_outline_white_24px : Properties.Resources.male_user_outline_black_24px; + pbShowDiscordUser.BackColor = pTop.BackColor; + } + + #endregion + #region Menu Buttons private void btnAccounts_Click(object sender, EventArgs e) @@ -2024,6 +2077,8 @@ public void RemoveShadowForm() if (uiState == UIState.Updater && GameUpdater.Instance.UpdateProgress > 0) return; + hasDiscordUserUiOpen = false; + if (frmShadowHost != null) { frmShadowHost.RemoveControl(); @@ -2206,6 +2261,6 @@ private void btnNews_Paint(object sender, PaintEventArgs e) { e.Graphics.FillEllipse(pColor.Brush, 33f, 26f, 9f, 9f); } - } + } } } diff --git a/ExaltAccountManager/Properties/Resources.Designer.cs b/ExaltAccountManager/Properties/Resources.Designer.cs index 27700996..5dbd888d 100644 --- a/ExaltAccountManager/Properties/Resources.Designer.cs +++ b/ExaltAccountManager/Properties/Resources.Designer.cs @@ -2570,6 +2570,46 @@ internal static System.Drawing.Bitmap maintenance2_white_48px { } } + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap male_user_black_24px { + get { + object obj = ResourceManager.GetObject("male_user_black_24px", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap male_user_outline_black_24px { + get { + object obj = ResourceManager.GetObject("male_user_outline_black_24px", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap male_user_outline_white_24px { + get { + object obj = ResourceManager.GetObject("male_user_outline_white_24px", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap male_user_white_24px { + get { + object obj = ResourceManager.GetObject("male_user_white_24px", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// diff --git a/ExaltAccountManager/Properties/Resources.resx b/ExaltAccountManager/Properties/Resources.resx index ac8d631c..ec50f85d 100644 --- a/ExaltAccountManager/Properties/Resources.resx +++ b/ExaltAccountManager/Properties/Resources.resx @@ -1195,4 +1195,16 @@ ..\Resources\privacy_policy_white_24px.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\male_user_black_24px.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\male_user_outline_black_24px.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\male_user_outline_white_24px.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\male_user_white_24px.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + \ No newline at end of file diff --git a/ExaltAccountManager/Resources/male_user_black_24px.png b/ExaltAccountManager/Resources/male_user_black_24px.png new file mode 100644 index 0000000000000000000000000000000000000000..2450ba57e53e8a4d53a47e9f9da0711296d03b33 GIT binary patch literal 518 zcmV+h0{Q)kP)HTUQ!gQ18u6gO&oR!ksE$Le zn!uyXAhB|8`E zu0`5T`hm|teo{4rPz^^vd$XMGgL4+}uDV0lfi6BuPP#^@gFSgi9)_e_1m_&!V{okc zscwM_Jj9cF2yT=0CRxny$rVU?M6kYz_d%Pcs5syQ?xI+xs~oL2@c}pkpTOEMp5%6= zXEK?JJt^RB4;G$t@ULQ-D%mjv7mTrxQ|%YQxmZYRnGf-=xybdy%Aeo`R*3eRxR`wo z70&bW?XtI#FQ&Xluz3#uTW(XGqJ44k{Pxhwbe^OA&v=`@P_a3PcTzPJUsFyC>Ux1r zTU1z~?W{h#>j` z$peT4ufZ1(gm@F;BZ!J$D55Lo0TPHNK|{9v{b#$H9$DS>=<@$nRaaH_%+B=o=5kN{ zlRWeVoO6xTCt(cUKpRLuF+1=TR+A*T#y?IhJ^|;h`lm?Cc+IQRoQEYa?GwyF0opyU z@$+y9rq2ZVsu!YZ5u|I(41`I_Vd|_v{1PNB z+(^&_-$Ck$`t-Q$ooMH!rLYjAQIM9|b|nQKyG!TCa&fG2jyeAcmO-+$6qn(4^wn^# zube4c5(#XBbb%2#r}tnNPn$_+xu!=5wi*Fu*Ny`_`gghJ`LRh%^N}l$GJ8x00000NkvXXu0mjfZ>ux; literal 0 HcmV?d00001 diff --git a/ExaltAccountManager/Resources/male_user_white_24px.png b/ExaltAccountManager/Resources/male_user_white_24px.png new file mode 100644 index 0000000000000000000000000000000000000000..4e38c21977980c874882f49bac5d96ef1c3e65ce GIT binary patch literal 557 zcmV+|0@D47P)`Kts?c^O7GH;wZe5C4*4kbja}18bq>|RUq|GHuIM#9_Oh*vZ zBY}A*nf?MiK~RT|$JpXdLr^~irh^H@WTvh3%f?j*fL>x*wTpnzLp~5P6M&nbF zkvtrBMweaJsx(bPg-g_vW||vgiB<56UC+U!D#1CwTPb344l+kKq_d!35(*((BOnJF zJme_9`?FfkPOMd?KL}BJQMHm#(WT7GH!PNJsp@#oqaF%13DsV4FWkH6YkRqEx!kq9 zcaSG_0=)WQkb`Tb)D66WT-_*b5*C$G@~s-8_3G9;u=||BCOE3l*?|FjGNKX>?7}BF zl1=?t%=E%Dh)(>otw$uCf~Y{%W6WT}`BZ$-Uox5uLA)yx`;C>F^l$|~*LTFWU=rfc4^yxW_uwc?r|HFnw!{1n2Ug%)=LY$9L9 v4C7@;!Z?VERPxwf(O&Y_cK(-1;{VVu!-t#m%TS#!00000NkvXXu0mjfj;8sz literal 0 HcmV?d00001 diff --git a/ExaltAccountManager/UI/Elements/EleAnalyticsSettings.cs b/ExaltAccountManager/UI/Elements/EleAnalyticsSettings.cs index 0cdb2ec7..7f0494e9 100644 --- a/ExaltAccountManager/UI/Elements/EleAnalyticsSettings.cs +++ b/ExaltAccountManager/UI/Elements/EleAnalyticsSettings.cs @@ -116,6 +116,7 @@ private void btnRequestData_Click(object sender, EventArgs e) await Task.Delay(50, token); } + MK_EAM_Analytics.Response.Data.User result = task.Result; if (result != null) { diff --git a/ExaltAccountManager/UI/Elements/EleDiscordUser.Designer.cs b/ExaltAccountManager/UI/Elements/EleDiscordUser.Designer.cs new file mode 100644 index 00000000..c1424397 --- /dev/null +++ b/ExaltAccountManager/UI/Elements/EleDiscordUser.Designer.cs @@ -0,0 +1,169 @@ +namespace ExaltAccountManager.UI.Elements +{ + partial class EleDiscordUser + { + /// + /// Erforderliche Designervariable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Verwendete Ressourcen bereinigen. + /// + /// True, wenn verwaltete Ressourcen gelöscht werden sollen; andernfalls False. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Vom Komponenten-Designer generierter Code + + /// + /// Erforderliche Methode für die Designerunterstützung. + /// Der Inhalt der Methode darf nicht mit dem Code-Editor geändert werden. + /// + private void InitializeComponent() + { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(EleDiscordUser)); + this.shadow = new Bunifu.UI.WinForms.BunifuShadowPanel(); + this.spacerQuestion = new Bunifu.UI.WinForms.BunifuSeparator(); + this.pbClose = new Bunifu.UI.WinForms.BunifuPictureBox(); + this.lHeadlines = new System.Windows.Forms.Label(); + this.lQuestion = new System.Windows.Forms.Label(); + this.lValues = new System.Windows.Forms.Label(); + this.shadow.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.pbClose)).BeginInit(); + this.SuspendLayout(); + // + // shadow + // + this.shadow.BackColor = System.Drawing.Color.White; + this.shadow.BorderColor = System.Drawing.Color.WhiteSmoke; + this.shadow.BorderRadius = 9; + this.shadow.BorderThickness = 1; + this.shadow.Controls.Add(this.lValues); + this.shadow.Controls.Add(this.spacerQuestion); + this.shadow.Controls.Add(this.pbClose); + this.shadow.Controls.Add(this.lHeadlines); + this.shadow.Controls.Add(this.lQuestion); + this.shadow.Dock = System.Windows.Forms.DockStyle.Fill; + this.shadow.FillStyle = Bunifu.UI.WinForms.BunifuShadowPanel.FillStyles.Solid; + this.shadow.GradientMode = Bunifu.UI.WinForms.BunifuShadowPanel.GradientModes.Vertical; + this.shadow.Location = new System.Drawing.Point(0, 0); + this.shadow.Margin = new System.Windows.Forms.Padding(0); + this.shadow.Name = "shadow"; + this.shadow.PanelColor = System.Drawing.Color.White; + this.shadow.PanelColor2 = System.Drawing.Color.White; + this.shadow.ShadowColor = System.Drawing.Color.DarkGray; + this.shadow.ShadowDept = 2; + this.shadow.ShadowDepth = 4; + this.shadow.ShadowStyle = Bunifu.UI.WinForms.BunifuShadowPanel.ShadowStyles.Surrounded; + this.shadow.ShadowTopLeftVisible = false; + this.shadow.Size = new System.Drawing.Size(500, 183); + this.shadow.Style = Bunifu.UI.WinForms.BunifuShadowPanel.BevelStyles.Flat; + this.shadow.TabIndex = 16; + // + // spacerQuestion + // + this.spacerQuestion.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.spacerQuestion.BackColor = System.Drawing.Color.Transparent; + this.spacerQuestion.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("spacerQuestion.BackgroundImage"))); + this.spacerQuestion.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.spacerQuestion.DashCap = Bunifu.UI.WinForms.BunifuSeparator.CapStyles.Flat; + this.spacerQuestion.LineColor = System.Drawing.Color.Silver; + this.spacerQuestion.LineStyle = Bunifu.UI.WinForms.BunifuSeparator.LineStyles.Solid; + this.spacerQuestion.LineThickness = 1; + this.spacerQuestion.Location = new System.Drawing.Point(16, 36); + this.spacerQuestion.Margin = new System.Windows.Forms.Padding(5); + this.spacerQuestion.Name = "spacerQuestion"; + this.spacerQuestion.Orientation = Bunifu.UI.WinForms.BunifuSeparator.LineOrientation.Horizontal; + this.spacerQuestion.Size = new System.Drawing.Size(468, 10); + this.spacerQuestion.TabIndex = 13; + // + // pbClose + // + this.pbClose.AllowFocused = false; + this.pbClose.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.pbClose.AutoSizeHeight = true; + this.pbClose.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(240)))), ((int)(((byte)(240)))), ((int)(((byte)(240))))); + this.pbClose.BorderRadius = 9; + this.pbClose.Image = global::ExaltAccountManager.Properties.Resources.ic_close_black_18dp; + this.pbClose.IsCircle = true; + this.pbClose.Location = new System.Drawing.Point(473, 9); + this.pbClose.Name = "pbClose"; + this.pbClose.Size = new System.Drawing.Size(18, 18); + this.pbClose.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage; + this.pbClose.TabIndex = 25; + this.pbClose.TabStop = false; + this.pbClose.Type = Bunifu.UI.WinForms.BunifuPictureBox.Types.Circle; + this.pbClose.Click += new System.EventHandler(this.pbClose_Click); + this.pbClose.MouseDown += new System.Windows.Forms.MouseEventHandler(this.pbClose_MouseDown); + this.pbClose.MouseEnter += new System.EventHandler(this.pbClose_MouseEnter); + this.pbClose.MouseLeave += new System.EventHandler(this.pbClose_MouseLeave); + // + // lHeadlines + // + this.lHeadlines.AutoSize = true; + this.lHeadlines.Font = new System.Drawing.Font("Segoe UI Semibold", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lHeadlines.Location = new System.Drawing.Point(12, 50); + this.lHeadlines.MaximumSize = new System.Drawing.Size(476, 0); + this.lHeadlines.Name = "lHeadlines"; + this.lHeadlines.Size = new System.Drawing.Size(180, 120); + this.lHeadlines.TabIndex = 17; + this.lHeadlines.Text = "Amount of Accounts\r\nAmount of EAM-Sessions\r\nFirst seen\r\nEAM runtime\r\nDiscord User" + + " ID\r\nSecret Found "; + // + // lQuestion + // + this.lQuestion.AutoSize = true; + this.lQuestion.Font = new System.Drawing.Font("Segoe UI Semibold", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lQuestion.Location = new System.Drawing.Point(12, 12); + this.lQuestion.MaximumSize = new System.Drawing.Size(468, 0); + this.lQuestion.Name = "lQuestion"; + this.lQuestion.Size = new System.Drawing.Size(139, 25); + this.lQuestion.TabIndex = 12; + this.lQuestion.Text = "EAM User data"; + this.lQuestion.UseMnemonic = false; + // + // lValues + // + this.lValues.AutoSize = true; + this.lValues.Font = new System.Drawing.Font("Segoe UI", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lValues.Location = new System.Drawing.Point(198, 50); + this.lValues.MaximumSize = new System.Drawing.Size(476, 0); + this.lValues.Name = "lValues"; + this.lValues.Size = new System.Drawing.Size(0, 20); + this.lValues.TabIndex = 26; + // + // EleDiscordUser + // + this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 17F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.White; + this.Controls.Add(this.shadow); + this.Font = new System.Drawing.Font("Segoe UI Semibold", 9.75F, System.Drawing.FontStyle.Bold); + this.Margin = new System.Windows.Forms.Padding(4); + this.Name = "EleDiscordUser"; + this.Size = new System.Drawing.Size(500, 183); + this.shadow.ResumeLayout(false); + this.shadow.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.pbClose)).EndInit(); + this.ResumeLayout(false); + + } + + #endregion + + private Bunifu.UI.WinForms.BunifuShadowPanel shadow; + private System.Windows.Forms.Label lHeadlines; + private System.Windows.Forms.Label lQuestion; + private Bunifu.UI.WinForms.BunifuSeparator spacerQuestion; + private Bunifu.UI.WinForms.BunifuPictureBox pbClose; + private System.Windows.Forms.Label lValues; + } +} diff --git a/ExaltAccountManager/UI/Elements/EleDiscordUser.cs b/ExaltAccountManager/UI/Elements/EleDiscordUser.cs new file mode 100644 index 00000000..a056e061 --- /dev/null +++ b/ExaltAccountManager/UI/Elements/EleDiscordUser.cs @@ -0,0 +1,87 @@ +using System; +using System.Drawing; +using System.Windows.Forms; + +namespace ExaltAccountManager.UI.Elements +{ + public sealed partial class EleDiscordUser : UserControl, IDisposeOfControl + { + private FrmMain frm; + + public bool DisposeOfControl => true; + + public EleDiscordUser(FrmMain _frm) + { + InitializeComponent(); + frm = _frm; + + frm.ThemeChanged += ApplyTheme; + this.Disposed += (object sender, EventArgs e) => + { + frm.ThemeChanged -= ApplyTheme; + }; + + ApplyTheme(frm, null); + + LoadUI(); + } + + public void ApplyTheme(object sender, EventArgs e) + { + Color def = ColorScheme.GetColorDef(frm.UseDarkmode); + Color second = ColorScheme.GetColorSecond(frm.UseDarkmode); + Color third = ColorScheme.GetColorThird(frm.UseDarkmode); + Color font = ColorScheme.GetColorFont(frm.UseDarkmode); + + this.BackColor = def; + this.ForeColor = font; + + pbClose.BackColor = frm.UseDarkmode ? second : third; + pbClose.Image = frm.UseDarkmode ? Properties.Resources.ic_close_white_18dp : Properties.Resources.ic_close_black_18dp; + + shadow.PanelColor = shadow.BackColor = shadow.PanelColor2 = def; + shadow.BorderColor = shadow.BorderColor = second; + shadow.ShadowColor = shadow.ShadowColor = frm.UseDarkmode ? Color.FromArgb(45, 20, 20, 20) : Color.FromArgb(25, 0, 0, 0); + } + + private void LoadUI() + { + if (frm == null || frm.DiscordUser == null) + { + pbClose_Click(pbClose, EventArgs.Empty); + return; + } + + lValues.Text = $"{frm.DiscordUser.AmountOfAccounts}{Environment.NewLine}" + + $"{frm.DiscordUser.AmountOfSessions}{Environment.NewLine}" + + $"{frm.DiscordUser.FirstSeen.ToString("dd.MM.yyyy HH:mm")}{Environment.NewLine}" + + $"{(int)(frm.DiscordUser.minutesOfEamUseTime / 60)}h {frm.DiscordUser.minutesOfEamUseTime % 60}m{Environment.NewLine}" + + $"{frm.DiscordUser.DiscordUserId}{Environment.NewLine}" + + $"{(frm.DiscordUser.EasterEggFound ? "Yeah!" : "No:(")} {Environment.NewLine}"; + } + + #region Button Close + + private void pbClose_Click(object sender, EventArgs e) + { + frm.RemoveShadowForm(); + this.Dispose(); + } + + private void pbClose_MouseEnter(object sender, EventArgs e) + { + pbClose.BackColor = Color.Crimson; + pbClose.Image = Properties.Resources.ic_close_white_18dp; + } + + private void pbClose_MouseLeave(object sender, EventArgs e) + { + pbClose.BackColor = frm.UseDarkmode ? ColorScheme.GetColorSecond(frm.UseDarkmode) : ColorScheme.GetColorThird(frm.UseDarkmode); + pbClose.Image = frm.UseDarkmode ? Properties.Resources.ic_close_white_18dp : Properties.Resources.ic_close_black_18dp; + } + + private void pbClose_MouseDown(object sender, MouseEventArgs e) => pbClose.BackColor = Color.Red; + + #endregion + } +} diff --git a/ExaltAccountManager/UI/Elements/EleDiscordUser.resx b/ExaltAccountManager/UI/Elements/EleDiscordUser.resx new file mode 100644 index 00000000..f38d6dce --- /dev/null +++ b/ExaltAccountManager/UI/Elements/EleDiscordUser.resx @@ -0,0 +1,128 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + + + + iVBORw0KGgoAAAANSUhEUgAAAdQAAAAKCAYAAAANZK+HAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAA3SURBVHhe7dUxEQAwDAMx80dlZs0SBuko3T2GDwAAAAAA + AAAAwFdtnyRJurVbBQAAAAAAACDJAAPi73ijP5bxAAAAAElFTkSuQmCC + + + \ No newline at end of file From 4f0e9b6603301d5f8bdeac2de6f77fcb04e1f597 Mon Sep 17 00:00:00 2001 From: MaikEight Date: Sun, 28 May 2023 04:59:53 +0200 Subject: [PATCH 25/40] =?UTF-8?q?=E2=9A=A1=EF=B8=8F=20Improved=20performan?= =?UTF-8?q?ce=20of=20item=20parsing=20by=20about=2030x=20=F0=9F=90=9B=20Fi?= =?UTF-8?q?xed=20the=20renders=20and=20items=20file=20location?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- EAM Vault Peeker/FrmMain.cs | 40 +++++++++++++++++++++++++---------- Libraries/MK_EAM_Lib/Item.cs | 41 ++++++++++++++++++++++++------------ 2 files changed, 57 insertions(+), 24 deletions(-) diff --git a/EAM Vault Peeker/FrmMain.cs b/EAM Vault Peeker/FrmMain.cs index 02fd7f28..b861db97 100644 --- a/EAM Vault Peeker/FrmMain.cs +++ b/EAM Vault Peeker/FrmMain.cs @@ -4,6 +4,7 @@ using MK_EAM_Lib; using System; using System.Collections.Generic; +using System.Diagnostics; using System.Drawing; using System.IO; using System.Linq; @@ -38,14 +39,16 @@ public partial class FrmMain : Form public List statsList = new List(); public List activeVaultPeekerAccounts = new List(); + private bool didCheckForUpdate = false; + #region Path public static string saveFilePath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "ExaltAccountManager"); - private const string pathNEWRenders = @".\_NewRenders.png"; - private const string pathRenders = @".\renders.png"; - private const string pathItems = @".\items.cfg"; - private const string pathNEWItems = @".\_NewItems.cfg"; + private readonly string pathNEWRenders = Path.Combine(saveFilePath, "_NewRenders.png"); + private readonly string pathRenders = Path.Combine(saveFilePath, "renders.png"); + private readonly string pathItems = Path.Combine(saveFilePath, "items.cfg"); + private readonly string pathNEWItems = Path.Combine(saveFilePath, "_NewItems.cfg"); public string itemsSaveFilePath = Path.Combine(saveFilePath, "EAM.ItemsSaveFile"); public string accountStatsPath = Path.Combine(saveFilePath, "Stats"); public string activeVaultPeekerAccountsPath = Path.Combine(saveFilePath, "EAM.ActiveVaultPeekerAccounts"); @@ -293,10 +296,7 @@ public FrmMain() catch { } } } - catch - { - - } + catch { } try { @@ -313,6 +313,10 @@ public FrmMain() private void CheckForItemUpdate() { + if (didCheckForUpdate) + return; + didCheckForUpdate = true; + try { Task result = GeneralServicesClient.Instance?.GetVaultPeekerHashOfFiles(); @@ -383,8 +387,9 @@ private string GetMD5AsString(string filename) } } - private void ReadItems() + private void ReadItems(bool isSecondRun = false) { + bool filesMissing = false; try { if (File.Exists(pathNEWItems)) @@ -400,9 +405,11 @@ private void ReadItems() for (int i = 0; i < itemsString.Length; i++) { + Console.WriteLine(i); items.Add(new Item(itemsString[i])); } - } + } + else { filesMissing = true; } if (File.Exists(pathNEWRenders)) { @@ -415,8 +422,19 @@ private void ReadItems() { renders = Bitmap.FromFile(pathRenders); } + else { filesMissing = true; } + } + catch { filesMissing = true; } + + if (!isSecondRun && filesMissing) + { + var t = Task.Run(() => + { + CheckForItemUpdate(); + ReadItems(true); + }); + t.Wait(); } - catch { } } private void FrmMain_Shown(object sender, EventArgs e) diff --git a/Libraries/MK_EAM_Lib/Item.cs b/Libraries/MK_EAM_Lib/Item.cs index 814385dc..687398d2 100644 --- a/Libraries/MK_EAM_Lib/Item.cs +++ b/Libraries/MK_EAM_Lib/Item.cs @@ -1,4 +1,5 @@ using System; +using System.Diagnostics; namespace MK_EAM_Lib { @@ -34,22 +35,36 @@ public Item(string str) id = Convert.ToInt32(ids); name = sp[0].Substring(sp[0].IndexOf(": ") + 2, sp[0].Length - (sp[0].IndexOf(": ") + 2)).Replace("\"", "").Trim('\''); + if (sp.Length == 1) + return; slotType = int.Parse(sp[1].Trim(' ')); itemType = Item.GetItemType(slotType); - tier = int.Parse(sp[2].Trim(' ')); - x = int.Parse(sp[3].Trim(' ')); - y = int.Parse(sp[4].Trim(' ')); - fameBonus = int.Parse(sp[5].Trim(' ')); - feedPower = int.Parse(sp[6].Trim(' ')); - bagType = int.Parse(sp[7].Trim(' ')); - soulbound = bool.Parse(sp[8].Trim(' ')); - utSt = int.Parse(sp[9].Trim(' ')); - } - catch (Exception ex) - { - string msg = ex.Message; - + if (sp.Length == 2) + return; + int.TryParse(sp[2].Trim(' '), out tier); + if (sp.Length == 3) + return; + int.TryParse(sp[3].Trim(' '), out x); + if (sp.Length == 4) + return; + int.TryParse(sp[4].Trim(' '), out y); + if (sp.Length == 5) + return; + int.TryParse(sp[5].Trim(' '), out fameBonus); + if (sp.Length == 6) + return; + int.TryParse(sp[6].Trim(' '), out feedPower); + if (sp.Length == 7) + return; + int.TryParse(sp[7].Trim(' '), out bagType); + if (sp.Length == 8) + return; + bool.TryParse(sp[8].Trim(' '), out soulbound); + if (sp.Length == 9) + return; + int.TryParse(sp[9].Trim(' '), out utSt); } + catch { } } public override string ToString() From 5c90bd1a159b8058d8244a2d86cdb65ea167e24a Mon Sep 17 00:00:00 2001 From: MaikEight Date: Sun, 28 May 2023 05:03:05 +0200 Subject: [PATCH 26/40] =?UTF-8?q?=F0=9F=94=A5=20Removed=20unnecessary=20co?= =?UTF-8?q?nsole=20logging?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- EAM Vault Peeker/FrmMain.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/EAM Vault Peeker/FrmMain.cs b/EAM Vault Peeker/FrmMain.cs index b861db97..93a6e05a 100644 --- a/EAM Vault Peeker/FrmMain.cs +++ b/EAM Vault Peeker/FrmMain.cs @@ -405,7 +405,6 @@ private void ReadItems(bool isSecondRun = false) for (int i = 0; i < itemsString.Length; i++) { - Console.WriteLine(i); items.Add(new Item(itemsString[i])); } } From bd5f47bd29797bfb3fc01ad2a8cf5144a9e81826 Mon Sep 17 00:00:00 2001 From: MaikEight Date: Sun, 28 May 2023 20:12:51 +0200 Subject: [PATCH 27/40] =?UTF-8?q?=F0=9F=90=9B=20Fixed=20a=20critical=20bug?= =?UTF-8?q?=20that=20caused=20crashing=20during=20scrolling=20with=20about?= =?UTF-8?q?=2013k=20accounts=20or=20more=20Thanks=20to=20Tadus=20for=20rep?= =?UTF-8?q?orting=20&=20helpingto=20=20resolve=20the=20issue?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...gin Service.csproj.CoreCompileInputs.cache | 2 +- ... Login Service.csproj.FileListAbsolute.txt | 34 ++++++++++++++++++ ...M Statistics.csproj.GenerateResource.cache | Bin 4519 -> 4519 bytes EAM Vault Peeker/FrmMain.cs | 3 +- ExaltAccountManager/FrmMain.cs | 21 ++++++----- ExaltAccountManager/UI/Elements/EleExport.cs | 7 ++++ ExaltAccountManager/UI/Elements/EleImport.cs | 7 ++++ ExaltAccountManager/UI/UIAccounts.cs | 7 ++++ 8 files changed, 69 insertions(+), 12 deletions(-) diff --git a/EAM Daily Login Service/obj/Release/EAM Daily Login Service.csproj.CoreCompileInputs.cache b/EAM Daily Login Service/obj/Release/EAM Daily Login Service.csproj.CoreCompileInputs.cache index 1e3c8aca..656ae360 100644 --- a/EAM Daily Login Service/obj/Release/EAM Daily Login Service.csproj.CoreCompileInputs.cache +++ b/EAM Daily Login Service/obj/Release/EAM Daily Login Service.csproj.CoreCompileInputs.cache @@ -1 +1 @@ -09cc3bb8441a5277425da76d4cb62e6898768c95 +e77e9aa04502103eb6ea045c019197e6cac593b6 diff --git a/EAM Daily Login Service/obj/Release/EAM Daily Login Service.csproj.FileListAbsolute.txt b/EAM Daily Login Service/obj/Release/EAM Daily Login Service.csproj.FileListAbsolute.txt index ccabe23a..e9ddafde 100644 --- a/EAM Daily Login Service/obj/Release/EAM Daily Login Service.csproj.FileListAbsolute.txt +++ b/EAM Daily Login Service/obj/Release/EAM Daily Login Service.csproj.FileListAbsolute.txt @@ -120,3 +120,37 @@ C:\Users\Maik8\source\repos\ExaltAccountManager\EAM Daily Login Service\bin\Rele C:\Users\Maik8\source\repos\ExaltAccountManager\EAM Daily Login Service\bin\Release\Newtonsoft.Json.xml C:\Users\Maik8\source\repos\ExaltAccountManager\EAM Daily Login Service\bin\Release\MK_EAM_Lib.dll.config C:\Users\Maik8\source\repos\ExaltAccountManager\EAM Daily Login Service\obj\Release\EAM Daily Login Service.csproj.SuggestedBindingRedirects.cache +C:\Users\Maik8\source\repos\ExaltAccountManager\EAM Daily Login Service\bin\Release\Bunifu.UI.WinForms.dll +C:\Users\Maik8\source\repos\ExaltAccountManager\EAM Daily Login Service\bin\Release\Bunifu.UI.WinForms.1.5.3.dll +C:\Users\Maik8\source\repos\ExaltAccountManager\EAM Daily Login Service\bin\Release\MK_EAM_General_Services_Lib.dll +C:\Users\Maik8\source\repos\ExaltAccountManager\EAM Daily Login Service\bin\Release\Microsoft.Win32.TaskScheduler.dll +C:\Users\Maik8\source\repos\ExaltAccountManager\EAM Daily Login Service\bin\Release\Bunifu.Charts.WinForms.dll +C:\Users\Maik8\source\repos\ExaltAccountManager\EAM Daily Login Service\bin\Release\MK_EAM_Analytics.dll +C:\Users\Maik8\source\repos\ExaltAccountManager\EAM Daily Login Service\bin\Release\MK_EAM_Discord_Lib.dll +C:\Users\Maik8\source\repos\ExaltAccountManager\EAM Daily Login Service\bin\Release\MK_EAM_Updater_Lib.dll +C:\Users\Maik8\source\repos\ExaltAccountManager\EAM Daily Login Service\bin\Release\MK_EAM_Captcha_Solver_UI_Lib.dll +C:\Users\Maik8\source\repos\ExaltAccountManager\EAM Daily Login Service\bin\Release\Bunifu.Licensing.dll +C:\Users\Maik8\source\repos\ExaltAccountManager\EAM Daily Login Service\bin\Release\DiscordRPC.dll +C:\Users\Maik8\source\repos\ExaltAccountManager\EAM Daily Login Service\bin\Release\RestSharp.dll +C:\Users\Maik8\source\repos\ExaltAccountManager\EAM Daily Login Service\bin\Release\Bunifu.UI.WinForms.xml +C:\Users\Maik8\source\repos\ExaltAccountManager\EAM Daily Login Service\bin\Release\Bunifu.UI.WinForms.1.5.3.xml +C:\Users\Maik8\source\repos\ExaltAccountManager\EAM Daily Login Service\bin\Release\CsvHelper.xml +C:\Users\Maik8\source\repos\ExaltAccountManager\EAM Daily Login Service\bin\Release\MK_EAM_General_Services_Lib.pdb +C:\Users\Maik8\source\repos\ExaltAccountManager\EAM Daily Login Service\bin\Release\Microsoft.Win32.TaskScheduler.xml +C:\Users\Maik8\source\repos\ExaltAccountManager\EAM Daily Login Service\bin\Release\Bunifu.Charts.WinForms.xml +C:\Users\Maik8\source\repos\ExaltAccountManager\EAM Daily Login Service\bin\Release\MK_EAM_Analytics.pdb +C:\Users\Maik8\source\repos\ExaltAccountManager\EAM Daily Login Service\bin\Release\MK_EAM_Discord_Lib.pdb +C:\Users\Maik8\source\repos\ExaltAccountManager\EAM Daily Login Service\bin\Release\MK_EAM_Updater_Lib.pdb +C:\Users\Maik8\source\repos\ExaltAccountManager\EAM Daily Login Service\bin\Release\MK_EAM_Captcha_Solver_UI_Lib.pdb +C:\Users\Maik8\source\repos\ExaltAccountManager\EAM Daily Login Service\bin\Release\MK_EAM_Captcha_Solver_UI_Lib.dll.config +C:\Users\Maik8\source\repos\ExaltAccountManager\EAM Daily Login Service\bin\Release\Bunifu.Licensing.pdb +C:\Users\Maik8\source\repos\ExaltAccountManager\EAM Daily Login Service\bin\Release\Microsoft.Bcl.AsyncInterfaces.xml +C:\Users\Maik8\source\repos\ExaltAccountManager\EAM Daily Login Service\bin\Release\RestSharp.xml +C:\Users\Maik8\source\repos\ExaltAccountManager\EAM Daily Login Service\bin\Release\de\Microsoft.Win32.TaskScheduler.resources.dll +C:\Users\Maik8\source\repos\ExaltAccountManager\EAM Daily Login Service\bin\Release\es\Microsoft.Win32.TaskScheduler.resources.dll +C:\Users\Maik8\source\repos\ExaltAccountManager\EAM Daily Login Service\bin\Release\fr\Microsoft.Win32.TaskScheduler.resources.dll +C:\Users\Maik8\source\repos\ExaltAccountManager\EAM Daily Login Service\bin\Release\it\Microsoft.Win32.TaskScheduler.resources.dll +C:\Users\Maik8\source\repos\ExaltAccountManager\EAM Daily Login Service\bin\Release\pl\Microsoft.Win32.TaskScheduler.resources.dll +C:\Users\Maik8\source\repos\ExaltAccountManager\EAM Daily Login Service\bin\Release\ru\Microsoft.Win32.TaskScheduler.resources.dll +C:\Users\Maik8\source\repos\ExaltAccountManager\EAM Daily Login Service\bin\Release\zh-CN\Microsoft.Win32.TaskScheduler.resources.dll +C:\Users\Maik8\source\repos\ExaltAccountManager\EAM Daily Login Service\bin\Release\zh-Hant\Microsoft.Win32.TaskScheduler.resources.dll diff --git a/EAM Statistics/obj/Release/EAM Statistics.csproj.GenerateResource.cache b/EAM Statistics/obj/Release/EAM Statistics.csproj.GenerateResource.cache index ddc74efc479c34e29244101daf7338ec94593280..bd3a94b9b3cc08e6580441f7892d917018531149 100644 GIT binary patch delta 17 YcmZ3kyj*!gBHNPiqQpAOjp+`806lUBdH?_b delta 17 YcmZ3kyj*!gB3nq0<|Z5Mjp+`806I(t7XSbN diff --git a/EAM Vault Peeker/FrmMain.cs b/EAM Vault Peeker/FrmMain.cs index 93a6e05a..2b6c9d3f 100644 --- a/EAM Vault Peeker/FrmMain.cs +++ b/EAM Vault Peeker/FrmMain.cs @@ -4,7 +4,6 @@ using MK_EAM_Lib; using System; using System.Collections.Generic; -using System.Diagnostics; using System.Drawing; using System.IO; using System.Linq; @@ -16,7 +15,7 @@ namespace EAM_Vault_Peeker { public partial class FrmMain : Form { - public Version version { get; } = new Version(1, 0, 10); + public Version version { get; } = new Version(1, 0, 11); public string API_BASE_URL { get; internal set; } = "https://api.exalt-account-manager.eu/"; public bool useDarkmode = true; diff --git a/ExaltAccountManager/FrmMain.cs b/ExaltAccountManager/FrmMain.cs index 05ce2e5d..ca30fb62 100644 --- a/ExaltAccountManager/FrmMain.cs +++ b/ExaltAccountManager/FrmMain.cs @@ -107,15 +107,21 @@ public bool HasNewNews } private bool hasNewNews = false; public DateTime LastNewsViewed { get; internal set; } = DateTime.MinValue; - public DiscordUser DiscordUser + public DiscordUser DiscordUser { - get => discordUser; + get => discordUser; internal set { discordUser = value; - DiscordUserChanged(); - + if (OptionsData != null && + OptionsData.analyticsOptions != null && + !OptionsData.analyticsOptions.OptOut && + !OptionsData.analyticsOptions.Anonymization + ) + { + DiscordUserChanged(); + } bool DiscordUserChanged() { @@ -598,7 +604,7 @@ private void DiscordHelper_OnDiscordConnectionChanged(object sender, bool isConn if (!hasDiscordUser && DiscordUser != null && DiscordUser.DiscordUserId.Equals("NotFound")) { //No discord user found - DiscordUserConnectionInvoker(DiscordUser, token); + DiscordUserConnectionInvoker(DiscordUser, token); } else if (DiscordUser != null) { @@ -798,9 +804,6 @@ public void ApplyTheme(object sender, EventArgs e) pbMinimize.Image = UseDarkmode ? Properties.Resources.baseline_minimize_white_24dp : Properties.Resources.baseline_minimize_black_24dp; pbShowDiscordUser.Image = UseDarkmode ? Properties.Resources.male_user_outline_white_24px : Properties.Resources.male_user_outline_black_24px; - if (gameUpdater != null && GameUpdater.Instance.UpdateRequired) - lVersion.ForeColor = UseDarkmode ? Color.Orange : Color.DarkOrange; - #region Button Images btnAccounts.Image = useDarkmode ? Properties.Resources.ic_people_outline_white_24dp : Properties.Resources.ic_people_outline_black_24dp; @@ -2261,6 +2264,6 @@ private void btnNews_Paint(object sender, PaintEventArgs e) { e.Graphics.FillEllipse(pColor.Brush, 33f, 26f, 9f, 9f); } - } + } } } diff --git a/ExaltAccountManager/UI/Elements/EleExport.cs b/ExaltAccountManager/UI/Elements/EleExport.cs index f49346d1..60dc0a47 100644 --- a/ExaltAccountManager/UI/Elements/EleExport.cs +++ b/ExaltAccountManager/UI/Elements/EleExport.cs @@ -169,6 +169,13 @@ private void scrollbar_Scroll(object sender, Bunifu.UI.WinForms.BunifuVScrollBar { if (isInit) return; + if (dataGridView.RowCount < scrollbar.Value) + { + dataGridView.FirstDisplayedScrollingRowIndex = dataGridView.RowCount - 1; + dataGridView.Update(); + return; + } + dataGridView.FirstDisplayedScrollingRowIndex = scrollbar.Value; dataGridView.Update(); } diff --git a/ExaltAccountManager/UI/Elements/EleImport.cs b/ExaltAccountManager/UI/Elements/EleImport.cs index d7b3d3d8..60f421f3 100644 --- a/ExaltAccountManager/UI/Elements/EleImport.cs +++ b/ExaltAccountManager/UI/Elements/EleImport.cs @@ -510,6 +510,13 @@ private void scrollbar_Scroll(object sender, Bunifu.UI.WinForms.BunifuVScrollBar { if (isInit) return; + if (dataGridView.RowCount < scrollbar.Value) + { + dataGridView.FirstDisplayedScrollingRowIndex = dataGridView.RowCount - 1; + dataGridView.Update(); + return; + } + dataGridView.FirstDisplayedScrollingRowIndex = scrollbar.Value; dataGridView.Update(); } diff --git a/ExaltAccountManager/UI/UIAccounts.cs b/ExaltAccountManager/UI/UIAccounts.cs index f7cbaf8e..c37843e5 100644 --- a/ExaltAccountManager/UI/UIAccounts.cs +++ b/ExaltAccountManager/UI/UIAccounts.cs @@ -827,6 +827,13 @@ private void scrollbar_Scroll(object sender, Bunifu.UI.WinForms.BunifuVScrollBar { if (isInit) return; + if (dataGridView.RowCount < scrollbar.Value) + { + dataGridView.FirstDisplayedScrollingRowIndex = dataGridView.RowCount - 1; + dataGridView.Update(); + return; + } + dataGridView.FirstDisplayedScrollingRowIndex = scrollbar.Value; dataGridView.Update(); } From 7f5ba54a3e57c27b4f84a5bb39465487d5258ad2 Mon Sep 17 00:00:00 2001 From: MaikEight Date: Mon, 29 May 2023 00:06:30 +0200 Subject: [PATCH 28/40] =?UTF-8?q?=E2=9C=A8=20Added=20a=20new=20configurati?= =?UTF-8?q?on=20for=20the=20captcha=20solver=20to=20allow=20for=20options?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CaptchaUIConfiguration.cs | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 Libraries/MK_EAM_Captcha_Solver_UI_Lib/CaptchaUIConfiguration.cs diff --git a/Libraries/MK_EAM_Captcha_Solver_UI_Lib/CaptchaUIConfiguration.cs b/Libraries/MK_EAM_Captcha_Solver_UI_Lib/CaptchaUIConfiguration.cs new file mode 100644 index 00000000..aac8dd68 --- /dev/null +++ b/Libraries/MK_EAM_Captcha_Solver_UI_Lib/CaptchaUIConfiguration.cs @@ -0,0 +1,11 @@ + +namespace MK_EAM_Captcha_Solver_UI_Lib +{ + [System.Serializable] + public class CaptchaUIConfiguration + { + public bool UseNumbered { get; set; } = false; + public bool UseZoom { get; set; } = false; + public bool UseGrayscale { get; set; } = false; + } +} From acba9c9d9424db9c12cfad3e6c8379c966fd9b8f Mon Sep 17 00:00:00 2001 From: MaikEight Date: Mon, 29 May 2023 00:24:55 +0200 Subject: [PATCH 29/40] =?UTF-8?q?=E2=9C=A8=20Added=20a=20new=20menu=20to?= =?UTF-8?q?=20the=20captcha=20aid=20to=20allow=20for=20options=20to=20be?= =?UTF-8?q?=20toggled=20=E2=9C=A8=20Added=20a=20grayscaling=20functionalit?= =?UTF-8?q?y=20for=20the=20captcha=20image?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../UI/Elements/EleDiscordUser.cs | 2 +- .../FrmCaptchaSolver.Designer.cs | 175 ++++++++++---- .../FrmCaptchaSolver.cs | 214 +++++++++++++++++- .../MK_EAM_Captcha_Solver_UI_Lib.csproj | 22 ++ .../Properties/Resources.Designer.cs | 70 ++++++ .../Properties/Resources.resx | 47 ++-- .../Resources/grayscale_black_24px.png | Bin 0 -> 467 bytes .../Resources/grayscale_white_24px.png | Bin 0 -> 485 bytes .../Resources/ic_search_white_24dp.png | Bin 0 -> 247 bytes .../Resources/icons8_96px.png | Bin 0 -> 2101 bytes .../Resources/numbered_list_black_24px.png | Bin 0 -> 227 bytes .../Resources/numbered_list_white_24px.png | Bin 0 -> 217 bytes .../Resources/search_black_black_24px.png | Bin 0 -> 420 bytes 13 files changed, 464 insertions(+), 66 deletions(-) create mode 100644 Libraries/MK_EAM_Captcha_Solver_UI_Lib/Resources/grayscale_black_24px.png create mode 100644 Libraries/MK_EAM_Captcha_Solver_UI_Lib/Resources/grayscale_white_24px.png create mode 100644 Libraries/MK_EAM_Captcha_Solver_UI_Lib/Resources/ic_search_white_24dp.png create mode 100644 Libraries/MK_EAM_Captcha_Solver_UI_Lib/Resources/icons8_96px.png create mode 100644 Libraries/MK_EAM_Captcha_Solver_UI_Lib/Resources/numbered_list_black_24px.png create mode 100644 Libraries/MK_EAM_Captcha_Solver_UI_Lib/Resources/numbered_list_white_24px.png create mode 100644 Libraries/MK_EAM_Captcha_Solver_UI_Lib/Resources/search_black_black_24px.png diff --git a/ExaltAccountManager/UI/Elements/EleDiscordUser.cs b/ExaltAccountManager/UI/Elements/EleDiscordUser.cs index a056e061..963bd22f 100644 --- a/ExaltAccountManager/UI/Elements/EleDiscordUser.cs +++ b/ExaltAccountManager/UI/Elements/EleDiscordUser.cs @@ -22,7 +22,7 @@ public EleDiscordUser(FrmMain _frm) }; ApplyTheme(frm, null); - + LoadUI(); } diff --git a/Libraries/MK_EAM_Captcha_Solver_UI_Lib/FrmCaptchaSolver.Designer.cs b/Libraries/MK_EAM_Captcha_Solver_UI_Lib/FrmCaptchaSolver.Designer.cs index e0997761..fa87a915 100644 --- a/Libraries/MK_EAM_Captcha_Solver_UI_Lib/FrmCaptchaSolver.Designer.cs +++ b/Libraries/MK_EAM_Captcha_Solver_UI_Lib/FrmCaptchaSolver.Designer.cs @@ -29,8 +29,8 @@ protected override void Dispose(bool disposing) private void InitializeComponent() { System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmCaptchaSolver)); - Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderEdges borderEdges1 = new Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderEdges(); - Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderEdges borderEdges2 = new Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderEdges(); + Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderEdges borderEdges27 = new Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderEdges(); + Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderEdges borderEdges28 = new Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderEdges(); this.pTopContent = new System.Windows.Forms.Panel(); this.pTop = new System.Windows.Forms.Panel(); this.pbMinimize = new System.Windows.Forms.PictureBox(); @@ -52,7 +52,13 @@ private void InitializeComponent() this.pbCaptchaMain = new System.Windows.Forms.PictureBox(); this.pbCaptchaQuestion = new System.Windows.Forms.PictureBox(); this.pCaptchaText = new System.Windows.Forms.Panel(); - this.label2 = new System.Windows.Forms.Label(); + this.lQuestion = new System.Windows.Forms.Label(); + this.pTools = new System.Windows.Forms.Panel(); + this.pToolsContent = new System.Windows.Forms.Panel(); + this.pbGrayScale = new System.Windows.Forms.PictureBox(); + this.pbZoom = new System.Windows.Forms.PictureBox(); + this.pbShowNumbers = new System.Windows.Forms.PictureBox(); + this.pToolsTop = new System.Windows.Forms.Panel(); this.formDock = new Bunifu.UI.WinForms.BunifuFormDock(); this.pTopContent.SuspendLayout(); this.pTop.SuspendLayout(); @@ -68,6 +74,11 @@ private void InitializeComponent() ((System.ComponentModel.ISupportInitialize)(this.pbCaptchaMain)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.pbCaptchaQuestion)).BeginInit(); this.pCaptchaText.SuspendLayout(); + this.pTools.SuspendLayout(); + this.pToolsContent.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.pbGrayScale)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.pbZoom)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.pbShowNumbers)).BeginInit(); this.SuspendLayout(); // // pTopContent @@ -77,7 +88,7 @@ private void InitializeComponent() this.pTopContent.Dock = System.Windows.Forms.DockStyle.Top; this.pTopContent.Location = new System.Drawing.Point(0, 0); this.pTopContent.Name = "pTopContent"; - this.pTopContent.Size = new System.Drawing.Size(300, 64); + this.pTopContent.Size = new System.Drawing.Size(324, 64); this.pTopContent.TabIndex = 0; // // pTop @@ -88,14 +99,14 @@ private void InitializeComponent() this.pTop.Dock = System.Windows.Forms.DockStyle.Top; this.pTop.Location = new System.Drawing.Point(175, 0); this.pTop.Name = "pTop"; - this.pTop.Size = new System.Drawing.Size(125, 24); + this.pTop.Size = new System.Drawing.Size(149, 24); this.pTop.TabIndex = 3; // // pbMinimize // this.pbMinimize.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.pbMinimize.Image = ((System.Drawing.Image)(resources.GetObject("pbMinimize.Image"))); - this.pbMinimize.Location = new System.Drawing.Point(77, 0); + this.pbMinimize.Location = new System.Drawing.Point(101, 0); this.pbMinimize.Name = "pbMinimize"; this.pbMinimize.Size = new System.Drawing.Size(24, 24); this.pbMinimize.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; @@ -111,7 +122,7 @@ private void InitializeComponent() // this.pbClose.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.pbClose.Image = ((System.Drawing.Image)(resources.GetObject("pbClose.Image"))); - this.pbClose.Location = new System.Drawing.Point(101, 0); + this.pbClose.Location = new System.Drawing.Point(125, 0); this.pbClose.Name = "pbClose"; this.pbClose.Size = new System.Drawing.Size(24, 24); this.pbClose.TabIndex = 9; @@ -202,19 +213,19 @@ private void InitializeComponent() this.pMessage.Location = new System.Drawing.Point(0, 64); this.pMessage.Name = "pMessage"; this.pMessage.Padding = new System.Windows.Forms.Padding(5); - this.pMessage.Size = new System.Drawing.Size(300, 73); + this.pMessage.Size = new System.Drawing.Size(324, 73); this.pMessage.TabIndex = 1; // // lMessage // this.lMessage.AutoEllipsis = true; - this.lMessage.AutoSize = true; + this.lMessage.Dock = System.Windows.Forms.DockStyle.Fill; this.lMessage.Font = new System.Drawing.Font("Segoe UI", 12F); this.lMessage.Location = new System.Drawing.Point(5, 5); this.lMessage.Margin = new System.Windows.Forms.Padding(0); - this.lMessage.MaximumSize = new System.Drawing.Size(290, 0); + this.lMessage.MaximumSize = new System.Drawing.Size(314, 0); this.lMessage.Name = "lMessage"; - this.lMessage.Size = new System.Drawing.Size(281, 63); + this.lMessage.Size = new System.Drawing.Size(314, 63); this.lMessage.TabIndex = 8; this.lMessage.Text = "You need to solve a captcha to log in or refresh the data of the account: \r\n{0}"; this.lMessage.TextAlign = System.Drawing.ContentAlignment.TopCenter; @@ -227,7 +238,7 @@ private void InitializeComponent() this.pContent.Location = new System.Drawing.Point(0, 137); this.pContent.Name = "pContent"; this.pContent.Padding = new System.Windows.Forms.Padding(5, 0, 5, 5); - this.pContent.Size = new System.Drawing.Size(300, 427); + this.pContent.Size = new System.Drawing.Size(324, 427); this.pContent.TabIndex = 2; this.pContent.Paint += new System.Windows.Forms.PaintEventHandler(this.pContent_Paint); // @@ -237,10 +248,11 @@ private void InitializeComponent() this.pCaptcha.Controls.Add(this.pbCaptchaMain); this.pCaptcha.Controls.Add(this.pbCaptchaQuestion); this.pCaptcha.Controls.Add(this.pCaptchaText); + this.pCaptcha.Controls.Add(this.pTools); this.pCaptcha.Dock = System.Windows.Forms.DockStyle.Fill; this.pCaptcha.Location = new System.Drawing.Point(5, 0); this.pCaptcha.Name = "pCaptcha"; - this.pCaptcha.Size = new System.Drawing.Size(290, 422); + this.pCaptcha.Size = new System.Drawing.Size(314, 422); this.pCaptcha.TabIndex = 0; // // pActions @@ -289,11 +301,11 @@ private void InitializeComponent() this.btnReset.ColorContrastOnClick = 45; this.btnReset.ColorContrastOnHover = 45; this.btnReset.Cursor = System.Windows.Forms.Cursors.Default; - borderEdges1.BottomLeft = true; - borderEdges1.BottomRight = true; - borderEdges1.TopLeft = true; - borderEdges1.TopRight = true; - this.btnReset.CustomizableEdges = borderEdges1; + borderEdges27.BottomLeft = true; + borderEdges27.BottomRight = true; + borderEdges27.TopLeft = true; + borderEdges27.TopRight = true; + this.btnReset.CustomizableEdges = borderEdges27; this.btnReset.DialogResult = System.Windows.Forms.DialogResult.None; this.btnReset.DisabledBorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(191)))), ((int)(((byte)(191)))), ((int)(((byte)(191))))); this.btnReset.DisabledFillColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); @@ -381,11 +393,11 @@ private void InitializeComponent() this.btnSubmit.ColorContrastOnClick = 45; this.btnSubmit.ColorContrastOnHover = 45; this.btnSubmit.Cursor = System.Windows.Forms.Cursors.Default; - borderEdges2.BottomLeft = true; - borderEdges2.BottomRight = true; - borderEdges2.TopLeft = true; - borderEdges2.TopRight = true; - this.btnSubmit.CustomizableEdges = borderEdges2; + borderEdges28.BottomLeft = true; + borderEdges28.BottomRight = true; + borderEdges28.TopLeft = true; + borderEdges28.TopRight = true; + this.btnSubmit.CustomizableEdges = borderEdges28; this.btnSubmit.DialogResult = System.Windows.Forms.DialogResult.None; this.btnSubmit.DisabledBorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(191)))), ((int)(((byte)(191)))), ((int)(((byte)(191))))); this.btnSubmit.DisabledFillColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); @@ -479,27 +491,98 @@ private void InitializeComponent() // // pCaptchaText // - this.pCaptchaText.Controls.Add(this.label2); + this.pCaptchaText.Controls.Add(this.lQuestion); this.pCaptchaText.Dock = System.Windows.Forms.DockStyle.Top; this.pCaptchaText.Location = new System.Drawing.Point(0, 0); this.pCaptchaText.Name = "pCaptchaText"; this.pCaptchaText.Size = new System.Drawing.Size(290, 29); this.pCaptchaText.TabIndex = 2; // - // label2 - // - this.label2.AutoEllipsis = true; - this.label2.Dock = System.Windows.Forms.DockStyle.Fill; - this.label2.Font = new System.Drawing.Font("Segoe UI Semibold", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label2.Location = new System.Drawing.Point(0, 0); - this.label2.Margin = new System.Windows.Forms.Padding(0); - this.label2.MaximumSize = new System.Drawing.Size(290, 0); - this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(290, 29); - this.label2.TabIndex = 9; - this.label2.Text = "Find the following in order"; - this.label2.TextAlign = System.Drawing.ContentAlignment.TopCenter; - this.label2.UseMnemonic = false; + // lQuestion + // + this.lQuestion.AutoEllipsis = true; + this.lQuestion.Dock = System.Windows.Forms.DockStyle.Fill; + this.lQuestion.Font = new System.Drawing.Font("Segoe UI Semibold", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lQuestion.Location = new System.Drawing.Point(0, 0); + this.lQuestion.Margin = new System.Windows.Forms.Padding(0); + this.lQuestion.MaximumSize = new System.Drawing.Size(290, 0); + this.lQuestion.Name = "lQuestion"; + this.lQuestion.Size = new System.Drawing.Size(290, 29); + this.lQuestion.TabIndex = 9; + this.lQuestion.Text = "Find the following in order"; + this.lQuestion.TextAlign = System.Drawing.ContentAlignment.TopCenter; + this.lQuestion.UseMnemonic = false; + // + // pTools + // + this.pTools.Controls.Add(this.pToolsContent); + this.pTools.Controls.Add(this.pToolsTop); + this.pTools.Dock = System.Windows.Forms.DockStyle.Right; + this.pTools.Location = new System.Drawing.Point(290, 0); + this.pTools.Name = "pTools"; + this.pTools.Size = new System.Drawing.Size(24, 422); + this.pTools.TabIndex = 4; + // + // pToolsContent + // + this.pToolsContent.Controls.Add(this.pbGrayScale); + this.pToolsContent.Controls.Add(this.pbZoom); + this.pToolsContent.Controls.Add(this.pbShowNumbers); + this.pToolsContent.Dock = System.Windows.Forms.DockStyle.Fill; + this.pToolsContent.Location = new System.Drawing.Point(0, 91); + this.pToolsContent.Name = "pToolsContent"; + this.pToolsContent.Size = new System.Drawing.Size(24, 331); + this.pToolsContent.TabIndex = 1; + // + // pbGrayScale + // + this.pbGrayScale.Dock = System.Windows.Forms.DockStyle.Top; + this.pbGrayScale.Image = global::MK_EAM_Captcha_Solver_UI_Lib.Properties.Resources.grayscale_black_24px; + this.pbGrayScale.Location = new System.Drawing.Point(0, 48); + this.pbGrayScale.Name = "pbGrayScale"; + this.pbGrayScale.Size = new System.Drawing.Size(24, 24); + this.pbGrayScale.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage; + this.pbGrayScale.TabIndex = 1; + this.pbGrayScale.TabStop = false; + this.pbGrayScale.Click += new System.EventHandler(this.pbGrayScale_Click); + this.pbGrayScale.MouseEnter += new System.EventHandler(this.pbGrayScale_MouseEnter); + this.pbGrayScale.MouseLeave += new System.EventHandler(this.pbGrayScale_MouseLeave); + // + // pbZoom + // + this.pbZoom.Dock = System.Windows.Forms.DockStyle.Top; + this.pbZoom.Image = global::MK_EAM_Captcha_Solver_UI_Lib.Properties.Resources.search_black_black_24px; + this.pbZoom.Location = new System.Drawing.Point(0, 24); + this.pbZoom.Name = "pbZoom"; + this.pbZoom.Size = new System.Drawing.Size(24, 24); + this.pbZoom.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage; + this.pbZoom.TabIndex = 0; + this.pbZoom.TabStop = false; + this.pbZoom.Click += new System.EventHandler(this.pbZoom_Click); + this.pbZoom.MouseEnter += new System.EventHandler(this.pbZoom_MouseEnter); + this.pbZoom.MouseLeave += new System.EventHandler(this.pbZoom_MouseLeave); + // + // pbShowNumbers + // + this.pbShowNumbers.Dock = System.Windows.Forms.DockStyle.Top; + this.pbShowNumbers.Image = global::MK_EAM_Captcha_Solver_UI_Lib.Properties.Resources.numbered_list_black_24px; + this.pbShowNumbers.Location = new System.Drawing.Point(0, 0); + this.pbShowNumbers.Name = "pbShowNumbers"; + this.pbShowNumbers.Size = new System.Drawing.Size(24, 24); + this.pbShowNumbers.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage; + this.pbShowNumbers.TabIndex = 2; + this.pbShowNumbers.TabStop = false; + this.pbShowNumbers.Click += new System.EventHandler(this.pbShowNumbers_Click); + this.pbShowNumbers.MouseEnter += new System.EventHandler(this.pbShowNumbers_MouseEnter); + this.pbShowNumbers.MouseLeave += new System.EventHandler(this.pbShowNumbers_MouseLeave); + // + // pToolsTop + // + this.pToolsTop.Dock = System.Windows.Forms.DockStyle.Top; + this.pToolsTop.Location = new System.Drawing.Point(0, 0); + this.pToolsTop.Name = "pToolsTop"; + this.pToolsTop.Size = new System.Drawing.Size(24, 91); + this.pToolsTop.TabIndex = 0; // // formDock // @@ -546,7 +629,7 @@ private void InitializeComponent() this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 17F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.BackColor = System.Drawing.Color.White; - this.ClientSize = new System.Drawing.Size(300, 564); + this.ClientSize = new System.Drawing.Size(324, 564); this.Controls.Add(this.pContent); this.Controls.Add(this.pMessage); this.Controls.Add(this.pTopContent); @@ -568,7 +651,6 @@ private void InitializeComponent() this.pHeader.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.pbHeader)).EndInit(); this.pMessage.ResumeLayout(false); - this.pMessage.PerformLayout(); this.pContent.ResumeLayout(false); this.pCaptcha.ResumeLayout(false); this.pActions.ResumeLayout(false); @@ -576,6 +658,11 @@ private void InitializeComponent() ((System.ComponentModel.ISupportInitialize)(this.pbCaptchaMain)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.pbCaptchaQuestion)).EndInit(); this.pCaptchaText.ResumeLayout(false); + this.pTools.ResumeLayout(false); + this.pToolsContent.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.pbGrayScale)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.pbZoom)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.pbShowNumbers)).EndInit(); this.ResumeLayout(false); } @@ -598,12 +685,18 @@ private void InitializeComponent() private System.Windows.Forms.PictureBox pbCaptchaMain; private System.Windows.Forms.PictureBox pbCaptchaQuestion; private System.Windows.Forms.Panel pCaptchaText; - private System.Windows.Forms.Label label2; + private System.Windows.Forms.Label lQuestion; private System.Windows.Forms.Panel pActions; private Bunifu.UI.WinForms.BunifuButton.BunifuButton btnSubmit; private Bunifu.UI.WinForms.BunifuButton.BunifuButton btnReset; private System.Windows.Forms.Label lTriesLeft; private System.Windows.Forms.Label lBeta; private Bunifu.UI.WinForms.BunifuFormDock formDock; + private System.Windows.Forms.Panel pTools; + private System.Windows.Forms.Panel pToolsContent; + private System.Windows.Forms.PictureBox pbZoom; + private System.Windows.Forms.Panel pToolsTop; + private System.Windows.Forms.PictureBox pbGrayScale; + private System.Windows.Forms.PictureBox pbShowNumbers; } } \ No newline at end of file diff --git a/Libraries/MK_EAM_Captcha_Solver_UI_Lib/FrmCaptchaSolver.cs b/Libraries/MK_EAM_Captcha_Solver_UI_Lib/FrmCaptchaSolver.cs index 61f95a3a..f54d26a9 100644 --- a/Libraries/MK_EAM_Captcha_Solver_UI_Lib/FrmCaptchaSolver.cs +++ b/Libraries/MK_EAM_Captcha_Solver_UI_Lib/FrmCaptchaSolver.cs @@ -1,8 +1,13 @@ using MK_EAM_Lib; +using Newtonsoft.Json; using System; using System.Collections.Generic; +using System.ComponentModel; using System.Drawing; +using System.Drawing.Imaging; +using System.IO; using System.Linq; +using System.Security.RightsManagement; using System.Threading; using System.Threading.Tasks; using System.Windows.Forms; @@ -38,14 +43,25 @@ protected override CreateParams CreateParams private PointF[] points = new PointF[3] { new PointF(), new PointF(), new PointF() }; private int currentPoint = 0; private bool isLoading = false; + private Image imageOrg = null; private DateTime startTime = DateTime.Now; + private CaptchaUIConfiguration configuration = new CaptchaUIConfiguration(); + + #region Paths + + public static readonly string saveFilePath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "ExaltAccountManager"); + + public readonly string captchaSolverConfigurationPath = Path.Combine(saveFilePath, "EAM.CaptchaAidConf"); + + #endregion + public FrmCaptchaSolver(AccountInfo _accountInfo, bool useDarkmode = false) { InitializeComponent(); - - formDock.SubscribeControlsToDragEvents(new Control[] { pHeader, pbHeader, lEAMHead, lHeaderCaptchaAid, lBeta }); + + formDock.SubscribeControlsToDragEvents(new Control[] { pHeader, pbHeader, lEAMHead, lHeaderCaptchaAid, lBeta }); accountInfo = _accountInfo; UseDarkmode = useDarkmode; @@ -68,6 +84,31 @@ public FrmCaptchaSolver(AccountInfo _accountInfo, bool useDarkmode = false) ApplyTheme(); + #region Read configuration + + if (File.Exists(captchaSolverConfigurationPath)) + { + try + { + configuration = JsonConvert.DeserializeObject(File.ReadAllText(captchaSolverConfigurationPath)); + } + catch + { + configuration = new CaptchaUIConfiguration(); + try + { + File.WriteAllText(captchaSolverConfigurationPath, JsonConvert.SerializeObject(configuration)); + } + catch { } + } + } + + #endregion + + ApplyConfigurationToUI(); + + pbCaptchaMain.LoadCompleted += PbCaptchaMain_LoadCompleted; + RequestChallenge(); } @@ -84,6 +125,10 @@ private void ApplyTheme() pbClose.Image = UseDarkmode ? Properties.Resources.ic_close_white_24dp : Properties.Resources.ic_close_black_24dp; pbMinimize.Image = UseDarkmode ? Properties.Resources.baseline_minimize_white_24dp : Properties.Resources.baseline_minimize_black_24dp; + + pbShowNumbers.Image = UseDarkmode ? Properties.Resources.numbered_list_white_24px : Properties.Resources.numbered_list_black_24px; + pbZoom.Image = UseDarkmode ? Properties.Resources.ic_search_white_24dp : Properties.Resources.search_black_black_24px; + pbGrayScale.Image = UseDarkmode ? Properties.Resources.grayscale_white_24px : Properties.Resources.grayscale_black_24px; } private void RequestChallenge() @@ -169,10 +214,10 @@ private bool RequestChallengeUpdateUI(CaptchaSolverUtils.CaptchaRefreshResponse } lTriesLeft.Text = $"Tries left\n{captchaRefresh.submitsLeft}"; - pbCaptchaQuestion.LoadAsync(captchaRefresh.qimg); + pbCaptchaQuestion.LoadAsync(captchaRefresh.qimg); pbCaptchaMain.LoadAsync(captchaRefresh.img); - pContent.Visible = + pContent.Visible = pActions.Visible = true; btnSubmit.Enabled = false; @@ -308,7 +353,7 @@ private void btnSubmit_Click(object sender, EventArgs e) null); MessageBox.Show("An error occured while submitting the result. Please try again later.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); - + this.Close(); return; } @@ -326,10 +371,10 @@ private bool SubmitUpdateUI(bool result, PointF[] points) return (bool)this.Invoke((Func)SubmitUpdateUI, result, points); _ = MK_EAM_Analytics.AnalyticsClient.Instance?.AddCaptchaResult( - startTime, - result ? MK_EAM_Analytics.Data.CaptchaResult.Success : MK_EAM_Analytics.Data.CaptchaResult.Failed, - ImageToByteArray(pbCaptchaQuestion.Image), - ImageToByteArray(pbCaptchaMain.Image), + startTime, + result ? MK_EAM_Analytics.Data.CaptchaResult.Success : MK_EAM_Analytics.Data.CaptchaResult.Failed, + ImageToByteArray(pbCaptchaQuestion.Image), + ImageToByteArray(imageOrg), points); if (result) @@ -368,8 +413,8 @@ private void pbCaptchaMain_Paint(object sender, PaintEventArgs e) for (int i = 0; i < points.Length; i++) { - if (pointsSet[i]) - rectangles.Add(new RectangleF(points[i].X - 4, points[i].Y - 4, 8, 8)); + if (pointsSet[i]) + rectangles.Add(new RectangleF(points[i].X - 4, points[i].Y - 6, 12, 12)); } using (Pen p = new Pen(pHeader.BackColor, 1f)) @@ -396,6 +441,27 @@ private void FrmCaptchaSolver_Activated(object sender, EventArgs e) this.Close(); } } + private void PbCaptchaMain_LoadCompleted(object sender, AsyncCompletedEventArgs e) + { + imageOrg = pbCaptchaMain.Image; + + if (configuration.UseGrayscale) + { + pbCaptchaMain.Image = GetGrayscaledImage((Bitmap)imageOrg); + } + } + + private void ApplyConfigurationToUI() + { + if (configuration == null) + { + configuration = new CaptchaUIConfiguration(); + } + + pbShowNumbers_MouseLeave(this, EventArgs.Empty); + pbZoom_MouseLeave(this, EventArgs.Empty); + pbGrayScale_MouseLeave(this, EventArgs.Empty); + } private void FrmCaptchaSolver_Paint(object sender, PaintEventArgs e) { @@ -418,5 +484,131 @@ private byte[] ImageToByteArray(Image img) ImageConverter converter = new ImageConverter(); return (byte[])converter.ConvertTo(img, typeof(byte[])); } + + public Bitmap GetGrayscaledImage(Bitmap original) + { + if(original == null) + return null; + + //create a blank bitmap the same size as original + Bitmap newBitmap = new Bitmap(original.Width, original.Height); + + //get a graphics object from the new image + using (Graphics g = Graphics.FromImage(newBitmap)) + { + + //create the grayscale ColorMatrix + ColorMatrix colorMatrix = new ColorMatrix( + new float[][] + { + new float[] {.3f, .3f, .3f, 0, 0}, + new float[] {.59f, .59f, .59f, 0, 0}, + new float[] {.11f, .11f, .11f, 0, 0}, + new float[] {0, 0, 0, 1, 0}, + new float[] {0, 0, 0, 0, 1} + }); + + //create some image attributes + using (ImageAttributes attributes = new ImageAttributes()) + { + + //set the color matrix attribute + attributes.SetColorMatrix(colorMatrix); + + //draw the original image on the new image + //using the grayscale color matrix + g.DrawImage(original, new Rectangle(0, 0, original.Width, original.Height), + 0, 0, original.Width, original.Height, GraphicsUnit.Pixel, attributes); + } + } + return newBitmap; + } + + Color activated + { + get + { + return UseDarkmode ? Color.FromArgb(175, 98, 0, 238) : Color.FromArgb(150, 98, 0, 238); + } + } + Color activatedHover + { + get + { + return UseDarkmode ? Color.FromArgb(225, 98, 0, 238) : Color.FromArgb(175, 98, 0, 238); + } + } + Color hover + { + get + { + return UseDarkmode ? Color.FromArgb(125, 75, 75, 75) : Color.FromArgb(50, 50, 50, 50); + } + } + + private void pbShowNumbers_Click(object sender, EventArgs e) + { + configuration.UseNumbered = !configuration.UseNumbered; + pbShowNumbers_MouseEnter(sender, e); + + SaveConfiguration(); + } + + private void pbShowNumbers_MouseEnter(object sender, EventArgs e) + { + pbShowNumbers.BackColor = configuration.UseNumbered ? activatedHover : hover; + } + + private void pbShowNumbers_MouseLeave(object sender, EventArgs e) + { + pbShowNumbers.BackColor = configuration.UseNumbered ? activated : pToolsContent.BackColor; + } + + private void pbZoom_Click(object sender, EventArgs e) + { + configuration.UseZoom = !configuration.UseZoom; + pbZoom_MouseEnter(sender, e); + + SaveConfiguration(); + } + + private void pbZoom_MouseEnter(object sender, EventArgs e) + { + pbZoom.BackColor = configuration.UseZoom ? activatedHover : hover; + } + + private void pbZoom_MouseLeave(object sender, EventArgs e) + { + pbZoom.BackColor = configuration.UseZoom ? activated : pToolsContent.BackColor; + } + + private void pbGrayScale_Click(object sender, EventArgs e) + { + configuration.UseGrayscale = !configuration.UseGrayscale; + pbGrayScale_MouseEnter(sender, e); + + pbCaptchaMain.Image = configuration.UseGrayscale ? GetGrayscaledImage((Bitmap)imageOrg) : imageOrg; + + SaveConfiguration(); + } + + private void pbGrayScale_MouseEnter(object sender, EventArgs e) + { + pbGrayScale.BackColor = configuration.UseGrayscale ? activatedHover : hover; + } + + private void pbGrayScale_MouseLeave(object sender, EventArgs e) + { + pbGrayScale.BackColor = configuration.UseGrayscale ? activated : pToolsContent.BackColor; + } + + private void SaveConfiguration() + { + try + { + File.WriteAllText(captchaSolverConfigurationPath, JsonConvert.SerializeObject(configuration)); + } + catch { } + } } } diff --git a/Libraries/MK_EAM_Captcha_Solver_UI_Lib/MK_EAM_Captcha_Solver_UI_Lib.csproj b/Libraries/MK_EAM_Captcha_Solver_UI_Lib/MK_EAM_Captcha_Solver_UI_Lib.csproj index d25655ce..2dc9ccb6 100644 --- a/Libraries/MK_EAM_Captcha_Solver_UI_Lib/MK_EAM_Captcha_Solver_UI_Lib.csproj +++ b/Libraries/MK_EAM_Captcha_Solver_UI_Lib/MK_EAM_Captcha_Solver_UI_Lib.csproj @@ -320,6 +320,7 @@ + Form @@ -389,6 +390,27 @@ MK_EAM_Lib + + + + + + + + + + + + + + + + + + + + + diff --git a/Libraries/MK_EAM_Captcha_Solver_UI_Lib/Properties/Resources.Designer.cs b/Libraries/MK_EAM_Captcha_Solver_UI_Lib/Properties/Resources.Designer.cs index dbb27f0d..68e716be 100644 --- a/Libraries/MK_EAM_Captcha_Solver_UI_Lib/Properties/Resources.Designer.cs +++ b/Libraries/MK_EAM_Captcha_Solver_UI_Lib/Properties/Resources.Designer.cs @@ -120,6 +120,26 @@ internal static System.Drawing.Bitmap Check_Circle_white_36px_1 { } } + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap grayscale_black_24px { + get { + object obj = ResourceManager.GetObject("grayscale_black_24px", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap grayscale_white_24px { + get { + object obj = ResourceManager.GetObject("grayscale_white_24px", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// @@ -140,6 +160,46 @@ internal static System.Drawing.Bitmap ic_close_white_24dp { } } + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap ic_search_white_24dp { + get { + object obj = ResourceManager.GetObject("ic_search_white_24dp", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap icons8_96px { + get { + object obj = ResourceManager.GetObject("icons8_96px", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap numbered_list_black_24px { + get { + object obj = ResourceManager.GetObject("numbered_list_black_24px", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap numbered_list_white_24px { + get { + object obj = ResourceManager.GetObject("numbered_list_white_24px", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// @@ -159,5 +219,15 @@ internal static System.Drawing.Bitmap puzzle_white_48px1 { return ((System.Drawing.Bitmap)(obj)); } } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap search_black_black_24px { + get { + object obj = ResourceManager.GetObject("search_black_black_24px", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } } } diff --git a/Libraries/MK_EAM_Captcha_Solver_UI_Lib/Properties/Resources.resx b/Libraries/MK_EAM_Captcha_Solver_UI_Lib/Properties/Resources.resx index 8f6b832e..03cd1832 100644 --- a/Libraries/MK_EAM_Captcha_Solver_UI_Lib/Properties/Resources.resx +++ b/Libraries/MK_EAM_Captcha_Solver_UI_Lib/Properties/Resources.resx @@ -118,14 +118,11 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - ..\Resources\back_to_white_36px.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\back_to_white_36px_1.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\ic_close_white_24dp.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\baseline_minimize_black_24dp.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\Check_Circle_white_36px_1.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\baseline_minimize_white_24dp.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -133,19 +130,43 @@ ..\Resources\Check_Circle_white_36px.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\Check_Circle_white_36px_1.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\baseline_minimize_black_24dp.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\back_to_white_36px_1.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\ic_close_black_24dp.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\ic_close_white_24dp.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\back_to_white_36px.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\puzzle_white_48px.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\grayscale_black_24px.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\search_black_black_24px.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\puzzle_white_48px1.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\grayscale_white_24px.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\puzzle_white_48px.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\icons8_96px.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\ic_search_white_24dp.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\numbered_list_white_24px.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\numbered_list_black_24px.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + \ No newline at end of file diff --git a/Libraries/MK_EAM_Captcha_Solver_UI_Lib/Resources/grayscale_black_24px.png b/Libraries/MK_EAM_Captcha_Solver_UI_Lib/Resources/grayscale_black_24px.png new file mode 100644 index 0000000000000000000000000000000000000000..e437aba2d614de1d72e6245f938454fff72ee028 GIT binary patch literal 467 zcmV;^0WAKBP)(w&d(9P0wXZXIM4@)pq6{@e0 zHiqQ;c%&^(ntvgdA)`7K4HTh)$4b|~%_4#tWOPkM%_3llWj(vBlwT1u(nnLX2zC?e znWv!qiI~wR6*co{FgHrGG$QzbjJ~L->0^%>pS&*+a*6Eb_D#6!Dh2hPiLoZ*^Wbzp z2>&`SB<{N;{t9(gdUcnk2|K13)6JEC=-0Hufcu~|P57bvqs?`x%cE@RpNh-Wkc`5X zlnZy=r?3cKozRt8zb)J3dP21pEMqAb>g`ZbE)K|ZRbrwAGKdFqJ)v{NnS?4)wMU|6 z#3A_v1Z$1SE<`zW=&!(^q`yObyDo6Ip_ici+!(VCnjwsnXRJk|@Cr)Xhm!OP}N$SEk zELxjzFamE-RNGRJq;(LzGF8PF1LqnP)s7Y+QLfz+RwQ?x9t9Tf85B~G={S+3t#Ey+ zXG6Nc&OpDq4h#IRMdwe*qu$>V7V8<3$3gVbbLs-`7i6ia@it3xY6H3Y#3W0LYQ*0? z{u+p0^elP}?$p_boeOhsL;GuJn{=DDoE(GvVR#0S^)|IVXe}q_plTCD@>f@_X`Du1 z6(<^m-&fY2AbC|RXq?p&bO<7Ow`{PGClq6hCit6RlC#ZV>Cd|wlV}N(q&8Odz(StT zDePEC4J*D!tZI)%>IW>=l;Bn9nC#&ZvK&i}Y*IUtD4)za@$)bXlOXb#Zr}O-uP3I_MSgK~z`??O9t)6jvDj2A1t^m)o+&6c&jh7fUy3Z8x-lk@(<)Mp|qO z*go~$rni)!NyW4ey_s6t$37SzG_}>O7)*Us+f)!iY{YFLC<21EDr*Inn=t(ksfLID zeYA?zh_9oU%B{sqfdGA~Zt4a2u__Tcv->IYJ7jU(qz3d$AENr`j2aSbYJ%osa%R7w z&z)p(-sJa?BPS3E?~-vhb$7t|*D4|7ICnPd2FS$6D<}yx@s`Lh!0ERfaE|;ziB>}# z^BL&HaQJE7jhWp#^FdM`goPjm)xL$sIFxEN00Fapgv2f#aewLpbHJk7Y zO4yZOJf_4=vyXJ1-hyMGtaq(JMY`NonvobFew>S$vYc16>nCsK0Rp zNAEV%o+?L-i7^;C(E>p#9zjT60B>1LF~Zw?U*P+^_oI>@X`zKA)DL+dpw;&|);d&O zXDN|z7aCI|z(ROSK3C!PquuuYlIg*R=j`MC{eGim+J@BNVWN0F0Qv z$=i6NrvcOQ3_I1ursM~BlQ4%2c>jO6K+6cg3Oaqi6Xn4@y4(r3=x!sai=vI0aRaz>uTq&$s(X2NsRtUpU*b0k(}tzyxf#TCjtev*qBnJ8EYW`%Lwp{a}^p3>X0NQE>thqoL#cbVdgtBx#D=7 zEg=Bga1Z3}L@HgiJjE;Vb=zDxnEN(u>5>w6ZXZhsu)|Y^;^aK;;*|!JrWB&eQ=-(J z%g^)zu&ck`Tg6qh8t1*7C5<0yGY{ z>di@1yvC6JxlAv>@8LfDIX)PbG`%K*<2P_Q+^-khBbHJ2%pWlc9D)uq`0~y9=s&zQSMA`o9seSI;WKW;u*dz!Cy5 zV)`a;G95Uej|KS2HBLFMt^!-kh2lwc5C)}dDsXSPZUq*rq z+Ay<}0F0&P(Qa%c;x3L|W2dUDZR{#G1V2IxVW|S(2vQ@!7zh56xOPtr!QWX&kEE}` z`brnkMR7Gf`%&Dv3s)y@DGi(NH!}Z3N#CZ#=`o){Ixiqw){SkNNACUxX6s#RP?7FO zd1?_>*;gQkj4i%@>JFHlrEj=Rp*CC!Ux&tnal-|nMt}~=5K{o@{OjblJX*(CFPMRw z9?td4xX2j+6^|gPkvB=)_$Tml!!Lj>BS3_9lZp0!2Ckq_`sx2evCsGg@P9WA33aid z18vzW|Ka7X$Pdl0IWyVZ?xhPf-$Rq8@isCjd*+FYTd^Z^`1kNe$>r z*sGQVNp0YxxRzJxbw}Dq=c^H4M=zCIiTs_N!1eD&*!EtOkVvZa#C}cI`mMd|e#;$OchK24?|Ei--n@;S#Adr1LvCyepW%n6>IroOx56dUE4Z%U zg8d8F2_vR*DDxRPh9{n?wWnUr-Z^ZA2=zCV!7aH8S2U#gB%i{@xI?KyeM-t8p6E)O zT8nr^tD%@&hs4aJeIYl-5~YTY$aOeIAngx1i2Y!w~$D^@&R*g zz%i_Yeo4|i>e7@0gkMn4c1*6qH4SN`9Z^Rev#vdPSuCgvhBx6Z8RD1Rrad$xCWshOp=Q}GLE=UATV1JVfq O0000 Date: Mon, 29 May 2023 00:51:37 +0200 Subject: [PATCH 30/40] =?UTF-8?q?=E2=9C=A8=20Implements=20the=20zoom=20fun?= =?UTF-8?q?ctionality?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../FrmCaptchaSolver.Designer.cs | 341 +++++++++--------- .../FrmCaptchaSolver.cs | 52 +++ .../FrmZoom.Designer.cs | 75 ++++ .../MK_EAM_Captcha_Solver_UI_Lib/FrmZoom.cs | 65 ++++ .../MK_EAM_Captcha_Solver_UI_Lib/FrmZoom.resx | 120 ++++++ .../MK_EAM_Captcha_Solver_UI_Lib.csproj | 9 + 6 files changed, 493 insertions(+), 169 deletions(-) create mode 100644 Libraries/MK_EAM_Captcha_Solver_UI_Lib/FrmZoom.Designer.cs create mode 100644 Libraries/MK_EAM_Captcha_Solver_UI_Lib/FrmZoom.cs create mode 100644 Libraries/MK_EAM_Captcha_Solver_UI_Lib/FrmZoom.resx diff --git a/Libraries/MK_EAM_Captcha_Solver_UI_Lib/FrmCaptchaSolver.Designer.cs b/Libraries/MK_EAM_Captcha_Solver_UI_Lib/FrmCaptchaSolver.Designer.cs index fa87a915..3848e53f 100644 --- a/Libraries/MK_EAM_Captcha_Solver_UI_Lib/FrmCaptchaSolver.Designer.cs +++ b/Libraries/MK_EAM_Captcha_Solver_UI_Lib/FrmCaptchaSolver.Designer.cs @@ -28,57 +28,57 @@ protected override void Dispose(bool disposing) /// private void InitializeComponent() { + Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderEdges borderEdges1 = new Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderEdges(); + Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderEdges borderEdges2 = new Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderEdges(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmCaptchaSolver)); - Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderEdges borderEdges27 = new Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderEdges(); - Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderEdges borderEdges28 = new Bunifu.UI.WinForms.BunifuButton.BunifuButton.BorderEdges(); this.pTopContent = new System.Windows.Forms.Panel(); this.pTop = new System.Windows.Forms.Panel(); - this.pbMinimize = new System.Windows.Forms.PictureBox(); - this.pbClose = new System.Windows.Forms.PictureBox(); this.panel3 = new System.Windows.Forms.Panel(); this.pHeader = new System.Windows.Forms.Panel(); this.lBeta = new System.Windows.Forms.Label(); this.lHeaderCaptchaAid = new System.Windows.Forms.Label(); this.lEAMHead = new System.Windows.Forms.Label(); - this.pbHeader = new Bunifu.UI.WinForms.BunifuPictureBox(); this.pMessage = new System.Windows.Forms.Panel(); this.lMessage = new System.Windows.Forms.Label(); this.pContent = new System.Windows.Forms.Panel(); this.pCaptcha = new System.Windows.Forms.Panel(); this.pActions = new System.Windows.Forms.Panel(); this.lTriesLeft = new System.Windows.Forms.Label(); - this.btnReset = new Bunifu.UI.WinForms.BunifuButton.BunifuButton(); - this.btnSubmit = new Bunifu.UI.WinForms.BunifuButton.BunifuButton(); - this.pbCaptchaMain = new System.Windows.Forms.PictureBox(); - this.pbCaptchaQuestion = new System.Windows.Forms.PictureBox(); this.pCaptchaText = new System.Windows.Forms.Panel(); this.lQuestion = new System.Windows.Forms.Label(); this.pTools = new System.Windows.Forms.Panel(); this.pToolsContent = new System.Windows.Forms.Panel(); + this.pToolsTop = new System.Windows.Forms.Panel(); + this.formDock = new Bunifu.UI.WinForms.BunifuFormDock(); + this.btnReset = new Bunifu.UI.WinForms.BunifuButton.BunifuButton(); + this.btnSubmit = new Bunifu.UI.WinForms.BunifuButton.BunifuButton(); + this.pbCaptchaMain = new System.Windows.Forms.PictureBox(); + this.pbCaptchaQuestion = new System.Windows.Forms.PictureBox(); this.pbGrayScale = new System.Windows.Forms.PictureBox(); this.pbZoom = new System.Windows.Forms.PictureBox(); this.pbShowNumbers = new System.Windows.Forms.PictureBox(); - this.pToolsTop = new System.Windows.Forms.Panel(); - this.formDock = new Bunifu.UI.WinForms.BunifuFormDock(); + this.pbMinimize = new System.Windows.Forms.PictureBox(); + this.pbClose = new System.Windows.Forms.PictureBox(); + this.pbHeader = new Bunifu.UI.WinForms.BunifuPictureBox(); this.pTopContent.SuspendLayout(); this.pTop.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.pbMinimize)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.pbClose)).BeginInit(); this.panel3.SuspendLayout(); this.pHeader.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.pbHeader)).BeginInit(); this.pMessage.SuspendLayout(); this.pContent.SuspendLayout(); this.pCaptcha.SuspendLayout(); this.pActions.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.pbCaptchaMain)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.pbCaptchaQuestion)).BeginInit(); this.pCaptchaText.SuspendLayout(); this.pTools.SuspendLayout(); this.pToolsContent.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.pbCaptchaMain)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.pbCaptchaQuestion)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.pbGrayScale)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.pbZoom)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.pbShowNumbers)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.pbMinimize)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.pbClose)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.pbHeader)).BeginInit(); this.SuspendLayout(); // // pTopContent @@ -102,37 +102,6 @@ private void InitializeComponent() this.pTop.Size = new System.Drawing.Size(149, 24); this.pTop.TabIndex = 3; // - // pbMinimize - // - this.pbMinimize.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.pbMinimize.Image = ((System.Drawing.Image)(resources.GetObject("pbMinimize.Image"))); - this.pbMinimize.Location = new System.Drawing.Point(101, 0); - this.pbMinimize.Name = "pbMinimize"; - this.pbMinimize.Size = new System.Drawing.Size(24, 24); - this.pbMinimize.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; - this.pbMinimize.TabIndex = 10; - this.pbMinimize.TabStop = false; - this.pbMinimize.Click += new System.EventHandler(this.pbMinimize_Click); - this.pbMinimize.MouseDown += new System.Windows.Forms.MouseEventHandler(this.pbMinimize_MouseDown); - this.pbMinimize.MouseEnter += new System.EventHandler(this.pbMinimize_MouseEnter); - this.pbMinimize.MouseLeave += new System.EventHandler(this.pbMinimize_MouseLeave); - this.pbMinimize.MouseUp += new System.Windows.Forms.MouseEventHandler(this.pbMinimize_MouseUp); - // - // pbClose - // - this.pbClose.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.pbClose.Image = ((System.Drawing.Image)(resources.GetObject("pbClose.Image"))); - this.pbClose.Location = new System.Drawing.Point(125, 0); - this.pbClose.Name = "pbClose"; - this.pbClose.Size = new System.Drawing.Size(24, 24); - this.pbClose.TabIndex = 9; - this.pbClose.TabStop = false; - this.pbClose.Click += new System.EventHandler(this.pbClose_Click); - this.pbClose.MouseDown += new System.Windows.Forms.MouseEventHandler(this.pbClose_MouseDown); - this.pbClose.MouseEnter += new System.EventHandler(this.pbClose_MouseEnter); - this.pbClose.MouseLeave += new System.EventHandler(this.pbClose_MouseLeave); - this.pbClose.MouseUp += new System.Windows.Forms.MouseEventHandler(this.pbClose_MouseUp); - // // panel3 // this.panel3.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(98)))), ((int)(((byte)(0)))), ((int)(((byte)(238))))); @@ -189,22 +158,6 @@ private void InitializeComponent() this.lEAMHead.TabIndex = 2; this.lEAMHead.Text = "Exalt Account Manager"; // - // pbHeader - // - this.pbHeader.AllowFocused = false; - this.pbHeader.Anchor = System.Windows.Forms.AnchorStyles.None; - this.pbHeader.AutoSizeHeight = true; - this.pbHeader.BorderRadius = 0; - this.pbHeader.Image = global::MK_EAM_Captcha_Solver_UI_Lib.Properties.Resources.puzzle_white_48px1; - this.pbHeader.IsCircle = true; - this.pbHeader.Location = new System.Drawing.Point(6, 6); - this.pbHeader.Name = "pbHeader"; - this.pbHeader.Size = new System.Drawing.Size(48, 48); - this.pbHeader.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; - this.pbHeader.TabIndex = 3; - this.pbHeader.TabStop = false; - this.pbHeader.Type = Bunifu.UI.WinForms.BunifuPictureBox.Types.Square; - // // pMessage // this.pMessage.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(250)))), ((int)(((byte)(250)))), ((int)(((byte)(250))))); @@ -225,7 +178,7 @@ private void InitializeComponent() this.lMessage.Margin = new System.Windows.Forms.Padding(0); this.lMessage.MaximumSize = new System.Drawing.Size(314, 0); this.lMessage.Name = "lMessage"; - this.lMessage.Size = new System.Drawing.Size(314, 63); + this.lMessage.Size = new System.Drawing.Size(314, 0); this.lMessage.TabIndex = 8; this.lMessage.Text = "You need to solve a captcha to log in or refresh the data of the account: \r\n{0}"; this.lMessage.TextAlign = System.Drawing.ContentAlignment.TopCenter; @@ -282,6 +235,99 @@ private void InitializeComponent() this.lTriesLeft.TextAlign = System.Drawing.ContentAlignment.TopCenter; this.lTriesLeft.UseMnemonic = false; // + // pCaptchaText + // + this.pCaptchaText.Controls.Add(this.lQuestion); + this.pCaptchaText.Dock = System.Windows.Forms.DockStyle.Top; + this.pCaptchaText.Location = new System.Drawing.Point(0, 0); + this.pCaptchaText.Name = "pCaptchaText"; + this.pCaptchaText.Size = new System.Drawing.Size(290, 29); + this.pCaptchaText.TabIndex = 2; + // + // lQuestion + // + this.lQuestion.AutoEllipsis = true; + this.lQuestion.Dock = System.Windows.Forms.DockStyle.Fill; + this.lQuestion.Font = new System.Drawing.Font("Segoe UI Semibold", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lQuestion.Location = new System.Drawing.Point(0, 0); + this.lQuestion.Margin = new System.Windows.Forms.Padding(0); + this.lQuestion.MaximumSize = new System.Drawing.Size(290, 0); + this.lQuestion.Name = "lQuestion"; + this.lQuestion.Size = new System.Drawing.Size(290, 0); + this.lQuestion.TabIndex = 9; + this.lQuestion.Text = "Find the following in order"; + this.lQuestion.TextAlign = System.Drawing.ContentAlignment.TopCenter; + this.lQuestion.UseMnemonic = false; + // + // pTools + // + this.pTools.Controls.Add(this.pToolsContent); + this.pTools.Controls.Add(this.pToolsTop); + this.pTools.Dock = System.Windows.Forms.DockStyle.Right; + this.pTools.Location = new System.Drawing.Point(290, 0); + this.pTools.Name = "pTools"; + this.pTools.Size = new System.Drawing.Size(24, 422); + this.pTools.TabIndex = 4; + // + // pToolsContent + // + this.pToolsContent.Controls.Add(this.pbGrayScale); + this.pToolsContent.Controls.Add(this.pbZoom); + this.pToolsContent.Controls.Add(this.pbShowNumbers); + this.pToolsContent.Dock = System.Windows.Forms.DockStyle.Fill; + this.pToolsContent.Location = new System.Drawing.Point(0, 91); + this.pToolsContent.Name = "pToolsContent"; + this.pToolsContent.Size = new System.Drawing.Size(24, 331); + this.pToolsContent.TabIndex = 1; + // + // pToolsTop + // + this.pToolsTop.Dock = System.Windows.Forms.DockStyle.Top; + this.pToolsTop.Location = new System.Drawing.Point(0, 0); + this.pToolsTop.Name = "pToolsTop"; + this.pToolsTop.Size = new System.Drawing.Size(24, 91); + this.pToolsTop.TabIndex = 0; + // + // formDock + // + this.formDock.AllowFormDragging = true; + this.formDock.AllowFormDropShadow = true; + this.formDock.AllowFormResizing = false; + this.formDock.AllowHidingBottomRegion = true; + this.formDock.AllowOpacityChangesWhileDragging = false; + this.formDock.BorderOptions.BottomBorder.BorderColor = System.Drawing.Color.Silver; + this.formDock.BorderOptions.BottomBorder.BorderThickness = 1; + this.formDock.BorderOptions.BottomBorder.ShowBorder = true; + this.formDock.BorderOptions.LeftBorder.BorderColor = System.Drawing.Color.Silver; + this.formDock.BorderOptions.LeftBorder.BorderThickness = 1; + this.formDock.BorderOptions.LeftBorder.ShowBorder = true; + this.formDock.BorderOptions.RightBorder.BorderColor = System.Drawing.Color.Silver; + this.formDock.BorderOptions.RightBorder.BorderThickness = 1; + this.formDock.BorderOptions.RightBorder.ShowBorder = true; + this.formDock.BorderOptions.TopBorder.BorderColor = System.Drawing.Color.Silver; + this.formDock.BorderOptions.TopBorder.BorderThickness = 1; + this.formDock.BorderOptions.TopBorder.ShowBorder = true; + this.formDock.ContainerControl = this; + this.formDock.DockingIndicatorsColor = System.Drawing.Color.FromArgb(((int)(((byte)(202)))), ((int)(((byte)(215)))), ((int)(((byte)(233))))); + this.formDock.DockingIndicatorsOpacity = 0.5D; + this.formDock.DockingOptions.DockAll = true; + this.formDock.DockingOptions.DockBottomLeft = true; + this.formDock.DockingOptions.DockBottomRight = true; + this.formDock.DockingOptions.DockFullScreen = true; + this.formDock.DockingOptions.DockLeft = true; + this.formDock.DockingOptions.DockRight = true; + this.formDock.DockingOptions.DockTopLeft = true; + this.formDock.DockingOptions.DockTopRight = true; + this.formDock.FormDraggingOpacity = 0.9D; + this.formDock.ParentForm = this; + this.formDock.ShowCursorChanges = true; + this.formDock.ShowDockingIndicators = false; + this.formDock.TitleBarOptions.AllowFormDragging = true; + this.formDock.TitleBarOptions.BunifuFormDock = this.formDock; + this.formDock.TitleBarOptions.DoubleClickToExpandWindow = false; + this.formDock.TitleBarOptions.TitleBarControl = this.pTop; + this.formDock.TitleBarOptions.UseBackColorOnDockingIndicators = false; + // // btnReset // this.btnReset.AllowAnimations = true; @@ -301,11 +347,11 @@ private void InitializeComponent() this.btnReset.ColorContrastOnClick = 45; this.btnReset.ColorContrastOnHover = 45; this.btnReset.Cursor = System.Windows.Forms.Cursors.Default; - borderEdges27.BottomLeft = true; - borderEdges27.BottomRight = true; - borderEdges27.TopLeft = true; - borderEdges27.TopRight = true; - this.btnReset.CustomizableEdges = borderEdges27; + borderEdges1.BottomLeft = true; + borderEdges1.BottomRight = true; + borderEdges1.TopLeft = true; + borderEdges1.TopRight = true; + this.btnReset.CustomizableEdges = borderEdges1; this.btnReset.DialogResult = System.Windows.Forms.DialogResult.None; this.btnReset.DisabledBorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(191)))), ((int)(((byte)(191)))), ((int)(((byte)(191))))); this.btnReset.DisabledFillColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); @@ -393,11 +439,11 @@ private void InitializeComponent() this.btnSubmit.ColorContrastOnClick = 45; this.btnSubmit.ColorContrastOnHover = 45; this.btnSubmit.Cursor = System.Windows.Forms.Cursors.Default; - borderEdges28.BottomLeft = true; - borderEdges28.BottomRight = true; - borderEdges28.TopLeft = true; - borderEdges28.TopRight = true; - this.btnSubmit.CustomizableEdges = borderEdges28; + borderEdges2.BottomLeft = true; + borderEdges2.BottomRight = true; + borderEdges2.TopLeft = true; + borderEdges2.TopRight = true; + this.btnSubmit.CustomizableEdges = borderEdges2; this.btnSubmit.DialogResult = System.Windows.Forms.DialogResult.None; this.btnSubmit.DisabledBorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(191)))), ((int)(((byte)(191)))), ((int)(((byte)(191))))); this.btnSubmit.DisabledFillColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204))))); @@ -478,6 +524,9 @@ private void InitializeComponent() this.pbCaptchaMain.TabStop = false; this.pbCaptchaMain.Paint += new System.Windows.Forms.PaintEventHandler(this.pbCaptchaMain_Paint); this.pbCaptchaMain.MouseDown += new System.Windows.Forms.MouseEventHandler(this.pbCaptchaMain_MouseDown); + this.pbCaptchaMain.MouseEnter += new System.EventHandler(this.pbCaptchaMain_MouseEnter); + this.pbCaptchaMain.MouseLeave += new System.EventHandler(this.pbCaptchaMain_MouseLeave); + this.pbCaptchaMain.MouseMove += new System.Windows.Forms.MouseEventHandler(this.pbCaptchaMain_MouseMove); // // pbCaptchaQuestion // @@ -489,51 +538,6 @@ private void InitializeComponent() this.pbCaptchaQuestion.TabIndex = 0; this.pbCaptchaQuestion.TabStop = false; // - // pCaptchaText - // - this.pCaptchaText.Controls.Add(this.lQuestion); - this.pCaptchaText.Dock = System.Windows.Forms.DockStyle.Top; - this.pCaptchaText.Location = new System.Drawing.Point(0, 0); - this.pCaptchaText.Name = "pCaptchaText"; - this.pCaptchaText.Size = new System.Drawing.Size(290, 29); - this.pCaptchaText.TabIndex = 2; - // - // lQuestion - // - this.lQuestion.AutoEllipsis = true; - this.lQuestion.Dock = System.Windows.Forms.DockStyle.Fill; - this.lQuestion.Font = new System.Drawing.Font("Segoe UI Semibold", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lQuestion.Location = new System.Drawing.Point(0, 0); - this.lQuestion.Margin = new System.Windows.Forms.Padding(0); - this.lQuestion.MaximumSize = new System.Drawing.Size(290, 0); - this.lQuestion.Name = "lQuestion"; - this.lQuestion.Size = new System.Drawing.Size(290, 29); - this.lQuestion.TabIndex = 9; - this.lQuestion.Text = "Find the following in order"; - this.lQuestion.TextAlign = System.Drawing.ContentAlignment.TopCenter; - this.lQuestion.UseMnemonic = false; - // - // pTools - // - this.pTools.Controls.Add(this.pToolsContent); - this.pTools.Controls.Add(this.pToolsTop); - this.pTools.Dock = System.Windows.Forms.DockStyle.Right; - this.pTools.Location = new System.Drawing.Point(290, 0); - this.pTools.Name = "pTools"; - this.pTools.Size = new System.Drawing.Size(24, 422); - this.pTools.TabIndex = 4; - // - // pToolsContent - // - this.pToolsContent.Controls.Add(this.pbGrayScale); - this.pToolsContent.Controls.Add(this.pbZoom); - this.pToolsContent.Controls.Add(this.pbShowNumbers); - this.pToolsContent.Dock = System.Windows.Forms.DockStyle.Fill; - this.pToolsContent.Location = new System.Drawing.Point(0, 91); - this.pToolsContent.Name = "pToolsContent"; - this.pToolsContent.Size = new System.Drawing.Size(24, 331); - this.pToolsContent.TabIndex = 1; - // // pbGrayScale // this.pbGrayScale.Dock = System.Windows.Forms.DockStyle.Top; @@ -576,53 +580,52 @@ private void InitializeComponent() this.pbShowNumbers.MouseEnter += new System.EventHandler(this.pbShowNumbers_MouseEnter); this.pbShowNumbers.MouseLeave += new System.EventHandler(this.pbShowNumbers_MouseLeave); // - // pToolsTop + // pbMinimize // - this.pToolsTop.Dock = System.Windows.Forms.DockStyle.Top; - this.pToolsTop.Location = new System.Drawing.Point(0, 0); - this.pToolsTop.Name = "pToolsTop"; - this.pToolsTop.Size = new System.Drawing.Size(24, 91); - this.pToolsTop.TabIndex = 0; + this.pbMinimize.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.pbMinimize.Image = ((System.Drawing.Image)(resources.GetObject("pbMinimize.Image"))); + this.pbMinimize.Location = new System.Drawing.Point(101, 0); + this.pbMinimize.Name = "pbMinimize"; + this.pbMinimize.Size = new System.Drawing.Size(24, 24); + this.pbMinimize.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; + this.pbMinimize.TabIndex = 10; + this.pbMinimize.TabStop = false; + this.pbMinimize.Click += new System.EventHandler(this.pbMinimize_Click); + this.pbMinimize.MouseDown += new System.Windows.Forms.MouseEventHandler(this.pbMinimize_MouseDown); + this.pbMinimize.MouseEnter += new System.EventHandler(this.pbMinimize_MouseEnter); + this.pbMinimize.MouseLeave += new System.EventHandler(this.pbMinimize_MouseLeave); + this.pbMinimize.MouseUp += new System.Windows.Forms.MouseEventHandler(this.pbMinimize_MouseUp); // - // formDock + // pbClose // - this.formDock.AllowFormDragging = true; - this.formDock.AllowFormDropShadow = true; - this.formDock.AllowFormResizing = false; - this.formDock.AllowHidingBottomRegion = true; - this.formDock.AllowOpacityChangesWhileDragging = false; - this.formDock.BorderOptions.BottomBorder.BorderColor = System.Drawing.Color.Silver; - this.formDock.BorderOptions.BottomBorder.BorderThickness = 1; - this.formDock.BorderOptions.BottomBorder.ShowBorder = true; - this.formDock.BorderOptions.LeftBorder.BorderColor = System.Drawing.Color.Silver; - this.formDock.BorderOptions.LeftBorder.BorderThickness = 1; - this.formDock.BorderOptions.LeftBorder.ShowBorder = true; - this.formDock.BorderOptions.RightBorder.BorderColor = System.Drawing.Color.Silver; - this.formDock.BorderOptions.RightBorder.BorderThickness = 1; - this.formDock.BorderOptions.RightBorder.ShowBorder = true; - this.formDock.BorderOptions.TopBorder.BorderColor = System.Drawing.Color.Silver; - this.formDock.BorderOptions.TopBorder.BorderThickness = 1; - this.formDock.BorderOptions.TopBorder.ShowBorder = true; - this.formDock.ContainerControl = this; - this.formDock.DockingIndicatorsColor = System.Drawing.Color.FromArgb(((int)(((byte)(202)))), ((int)(((byte)(215)))), ((int)(((byte)(233))))); - this.formDock.DockingIndicatorsOpacity = 0.5D; - this.formDock.DockingOptions.DockAll = true; - this.formDock.DockingOptions.DockBottomLeft = true; - this.formDock.DockingOptions.DockBottomRight = true; - this.formDock.DockingOptions.DockFullScreen = true; - this.formDock.DockingOptions.DockLeft = true; - this.formDock.DockingOptions.DockRight = true; - this.formDock.DockingOptions.DockTopLeft = true; - this.formDock.DockingOptions.DockTopRight = true; - this.formDock.FormDraggingOpacity = 0.9D; - this.formDock.ParentForm = this; - this.formDock.ShowCursorChanges = true; - this.formDock.ShowDockingIndicators = false; - this.formDock.TitleBarOptions.AllowFormDragging = true; - this.formDock.TitleBarOptions.BunifuFormDock = this.formDock; - this.formDock.TitleBarOptions.DoubleClickToExpandWindow = false; - this.formDock.TitleBarOptions.TitleBarControl = this.pTop; - this.formDock.TitleBarOptions.UseBackColorOnDockingIndicators = false; + this.pbClose.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.pbClose.Image = ((System.Drawing.Image)(resources.GetObject("pbClose.Image"))); + this.pbClose.Location = new System.Drawing.Point(125, 0); + this.pbClose.Name = "pbClose"; + this.pbClose.Size = new System.Drawing.Size(24, 24); + this.pbClose.TabIndex = 9; + this.pbClose.TabStop = false; + this.pbClose.Click += new System.EventHandler(this.pbClose_Click); + this.pbClose.MouseDown += new System.Windows.Forms.MouseEventHandler(this.pbClose_MouseDown); + this.pbClose.MouseEnter += new System.EventHandler(this.pbClose_MouseEnter); + this.pbClose.MouseLeave += new System.EventHandler(this.pbClose_MouseLeave); + this.pbClose.MouseUp += new System.Windows.Forms.MouseEventHandler(this.pbClose_MouseUp); + // + // pbHeader + // + this.pbHeader.AllowFocused = false; + this.pbHeader.Anchor = System.Windows.Forms.AnchorStyles.None; + this.pbHeader.AutoSizeHeight = true; + this.pbHeader.BorderRadius = 0; + this.pbHeader.Image = global::MK_EAM_Captcha_Solver_UI_Lib.Properties.Resources.puzzle_white_48px1; + this.pbHeader.IsCircle = true; + this.pbHeader.Location = new System.Drawing.Point(6, 6); + this.pbHeader.Name = "pbHeader"; + this.pbHeader.Size = new System.Drawing.Size(48, 48); + this.pbHeader.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; + this.pbHeader.TabIndex = 3; + this.pbHeader.TabStop = false; + this.pbHeader.Type = Bunifu.UI.WinForms.BunifuPictureBox.Types.Square; // // FrmCaptchaSolver // @@ -639,30 +642,30 @@ private void InitializeComponent() this.Margin = new System.Windows.Forms.Padding(4); this.Name = "FrmCaptchaSolver"; this.StartPosition = System.Windows.Forms.FormStartPosition.Manual; - this.Text = "FrmCaptchaSolver"; + this.Text = "Captcha Aid"; this.Activated += new System.EventHandler(this.FrmCaptchaSolver_Activated); this.Paint += new System.Windows.Forms.PaintEventHandler(this.FrmCaptchaSolver_Paint); this.pTopContent.ResumeLayout(false); this.pTop.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.pbMinimize)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.pbClose)).EndInit(); this.panel3.ResumeLayout(false); this.pHeader.ResumeLayout(false); this.pHeader.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.pbHeader)).EndInit(); this.pMessage.ResumeLayout(false); this.pContent.ResumeLayout(false); this.pCaptcha.ResumeLayout(false); this.pActions.ResumeLayout(false); this.pActions.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.pbCaptchaMain)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.pbCaptchaQuestion)).EndInit(); this.pCaptchaText.ResumeLayout(false); this.pTools.ResumeLayout(false); this.pToolsContent.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.pbCaptchaMain)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.pbCaptchaQuestion)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.pbGrayScale)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.pbZoom)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.pbShowNumbers)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.pbMinimize)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.pbClose)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.pbHeader)).EndInit(); this.ResumeLayout(false); } diff --git a/Libraries/MK_EAM_Captcha_Solver_UI_Lib/FrmCaptchaSolver.cs b/Libraries/MK_EAM_Captcha_Solver_UI_Lib/FrmCaptchaSolver.cs index f54d26a9..9c71728b 100644 --- a/Libraries/MK_EAM_Captcha_Solver_UI_Lib/FrmCaptchaSolver.cs +++ b/Libraries/MK_EAM_Captcha_Solver_UI_Lib/FrmCaptchaSolver.cs @@ -3,6 +3,7 @@ using System; using System.Collections.Generic; using System.ComponentModel; +using System.Diagnostics; using System.Drawing; using System.Drawing.Imaging; using System.IO; @@ -49,6 +50,8 @@ protected override CreateParams CreateParams private CaptchaUIConfiguration configuration = new CaptchaUIConfiguration(); + private FrmZoom frmZoom = null; + #region Paths public static readonly string saveFilePath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "ExaltAccountManager"); @@ -83,6 +86,7 @@ public FrmCaptchaSolver(AccountInfo _accountInfo, bool useDarkmode = false) lMessage.Text = string.Format(lMessage.Text, string.IsNullOrEmpty(accountInfo.Name) ? accountInfo.Email : accountInfo.Name); ApplyTheme(); + frmZoom = new FrmZoom(); #region Read configuration @@ -610,5 +614,53 @@ private void SaveConfiguration() } catch { } } + + int offset = 10; + int cutSize = 50; + Point p = new Point(0, 0); + private void pbCaptchaMain_MouseMove(object sender, MouseEventArgs e) + { + if (pbCaptchaMain.Image == null || !configuration.UseZoom) return; + + int halfCutSize = (int)(cutSize * 0.5f); + + p.X = Math.Min(e.X <= halfCutSize ? 0 : e.X - halfCutSize, pbCaptchaMain.Width - cutSize); + p.Y = Math.Min(e.Y <= halfCutSize ? 0 : e.Y - halfCutSize, pbCaptchaMain.Height - cutSize); + + float scale = (float)pbCaptchaMain.Image.Width / (float)pbCaptchaMain.Width; + float scaledCutSize = cutSize * scale; + + Bitmap bmp = new Bitmap((int)scaledCutSize, (int)scaledCutSize); + + using (Graphics g = Graphics.FromImage(bmp)) + { + g.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality; + g.DrawImage(pbCaptchaMain.Image, + new RectangleF(0, 0, scaledCutSize, scaledCutSize), + new RectangleF(p.X * scale, p.Y * scale, scaledCutSize, scaledCutSize), + GraphicsUnit.Pixel); + } + + if (configuration.UseZoom) + { + frmZoom.Image = bmp; + Point pbScreenLocation = pbCaptchaMain.PointToScreen(Point.Empty); + frmZoom.Location = new Point( + pbScreenLocation.X + e.X + offset, + pbScreenLocation.Y + e.Y + offset + ); + } + } + + private void pbCaptchaMain_MouseEnter(object sender, EventArgs e) + { + if (configuration.UseZoom) + frmZoom?.Show(this); + } + + private void pbCaptchaMain_MouseLeave(object sender, EventArgs e) + { + frmZoom?.Hide(); + } } } diff --git a/Libraries/MK_EAM_Captcha_Solver_UI_Lib/FrmZoom.Designer.cs b/Libraries/MK_EAM_Captcha_Solver_UI_Lib/FrmZoom.Designer.cs new file mode 100644 index 00000000..e1c58fcc --- /dev/null +++ b/Libraries/MK_EAM_Captcha_Solver_UI_Lib/FrmZoom.Designer.cs @@ -0,0 +1,75 @@ +namespace MK_EAM_Captcha_Solver_UI_Lib +{ + partial class FrmZoom + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.pbZoom = new System.Windows.Forms.PictureBox(); + ((System.ComponentModel.ISupportInitialize)(this.pbZoom)).BeginInit(); + this.SuspendLayout(); + // + // pbZoom + // + this.pbZoom.Dock = System.Windows.Forms.DockStyle.Fill; + this.pbZoom.Location = new System.Drawing.Point(0, 0); + this.pbZoom.Name = "pbZoom"; + this.pbZoom.Size = new System.Drawing.Size(101, 101); + this.pbZoom.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; + this.pbZoom.TabIndex = 0; + this.pbZoom.TabStop = false; + this.pbZoom.Paint += new System.Windows.Forms.PaintEventHandler(this.pbZoom_Paint); + // + // FrmZoom + // + this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 17F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.AutoValidate = System.Windows.Forms.AutoValidate.Disable; + this.BackColor = System.Drawing.Color.White; + this.CausesValidation = false; + this.ClientSize = new System.Drawing.Size(101, 101); + this.Controls.Add(this.pbZoom); + this.Font = new System.Drawing.Font("Segoe UI Semibold", 9.75F, System.Drawing.FontStyle.Bold); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; + this.Margin = new System.Windows.Forms.Padding(4); + this.MaximizeBox = false; + this.MaximumSize = new System.Drawing.Size(101, 101); + this.MinimizeBox = false; + this.Name = "FrmZoom"; + this.ShowIcon = false; + this.ShowInTaskbar = false; + this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide; + this.StartPosition = System.Windows.Forms.FormStartPosition.Manual; + ((System.ComponentModel.ISupportInitialize)(this.pbZoom)).EndInit(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.PictureBox pbZoom; + } +} \ No newline at end of file diff --git a/Libraries/MK_EAM_Captcha_Solver_UI_Lib/FrmZoom.cs b/Libraries/MK_EAM_Captcha_Solver_UI_Lib/FrmZoom.cs new file mode 100644 index 00000000..2b58529f --- /dev/null +++ b/Libraries/MK_EAM_Captcha_Solver_UI_Lib/FrmZoom.cs @@ -0,0 +1,65 @@ +using System; +using System.Drawing; +using System.Runtime.InteropServices; +using System.Windows.Forms; + +namespace MK_EAM_Captcha_Solver_UI_Lib +{ + public partial class FrmZoom : Form + { + public Image Image + { + set + { + pbZoom.Image = value; + } + } + + public Point AimLocation + { + set + { + aimLocation = value; + pbZoom.Refresh(); + } + } + private Point aimLocation = new Point(50, 50); + + [DllImport("Gdi32.dll", EntryPoint = "CreateRoundRectRgn")] + private static extern IntPtr CreateRoundRectRgn + ( + int nLeftRect, // x-coordinate of upper-left corner + int nTopRect, // y-coordinate of upper-left corner + int nRightRect, // x-coordinate of lower-right corner + int nBottomRect, // y-coordinate of lower-right corner + int nWidthEllipse, // width of ellipse + int nHeightEllipse // height of ellipse + ); + + public FrmZoom() + { + InitializeComponent(); + Region = System.Drawing.Region.FromHrgn(CreateRoundRectRgn(0, 0, Width, Height, 11, 11)); + AimLocation = new Point( + this.Width / 2, + this.Height / 2); + } + + private void pbZoom_Paint(object sender, PaintEventArgs e) + { + using (Pen p = new Pen(Color.FromArgb(98, 0, 238), 1f)) + { + e.Graphics.DrawLine( + p, + new Point(0, aimLocation.Y), + new Point(pbZoom.Width, aimLocation.Y) + ); + e.Graphics.DrawLine( + p, + new Point(aimLocation.X, 0), + new Point(aimLocation.X, pbZoom.Height) + ); + } + } + } +} diff --git a/Libraries/MK_EAM_Captcha_Solver_UI_Lib/FrmZoom.resx b/Libraries/MK_EAM_Captcha_Solver_UI_Lib/FrmZoom.resx new file mode 100644 index 00000000..1af7de15 --- /dev/null +++ b/Libraries/MK_EAM_Captcha_Solver_UI_Lib/FrmZoom.resx @@ -0,0 +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 + + \ No newline at end of file diff --git a/Libraries/MK_EAM_Captcha_Solver_UI_Lib/MK_EAM_Captcha_Solver_UI_Lib.csproj b/Libraries/MK_EAM_Captcha_Solver_UI_Lib/MK_EAM_Captcha_Solver_UI_Lib.csproj index 2dc9ccb6..54d2dd58 100644 --- a/Libraries/MK_EAM_Captcha_Solver_UI_Lib/MK_EAM_Captcha_Solver_UI_Lib.csproj +++ b/Libraries/MK_EAM_Captcha_Solver_UI_Lib/MK_EAM_Captcha_Solver_UI_Lib.csproj @@ -328,6 +328,12 @@ FrmCaptchaSolver.cs + + Form + + + FrmZoom.cs + True True @@ -340,6 +346,9 @@ FrmCaptchaSolver.cs + + FrmZoom.cs + ResXFileCodeGenerator From 7dc9c84b448bc4e39169347d5f44c6068d645658 Mon Sep 17 00:00:00 2001 From: MaikEight Date: Mon, 29 May 2023 02:37:23 +0200 Subject: [PATCH 31/40] =?UTF-8?q?=E2=9C=A8=20Added=20the=20new=20numbers?= =?UTF-8?q?=20mode?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CaptchaUIConfiguration.cs | 2 +- .../FrmCaptchaSolver.cs | 32 ++++++++++++++++++ .../MK_EAM_Captcha_Solver_UI_Lib.csproj | 15 ++++++++ .../Properties/Resources.Designer.cs | 30 ++++++++++++++++ .../Properties/Resources.resx | 9 +++++ .../Resources/1_purple_24px.png | Bin 0 -> 316 bytes .../Resources/1_purple_24px1.png | Bin 0 -> 298 bytes .../Resources/1_purple_24px11.png | Bin 0 -> 298 bytes .../Resources/2_purple_24px.png | Bin 0 -> 479 bytes .../Resources/3_purple_24px.png | Bin 0 -> 503 bytes 10 files changed, 87 insertions(+), 1 deletion(-) create mode 100644 Libraries/MK_EAM_Captcha_Solver_UI_Lib/Resources/1_purple_24px.png create mode 100644 Libraries/MK_EAM_Captcha_Solver_UI_Lib/Resources/1_purple_24px1.png create mode 100644 Libraries/MK_EAM_Captcha_Solver_UI_Lib/Resources/1_purple_24px11.png create mode 100644 Libraries/MK_EAM_Captcha_Solver_UI_Lib/Resources/2_purple_24px.png create mode 100644 Libraries/MK_EAM_Captcha_Solver_UI_Lib/Resources/3_purple_24px.png diff --git a/Libraries/MK_EAM_Captcha_Solver_UI_Lib/CaptchaUIConfiguration.cs b/Libraries/MK_EAM_Captcha_Solver_UI_Lib/CaptchaUIConfiguration.cs index aac8dd68..ac9c2d43 100644 --- a/Libraries/MK_EAM_Captcha_Solver_UI_Lib/CaptchaUIConfiguration.cs +++ b/Libraries/MK_EAM_Captcha_Solver_UI_Lib/CaptchaUIConfiguration.cs @@ -4,7 +4,7 @@ namespace MK_EAM_Captcha_Solver_UI_Lib [System.Serializable] public class CaptchaUIConfiguration { - public bool UseNumbered { get; set; } = false; + public bool UseNumbered { get; set; } = true; public bool UseZoom { get; set; } = false; public bool UseGrayscale { get; set; } = false; } diff --git a/Libraries/MK_EAM_Captcha_Solver_UI_Lib/FrmCaptchaSolver.cs b/Libraries/MK_EAM_Captcha_Solver_UI_Lib/FrmCaptchaSolver.cs index 9c71728b..085d75d3 100644 --- a/Libraries/MK_EAM_Captcha_Solver_UI_Lib/FrmCaptchaSolver.cs +++ b/Libraries/MK_EAM_Captcha_Solver_UI_Lib/FrmCaptchaSolver.cs @@ -406,6 +406,7 @@ private void btnReset_Click(object sender, EventArgs e) pbCaptchaMain.Invalidate(); } + private int imageSize = 24 / 2; private void pbCaptchaMain_Paint(object sender, PaintEventArgs e) { if (!pointsSet.Contains(true)) @@ -413,6 +414,29 @@ private void pbCaptchaMain_Paint(object sender, PaintEventArgs e) e.Graphics.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.AntiAlias; + + if (configuration.UseNumbered) + { + List list = new List(); + for (int i = 0; i < points.Length; i++) + { + if (pointsSet[i]) + { + list.Add(new NumberImagePoint() + { + Point = new PointF(points[i].X - imageSize, points[i].Y - imageSize), + Number = i + 1 + }); + } + } + + foreach (NumberImagePoint nip in list) + { + e.Graphics.DrawImage((Image)Properties.Resources.ResourceManager.GetObject($"_{nip.Number}_purple_24px"), nip.Point); + } + + return; + } List rectangles = new List(); for (int i = 0; i < points.Length; i++) @@ -555,6 +579,8 @@ private void pbShowNumbers_Click(object sender, EventArgs e) configuration.UseNumbered = !configuration.UseNumbered; pbShowNumbers_MouseEnter(sender, e); + pbCaptchaMain.Invalidate(); + SaveConfiguration(); } @@ -662,5 +688,11 @@ private void pbCaptchaMain_MouseLeave(object sender, EventArgs e) { frmZoom?.Hide(); } + + public sealed class NumberImagePoint + { + public int Number { get; set; } + public PointF Point { get; set; } + } } } diff --git a/Libraries/MK_EAM_Captcha_Solver_UI_Lib/MK_EAM_Captcha_Solver_UI_Lib.csproj b/Libraries/MK_EAM_Captcha_Solver_UI_Lib/MK_EAM_Captcha_Solver_UI_Lib.csproj index 54d2dd58..72cc8bf2 100644 --- a/Libraries/MK_EAM_Captcha_Solver_UI_Lib/MK_EAM_Captcha_Solver_UI_Lib.csproj +++ b/Libraries/MK_EAM_Captcha_Solver_UI_Lib/MK_EAM_Captcha_Solver_UI_Lib.csproj @@ -420,6 +420,21 @@ + + + + + + + + + + + + + + + diff --git a/Libraries/MK_EAM_Captcha_Solver_UI_Lib/Properties/Resources.Designer.cs b/Libraries/MK_EAM_Captcha_Solver_UI_Lib/Properties/Resources.Designer.cs index 68e716be..b3cb6da2 100644 --- a/Libraries/MK_EAM_Captcha_Solver_UI_Lib/Properties/Resources.Designer.cs +++ b/Libraries/MK_EAM_Captcha_Solver_UI_Lib/Properties/Resources.Designer.cs @@ -60,6 +60,36 @@ internal Resources() { } } + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap _1_purple_24px { + get { + object obj = ResourceManager.GetObject("_1_purple_24px", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap _2_purple_24px { + get { + object obj = ResourceManager.GetObject("_2_purple_24px", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap _3_purple_24px { + get { + object obj = ResourceManager.GetObject("_3_purple_24px", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// diff --git a/Libraries/MK_EAM_Captcha_Solver_UI_Lib/Properties/Resources.resx b/Libraries/MK_EAM_Captcha_Solver_UI_Lib/Properties/Resources.resx index 03cd1832..b5a0a7cd 100644 --- a/Libraries/MK_EAM_Captcha_Solver_UI_Lib/Properties/Resources.resx +++ b/Libraries/MK_EAM_Captcha_Solver_UI_Lib/Properties/Resources.resx @@ -169,4 +169,13 @@ ..\Resources\numbered_list_black_24px.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\1_purple_24px.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\2_purple_24px.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\3_purple_24px.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + \ No newline at end of file diff --git a/Libraries/MK_EAM_Captcha_Solver_UI_Lib/Resources/1_purple_24px.png b/Libraries/MK_EAM_Captcha_Solver_UI_Lib/Resources/1_purple_24px.png new file mode 100644 index 0000000000000000000000000000000000000000..8116bdb92a2c8ea446325abd6b959e864826ffbb GIT binary patch literal 316 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM1|%Pp+x`GjjKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCij$3p^r=85sBugD~Uq{1quc!Hb?Qjv*f2$r7wB49Zj3npN7qH}dfO|J~rj z+QD)1!NGdAV@*GKnxq%ju&HVAvi@Jr$XUe8&dBQ4Az9Fn#@Ng_5FdzPJw_pYnbLE4B^=!wQe)2R)C*GQwz{BykUTQ*Ef`Yt; zfl)#h-tF`%0VRdMp(KtiL zWesbJB;O^IEJh8H4@tAw1p_5{pSdK&F{GPF%$Jz;%+6u^14+YmN(-KGZnEiOJ#b2i rTjQrp$4S@o4W<$&c#6LEyVNo~e_5FdzPJw_pYnbLE4B^=!wQe)2R)C*GQwz{BykUTQ*Ef`Yt; zfl)#h-tF`%0VRdMp(KtiL zWesbJB;O^IEJh8H4@tAw1p_5{pSdK&F{GPF%$Jz;%+6u^14+YmN(-KGZnEiOJ#b2i rTjQrp$4S@o4W<$&c#6LEyVNo~ePx#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D0dz@3K~zXf?UPMQ z0znwZ|0|@sYAh{uiikRU3G7(c4h9L)c8RDgvcNCUwNn&AD7`>Nhal<$M3?S;iXcQi zRBB~OMY}zYgS7Utv#Upcu>7By-JKu1^9(xJA@O9yP>h&Bips(IjAL#LAaM-sf{)?h z$)LseDBLbyV~7^q!T?W3v!Lw=2^3Yr{GlJoyozK&Mf}WZME7Aft?;}5BP0k<`Cw89>_jR^PgdAmXxz)v4k1B8D`Ux1!b{PF z++BaA`a}&WfRLa8{r2finU$AYZ!GO_B#3Uv7>;^zefo~8RGS51y$ciT3hwBvo~*s{ zS$l*8eIXAPG68&k0Q)n~sFrER1rZXgo(CWYB|H`kj4jKUJMgnh1j}hz1hvU8WXzu0 z{Ew3rlS;g@as;jMtdPJd-v!Rv)CJ9g9M4wB@?=;9^j#|y`TEEeIXd5QUUv`y_yRtE VRKTdLTMhsK002ovPDHLkV1kk4%s~JE literal 0 HcmV?d00001 diff --git a/Libraries/MK_EAM_Captcha_Solver_UI_Lib/Resources/3_purple_24px.png b/Libraries/MK_EAM_Captcha_Solver_UI_Lib/Resources/3_purple_24px.png new file mode 100644 index 0000000000000000000000000000000000000000..1e305d78716d57df67cf2908bc5481444721a487 GIT binary patch literal 503 zcmVPx#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D0gOpRK~zXf?Ug@B zLQxdPzxUK$sP(izP=a6t4bhTYLsLO*;m}r4EkQv0=;|{vi>& zw_Vu2F`>_)!_#%1Rn_4#@NZ;r@6W+LE@F7XfV=Z7E>| Date: Mon, 29 May 2023 03:34:39 +0200 Subject: [PATCH 32/40] =?UTF-8?q?=F0=9F=92=84=20Improved=20the=20crosshair?= =?UTF-8?q?=20to=20display=20a=20more=20accurate=20position?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../FrmCaptchaSolver.cs | 13 ++++++++++-- .../MK_EAM_Captcha_Solver_UI_Lib/FrmZoom.cs | 21 +++++++++++-------- 2 files changed, 23 insertions(+), 11 deletions(-) diff --git a/Libraries/MK_EAM_Captcha_Solver_UI_Lib/FrmCaptchaSolver.cs b/Libraries/MK_EAM_Captcha_Solver_UI_Lib/FrmCaptchaSolver.cs index 085d75d3..74dfd2dc 100644 --- a/Libraries/MK_EAM_Captcha_Solver_UI_Lib/FrmCaptchaSolver.cs +++ b/Libraries/MK_EAM_Captcha_Solver_UI_Lib/FrmCaptchaSolver.cs @@ -401,6 +401,7 @@ private void btnReset_Click(object sender, EventArgs e) return; pointsSet = new bool[3] { false, false, false }; points = new PointF[3] { new PointF(), new PointF(), new PointF() }; + currentPoint = 0; btnSubmit.Enabled = false; pbCaptchaMain.Invalidate(); @@ -421,7 +422,7 @@ private void pbCaptchaMain_Paint(object sender, PaintEventArgs e) for (int i = 0; i < points.Length; i++) { if (pointsSet[i]) - { + { list.Add(new NumberImagePoint() { Point = new PointF(points[i].X - imageSize, points[i].Y - imageSize), @@ -515,7 +516,7 @@ private byte[] ImageToByteArray(Image img) public Bitmap GetGrayscaledImage(Bitmap original) { - if(original == null) + if (original == null) return null; //create a blank bitmap the same size as original @@ -667,9 +668,17 @@ private void pbCaptchaMain_MouseMove(object sender, MouseEventArgs e) GraphicsUnit.Pixel); } + PointF scaledMousePosition = new PointF(e.X * scale, e.Y * scale); + PointF scaledImageStartPoint = new PointF(p.X * scale, p.Y * scale); + + PointF result = new PointF( + scaledMousePosition.X - scaledImageStartPoint.X, + scaledMousePosition.Y - scaledImageStartPoint.Y); + if (configuration.UseZoom) { frmZoom.Image = bmp; + frmZoom.AimLocation = result; Point pbScreenLocation = pbCaptchaMain.PointToScreen(Point.Empty); frmZoom.Location = new Point( pbScreenLocation.X + e.X + offset, diff --git a/Libraries/MK_EAM_Captcha_Solver_UI_Lib/FrmZoom.cs b/Libraries/MK_EAM_Captcha_Solver_UI_Lib/FrmZoom.cs index 2b58529f..d4d73420 100644 --- a/Libraries/MK_EAM_Captcha_Solver_UI_Lib/FrmZoom.cs +++ b/Libraries/MK_EAM_Captcha_Solver_UI_Lib/FrmZoom.cs @@ -12,10 +12,12 @@ public Image Image set { pbZoom.Image = value; + if (value == null) return; + scale = (float)pbZoom.Width / (float)value.Width ; } } - public Point AimLocation + public PointF AimLocation { set { @@ -23,7 +25,8 @@ public Point AimLocation pbZoom.Refresh(); } } - private Point aimLocation = new Point(50, 50); + private PointF aimLocation = new PointF(50, 50); + private float scale = 1f; [DllImport("Gdi32.dll", EntryPoint = "CreateRoundRectRgn")] private static extern IntPtr CreateRoundRectRgn @@ -40,9 +43,9 @@ public FrmZoom() { InitializeComponent(); Region = System.Drawing.Region.FromHrgn(CreateRoundRectRgn(0, 0, Width, Height, 11, 11)); - AimLocation = new Point( - this.Width / 2, - this.Height / 2); + AimLocation = new PointF( + this.Width / 2f, + this.Height / 2f); } private void pbZoom_Paint(object sender, PaintEventArgs e) @@ -51,13 +54,13 @@ private void pbZoom_Paint(object sender, PaintEventArgs e) { e.Graphics.DrawLine( p, - new Point(0, aimLocation.Y), - new Point(pbZoom.Width, aimLocation.Y) + new PointF(0, aimLocation.Y * scale), + new PointF(pbZoom.Width, aimLocation.Y * scale) ); e.Graphics.DrawLine( p, - new Point(aimLocation.X, 0), - new Point(aimLocation.X, pbZoom.Height) + new PointF(aimLocation.X * scale, 0), + new PointF(aimLocation.X * scale, pbZoom.Height) ); } } From a6c5cf361eac95354a65b4aae472c3d4bb7f769f Mon Sep 17 00:00:00 2001 From: MaikEight Date: Mon, 29 May 2023 04:52:48 +0200 Subject: [PATCH 33/40] =?UTF-8?q?=F0=9F=90=9B=20Fixed=20crashing=20bug=20d?= =?UTF-8?q?uring=20adding=20of=20captcha=20locked=20accounts?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ExaltAccountManager/UI/UIAddAccount.cs | 16 ++++++++++++- ExaltAccountManager/UI/UIChangelog.cs | 23 +++++++++++++------ .../FrmCaptchaSolver.cs | 17 +++++++------- 3 files changed, 39 insertions(+), 17 deletions(-) diff --git a/ExaltAccountManager/UI/UIAddAccount.cs b/ExaltAccountManager/UI/UIAddAccount.cs index cb737519..86e0a88b 100644 --- a/ExaltAccountManager/UI/UIAddAccount.cs +++ b/ExaltAccountManager/UI/UIAddAccount.cs @@ -129,7 +129,13 @@ private void RequestDone(MK_EAM_Lib.AccountInfo _info) { if (_info.requestState == MK_EAM_Lib.AccountInfo.RequestState.Captcha) { - CaptchaSolverUiUtils.Show(_info, frm, frm.UseDarkmode, frm.LogEvent, "EAM", frm.accountStatsPath, frm.itemsSaveFilePath, frm.GetDeviceUniqueIdentifier(), !toggleCustomAccountname.Checked, true, RequestDone); + bool success = ShowCaptcha(_info); + if (!success) + { + frm.ShowSnackbar("Captcha solving failed, please try again later.", Bunifu.UI.WinForms.BunifuSnackbar.MessageTypes.Warning, 5000); + ResetUI(false); + } + return; } if (string.IsNullOrEmpty(_info.name) || _info.requestState != MK_EAM_Lib.AccountInfo.RequestState.Success) @@ -147,6 +153,14 @@ private void RequestDone(MK_EAM_Lib.AccountInfo _info) } } + private bool ShowCaptcha(MK_EAM_Lib.AccountInfo _info) + { + if (this.InvokeRequired) + return (bool)this.Invoke((Func)ShowCaptcha, _info); + + return CaptchaSolverUiUtils.Show(_info, frm, frm.UseDarkmode, frm.LogEvent, "EAM", frm.accountStatsPath, frm.itemsSaveFilePath, frm.GetDeviceUniqueIdentifier(), !toggleCustomAccountname.Checked, true, RequestDone); + } + private bool ResetUI(bool success = true) { if (this.InvokeRequired) diff --git a/ExaltAccountManager/UI/UIChangelog.cs b/ExaltAccountManager/UI/UIChangelog.cs index aeb10102..62e1cf3a 100644 --- a/ExaltAccountManager/UI/UIChangelog.cs +++ b/ExaltAccountManager/UI/UIChangelog.cs @@ -14,23 +14,32 @@ public sealed partial class UIChangelog : UserControl { new ChangelogEntry() { - ReleaseDate = new DateTime(2023, 05, 26), + ReleaseDate = new DateTime(2023, 05, 31), Version = new Version(3, 2, 0), - Name = "Discord integration update, and bug fixes", - Description = $"DISCORD INTEGRATION{Environment.NewLine}{Environment.NewLine}" + + Name = "Captcha Aid improvements, discord update and bug fixes", + Description = $"CAPTCHA AID{Environment.NewLine}{Environment.NewLine}" + + $"- Made the Captcha Aid more descriptive.{Environment.NewLine}" + + $"- Added a new numberd-list mode (new default).{Environment.NewLine}" + + $"- Added a zoom mode.{Environment.NewLine}" + + $"- Added a grayscaling mode.{Environment.NewLine}{Environment.NewLine}" + + $"DISCORD INTEGRATION{Environment.NewLine}" + $"- Added an opt-out for the discord integration. :({Environment.NewLine}" + $"- Added an option to link your discord user with your EAM-account.{Environment.NewLine}" + + $"- Added a new button to view your own EAM usage data.{Environment.NewLine}" + + $"   This only shows up if you connected the discordUserId with EAM.{Environment.NewLine}" + $"   This allows you to earn cool roles and bonuses on the EAM-Discord server.{Environment.NewLine}{Environment.NewLine}" + $"MISCELLANEOUS{Environment.NewLine}" + - $"- Made the Captcha Aid more descriptive.{Environment.NewLine}" + $"- Made the Accounts list select the first in the list upon filtering by{Environment.NewLine}" + $"   accountname / email.{Environment.NewLine}" + - $"- Reduced the time \"Refresh data\"-button is \"blocked\" after use.{Environment.NewLine}{Environment.NewLine}" + - $"- The Llama did upgrade!" + + $"- Reduced the time \"Refresh data\"-button is \"blocked\" after use.{Environment.NewLine}" + + $"- The Llama received an upgrade!{Environment.NewLine}" + + $"- Updated dependencies{Environment.NewLine}{Environment.NewLine}" + $"BUG FIXES{Environment.NewLine}" + $"- Fixed the snackbar displaying and error after a successfull captcha.{Environment.NewLine}" + + $"- Fixed a critical bug that caused crashing during scrolling with about 13k+ accounts.{Environment.NewLine}" + $"- Fixed the default export location to bot be inside the application folder, since this{Environment.NewLine}" + - $"   leads to unauthorized exceptions on installed versions.{Environment.NewLine}{Environment.NewLine}" + $"   leads to unauthorized exceptions on installed versions.{Environment.NewLine}" + + $"- Fixed the same thing for renders.png and items.cfg of the Vault Peeker.{Environment.NewLine}{Environment.NewLine}" }, new ChangelogEntry() { diff --git a/Libraries/MK_EAM_Captcha_Solver_UI_Lib/FrmCaptchaSolver.cs b/Libraries/MK_EAM_Captcha_Solver_UI_Lib/FrmCaptchaSolver.cs index 74dfd2dc..ff4d5af7 100644 --- a/Libraries/MK_EAM_Captcha_Solver_UI_Lib/FrmCaptchaSolver.cs +++ b/Libraries/MK_EAM_Captcha_Solver_UI_Lib/FrmCaptchaSolver.cs @@ -666,19 +666,18 @@ private void pbCaptchaMain_MouseMove(object sender, MouseEventArgs e) new RectangleF(0, 0, scaledCutSize, scaledCutSize), new RectangleF(p.X * scale, p.Y * scale, scaledCutSize, scaledCutSize), GraphicsUnit.Pixel); - } - - PointF scaledMousePosition = new PointF(e.X * scale, e.Y * scale); - PointF scaledImageStartPoint = new PointF(p.X * scale, p.Y * scale); - - PointF result = new PointF( - scaledMousePosition.X - scaledImageStartPoint.X, - scaledMousePosition.Y - scaledImageStartPoint.Y); + } if (configuration.UseZoom) { + PointF scaledMousePosition = new PointF(e.X * scale, e.Y * scale); + PointF scaledImageStartPoint = new PointF(p.X * scale, p.Y * scale); + frmZoom.Image = bmp; - frmZoom.AimLocation = result; + frmZoom.AimLocation = new PointF( + scaledMousePosition.X - scaledImageStartPoint.X, + scaledMousePosition.Y - scaledImageStartPoint.Y); + Point pbScreenLocation = pbCaptchaMain.PointToScreen(Point.Empty); frmZoom.Location = new Point( pbScreenLocation.X + e.X + offset, From 06a90a038b13b8e63555318dd903275e2eaf0611 Mon Sep 17 00:00:00 2001 From: MaikEight Date: Mon, 29 May 2023 20:48:10 +0200 Subject: [PATCH 34/40] =?UTF-8?q?=F0=9F=9B=82=20Updated=20app.manifest?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ExaltAccountManager/UI/UIOptions.cs | 4 ++ ExaltAccountManager/app.manifest | 78 +++++++++++++++-------------- 2 files changed, 44 insertions(+), 38 deletions(-) diff --git a/ExaltAccountManager/UI/UIOptions.cs b/ExaltAccountManager/UI/UIOptions.cs index 03e29853..451bbd15 100644 --- a/ExaltAccountManager/UI/UIOptions.cs +++ b/ExaltAccountManager/UI/UIOptions.cs @@ -34,6 +34,8 @@ private void UIOptions_Load(object sender, EventArgs e) private void ApplyTheme(object sender, EventArgs e) { + #region ApplyTheme + Color def = ColorScheme.GetColorDef(frm.UseDarkmode); Color second = ColorScheme.GetColorSecond(frm.UseDarkmode); Color third = ColorScheme.GetColorThird(frm.UseDarkmode); @@ -67,6 +69,8 @@ private void ApplyTheme(object sender, EventArgs e) } MK_EAM_Lib.FormsUtils.ResumeDrawing(this); + + #endregion } public void ApplyOptions() diff --git a/ExaltAccountManager/app.manifest b/ExaltAccountManager/app.manifest index a135a04e..7c31d30b 100644 --- a/ExaltAccountManager/app.manifest +++ b/ExaltAccountManager/app.manifest @@ -1,10 +1,10 @@  - - - - - - - - - - - - - - - - - Windows Vista - + Windows Vista + - Windows 7 - + Windows 7 + - Windows 8 - + Windows 8 + - Windows 8.1 - + Windows 8.1 + - Windows 10 - - - - - - + - + @@ -15,30 +15,26 @@ - - + + - - + + - - + + - - + + - - - - - - - - + + + + @@ -46,106 +42,114 @@ - - - - - - + + - - - - - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + + + + + + + + + + + + + + + + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + @@ -155,7 +159,7 @@ - + @@ -167,7 +171,7 @@ - + @@ -177,7 +181,7 @@ - + @@ -200,35 +204,36 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +