diff --git a/AutoCat.sln b/AutoCat.sln new file mode 100644 index 0000000..bfd7436 --- /dev/null +++ b/AutoCat.sln @@ -0,0 +1,51 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30406.217 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AutoCat", "AutoCat\AutoCat.vcxproj", "{C25A5205-F4E6-4C00-B5F4-2FFDA155F4B8}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|ARM = Debug|ARM + Debug|ARM64 = Debug|ARM64 + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|ARM = Release|ARM + Release|ARM64 = Release|ARM64 + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {C25A5205-F4E6-4C00-B5F4-2FFDA155F4B8}.Debug|ARM.ActiveCfg = Debug|ARM + {C25A5205-F4E6-4C00-B5F4-2FFDA155F4B8}.Debug|ARM.Build.0 = Debug|ARM + {C25A5205-F4E6-4C00-B5F4-2FFDA155F4B8}.Debug|ARM.Deploy.0 = Debug|ARM + {C25A5205-F4E6-4C00-B5F4-2FFDA155F4B8}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {C25A5205-F4E6-4C00-B5F4-2FFDA155F4B8}.Debug|ARM64.Build.0 = Debug|ARM64 + {C25A5205-F4E6-4C00-B5F4-2FFDA155F4B8}.Debug|ARM64.Deploy.0 = Debug|ARM64 + {C25A5205-F4E6-4C00-B5F4-2FFDA155F4B8}.Debug|x64.ActiveCfg = Debug|x64 + {C25A5205-F4E6-4C00-B5F4-2FFDA155F4B8}.Debug|x64.Build.0 = Debug|x64 + {C25A5205-F4E6-4C00-B5F4-2FFDA155F4B8}.Debug|x64.Deploy.0 = Debug|x64 + {C25A5205-F4E6-4C00-B5F4-2FFDA155F4B8}.Debug|x86.ActiveCfg = Debug|Win32 + {C25A5205-F4E6-4C00-B5F4-2FFDA155F4B8}.Debug|x86.Build.0 = Debug|Win32 + {C25A5205-F4E6-4C00-B5F4-2FFDA155F4B8}.Debug|x86.Deploy.0 = Debug|Win32 + {C25A5205-F4E6-4C00-B5F4-2FFDA155F4B8}.Release|ARM.ActiveCfg = Release|ARM + {C25A5205-F4E6-4C00-B5F4-2FFDA155F4B8}.Release|ARM.Build.0 = Release|ARM + {C25A5205-F4E6-4C00-B5F4-2FFDA155F4B8}.Release|ARM.Deploy.0 = Release|ARM + {C25A5205-F4E6-4C00-B5F4-2FFDA155F4B8}.Release|ARM64.ActiveCfg = Release|ARM64 + {C25A5205-F4E6-4C00-B5F4-2FFDA155F4B8}.Release|ARM64.Build.0 = Release|ARM64 + {C25A5205-F4E6-4C00-B5F4-2FFDA155F4B8}.Release|ARM64.Deploy.0 = Release|ARM64 + {C25A5205-F4E6-4C00-B5F4-2FFDA155F4B8}.Release|x64.ActiveCfg = Release|x64 + {C25A5205-F4E6-4C00-B5F4-2FFDA155F4B8}.Release|x64.Build.0 = Release|x64 + {C25A5205-F4E6-4C00-B5F4-2FFDA155F4B8}.Release|x64.Deploy.0 = Release|x64 + {C25A5205-F4E6-4C00-B5F4-2FFDA155F4B8}.Release|x86.ActiveCfg = Release|Win32 + {C25A5205-F4E6-4C00-B5F4-2FFDA155F4B8}.Release|x86.Build.0 = Release|Win32 + {C25A5205-F4E6-4C00-B5F4-2FFDA155F4B8}.Release|x86.Deploy.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {860792C6-3557-49AF-85CD-7A0D6178015A} + EndGlobalSection +EndGlobal diff --git a/AutoCat/App.cpp b/AutoCat/App.cpp new file mode 100644 index 0000000..1f107de --- /dev/null +++ b/AutoCat/App.cpp @@ -0,0 +1,119 @@ +#include "pch.h" + +#include "App.h" +#include "MainPage.h" + +using namespace winrt; +using namespace Windows::ApplicationModel; +using namespace Windows::ApplicationModel::Activation; +using namespace Windows::Foundation; +using namespace Windows::UI::Xaml; +using namespace Windows::UI::Xaml::Controls; +using namespace Windows::UI::Xaml::Navigation; +using namespace AutoCat; +using namespace AutoCat::implementation; + +/// +/// 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(). +/// +App::App() +{ + InitializeComponent(); + Suspending({ this, &App::OnSuspending }); + +#if defined _DEBUG && !defined DISABLE_XAML_GENERATED_BREAK_ON_UNHANDLED_EXCEPTION + UnhandledException([this](IInspectable const&, UnhandledExceptionEventArgs const& e) + { + if (IsDebuggerPresent()) + { + auto errorMessage = e.Message(); + __debugbreak(); + } + }); +#endif +} + +/// +/// Invoked when the application is launched normally by the end user. Other entry points +/// will be used such as when the application is launched to open a specific file. +/// +/// Details about the launch request and process. +void App::OnLaunched(LaunchActivatedEventArgs const& e) +{ + Frame rootFrame{ nullptr }; + auto content = Window::Current().Content(); + if (content) + { + rootFrame = content.try_as(); + } + + // Do not repeat app initialization when the Window already has content, + // just ensure that the window is active + if (rootFrame == nullptr) + { + // Create a Frame to act as the navigation context and associate it with + // a SuspensionManager key + rootFrame = Frame(); + + rootFrame.NavigationFailed({ this, &App::OnNavigationFailed }); + + if (e.PreviousExecutionState() == ApplicationExecutionState::Terminated) + { + // Restore the saved session state only when appropriate, scheduling the + // final launch steps after the restore is complete + } + + if (e.PrelaunchActivated() == false) + { + if (rootFrame.Content() == nullptr) + { + // When the navigation stack isn't restored navigate to the first page, + // configuring the new page by passing required information as a navigation + // parameter + rootFrame.Navigate(xaml_typename(), box_value(e.Arguments())); + } + // Place the frame in the current Window + Window::Current().Content(rootFrame); + // Ensure the current window is active + Window::Current().Activate(); + } + } + else + { + if (e.PrelaunchActivated() == false) + { + if (rootFrame.Content() == nullptr) + { + // When the navigation stack isn't restored navigate to the first page, + // configuring the new page by passing required information as a navigation + // parameter + rootFrame.Navigate(xaml_typename(), box_value(e.Arguments())); + } + // Ensure the current window is active + Window::Current().Activate(); + } + } +} + +/// +/// Invoked when application execution is being suspended. Application state is saved +/// without knowing whether the application will be terminated or resumed with the contents +/// of memory still intact. +/// +/// The source of the suspend request. +/// Details about the suspend request. +void App::OnSuspending([[maybe_unused]] IInspectable const& sender, [[maybe_unused]] SuspendingEventArgs const& e) +{ + // Save application state and stop any background activity +} + +/// +/// Invoked when Navigation to a certain page fails +/// +/// The Frame which failed navigation +/// Details about the navigation failure +void App::OnNavigationFailed(IInspectable const&, NavigationFailedEventArgs const& e) +{ + throw hresult_error(E_FAIL, hstring(L"Failed to load Page ") + e.SourcePageType().Name); +} \ No newline at end of file diff --git a/AutoCat/App.h b/AutoCat/App.h new file mode 100644 index 0000000..7bb74df --- /dev/null +++ b/AutoCat/App.h @@ -0,0 +1,14 @@ +#pragma once +#include "App.xaml.g.h" + +namespace winrt::AutoCat::implementation +{ + struct App : AppT + { + App(); + + void OnLaunched(Windows::ApplicationModel::Activation::LaunchActivatedEventArgs const&); + void OnSuspending(IInspectable const&, Windows::ApplicationModel::SuspendingEventArgs const&); + void OnNavigationFailed(IInspectable const&, Windows::UI::Xaml::Navigation::NavigationFailedEventArgs const&); + }; +} diff --git a/AutoCat/App.idl b/AutoCat/App.idl new file mode 100644 index 0000000..a1109fb --- /dev/null +++ b/AutoCat/App.idl @@ -0,0 +1,3 @@ +namespace AutoCat +{ +} diff --git a/AutoCat/App.xaml b/AutoCat/App.xaml new file mode 100644 index 0000000..224aafc --- /dev/null +++ b/AutoCat/App.xaml @@ -0,0 +1,7 @@ + + + diff --git a/AutoCat/Assets/LockScreenLogo.scale-200.png b/AutoCat/Assets/LockScreenLogo.scale-200.png new file mode 100644 index 0000000..735f57a Binary files /dev/null and b/AutoCat/Assets/LockScreenLogo.scale-200.png differ diff --git a/AutoCat/Assets/SplashScreen.scale-200.png b/AutoCat/Assets/SplashScreen.scale-200.png new file mode 100644 index 0000000..023e7f1 Binary files /dev/null and b/AutoCat/Assets/SplashScreen.scale-200.png differ diff --git a/AutoCat/Assets/Square150x150Logo.scale-200.png b/AutoCat/Assets/Square150x150Logo.scale-200.png new file mode 100644 index 0000000..af49fec Binary files /dev/null and b/AutoCat/Assets/Square150x150Logo.scale-200.png differ diff --git a/AutoCat/Assets/Square44x44Logo.scale-200.png b/AutoCat/Assets/Square44x44Logo.scale-200.png new file mode 100644 index 0000000..ce342a2 Binary files /dev/null and b/AutoCat/Assets/Square44x44Logo.scale-200.png differ diff --git a/AutoCat/Assets/Square44x44Logo.targetsize-24_altform-unplated.png b/AutoCat/Assets/Square44x44Logo.targetsize-24_altform-unplated.png new file mode 100644 index 0000000..f6c02ce Binary files /dev/null and b/AutoCat/Assets/Square44x44Logo.targetsize-24_altform-unplated.png differ diff --git a/AutoCat/Assets/StoreLogo.png b/AutoCat/Assets/StoreLogo.png new file mode 100644 index 0000000..7385b56 Binary files /dev/null and b/AutoCat/Assets/StoreLogo.png differ diff --git a/AutoCat/Assets/Wide310x150Logo.scale-200.png b/AutoCat/Assets/Wide310x150Logo.scale-200.png new file mode 100644 index 0000000..288995b Binary files /dev/null and b/AutoCat/Assets/Wide310x150Logo.scale-200.png differ diff --git a/AutoCat/AutoCat.vcxproj b/AutoCat/AutoCat.vcxproj new file mode 100644 index 0000000..32493ab --- /dev/null +++ b/AutoCat/AutoCat.vcxproj @@ -0,0 +1,181 @@ + + + + + true + true + true + true + {c25a5205-f4e6-4c00-b5f4-2ffda155f4b8} + AutoCat + AutoCat + en-US + 15.0 + true + Windows Store + 10.0 + 10.0.19041.0 + 10.0.17134.0 + + + + + Debug + ARM + + + Debug + ARM64 + + + Debug + Win32 + + + Debug + x64 + + + Release + ARM + + + Release + ARM64 + + + Release + Win32 + + + Release + x64 + + + + Application + v140 + v141 + v142 + Unicode + + + true + true + + + false + true + false + + + + + + + + + + + + + + Use + pch.h + $(IntDir)pch.pch + Level4 + %(AdditionalOptions) /bigobj + + /DWINRT_NO_MAKE_DETECTION %(AdditionalOptions) + + + WIN32_LEAN_AND_MEAN;WINRT_LEAN_AND_MEAN;%(PreprocessorDefinitions) + + + false + + + + + _DEBUG;%(PreprocessorDefinitions) + + + + + NDEBUG;%(PreprocessorDefinitions) + + + true + true + + + + + + App.xaml + + + MainPage.xaml + + + + + Designer + + + Designer + + + + + Designer + + + + + + + + + + + + + + Create + + + App.xaml + + + MainPage.xaml + + + + + + App.xaml + + + MainPage.xaml + + + + + + + false + + + + + + + + + This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + + \ No newline at end of file diff --git a/AutoCat/AutoCat.vcxproj.filters b/AutoCat/AutoCat.vcxproj.filters new file mode 100644 index 0000000..28f0334 --- /dev/null +++ b/AutoCat/AutoCat.vcxproj.filters @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + Assets + + + Assets + + + Assets + + + Assets + + + Assets + + + Assets + + + Assets + + + + + + + + {e48dc53e-40b1-40cb-970a-f89935452892} + + + + + + + + + + \ No newline at end of file diff --git a/AutoCat/MainPage.cpp b/AutoCat/MainPage.cpp new file mode 100644 index 0000000..ad267e6 --- /dev/null +++ b/AutoCat/MainPage.cpp @@ -0,0 +1,31 @@ +#include "pch.h" +#include "MainPage.h" +#include "MainPage.g.cpp" +#include + +using namespace winrt; +using namespace Windows::UI::Xaml; + +namespace winrt::AutoCat::implementation +{ + MainPage::MainPage() + { + InitializeComponent(); + } + + int32_t MainPage::MyProperty() + { + throw hresult_not_implemented(); + } + + void MainPage::MyProperty(int32_t /* value */) + { + throw hresult_not_implemented(); + } + + void MainPage::Login_Click(winrt::Windows::Foundation::IInspectable const& sender, winrt::Windows::UI::Xaml::RoutedEventArgs const& e) + { + auto log = L"Login: " + std::wstring(LoginBox().Text()); + OutputDebugString(log.c_str()); + } +} diff --git a/AutoCat/MainPage.h b/AutoCat/MainPage.h new file mode 100644 index 0000000..b138241 --- /dev/null +++ b/AutoCat/MainPage.h @@ -0,0 +1,23 @@ +#pragma once + +#include "MainPage.g.h" + +namespace winrt::AutoCat::implementation +{ + struct MainPage : MainPageT + { + MainPage(); + + int32_t MyProperty(); + void MyProperty(int32_t value); + + void Login_Click(winrt::Windows::Foundation::IInspectable const& sender, winrt::Windows::UI::Xaml::RoutedEventArgs const& e); + }; +} + +namespace winrt::AutoCat::factory_implementation +{ + struct MainPage : MainPageT + { + }; +} diff --git a/AutoCat/MainPage.idl b/AutoCat/MainPage.idl new file mode 100644 index 0000000..a2c0373 --- /dev/null +++ b/AutoCat/MainPage.idl @@ -0,0 +1,9 @@ +namespace AutoCat +{ + [default_interface] + runtimeclass MainPage : Windows.UI.Xaml.Controls.Page + { + MainPage(); + Int32 MyProperty; + } +} diff --git a/AutoCat/MainPage.xaml b/AutoCat/MainPage.xaml new file mode 100644 index 0000000..3d8d8c3 --- /dev/null +++ b/AutoCat/MainPage.xaml @@ -0,0 +1,19 @@ + + + + + + +