From 538828edd22ae04a49df1766f9a54978710153b8 Mon Sep 17 00:00:00 2001 From: Grabacr07 Date: Thu, 24 Sep 2015 18:32:40 +0900 Subject: [PATCH] Add UWP app project and setup modules for .NET engine. --- .gitignore | 394 +++++++++--------- LICENSE => LICENSE.txt | 0 README.md | 0 resources/icon/1240x600.png | Bin 0 -> 7823 bytes resources/icon/150.png | Bin 0 -> 1844 bytes resources/icon/44.png | Bin 0 -> 305 bytes resources/icon/50.png | Bin 0 -> 278 bytes resources/icon/Square44x44Logo.scale-200.png | Bin 0 -> 1038 bytes source/.editorconfig | 7 + .../SylphyHorn.Bootstrapper.Gen/Bundle.linq | 55 +++ .../SylphyHorn.Bootstrapper.Gen/Bundle.tt | 115 +++++ .../SylphyHorn.Bootstrapper.Gen/Bundle.wxs | 90 ++++ .../Properties/AssemblyInfo.cs | 36 ++ .../SylphyHorn.Bootstrapper.Gen.csproj | 71 ++++ .../Bootstrapper/Application.xaml | 15 + .../Bootstrapper/Application.xaml.cs | 48 +++ .../Bootstrapper/InstallResult.cs | 50 +++ .../Bootstrapper/Installer.CustomBA.cs | 122 ++++++ .../Bootstrapper/Installer.cs | 113 +++++ .../Bootstrapper/Launcher.cs | 29 ++ .../Bootstrapper/Operation.cs | 11 + .../Bootstrapper/Status.cs | 12 + .../UI/Bindings/MainWindowViewModel.cs | 124 ++++++ .../UI/Bindings/StatusViewModels.cs | 303 ++++++++++++++ .../UI/Controls/ContentControlHelper.cs | 45 ++ .../Bootstrapper/UI/MainWindow.xaml | 236 +++++++++++ .../Bootstrapper/UI/MainWindow.xaml.cs | 15 + .../BootstrapperCore.config | 15 + .../Properties/AssemblyInfo.cs | 17 + .../Properties/Resources.Designer.cs | 271 ++++++++++++ .../Properties/Resources.ja-JP.resx | 190 +++++++++ .../Properties/Resources.resx | 190 +++++++++ .../SylphyHorn.Bootstrapper.UI.csproj | 148 +++++++ .../packages.config | 10 + .../SylphyHorn.Bootstrapper.wixproj | 55 +++ .../bin/Release/_install.bat | 1 + .../Setup/SylphyHorn.Installer.Gen/App.config | 6 + .../SylphyHorn.Installer.Gen/Product.linq | 44 ++ .../Setup/SylphyHorn.Installer.Gen/Product.tt | 134 ++++++ .../SylphyHorn.Installer.Gen/Product.wxs | 326 +++++++++++++++ .../Properties/AssemblyInfo.cs | 11 + .../SylphyHorn.Installer.Gen.csproj | 81 ++++ source/Setup/SylphyHorn.Installer/Shared.wxi | 4 + .../SylphyHorn.Installer.wixproj | 50 +++ .../bin/Release/_install.bat | 1 + .../bin/Release/_uninstall.bat | 1 + source/SylphyHorn.App/App.xaml | 14 + source/SylphyHorn.App/App.xaml.cs | 116 ++++++ .../SylphyHorn.App/ApplicationInsights.config | 3 + .../Assets/LockScreenLogo.scale-200.png | Bin 0 -> 2966 bytes .../Assets/SplashScreen.scale-200.png | Bin 0 -> 7823 bytes .../Assets/Square150x150Logo.scale-200.png | Bin 0 -> 1844 bytes .../Assets/Square44x44Logo.scale-200.png | Bin 0 -> 1038 bytes ...x44Logo.targetsize-24_altform-unplated.png | Bin 0 -> 2939 bytes source/SylphyHorn.App/Assets/StoreLogo.png | Bin 0 -> 17899 bytes .../BundleArtifacts/Upload/x64.txt | 2 + .../BundleArtifacts/Upload/x86.txt | 2 + source/SylphyHorn.App/BundleArtifacts/x64.txt | 2 + source/SylphyHorn.App/BundleArtifacts/x86.txt | 2 + .../Package.StoreAssociation.xml | 368 ++++++++++++++++ source/SylphyHorn.App/Package.appxmanifest | 23 + .../SylphyHorn.App/Properties/AssemblyInfo.cs | 29 ++ .../SylphyHorn.App/Properties/Default.rd.xml | 27 ++ .../Serialization/LocalStorageProperty.cs | 14 + .../Serialization/LocalStorageProvider.cs | 53 +++ .../SylphyHorn.App/Serialization/Settings.cs | 14 + .../Services/EngineDownloader.cs | 31 ++ source/SylphyHorn.App/Services/Helpers.cs | 18 + source/SylphyHorn.App/SylphyHorn.App.csproj | 207 +++++++++ .../Themes/Generic.KeyIcon.xaml | 41 ++ .../Themes/Generic.ShortcutKeyBox.xaml | 149 +++++++ source/SylphyHorn.App/Themes/Generic.xaml | 10 + .../UI/Bindings/BindableBase.cs | 20 + .../UI/Bindings/MainPageViewModel.cs | 41 ++ source/SylphyHorn.App/UI/Controls/KeyIcon.cs | 155 +++++++ .../UI/Controls/ShortcutKeyBox.cs | 181 ++++++++ source/SylphyHorn.App/UI/Pages/MainPage.xaml | 254 +++++++++++ .../SylphyHorn.App/UI/Pages/MainPage.xaml.cs | 13 + .../UI/Styles/Controls.Pivot.xaml | 340 +++++++++++++++ .../UI/Styles/Controls.TextBlock.xaml | 24 ++ source/SylphyHorn.App/UI/Styles/Controls.xaml | 9 + source/SylphyHorn.App/_pkginfo.txt | 1 + source/SylphyHorn.App/_scale-100.appx | Bin 0 -> 5062 bytes source/SylphyHorn.App/project.json | 20 + .../Properties/AssemblyInfo.cs | 13 + .../Serialization/DictionaryProvider.cs | 115 +++++ .../Serialization/GeneralSettings.cs | 28 ++ .../Serialization/SerializableProperty.cs | 47 +++ .../Serialization/SettingsHost.cs | 51 +++ .../Serialization/ShortcutKeySettings.cs | 97 +++++ source/SylphyHorn.Core/SylphyHorn.Core.csproj | 58 +++ source/SylphyHorn.Core/project.json | 17 + source/SylphyHorn.sln | 247 ++++++++++- source/SylphyHorn.sln.DotSettings | 7 +- .../SylphyHorn/Annotations/DarkAttribute.cs | 36 ++ .../Annotations/ElementalAttribute.cs | 91 ++++ .../SylphyHorn/Annotations/LightAttribute.cs | 35 ++ source/SylphyHorn/App.config | 12 +- source/SylphyHorn/Application.xaml.cs | 76 ++-- source/SylphyHorn/Interop/IPersist.cs | 13 - source/SylphyHorn/Interop/IPersistFile.cs | 28 -- source/SylphyHorn/Interop/IShellLink.cs | 49 --- source/SylphyHorn/Interop/NativeMethods.cs | 6 - .../SylphyHorn/Interop/UnsafeNativeMethods.cs | 71 ---- source/SylphyHorn/Models/Helper.cs | 175 -------- source/SylphyHorn/Models/Settings.cs | 84 ---- .../SylphyHorn/Models/ShortcutKeyDetector.cs | 65 --- source/SylphyHorn/Properties/AssemblyInfo.cs | 72 +--- .../{Models => Properties}/ProductInfo.cs | 8 +- .../Serialization/LocalSettingsProperty.cs | 14 + .../Serialization/LocalSettingsProvider.cs | 132 ++++++ .../Serialization/SerializableDictionary.cs | 56 +++ .../Serialization/SerializationExtensions.cs | 63 +++ source/SylphyHorn/Serialization/Settings.cs | 14 + source/SylphyHorn/Services/Helpers.cs | 103 +++++ .../{Models => Services}/HookService.cs | 106 +++-- source/SylphyHorn/Services/KeyHelper.cs | 53 +++ .../NotificationService.cs | 16 +- source/SylphyHorn/Services/PinService.cs | 95 +++++ .../{Models => Services}/ShortcutKey.cs | 38 +- .../Services/ShortcutKeyDetector.cs | 76 ++++ .../ShortcutKeyPressedEventArgs.cs | 6 +- .../SylphyHorn/Services/UwpInteropService.cs | 53 +++ source/SylphyHorn/SylphyHorn.csproj | 119 ++++-- .../ViewModels/SettingsWindowViewModel.cs | 6 +- .../Controls/ClosingStoryboardBehavior.cs | 6 +- .../Views/Controls/ShortcutKeyBox.cs | 32 +- .../SylphyHorn/Views/NotificationWindow.xaml | 2 +- .../Views/NotificationWindow.xaml.cs | 7 +- source/SylphyHorn/Views/PinMarker.xaml | 17 + source/SylphyHorn/Views/PinMarker.xaml.cs | 17 + source/SylphyHorn/Views/SettingsWindow.xaml | 37 +- source/SylphyHorn/Views/TransparentWindow.cs | 58 --- source/SylphyHorn/packages.config | 24 +- source/VirtualDesktop | 2 +- 135 files changed, 7284 insertions(+), 998 deletions(-) rename LICENSE => LICENSE.txt (100%) create mode 100644 README.md create mode 100644 resources/icon/1240x600.png create mode 100644 resources/icon/150.png create mode 100644 resources/icon/44.png create mode 100644 resources/icon/50.png create mode 100644 resources/icon/Square44x44Logo.scale-200.png create mode 100644 source/Setup/SylphyHorn.Bootstrapper.Gen/Bundle.linq create mode 100644 source/Setup/SylphyHorn.Bootstrapper.Gen/Bundle.tt create mode 100644 source/Setup/SylphyHorn.Bootstrapper.Gen/Bundle.wxs create mode 100644 source/Setup/SylphyHorn.Bootstrapper.Gen/Properties/AssemblyInfo.cs create mode 100644 source/Setup/SylphyHorn.Bootstrapper.Gen/SylphyHorn.Bootstrapper.Gen.csproj create mode 100644 source/Setup/SylphyHorn.Bootstrapper.UI/Bootstrapper/Application.xaml create mode 100644 source/Setup/SylphyHorn.Bootstrapper.UI/Bootstrapper/Application.xaml.cs create mode 100644 source/Setup/SylphyHorn.Bootstrapper.UI/Bootstrapper/InstallResult.cs create mode 100644 source/Setup/SylphyHorn.Bootstrapper.UI/Bootstrapper/Installer.CustomBA.cs create mode 100644 source/Setup/SylphyHorn.Bootstrapper.UI/Bootstrapper/Installer.cs create mode 100644 source/Setup/SylphyHorn.Bootstrapper.UI/Bootstrapper/Launcher.cs create mode 100644 source/Setup/SylphyHorn.Bootstrapper.UI/Bootstrapper/Operation.cs create mode 100644 source/Setup/SylphyHorn.Bootstrapper.UI/Bootstrapper/Status.cs create mode 100644 source/Setup/SylphyHorn.Bootstrapper.UI/Bootstrapper/UI/Bindings/MainWindowViewModel.cs create mode 100644 source/Setup/SylphyHorn.Bootstrapper.UI/Bootstrapper/UI/Bindings/StatusViewModels.cs create mode 100644 source/Setup/SylphyHorn.Bootstrapper.UI/Bootstrapper/UI/Controls/ContentControlHelper.cs create mode 100644 source/Setup/SylphyHorn.Bootstrapper.UI/Bootstrapper/UI/MainWindow.xaml create mode 100644 source/Setup/SylphyHorn.Bootstrapper.UI/Bootstrapper/UI/MainWindow.xaml.cs create mode 100644 source/Setup/SylphyHorn.Bootstrapper.UI/BootstrapperCore.config create mode 100644 source/Setup/SylphyHorn.Bootstrapper.UI/Properties/AssemblyInfo.cs create mode 100644 source/Setup/SylphyHorn.Bootstrapper.UI/Properties/Resources.Designer.cs create mode 100644 source/Setup/SylphyHorn.Bootstrapper.UI/Properties/Resources.ja-JP.resx create mode 100644 source/Setup/SylphyHorn.Bootstrapper.UI/Properties/Resources.resx create mode 100644 source/Setup/SylphyHorn.Bootstrapper.UI/SylphyHorn.Bootstrapper.UI.csproj create mode 100644 source/Setup/SylphyHorn.Bootstrapper.UI/packages.config create mode 100644 source/Setup/SylphyHorn.Bootstrapper/SylphyHorn.Bootstrapper.wixproj create mode 100644 source/Setup/SylphyHorn.Bootstrapper/bin/Release/_install.bat create mode 100644 source/Setup/SylphyHorn.Installer.Gen/App.config create mode 100644 source/Setup/SylphyHorn.Installer.Gen/Product.linq create mode 100644 source/Setup/SylphyHorn.Installer.Gen/Product.tt create mode 100644 source/Setup/SylphyHorn.Installer.Gen/Product.wxs create mode 100644 source/Setup/SylphyHorn.Installer.Gen/Properties/AssemblyInfo.cs create mode 100644 source/Setup/SylphyHorn.Installer.Gen/SylphyHorn.Installer.Gen.csproj create mode 100644 source/Setup/SylphyHorn.Installer/Shared.wxi create mode 100644 source/Setup/SylphyHorn.Installer/SylphyHorn.Installer.wixproj create mode 100644 source/Setup/SylphyHorn.Installer/bin/Release/_install.bat create mode 100644 source/Setup/SylphyHorn.Installer/bin/Release/_uninstall.bat create mode 100644 source/SylphyHorn.App/App.xaml create mode 100644 source/SylphyHorn.App/App.xaml.cs create mode 100644 source/SylphyHorn.App/ApplicationInsights.config create mode 100644 source/SylphyHorn.App/Assets/LockScreenLogo.scale-200.png create mode 100644 source/SylphyHorn.App/Assets/SplashScreen.scale-200.png create mode 100644 source/SylphyHorn.App/Assets/Square150x150Logo.scale-200.png create mode 100644 source/SylphyHorn.App/Assets/Square44x44Logo.scale-200.png create mode 100644 source/SylphyHorn.App/Assets/Square44x44Logo.targetsize-24_altform-unplated.png create mode 100644 source/SylphyHorn.App/Assets/StoreLogo.png create mode 100644 source/SylphyHorn.App/BundleArtifacts/Upload/x64.txt create mode 100644 source/SylphyHorn.App/BundleArtifacts/Upload/x86.txt create mode 100644 source/SylphyHorn.App/BundleArtifacts/x64.txt create mode 100644 source/SylphyHorn.App/BundleArtifacts/x86.txt create mode 100644 source/SylphyHorn.App/Package.StoreAssociation.xml create mode 100644 source/SylphyHorn.App/Package.appxmanifest create mode 100644 source/SylphyHorn.App/Properties/AssemblyInfo.cs create mode 100644 source/SylphyHorn.App/Properties/Default.rd.xml create mode 100644 source/SylphyHorn.App/Serialization/LocalStorageProperty.cs create mode 100644 source/SylphyHorn.App/Serialization/LocalStorageProvider.cs create mode 100644 source/SylphyHorn.App/Serialization/Settings.cs create mode 100644 source/SylphyHorn.App/Services/EngineDownloader.cs create mode 100644 source/SylphyHorn.App/Services/Helpers.cs create mode 100644 source/SylphyHorn.App/SylphyHorn.App.csproj create mode 100644 source/SylphyHorn.App/Themes/Generic.KeyIcon.xaml create mode 100644 source/SylphyHorn.App/Themes/Generic.ShortcutKeyBox.xaml create mode 100644 source/SylphyHorn.App/Themes/Generic.xaml create mode 100644 source/SylphyHorn.App/UI/Bindings/BindableBase.cs create mode 100644 source/SylphyHorn.App/UI/Bindings/MainPageViewModel.cs create mode 100644 source/SylphyHorn.App/UI/Controls/KeyIcon.cs create mode 100644 source/SylphyHorn.App/UI/Controls/ShortcutKeyBox.cs create mode 100644 source/SylphyHorn.App/UI/Pages/MainPage.xaml create mode 100644 source/SylphyHorn.App/UI/Pages/MainPage.xaml.cs create mode 100644 source/SylphyHorn.App/UI/Styles/Controls.Pivot.xaml create mode 100644 source/SylphyHorn.App/UI/Styles/Controls.TextBlock.xaml create mode 100644 source/SylphyHorn.App/UI/Styles/Controls.xaml create mode 100644 source/SylphyHorn.App/_pkginfo.txt create mode 100644 source/SylphyHorn.App/_scale-100.appx create mode 100644 source/SylphyHorn.App/project.json create mode 100644 source/SylphyHorn.Core/Properties/AssemblyInfo.cs create mode 100644 source/SylphyHorn.Core/Serialization/DictionaryProvider.cs create mode 100644 source/SylphyHorn.Core/Serialization/GeneralSettings.cs create mode 100644 source/SylphyHorn.Core/Serialization/SerializableProperty.cs create mode 100644 source/SylphyHorn.Core/Serialization/SettingsHost.cs create mode 100644 source/SylphyHorn.Core/Serialization/ShortcutKeySettings.cs create mode 100644 source/SylphyHorn.Core/SylphyHorn.Core.csproj create mode 100644 source/SylphyHorn.Core/project.json create mode 100644 source/SylphyHorn/Annotations/DarkAttribute.cs create mode 100644 source/SylphyHorn/Annotations/ElementalAttribute.cs create mode 100644 source/SylphyHorn/Annotations/LightAttribute.cs delete mode 100644 source/SylphyHorn/Interop/IPersist.cs delete mode 100644 source/SylphyHorn/Interop/IPersistFile.cs delete mode 100644 source/SylphyHorn/Interop/IShellLink.cs delete mode 100644 source/SylphyHorn/Interop/UnsafeNativeMethods.cs delete mode 100644 source/SylphyHorn/Models/Helper.cs delete mode 100644 source/SylphyHorn/Models/Settings.cs delete mode 100644 source/SylphyHorn/Models/ShortcutKeyDetector.cs rename source/SylphyHorn/{Models => Properties}/ProductInfo.cs (95%) create mode 100644 source/SylphyHorn/Serialization/LocalSettingsProperty.cs create mode 100644 source/SylphyHorn/Serialization/LocalSettingsProvider.cs create mode 100644 source/SylphyHorn/Serialization/SerializableDictionary.cs create mode 100644 source/SylphyHorn/Serialization/SerializationExtensions.cs create mode 100644 source/SylphyHorn/Serialization/Settings.cs create mode 100644 source/SylphyHorn/Services/Helpers.cs rename source/SylphyHorn/{Models => Services}/HookService.cs (54%) create mode 100644 source/SylphyHorn/Services/KeyHelper.cs rename source/SylphyHorn/{Models => Services}/NotificationService.cs (72%) create mode 100644 source/SylphyHorn/Services/PinService.cs rename source/SylphyHorn/{Models => Services}/ShortcutKey.cs (52%) create mode 100644 source/SylphyHorn/Services/ShortcutKeyDetector.cs rename source/SylphyHorn/{Models => Services}/ShortcutKeyPressedEventArgs.cs (68%) create mode 100644 source/SylphyHorn/Services/UwpInteropService.cs create mode 100644 source/SylphyHorn/Views/PinMarker.xaml create mode 100644 source/SylphyHorn/Views/PinMarker.xaml.cs delete mode 100644 source/SylphyHorn/Views/TransparentWindow.cs diff --git a/.gitignore b/.gitignore index 57a1574..a5e9957 100644 --- a/.gitignore +++ b/.gitignore @@ -1,196 +1,198 @@ -## Ignore Visual Studio temporary files, build results, and -## files generated by popular Visual Studio add-ons. - -# User-specific files -*.suo -*.user -*.userosscache -*.sln.docstates - -# User-specific files (MonoDevelop/Xamarin Studio) -*.userprefs - -# Build results -[Dd]ebug/ -[Dd]ebugPublic/ -[Rr]elease/ -[Rr]eleases/ -x64/ -x86/ -build/ -bld/ -[Bb]in/ -[Oo]bj/ - -# Visual Studo 2015 cache/options directory -.vs/ - -# MSTest test Results -[Tt]est[Rr]esult*/ -[Bb]uild[Ll]og.* - -# NUNIT -*.VisualState.xml -TestResult.xml - -# Build Results of an ATL Project -[Dd]ebugPS/ -[Rr]eleasePS/ -dlldata.c - -*_i.c -*_p.c -*_i.h -*.ilk -*.meta -*.obj -*.pch -*.pdb -*.pgc -*.pgd -*.rsp -*.sbr -*.tlb -*.tli -*.tlh -*.tmp -*.tmp_proj -*.log -*.vspscc -*.vssscc -.builds -*.pidb -*.svclog -*.scc - -# Chutzpah Test files -_Chutzpah* - -# Visual C++ cache files -ipch/ -*.aps -*.ncb -*.opensdf -*.sdf -*.cachefile - -# Visual Studio profiler -*.psess -*.vsp -*.vspx - -# TFS 2012 Local Workspace -$tf/ - -# Guidance Automation Toolkit -*.gpState - -# ReSharper is a .NET coding add-in -_ReSharper*/ -*.[Rr]e[Ss]harper -*.DotSettings.user - -# JustCode is a .NET coding addin-in -.JustCode - -# TeamCity is a build add-in -_TeamCity* - -# DotCover is a Code Coverage Tool -*.dotCover - -# NCrunch -_NCrunch_* -.*crunch*.local.xml - -# MightyMoose -*.mm.* -AutoTest.Net/ - -# Web workbench (sass) -.sass-cache/ - -# Installshield output folder -[Ee]xpress/ - -# DocProject is a documentation generator add-in -DocProject/buildhelp/ -DocProject/Help/*.HxT -DocProject/Help/*.HxC -DocProject/Help/*.hhc -DocProject/Help/*.hhk -DocProject/Help/*.hhp -DocProject/Help/Html2 -DocProject/Help/html - -# Click-Once directory -publish/ - -# Publish Web Output -*.[Pp]ublish.xml -*.azurePubxml -# TODO: Comment the next line if you want to checkin your web deploy settings -# but database connection strings (with potential passwords) will be unencrypted -*.pubxml -*.publishproj - -# NuGet Packages -*.nupkg -# The packages folder can be ignored because of Package Restore -**/packages/* -# except build/, which is used as an MSBuild target. -!**/packages/build/ -# Uncomment if necessary however generally it will be regenerated when needed -#!**/packages/repositories.config - -# Windows Azure Build Output -csx/ -*.build.csdef - -# Windows Store app package directory -AppPackages/ - -# Others -*.[Cc]ache -ClientBin/ -[Ss]tyle[Cc]op.* -~$* -*~ -*.dbmdl -*.dbproj.schemaview -*.pfx -*.publishsettings -node_modules/ -bower_components/ - -# RIA/Silverlight projects -Generated_Code/ - -# Backup & report files from converting an old project file -# to a newer Visual Studio version. Backup files are not needed, -# because we have git ;-) -_UpgradeReport_Files/ -Backup*/ -UpgradeLog*.XML -UpgradeLog*.htm - -# SQL Server files -*.mdf -*.ldf - -# Business Intelligence projects -*.rdl.data -*.bim.layout -*.bim_*.settings - -# Microsoft Fakes -FakesAssemblies/ - -# Node.js Tools for Visual Studio -.ntvs_analysis.dat - -# Visual Studio 6 build log -*.plg - -# Visual Studio 6 workspace options file -*.opt +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. + +# User-specific files +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +build/ +bld/ +[Bb]in/ +[Oo]bj/ + +# Visual Studo 2015 cache/options directory +.vs/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUNIT +*.VisualState.xml +TestResult.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +*_i.c +*_p.c +*_i.h +*.ilk +*.meta +*.obj +*.pch +*.pdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opensdf +*.sdf +*.cachefile + +# Visual Studio profiler +*.psess +*.vsp +*.vspx + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# JustCode is a .NET coding addin-in +.JustCode + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# NCrunch +_NCrunch_* +.*crunch*.local.xml + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# TODO: Comment the next line if you want to checkin your web deploy settings +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# NuGet Packages +*.nupkg +# The packages folder can be ignored because of Package Restore +**/packages/* +# except build/, which is used as an MSBuild target. +!**/packages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/packages/repositories.config + +project.lock.json + +# Windows Azure Build Output +csx/ +*.build.csdef + +# Windows Store app package directory +AppPackages/ + +# Others +*.[Cc]ache +ClientBin/ +[Ss]tyle[Cc]op.* +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.pfx +*.publishsettings +node_modules/ +bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm + +# SQL Server files +*.mdf +*.ldf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings + +# Microsoft Fakes +FakesAssemblies/ + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt diff --git a/LICENSE b/LICENSE.txt similarity index 100% rename from LICENSE rename to LICENSE.txt diff --git a/README.md b/README.md new file mode 100644 index 0000000..e69de29 diff --git a/resources/icon/1240x600.png b/resources/icon/1240x600.png new file mode 100644 index 0000000000000000000000000000000000000000..04163a88f2ff1d9775778e8e8f0ec09428e13482 GIT binary patch literal 7823 zcmeHMc~n#9w*LYsTr8k<;FZyPeMNh_X@8U)^V4)(o!-&*gV_xjdbZ{40hvR1z7 z?ETxrxA*TH-VhvUWoc�I*uSCSW4~W?BGDSQb;^h`c?#5CA8}+JF_b~|09dv?$SdSkxsxQ45b~qR zr9<7=5!A~rH`_#Yhy#~-%Y3fvvk+=tN8lTJZ`_wLLO!=Q2jhQ+0;rx~KbNcm4c|G_ zcpjED(S#H-Vo$Q7vh>06AahE)F1~ke`VnLya@R$ZQl9kni-HtQ@$mtQs_kYggi-5S zUtb>-s6Xi{mg?$Fe@renc3}e4z;rH*Fx~hJJblX&*UT@N04tyf=Mr6 zvNtMg6;j0&pR}z?10zb(_#l}!3$&+`2hbB_Qdth&5bLm4p4}(TvYY>1YBfJ5>LEq7 zbSr5h)ECL6JBwZOS$*cHqbPl_LvU*f=sQ7d*W>(e@K;zbnn25wU26?OM-bl;Y2e7G z@crA!_iF}z!Fb{jk6}(YI<&fS_>8*$0+62~Jt}(OJ(jI5jIE_Q&0ycWi!MQ#cDb3l zsKHl(%K?j&Pamf&QIr@5S3jr`+lpmO9^Ixi!jyCG41sX#(+$NDqZ_vE9W=&7XL9!= zwurg79!Wu3hCiDJ7OBnb0Z4TDcMMO)(o5}9Dg=8B{EI`^766GS>A|se=lLPruwqVq z%+?A6eZ=#!#wl)H6-Cv#1X>z2oPA?g`fVeLVAB0&abvjPf^juo+`kVbE)<~-o%V)^V<(xR1}BG{pxM%fPOjQ zOW^%gFQ!52A33&~`!0K+f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d&D!%P^c}^_8esOikM? zsIN5d>W9n~P_6!g5MNuK;}QIkvQAOSZ@IzGWkiV~7aNoR7x^y~w3)kWjYnXETYx=HH8X=U<`FVBpG33lAH`~@PP5rJhgO#l*QuXOZF?E$4O4g( zaYXkZO+%}tIhR2OabO5*qVec$_X44gHHYB-_Kr_Q0!@5Hd|8h4T5B%SVs|{2N418# zf%ifPAS)UISoZe-UY~@3a6!p`?SgTH3rdPf7i1{+Y%Tal0156`a{NC7=s6rwU+aDw z2G45+A$mbWB|i;6ht|8aA1F^c+FZowiGSI=pAYF(c-Ii_VZC2GPc(B?f;e8HbFb7D zqj};KNTQa04{a>D0gW)AC-QIxD)Y4VX5s5Ec4KakzT%0G69f~`MiMHTGa1g(c&W6) zH6p2?#lED|8OG&k*O&zir8qB`A_#uXyMm(N?J0oojw>APp*!3mK*$=h6 z!FKFB?8Q@lme`9nafu(s9e>IPWUB^Lr#e3n5xf!ny}?kP+N7x9r@YD3J`z1zRg}@ynqE1nxNQB=Z0EljbIGZY4NB6?~!CFF~`Y>D^6%U!%1iSg9H3)}T)SnH> z>PqY){QU93Ktb2e^TWA!VGv$Pf@2JrQH7sIJY3M8ittBC881VYS07Pd!%x8LQ7d@Q zo#y^)!e&!dJG?RyrDKuBoKaiY$ZE}P`=VnYd#Bq&EWfId^SAWR1*4GQXn~#WAJ0D_ c0>dp6<_;DwqI?Q2leER!uYv=lD>>=^267U>6#xJL literal 0 HcmV?d00001 diff --git a/resources/icon/150.png b/resources/icon/150.png new file mode 100644 index 0000000000000000000000000000000000000000..8d32763377851ec4f84bf6ea774a1a96f8b66653 GIT binary patch literal 1844 zcmdT_Yf#cz6o<^TRD2btspX2%&akPKX5uq3#P>Fv(8It)nUQ>?qXuLeCb*emSU!44 zP3u}KDe9D&0kVq8iaM?-Q7vluOtKY3mk8UxHM2WA)tA2Qow;+*J!gKubLO0L&;2nv z5^c85ZXE~&GQ)(R_JcrR#L6~a1868YC7B@58XX1|_`}Joum3=@$XJK2F&V6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we?Nof6D|DYM>FImLtUxbjs!wWxq8p-4Mj9prd~AOPuRIOr6Qz22oHbMikfvov3I!Ri7O=i@CbDche7K@FqPwo@RDK)?Yr%0|uHw&E$G6 z6C>C~wQL^)W^hI_Lo)_Tg&bL@#_A8X{$@%BGVE{1Hy-`-X?|vTZ6kGQx&XwKIdZXO h4*}5E{wg1E=jT&p5eDK;x$4Bq9TOahs^3eX{|yNRA8Y^s literal 0 HcmV?d00001 diff --git a/resources/icon/44.png b/resources/icon/44.png new file mode 100644 index 0000000000000000000000000000000000000000..ccdc0208f944d7c12aecb86810f9c4f585e38fe6 GIT binary patch literal 305 zcmeAS@N?(olHy`uVBq!ia0vp^Iv~u!1|;QLq8NeH4^J1zkcif|Gj8*>DDbdW_x%5V z`mT7v-hk+{VyBjUPE#qAnXn=uEhvEfONylK2Ns5ia`yJgyFVQluKnpHaxhd*n(Io# zst-GB{JWm0F*t~u*-V)ylV!MBM`pnrHio3M=!b$H8}qo$*>YUqubJS z6Q903b2d6+*X4Net2;FL7R}@iuM)qyu3pbB_Myl(wbs3!iTOb{X2Y0z?+-u!e%>Ko z#>J%g;l+3<(UXhY=5OC1`rh6_>VLGwDJgMo^>bP0l+XkK)PsKY literal 0 HcmV?d00001 diff --git a/resources/icon/50.png b/resources/icon/50.png new file mode 100644 index 0000000000000000000000000000000000000000..3a758bf4210264ec909dc6604d8d521e832dfc81 GIT binary patch literal 278 zcmV+x0qOpUP)W@gLiB3dys1As^E z_>Q%dvaN8`|!TFhP^Xq0bANJ@RcuW*Ei*_fG`$A_a#V!{u0A4!K(LMm-uf!eo} z7Kmm^o?G_P^4!&(@4a)LS1(!R`TEwm$?KngpS1h*nS%!z1!LIfsow8pG*SBhk7a{a zp_1tn_6?%iHzdx8eGvH}qrHQ@hT+;G|CLcX3}>HI+gCfV|6tj}b}e1$_JcjlSLd2O zV7z%KihbS#mhy(ZH@NOG-kSJ(g_7+9zx#jxovLjY<~?@!+BbYm86cex`emL-V>g<$8HziZ`^czLR&aZKGyVlqGWv z)3-+b1Mm0n`ff1V{Lr^Y!e@h#T7=|Fk-)F(KJ)1bzVUb)5LGbwVC|Px7ue=0-}pOS zY!Azp0>NcnI?VYhEt+3yb=Ox!Y_Ojpay0>Q@`fF?63g-jOKyROxehoXPRFTQ?#T>ZS-w z3xDR(-;^Q0?}6IUTPh##L>SF-`SpQS{Orcn2W}_lMY~RGj6TrHbX)%9#ee(VuNJ>q za`H*W{-*9{H_YC7#e_ROwrjGqDq($Vw5Qj1e#5RyM{WP@>5egQZ)cfqdpt{6>bu~X ziwk99zR6f;0u`$4cwzXeT#KH9UA~MnWniFof6ikR3PP-uZlHW(r>pHeObc!>_)^ER&&XD zi`9J%jvrIf-I39!Cw(x|*>z%G^Xhqvk6!Peu;W~$9-Gg}@eD9P~dYD?Ye%O2vsNjjYWmLhws!rdEUHXezMK_TMxMXw6{;a<9BoUp7kA5 zXN431)9ReXchrnN1-N#~eZR<%$8f!&dPn~RNtdf}*QY8~ y-En8G=oFr*LP= literal 0 HcmV?d00001 diff --git a/source/.editorconfig b/source/.editorconfig index 35b25f0..d4fbbe8 100644 --- a/source/.editorconfig +++ b/source/.editorconfig @@ -6,3 +6,10 @@ indent_size = 4 end_of_line = crlf insert_final_newline = true charset = utf-8-bom + +[*.{xml,wxs}] +indent_style = space +indent_size = 2 +end_of_line = crlf +insert_final_newline = true +charset = utf-8-bom diff --git a/source/Setup/SylphyHorn.Bootstrapper.Gen/Bundle.linq b/source/Setup/SylphyHorn.Bootstrapper.Gen/Bundle.linq new file mode 100644 index 0000000..9d8877a --- /dev/null +++ b/source/Setup/SylphyHorn.Bootstrapper.Gen/Bundle.linq @@ -0,0 +1,55 @@ + + System.Runtime.InteropServices + + +void Main() +{ + // Test code for Bundle.tt + + const string relativePath = @"..\SylphyHorn.Bootstrapper.UI\bin\Release"; + var targets = Array.Empty(); + var currentDir = new DirectoryInfo(Path.GetDirectoryName(Host.ResolvePath("Bundle.tt"))); + var appRootDir = Path.GetFullPath(Path.Combine(currentDir.FullName, relativePath)); + if (currentDir.Exists) + { + var releaseDir = new DirectoryInfo(appRootDir); + if (releaseDir.Exists) + { + targets = releaseDir.GetFiles("*", SearchOption.AllDirectories) + .Where(x => x.Extension == ".dll") + .Where(x => !x.Name.Contains("vshost")) + .ToArray(); + } + } + + + + foreach (var file in targets) + { + var sb = new StringBuilder(260); + if (PathRelativePathTo(sb, appRootDir, FileAttributes.Directory, file.FullName, FileAttributes.Normal)) + { + var path = sb.ToString(2, sb.Length - 2); + path.Dump(); + } + } +} + +// Define other methods and classes here + +public class Host +{ + public static string ResolvePath(string s) + { + return @"D:\Repos\@Grabacr07\SylphyHorn\source\Setup\SylphyHorn.Installer.Gen\Bundle.tt"; + } +} + + +[DllImport("shlwapi.dll", CharSet = CharSet.Auto)] +private static extern bool PathRelativePathTo( + [Out] StringBuilder pszPath, + [In] string pszFrom, + [In] System.IO.FileAttributes dwAttrFrom, + [In] string pszTo, + [In] System.IO.FileAttributes dwAttrTo); diff --git a/source/Setup/SylphyHorn.Bootstrapper.Gen/Bundle.tt b/source/Setup/SylphyHorn.Bootstrapper.Gen/Bundle.tt new file mode 100644 index 0000000..e1a7467 --- /dev/null +++ b/source/Setup/SylphyHorn.Bootstrapper.Gen/Bundle.tt @@ -0,0 +1,115 @@ +<#@ template debug="false" hostspecific="true" language="C#" #> +<#@ assembly name="System.Core" #> +<#@ import namespace="System" #> +<#@ import namespace="System.Collections.Generic" #> +<#@ import namespace="System.Linq" #> +<#@ import namespace="System.IO" #> +<#@ import namespace="System.Runtime.InteropServices" #> +<#@ import namespace="System.Text" #> +<#@ output extension=".wxs" #> +<# + const string relativePath = @"..\SylphyHorn.Bootstrapper.UI\bin\Release"; + var targets = Array.Empty(); + var currentDir = new DirectoryInfo(Path.GetDirectoryName(Host.ResolvePath("Bundle.tt"))); + var appRootDir = Path.GetFullPath(Path.Combine(currentDir.FullName, relativePath)); + if (currentDir.Exists) + { + var releaseDir = new DirectoryInfo(appRootDir); + if (releaseDir.Exists) + { + targets = releaseDir.GetFiles("*", SearchOption.AllDirectories) + .Where(x => x.Extension == ".dll") + .Where(x => !x.Name.Contains("vshost")) + .ToArray(); + } + } +#> + + + + + + + + + + + + + + + +<# + foreach (var file in targets) + { + var sb = new StringBuilder(260); + if (PathRelativePathTo(sb, appRootDir, FileAttributes.Directory, file.FullName, FileAttributes.Normal)) + { + var path = sb.ToString(2, sb.Length - 2); +#> + +<# + } + } +#> + + + + + + + + + + + + + +<#+ +[DllImport("shlwapi.dll", CharSet = CharSet.Auto)] +private static extern bool PathRelativePathTo( + [Out] StringBuilder pszPath, + [In] string pszFrom, + [In] System.IO.FileAttributes dwAttrFrom, + [In] string pszTo, + [In] System.IO.FileAttributes dwAttrTo); +#> \ No newline at end of file diff --git a/source/Setup/SylphyHorn.Bootstrapper.Gen/Bundle.wxs b/source/Setup/SylphyHorn.Bootstrapper.Gen/Bundle.wxs new file mode 100644 index 0000000..198c35c --- /dev/null +++ b/source/Setup/SylphyHorn.Bootstrapper.Gen/Bundle.wxs @@ -0,0 +1,90 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/source/Setup/SylphyHorn.Bootstrapper.Gen/Properties/AssemblyInfo.cs b/source/Setup/SylphyHorn.Bootstrapper.Gen/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..e423c7c --- /dev/null +++ b/source/Setup/SylphyHorn.Bootstrapper.Gen/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// アセンブリに関する一般情報は以下の属性セットをとおして制御されます。 +// アセンブリに関連付けられている情報を変更するには、 +// これらの属性値を変更してください。 +[assembly: AssemblyTitle("SylphyHorn.Bootstrapper.Gen")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("SylphyHorn.Bootstrapper.Gen")] +[assembly: AssemblyCopyright("Copyright © 2016")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// ComVisible を false に設定すると、その型はこのアセンブリ内で COM コンポーネントから +// 参照不可能になります。COM からこのアセンブリ内の型にアクセスする場合は、 +// その型の ComVisible 属性を true に設定してください。 +[assembly: ComVisible(false)] + +// このプロジェクトが COM に公開される場合、次の GUID が typelib の ID になります +[assembly: Guid("c5ad027b-9937-4a9c-9a57-814693bcfe0c")] + +// アセンブリのバージョン情報は次の 4 つの値で構成されています: +// +// メジャー バージョン +// マイナー バージョン +// ビルド番号 +// Revision +// +// すべての値を指定するか、下のように '*' を使ってビルドおよびリビジョン番号を +// 既定値にすることができます: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/source/Setup/SylphyHorn.Bootstrapper.Gen/SylphyHorn.Bootstrapper.Gen.csproj b/source/Setup/SylphyHorn.Bootstrapper.Gen/SylphyHorn.Bootstrapper.Gen.csproj new file mode 100644 index 0000000..d42c9b7 --- /dev/null +++ b/source/Setup/SylphyHorn.Bootstrapper.Gen/SylphyHorn.Bootstrapper.Gen.csproj @@ -0,0 +1,71 @@ + + + + + Debug + AnyCPU + {C5AD027B-9937-4A9C-9A57-814693BCFE0C} + Library + Properties + + SylphyHorn.Bootstrapper.Gen + v4.6 + 512 + + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + TextTemplatingFileGenerator + Bundle.wxs + + + + + + Bundle.tt + True + True + + + + + + + + \ No newline at end of file diff --git a/source/Setup/SylphyHorn.Bootstrapper.UI/Bootstrapper/Application.xaml b/source/Setup/SylphyHorn.Bootstrapper.UI/Bootstrapper/Application.xaml new file mode 100644 index 0000000..221a399 --- /dev/null +++ b/source/Setup/SylphyHorn.Bootstrapper.UI/Bootstrapper/Application.xaml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + diff --git a/source/Setup/SylphyHorn.Bootstrapper.UI/Bootstrapper/Application.xaml.cs b/source/Setup/SylphyHorn.Bootstrapper.UI/Bootstrapper/Application.xaml.cs new file mode 100644 index 0000000..7476a7c --- /dev/null +++ b/source/Setup/SylphyHorn.Bootstrapper.UI/Bootstrapper/Application.xaml.cs @@ -0,0 +1,48 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Windows; +using MetroRadiance.UI; +using SylphyHorn.Bootstrapper.UI; +using SylphyHorn.Bootstrapper.UI.Bindings; +using WixToolset.Bootstrapper; +using StartupEventArgs = System.Windows.StartupEventArgs; + +namespace SylphyHorn.Bootstrapper +{ + sealed partial class Application + { + private readonly Installer _installer; + + public Application(Installer installer) + { + this._installer = installer; + this.DispatcherUnhandledException += (sender, e) => + { + e.Handled = true; + installer.Log(LogLevel.Verbose, e.Exception.Message); + installer.Quit(e.Exception.HResult); + }; + } + + protected override void OnStartup(StartupEventArgs e) + { + base.OnStartup(e); + + ThemeService.Current.Register(this, Theme.Windows, Accent.Windows); + + var window = new MainWindow + { + DataContext = new MainWindowViewModel(this._installer), + WindowStartupLocation = WindowStartupLocation.CenterScreen, + }; + + window.Show(); + } + + protected override void OnExit(ExitEventArgs e) + { + base.OnExit(e); + } + } +} diff --git a/source/Setup/SylphyHorn.Bootstrapper.UI/Bootstrapper/InstallResult.cs b/source/Setup/SylphyHorn.Bootstrapper.UI/Bootstrapper/InstallResult.cs new file mode 100644 index 0000000..5661a99 --- /dev/null +++ b/source/Setup/SylphyHorn.Bootstrapper.UI/Bootstrapper/InstallResult.cs @@ -0,0 +1,50 @@ +using System; + +namespace SylphyHorn.Bootstrapper +{ + public struct InstallResult : IEquatable + { + public bool IsSucceeded { get; } + + public bool RestartRequired { get; } + + public InstallResult(bool isSucceeded, bool restartRequired) + { + this.IsSucceeded = isSucceeded; + this.RestartRequired = restartRequired; + } + + public override int GetHashCode() + { + unchecked + { + return (this.IsSucceeded.GetHashCode() * 397) ^ this.RestartRequired.GetHashCode(); + } + } + + public override bool Equals(object obj) + { + return obj is InstallResult && base.Equals((InstallResult)obj); + } + + public bool Equals(InstallResult other) + { + return this.IsSucceeded == other.IsSucceeded && this.RestartRequired == other.RestartRequired; + } + + public override string ToString() + { + return $"{(this.IsSucceeded ? "Succeeded" : "Failed")}{(this.RestartRequired ? ", Restart required" : "")}"; + } + + public static bool operator ==(InstallResult result1, InstallResult result2) + { + return result1.Equals(result2); + } + + public static bool operator !=(InstallResult result1, InstallResult result2) + { + return !(result1 == result2); + } + } +} diff --git a/source/Setup/SylphyHorn.Bootstrapper.UI/Bootstrapper/Installer.CustomBA.cs b/source/Setup/SylphyHorn.Bootstrapper.UI/Bootstrapper/Installer.CustomBA.cs new file mode 100644 index 0000000..d1c00d7 --- /dev/null +++ b/source/Setup/SylphyHorn.Bootstrapper.UI/Bootstrapper/Installer.CustomBA.cs @@ -0,0 +1,122 @@ +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Linq; +using System.Threading.Tasks; +using System.Windows.Threading; +using MetroTrilithon.Threading.Tasks; +using SylphyHorn.Properties; +using WixToolset.Bootstrapper; + +namespace SylphyHorn.Bootstrapper +{ + partial class Installer + { + public sealed class SylphyHornBootstrapperApplication : BootstrapperApplication + { + private Installer _installer; + + protected override void Run() + { + this.Engine.Log(LogLevel.Verbose, $"Bundle.Name: {this.BAManifest.Bundle.Name}"); + this.Engine.Log(LogLevel.Verbose, $"CurrentUICulture: {CultureInfo.CurrentUICulture}"); + + Resources.Culture = CultureInfo.CurrentUICulture; + AppDomain.CurrentDomain.UnhandledException += (sender, e) => this.Engine.Log(LogLevel.Verbose, e.ExceptionObject?.ToString()); + TaskLog.Occured += (sender, log) => this.Engine.Log(LogLevel.Error, $"Unhandled Exception: {log.Exception.Message}"); + + this._installer = new Installer(this); + var application = new Application(this._installer); + var exitCode = application.Run(); + + this.Engine.Quit(exitCode); + } + + protected override void OnDetectPackageComplete(DetectPackageCompleteEventArgs e) + { + base.OnDetectPackageComplete(e); + + if (e.PackageId == this._installer.PackageId) + { + if (this._installer.Operation != Operation.None) + { + this.Engine.Log(LogLevel.Error, $"Install target '{this._installer.PackageId}' is already detected."); + return; + } + + switch (e.State) + { + case PackageState.Absent: + this._installer.Operation = Operation.Install; + break; + + case PackageState.Present: + this._installer.Operation = Operation.Uninstall; + break; + + case PackageState.Obsolete: + this._installer.Operation = Operation.Upgrade; + break; + } + } + } + + protected override void OnDetectMsiFeature(DetectMsiFeatureEventArgs e) + { + base.OnDetectMsiFeature(e); + } + + protected override void OnDetectComplete(DetectCompleteEventArgs e) + { + base.OnDetectComplete(e); + + this._installer.Status = Status.Detected; + + if (e.Status >= 0 && this.Command.Display != Display.Full) + { + this.Engine.Log(LogLevel.Verbose, "Invoking automatic plan for non-interactive mode."); + this.Engine.Plan(this.Command.Action); + } + } + + protected override void OnExecuteProgress(ExecuteProgressEventArgs e) + { + if (this._installer._canceled) + { + e.Result = WixToolset.Bootstrapper.Result.Cancel; + } + + base.OnExecuteProgress(e); + } + + protected override void OnPlanBegin(PlanBeginEventArgs e) + { + base.OnPlanBegin(e); + this._installer.Status = Status.Planning; + } + + protected override void OnPlanComplete(PlanCompleteEventArgs e) + { + base.OnPlanComplete(e); + + if (e.Status >= 0) + { + this.Engine.Apply(IntPtr.Zero); + } + } + + protected override void OnApplyBegin(ApplyBeginEventArgs e) + { + base.OnApplyBegin(e); + this._installer.Status = Status.Applying; + } + + protected override void OnApplyComplete(ApplyCompleteEventArgs e) + { + base.OnApplyComplete(e); + this._installer.Result = new InstallResult(e.Status == 0, e.Restart == ApplyRestart.RestartRequired); + this._installer.Status = Status.Completed; + } + } + } +} diff --git a/source/Setup/SylphyHorn.Bootstrapper.UI/Bootstrapper/Installer.cs b/source/Setup/SylphyHorn.Bootstrapper.UI/Bootstrapper/Installer.cs new file mode 100644 index 0000000..b6e7ac0 --- /dev/null +++ b/source/Setup/SylphyHorn.Bootstrapper.UI/Bootstrapper/Installer.cs @@ -0,0 +1,113 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Livet; +using WixToolset.Bootstrapper; + +namespace SylphyHorn.Bootstrapper +{ + public partial class Installer : NotificationObject + { + private readonly SylphyHornBootstrapperApplication _ba; + private Status _status = Status.Preparing; + private Operation _operation; + private InstallResult? _result; + private bool _canceled; + + public string PackageId { get; } = "SylphyHornMsiPackage"; + + public bool HasDisplay => this._ba.Command.Display == Display.Full || this._ba.Command.Display == Display.Passive; + + public Operation Operation + { + get { return this._operation; } + private set + { + if (this._operation != value) + { + this._operation = value; + this._ba.Engine.Log(LogLevel.Verbose, $"{nameof(Installer)}.{nameof(this.Operation)} = {value}"); + + this.RaisePropertyChanged(); + } + } + } + + public Status Status + { + get { return this._status; } + private set + { + if (this._status != value) + { + this._status = value; + this._ba.Engine.Log(LogLevel.Verbose, $"{nameof(Installer)}.{nameof(this.Status)} = {value}"); + + this.RaisePropertyChanged(); + } + } + } + + public InstallResult? Result + { + get { return this._result; } + private set + { + if (this._result != value) + { + this._result = value; + this._ba.Engine.Log(LogLevel.Verbose, $"{nameof(Installer)}.{nameof(this.Result)} = {value}"); + + this.RaisePropertyChanged(); + } + } + } + + private Installer(SylphyHornBootstrapperApplication ba) + { + this._ba = ba; + } + + public void Detect() + { + this._ba.Engine.Detect(); + } + + public void Start() + { + switch (this.Operation) + { + case Operation.None: + throw new InvalidOperationException(); + + case Operation.Install: + case Operation.Upgrade: + this._ba.Engine.Plan(LaunchAction.Install); + break; + + case Operation.Uninstall: + this._ba.Engine.Plan(LaunchAction.Uninstall); + break; + + default: + throw new NotImplementedException(); + } + } + + public void Cancel() + { + this._canceled = true; + } + + public void Log(LogLevel level, string message) + { + this._ba.Engine.Log(level, message); + } + + public void Quit(int exitCode) + { + this._ba.Engine.Quit(exitCode); + } + } +} diff --git a/source/Setup/SylphyHorn.Bootstrapper.UI/Bootstrapper/Launcher.cs b/source/Setup/SylphyHorn.Bootstrapper.UI/Bootstrapper/Launcher.cs new file mode 100644 index 0000000..6eaaffe --- /dev/null +++ b/source/Setup/SylphyHorn.Bootstrapper.UI/Bootstrapper/Launcher.cs @@ -0,0 +1,29 @@ +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.IO; +using System.Linq; +using System.Threading.Tasks; + +namespace SylphyHorn.Bootstrapper +{ + public static class Launcher + { + private static FileInfo _target; + private static readonly string _targetPath = Path.Combine( + Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), + "grabacr.net", + "SylphyHorn Engine", + "SylphyHorn.exe"); + + public static FileInfo Target => _target ?? (_target = new FileInfo(_targetPath)); + + public static void Launch() + { + if (Target.Exists) + { + Process.Start(Target.FullName); + } + } + } +} diff --git a/source/Setup/SylphyHorn.Bootstrapper.UI/Bootstrapper/Operation.cs b/source/Setup/SylphyHorn.Bootstrapper.UI/Bootstrapper/Operation.cs new file mode 100644 index 0000000..cd26a10 --- /dev/null +++ b/source/Setup/SylphyHorn.Bootstrapper.UI/Bootstrapper/Operation.cs @@ -0,0 +1,11 @@ + +namespace SylphyHorn.Bootstrapper +{ + public enum Operation + { + None = 0, + Install, + Upgrade, + Uninstall, + } +} diff --git a/source/Setup/SylphyHorn.Bootstrapper.UI/Bootstrapper/Status.cs b/source/Setup/SylphyHorn.Bootstrapper.UI/Bootstrapper/Status.cs new file mode 100644 index 0000000..e1c7d5b --- /dev/null +++ b/source/Setup/SylphyHorn.Bootstrapper.UI/Bootstrapper/Status.cs @@ -0,0 +1,12 @@ + +namespace SylphyHorn.Bootstrapper +{ + public enum Status + { + Preparing, + Detected, + Planning, + Applying, + Completed, + } +} diff --git a/source/Setup/SylphyHorn.Bootstrapper.UI/Bootstrapper/UI/Bindings/MainWindowViewModel.cs b/source/Setup/SylphyHorn.Bootstrapper.UI/Bootstrapper/UI/Bindings/MainWindowViewModel.cs new file mode 100644 index 0000000..3130747 --- /dev/null +++ b/source/Setup/SylphyHorn.Bootstrapper.UI/Bootstrapper/UI/Bindings/MainWindowViewModel.cs @@ -0,0 +1,124 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Livet; +using MetroTrilithon.Mvvm; +using MetroTrilithon.Threading.Tasks; +using SylphyHorn.Properties; + +namespace SylphyHorn.Bootstrapper.UI.Bindings +{ + public class MainWindowViewModel : WindowViewModel + { + private readonly Installer _installer; + + #region Content notification property + + private ViewModel _Content = new PreparationViewModel(); + + public ViewModel Content + { + get { return this._Content; } + set + { + if (this._Content != value) + { + this._Content = value; + this.RaisePropertyChanged(); + } + } + } + + #endregion + + public MainWindowViewModel(Installer installer) + { + this._installer = installer; + this.Title = Resources.WindowTitle; + + this._installer + .Subscribe(nameof(Installer.Status), () => this.ChangeStatus()) + .AddTo(this); + } + + protected override void InitializeCore() + { + base.InitializeCore(); + this.Detect().Forget(); + } + + protected override void CloseCanceledCallbackCore() + { + base.CloseCanceledCallbackCore(); + + var current = this.Content; + var cancel = new CancellationViewModel(current); + cancel.CancelCancellationAction = () => this.Content = cancel.Fallback; + cancel.PerformCancellationAction = () => this._installer.Cancel(); + + this.Content = cancel; + } + + private async Task Detect() + { + await Task.Delay(1500); // いわゆる演出 + this._installer.Detect(); + } + + private void ChangeStatus() + { + switch (this._installer.Status) + { + case Status.Preparing: + this.CanClose = true; + this.Content = new PreparationViewModel(); + break; + + case Status.Detected: + this.CanClose = true; + this.Content = new ConfirmationViewModel(this._installer.Operation) + { + ClickAction = () => this._installer.Start(), + }; + break; + + case Status.Planning: + case Status.Applying: + this.CanClose = false; + if (this.Content is ProgressViewModel) break; + this.Content = new ProgressViewModel(this._installer.Operation); + break; + + case Status.Completed: + this.CanClose = true; + if (this._installer.Result != null && this._installer.Result.Value.IsSucceeded) + { + var content = new CompletionViewModel(this._installer.Operation, this._installer.Result.Value); + switch (this._installer.Operation) + { + case Operation.Install: + case Operation.Upgrade: + content.ClickAction = () => + { + Launcher.Launch(); + this.Close(); + }; + break; + case Operation.Uninstall: + content.ClickAction = () => this.Close(); + break; + } + this.Content = content; + break; + } + goto default; + + default: + this.CanClose = true; + this.Content = new ErrorViewModel(); + break; + } + } + } +} diff --git a/source/Setup/SylphyHorn.Bootstrapper.UI/Bootstrapper/UI/Bindings/StatusViewModels.cs b/source/Setup/SylphyHorn.Bootstrapper.UI/Bootstrapper/UI/Bindings/StatusViewModels.cs new file mode 100644 index 0000000..2d453b4 --- /dev/null +++ b/source/Setup/SylphyHorn.Bootstrapper.UI/Bootstrapper/UI/Bindings/StatusViewModels.cs @@ -0,0 +1,303 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Livet; +using SylphyHorn.Properties; +using WixToolset.Bootstrapper; + +namespace SylphyHorn.Bootstrapper.UI.Bindings +{ + // 現状、メッセージ表示程度しか要件がないため、Install/Uninstall/Upgrade いずれの場合も + // ConfirmationViewModel とその DataTemplate だけで UI を実装できる。 + // + // 今後、Install/Uninstall/Upgrade でそれぞれ専用の UI を表示しなければならなくなった場合、 + // ConfirmationViewModel ではなく専用の ViewModel を作成して MainWindowViewModel.Content に設定し、 + // それぞれの ViewModel に関連付けられた DataTemplate で UI を実装するのが望ましい。 + // + // ProgressViewModel や、CompletionViewModel 等も同じ。 + + public class PreparationViewModel : ViewModel + { + } + + public class ConfirmationViewModel : ViewModel + { + public Action ClickAction { get; set; } + + #region Header notification property + + private string _Header; + + public string Header + { + get { return this._Header; } + set + { + if (this._Header != value) + { + this._Header = value; + this.RaisePropertyChanged(); + } + } + } + + #endregion + + #region Message notification property + + private string _Message; + + public string Message + { + get { return this._Message; } + set + { + if (this._Message != value) + { + this._Message = value; + this.RaisePropertyChanged(); + } + } + } + + #endregion + + #region Button notification property + + private string _Button; + + public string Button + { + get { return this._Button; } + set + { + if (this._Button != value) + { + this._Button = value; + this.RaisePropertyChanged(); + } + } + } + + #endregion + + public ConfirmationViewModel(Operation operation) + { + switch (operation) + { + case Operation.Install: + case Operation.Upgrade: + this.Header = Resources.InstallMode_Header; + this.Message = Resources.InstallMode_Message; + this.Button = Resources.Install; + break; + + case Operation.Uninstall: + this.Header = Resources.UninstallMode_Header; + this.Message = Resources.UninstallMode_Message; + this.Button = Resources.Uninstall; + break; + } + } + + public void Click() + { + this.ClickAction?.Invoke(); + } + } + + public class ProgressViewModel : ViewModel + { + #region Message notification property + + private string _Message; + + public string Message + { + get { return this._Message; } + set + { + if (this._Message != value) + { + this._Message = value; + this.RaisePropertyChanged(); + } + } + } + + #endregion + + public ProgressViewModel(Operation operation) + { + switch (operation) + { + case Operation.Install: + case Operation.Upgrade: + this.Message = Resources.Progress_Install; + break; + + case Operation.Uninstall: + this.Message = Resources.Progress_Uninstall; + break; + } + } + } + + public class CompletionViewModel : ViewModel + { + public Action ClickAction { get; set; } + + #region Header notification property + + private string _Header; + + public string Header + { + get { return this._Header; } + set + { + if (this._Header != value) + { + this._Header = value; + this.RaisePropertyChanged(); + } + } + } + + #endregion + + #region Message notification property + + private string _Message; + + public string Message + { + get { return this._Message; } + set + { + if (this._Message != value) + { + this._Message = value; + this.RaisePropertyChanged(); + } + } + } + + #endregion + + #region Button notification property + + private string _Button; + + public string Button + { + get { return this._Button; } + set + { + if (this._Button != value) + { + this._Button = value; + this.RaisePropertyChanged(); + } + } + } + + #endregion + + public CompletionViewModel(Operation operation, InstallResult result) + { + if (result.IsSucceeded) + { + switch (operation) + { + case Operation.Install: + case Operation.Upgrade: + this.Header = Resources.InstallCompleted; + this.Message = Resources.InstallCompleted_Message; + this.Button = Resources.Launch; + break; + + case Operation.Uninstall: + this.Header = Resources.UninstallCompleted; + this.Message = Resources.UninstallCompleted_Message; + this.Button = Resources.Close; + break; + } + } + else + { + switch (operation) + { + case Operation.Install: + case Operation.Upgrade: + this.Header = Resources.InstallFailed; + this.Message = Resources.InstallFailed_Message; + this.Button = Resources.Close; + break; + + case Operation.Uninstall: + this.Header = Resources.UninstallFailed; + this.Message = Resources.UninstallFailed_Message; + this.Button = Resources.Close; + break; + } + } + } + + public void Click() + { + this.ClickAction?.Invoke(); + } + } + + public class CancellationViewModel : ViewModel + { + public Action CancelCancellationAction { get; set; } + + public Action PerformCancellationAction { get; set; } + + public ViewModel Fallback { get; } + + public bool CanClick { get; private set; } = true; + + public CancellationViewModel(ViewModel fallback) + { + this.Fallback = fallback; + } + + public void CancelCancellation() + { + this.CanClick = false; + this.CancelCancellationAction?.Invoke(); + } + + public void PerformCancellation() + { + this.CanClick = false; + this.PerformCancellationAction?.Invoke(); + } + } + + public class ErrorViewModel : ViewModel + { + #region Message notification property + + private string _Message; + + public string Message + { + get { return this._Message; } + set + { + if (this._Message != value) + { + this._Message = value; + this.RaisePropertyChanged(); + } + } + } + + #endregion + } +} diff --git a/source/Setup/SylphyHorn.Bootstrapper.UI/Bootstrapper/UI/Controls/ContentControlHelper.cs b/source/Setup/SylphyHorn.Bootstrapper.UI/Bootstrapper/UI/Controls/ContentControlHelper.cs new file mode 100644 index 0000000..5ac773c --- /dev/null +++ b/source/Setup/SylphyHorn.Bootstrapper.UI/Bootstrapper/UI/Controls/ContentControlHelper.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Media.Animation; + +namespace SylphyHorn.Bootstrapper.UI.Controls +{ + public static class ContentControlHelper + { + public static readonly DependencyProperty ContentChangedAnimationProperty = DependencyProperty.RegisterAttached( + "ContentChangedAnimation", typeof(Storyboard), typeof(ContentControlHelper), new PropertyMetadata(default(Storyboard), ContentChangedAnimationPropertyChangedCallback)); + + public static void SetContentChangedAnimation(ContentControl element, Storyboard value) + { + element.SetValue(ContentChangedAnimationProperty, value); + } + + public static Storyboard GetContentChangedAnimation(ContentControl element) + { + return (Storyboard)element.GetValue(ContentChangedAnimationProperty); + } + + private static void ContentChangedAnimationPropertyChangedCallback(DependencyObject d, DependencyPropertyChangedEventArgs e) + { + var contentControl = d as ContentControl; + if (contentControl == null) return; + + var propertyDescriptor = DependencyPropertyDescriptor.FromProperty(ContentControl.ContentProperty, typeof(ContentControl)); + + propertyDescriptor.RemoveValueChanged(contentControl, ContentChangedHandler); + propertyDescriptor.AddValueChanged(contentControl, ContentChangedHandler); + } + + private static void ContentChangedHandler(object sender, EventArgs eventArgs) + { + var animateObject = (ContentControl)sender; + var storyboard = GetContentChangedAnimation(animateObject); + storyboard.Begin(animateObject); + } + } +} diff --git a/source/Setup/SylphyHorn.Bootstrapper.UI/Bootstrapper/UI/MainWindow.xaml b/source/Setup/SylphyHorn.Bootstrapper.UI/Bootstrapper/UI/MainWindow.xaml new file mode 100644 index 0000000..c441447 --- /dev/null +++ b/source/Setup/SylphyHorn.Bootstrapper.UI/Bootstrapper/UI/MainWindow.xaml @@ -0,0 +1,236 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/source/Setup/SylphyHorn.Bootstrapper.UI/Bootstrapper/UI/MainWindow.xaml.cs b/source/Setup/SylphyHorn.Bootstrapper.UI/Bootstrapper/UI/MainWindow.xaml.cs new file mode 100644 index 0000000..a6feb4c --- /dev/null +++ b/source/Setup/SylphyHorn.Bootstrapper.UI/Bootstrapper/UI/MainWindow.xaml.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; + +namespace SylphyHorn.Bootstrapper.UI +{ + partial class MainWindow + { + public MainWindow() + { + this.InitializeComponent(); + } + } +} diff --git a/source/Setup/SylphyHorn.Bootstrapper.UI/BootstrapperCore.config b/source/Setup/SylphyHorn.Bootstrapper.UI/BootstrapperCore.config new file mode 100644 index 0000000..8ec77fd --- /dev/null +++ b/source/Setup/SylphyHorn.Bootstrapper.UI/BootstrapperCore.config @@ -0,0 +1,15 @@ + + + + +
+ + + + + + + + + + diff --git a/source/Setup/SylphyHorn.Bootstrapper.UI/Properties/AssemblyInfo.cs b/source/Setup/SylphyHorn.Bootstrapper.UI/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..b311ff5 --- /dev/null +++ b/source/Setup/SylphyHorn.Bootstrapper.UI/Properties/AssemblyInfo.cs @@ -0,0 +1,17 @@ +using System.Reflection; +using System.Runtime.InteropServices; +using System.Windows; +using SylphyHorn.Bootstrapper; +using WixToolset.Bootstrapper; + +[assembly: AssemblyTitle("SylphyHorn.Bootstrapper.UI")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyCompany("grabacr.net")] +[assembly: AssemblyProduct("SylphyHorn")] +[assembly: AssemblyCopyright("Copyright © 2016 Manato KAMEYA")] + +[assembly: ThemeInfo(ResourceDictionaryLocation.None, ResourceDictionaryLocation.SourceAssembly)] +[assembly: BootstrapperApplication(typeof(Installer.SylphyHornBootstrapperApplication))] + +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: ComVisible(false)] diff --git a/source/Setup/SylphyHorn.Bootstrapper.UI/Properties/Resources.Designer.cs b/source/Setup/SylphyHorn.Bootstrapper.UI/Properties/Resources.Designer.cs new file mode 100644 index 0000000..e103523 --- /dev/null +++ b/source/Setup/SylphyHorn.Bootstrapper.UI/Properties/Resources.Designer.cs @@ -0,0 +1,271 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace SylphyHorn.Properties { + using System; + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + public class Resources { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + public static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("SylphyHorn.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + public static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Looks up a localized string similar to _Close. + /// + public static string Close { + get { + return ResourceManager.GetString("Close", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to _Install. + /// + public static string Install { + get { + return ResourceManager.GetString("Install", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to cancel installation?. + /// + public static string InstallCancellation { + get { + return ResourceManager.GetString("InstallCancellation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Install Completed. + /// + public static string InstallCompleted { + get { + return ResourceManager.GetString("InstallCompleted", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to SylphyHorn Engine has been installed on your PC.. + /// + public static string InstallCompleted_Message { + get { + return ResourceManager.GetString("InstallCompleted_Message", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to インストール失敗. + /// + public static string InstallFailed { + get { + return ResourceManager.GetString("InstallFailed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to SylphyHorn Engine のインストールに失敗しました。. + /// + public static string InstallFailed_Message { + get { + return ResourceManager.GetString("InstallFailed_Message", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Install SylphyHorn Engine. + /// + public static string InstallMode_Header { + get { + return ResourceManager.GetString("InstallMode_Header", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Install SylphyHorn Engine to your PC. + ///Work will be completed soon.. + /// + public static string InstallMode_Message { + get { + return ResourceManager.GetString("InstallMode_Message", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to _Launch. + /// + public static string Launch { + get { + return ResourceManager.GetString("Launch", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No. + /// + public static string No { + get { + return ResourceManager.GetString("No", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Detect components.... + /// + public static string PreparationMode_Message { + get { + return ResourceManager.GetString("PreparationMode_Message", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Installing.... + /// + public static string Progress_Install { + get { + return ResourceManager.GetString("Progress_Install", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Uninstalling.... + /// + public static string Progress_Uninstall { + get { + return ResourceManager.GetString("Progress_Uninstall", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to _Uninstall. + /// + public static string Uninstall { + get { + return ResourceManager.GetString("Uninstall", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Uninstall Completed. + /// + public static string UninstallCompleted { + get { + return ResourceManager.GetString("UninstallCompleted", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to SylphyHorn Engine has been uninstalled from your PC.. + /// + public static string UninstallCompleted_Message { + get { + return ResourceManager.GetString("UninstallCompleted_Message", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to アンインストール失敗. + /// + public static string UninstallFailed { + get { + return ResourceManager.GetString("UninstallFailed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to SylphyHorn Engine のアンインストールに失敗しました。. + /// + public static string UninstallFailed_Message { + get { + return ResourceManager.GetString("UninstallFailed_Message", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Uninstall SylphyHorn Engine. + /// + public static string UninstallMode_Header { + get { + return ResourceManager.GetString("UninstallMode_Header", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Uninstall SylphyHorn Engine from your PC.. + /// + public static string UninstallMode_Message { + get { + return ResourceManager.GetString("UninstallMode_Message", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to SylphyHorn Installer. + /// + public static string WindowTitle { + get { + return ResourceManager.GetString("WindowTitle", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Yes. + /// + public static string Yes { + get { + return ResourceManager.GetString("Yes", resourceCulture); + } + } + } +} diff --git a/source/Setup/SylphyHorn.Bootstrapper.UI/Properties/Resources.ja-JP.resx b/source/Setup/SylphyHorn.Bootstrapper.UI/Properties/Resources.ja-JP.resx new file mode 100644 index 0000000..4cca204 --- /dev/null +++ b/source/Setup/SylphyHorn.Bootstrapper.UI/Properties/Resources.ja-JP.resx @@ -0,0 +1,190 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + + 閉じる + + + インストール + + + インストールを中止しますか? + + + インストール完了 + + + PC に SylphyHorn Engine がインストールされました。 + + + インストール失敗 + + + SylphyHorn Engine のインストールに失敗しました。 + + + Install SylphyHorn Engine + + + この PC に SylphyHorn Engine をインストールします。 +インストールはすぐに完了します。 + + + 起動 + + + いいえ + + + コンポーネントを検出しています。 + + + インストールしています... + + + アンインストールしています... + + + アンインストール + + + アンインストール完了 + + + PC から SylphyHorn Engine がアンインストールされました。 + + + アンインストール失敗 + + + SylphyHorn Engine のアンインストールに失敗しました。 + + + Uninstall SylphyHorn Engine + + + この PC から SylphyHorn Engine をアンインストールします。 + + + SylphyHorn Installer + + + はい + + \ No newline at end of file diff --git a/source/Setup/SylphyHorn.Bootstrapper.UI/Properties/Resources.resx b/source/Setup/SylphyHorn.Bootstrapper.UI/Properties/Resources.resx new file mode 100644 index 0000000..b7e40dd --- /dev/null +++ b/source/Setup/SylphyHorn.Bootstrapper.UI/Properties/Resources.resx @@ -0,0 +1,190 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + + _Close + + + _Install + + + Are you sure you want to cancel installation? + + + Install Completed + + + SylphyHorn Engine has been installed on your PC. + + + インストール失敗 + + + SylphyHorn Engine のインストールに失敗しました。 + + + Install SylphyHorn Engine + + + Install SylphyHorn Engine to your PC. +Work will be completed soon. + + + _Launch + + + No + + + Detect components... + + + Installing... + + + Uninstalling... + + + _Uninstall + + + Uninstall Completed + + + SylphyHorn Engine has been uninstalled from your PC. + + + アンインストール失敗 + + + SylphyHorn Engine のアンインストールに失敗しました。 + + + Uninstall SylphyHorn Engine + + + Uninstall SylphyHorn Engine from your PC. + + + SylphyHorn Installer + + + Yes + + \ No newline at end of file diff --git a/source/Setup/SylphyHorn.Bootstrapper.UI/SylphyHorn.Bootstrapper.UI.csproj b/source/Setup/SylphyHorn.Bootstrapper.UI/SylphyHorn.Bootstrapper.UI.csproj new file mode 100644 index 0000000..ee48859 --- /dev/null +++ b/source/Setup/SylphyHorn.Bootstrapper.UI/SylphyHorn.Bootstrapper.UI.csproj @@ -0,0 +1,148 @@ + + + + + Debug + AnyCPU + {EEE159CA-14BE-439C-9153-2B14004C1482} + Library + Properties + SylphyHorn + SylphyHorn.Bootstrapper.UI + v4.6 + 512 + {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + 4 + + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + false + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + false + + + + False + C:\Program Files (x86)\WiX Toolset v4.0\SDK\BootstrapperCore.dll + + + ..\..\packages\LivetCask.1.3.1.0\lib\net45\Livet.dll + True + + + ..\..\packages\MetroRadiance.2.2.1\lib\net46\MetroRadiance.dll + True + + + ..\..\packages\MetroRadiance.Chrome.2.1.0\lib\net46\MetroRadiance.Chrome.dll + True + + + ..\..\packages\MetroRadiance.Core.2.1.0\lib\net46\MetroRadiance.Core.dll + True + + + ..\..\packages\MetroTrilithon.0.2.0\lib\portable-net45+win+wp80+MonoAndroid10+xamarinios10+MonoTouch10\MetroTrilithon.dll + True + + + ..\..\packages\MetroTrilithon.Desktop.0.2.3\lib\net46\MetroTrilithon.Desktop.dll + True + + + ..\..\packages\LivetCask.1.3.1.0\lib\net45\Microsoft.Expression.Interactions.dll + True + + + ..\..\packages\StatefulModel.0.5.0\lib\portable-net45+win+wp80+MonoAndroid10+xamarinios10+MonoTouch10\StatefulModel.dll + True + + + + ..\..\packages\LivetCask.1.3.1.0\lib\net45\System.Windows.Interactivity.dll + True + + + + + + + 4.0 + + + + + + + + Application.xaml + + + + + + + + + + + Code + + + + MainWindow.xaml + + + + True + True + Resources.resx + + + + + Always + Designer + + + + + + MSBuild:Compile + Designer + + + Designer + MSBuild:Compile + + + + + PublicResXFileCodeGenerator + Resources.Designer.cs + + + + + + \ No newline at end of file diff --git a/source/Setup/SylphyHorn.Bootstrapper.UI/packages.config b/source/Setup/SylphyHorn.Bootstrapper.UI/packages.config new file mode 100644 index 0000000..333d4c9 --- /dev/null +++ b/source/Setup/SylphyHorn.Bootstrapper.UI/packages.config @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/source/Setup/SylphyHorn.Bootstrapper/SylphyHorn.Bootstrapper.wixproj b/source/Setup/SylphyHorn.Bootstrapper/SylphyHorn.Bootstrapper.wixproj new file mode 100644 index 0000000..44037da --- /dev/null +++ b/source/Setup/SylphyHorn.Bootstrapper/SylphyHorn.Bootstrapper.wixproj @@ -0,0 +1,55 @@ + + + + Debug + x86 + 3.9 + 85d1b40d-719c-4116-8118-a304e1a2b293 + 2.0 + SylphyHorn.Bootstrapper + Bundle + $(MSBuildExtensionsPath32)\WiX Toolset\v4\Wix.targets + $(MSBuildExtensionsPath)\WiX Toolset\v4\Wix.targets + + + bin\$(Configuration)\ + obj\$(Configuration)\ + Debug + + + bin\$(Configuration)\ + obj\$(Configuration)\ + + + + + + + + $(WixExtDir)\WixNetFxExtension.dll + WixNetFxExtension + + + $(WixExtDir)\WixUtilExtension.dll + WixUtilExtension + + + $(WixExtDir)\WixBalExtension.dll + WixBalExtension + + + + + Bundle.wxs + + + + + \ No newline at end of file diff --git a/source/Setup/SylphyHorn.Bootstrapper/bin/Release/_install.bat b/source/Setup/SylphyHorn.Bootstrapper/bin/Release/_install.bat new file mode 100644 index 0000000..c074ced --- /dev/null +++ b/source/Setup/SylphyHorn.Bootstrapper/bin/Release/_install.bat @@ -0,0 +1 @@ +SylphyHorn.Bootstrapper.exe -l ".\SylphyHorn.Bootstrapper.log" diff --git a/source/Setup/SylphyHorn.Installer.Gen/App.config b/source/Setup/SylphyHorn.Installer.Gen/App.config new file mode 100644 index 0000000..2d2a12d --- /dev/null +++ b/source/Setup/SylphyHorn.Installer.Gen/App.config @@ -0,0 +1,6 @@ + + + + + + diff --git a/source/Setup/SylphyHorn.Installer.Gen/Product.linq b/source/Setup/SylphyHorn.Installer.Gen/Product.linq new file mode 100644 index 0000000..c8f30bf --- /dev/null +++ b/source/Setup/SylphyHorn.Installer.Gen/Product.linq @@ -0,0 +1,44 @@ + + +void Main() +{ + // Test code for Setup.tt + + const string application = "SylphyHorn.exe"; + const string relativePath = @"..\..\SylphyHorn\bin\Release"; + var targets = Array.Empty(); + var currentDir = new DirectoryInfo(Path.GetDirectoryName(Host.ResolvePath("Product.tt"))); + if (currentDir.Exists) + { + var releaseDir = new DirectoryInfo(Path.GetFullPath(Path.Combine(currentDir.FullName, relativePath))); + if (releaseDir.Exists) + { + targets = releaseDir.GetFiles("*", SearchOption.AllDirectories) + .Where(x => x.Extension == ".exe" || x.Extension == ".dll") + .Where(x => !x.Name.Contains("vshost")) + .ToArray(); + } + } + + foreach (var file in targets) + { + if (string.Equals(file.Name, application, StringComparison.InvariantCultureIgnoreCase)) + { + } + else + { + } + } + + targets.Dump(); +} + +// Define other methods and classes here + +public class Host +{ + public static string ResolvePath(string s) + { + return @"E:\Repos\@Grabacr07\SylphyHorn\source\Setup\SylphyHorn.Installer.Gen\Product.tt"; + } +} diff --git a/source/Setup/SylphyHorn.Installer.Gen/Product.tt b/source/Setup/SylphyHorn.Installer.Gen/Product.tt new file mode 100644 index 0000000..302d353 --- /dev/null +++ b/source/Setup/SylphyHorn.Installer.Gen/Product.tt @@ -0,0 +1,134 @@ +<#@ template debug="false" hostspecific="true" language="C#" #> +<#@ assembly name="System.Core" #> +<#@ import namespace="System" #> +<#@ import namespace="System.Collections.Generic" #> +<#@ import namespace="System.Linq" #> +<#@ import namespace="System.IO" #> +<#@ output extension=".wxs" #> +<# + const string application = "SylphyHorn.exe"; + const string relativePath = @"..\..\SylphyHorn\bin\Release"; + + var targets = Array.Empty(); + var currentDir = new DirectoryInfo(Path.GetDirectoryName(Host.ResolvePath("Product.tt"))); + if (currentDir.Exists) + { + var releaseDir = new DirectoryInfo(Path.GetFullPath(Path.Combine(currentDir.FullName, relativePath))); + if (releaseDir.Exists) + { + targets = releaseDir.GetFiles("*", SearchOption.AllDirectories) + .Where(x => x.Extension == ".exe" || x.Extension == ".dll") + .Where(x => !x.Name.Contains("vshost")) + .ToArray(); + } + } +#> + + + + + + )" ?> + + + + " ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +<# + foreach (var file in targets) + { + if (string.Equals(file.Name, application, StringComparison.InvariantCultureIgnoreCase)) + { +#> + + + + + + +<# + } + else + { +#> + + + +<# + } + } +#> + + + diff --git a/source/Setup/SylphyHorn.Installer.Gen/Product.wxs b/source/Setup/SylphyHorn.Installer.Gen/Product.wxs new file mode 100644 index 0000000..22d1ee4 --- /dev/null +++ b/source/Setup/SylphyHorn.Installer.Gen/Product.wxs @@ -0,0 +1,326 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/source/Setup/SylphyHorn.Installer.Gen/Properties/AssemblyInfo.cs b/source/Setup/SylphyHorn.Installer.Gen/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..eb8e442 --- /dev/null +++ b/source/Setup/SylphyHorn.Installer.Gen/Properties/AssemblyInfo.cs @@ -0,0 +1,11 @@ +using System.Reflection; +using System.Runtime.InteropServices; + +[assembly: AssemblyTitle("SylphyHorn.Setup.Gen")] +[assembly: AssemblyCompany("grabacr.net")] +[assembly: AssemblyProduct("SylphyHorn")] +[assembly: AssemblyCopyright("Copyright © 2016 Manato KAMEYA")] +[assembly: Guid("e4f0f4bc-dcee-416e-aa43-457d51352f6b")] + +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: ComVisible(false)] diff --git a/source/Setup/SylphyHorn.Installer.Gen/SylphyHorn.Installer.Gen.csproj b/source/Setup/SylphyHorn.Installer.Gen/SylphyHorn.Installer.Gen.csproj new file mode 100644 index 0000000..9595f38 --- /dev/null +++ b/source/Setup/SylphyHorn.Installer.Gen/SylphyHorn.Installer.Gen.csproj @@ -0,0 +1,81 @@ + + + + + Debug + AnyCPU + {E4F0F4BC-DCEE-416E-AA43-457D51352F6B} + Library + Properties + + + SylphyHorn.Setup.Gen + v4.6 + 512 + true + + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + + + + + + + TextTemplatingFileGenerator + Product.wxs + + + + + + + + True + True + Product.tt + + + + + \ No newline at end of file diff --git a/source/Setup/SylphyHorn.Installer/Shared.wxi b/source/Setup/SylphyHorn.Installer/Shared.wxi new file mode 100644 index 0000000..7f3dffe --- /dev/null +++ b/source/Setup/SylphyHorn.Installer/Shared.wxi @@ -0,0 +1,4 @@ + + + + diff --git a/source/Setup/SylphyHorn.Installer/SylphyHorn.Installer.wixproj b/source/Setup/SylphyHorn.Installer/SylphyHorn.Installer.wixproj new file mode 100644 index 0000000..e7a15df --- /dev/null +++ b/source/Setup/SylphyHorn.Installer/SylphyHorn.Installer.wixproj @@ -0,0 +1,50 @@ + + + + Debug + x86 + 3.9 + 82054a5b-3fe8-4dad-82a4-bf301aa8cd05 + 2.0 + SylphyHorn.Installer + Package + $(MSBuildExtensionsPath32)\WiX Toolset\v4\Wix.targets + $(MSBuildExtensionsPath)\WiX Toolset\v4\Wix.targets + SylphyHorn.Installer + + + bin\$(Configuration)\ + obj\$(Configuration)\ + Debug + + + bin\$(Configuration)\ + obj\$(Configuration)\ + + + True + + + + $(WixExtDir)\WixNetFxExtension.dll + WixNetFxExtension + + + + + + + + Product.wxs + + + + + \ No newline at end of file diff --git a/source/Setup/SylphyHorn.Installer/bin/Release/_install.bat b/source/Setup/SylphyHorn.Installer/bin/Release/_install.bat new file mode 100644 index 0000000..e6a25f7 --- /dev/null +++ b/source/Setup/SylphyHorn.Installer/bin/Release/_install.bat @@ -0,0 +1 @@ +msiexec /i SylphyHorn.Setup.msi /l*v SylphyHorn.Installer.log \ No newline at end of file diff --git a/source/Setup/SylphyHorn.Installer/bin/Release/_uninstall.bat b/source/Setup/SylphyHorn.Installer/bin/Release/_uninstall.bat new file mode 100644 index 0000000..f11c9cb --- /dev/null +++ b/source/Setup/SylphyHorn.Installer/bin/Release/_uninstall.bat @@ -0,0 +1 @@ +msiexec /x SylphyHorn.Setup.msi \ No newline at end of file diff --git a/source/SylphyHorn.App/App.xaml b/source/SylphyHorn.App/App.xaml new file mode 100644 index 0000000..efd698c --- /dev/null +++ b/source/SylphyHorn.App/App.xaml @@ -0,0 +1,14 @@ + + + + + + + + + + + diff --git a/source/SylphyHorn.App/App.xaml.cs b/source/SylphyHorn.App/App.xaml.cs new file mode 100644 index 0000000..9fd5884 --- /dev/null +++ b/source/SylphyHorn.App/App.xaml.cs @@ -0,0 +1,116 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.ApplicationInsights; +using SylphyHorn.Serialization; +using SylphyHorn.Services; +using SylphyHorn.UI.Pages; +using Windows.ApplicationModel; +using Windows.ApplicationModel.Activation; +using Windows.UI.Xaml; +using Windows.UI.Xaml.Controls; +using Windows.UI.Xaml.Navigation; + +namespace SylphyHorn +{ + /// + /// 既定の Application クラスを補完するアプリケーション固有の動作を提供します。 + /// + sealed partial class App + { + /// + /// 単一アプリケーション オブジェクトを初期化します。これは、実行される作成したコードの最初の行であるため、main() または WinMain() と論理的に等価です。 + /// + public App() + { + WindowsAppInitializer.InitializeAsync(WindowsCollectors.Metadata | WindowsCollectors.Session); + + this.InitializeComponent(); + + this.Suspending += this.HandleSuspending; + this.UnhandledException += this.HandleUnhandledException; + } + + + /// + /// アプリケーションがエンド ユーザーによって正常に起動されたときに呼び出されます。他のエントリ + /// ポイントは、アプリケーションが特定のファイルを開くために起動されたときなどに使用されます。 + /// + /// 起動の要求とプロセスの詳細を表示します。 + protected override async void OnLaunched(LaunchActivatedEventArgs e) + { +#if DEBUG + if (System.Diagnostics.Debugger.IsAttached) + { + this.DebugSettings.EnableFrameRateCounter = true; + } +#endif + + var rootFrame = Window.Current.Content as Frame; + if (rootFrame == null) + { + // ウィンドウにコンテンツが表示されていない場合 + // アプリケーションの初期化を実行 + + // ナビゲーション コンテキストとして動作するフレームを作成し、最初のページに移動 + rootFrame = new Frame(); + rootFrame.NavigationFailed += this.HandleNavigationFailed; + + //if (e.PreviousExecutionState == ApplicationExecutionState.Terminated) + //{ + // // ToDo: 初期化・状態復元 + //} + + Window.Current.Content = rootFrame; + } + + if (!LocalStorageProvider.Instance.IsLoaded) + { + await LocalStorageProvider.Instance.LoadAsync(); + } + + // デスクトップ クライアントに UI が起動したことを通知する + // (= キー入力の一時停止をオンにして設定に書き込む) + Settings.General.SuspendKeyDetection.Value = true; + await LocalStorageProvider.Instance.SaveAsync(); + + if (rootFrame.Content == null) + { + // ナビゲーション スタックが復元されない場合は、最初のページに移動 + rootFrame.Navigate(typeof(MainPage), e.Arguments); + } + + Window.Current.Activate(); + } + + /// + /// アプリケーションの実行が中断されたときに呼び出されます。アプリケーションが終了されるか、メモリの内容がそのままで再開されるかにかかわらず、アプリケーションの状態が保存されます。 + /// + /// 中断要求の送信元。 + /// 中断要求の詳細。 + private async void HandleSuspending(object sender, SuspendingEventArgs e) + { + using (e.GetDeferral()) + { + Settings.General.SuspendKeyDetection.Value = false; + await LocalStorageProvider.Instance.SaveAsync(); + } + } + + /// + /// 特定のページへの移動が失敗したときに呼び出されます。 + /// + /// 移動に失敗したフレーム。 + /// ナビゲーション エラーの詳細。 + private void HandleNavigationFailed(object sender, NavigationFailedEventArgs e) + { + throw new Exception("Failed to load Page " + e.SourcePageType.FullName); + } + + private void HandleUnhandledException(object sender, UnhandledExceptionEventArgs e) + { + // ToDo: 不慮の事故で死んだとき何かしたい + } + } +} diff --git a/source/SylphyHorn.App/ApplicationInsights.config b/source/SylphyHorn.App/ApplicationInsights.config new file mode 100644 index 0000000..399f3c4 --- /dev/null +++ b/source/SylphyHorn.App/ApplicationInsights.config @@ -0,0 +1,3 @@ + + + diff --git a/source/SylphyHorn.App/Assets/LockScreenLogo.scale-200.png b/source/SylphyHorn.App/Assets/LockScreenLogo.scale-200.png new file mode 100644 index 0000000000000000000000000000000000000000..f0b91ab32962e599ae7227846e3a87029e0505da GIT binary patch literal 2966 zcmV;H3u*L;P)KLZ*U+5Lu!Sk^o_Z5E4Meg@_7P6crJiNL9pw)e1;Xm069{HJUZAPk55R%$-RIA z6-eL&AQ0xu!e<4=008gy@A0LT~suv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G&k*O&zir8qB`A_#uXyMm(N?J0oojw>APp*!3mK*$=h6 z!FKFB?8Q@lme`9nafu(s9e>IPWUB^Lr#e3n5xf!ny}?kP+N7x9r@YD3J`z1zRg}@ynqE1nxNQB=Z0EljbIGZY4NB6?~!CFF~`Y>D^6%U!%1iSg9H3)}T)SnH> z>PqY){QU93Ktb2e^TWA!VGv$Pf@2JrQH7sIJY3M8ittBC881VYS07Pd!%x8LQ7d@Q zo#y^)!e&!dJG?RyrDKuBoKaiY$ZE}P`=VnYd#Bq&EWfId^SAWR1*4GQXn~#WAJ0D_ c0>dp6<_;DwqI?Q2leER!uYv=lD>>=^267U>6#xJL literal 0 HcmV?d00001 diff --git a/source/SylphyHorn.App/Assets/Square150x150Logo.scale-200.png b/source/SylphyHorn.App/Assets/Square150x150Logo.scale-200.png new file mode 100644 index 0000000000000000000000000000000000000000..8d32763377851ec4f84bf6ea774a1a96f8b66653 GIT binary patch literal 1844 zcmdT_Yf#cz6o<^TRD2btspX2%&akPKX5uq3#P>Fv(8It)nUQ>?qXuLeCb*emSU!44 zP3u}KDe9D&0kVq8iaM?-Q7vluOtKY3mk8UxHM2WA)tA2Qow;+*J!gKubLO0L&;2nv z5^c85ZXE~&GQ)(R_JcrR#L6~a1868YC7B@58XX1|_`}Joum3=@$XJK2F&V6C8MP`x z1P7hC5RF1vgsi_9a0V5ex#dVF8e<8zDh)8FGr|f`2HxLCqrk>~U@;grosoCL%RpM$ z*h1=BRJARscTFW0%W#WPWPSfVI2dsDwJUEn=B7>BW*Zxun-#pM=C_Gn2S*OwiNQPY z3)`%?gYI>yjIxDo5_nAA(6gI1=~#NEccP{@Eq(docma%sty5I!k^5XhUg!F^QhcbE zOD;IKTzrUXcA)5qk%&&wMY7)%AMF$@I3~t346PNRssWgcq3qqsRa`>z2t`7eHXx<) zu!qsCe86N>NaY0E59Y&i!_x&5p6^3cGg3mgpwHBV>QgpOk~`MHwCU{K=EAEltr64n zp=?(8^Te2-#mu2crB%H=!j*m(?Q&;wihWZ9xjIf$??V?Kd*~`jW&5;Dcy3}UXD{bZ zgc#Sp4rFskG;Si2h==3S9zgv+o>{g{!g5=4xlFSXtC;&bxm!?AVGOmYjG@hUdrI{U z7zGC@z4MVILFS~ZZOU`fd5h?S^WkhxS80y(iWthS*qYLO%Srb@(Q#bLtGtwNCYO2i z^Qc%y(J@bmHxVzhN1*p^1PGz4O}cgvg#`+Joc-F{OIsu(TT|3jcEu8V>?nZf+zs8K$^CXWN_h~0uS1ksE;ail$}_srn@KDIwmgl&qN@s)O& z7E!UB_S{I7$VZRwpv6l3YAB2Zrr}FpjH;^gV8o6N`nFl%Lx}?CR&wb42=%r<=N2< zAE(vOSc)Q&_kBoxp2I&{3&eE>;qw5TinbQb&z90wO^Mahh02dKp8ybAZ|=865BmxZ zBOj|fNz##a$Y;EN0{b_x|DnkTNd?1|F9Pt{nb#Y7HZrNzX$HtIWHL+u>Cr?h^QQ(Z zfrj{OY5tReVi#cruecvVn*UP9??Yy@fCk9Xf$+~r`5k9p*+|6VfrgrQS=Do)c)vx5 z4goiY@2XQ=nwl0-E63X^gbk;k<2*%nQQlmH8-%tg4+!1hijAB z*|A#PijoW|zoE+-30EnOur|0A5|S6)BsOT*Rey1S2LPeMPPt1On)XZ&u{QM#pMoi4 zDG(@E4HJf``o3$q4fwe?Nof6D|DYM>FImLtUxbjs!wWxq8p-4Mj9prd~AOPuRIOr6Qz22oHbMikfvov3I!Ri7O=i@CbDche7K@FqPwo@RDK)?Yr%0|uHw&E$G6 z6C>C~wQL^)W^hI_Lo)_Tg&bL@#_A8X{$@%BGVE{1Hy-`-X?|vTZ6kGQx&XwKIdZXO h4*}5E{wg1E=jT&p5eDK;x$4Bq9TOahs^3eX{|yNRA8Y^s literal 0 HcmV?d00001 diff --git a/source/SylphyHorn.App/Assets/Square44x44Logo.scale-200.png b/source/SylphyHorn.App/Assets/Square44x44Logo.scale-200.png new file mode 100644 index 0000000000000000000000000000000000000000..16c74826be1a40dab4506af0e6c8cec2cede0974 GIT binary patch literal 1038 zcmeAS@N?(olHy`uVBq!ia0vp^5g^RL1|$oo8kjIJFkkg_aSW-L^LDOb{$&S=w)tU! z+#O<_K^GS`=_n{(>FhP^Xq0bANJ@RcuW*Ei*_fG`$A_a#V!{u0A4!K(LMm-uf!eo} z7Kmm^o?G_P^4!&(@4a)LS1(!R`TEwm$?KngpS1h*nS%!z1!LIfsow8pG*SBhk7a{a zp_1tn_6?%iHzdx8eGvH}qrHQ@hT+;G|CLcX3}>HI+gCfV|6tj}b}e1$_JcjlSLd2O zV7z%KihbS#mhy(ZH@NOG-kSJ(g_7+9zx#jxovLjY<~?@!+BbYm86cex`emL-V>g<$8HziZ`^czLR&aZKGyVlqGWv z)3-+b1Mm0n`ff1V{Lr^Y!e@h#T7=|Fk-)F(KJ)1bzVUb)5LGbwVC|Px7ue=0-}pOS zY!Azp0>NcnI?VYhEt+3yb=Ox!Y_Ojpay0>Q@`fF?63g-jOKyROxehoXPRFTQ?#T>ZS-w z3xDR(-;^Q0?}6IUTPh##L>SF-`SpQS{Orcn2W}_lMY~RGj6TrHbX)%9#ee(VuNJ>q za`H*W{-*9{H_YC7#e_ROwrjGqDq($Vw5Qj1e#5RyM{WP@>5egQZ)cfqdpt{6>bu~X ziwk99zR6f;0u`$4cwzXeT#KH9UA~MnWniFof6ikR3PP-uZlHW(r>pHeObc!>_)^ER&&XD zi`9J%jvrIf-I39!Cw(x|*>z%G^Xhqvk6!Peu;W~$9-Gg}@eD9P~dYD?Ye%O2vsNjjYWmLhws!rdEUHXezMK_TMxMXw6{;a<9BoUp7kA5 zXN431)9ReXchrnN1-N#~eZR<%$8f!&dPn~RNtdf}*QY8~ y-En8G=oFr*LP= literal 0 HcmV?d00001 diff --git a/source/SylphyHorn.App/Assets/Square44x44Logo.targetsize-24_altform-unplated.png b/source/SylphyHorn.App/Assets/Square44x44Logo.targetsize-24_altform-unplated.png new file mode 100644 index 0000000000000000000000000000000000000000..8650719ba4de8d57f38f69370a906783c43cf5e2 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FDGLj{`2=QL)Xd zM2fR-QFQis2Y-Uc3F@R*er~jgfCYj%bFg6MO$go%(h$SRc%{+&2q~LBm7{|QJUcQv ljE1{JIZlxzWA|^%YXDM1O*PCT>W2UT002ovPDHLkV1mwflyU$7 literal 0 HcmV?d00001 diff --git a/source/SylphyHorn.App/Assets/StoreLogo.png b/source/SylphyHorn.App/Assets/StoreLogo.png new file mode 100644 index 0000000000000000000000000000000000000000..8756169db0384845d0adf898e4bc5f0157d17768 GIT binary patch literal 17899 zcmeI3dpuO#*T9cUg(5^kGL7_f8*^bW6GJW;MdYrM#>~Mmw`Rs=RMK5Hbdg+BloYx= z70Inq6cLpQr9>VfBqXZeL84R5=lQ(v@BO_0%=sAStiASH>+J8|Yn^@mID73^S;@+% z$p8Q#YfZLrfX=w#pVVaN{~VL>OVCN0Lw4r@fL!tLPb_+|oH_u=*wW3-?d^Tpd^XRQ z%|Te3nA|UvQu8s z^vI;%T%!_2cT5PsZotm941soIuVi#D=6F0p9Y;fM@utdD*7Lc4_iqw%T$`T86 zzlO6C56hnf1V*?;O*h>DgvFXIDF+aS;(+;_84n~7HWJC0>cUs)o}67dWHF$qEc!vr z%4%Juoal#YK_9waHO_6k#kgcfQCTSOE!~7nh>6#lL2i+-sh9=;Y6Dd_zZ#lEwY+V5 z{nopM(fRStsjvQBY$R!Jcf;4b1LBf^{Hn^%TF>U@8VOE`*u{WC|May$tqb7WFyNtE zC!M@T=3&Udeu3eT>71mK_N7J|vt_1E?a=l*nU8t1pY%=lHT%{6&^}1}wJxL!*cfLT zn^}~y%LvhovG~!*Ifa&$Knri#*CiANJdec3^j-B$aQoAz8IPBV~ zw5pZ=1n_|^`y!}eRaiOi1J5bz4(zequ-8p(e#uN~vm4$e5>M4|GYC{xFG`|xO3f4B zA2y?1YW+_6Ta4{dQC4m?ZsupT+qJGJ=1RFr@7RgG^%wHUS-UIRA&LXV!Cu5mQEtmK z=D(jiXKs@A`oH96cpf3ole>4gX_d@e?I@h}RBL~79T}DCm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b@ZR?HV36TvL5FHEZ@8A=p)rlv zz!kqWbpMm#1jTp5(P^5nwHwL5(N<{V2<=(XKQ^tuq~?zb_TRi1AJKo)E6kTD2n>jD zQG`o4ADC8z3kF2ED8eP24@@h<1p^{n6yXxi2c{L_f&mdOif{?%1JjCd!GH)CMYx3X zfoVm!U_gY6B3#1xz_cPB3u;V63z#v72$#b5iSbFB{TjRD9D1o{S1OW^6b+-*$I6hilCAmYylud8vw#~ z0KmXE=-dhb0T=*yw*mUL^f&;hun&9QSq}BBx3*a36kOXLw^HslVw#0<_@JjCm+X9c z;Xz3SY~bBZN+yvehT`*3JCs*?(M`|As)l8muS07ptXIf$KAX~_v86?!QKnSUt6euw z?tbfEC2x)T3ZkYxzxq(dS9)DjVTS>(NIU8|Pg272xc}t_)$8snT3nhuX`CLQwfl`K zUc6G_<)^Rivh+)e;ii&E`E61b2yumQQ*MV=$>6s|>Ww{0-7lwE4L#hN`Es_))424~ zMflWhv*dQh- + + CN=33C1D2CA-4B3F-4CCA-8103-6D02939C6477 + grabacr.net + http://www.w3.org/2001/04/xmlenc#sha256 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 46846grabacr.net.SylphyHorn + + SylphyHorn + + + + + \ No newline at end of file diff --git a/source/SylphyHorn.App/Package.appxmanifest b/source/SylphyHorn.App/Package.appxmanifest new file mode 100644 index 0000000..a9ece92 --- /dev/null +++ b/source/SylphyHorn.App/Package.appxmanifest @@ -0,0 +1,23 @@ + + + + + + SylphyHorn + grabacr.net + Assets\StoreLogo.png + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/source/SylphyHorn.App/Properties/AssemblyInfo.cs b/source/SylphyHorn.App/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..92bbcda --- /dev/null +++ b/source/SylphyHorn.App/Properties/AssemblyInfo.cs @@ -0,0 +1,29 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("SylphyHorn.App")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("grabacr.net")] +[assembly: AssemblyProduct("SylphyHorn.App")] +[assembly: AssemblyCopyright("Copyright © 2015")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: ComVisible(false)] diff --git a/source/SylphyHorn.App/Properties/Default.rd.xml b/source/SylphyHorn.App/Properties/Default.rd.xml new file mode 100644 index 0000000..26cbc41 --- /dev/null +++ b/source/SylphyHorn.App/Properties/Default.rd.xml @@ -0,0 +1,27 @@ + + + + + + + + diff --git a/source/SylphyHorn.App/Serialization/LocalStorageProperty.cs b/source/SylphyHorn.App/Serialization/LocalStorageProperty.cs new file mode 100644 index 0000000..48bcf7e --- /dev/null +++ b/source/SylphyHorn.App/Serialization/LocalStorageProperty.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using MetroTrilithon.Serialization; + +namespace SylphyHorn.Serialization +{ + public class LocalStorageProperty : SerializablePropertyBase + { + public LocalStorageProperty(string key) : base(key, LocalStorageProvider.Instance) { } + public LocalStorageProperty(string key, T defaultValue) : base(key, LocalStorageProvider.Instance, defaultValue) { } + } +} diff --git a/source/SylphyHorn.App/Serialization/LocalStorageProvider.cs b/source/SylphyHorn.App/Serialization/LocalStorageProvider.cs new file mode 100644 index 0000000..22ee77c --- /dev/null +++ b/source/SylphyHorn.App/Serialization/LocalStorageProvider.cs @@ -0,0 +1,53 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; +using System.Threading.Tasks; +using System.Xml; +using Windows.Storage; + +namespace SylphyHorn.Serialization +{ + public class LocalStorageProvider : DictionaryProvider + { + public static LocalStorageProvider Instance { get; } = new LocalStorageProvider(); + + private LocalStorageProvider() { } + + protected override async Task SaveAsyncCore(IDictionary dic) + { + var file = await ApplicationData.Current.LocalFolder.CreateFileAsync(this.Filename, CreationCollisionOption.ReplaceExisting); + var serializer = new DataContractSerializer(typeof(Dictionary)); + var settings = new XmlWriterSettings + { + Indent = true, // more readable!!! + }; + + using (var stream = await file.OpenStreamForWriteAsync()) + using (var writer = XmlWriter.Create(stream, settings)) + { + serializer.WriteObject(writer, new Dictionary(dic)); + } + } + + protected override async Task> LoadAsyncCore() + { + var file = await ApplicationData.Current.LocalFolder.GetFileAsync(this.Filename); + if (!file.IsAvailable) return null; + + var serializer = new DataContractSerializer(typeof(Dictionary)); + + using (var stream = await file.OpenStreamForReadAsync()) + { + var data = serializer.ReadObject(stream) as Dictionary; + if (data != null) + { + return data; + } + + throw new FormatException(); + } + } + } +} diff --git a/source/SylphyHorn.App/Serialization/Settings.cs b/source/SylphyHorn.App/Serialization/Settings.cs new file mode 100644 index 0000000..6064da7 --- /dev/null +++ b/source/SylphyHorn.App/Serialization/Settings.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; + +namespace SylphyHorn.Serialization +{ + public static class Settings + { + public static GeneralSettings General { get; } = new GeneralSettings(LocalStorageProvider.Instance); + + public static ShortcutKeySettings ShortcutKey { get; } = new ShortcutKeySettings(LocalStorageProvider.Instance); + } +} diff --git a/source/SylphyHorn.App/Services/EngineDownloader.cs b/source/SylphyHorn.App/Services/EngineDownloader.cs new file mode 100644 index 0000000..d4276fe --- /dev/null +++ b/source/SylphyHorn.App/Services/EngineDownloader.cs @@ -0,0 +1,31 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Windows.System; + +namespace SylphyHorn.Services +{ + public class EngineDownloader + { + public static string PackageUri { get; } = @"https://github.com/Grabacr07/SylphyHorn/releases/download/v2.0/SylphyHornEngineInstall.exe"; + + public async void Launch() + { + try + { + var uri = new Uri(PackageUri); + var succeed = await Launcher.LaunchUriAsync(uri); + if (succeed) + { + + } + } + catch (Exception ex) + { + // ToDo: error action + System.Diagnostics.Debug.WriteLine(ex); + } + } + } +} diff --git a/source/SylphyHorn.App/Services/Helpers.cs b/source/SylphyHorn.App/Services/Helpers.cs new file mode 100644 index 0000000..7ec3036 --- /dev/null +++ b/source/SylphyHorn.App/Services/Helpers.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Windows.ApplicationModel; +using MetroTrilithon.Lifetime; + +namespace SylphyHorn.Services +{ + public static class Helpers + { + public static IDisposable GetDeferral(this SuspendingEventArgs args) + { + var deferral = args.SuspendingOperation.GetDeferral(); + return Disposable.Create(() => deferral.Complete()); + } + } +} diff --git a/source/SylphyHorn.App/SylphyHorn.App.csproj b/source/SylphyHorn.App/SylphyHorn.App.csproj new file mode 100644 index 0000000..b66b4bb --- /dev/null +++ b/source/SylphyHorn.App/SylphyHorn.App.csproj @@ -0,0 +1,207 @@ + + + + + Debug + x86 + {A47FBADD-8C34-477E-BFC1-44892F302829} + AppContainerExe + Properties + SylphyHorn + SylphyHorn + en-US + UAP + 10.0.10586.0 + 10.0.10240.0 + 14 + 512 + {A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + SylphyHorn.App_StoreKey.pfx + 011C2167BA3AD8DE0D5C3AC7AB33DF63B4AE3166 + True + Always + x86|x64 + + + true + bin\x86\Debug\ + DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP + ;2008 + full + x86 + false + prompt + true + + + bin\x86\Release\ + TRACE;NETFX_CORE;WINDOWS_UWP + true + ;2008 + pdbonly + x86 + false + prompt + true + true + + + + + true + bin\ARM\Debug\ + DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP + ;2008 + full + ARM + false + prompt + true + + + bin\ARM\Release\ + TRACE;NETFX_CORE;WINDOWS_UWP + true + ;2008 + pdbonly + ARM + false + prompt + true + true + + + true + bin\x64\Debug\ + DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP + ;2008 + full + x64 + false + prompt + true + + + bin\x64\Release\ + TRACE;NETFX_CORE;WINDOWS_UWP + true + ;2008 + pdbonly + x64 + false + prompt + true + true + + + + + PreserveNewest + + + + + + Serialization\SerializationExtensions.cs + + + Services\KeyHelper.cs + + + Services\ShortcutKey.cs + + + App.xaml + + + + + + + + + + + MainPage.xaml + + + + + + + Designer + + + + + + + + + + + + + + + + MSBuild:Compile + Designer + + + Designer + MSBuild:Compile + PreserveNewest + Generic.xaml + + + Designer + MSBuild:Compile + PreserveNewest + Generic.xaml + + + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + + + Designer + MSBuild:Compile + PreserveNewest + Controls.xaml + + + Designer + MSBuild:Compile + PreserveNewest + Controls.xaml + + + Designer + MSBuild:Compile + PreserveNewest + + + + + {9f0eb092-ddfc-492e-9266-ef208c8e4d83} + SylphyHorn.Core + + + + + 14.0 + + + + \ No newline at end of file diff --git a/source/SylphyHorn.App/Themes/Generic.KeyIcon.xaml b/source/SylphyHorn.App/Themes/Generic.KeyIcon.xaml new file mode 100644 index 0000000..551b0ad --- /dev/null +++ b/source/SylphyHorn.App/Themes/Generic.KeyIcon.xaml @@ -0,0 +1,41 @@ + + + + diff --git a/source/SylphyHorn.App/Themes/Generic.ShortcutKeyBox.xaml b/source/SylphyHorn.App/Themes/Generic.ShortcutKeyBox.xaml new file mode 100644 index 0000000..33b4700 --- /dev/null +++ b/source/SylphyHorn.App/Themes/Generic.ShortcutKeyBox.xaml @@ -0,0 +1,149 @@ + + + + + diff --git a/source/SylphyHorn.App/Themes/Generic.xaml b/source/SylphyHorn.App/Themes/Generic.xaml new file mode 100644 index 0000000..576eb44 --- /dev/null +++ b/source/SylphyHorn.App/Themes/Generic.xaml @@ -0,0 +1,10 @@ + + + + + + + + + diff --git a/source/SylphyHorn.App/UI/Bindings/BindableBase.cs b/source/SylphyHorn.App/UI/Bindings/BindableBase.cs new file mode 100644 index 0000000..189d860 --- /dev/null +++ b/source/SylphyHorn.App/UI/Bindings/BindableBase.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Runtime.CompilerServices; +using System.Threading.Tasks; +using MetroTrilithon.Mvvm; + +namespace SylphyHorn.UI.Bindings +{ + public class BindableBase : Notifier + { + protected void SetProperty(ref T property, T value, [CallerMemberName]string propertyName = null) + { + if (property.Equals(value)) return; + + property = value; + this.RaisePropertyChanged(propertyName); + } + } +} diff --git a/source/SylphyHorn.App/UI/Bindings/MainPageViewModel.cs b/source/SylphyHorn.App/UI/Bindings/MainPageViewModel.cs new file mode 100644 index 0000000..0d33a68 --- /dev/null +++ b/source/SylphyHorn.App/UI/Bindings/MainPageViewModel.cs @@ -0,0 +1,41 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using SylphyHorn.Serialization; +using SylphyHorn.Services; +using Windows.System; + +namespace SylphyHorn.UI.Bindings +{ + public class MainPageViewModel : BindableBase + { + private string _notificationDuration = Settings.General.NotificationDuration.Value.ToString(); + + public GeneralSettings GeneralSettings { get; } = Settings.General; + + public ShortcutKeySettings ShortcutKeySettings { get; } = Settings.ShortcutKey; + + public int[] CreateNewShortcutKey { get; } = new ShortcutKey(VirtualKey.D, VirtualKey.LeftWindows, VirtualKey.LeftControl).ToSerializable(); + + public string NotificationDuration + { + get { return this._notificationDuration; } + set + { + if (this._notificationDuration != value) + { + // UI に何も通知しない手抜き実装 + int num; + if (int.TryParse(value, out num)) + { + Settings.General.NotificationDuration.Value = num; + } + + this._notificationDuration = value; + this.RaisePropertyChanged(); + } + } + } + } +} diff --git a/source/SylphyHorn.App/UI/Controls/KeyIcon.cs b/source/SylphyHorn.App/UI/Controls/KeyIcon.cs new file mode 100644 index 0000000..5332452 --- /dev/null +++ b/source/SylphyHorn.App/UI/Controls/KeyIcon.cs @@ -0,0 +1,155 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using Windows.System; +using Windows.UI.Xaml; +using Windows.UI.Xaml.Controls; + +namespace SylphyHorn.UI.Controls +{ + [TemplatePart(Name = PART_KeyText, Type = typeof(TextBlock))] + [TemplatePart(Name = PART_RightOrLeftText, Type = typeof(TextBlock))] + [TemplatePart(Name = PART_Symbol, Type = typeof(SymbolIcon))] + public sealed class KeyIcon : Control + { + private const string PART_KeyText = "PART_KeyText"; + private const string PART_RightOrLeftText = "PART_RightOrLeftText"; + private const string PART_Symbol = "PART_Symbol"; + + private TextBlock _keyText; + private TextBlock _rightOrLeftText; + private SymbolIcon _symbol; + + public KeyIcon() + { + this.DefaultStyleKey = typeof(KeyIcon); + } + + #region VirtualKey dependency property + + public static readonly DependencyProperty VirtualKeyProperty = DependencyProperty.Register( + nameof(VirtualKey), typeof(VirtualKey), typeof(KeyIcon), new PropertyMetadata(default(VirtualKey), VirtualKeyPropertyChangedCallback)); + + public VirtualKey VirtualKey + { + get { return (VirtualKey)this.GetValue(VirtualKeyProperty); } + set { this.SetValue(VirtualKeyProperty, value); } + } + + private static void VirtualKeyPropertyChangedCallback(DependencyObject d, DependencyPropertyChangedEventArgs e) + { + var instance = (KeyIcon)d; + var newValue = (VirtualKey)e.NewValue; + + instance.ChangeText(newValue); + } + + #endregion + + protected override void OnApplyTemplate() + { + base.OnApplyTemplate(); + + this._keyText = this.GetTemplateChild(PART_KeyText) as TextBlock; + this._rightOrLeftText = this.GetTemplateChild(PART_RightOrLeftText) as TextBlock; + this._symbol = this.GetTemplateChild(PART_Symbol) as SymbolIcon; + + this.ChangeText(this.VirtualKey); + } + + private void ChangeText(VirtualKey key) + { + if (this._keyText == null) return; + + string text, side; + Symbol? symbol = null; + + switch (key) + { + case VirtualKey.LeftShift: + text = "Shift"; + side = "Left"; + break; + case VirtualKey.RightShift: + text = "Shift"; + side = "Right"; + break; + + case VirtualKey.LeftMenu: + text = "Alt"; + side = "Left"; + break; + case VirtualKey.RightMenu: + text = "Alt"; + side = "Right"; + break; + + case VirtualKey.LeftControl: + text = "Ctrl"; + side = "Left"; + break; + case VirtualKey.RightControl: + text = "Ctrl"; + side = "Right"; + break; + + case VirtualKey.LeftWindows: + text = "Win"; + side = "Left"; + break; + case VirtualKey.RightWindows: + text = "Win"; + side = "Right"; + break; + + case VirtualKey.Up: + text = ""; + side = ""; + symbol = Symbol.Up; + break; + + case VirtualKey.Left: + text = ""; + side = ""; + symbol = Symbol.Back; + break; + + case VirtualKey.Right: + text = ""; + side = ""; + symbol = Symbol.Forward; + break; + + default: + text = key.ToString(); + side = ""; + break; + } + + if (this._keyText != null) + { + this._keyText.Text = text; + this._keyText.Visibility = string.IsNullOrEmpty(text) ? Visibility.Collapsed : Visibility.Visible; + } + + if (this._rightOrLeftText != null) + { + this._rightOrLeftText.Text = side; + this._rightOrLeftText.Visibility = string.IsNullOrEmpty(side) ? Visibility.Collapsed : Visibility.Visible; + } + + if (this._symbol != null) + { + if (symbol.HasValue) + { + this._symbol.Symbol = symbol.Value; + this._symbol.Visibility = Visibility.Visible; + } + else + { + this._symbol.Visibility = Visibility.Collapsed; + } + } + } + } +} diff --git a/source/SylphyHorn.App/UI/Controls/ShortcutKeyBox.cs b/source/SylphyHorn.App/UI/Controls/ShortcutKeyBox.cs new file mode 100644 index 0000000..1757650 --- /dev/null +++ b/source/SylphyHorn.App/UI/Controls/ShortcutKeyBox.cs @@ -0,0 +1,181 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Windows.System; +using Windows.UI.Core; +using Windows.UI.Xaml; +using Windows.UI.Xaml.Controls; +using Windows.UI.Xaml.Input; +using SylphyHorn.Serialization; +using SylphyHorn.Services; + +namespace SylphyHorn.UI.Controls +{ + [TemplatePart(Name = PART_Modifiers, Type = typeof(ItemsControl))] + [TemplatePart(Name = PART_KeyIcon, Type = typeof(KeyIcon))] + [TemplatePart(Name = PART_Prompt, Type = typeof(TextBlock))] + public class ShortcutKeyBox : TextBox + { + private const string PART_Modifiers = "PART_Modifiers"; + private const string PART_KeyIcon = "PART_KeyIcon"; + private const string PART_Prompt = "PART_Prompt"; + + private static readonly IReadOnlyDictionary _virtualModifiers = new Dictionary + { + { VirtualKey.Control, new[] { VirtualKey.LeftControl, VirtualKey.RightControl, } }, + { VirtualKey.Shift, new[] { VirtualKey.LeftShift, VirtualKey.RightShift, } }, + { VirtualKey.Menu, new[] { VirtualKey.LeftMenu, VirtualKey.RightMenu, } }, + }; + + private readonly HashSet _pressedModifiers = new HashSet(); + private VirtualKey _pressedKey = VirtualKey.None; + private ItemsControl _modifiersPresenter; + private KeyIcon _keyPresenter; + private TextBlock _prompt; + + #region Current dependency property + + public int[] Current + { + get { return (int[])this.GetValue(CurrentProperty); } + set { this.SetValue(CurrentProperty, value); } + } + public static readonly DependencyProperty CurrentProperty = + DependencyProperty.Register(nameof(Current), typeof(int[]), typeof(ShortcutKeyBox), new PropertyMetadata(null, CurrentPropertyChangedCallback)); + + private static void CurrentPropertyChangedCallback(DependencyObject d, DependencyPropertyChangedEventArgs e) + { + var instance = (ShortcutKeyBox)d; + instance.UpdateVisual(); + } + + private ShortcutKey? CurrentKey + { + get { return this.Current?.ToShortcutKey(); } + set { this.Current = value?.ToSerializable(); } + } + + #endregion + + + public ShortcutKeyBox() + { + this.DefaultStyleKey = typeof(ShortcutKeyBox); + } + + protected override void OnApplyTemplate() + { + base.OnApplyTemplate(); + + this._modifiersPresenter = this.GetTemplateChild(PART_Modifiers) as ItemsControl; + this._keyPresenter = this.GetTemplateChild(PART_KeyIcon) as KeyIcon; + this._prompt = this.GetTemplateChild(PART_Prompt) as TextBlock; + + this.UpdateVisual(); + } + + protected override void OnGotFocus(RoutedEventArgs e) + { + base.OnGotFocus(e); + this.UpdateVisual(); + } + + protected override void OnKeyDown(KeyRoutedEventArgs e) + { + if (!this.IsReadOnly) + { + if (e.KeyStatus.RepeatCount == 1) + { + var key = e.Key; + if (key == VirtualKey.Back) + { + this._pressedModifiers.Clear(); + this._pressedKey = VirtualKey.None; + } + else if (key.IsModifyKey()) + { + this._pressedModifiers.Add(key); + } + else if (_virtualModifiers.ContainsKey(key)) + { + foreach (var modifier in _virtualModifiers[key]) + { + if (Window.Current.CoreWindow.GetKeyState(modifier).HasFlag(CoreVirtualKeyStates.Down)) + { + this._pressedModifiers.Add(modifier); + break; + } + } + } + else + { + this._pressedKey = key; + } + + this.CurrentKey = this._pressedModifiers.Any() && this._pressedKey != VirtualKey.None + ? new ShortcutKey(this._pressedKey, this._pressedModifiers.ToArray()) + : (ShortcutKey?)null; + + this.UpdateVisual(); + } + + e.Handled = true; + } + + base.OnKeyDown(e); + } + + protected override void OnKeyUp(KeyRoutedEventArgs e) + { + if (!this.IsReadOnly) + { + if (e.KeyStatus.RepeatCount == 1) + { + var key = e.Key; + if (key.IsModifyKey()) + { + this._pressedModifiers.Remove(key); + } + else if (_virtualModifiers.ContainsKey(key)) + { + foreach (var modifier in _virtualModifiers[key]) + { + if (!Window.Current.CoreWindow.GetKeyState(modifier).HasFlag(CoreVirtualKeyStates.Down)) + { + this._pressedModifiers.Remove(modifier); + } + } + } + + this._pressedKey = VirtualKey.None; + this.UpdateVisual(); + } + + e.Handled = true; + } + + base.OnKeyUp(e); + } + + private void UpdateVisual() + { + var key = this.CurrentKey ?? new ShortcutKey(this._pressedKey, this._pressedModifiers.ToArray()); + + if (this._modifiersPresenter != null) + { + this._modifiersPresenter.ItemsSource = key.Modifiers; + this._modifiersPresenter.Visibility = key.Modifiers.Length == 0 ? Visibility.Collapsed : Visibility.Visible; + } + if (this._keyPresenter != null) + { + this._keyPresenter.VirtualKey = key.Key; + this._keyPresenter.Visibility = key.Key == VirtualKey.None ? Visibility.Collapsed : Visibility.Visible; + } + if (this._prompt != null) + { + this._prompt.Text = key == ShortcutKey.None ? "Press shortcut keys." : ""; + } + } + } +} diff --git a/source/SylphyHorn.App/UI/Pages/MainPage.xaml b/source/SylphyHorn.App/UI/Pages/MainPage.xaml new file mode 100644 index 0000000..a063477 --- /dev/null +++ b/source/SylphyHorn.App/UI/Pages/MainPage.xaml @@ -0,0 +1,254 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/source/SylphyHorn.App/UI/Pages/MainPage.xaml.cs b/source/SylphyHorn.App/UI/Pages/MainPage.xaml.cs new file mode 100644 index 0000000..0079d95 --- /dev/null +++ b/source/SylphyHorn.App/UI/Pages/MainPage.xaml.cs @@ -0,0 +1,13 @@ +using SylphyHorn.UI.Bindings; + +namespace SylphyHorn.UI.Pages +{ + internal sealed partial class MainPage + { + public MainPage() + { + this.InitializeComponent(); + this.DataContext = new MainPageViewModel(); + } + } +} diff --git a/source/SylphyHorn.App/UI/Styles/Controls.Pivot.xaml b/source/SylphyHorn.App/UI/Styles/Controls.Pivot.xaml new file mode 100644 index 0000000..17378e1 --- /dev/null +++ b/source/SylphyHorn.App/UI/Styles/Controls.Pivot.xaml @@ -0,0 +1,340 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +