diff --git a/APIToolkit.csproj b/APIToolkit.csproj new file mode 100644 index 0000000..687a69e --- /dev/null +++ b/APIToolkit.csproj @@ -0,0 +1,73 @@ + + + WinExe + net8.0-windows10.0.19041.0 + 10.0.17763.0 + APIToolkit + app.manifest + x86;x64;ARM64 + win-x86;win-x64;win-arm64 + win-$(Platform).pubxml + true + true + enable + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + MSBuild:Compile + + + + + MSBuild:Compile + + + + + + true + + + + + False + True + False + True + + \ No newline at end of file diff --git a/APIToolkit.sln b/APIToolkit.sln new file mode 100644 index 0000000..1cc1623 --- /dev/null +++ b/APIToolkit.sln @@ -0,0 +1,40 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.12.35707.178 d17.12 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "APIToolkit", "APIToolkit.csproj", "{D92F3EA7-A23A-49A6-AAF5-C06A99F563F3}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|ARM64 = Debug|ARM64 + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|ARM64 = Release|ARM64 + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {D92F3EA7-A23A-49A6-AAF5-C06A99F563F3}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {D92F3EA7-A23A-49A6-AAF5-C06A99F563F3}.Debug|ARM64.Build.0 = Debug|ARM64 + {D92F3EA7-A23A-49A6-AAF5-C06A99F563F3}.Debug|ARM64.Deploy.0 = Debug|ARM64 + {D92F3EA7-A23A-49A6-AAF5-C06A99F563F3}.Debug|x64.ActiveCfg = Debug|x64 + {D92F3EA7-A23A-49A6-AAF5-C06A99F563F3}.Debug|x64.Build.0 = Debug|x64 + {D92F3EA7-A23A-49A6-AAF5-C06A99F563F3}.Debug|x64.Deploy.0 = Debug|x64 + {D92F3EA7-A23A-49A6-AAF5-C06A99F563F3}.Debug|x86.ActiveCfg = Debug|x86 + {D92F3EA7-A23A-49A6-AAF5-C06A99F563F3}.Debug|x86.Build.0 = Debug|x86 + {D92F3EA7-A23A-49A6-AAF5-C06A99F563F3}.Debug|x86.Deploy.0 = Debug|x86 + {D92F3EA7-A23A-49A6-AAF5-C06A99F563F3}.Release|ARM64.ActiveCfg = Release|ARM64 + {D92F3EA7-A23A-49A6-AAF5-C06A99F563F3}.Release|ARM64.Build.0 = Release|ARM64 + {D92F3EA7-A23A-49A6-AAF5-C06A99F563F3}.Release|ARM64.Deploy.0 = Release|ARM64 + {D92F3EA7-A23A-49A6-AAF5-C06A99F563F3}.Release|x64.ActiveCfg = Release|x64 + {D92F3EA7-A23A-49A6-AAF5-C06A99F563F3}.Release|x64.Build.0 = Release|x64 + {D92F3EA7-A23A-49A6-AAF5-C06A99F563F3}.Release|x64.Deploy.0 = Release|x64 + {D92F3EA7-A23A-49A6-AAF5-C06A99F563F3}.Release|x86.ActiveCfg = Release|x86 + {D92F3EA7-A23A-49A6-AAF5-C06A99F563F3}.Release|x86.Build.0 = Release|x86 + {D92F3EA7-A23A-49A6-AAF5-C06A99F563F3}.Release|x86.Deploy.0 = Release|x86 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/App.xaml b/App.xaml new file mode 100644 index 0000000..a190384 --- /dev/null +++ b/App.xaml @@ -0,0 +1,16 @@ + + + + + + + + + + + + diff --git a/App.xaml.cs b/App.xaml.cs new file mode 100644 index 0000000..a52f97d --- /dev/null +++ b/App.xaml.cs @@ -0,0 +1,50 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Runtime.InteropServices.WindowsRuntime; +using Microsoft.UI.Xaml; +using Microsoft.UI.Xaml.Controls; +using Microsoft.UI.Xaml.Controls.Primitives; +using Microsoft.UI.Xaml.Data; +using Microsoft.UI.Xaml.Input; +using Microsoft.UI.Xaml.Media; +using Microsoft.UI.Xaml.Navigation; +using Microsoft.UI.Xaml.Shapes; +using Windows.ApplicationModel; +using Windows.ApplicationModel.Activation; +using Windows.Foundation; +using Windows.Foundation.Collections; + +// To learn more about WinUI, the WinUI project structure, +// and more about our project templates, see: http://aka.ms/winui-project-info. + +namespace APIToolkit +{ + /// + /// Provides application-specific behavior to supplement the default Application class. + /// + public partial class App : Application + { + /// + /// Initializes the singleton application object. This is the first line of authored code + /// executed, and as such is the logical equivalent of main() or WinMain(). + /// + public App() + { + this.InitializeComponent(); + } + + /// + /// Invoked when the application is launched. + /// + /// Details about the launch request and process. + protected override void OnLaunched(Microsoft.UI.Xaml.LaunchActivatedEventArgs args) + { + m_window = new MainWindow(); + m_window.Activate(); + } + + private Window? m_window; + } +} diff --git a/Assets/LockScreenLogo.scale-200.png b/Assets/LockScreenLogo.scale-200.png new file mode 100644 index 0000000..7440f0d Binary files /dev/null and b/Assets/LockScreenLogo.scale-200.png differ diff --git a/Assets/SplashScreen.scale-200.png b/Assets/SplashScreen.scale-200.png new file mode 100644 index 0000000..32f486a Binary files /dev/null and b/Assets/SplashScreen.scale-200.png differ diff --git a/Assets/Square150x150Logo.scale-200.png b/Assets/Square150x150Logo.scale-200.png new file mode 100644 index 0000000..53ee377 Binary files /dev/null and b/Assets/Square150x150Logo.scale-200.png differ diff --git a/Assets/Square44x44Logo.scale-200.png b/Assets/Square44x44Logo.scale-200.png new file mode 100644 index 0000000..f713bba Binary files /dev/null and b/Assets/Square44x44Logo.scale-200.png differ diff --git a/Assets/Square44x44Logo.targetsize-24_altform-unplated.png b/Assets/Square44x44Logo.targetsize-24_altform-unplated.png new file mode 100644 index 0000000..dc9f5be Binary files /dev/null and b/Assets/Square44x44Logo.targetsize-24_altform-unplated.png differ diff --git a/Assets/StoreLogo.png b/Assets/StoreLogo.png new file mode 100644 index 0000000..a4586f2 Binary files /dev/null and b/Assets/StoreLogo.png differ diff --git a/Assets/Wide310x150Logo.scale-200.png b/Assets/Wide310x150Logo.scale-200.png new file mode 100644 index 0000000..8b4a5d0 Binary files /dev/null and b/Assets/Wide310x150Logo.scale-200.png differ diff --git a/MainWindow.xaml b/MainWindow.xaml new file mode 100644 index 0000000..94137ca --- /dev/null +++ b/MainWindow.xaml @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/MainWindow.xaml.cs b/MainWindow.xaml.cs new file mode 100644 index 0000000..d4b3d68 --- /dev/null +++ b/MainWindow.xaml.cs @@ -0,0 +1,54 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Runtime.InteropServices.WindowsRuntime; +using Microsoft.UI.Xaml; +using Microsoft.UI.Xaml.Controls; +using Microsoft.UI.Xaml.Controls.Primitives; +using Microsoft.UI.Xaml.Data; +using Microsoft.UI.Xaml.Input; +using Microsoft.UI.Xaml.Media; +using Microsoft.UI.Xaml.Navigation; +using Windows.Foundation; +using Windows.Foundation.Collections; + +// To learn more about WinUI, the WinUI project structure, +// and more about our project templates, see: http://aka.ms/winui-project-info. + +namespace APIToolkit +{ + public sealed partial class MainWindow : Window + { + public MainWindow() + { + this.InitializeComponent(); + + this.ExtendsContentIntoTitleBar = true; // Set the apps titlebar to be defined in MainWindow.xaml + this.SetTitleBar(AppTitleBar); + + ContentArea.Navigate(typeof(URLShortener)); // Set default page + } + + private void NavigationView_ItemInvoked(NavigationView sender, NavigationViewItemInvokedEventArgs args) + { + if (args.IsSettingsInvoked) + { + ContentArea.Navigate(typeof(Settings)); + } + else + { + // If the page set in MainWindow.xaml does not exist (is null), then show an error message + if (Type.GetType($"APIToolkit.{args.InvokedItemContainer.Tag}") == null) + { + UIFunctions.ShowError(MainWindow_MainGrid.XamlRoot, "Requested page is not implemented (Destination returned null)"); + } + else // Otherwise, navigate to page based on tag set in MainWindow.xaml + { + ContentArea.Navigate(Type.GetType($"APIToolkit.{args.InvokedItemContainer.Tag}")); + } + } + } + } + +} diff --git a/Package.appxmanifest b/Package.appxmanifest new file mode 100644 index 0000000..86cfe57 --- /dev/null +++ b/Package.appxmanifest @@ -0,0 +1,51 @@ + + + + + + + + + + APIToolkit + Nathan + Assets\StoreLogo.png + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Properties/launchSettings.json b/Properties/launchSettings.json new file mode 100644 index 0000000..da1bb88 --- /dev/null +++ b/Properties/launchSettings.json @@ -0,0 +1,10 @@ +{ + "profiles": { + "APIToolkit (Package)": { + "commandName": "MsixPackage" + }, + "APIToolkit (Unpackaged)": { + "commandName": "Project" + } + } +} \ No newline at end of file diff --git a/Settings.xaml b/Settings.xaml new file mode 100644 index 0000000..e2eff39 --- /dev/null +++ b/Settings.xaml @@ -0,0 +1,14 @@ + + + + +