diff --git a/UWPHook.sln b/UWPHook.sln index 0c780bf..e567898 100644 --- a/UWPHook.sln +++ b/UWPHook.sln @@ -7,6 +7,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UWPHook", "UWPHook\UWPHook. EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SharpSteam", "..\SharpSteam\SharpSteam\SharpSteam.csproj", "{D0A686FB-B373-4FBC-A0DD-C3417276A816}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VDFParser", "..\..\..\Downloads\SharpSteam-master\SharpSteam-master\VDFParser\VDFParser\VDFParser.csproj", "{9543FB59-1EB6-4638-B24C-B12B9D4A15FC}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -21,6 +23,10 @@ Global {D0A686FB-B373-4FBC-A0DD-C3417276A816}.Debug|Any CPU.Build.0 = Debug|Any CPU {D0A686FB-B373-4FBC-A0DD-C3417276A816}.Release|Any CPU.ActiveCfg = Release|Any CPU {D0A686FB-B373-4FBC-A0DD-C3417276A816}.Release|Any CPU.Build.0 = Release|Any CPU + {9543FB59-1EB6-4638-B24C-B12B9D4A15FC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9543FB59-1EB6-4638-B24C-B12B9D4A15FC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9543FB59-1EB6-4638-B24C-B12B9D4A15FC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9543FB59-1EB6-4638-B24C-B12B9D4A15FC}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/UWPHook/App.xaml b/UWPHook/App.xaml index 21febfc..5fb6b15 100644 --- a/UWPHook/App.xaml +++ b/UWPHook/App.xaml @@ -2,8 +2,15 @@ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="clr-namespace:UWPHook" - StartupUri="MainWindow.xaml"> + StartupUri="GamesWindow.xaml"> - + + + + + + + + diff --git a/UWPHook/AppEntry.cs b/UWPHook/AppEntry.cs new file mode 100644 index 0000000..bcf5c43 --- /dev/null +++ b/UWPHook/AppEntry.cs @@ -0,0 +1,50 @@ +using System.ComponentModel; +using System.Runtime.CompilerServices; + +namespace UWPHook +{ + public class AppEntry : INotifyPropertyChanged + { + private string _name; + /// + /// Gets or sets the name of the application + /// + public string Name + { + get { return _name; } + set { _name = value; } + } + + private string _aumid; + /// + /// Gets or sets the aumid of the application + /// + public string Aumid + { + get { return _aumid; } + set { _aumid = value; } + } + + private bool _isSelected; + /// + /// Gets or sets if the application is selected + /// + public bool IsSelected + { + get { return _isSelected; } + set + { + if (_isSelected == value) return; + _isSelected = value; + OnPropertyChanged(); + } + } + + public event PropertyChangedEventHandler PropertyChanged; + + protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null) + { + PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); + } + } +} diff --git a/UWPHook/AppEntryModel.cs b/UWPHook/AppEntryModel.cs new file mode 100644 index 0000000..a647b28 --- /dev/null +++ b/UWPHook/AppEntryModel.cs @@ -0,0 +1,20 @@ +using System.Collections.ObjectModel; + +namespace UWPHook +{ + public class AppEntryModel + { + public AppEntryModel() + { + this._entries = new ObservableCollection(); + } + + private ObservableCollection _entries; + + public ObservableCollection Entries + { + get { return _entries; } + set { _entries = value; } + } + } +} diff --git a/UWPHook/AppManager.cs b/UWPHook/AppManager.cs index e6b8cd5..61d80be 100644 --- a/UWPHook/AppManager.cs +++ b/UWPHook/AppManager.cs @@ -11,11 +11,11 @@ using System.Threading.Tasks; namespace UWPHook { - class AppManager + static class AppManager { - private int id; + private static int id; - public void LaunchUWPApp(string uri) + public static void LaunchUWPApp(string uri) { var mgr = new ApplicationActivationManager(); uint processId; @@ -24,7 +24,7 @@ namespace UWPHook id = (int)processId; } - public Boolean IsRunning() + public static Boolean IsRunning() { if (id == 0) { @@ -42,7 +42,7 @@ namespace UWPHook return true; } - public List GetInstalledApps() + public static List GetInstalledApps() { List result = null; var assembly = Assembly.GetExecutingAssembly(); diff --git a/UWPHook/GamesWindow.xaml b/UWPHook/GamesWindow.xaml new file mode 100644 index 0000000..f1f6929 --- /dev/null +++ b/UWPHook/GamesWindow.xaml @@ -0,0 +1,57 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +