From 6a4b3fc4221bfbc0a580886280eaa99932270cf6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tommy=20=C3=96man?= Date: Thu, 14 May 2020 22:51:40 +0200 Subject: [PATCH] Caliburn Micro installed in a new MVVM wpf UI for the tournamnt tracker --- MVCUI/MVCUI.csproj | 1 + TournamentTracker.sln | 6 + TrackerWPFUI/App.config | 6 + TrackerWPFUI/App.xaml | 14 ++ TrackerWPFUI/App.xaml.cs | 17 +++ TrackerWPFUI/BootStrapper.cs | 24 ++++ TrackerWPFUI/Properties/AssemblyInfo.cs | 55 ++++++++ TrackerWPFUI/Properties/Resources.Designer.cs | 71 ++++++++++ TrackerWPFUI/Properties/Resources.resx | 117 +++++++++++++++++ TrackerWPFUI/Properties/Settings.Designer.cs | 30 +++++ TrackerWPFUI/Properties/Settings.settings | 7 + TrackerWPFUI/TournamentTracker.ico | Bin 0 -> 2132 bytes TrackerWPFUI/TrackerWPFUI.csproj | 123 ++++++++++++++++++ TrackerWPFUI/ViewModels/ShellViewModel.cs | 13 ++ TrackerWPFUI/Views/ShellView.xaml | 12 ++ TrackerWPFUI/Views/ShellView.xaml.cs | 27 ++++ TrackerWPFUI/packages.config | 5 + 17 files changed, 528 insertions(+) create mode 100644 TrackerWPFUI/App.config create mode 100644 TrackerWPFUI/App.xaml create mode 100644 TrackerWPFUI/App.xaml.cs create mode 100644 TrackerWPFUI/BootStrapper.cs create mode 100644 TrackerWPFUI/Properties/AssemblyInfo.cs create mode 100644 TrackerWPFUI/Properties/Resources.Designer.cs create mode 100644 TrackerWPFUI/Properties/Resources.resx create mode 100644 TrackerWPFUI/Properties/Settings.Designer.cs create mode 100644 TrackerWPFUI/Properties/Settings.settings create mode 100644 TrackerWPFUI/TournamentTracker.ico create mode 100644 TrackerWPFUI/TrackerWPFUI.csproj create mode 100644 TrackerWPFUI/ViewModels/ShellViewModel.cs create mode 100644 TrackerWPFUI/Views/ShellView.xaml create mode 100644 TrackerWPFUI/Views/ShellView.xaml.cs create mode 100644 TrackerWPFUI/packages.config diff --git a/MVCUI/MVCUI.csproj b/MVCUI/MVCUI.csproj index 9d50073..d03a8d4 100644 --- a/MVCUI/MVCUI.csproj +++ b/MVCUI/MVCUI.csproj @@ -172,6 +172,7 @@ + diff --git a/TournamentTracker.sln b/TournamentTracker.sln index d9dba01..527990e 100644 --- a/TournamentTracker.sln +++ b/TournamentTracker.sln @@ -9,6 +9,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TrackerUI", "TrackerUI\Trac EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MVCUI", "MVCUI\MVCUI.csproj", "{2D8CCD92-CE52-4D5E-840A-AFD1FED830E0}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TrackerWPFUI", "TrackerWPFUI\TrackerWPFUI.csproj", "{C898495C-BFE3-45B2-9E18-552423D5F03F}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -27,6 +29,10 @@ Global {2D8CCD92-CE52-4D5E-840A-AFD1FED830E0}.Debug|Any CPU.Build.0 = Debug|Any CPU {2D8CCD92-CE52-4D5E-840A-AFD1FED830E0}.Release|Any CPU.ActiveCfg = Release|Any CPU {2D8CCD92-CE52-4D5E-840A-AFD1FED830E0}.Release|Any CPU.Build.0 = Release|Any CPU + {C898495C-BFE3-45B2-9E18-552423D5F03F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C898495C-BFE3-45B2-9E18-552423D5F03F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C898495C-BFE3-45B2-9E18-552423D5F03F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C898495C-BFE3-45B2-9E18-552423D5F03F}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/TrackerWPFUI/App.config b/TrackerWPFUI/App.config new file mode 100644 index 0000000..56efbc7 --- /dev/null +++ b/TrackerWPFUI/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/TrackerWPFUI/App.xaml b/TrackerWPFUI/App.xaml new file mode 100644 index 0000000..da78cd9 --- /dev/null +++ b/TrackerWPFUI/App.xaml @@ -0,0 +1,14 @@ + + + + + + + + + + + diff --git a/TrackerWPFUI/App.xaml.cs b/TrackerWPFUI/App.xaml.cs new file mode 100644 index 0000000..604bd49 --- /dev/null +++ b/TrackerWPFUI/App.xaml.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Configuration; +using System.Data; +using System.Linq; +using System.Threading.Tasks; +using System.Windows; + +namespace TrackerWPFUI +{ + /// + /// Interaction logic for App.xaml + /// + public partial class App : Application + { + } +} diff --git a/TrackerWPFUI/BootStrapper.cs b/TrackerWPFUI/BootStrapper.cs new file mode 100644 index 0000000..98a98ef --- /dev/null +++ b/TrackerWPFUI/BootStrapper.cs @@ -0,0 +1,24 @@ +using Caliburn.Micro; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using TrackerWPFUI.ViewModels; + +namespace TrackerWPFUI +{ + public class BootStrapper:BootstrapperBase + { + public BootStrapper() + { + Initialize(); + } + + protected override void OnStartup(object sender, StartupEventArgs e) + { + DisplayRootViewFor(); + } + } +} diff --git a/TrackerWPFUI/Properties/AssemblyInfo.cs b/TrackerWPFUI/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..0e29e10 --- /dev/null +++ b/TrackerWPFUI/Properties/AssemblyInfo.cs @@ -0,0 +1,55 @@ +using System.Reflection; +using System.Resources; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Windows; + +// 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("TrackerWPFUI")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("TrackerWPFUI")] +[assembly: AssemblyCopyright("Copyright © 2020")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +//In order to begin building localizable applications, set +//CultureYouAreCodingWith in your .csproj file +//inside a . For example, if you are using US english +//in your source files, set the to en-US. Then uncomment +//the NeutralResourceLanguage attribute below. Update the "en-US" in +//the line below to match the UICulture setting in the project file. + +//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)] + + +[assembly: ThemeInfo( + ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located + //(used if a resource is not found in the page, + // or application resource dictionaries) + ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located + //(used if a resource is not found in the page, + // app, or any theme specific resource dictionaries) +)] + + +// 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")] diff --git a/TrackerWPFUI/Properties/Resources.Designer.cs b/TrackerWPFUI/Properties/Resources.Designer.cs new file mode 100644 index 0000000..470d686 --- /dev/null +++ b/TrackerWPFUI/Properties/Resources.Designer.cs @@ -0,0 +1,71 @@ +//------------------------------------------------------------------------------ +// +// 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 TrackerWPFUI.Properties +{ + + + /// + /// 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()] + internal 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)] + internal static global::System.Resources.ResourceManager ResourceManager + { + get + { + if ((resourceMan == null)) + { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("TrackerWPFUI.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)] + internal static global::System.Globalization.CultureInfo Culture + { + get + { + return resourceCulture; + } + set + { + resourceCulture = value; + } + } + } +} diff --git a/TrackerWPFUI/Properties/Resources.resx b/TrackerWPFUI/Properties/Resources.resx new file mode 100644 index 0000000..af7dbeb --- /dev/null +++ b/TrackerWPFUI/Properties/Resources.resx @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/TrackerWPFUI/Properties/Settings.Designer.cs b/TrackerWPFUI/Properties/Settings.Designer.cs new file mode 100644 index 0000000..2e432cc --- /dev/null +++ b/TrackerWPFUI/Properties/Settings.Designer.cs @@ -0,0 +1,30 @@ +//------------------------------------------------------------------------------ +// +// 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 TrackerWPFUI.Properties +{ + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase + { + + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); + + public static Settings Default + { + get + { + return defaultInstance; + } + } + } +} diff --git a/TrackerWPFUI/Properties/Settings.settings b/TrackerWPFUI/Properties/Settings.settings new file mode 100644 index 0000000..033d7a5 --- /dev/null +++ b/TrackerWPFUI/Properties/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/TrackerWPFUI/TournamentTracker.ico b/TrackerWPFUI/TournamentTracker.ico new file mode 100644 index 0000000000000000000000000000000000000000..a54745590afd0b0891c77d326620a329b2cd65af GIT binary patch literal 2132 zcmb7F3sllq9KMhyDAt^nIG487G>?_$7P^d)5$q8#El_daR(HZFH8@eY}F7_=;+zo3T8N;18MEzw6 zs^GBmcIsB|mD}bZoNeY@-`>9FX4%Hf{I)fAOD`n+fcOz^mo(M_KMs#EBU+*?15O|5 zTP60hUX&2;ZDn_I#*jA|qU#2l&@G7K%w9TKp&WbC4MFu5$K&y z1i=}_7%wGG@QCtAD7SABoazu)8LZeoQR_7m9vNhG(~9~9#?NK7w#t&Ftx!f;agT9+ z*C|kO#;4?R7=1sZ=WCt9iZ`zAC@i`MJv&q$gY~KR4nf`Y?xKxKY#p9&kOx%Qz`|`y z_ok-to(PF3o-U7WtR0J@F}gBR!&j^tDb?^hx6G8S1d^>5L?U;T(fTVo`#)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UI.csproj new file mode 100644 index 0000000..7d20557 --- /dev/null +++ b/TrackerWPFUI/TrackerWPFUI.csproj @@ -0,0 +1,123 @@ + + + + + Debug + AnyCPU + {C898495C-BFE3-45B2-9E18-552423D5F03F} + WinExe + TrackerWPFUI + TrackerWPFUI + v4.7.2 + 512 + {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + 4 + true + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + TournamentTracker.ico + + + + ..\packages\Caliburn.Micro.Core.3.2.0\lib\net45\Caliburn.Micro.dll + + + ..\packages\Caliburn.Micro.3.2.0\lib\net45\Caliburn.Micro.Platform.dll + + + ..\packages\Caliburn.Micro.3.2.0\lib\net45\Caliburn.Micro.Platform.Core.dll + + + + + ..\packages\Caliburn.Micro.3.2.0\lib\net45\System.Windows.Interactivity.dll + + + + + + + + + 4.0 + + + + + + + + MSBuild:Compile + Designer + + + + + ShellView.xaml + + + App.xaml + Code + + + Designer + MSBuild:Compile + + + + + Code + + + True + True + Resources.resx + + + True + Settings.settings + True + + + ResXFileCodeGenerator + Resources.Designer.cs + + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + + + + + + + + + PreserveNewest + + + + \ No newline at end of file diff --git a/TrackerWPFUI/ViewModels/ShellViewModel.cs b/TrackerWPFUI/ViewModels/ShellViewModel.cs new file mode 100644 index 0000000..2a2c8b4 --- /dev/null +++ b/TrackerWPFUI/ViewModels/ShellViewModel.cs @@ -0,0 +1,13 @@ +using Caliburn.Micro; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace TrackerWPFUI.ViewModels +{ + public class ShellViewModel:Conductor + { + } +} diff --git a/TrackerWPFUI/Views/ShellView.xaml b/TrackerWPFUI/Views/ShellView.xaml new file mode 100644 index 0000000..d00a835 --- /dev/null +++ b/TrackerWPFUI/Views/ShellView.xaml @@ -0,0 +1,12 @@ + + + + + diff --git a/TrackerWPFUI/Views/ShellView.xaml.cs b/TrackerWPFUI/Views/ShellView.xaml.cs new file mode 100644 index 0000000..c1234da --- /dev/null +++ b/TrackerWPFUI/Views/ShellView.xaml.cs @@ -0,0 +1,27 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Shapes; + +namespace TrackerWPFUI.Views +{ + /// + /// Interaction logic for ShellView.xaml + /// + public partial class ShellView : Window + { + public ShellView() + { + InitializeComponent(); + } + } +} diff --git a/TrackerWPFUI/packages.config b/TrackerWPFUI/packages.config new file mode 100644 index 0000000..8e82008 --- /dev/null +++ b/TrackerWPFUI/packages.config @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file