From 41b09152d32cf0826411fbeed67f3a921b7b2f56 Mon Sep 17 00:00:00 2001 From: McMistrzYT <56406996+McMistrzYT@users.noreply.github.com> Date: Tue, 23 Jan 2024 00:54:56 +0100 Subject: [PATCH] gui push --- Partypacker.sln | 16 +-- Partypacker/App.xaml | 15 +++ Partypacker/App.xaml.cs | 14 +++ Partypacker/AssemblyInfo.cs | 10 ++ Partypacker/Classes.cs | 10 ++ Partypacker/Core/AppRegistry.cs | 2 +- Partypacker/Core/Extensions.cs | 2 +- .../Core/{Server.cs => PartypackServer.cs} | 25 +++- Partypacker/Core/Win32.cs | 2 +- Partypacker/MainWindow.xaml | 39 ++++++ Partypacker/MainWindow.xaml.cs | 91 ++++++++++++++ Partypacker/Partypacker.csproj | 23 ++-- Partypacker/Program.cs | 112 ------------------ Partypacker/Proxy/PrivateKeyDeleters.cs | 2 +- Partypacker/Proxy/Proxy.cs | 14 ++- Partypacker/SelectableOption.cs | 20 ---- Partypacker/icon.ico | Bin 270622 -> 0 bytes 17 files changed, 228 insertions(+), 169 deletions(-) create mode 100644 Partypacker/App.xaml create mode 100644 Partypacker/App.xaml.cs create mode 100644 Partypacker/AssemblyInfo.cs create mode 100644 Partypacker/Classes.cs rename Partypacker/Core/{Server.cs => PartypackServer.cs} (82%) create mode 100644 Partypacker/MainWindow.xaml create mode 100644 Partypacker/MainWindow.xaml.cs delete mode 100644 Partypacker/Program.cs delete mode 100644 Partypacker/SelectableOption.cs delete mode 100644 Partypacker/icon.ico diff --git a/Partypacker.sln b/Partypacker.sln index 62fb997..754d4ab 100644 --- a/Partypacker.sln +++ b/Partypacker.sln @@ -1,9 +1,9 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.33927.289 +# Visual Studio Version 17 +VisualStudioVersion = 17.8.34219.65 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Partypacker", "Partypacker\Partypacker.csproj", "{FE06B383-0C7A-4A35-B208-66133110BB32}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Partypacker", "Partypacker\Partypacker.csproj", "{BCB1E673-FE06-4360-895D-07FE682C720D}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -11,15 +11,15 @@ Global Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {FE06B383-0C7A-4A35-B208-66133110BB32}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {FE06B383-0C7A-4A35-B208-66133110BB32}.Debug|Any CPU.Build.0 = Debug|Any CPU - {FE06B383-0C7A-4A35-B208-66133110BB32}.Release|Any CPU.ActiveCfg = Release|Any CPU - {FE06B383-0C7A-4A35-B208-66133110BB32}.Release|Any CPU.Build.0 = Release|Any CPU + {BCB1E673-FE06-4360-895D-07FE682C720D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BCB1E673-FE06-4360-895D-07FE682C720D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BCB1E673-FE06-4360-895D-07FE682C720D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BCB1E673-FE06-4360-895D-07FE682C720D}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {16591BB0-2EFE-43B1-917D-7CD574AB32C8} + SolutionGuid = {F12064C4-E05B-464A-BF11-E0E20C7D2B3F} EndGlobalSection EndGlobal diff --git a/Partypacker/App.xaml b/Partypacker/App.xaml new file mode 100644 index 0000000..5b0fbe9 --- /dev/null +++ b/Partypacker/App.xaml @@ -0,0 +1,15 @@ + + + + + + + + + + diff --git a/Partypacker/App.xaml.cs b/Partypacker/App.xaml.cs new file mode 100644 index 0000000..51b8ee0 --- /dev/null +++ b/Partypacker/App.xaml.cs @@ -0,0 +1,14 @@ +using System.Configuration; +using System.Data; +using System.Windows; + +namespace Partypacker +{ + /// + /// Interaction logic for App.xaml + /// + public partial class App : Application + { + } + +} diff --git a/Partypacker/AssemblyInfo.cs b/Partypacker/AssemblyInfo.cs new file mode 100644 index 0000000..b0ec827 --- /dev/null +++ b/Partypacker/AssemblyInfo.cs @@ -0,0 +1,10 @@ +using System.Windows; + +[assembly: ThemeInfo( + ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located + //(used if a resource is not found in the page, + // or application resource dictionaries) + ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located + //(used if a resource is not found in the page, + // app, or any theme specific resource dictionaries) +)] diff --git a/Partypacker/Classes.cs b/Partypacker/Classes.cs new file mode 100644 index 0000000..a910f87 --- /dev/null +++ b/Partypacker/Classes.cs @@ -0,0 +1,10 @@ +namespace Partypacker +{ + public class UserDetailObject + { + public string ID; + public string Username; + public string GlobalName; + public string Avatar; + } +} \ No newline at end of file diff --git a/Partypacker/Core/AppRegistry.cs b/Partypacker/Core/AppRegistry.cs index 2170bd9..ade09a0 100644 --- a/Partypacker/Core/AppRegistry.cs +++ b/Partypacker/Core/AppRegistry.cs @@ -47,4 +47,4 @@ namespace Partypacker.Core public RegistryValueKind RegistryValueKind { get; set; } } -} +} \ No newline at end of file diff --git a/Partypacker/Core/Extensions.cs b/Partypacker/Core/Extensions.cs index 7fb58bc..00f9fe8 100644 --- a/Partypacker/Core/Extensions.cs +++ b/Partypacker/Core/Extensions.cs @@ -17,4 +17,4 @@ namespace Partypacker.Core .ForEach(x => registryKey .SetValue(x.Name, x.Value, x.RegistryValueKind)); } -} +} \ No newline at end of file diff --git a/Partypacker/Core/Server.cs b/Partypacker/Core/PartypackServer.cs similarity index 82% rename from Partypacker/Core/Server.cs rename to Partypacker/Core/PartypackServer.cs index f89f38a..26d0e06 100644 --- a/Partypacker/Core/Server.cs +++ b/Partypacker/Core/PartypackServer.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.IO; using System.Linq; using System.Net; using System.Text; @@ -7,12 +8,26 @@ using System.Threading.Tasks; namespace Partypacker.Core { - internal class Server + internal class PartypackServer { + public static string BaseURL = +#if DEBUG + "http://localhost:6677"; +#else + "https://partypack.mcthe.dev"; +#endif + + public static string DashboardURL = +#if DEBUG + "http://localhost:5173"; +#else + "https://partypack.mcthe.dev"; +#endif + public static KeyValuePair GET(string URL = "/") { if (URL.StartsWith("/")) - URL = "https://example.com" + URL; + URL = BaseURL + URL; HttpWebRequest request = (HttpWebRequest)WebRequest.Create(URL); request.Method = "GET"; @@ -38,7 +53,7 @@ namespace Partypacker.Core public static KeyValuePair POST(string URL = "/", string Body = "") { if (URL.StartsWith("/")) - URL = "https://example.com" + URL; + URL = BaseURL + URL; HttpWebRequest request = (HttpWebRequest)WebRequest.Create(URL); request.Method = "POST"; @@ -66,5 +81,5 @@ namespace Partypacker.Core } } - -} + +} \ No newline at end of file diff --git a/Partypacker/Core/Win32.cs b/Partypacker/Core/Win32.cs index 6320995..242e8f2 100644 --- a/Partypacker/Core/Win32.cs +++ b/Partypacker/Core/Win32.cs @@ -87,4 +87,4 @@ namespace Partypacker INTERNET_OPTION_SETTINGS_CHANGED = 39 } } -} +} \ No newline at end of file diff --git a/Partypacker/MainWindow.xaml b/Partypacker/MainWindow.xaml new file mode 100644 index 0000000..f3a7828 --- /dev/null +++ b/Partypacker/MainWindow.xaml @@ -0,0 +1,39 @@ + + +