From d9a29e1da578a0a77a5bdbc778b9877099e3181f Mon Sep 17 00:00:00 2001 From: Den Delimarsky <1389609+dend@users.noreply.github.com> Date: Tue, 9 Mar 2021 08:13:52 -0800 Subject: [PATCH 01/81] Initial changes to enable Espresso --- PowerToys.sln | 678 +++++++++++++++++++++ src/espresso/EspressoUI/App.xaml | 9 + src/espresso/EspressoUI/App.xaml.cs | 17 + src/espresso/EspressoUI/AssemblyInfo.cs | 10 + src/espresso/EspressoUI/EspressoUI.csproj | 9 + src/espresso/EspressoUI/LocProject.json | 14 + src/espresso/EspressoUI/MainWindow.xaml | 12 + src/espresso/EspressoUI/MainWindow.xaml.cs | 28 + 8 files changed, 777 insertions(+) create mode 100644 src/espresso/EspressoUI/App.xaml create mode 100644 src/espresso/EspressoUI/App.xaml.cs create mode 100644 src/espresso/EspressoUI/AssemblyInfo.cs create mode 100644 src/espresso/EspressoUI/EspressoUI.csproj create mode 100644 src/espresso/EspressoUI/LocProject.json create mode 100644 src/espresso/EspressoUI/MainWindow.xaml create mode 100644 src/espresso/EspressoUI/MainWindow.xaml.cs diff --git a/PowerToys.sln b/PowerToys.sln index c12d4dbf79..0533b1ba56 100644 --- a/PowerToys.sln +++ b/PowerToys.sln @@ -310,332 +310,1008 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.PowerToys.Run.Plu EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PowerToys.Settings", "src\settings-ui\PowerToys.Settings\PowerToys.Settings.csproj", "{6ED2F4FC-E122-4CEE-90F1-97E4CCC8BC7A}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "espresso", "espresso", "{29049A7A-30D5-4E37-9C4B-ABFF400CFB4D}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EspressoUI", "src\espresso\EspressoUI\EspressoUI.csproj", "{85ACDB61-82E7-4E98-872F-7E36EAD4C75F}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Debug|ARM = Debug|ARM + Debug|ARM64 = Debug|ARM64 Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|Any CPU = Release|Any CPU + Release|ARM = Release|ARM + Release|ARM64 = Release|ARM64 Release|x64 = Release|x64 + Release|x86 = Release|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution + {9412D5C6-2CF2-4FC2-A601-B55508EA9B27}.Debug|Any CPU.ActiveCfg = Debug|x64 + {9412D5C6-2CF2-4FC2-A601-B55508EA9B27}.Debug|ARM.ActiveCfg = Debug|x64 + {9412D5C6-2CF2-4FC2-A601-B55508EA9B27}.Debug|ARM64.ActiveCfg = Debug|x64 {9412D5C6-2CF2-4FC2-A601-B55508EA9B27}.Debug|x64.ActiveCfg = Debug|x64 {9412D5C6-2CF2-4FC2-A601-B55508EA9B27}.Debug|x64.Build.0 = Debug|x64 + {9412D5C6-2CF2-4FC2-A601-B55508EA9B27}.Debug|x86.ActiveCfg = Debug|x64 + {9412D5C6-2CF2-4FC2-A601-B55508EA9B27}.Release|Any CPU.ActiveCfg = Release|x64 + {9412D5C6-2CF2-4FC2-A601-B55508EA9B27}.Release|ARM.ActiveCfg = Release|x64 + {9412D5C6-2CF2-4FC2-A601-B55508EA9B27}.Release|ARM64.ActiveCfg = Release|x64 {9412D5C6-2CF2-4FC2-A601-B55508EA9B27}.Release|x64.ActiveCfg = Release|x64 {9412D5C6-2CF2-4FC2-A601-B55508EA9B27}.Release|x64.Build.0 = Release|x64 + {9412D5C6-2CF2-4FC2-A601-B55508EA9B27}.Release|x86.ActiveCfg = Release|x64 + {A46629C4-1A6C-40FA-A8B6-10E5102BB0BA}.Debug|Any CPU.ActiveCfg = Debug|x64 + {A46629C4-1A6C-40FA-A8B6-10E5102BB0BA}.Debug|ARM.ActiveCfg = Debug|x64 + {A46629C4-1A6C-40FA-A8B6-10E5102BB0BA}.Debug|ARM64.ActiveCfg = Debug|x64 {A46629C4-1A6C-40FA-A8B6-10E5102BB0BA}.Debug|x64.ActiveCfg = Debug|x64 {A46629C4-1A6C-40FA-A8B6-10E5102BB0BA}.Debug|x64.Build.0 = Debug|x64 + {A46629C4-1A6C-40FA-A8B6-10E5102BB0BA}.Debug|x86.ActiveCfg = Debug|x64 + {A46629C4-1A6C-40FA-A8B6-10E5102BB0BA}.Release|Any CPU.ActiveCfg = Release|x64 + {A46629C4-1A6C-40FA-A8B6-10E5102BB0BA}.Release|ARM.ActiveCfg = Release|x64 + {A46629C4-1A6C-40FA-A8B6-10E5102BB0BA}.Release|ARM64.ActiveCfg = Release|x64 {A46629C4-1A6C-40FA-A8B6-10E5102BB0BA}.Release|x64.ActiveCfg = Release|x64 {A46629C4-1A6C-40FA-A8B6-10E5102BB0BA}.Release|x64.Build.0 = Release|x64 + {A46629C4-1A6C-40FA-A8B6-10E5102BB0BA}.Release|x86.ActiveCfg = Release|x64 + {F9C68EDF-AC74-4B77-9AF1-005D9C9F6A99}.Debug|Any CPU.ActiveCfg = Debug|x64 + {F9C68EDF-AC74-4B77-9AF1-005D9C9F6A99}.Debug|ARM.ActiveCfg = Debug|x64 + {F9C68EDF-AC74-4B77-9AF1-005D9C9F6A99}.Debug|ARM64.ActiveCfg = Debug|x64 {F9C68EDF-AC74-4B77-9AF1-005D9C9F6A99}.Debug|x64.ActiveCfg = Debug|x64 {F9C68EDF-AC74-4B77-9AF1-005D9C9F6A99}.Debug|x64.Build.0 = Debug|x64 + {F9C68EDF-AC74-4B77-9AF1-005D9C9F6A99}.Debug|x86.ActiveCfg = Debug|x64 + {F9C68EDF-AC74-4B77-9AF1-005D9C9F6A99}.Release|Any CPU.ActiveCfg = Release|x64 + {F9C68EDF-AC74-4B77-9AF1-005D9C9F6A99}.Release|ARM.ActiveCfg = Release|x64 + {F9C68EDF-AC74-4B77-9AF1-005D9C9F6A99}.Release|ARM64.ActiveCfg = Release|x64 {F9C68EDF-AC74-4B77-9AF1-005D9C9F6A99}.Release|x64.ActiveCfg = Release|x64 {F9C68EDF-AC74-4B77-9AF1-005D9C9F6A99}.Release|x64.Build.0 = Release|x64 + {F9C68EDF-AC74-4B77-9AF1-005D9C9F6A99}.Release|x86.ActiveCfg = Release|x64 + {48804216-2A0E-4168-A6D8-9CD068D14227}.Debug|Any CPU.ActiveCfg = Debug|x64 + {48804216-2A0E-4168-A6D8-9CD068D14227}.Debug|ARM.ActiveCfg = Debug|x64 + {48804216-2A0E-4168-A6D8-9CD068D14227}.Debug|ARM64.ActiveCfg = Debug|x64 {48804216-2A0E-4168-A6D8-9CD068D14227}.Debug|x64.ActiveCfg = Debug|x64 {48804216-2A0E-4168-A6D8-9CD068D14227}.Debug|x64.Build.0 = Debug|x64 + {48804216-2A0E-4168-A6D8-9CD068D14227}.Debug|x86.ActiveCfg = Debug|x64 + {48804216-2A0E-4168-A6D8-9CD068D14227}.Release|Any CPU.ActiveCfg = Release|x64 + {48804216-2A0E-4168-A6D8-9CD068D14227}.Release|ARM.ActiveCfg = Release|x64 + {48804216-2A0E-4168-A6D8-9CD068D14227}.Release|ARM64.ActiveCfg = Release|x64 {48804216-2A0E-4168-A6D8-9CD068D14227}.Release|x64.ActiveCfg = Release|x64 {48804216-2A0E-4168-A6D8-9CD068D14227}.Release|x64.Build.0 = Release|x64 + {48804216-2A0E-4168-A6D8-9CD068D14227}.Release|x86.ActiveCfg = Release|x64 + {9C6A7905-72D4-4BF5-B256-ABFDAEF68AE9}.Debug|Any CPU.ActiveCfg = Debug|x64 + {9C6A7905-72D4-4BF5-B256-ABFDAEF68AE9}.Debug|ARM.ActiveCfg = Debug|x64 + {9C6A7905-72D4-4BF5-B256-ABFDAEF68AE9}.Debug|ARM64.ActiveCfg = Debug|x64 {9C6A7905-72D4-4BF5-B256-ABFDAEF68AE9}.Debug|x64.ActiveCfg = Debug|x64 {9C6A7905-72D4-4BF5-B256-ABFDAEF68AE9}.Debug|x64.Build.0 = Debug|x64 + {9C6A7905-72D4-4BF5-B256-ABFDAEF68AE9}.Debug|x86.ActiveCfg = Debug|x64 + {9C6A7905-72D4-4BF5-B256-ABFDAEF68AE9}.Release|Any CPU.ActiveCfg = Release|x64 + {9C6A7905-72D4-4BF5-B256-ABFDAEF68AE9}.Release|ARM.ActiveCfg = Release|x64 + {9C6A7905-72D4-4BF5-B256-ABFDAEF68AE9}.Release|ARM64.ActiveCfg = Release|x64 {9C6A7905-72D4-4BF5-B256-ABFDAEF68AE9}.Release|x64.ActiveCfg = Release|x64 {9C6A7905-72D4-4BF5-B256-ABFDAEF68AE9}.Release|x64.Build.0 = Release|x64 + {9C6A7905-72D4-4BF5-B256-ABFDAEF68AE9}.Release|x86.ActiveCfg = Release|x64 + {1A066C63-64B3-45F8-92FE-664E1CCE8077}.Debug|Any CPU.ActiveCfg = Debug|x64 + {1A066C63-64B3-45F8-92FE-664E1CCE8077}.Debug|ARM.ActiveCfg = Debug|x64 + {1A066C63-64B3-45F8-92FE-664E1CCE8077}.Debug|ARM64.ActiveCfg = Debug|x64 {1A066C63-64B3-45F8-92FE-664E1CCE8077}.Debug|x64.ActiveCfg = Debug|x64 {1A066C63-64B3-45F8-92FE-664E1CCE8077}.Debug|x64.Build.0 = Debug|x64 + {1A066C63-64B3-45F8-92FE-664E1CCE8077}.Debug|x86.ActiveCfg = Debug|x64 + {1A066C63-64B3-45F8-92FE-664E1CCE8077}.Release|Any CPU.ActiveCfg = Release|x64 + {1A066C63-64B3-45F8-92FE-664E1CCE8077}.Release|ARM.ActiveCfg = Release|x64 + {1A066C63-64B3-45F8-92FE-664E1CCE8077}.Release|ARM64.ActiveCfg = Release|x64 {1A066C63-64B3-45F8-92FE-664E1CCE8077}.Release|x64.ActiveCfg = Release|x64 {1A066C63-64B3-45F8-92FE-664E1CCE8077}.Release|x64.Build.0 = Release|x64 + {1A066C63-64B3-45F8-92FE-664E1CCE8077}.Release|x86.ActiveCfg = Release|x64 + {5CCC8468-DEC8-4D36-99D4-5C891BEBD481}.Debug|Any CPU.ActiveCfg = Debug|x64 + {5CCC8468-DEC8-4D36-99D4-5C891BEBD481}.Debug|ARM.ActiveCfg = Debug|x64 + {5CCC8468-DEC8-4D36-99D4-5C891BEBD481}.Debug|ARM64.ActiveCfg = Debug|x64 {5CCC8468-DEC8-4D36-99D4-5C891BEBD481}.Debug|x64.ActiveCfg = Debug|x64 {5CCC8468-DEC8-4D36-99D4-5C891BEBD481}.Debug|x64.Build.0 = Debug|x64 + {5CCC8468-DEC8-4D36-99D4-5C891BEBD481}.Debug|x86.ActiveCfg = Debug|x64 + {5CCC8468-DEC8-4D36-99D4-5C891BEBD481}.Release|Any CPU.ActiveCfg = Release|x64 + {5CCC8468-DEC8-4D36-99D4-5C891BEBD481}.Release|ARM.ActiveCfg = Release|x64 + {5CCC8468-DEC8-4D36-99D4-5C891BEBD481}.Release|ARM64.ActiveCfg = Release|x64 {5CCC8468-DEC8-4D36-99D4-5C891BEBD481}.Release|x64.ActiveCfg = Release|x64 {5CCC8468-DEC8-4D36-99D4-5C891BEBD481}.Release|x64.Build.0 = Release|x64 + {5CCC8468-DEC8-4D36-99D4-5C891BEBD481}.Release|x86.ActiveCfg = Release|x64 + {B25AC7A5-FB9F-4789-B392-D5C85E948670}.Debug|Any CPU.ActiveCfg = Debug|x64 + {B25AC7A5-FB9F-4789-B392-D5C85E948670}.Debug|ARM.ActiveCfg = Debug|x64 + {B25AC7A5-FB9F-4789-B392-D5C85E948670}.Debug|ARM64.ActiveCfg = Debug|x64 {B25AC7A5-FB9F-4789-B392-D5C85E948670}.Debug|x64.ActiveCfg = Debug|x64 {B25AC7A5-FB9F-4789-B392-D5C85E948670}.Debug|x64.Build.0 = Debug|x64 + {B25AC7A5-FB9F-4789-B392-D5C85E948670}.Debug|x86.ActiveCfg = Debug|x64 + {B25AC7A5-FB9F-4789-B392-D5C85E948670}.Release|Any CPU.ActiveCfg = Release|x64 + {B25AC7A5-FB9F-4789-B392-D5C85E948670}.Release|ARM.ActiveCfg = Release|x64 + {B25AC7A5-FB9F-4789-B392-D5C85E948670}.Release|ARM64.ActiveCfg = Release|x64 {B25AC7A5-FB9F-4789-B392-D5C85E948670}.Release|x64.ActiveCfg = Release|x64 {B25AC7A5-FB9F-4789-B392-D5C85E948670}.Release|x64.Build.0 = Release|x64 + {B25AC7A5-FB9F-4789-B392-D5C85E948670}.Release|x86.ActiveCfg = Release|x64 + {51920F1F-C28C-4ADF-8660-4238766796C2}.Debug|Any CPU.ActiveCfg = Debug|x64 + {51920F1F-C28C-4ADF-8660-4238766796C2}.Debug|ARM.ActiveCfg = Debug|x64 + {51920F1F-C28C-4ADF-8660-4238766796C2}.Debug|ARM64.ActiveCfg = Debug|x64 {51920F1F-C28C-4ADF-8660-4238766796C2}.Debug|x64.ActiveCfg = Debug|x64 {51920F1F-C28C-4ADF-8660-4238766796C2}.Debug|x64.Build.0 = Debug|x64 + {51920F1F-C28C-4ADF-8660-4238766796C2}.Debug|x86.ActiveCfg = Debug|x64 + {51920F1F-C28C-4ADF-8660-4238766796C2}.Release|Any CPU.ActiveCfg = Release|x64 + {51920F1F-C28C-4ADF-8660-4238766796C2}.Release|ARM.ActiveCfg = Release|x64 + {51920F1F-C28C-4ADF-8660-4238766796C2}.Release|ARM64.ActiveCfg = Release|x64 {51920F1F-C28C-4ADF-8660-4238766796C2}.Release|x64.ActiveCfg = Release|x64 {51920F1F-C28C-4ADF-8660-4238766796C2}.Release|x64.Build.0 = Release|x64 + {51920F1F-C28C-4ADF-8660-4238766796C2}.Release|x86.ActiveCfg = Release|x64 + {0E072714-D127-460B-AFAD-B4C40B412798}.Debug|Any CPU.ActiveCfg = Debug|x64 + {0E072714-D127-460B-AFAD-B4C40B412798}.Debug|ARM.ActiveCfg = Debug|x64 + {0E072714-D127-460B-AFAD-B4C40B412798}.Debug|ARM64.ActiveCfg = Debug|x64 {0E072714-D127-460B-AFAD-B4C40B412798}.Debug|x64.ActiveCfg = Debug|x64 {0E072714-D127-460B-AFAD-B4C40B412798}.Debug|x64.Build.0 = Debug|x64 + {0E072714-D127-460B-AFAD-B4C40B412798}.Debug|x86.ActiveCfg = Debug|x64 + {0E072714-D127-460B-AFAD-B4C40B412798}.Release|Any CPU.ActiveCfg = Release|x64 + {0E072714-D127-460B-AFAD-B4C40B412798}.Release|ARM.ActiveCfg = Release|x64 + {0E072714-D127-460B-AFAD-B4C40B412798}.Release|ARM64.ActiveCfg = Release|x64 {0E072714-D127-460B-AFAD-B4C40B412798}.Release|x64.ActiveCfg = Release|x64 {0E072714-D127-460B-AFAD-B4C40B412798}.Release|x64.Build.0 = Release|x64 + {0E072714-D127-460B-AFAD-B4C40B412798}.Release|x86.ActiveCfg = Release|x64 + {A3935CF4-46C5-4A88-84D3-6B12E16E6BA2}.Debug|Any CPU.ActiveCfg = Debug|x64 + {A3935CF4-46C5-4A88-84D3-6B12E16E6BA2}.Debug|ARM.ActiveCfg = Debug|x64 + {A3935CF4-46C5-4A88-84D3-6B12E16E6BA2}.Debug|ARM64.ActiveCfg = Debug|x64 {A3935CF4-46C5-4A88-84D3-6B12E16E6BA2}.Debug|x64.ActiveCfg = Debug|x64 {A3935CF4-46C5-4A88-84D3-6B12E16E6BA2}.Debug|x64.Build.0 = Debug|x64 + {A3935CF4-46C5-4A88-84D3-6B12E16E6BA2}.Debug|x86.ActiveCfg = Debug|x64 + {A3935CF4-46C5-4A88-84D3-6B12E16E6BA2}.Release|Any CPU.ActiveCfg = Release|x64 + {A3935CF4-46C5-4A88-84D3-6B12E16E6BA2}.Release|ARM.ActiveCfg = Release|x64 + {A3935CF4-46C5-4A88-84D3-6B12E16E6BA2}.Release|ARM64.ActiveCfg = Release|x64 {A3935CF4-46C5-4A88-84D3-6B12E16E6BA2}.Release|x64.ActiveCfg = Release|x64 {A3935CF4-46C5-4A88-84D3-6B12E16E6BA2}.Release|x64.Build.0 = Release|x64 + {A3935CF4-46C5-4A88-84D3-6B12E16E6BA2}.Release|x86.ActiveCfg = Release|x64 + {2151F984-E006-4A9F-92EF-C6DDE3DC8413}.Debug|Any CPU.ActiveCfg = Debug|x64 + {2151F984-E006-4A9F-92EF-C6DDE3DC8413}.Debug|ARM.ActiveCfg = Debug|x64 + {2151F984-E006-4A9F-92EF-C6DDE3DC8413}.Debug|ARM64.ActiveCfg = Debug|x64 {2151F984-E006-4A9F-92EF-C6DDE3DC8413}.Debug|x64.ActiveCfg = Debug|x64 {2151F984-E006-4A9F-92EF-C6DDE3DC8413}.Debug|x64.Build.0 = Debug|x64 + {2151F984-E006-4A9F-92EF-C6DDE3DC8413}.Debug|x86.ActiveCfg = Debug|x64 + {2151F984-E006-4A9F-92EF-C6DDE3DC8413}.Release|Any CPU.ActiveCfg = Release|x64 + {2151F984-E006-4A9F-92EF-C6DDE3DC8413}.Release|ARM.ActiveCfg = Release|x64 + {2151F984-E006-4A9F-92EF-C6DDE3DC8413}.Release|ARM64.ActiveCfg = Release|x64 {2151F984-E006-4A9F-92EF-C6DDE3DC8413}.Release|x64.ActiveCfg = Release|x64 {2151F984-E006-4A9F-92EF-C6DDE3DC8413}.Release|x64.Build.0 = Release|x64 + {2151F984-E006-4A9F-92EF-C6DDE3DC8413}.Release|x86.ActiveCfg = Release|x64 + {64A80062-4D8B-4229-8A38-DFA1D7497749}.Debug|Any CPU.ActiveCfg = Debug|x64 + {64A80062-4D8B-4229-8A38-DFA1D7497749}.Debug|ARM.ActiveCfg = Debug|x64 + {64A80062-4D8B-4229-8A38-DFA1D7497749}.Debug|ARM64.ActiveCfg = Debug|x64 {64A80062-4D8B-4229-8A38-DFA1D7497749}.Debug|x64.ActiveCfg = Debug|x64 {64A80062-4D8B-4229-8A38-DFA1D7497749}.Debug|x64.Build.0 = Debug|x64 + {64A80062-4D8B-4229-8A38-DFA1D7497749}.Debug|x86.ActiveCfg = Debug|x64 + {64A80062-4D8B-4229-8A38-DFA1D7497749}.Release|Any CPU.ActiveCfg = Release|x64 + {64A80062-4D8B-4229-8A38-DFA1D7497749}.Release|ARM.ActiveCfg = Release|x64 + {64A80062-4D8B-4229-8A38-DFA1D7497749}.Release|ARM64.ActiveCfg = Release|x64 {64A80062-4D8B-4229-8A38-DFA1D7497749}.Release|x64.ActiveCfg = Release|x64 {64A80062-4D8B-4229-8A38-DFA1D7497749}.Release|x64.Build.0 = Release|x64 + {64A80062-4D8B-4229-8A38-DFA1D7497749}.Release|x86.ActiveCfg = Release|x64 + {0485F45C-EA7A-4BB5-804B-3E8D14699387}.Debug|Any CPU.ActiveCfg = Debug|x64 + {0485F45C-EA7A-4BB5-804B-3E8D14699387}.Debug|ARM.ActiveCfg = Debug|x64 + {0485F45C-EA7A-4BB5-804B-3E8D14699387}.Debug|ARM64.ActiveCfg = Debug|x64 {0485F45C-EA7A-4BB5-804B-3E8D14699387}.Debug|x64.ActiveCfg = Debug|x64 {0485F45C-EA7A-4BB5-804B-3E8D14699387}.Debug|x64.Build.0 = Debug|x64 + {0485F45C-EA7A-4BB5-804B-3E8D14699387}.Debug|x86.ActiveCfg = Debug|x64 + {0485F45C-EA7A-4BB5-804B-3E8D14699387}.Release|Any CPU.ActiveCfg = Release|x64 + {0485F45C-EA7A-4BB5-804B-3E8D14699387}.Release|ARM.ActiveCfg = Release|x64 + {0485F45C-EA7A-4BB5-804B-3E8D14699387}.Release|ARM64.ActiveCfg = Release|x64 {0485F45C-EA7A-4BB5-804B-3E8D14699387}.Release|x64.ActiveCfg = Release|x64 {0485F45C-EA7A-4BB5-804B-3E8D14699387}.Release|x64.Build.0 = Release|x64 + {0485F45C-EA7A-4BB5-804B-3E8D14699387}.Release|x86.ActiveCfg = Release|x64 + {89F34AF7-1C34-4A72-AA6E-534BCF972BD9}.Debug|Any CPU.ActiveCfg = Debug|x64 + {89F34AF7-1C34-4A72-AA6E-534BCF972BD9}.Debug|ARM.ActiveCfg = Debug|x64 + {89F34AF7-1C34-4A72-AA6E-534BCF972BD9}.Debug|ARM64.ActiveCfg = Debug|x64 {89F34AF7-1C34-4A72-AA6E-534BCF972BD9}.Debug|x64.ActiveCfg = Debug|x64 {89F34AF7-1C34-4A72-AA6E-534BCF972BD9}.Debug|x64.Build.0 = Debug|x64 + {89F34AF7-1C34-4A72-AA6E-534BCF972BD9}.Debug|x86.ActiveCfg = Debug|x64 + {89F34AF7-1C34-4A72-AA6E-534BCF972BD9}.Release|Any CPU.ActiveCfg = Release|x64 + {89F34AF7-1C34-4A72-AA6E-534BCF972BD9}.Release|ARM.ActiveCfg = Release|x64 + {89F34AF7-1C34-4A72-AA6E-534BCF972BD9}.Release|ARM64.ActiveCfg = Release|x64 {89F34AF7-1C34-4A72-AA6E-534BCF972BD9}.Release|x64.ActiveCfg = Release|x64 {89F34AF7-1C34-4A72-AA6E-534BCF972BD9}.Release|x64.Build.0 = Release|x64 + {89F34AF7-1C34-4A72-AA6E-534BCF972BD9}.Release|x86.ActiveCfg = Release|x64 + {2BE46397-4DFA-414C-9BD4-41E4BBF8CB34}.Debug|Any CPU.ActiveCfg = Debug|x64 + {2BE46397-4DFA-414C-9BD4-41E4BBF8CB34}.Debug|ARM.ActiveCfg = Debug|x64 + {2BE46397-4DFA-414C-9BD4-41E4BBF8CB34}.Debug|ARM64.ActiveCfg = Debug|x64 {2BE46397-4DFA-414C-9BD4-41E4BBF8CB34}.Debug|x64.ActiveCfg = Debug|x64 {2BE46397-4DFA-414C-9BD4-41E4BBF8CB34}.Debug|x64.Build.0 = Debug|x64 + {2BE46397-4DFA-414C-9BD4-41E4BBF8CB34}.Debug|x86.ActiveCfg = Debug|x64 + {2BE46397-4DFA-414C-9BD4-41E4BBF8CB34}.Release|Any CPU.ActiveCfg = Release|x64 + {2BE46397-4DFA-414C-9BD4-41E4BBF8CB34}.Release|ARM.ActiveCfg = Release|x64 + {2BE46397-4DFA-414C-9BD4-41E4BBF8CB34}.Release|ARM64.ActiveCfg = Release|x64 {2BE46397-4DFA-414C-9BD4-41E4BBF8CB34}.Release|x64.ActiveCfg = Release|x64 {2BE46397-4DFA-414C-9BD4-41E4BBF8CB34}.Release|x64.Build.0 = Release|x64 + {2BE46397-4DFA-414C-9BD4-41E4BBF8CB34}.Release|x86.ActiveCfg = Release|x64 + {0B43679E-EDFA-4DA0-AD30-F4628B308B1B}.Debug|Any CPU.ActiveCfg = Debug|x64 + {0B43679E-EDFA-4DA0-AD30-F4628B308B1B}.Debug|ARM.ActiveCfg = Debug|x64 + {0B43679E-EDFA-4DA0-AD30-F4628B308B1B}.Debug|ARM64.ActiveCfg = Debug|x64 {0B43679E-EDFA-4DA0-AD30-F4628B308B1B}.Debug|x64.ActiveCfg = Debug|x64 {0B43679E-EDFA-4DA0-AD30-F4628B308B1B}.Debug|x64.Build.0 = Debug|x64 + {0B43679E-EDFA-4DA0-AD30-F4628B308B1B}.Debug|x86.ActiveCfg = Debug|x64 + {0B43679E-EDFA-4DA0-AD30-F4628B308B1B}.Release|Any CPU.ActiveCfg = Release|x64 + {0B43679E-EDFA-4DA0-AD30-F4628B308B1B}.Release|ARM.ActiveCfg = Release|x64 + {0B43679E-EDFA-4DA0-AD30-F4628B308B1B}.Release|ARM64.ActiveCfg = Release|x64 {0B43679E-EDFA-4DA0-AD30-F4628B308B1B}.Release|x64.ActiveCfg = Release|x64 {0B43679E-EDFA-4DA0-AD30-F4628B308B1B}.Release|x64.Build.0 = Release|x64 + {0B43679E-EDFA-4DA0-AD30-F4628B308B1B}.Release|x86.ActiveCfg = Release|x64 + {E0CC7526-D85E-43AC-844F-D5DF0D2F5AB8}.Debug|Any CPU.ActiveCfg = Debug|x64 + {E0CC7526-D85E-43AC-844F-D5DF0D2F5AB8}.Debug|ARM.ActiveCfg = Debug|x64 + {E0CC7526-D85E-43AC-844F-D5DF0D2F5AB8}.Debug|ARM64.ActiveCfg = Debug|x64 {E0CC7526-D85E-43AC-844F-D5DF0D2F5AB8}.Debug|x64.ActiveCfg = Debug|x64 {E0CC7526-D85E-43AC-844F-D5DF0D2F5AB8}.Debug|x64.Build.0 = Debug|x64 + {E0CC7526-D85E-43AC-844F-D5DF0D2F5AB8}.Debug|x86.ActiveCfg = Debug|x64 + {E0CC7526-D85E-43AC-844F-D5DF0D2F5AB8}.Release|Any CPU.ActiveCfg = Release|x64 + {E0CC7526-D85E-43AC-844F-D5DF0D2F5AB8}.Release|ARM.ActiveCfg = Release|x64 + {E0CC7526-D85E-43AC-844F-D5DF0D2F5AB8}.Release|ARM64.ActiveCfg = Release|x64 {E0CC7526-D85E-43AC-844F-D5DF0D2F5AB8}.Release|x64.ActiveCfg = Release|x64 {E0CC7526-D85E-43AC-844F-D5DF0D2F5AB8}.Release|x64.Build.0 = Release|x64 + {E0CC7526-D85E-43AC-844F-D5DF0D2F5AB8}.Release|x86.ActiveCfg = Release|x64 + {EAF23649-EF6E-478B-980E-81FAD96CCA2A}.Debug|Any CPU.ActiveCfg = Debug|x64 + {EAF23649-EF6E-478B-980E-81FAD96CCA2A}.Debug|ARM.ActiveCfg = Debug|x64 + {EAF23649-EF6E-478B-980E-81FAD96CCA2A}.Debug|ARM64.ActiveCfg = Debug|x64 {EAF23649-EF6E-478B-980E-81FAD96CCA2A}.Debug|x64.ActiveCfg = Debug|x64 {EAF23649-EF6E-478B-980E-81FAD96CCA2A}.Debug|x64.Build.0 = Debug|x64 + {EAF23649-EF6E-478B-980E-81FAD96CCA2A}.Debug|x86.ActiveCfg = Debug|x64 + {EAF23649-EF6E-478B-980E-81FAD96CCA2A}.Release|Any CPU.ActiveCfg = Release|x64 + {EAF23649-EF6E-478B-980E-81FAD96CCA2A}.Release|ARM.ActiveCfg = Release|x64 + {EAF23649-EF6E-478B-980E-81FAD96CCA2A}.Release|ARM64.ActiveCfg = Release|x64 {EAF23649-EF6E-478B-980E-81FAD96CCA2A}.Release|x64.ActiveCfg = Release|x64 {EAF23649-EF6E-478B-980E-81FAD96CCA2A}.Release|x64.Build.0 = Release|x64 + {EAF23649-EF6E-478B-980E-81FAD96CCA2A}.Release|x86.ActiveCfg = Release|x64 + {D29DDD63-E2CF-4657-9FD5-2AEDE4257E5D}.Debug|Any CPU.ActiveCfg = Debug|x64 + {D29DDD63-E2CF-4657-9FD5-2AEDE4257E5D}.Debug|ARM.ActiveCfg = Debug|x64 + {D29DDD63-E2CF-4657-9FD5-2AEDE4257E5D}.Debug|ARM64.ActiveCfg = Debug|x64 {D29DDD63-E2CF-4657-9FD5-2AEDE4257E5D}.Debug|x64.ActiveCfg = Debug|x64 {D29DDD63-E2CF-4657-9FD5-2AEDE4257E5D}.Debug|x64.Build.0 = Debug|x64 + {D29DDD63-E2CF-4657-9FD5-2AEDE4257E5D}.Debug|x86.ActiveCfg = Debug|x64 + {D29DDD63-E2CF-4657-9FD5-2AEDE4257E5D}.Release|Any CPU.ActiveCfg = Release|x64 + {D29DDD63-E2CF-4657-9FD5-2AEDE4257E5D}.Release|ARM.ActiveCfg = Release|x64 + {D29DDD63-E2CF-4657-9FD5-2AEDE4257E5D}.Release|ARM64.ActiveCfg = Release|x64 {D29DDD63-E2CF-4657-9FD5-2AEDE4257E5D}.Release|x64.ActiveCfg = Release|x64 {D29DDD63-E2CF-4657-9FD5-2AEDE4257E5D}.Release|x64.Build.0 = Release|x64 + {D29DDD63-E2CF-4657-9FD5-2AEDE4257E5D}.Release|x86.ActiveCfg = Release|x64 + {17DA04DF-E393-4397-9CF0-84DABE11032E}.Debug|Any CPU.ActiveCfg = Debug|x64 + {17DA04DF-E393-4397-9CF0-84DABE11032E}.Debug|ARM.ActiveCfg = Debug|x64 + {17DA04DF-E393-4397-9CF0-84DABE11032E}.Debug|ARM64.ActiveCfg = Debug|x64 {17DA04DF-E393-4397-9CF0-84DABE11032E}.Debug|x64.ActiveCfg = Debug|x64 {17DA04DF-E393-4397-9CF0-84DABE11032E}.Debug|x64.Build.0 = Debug|x64 + {17DA04DF-E393-4397-9CF0-84DABE11032E}.Debug|x86.ActiveCfg = Debug|x64 + {17DA04DF-E393-4397-9CF0-84DABE11032E}.Release|Any CPU.ActiveCfg = Release|x64 + {17DA04DF-E393-4397-9CF0-84DABE11032E}.Release|ARM.ActiveCfg = Release|x64 + {17DA04DF-E393-4397-9CF0-84DABE11032E}.Release|ARM64.ActiveCfg = Release|x64 {17DA04DF-E393-4397-9CF0-84DABE11032E}.Release|x64.ActiveCfg = Release|x64 {17DA04DF-E393-4397-9CF0-84DABE11032E}.Release|x64.Build.0 = Release|x64 + {17DA04DF-E393-4397-9CF0-84DABE11032E}.Release|x86.ActiveCfg = Release|x64 + {8AFFA899-0B73-49EC-8C50-0FADDA57B2FC}.Debug|Any CPU.ActiveCfg = Debug|x64 + {8AFFA899-0B73-49EC-8C50-0FADDA57B2FC}.Debug|ARM.ActiveCfg = Debug|x64 + {8AFFA899-0B73-49EC-8C50-0FADDA57B2FC}.Debug|ARM64.ActiveCfg = Debug|x64 {8AFFA899-0B73-49EC-8C50-0FADDA57B2FC}.Debug|x64.ActiveCfg = Debug|x64 {8AFFA899-0B73-49EC-8C50-0FADDA57B2FC}.Debug|x64.Build.0 = Debug|x64 + {8AFFA899-0B73-49EC-8C50-0FADDA57B2FC}.Debug|x86.ActiveCfg = Debug|x64 + {8AFFA899-0B73-49EC-8C50-0FADDA57B2FC}.Release|Any CPU.ActiveCfg = Release|x64 + {8AFFA899-0B73-49EC-8C50-0FADDA57B2FC}.Release|ARM.ActiveCfg = Release|x64 + {8AFFA899-0B73-49EC-8C50-0FADDA57B2FC}.Release|ARM64.ActiveCfg = Release|x64 {8AFFA899-0B73-49EC-8C50-0FADDA57B2FC}.Release|x64.ActiveCfg = Release|x64 {8AFFA899-0B73-49EC-8C50-0FADDA57B2FC}.Release|x64.Build.0 = Release|x64 + {8AFFA899-0B73-49EC-8C50-0FADDA57B2FC}.Release|x86.ActiveCfg = Release|x64 + {4FD29318-A8AB-4D8F-AA47-60BC241B8DA3}.Debug|Any CPU.ActiveCfg = Debug|x64 + {4FD29318-A8AB-4D8F-AA47-60BC241B8DA3}.Debug|ARM.ActiveCfg = Debug|x64 + {4FD29318-A8AB-4D8F-AA47-60BC241B8DA3}.Debug|ARM64.ActiveCfg = Debug|x64 {4FD29318-A8AB-4D8F-AA47-60BC241B8DA3}.Debug|x64.ActiveCfg = Debug|x64 {4FD29318-A8AB-4D8F-AA47-60BC241B8DA3}.Debug|x64.Build.0 = Debug|x64 + {4FD29318-A8AB-4D8F-AA47-60BC241B8DA3}.Debug|x86.ActiveCfg = Debug|x64 + {4FD29318-A8AB-4D8F-AA47-60BC241B8DA3}.Release|Any CPU.ActiveCfg = Release|x64 + {4FD29318-A8AB-4D8F-AA47-60BC241B8DA3}.Release|ARM.ActiveCfg = Release|x64 + {4FD29318-A8AB-4D8F-AA47-60BC241B8DA3}.Release|ARM64.ActiveCfg = Release|x64 {4FD29318-A8AB-4D8F-AA47-60BC241B8DA3}.Release|x64.ActiveCfg = Release|x64 {4FD29318-A8AB-4D8F-AA47-60BC241B8DA3}.Release|x64.Build.0 = Release|x64 + {4FD29318-A8AB-4D8F-AA47-60BC241B8DA3}.Release|x86.ActiveCfg = Release|x64 + {8451ECDD-2EA4-4966-BB0A-7BBC40138E80}.Debug|Any CPU.ActiveCfg = Debug|x64 + {8451ECDD-2EA4-4966-BB0A-7BBC40138E80}.Debug|ARM.ActiveCfg = Debug|x64 + {8451ECDD-2EA4-4966-BB0A-7BBC40138E80}.Debug|ARM64.ActiveCfg = Debug|x64 {8451ECDD-2EA4-4966-BB0A-7BBC40138E80}.Debug|x64.ActiveCfg = Debug|x64 {8451ECDD-2EA4-4966-BB0A-7BBC40138E80}.Debug|x64.Build.0 = Debug|x64 + {8451ECDD-2EA4-4966-BB0A-7BBC40138E80}.Debug|x86.ActiveCfg = Debug|x64 + {8451ECDD-2EA4-4966-BB0A-7BBC40138E80}.Release|Any CPU.ActiveCfg = Release|x64 + {8451ECDD-2EA4-4966-BB0A-7BBC40138E80}.Release|ARM.ActiveCfg = Release|x64 + {8451ECDD-2EA4-4966-BB0A-7BBC40138E80}.Release|ARM64.ActiveCfg = Release|x64 {8451ECDD-2EA4-4966-BB0A-7BBC40138E80}.Release|x64.ActiveCfg = Release|x64 {8451ECDD-2EA4-4966-BB0A-7BBC40138E80}.Release|x64.Build.0 = Release|x64 + {8451ECDD-2EA4-4966-BB0A-7BBC40138E80}.Release|x86.ActiveCfg = Release|x64 + {FF742965-9A80-41A5-B042-D6C7D3A21708}.Debug|Any CPU.ActiveCfg = Debug|x64 + {FF742965-9A80-41A5-B042-D6C7D3A21708}.Debug|ARM.ActiveCfg = Debug|x64 + {FF742965-9A80-41A5-B042-D6C7D3A21708}.Debug|ARM64.ActiveCfg = Debug|x64 {FF742965-9A80-41A5-B042-D6C7D3A21708}.Debug|x64.ActiveCfg = Debug|x64 {FF742965-9A80-41A5-B042-D6C7D3A21708}.Debug|x64.Build.0 = Debug|x64 + {FF742965-9A80-41A5-B042-D6C7D3A21708}.Debug|x86.ActiveCfg = Debug|x64 + {FF742965-9A80-41A5-B042-D6C7D3A21708}.Release|Any CPU.ActiveCfg = Release|x64 + {FF742965-9A80-41A5-B042-D6C7D3A21708}.Release|ARM.ActiveCfg = Release|x64 + {FF742965-9A80-41A5-B042-D6C7D3A21708}.Release|ARM64.ActiveCfg = Release|x64 {FF742965-9A80-41A5-B042-D6C7D3A21708}.Release|x64.ActiveCfg = Release|x64 {FF742965-9A80-41A5-B042-D6C7D3A21708}.Release|x64.Build.0 = Release|x64 + {FF742965-9A80-41A5-B042-D6C7D3A21708}.Release|x86.ActiveCfg = Release|x64 + {59BD9891-3837-438A-958D-ADC7F91F6F7E}.Debug|Any CPU.ActiveCfg = Debug|x64 + {59BD9891-3837-438A-958D-ADC7F91F6F7E}.Debug|ARM.ActiveCfg = Debug|x64 + {59BD9891-3837-438A-958D-ADC7F91F6F7E}.Debug|ARM64.ActiveCfg = Debug|x64 {59BD9891-3837-438A-958D-ADC7F91F6F7E}.Debug|x64.ActiveCfg = Debug|x64 {59BD9891-3837-438A-958D-ADC7F91F6F7E}.Debug|x64.Build.0 = Debug|x64 + {59BD9891-3837-438A-958D-ADC7F91F6F7E}.Debug|x86.ActiveCfg = Debug|x64 + {59BD9891-3837-438A-958D-ADC7F91F6F7E}.Release|Any CPU.ActiveCfg = Release|x64 + {59BD9891-3837-438A-958D-ADC7F91F6F7E}.Release|ARM.ActiveCfg = Release|x64 + {59BD9891-3837-438A-958D-ADC7F91F6F7E}.Release|ARM64.ActiveCfg = Release|x64 {59BD9891-3837-438A-958D-ADC7F91F6F7E}.Release|x64.ActiveCfg = Release|x64 {59BD9891-3837-438A-958D-ADC7F91F6F7E}.Release|x64.Build.0 = Release|x64 + {59BD9891-3837-438A-958D-ADC7F91F6F7E}.Release|x86.ActiveCfg = Release|x64 + {4D971245-7A70-41D5-BAA0-DDB5684CAF51}.Debug|Any CPU.ActiveCfg = Debug|x64 + {4D971245-7A70-41D5-BAA0-DDB5684CAF51}.Debug|ARM.ActiveCfg = Debug|x64 + {4D971245-7A70-41D5-BAA0-DDB5684CAF51}.Debug|ARM64.ActiveCfg = Debug|x64 {4D971245-7A70-41D5-BAA0-DDB5684CAF51}.Debug|x64.ActiveCfg = Debug|x64 {4D971245-7A70-41D5-BAA0-DDB5684CAF51}.Debug|x64.Build.0 = Debug|x64 + {4D971245-7A70-41D5-BAA0-DDB5684CAF51}.Debug|x86.ActiveCfg = Debug|x64 + {4D971245-7A70-41D5-BAA0-DDB5684CAF51}.Release|Any CPU.ActiveCfg = Release|x64 + {4D971245-7A70-41D5-BAA0-DDB5684CAF51}.Release|ARM.ActiveCfg = Release|x64 + {4D971245-7A70-41D5-BAA0-DDB5684CAF51}.Release|ARM64.ActiveCfg = Release|x64 {4D971245-7A70-41D5-BAA0-DDB5684CAF51}.Release|x64.ActiveCfg = Release|x64 {4D971245-7A70-41D5-BAA0-DDB5684CAF51}.Release|x64.Build.0 = Release|x64 + {4D971245-7A70-41D5-BAA0-DDB5684CAF51}.Release|x86.ActiveCfg = Release|x64 + {74F1B9ED-F59C-4FE7-B473-7B453E30837E}.Debug|Any CPU.ActiveCfg = Debug|x64 + {74F1B9ED-F59C-4FE7-B473-7B453E30837E}.Debug|ARM.ActiveCfg = Debug|x64 + {74F1B9ED-F59C-4FE7-B473-7B453E30837E}.Debug|ARM64.ActiveCfg = Debug|x64 {74F1B9ED-F59C-4FE7-B473-7B453E30837E}.Debug|x64.ActiveCfg = Debug|x64 {74F1B9ED-F59C-4FE7-B473-7B453E30837E}.Debug|x64.Build.0 = Debug|x64 + {74F1B9ED-F59C-4FE7-B473-7B453E30837E}.Debug|x86.ActiveCfg = Debug|x64 + {74F1B9ED-F59C-4FE7-B473-7B453E30837E}.Release|Any CPU.ActiveCfg = Release|x64 + {74F1B9ED-F59C-4FE7-B473-7B453E30837E}.Release|ARM.ActiveCfg = Release|x64 + {74F1B9ED-F59C-4FE7-B473-7B453E30837E}.Release|ARM64.ActiveCfg = Release|x64 {74F1B9ED-F59C-4FE7-B473-7B453E30837E}.Release|x64.ActiveCfg = Release|x64 {74F1B9ED-F59C-4FE7-B473-7B453E30837E}.Release|x64.Build.0 = Release|x64 + {74F1B9ED-F59C-4FE7-B473-7B453E30837E}.Release|x86.ActiveCfg = Release|x64 + {FDB3555B-58EF-4AE6-B5F1-904719637AB4}.Debug|Any CPU.ActiveCfg = Debug|x64 + {FDB3555B-58EF-4AE6-B5F1-904719637AB4}.Debug|ARM.ActiveCfg = Debug|x64 + {FDB3555B-58EF-4AE6-B5F1-904719637AB4}.Debug|ARM64.ActiveCfg = Debug|x64 {FDB3555B-58EF-4AE6-B5F1-904719637AB4}.Debug|x64.ActiveCfg = Debug|x64 {FDB3555B-58EF-4AE6-B5F1-904719637AB4}.Debug|x64.Build.0 = Debug|x64 + {FDB3555B-58EF-4AE6-B5F1-904719637AB4}.Debug|x86.ActiveCfg = Debug|x64 + {FDB3555B-58EF-4AE6-B5F1-904719637AB4}.Release|Any CPU.ActiveCfg = Release|x64 + {FDB3555B-58EF-4AE6-B5F1-904719637AB4}.Release|ARM.ActiveCfg = Release|x64 + {FDB3555B-58EF-4AE6-B5F1-904719637AB4}.Release|ARM64.ActiveCfg = Release|x64 {FDB3555B-58EF-4AE6-B5F1-904719637AB4}.Release|x64.ActiveCfg = Release|x64 {FDB3555B-58EF-4AE6-B5F1-904719637AB4}.Release|x64.Build.0 = Release|x64 + {FDB3555B-58EF-4AE6-B5F1-904719637AB4}.Release|x86.ActiveCfg = Release|x64 + {C21BFF9C-2C99-4B5F-B7C9-A5E6DDDB37B0}.Debug|Any CPU.ActiveCfg = Debug|x64 + {C21BFF9C-2C99-4B5F-B7C9-A5E6DDDB37B0}.Debug|ARM.ActiveCfg = Debug|x64 + {C21BFF9C-2C99-4B5F-B7C9-A5E6DDDB37B0}.Debug|ARM64.ActiveCfg = Debug|x64 {C21BFF9C-2C99-4B5F-B7C9-A5E6DDDB37B0}.Debug|x64.ActiveCfg = Debug|x64 {C21BFF9C-2C99-4B5F-B7C9-A5E6DDDB37B0}.Debug|x64.Build.0 = Debug|x64 + {C21BFF9C-2C99-4B5F-B7C9-A5E6DDDB37B0}.Debug|x86.ActiveCfg = Debug|x64 + {C21BFF9C-2C99-4B5F-B7C9-A5E6DDDB37B0}.Release|Any CPU.ActiveCfg = Release|x64 + {C21BFF9C-2C99-4B5F-B7C9-A5E6DDDB37B0}.Release|ARM.ActiveCfg = Release|x64 + {C21BFF9C-2C99-4B5F-B7C9-A5E6DDDB37B0}.Release|ARM64.ActiveCfg = Release|x64 {C21BFF9C-2C99-4B5F-B7C9-A5E6DDDB37B0}.Release|x64.ActiveCfg = Release|x64 {C21BFF9C-2C99-4B5F-B7C9-A5E6DDDB37B0}.Release|x64.Build.0 = Release|x64 + {C21BFF9C-2C99-4B5F-B7C9-A5E6DDDB37B0}.Release|x86.ActiveCfg = Release|x64 + {F8B870EB-D5F5-45BA-9CF7-A5C459818820}.Debug|Any CPU.ActiveCfg = Debug|x64 + {F8B870EB-D5F5-45BA-9CF7-A5C459818820}.Debug|ARM.ActiveCfg = Debug|x64 + {F8B870EB-D5F5-45BA-9CF7-A5C459818820}.Debug|ARM64.ActiveCfg = Debug|x64 {F8B870EB-D5F5-45BA-9CF7-A5C459818820}.Debug|x64.ActiveCfg = Debug|x64 {F8B870EB-D5F5-45BA-9CF7-A5C459818820}.Debug|x64.Build.0 = Debug|x64 + {F8B870EB-D5F5-45BA-9CF7-A5C459818820}.Debug|x86.ActiveCfg = Debug|x64 + {F8B870EB-D5F5-45BA-9CF7-A5C459818820}.Release|Any CPU.ActiveCfg = Release|x64 + {F8B870EB-D5F5-45BA-9CF7-A5C459818820}.Release|ARM.ActiveCfg = Release|x64 + {F8B870EB-D5F5-45BA-9CF7-A5C459818820}.Release|ARM64.ActiveCfg = Release|x64 {F8B870EB-D5F5-45BA-9CF7-A5C459818820}.Release|x64.ActiveCfg = Release|x64 {F8B870EB-D5F5-45BA-9CF7-A5C459818820}.Release|x64.Build.0 = Release|x64 + {F8B870EB-D5F5-45BA-9CF7-A5C459818820}.Release|x86.ActiveCfg = Release|x64 + {E364F67B-BB12-4E91-B639-355866EBCD8B}.Debug|Any CPU.ActiveCfg = Debug|x64 + {E364F67B-BB12-4E91-B639-355866EBCD8B}.Debug|ARM.ActiveCfg = Debug|x64 + {E364F67B-BB12-4E91-B639-355866EBCD8B}.Debug|ARM64.ActiveCfg = Debug|x64 {E364F67B-BB12-4E91-B639-355866EBCD8B}.Debug|x64.ActiveCfg = Debug|x64 {E364F67B-BB12-4E91-B639-355866EBCD8B}.Debug|x64.Build.0 = Debug|x64 + {E364F67B-BB12-4E91-B639-355866EBCD8B}.Debug|x86.ActiveCfg = Debug|x64 + {E364F67B-BB12-4E91-B639-355866EBCD8B}.Release|Any CPU.ActiveCfg = Release|x64 + {E364F67B-BB12-4E91-B639-355866EBCD8B}.Release|ARM.ActiveCfg = Release|x64 + {E364F67B-BB12-4E91-B639-355866EBCD8B}.Release|ARM64.ActiveCfg = Release|x64 {E364F67B-BB12-4E91-B639-355866EBCD8B}.Release|x64.ActiveCfg = Release|x64 {E364F67B-BB12-4E91-B639-355866EBCD8B}.Release|x64.Build.0 = Release|x64 + {E364F67B-BB12-4E91-B639-355866EBCD8B}.Release|x86.ActiveCfg = Release|x64 + {F97E5003-F263-4D4A-A964-0F1F3C82DEF2}.Debug|Any CPU.ActiveCfg = Debug|x64 + {F97E5003-F263-4D4A-A964-0F1F3C82DEF2}.Debug|ARM.ActiveCfg = Debug|x64 + {F97E5003-F263-4D4A-A964-0F1F3C82DEF2}.Debug|ARM64.ActiveCfg = Debug|x64 {F97E5003-F263-4D4A-A964-0F1F3C82DEF2}.Debug|x64.ActiveCfg = Debug|x64 {F97E5003-F263-4D4A-A964-0F1F3C82DEF2}.Debug|x64.Build.0 = Debug|x64 + {F97E5003-F263-4D4A-A964-0F1F3C82DEF2}.Debug|x86.ActiveCfg = Debug|x64 + {F97E5003-F263-4D4A-A964-0F1F3C82DEF2}.Release|Any CPU.ActiveCfg = Release|x64 + {F97E5003-F263-4D4A-A964-0F1F3C82DEF2}.Release|ARM.ActiveCfg = Release|x64 + {F97E5003-F263-4D4A-A964-0F1F3C82DEF2}.Release|ARM64.ActiveCfg = Release|x64 {F97E5003-F263-4D4A-A964-0F1F3C82DEF2}.Release|x64.ActiveCfg = Release|x64 {F97E5003-F263-4D4A-A964-0F1F3C82DEF2}.Release|x64.Build.0 = Release|x64 + {F97E5003-F263-4D4A-A964-0F1F3C82DEF2}.Release|x86.ActiveCfg = Release|x64 + {AF2349B8-E5B6-4004-9502-687C1C7730B1}.Debug|Any CPU.ActiveCfg = Debug|x64 + {AF2349B8-E5B6-4004-9502-687C1C7730B1}.Debug|ARM.ActiveCfg = Debug|x64 + {AF2349B8-E5B6-4004-9502-687C1C7730B1}.Debug|ARM64.ActiveCfg = Debug|x64 {AF2349B8-E5B6-4004-9502-687C1C7730B1}.Debug|x64.ActiveCfg = Debug|x64 {AF2349B8-E5B6-4004-9502-687C1C7730B1}.Debug|x64.Build.0 = Debug|x64 + {AF2349B8-E5B6-4004-9502-687C1C7730B1}.Debug|x86.ActiveCfg = Debug|x64 + {AF2349B8-E5B6-4004-9502-687C1C7730B1}.Release|Any CPU.ActiveCfg = Release|x64 + {AF2349B8-E5B6-4004-9502-687C1C7730B1}.Release|ARM.ActiveCfg = Release|x64 + {AF2349B8-E5B6-4004-9502-687C1C7730B1}.Release|ARM64.ActiveCfg = Release|x64 {AF2349B8-E5B6-4004-9502-687C1C7730B1}.Release|x64.ActiveCfg = Release|x64 {AF2349B8-E5B6-4004-9502-687C1C7730B1}.Release|x64.Build.0 = Release|x64 + {AF2349B8-E5B6-4004-9502-687C1C7730B1}.Release|x86.ActiveCfg = Release|x64 + {6A71162E-FC4C-4A2C-B90F-3CF94F59A9BB}.Debug|Any CPU.ActiveCfg = Debug|x64 + {6A71162E-FC4C-4A2C-B90F-3CF94F59A9BB}.Debug|ARM.ActiveCfg = Debug|x64 + {6A71162E-FC4C-4A2C-B90F-3CF94F59A9BB}.Debug|ARM64.ActiveCfg = Debug|x64 {6A71162E-FC4C-4A2C-B90F-3CF94F59A9BB}.Debug|x64.ActiveCfg = Debug|x64 {6A71162E-FC4C-4A2C-B90F-3CF94F59A9BB}.Debug|x64.Build.0 = Debug|x64 + {6A71162E-FC4C-4A2C-B90F-3CF94F59A9BB}.Debug|x86.ActiveCfg = Debug|x64 + {6A71162E-FC4C-4A2C-B90F-3CF94F59A9BB}.Release|Any CPU.ActiveCfg = Release|x64 + {6A71162E-FC4C-4A2C-B90F-3CF94F59A9BB}.Release|ARM.ActiveCfg = Release|x64 + {6A71162E-FC4C-4A2C-B90F-3CF94F59A9BB}.Release|ARM64.ActiveCfg = Release|x64 {6A71162E-FC4C-4A2C-B90F-3CF94F59A9BB}.Release|x64.ActiveCfg = Release|x64 {6A71162E-FC4C-4A2C-B90F-3CF94F59A9BB}.Release|x64.Build.0 = Release|x64 + {6A71162E-FC4C-4A2C-B90F-3CF94F59A9BB}.Release|x86.ActiveCfg = Release|x64 + {A2B51B8B-8F90-424E-BC97-F9AB7D76CA1A}.Debug|Any CPU.ActiveCfg = Debug|x64 + {A2B51B8B-8F90-424E-BC97-F9AB7D76CA1A}.Debug|ARM.ActiveCfg = Debug|x64 + {A2B51B8B-8F90-424E-BC97-F9AB7D76CA1A}.Debug|ARM64.ActiveCfg = Debug|x64 {A2B51B8B-8F90-424E-BC97-F9AB7D76CA1A}.Debug|x64.ActiveCfg = Debug|x64 {A2B51B8B-8F90-424E-BC97-F9AB7D76CA1A}.Debug|x64.Build.0 = Debug|x64 + {A2B51B8B-8F90-424E-BC97-F9AB7D76CA1A}.Debug|x86.ActiveCfg = Debug|x64 + {A2B51B8B-8F90-424E-BC97-F9AB7D76CA1A}.Release|Any CPU.ActiveCfg = Release|x64 + {A2B51B8B-8F90-424E-BC97-F9AB7D76CA1A}.Release|ARM.ActiveCfg = Release|x64 + {A2B51B8B-8F90-424E-BC97-F9AB7D76CA1A}.Release|ARM64.ActiveCfg = Release|x64 {A2B51B8B-8F90-424E-BC97-F9AB7D76CA1A}.Release|x64.ActiveCfg = Release|x64 {A2B51B8B-8F90-424E-BC97-F9AB7D76CA1A}.Release|x64.Build.0 = Release|x64 + {A2B51B8B-8F90-424E-BC97-F9AB7D76CA1A}.Release|x86.ActiveCfg = Release|x64 + {DA425894-6E13-404F-8DCB-78584EC0557A}.Debug|Any CPU.ActiveCfg = Debug|x64 + {DA425894-6E13-404F-8DCB-78584EC0557A}.Debug|ARM.ActiveCfg = Debug|x64 + {DA425894-6E13-404F-8DCB-78584EC0557A}.Debug|ARM64.ActiveCfg = Debug|x64 {DA425894-6E13-404F-8DCB-78584EC0557A}.Debug|x64.ActiveCfg = Debug|x64 {DA425894-6E13-404F-8DCB-78584EC0557A}.Debug|x64.Build.0 = Debug|x64 + {DA425894-6E13-404F-8DCB-78584EC0557A}.Debug|x86.ActiveCfg = Debug|x64 + {DA425894-6E13-404F-8DCB-78584EC0557A}.Release|Any CPU.ActiveCfg = Release|x64 + {DA425894-6E13-404F-8DCB-78584EC0557A}.Release|ARM.ActiveCfg = Release|x64 + {DA425894-6E13-404F-8DCB-78584EC0557A}.Release|ARM64.ActiveCfg = Release|x64 {DA425894-6E13-404F-8DCB-78584EC0557A}.Release|x64.ActiveCfg = Release|x64 {DA425894-6E13-404F-8DCB-78584EC0557A}.Release|x64.Build.0 = Release|x64 + {DA425894-6E13-404F-8DCB-78584EC0557A}.Release|x86.ActiveCfg = Release|x64 + {060D75DA-2D1C-48E6-A4A1-6F0718B64661}.Debug|Any CPU.ActiveCfg = Debug|x64 + {060D75DA-2D1C-48E6-A4A1-6F0718B64661}.Debug|ARM.ActiveCfg = Debug|x64 + {060D75DA-2D1C-48E6-A4A1-6F0718B64661}.Debug|ARM64.ActiveCfg = Debug|x64 {060D75DA-2D1C-48E6-A4A1-6F0718B64661}.Debug|x64.ActiveCfg = Debug|x64 {060D75DA-2D1C-48E6-A4A1-6F0718B64661}.Debug|x64.Build.0 = Debug|x64 + {060D75DA-2D1C-48E6-A4A1-6F0718B64661}.Debug|x86.ActiveCfg = Debug|x64 + {060D75DA-2D1C-48E6-A4A1-6F0718B64661}.Release|Any CPU.ActiveCfg = Release|x64 + {060D75DA-2D1C-48E6-A4A1-6F0718B64661}.Release|ARM.ActiveCfg = Release|x64 + {060D75DA-2D1C-48E6-A4A1-6F0718B64661}.Release|ARM64.ActiveCfg = Release|x64 {060D75DA-2D1C-48E6-A4A1-6F0718B64661}.Release|x64.ActiveCfg = Release|x64 {060D75DA-2D1C-48E6-A4A1-6F0718B64661}.Release|x64.Build.0 = Release|x64 + {060D75DA-2D1C-48E6-A4A1-6F0718B64661}.Release|x86.ActiveCfg = Release|x64 + {748417CA-F17E-487F-9411-CAFB6D3F4877}.Debug|Any CPU.ActiveCfg = Debug|x64 + {748417CA-F17E-487F-9411-CAFB6D3F4877}.Debug|ARM.ActiveCfg = Debug|x64 + {748417CA-F17E-487F-9411-CAFB6D3F4877}.Debug|ARM64.ActiveCfg = Debug|x64 {748417CA-F17E-487F-9411-CAFB6D3F4877}.Debug|x64.ActiveCfg = Debug|x64 {748417CA-F17E-487F-9411-CAFB6D3F4877}.Debug|x64.Build.0 = Debug|x64 + {748417CA-F17E-487F-9411-CAFB6D3F4877}.Debug|x86.ActiveCfg = Debug|x64 + {748417CA-F17E-487F-9411-CAFB6D3F4877}.Release|Any CPU.ActiveCfg = Release|x64 + {748417CA-F17E-487F-9411-CAFB6D3F4877}.Release|ARM.ActiveCfg = Release|x64 + {748417CA-F17E-487F-9411-CAFB6D3F4877}.Release|ARM64.ActiveCfg = Release|x64 {748417CA-F17E-487F-9411-CAFB6D3F4877}.Release|x64.ActiveCfg = Release|x64 {748417CA-F17E-487F-9411-CAFB6D3F4877}.Release|x64.Build.0 = Release|x64 + {748417CA-F17E-487F-9411-CAFB6D3F4877}.Release|x86.ActiveCfg = Release|x64 + {217DF501-135C-4E38-BFC8-99D4821032EA}.Debug|Any CPU.ActiveCfg = Debug|x64 + {217DF501-135C-4E38-BFC8-99D4821032EA}.Debug|ARM.ActiveCfg = Debug|x64 + {217DF501-135C-4E38-BFC8-99D4821032EA}.Debug|ARM64.ActiveCfg = Debug|x64 {217DF501-135C-4E38-BFC8-99D4821032EA}.Debug|x64.ActiveCfg = Debug|x64 {217DF501-135C-4E38-BFC8-99D4821032EA}.Debug|x64.Build.0 = Debug|x64 + {217DF501-135C-4E38-BFC8-99D4821032EA}.Debug|x86.ActiveCfg = Debug|x64 + {217DF501-135C-4E38-BFC8-99D4821032EA}.Release|Any CPU.ActiveCfg = Release|x64 + {217DF501-135C-4E38-BFC8-99D4821032EA}.Release|ARM.ActiveCfg = Release|x64 + {217DF501-135C-4E38-BFC8-99D4821032EA}.Release|ARM64.ActiveCfg = Release|x64 {217DF501-135C-4E38-BFC8-99D4821032EA}.Release|x64.ActiveCfg = Release|x64 {217DF501-135C-4E38-BFC8-99D4821032EA}.Release|x64.Build.0 = Release|x64 + {217DF501-135C-4E38-BFC8-99D4821032EA}.Release|x86.ActiveCfg = Release|x64 + {47310AB4-9034-4BD1-8D8B-E88AD21A171B}.Debug|Any CPU.ActiveCfg = Debug|x64 + {47310AB4-9034-4BD1-8D8B-E88AD21A171B}.Debug|ARM.ActiveCfg = Debug|x64 + {47310AB4-9034-4BD1-8D8B-E88AD21A171B}.Debug|ARM64.ActiveCfg = Debug|x64 {47310AB4-9034-4BD1-8D8B-E88AD21A171B}.Debug|x64.ActiveCfg = Debug|x64 {47310AB4-9034-4BD1-8D8B-E88AD21A171B}.Debug|x64.Build.0 = Debug|x64 + {47310AB4-9034-4BD1-8D8B-E88AD21A171B}.Debug|x86.ActiveCfg = Debug|x64 + {47310AB4-9034-4BD1-8D8B-E88AD21A171B}.Release|Any CPU.ActiveCfg = Release|x64 + {47310AB4-9034-4BD1-8D8B-E88AD21A171B}.Release|ARM.ActiveCfg = Release|x64 + {47310AB4-9034-4BD1-8D8B-E88AD21A171B}.Release|ARM64.ActiveCfg = Release|x64 {47310AB4-9034-4BD1-8D8B-E88AD21A171B}.Release|x64.ActiveCfg = Release|x64 {47310AB4-9034-4BD1-8D8B-E88AD21A171B}.Release|x64.Build.0 = Release|x64 + {47310AB4-9034-4BD1-8D8B-E88AD21A171B}.Release|x86.ActiveCfg = Release|x64 + {A7D5099E-F0FD-4BF3-8522-5A682759F915}.Debug|Any CPU.ActiveCfg = Debug|Win32 + {A7D5099E-F0FD-4BF3-8522-5A682759F915}.Debug|ARM.ActiveCfg = Debug|Win32 + {A7D5099E-F0FD-4BF3-8522-5A682759F915}.Debug|ARM64.ActiveCfg = Debug|Win32 {A7D5099E-F0FD-4BF3-8522-5A682759F915}.Debug|x64.ActiveCfg = Debug|x64 {A7D5099E-F0FD-4BF3-8522-5A682759F915}.Debug|x64.Build.0 = Debug|x64 + {A7D5099E-F0FD-4BF3-8522-5A682759F915}.Debug|x86.ActiveCfg = Debug|Win32 + {A7D5099E-F0FD-4BF3-8522-5A682759F915}.Debug|x86.Build.0 = Debug|Win32 + {A7D5099E-F0FD-4BF3-8522-5A682759F915}.Debug|x86.Deploy.0 = Debug|Win32 + {A7D5099E-F0FD-4BF3-8522-5A682759F915}.Release|Any CPU.ActiveCfg = Release|Win32 + {A7D5099E-F0FD-4BF3-8522-5A682759F915}.Release|ARM.ActiveCfg = Release|Win32 + {A7D5099E-F0FD-4BF3-8522-5A682759F915}.Release|ARM64.ActiveCfg = Release|Win32 {A7D5099E-F0FD-4BF3-8522-5A682759F915}.Release|x64.ActiveCfg = Release|x64 {A7D5099E-F0FD-4BF3-8522-5A682759F915}.Release|x64.Build.0 = Release|x64 + {A7D5099E-F0FD-4BF3-8522-5A682759F915}.Release|x86.ActiveCfg = Release|Win32 + {A7D5099E-F0FD-4BF3-8522-5A682759F915}.Release|x86.Build.0 = Release|Win32 + {A7D5099E-F0FD-4BF3-8522-5A682759F915}.Release|x86.Deploy.0 = Release|Win32 + {B1BCC8C6-46B5-4BFA-8F22-20F32D99EC6A}.Debug|Any CPU.ActiveCfg = Debug|x64 + {B1BCC8C6-46B5-4BFA-8F22-20F32D99EC6A}.Debug|ARM.ActiveCfg = Debug|x64 + {B1BCC8C6-46B5-4BFA-8F22-20F32D99EC6A}.Debug|ARM64.ActiveCfg = Debug|x64 {B1BCC8C6-46B5-4BFA-8F22-20F32D99EC6A}.Debug|x64.ActiveCfg = Debug|x64 {B1BCC8C6-46B5-4BFA-8F22-20F32D99EC6A}.Debug|x64.Build.0 = Debug|x64 + {B1BCC8C6-46B5-4BFA-8F22-20F32D99EC6A}.Debug|x86.ActiveCfg = Debug|x64 + {B1BCC8C6-46B5-4BFA-8F22-20F32D99EC6A}.Release|Any CPU.ActiveCfg = Release|x64 + {B1BCC8C6-46B5-4BFA-8F22-20F32D99EC6A}.Release|ARM.ActiveCfg = Release|x64 + {B1BCC8C6-46B5-4BFA-8F22-20F32D99EC6A}.Release|ARM64.ActiveCfg = Release|x64 {B1BCC8C6-46B5-4BFA-8F22-20F32D99EC6A}.Release|x64.ActiveCfg = Release|x64 {B1BCC8C6-46B5-4BFA-8F22-20F32D99EC6A}.Release|x64.Build.0 = Release|x64 + {B1BCC8C6-46B5-4BFA-8F22-20F32D99EC6A}.Release|x86.ActiveCfg = Release|x64 + {F055103B-F80B-4D0C-BF48-057C55620033}.Debug|Any CPU.ActiveCfg = Debug|x64 + {F055103B-F80B-4D0C-BF48-057C55620033}.Debug|ARM.ActiveCfg = Debug|x64 + {F055103B-F80B-4D0C-BF48-057C55620033}.Debug|ARM64.ActiveCfg = Debug|x64 {F055103B-F80B-4D0C-BF48-057C55620033}.Debug|x64.ActiveCfg = Debug|x64 {F055103B-F80B-4D0C-BF48-057C55620033}.Debug|x64.Build.0 = Debug|x64 + {F055103B-F80B-4D0C-BF48-057C55620033}.Debug|x86.ActiveCfg = Debug|x64 + {F055103B-F80B-4D0C-BF48-057C55620033}.Release|Any CPU.ActiveCfg = Release|x64 + {F055103B-F80B-4D0C-BF48-057C55620033}.Release|ARM.ActiveCfg = Release|x64 + {F055103B-F80B-4D0C-BF48-057C55620033}.Release|ARM64.ActiveCfg = Release|x64 {F055103B-F80B-4D0C-BF48-057C55620033}.Release|x64.ActiveCfg = Release|x64 {F055103B-F80B-4D0C-BF48-057C55620033}.Release|x64.Build.0 = Release|x64 + {F055103B-F80B-4D0C-BF48-057C55620033}.Release|x86.ActiveCfg = Release|x64 + {787B8AA6-CA93-4C84-96FE-DF31110AD1C4}.Debug|Any CPU.ActiveCfg = Debug|x64 + {787B8AA6-CA93-4C84-96FE-DF31110AD1C4}.Debug|ARM.ActiveCfg = Debug|x64 + {787B8AA6-CA93-4C84-96FE-DF31110AD1C4}.Debug|ARM64.ActiveCfg = Debug|x64 {787B8AA6-CA93-4C84-96FE-DF31110AD1C4}.Debug|x64.ActiveCfg = Debug|x64 {787B8AA6-CA93-4C84-96FE-DF31110AD1C4}.Debug|x64.Build.0 = Debug|x64 + {787B8AA6-CA93-4C84-96FE-DF31110AD1C4}.Debug|x86.ActiveCfg = Debug|x64 + {787B8AA6-CA93-4C84-96FE-DF31110AD1C4}.Release|Any CPU.ActiveCfg = Release|x64 + {787B8AA6-CA93-4C84-96FE-DF31110AD1C4}.Release|ARM.ActiveCfg = Release|x64 + {787B8AA6-CA93-4C84-96FE-DF31110AD1C4}.Release|ARM64.ActiveCfg = Release|x64 {787B8AA6-CA93-4C84-96FE-DF31110AD1C4}.Release|x64.ActiveCfg = Release|x64 {787B8AA6-CA93-4C84-96FE-DF31110AD1C4}.Release|x64.Build.0 = Release|x64 + {787B8AA6-CA93-4C84-96FE-DF31110AD1C4}.Release|x86.ActiveCfg = Release|x64 + {08C8C05F-0362-41BC-818C-724572DF8B06}.Debug|Any CPU.ActiveCfg = Debug|x64 + {08C8C05F-0362-41BC-818C-724572DF8B06}.Debug|ARM.ActiveCfg = Debug|x64 + {08C8C05F-0362-41BC-818C-724572DF8B06}.Debug|ARM64.ActiveCfg = Debug|x64 {08C8C05F-0362-41BC-818C-724572DF8B06}.Debug|x64.ActiveCfg = Debug|x64 {08C8C05F-0362-41BC-818C-724572DF8B06}.Debug|x64.Build.0 = Debug|x64 + {08C8C05F-0362-41BC-818C-724572DF8B06}.Debug|x86.ActiveCfg = Debug|x64 + {08C8C05F-0362-41BC-818C-724572DF8B06}.Release|Any CPU.ActiveCfg = Release|x64 + {08C8C05F-0362-41BC-818C-724572DF8B06}.Release|ARM.ActiveCfg = Release|x64 + {08C8C05F-0362-41BC-818C-724572DF8B06}.Release|ARM64.ActiveCfg = Release|x64 {08C8C05F-0362-41BC-818C-724572DF8B06}.Release|x64.ActiveCfg = Release|x64 {08C8C05F-0362-41BC-818C-724572DF8B06}.Release|x64.Build.0 = Release|x64 + {08C8C05F-0362-41BC-818C-724572DF8B06}.Release|x86.ActiveCfg = Release|x64 + {5D00D290-4016-4CFE-9E41-1E7C724509BA}.Debug|Any CPU.ActiveCfg = Debug|x64 + {5D00D290-4016-4CFE-9E41-1E7C724509BA}.Debug|ARM.ActiveCfg = Debug|x64 + {5D00D290-4016-4CFE-9E41-1E7C724509BA}.Debug|ARM64.ActiveCfg = Debug|x64 {5D00D290-4016-4CFE-9E41-1E7C724509BA}.Debug|x64.ActiveCfg = Debug|x64 {5D00D290-4016-4CFE-9E41-1E7C724509BA}.Debug|x64.Build.0 = Debug|x64 + {5D00D290-4016-4CFE-9E41-1E7C724509BA}.Debug|x86.ActiveCfg = Debug|x64 + {5D00D290-4016-4CFE-9E41-1E7C724509BA}.Release|Any CPU.ActiveCfg = Release|x64 + {5D00D290-4016-4CFE-9E41-1E7C724509BA}.Release|ARM.ActiveCfg = Release|x64 + {5D00D290-4016-4CFE-9E41-1E7C724509BA}.Release|ARM64.ActiveCfg = Release|x64 {5D00D290-4016-4CFE-9E41-1E7C724509BA}.Release|x64.ActiveCfg = Release|x64 {5D00D290-4016-4CFE-9E41-1E7C724509BA}.Release|x64.Build.0 = Release|x64 + {5D00D290-4016-4CFE-9E41-1E7C724509BA}.Release|x86.ActiveCfg = Release|x64 + {62173D9A-6724-4C00-A1C8-FB646480A9EC}.Debug|Any CPU.ActiveCfg = Debug|x64 + {62173D9A-6724-4C00-A1C8-FB646480A9EC}.Debug|ARM.ActiveCfg = Debug|x64 + {62173D9A-6724-4C00-A1C8-FB646480A9EC}.Debug|ARM64.ActiveCfg = Debug|x64 {62173D9A-6724-4C00-A1C8-FB646480A9EC}.Debug|x64.ActiveCfg = Debug|x64 {62173D9A-6724-4C00-A1C8-FB646480A9EC}.Debug|x64.Build.0 = Debug|x64 + {62173D9A-6724-4C00-A1C8-FB646480A9EC}.Debug|x86.ActiveCfg = Debug|x64 + {62173D9A-6724-4C00-A1C8-FB646480A9EC}.Release|Any CPU.ActiveCfg = Release|x64 + {62173D9A-6724-4C00-A1C8-FB646480A9EC}.Release|ARM.ActiveCfg = Release|x64 + {62173D9A-6724-4C00-A1C8-FB646480A9EC}.Release|ARM64.ActiveCfg = Release|x64 {62173D9A-6724-4C00-A1C8-FB646480A9EC}.Release|x64.ActiveCfg = Release|x64 {62173D9A-6724-4C00-A1C8-FB646480A9EC}.Release|x64.Build.0 = Release|x64 + {62173D9A-6724-4C00-A1C8-FB646480A9EC}.Release|x86.ActiveCfg = Release|x64 + {4AED67B6-55FD-486F-B917-E543DEE2CB3C}.Debug|Any CPU.ActiveCfg = Debug|x64 + {4AED67B6-55FD-486F-B917-E543DEE2CB3C}.Debug|ARM.ActiveCfg = Debug|x64 + {4AED67B6-55FD-486F-B917-E543DEE2CB3C}.Debug|ARM64.ActiveCfg = Debug|x64 {4AED67B6-55FD-486F-B917-E543DEE2CB3C}.Debug|x64.ActiveCfg = Debug|x64 {4AED67B6-55FD-486F-B917-E543DEE2CB3C}.Debug|x64.Build.0 = Debug|x64 + {4AED67B6-55FD-486F-B917-E543DEE2CB3C}.Debug|x86.ActiveCfg = Debug|x64 + {4AED67B6-55FD-486F-B917-E543DEE2CB3C}.Release|Any CPU.ActiveCfg = Release|x64 + {4AED67B6-55FD-486F-B917-E543DEE2CB3C}.Release|ARM.ActiveCfg = Release|x64 + {4AED67B6-55FD-486F-B917-E543DEE2CB3C}.Release|ARM64.ActiveCfg = Release|x64 {4AED67B6-55FD-486F-B917-E543DEE2CB3C}.Release|x64.ActiveCfg = Release|x64 {4AED67B6-55FD-486F-B917-E543DEE2CB3C}.Release|x64.Build.0 = Release|x64 + {4AED67B6-55FD-486F-B917-E543DEE2CB3C}.Release|x86.ActiveCfg = Release|x64 + {42851751-CBC8-45A6-97F5-7A0753F7B4D1}.Debug|Any CPU.ActiveCfg = Debug|x64 + {42851751-CBC8-45A6-97F5-7A0753F7B4D1}.Debug|ARM.ActiveCfg = Debug|x64 + {42851751-CBC8-45A6-97F5-7A0753F7B4D1}.Debug|ARM64.ActiveCfg = Debug|x64 {42851751-CBC8-45A6-97F5-7A0753F7B4D1}.Debug|x64.ActiveCfg = Debug|x64 {42851751-CBC8-45A6-97F5-7A0753F7B4D1}.Debug|x64.Build.0 = Debug|x64 + {42851751-CBC8-45A6-97F5-7A0753F7B4D1}.Debug|x86.ActiveCfg = Debug|x64 + {42851751-CBC8-45A6-97F5-7A0753F7B4D1}.Release|Any CPU.ActiveCfg = Release|x64 + {42851751-CBC8-45A6-97F5-7A0753F7B4D1}.Release|ARM.ActiveCfg = Release|x64 + {42851751-CBC8-45A6-97F5-7A0753F7B4D1}.Release|ARM64.ActiveCfg = Release|x64 {42851751-CBC8-45A6-97F5-7A0753F7B4D1}.Release|x64.ActiveCfg = Release|x64 {42851751-CBC8-45A6-97F5-7A0753F7B4D1}.Release|x64.Build.0 = Release|x64 + {42851751-CBC8-45A6-97F5-7A0753F7B4D1}.Release|x86.ActiveCfg = Release|x64 + {1EF1EEF0-10F0-4F2E-8550-39B6D8044D3E}.Debug|Any CPU.ActiveCfg = Debug|x64 + {1EF1EEF0-10F0-4F2E-8550-39B6D8044D3E}.Debug|ARM.ActiveCfg = Debug|x64 + {1EF1EEF0-10F0-4F2E-8550-39B6D8044D3E}.Debug|ARM64.ActiveCfg = Debug|x64 {1EF1EEF0-10F0-4F2E-8550-39B6D8044D3E}.Debug|x64.ActiveCfg = Debug|x64 {1EF1EEF0-10F0-4F2E-8550-39B6D8044D3E}.Debug|x64.Build.0 = Debug|x64 + {1EF1EEF0-10F0-4F2E-8550-39B6D8044D3E}.Debug|x86.ActiveCfg = Debug|x64 + {1EF1EEF0-10F0-4F2E-8550-39B6D8044D3E}.Release|Any CPU.ActiveCfg = Release|x64 + {1EF1EEF0-10F0-4F2E-8550-39B6D8044D3E}.Release|ARM.ActiveCfg = Release|x64 + {1EF1EEF0-10F0-4F2E-8550-39B6D8044D3E}.Release|ARM64.ActiveCfg = Release|x64 {1EF1EEF0-10F0-4F2E-8550-39B6D8044D3E}.Release|x64.ActiveCfg = Release|x64 {1EF1EEF0-10F0-4F2E-8550-39B6D8044D3E}.Release|x64.Build.0 = Release|x64 + {1EF1EEF0-10F0-4F2E-8550-39B6D8044D3E}.Release|x86.ActiveCfg = Release|x64 + {8FFE09DA-FA4F-4EE1-B3A2-AD5497FBD1AD}.Debug|Any CPU.ActiveCfg = Debug|x64 + {8FFE09DA-FA4F-4EE1-B3A2-AD5497FBD1AD}.Debug|ARM.ActiveCfg = Debug|x64 + {8FFE09DA-FA4F-4EE1-B3A2-AD5497FBD1AD}.Debug|ARM64.ActiveCfg = Debug|x64 {8FFE09DA-FA4F-4EE1-B3A2-AD5497FBD1AD}.Debug|x64.ActiveCfg = Debug|x64 {8FFE09DA-FA4F-4EE1-B3A2-AD5497FBD1AD}.Debug|x64.Build.0 = Debug|x64 + {8FFE09DA-FA4F-4EE1-B3A2-AD5497FBD1AD}.Debug|x86.ActiveCfg = Debug|x64 + {8FFE09DA-FA4F-4EE1-B3A2-AD5497FBD1AD}.Release|Any CPU.ActiveCfg = Release|x64 + {8FFE09DA-FA4F-4EE1-B3A2-AD5497FBD1AD}.Release|ARM.ActiveCfg = Release|x64 + {8FFE09DA-FA4F-4EE1-B3A2-AD5497FBD1AD}.Release|ARM64.ActiveCfg = Release|x64 {8FFE09DA-FA4F-4EE1-B3A2-AD5497FBD1AD}.Release|x64.ActiveCfg = Release|x64 {8FFE09DA-FA4F-4EE1-B3A2-AD5497FBD1AD}.Release|x64.Build.0 = Release|x64 + {8FFE09DA-FA4F-4EE1-B3A2-AD5497FBD1AD}.Release|x86.ActiveCfg = Release|x64 + {655C9AF2-18D3-4DA6-80E4-85504A7722BA}.Debug|Any CPU.ActiveCfg = Debug|x64 + {655C9AF2-18D3-4DA6-80E4-85504A7722BA}.Debug|ARM.ActiveCfg = Debug|x64 + {655C9AF2-18D3-4DA6-80E4-85504A7722BA}.Debug|ARM64.ActiveCfg = Debug|x64 {655C9AF2-18D3-4DA6-80E4-85504A7722BA}.Debug|x64.ActiveCfg = Debug|x64 {655C9AF2-18D3-4DA6-80E4-85504A7722BA}.Debug|x64.Build.0 = Debug|x64 + {655C9AF2-18D3-4DA6-80E4-85504A7722BA}.Debug|x86.ActiveCfg = Debug|x64 + {655C9AF2-18D3-4DA6-80E4-85504A7722BA}.Release|Any CPU.ActiveCfg = Release|x64 + {655C9AF2-18D3-4DA6-80E4-85504A7722BA}.Release|ARM.ActiveCfg = Release|x64 + {655C9AF2-18D3-4DA6-80E4-85504A7722BA}.Release|ARM64.ActiveCfg = Release|x64 {655C9AF2-18D3-4DA6-80E4-85504A7722BA}.Release|x64.ActiveCfg = Release|x64 {655C9AF2-18D3-4DA6-80E4-85504A7722BA}.Release|x64.Build.0 = Release|x64 + {655C9AF2-18D3-4DA6-80E4-85504A7722BA}.Release|x86.ActiveCfg = Release|x64 + {BA58206B-1493-4C75-BFEA-A85768A1E156}.Debug|Any CPU.ActiveCfg = Debug|x64 + {BA58206B-1493-4C75-BFEA-A85768A1E156}.Debug|ARM.ActiveCfg = Debug|x64 + {BA58206B-1493-4C75-BFEA-A85768A1E156}.Debug|ARM64.ActiveCfg = Debug|x64 {BA58206B-1493-4C75-BFEA-A85768A1E156}.Debug|x64.ActiveCfg = Debug|x64 {BA58206B-1493-4C75-BFEA-A85768A1E156}.Debug|x64.Build.0 = Debug|x64 + {BA58206B-1493-4C75-BFEA-A85768A1E156}.Debug|x86.ActiveCfg = Debug|x64 + {BA58206B-1493-4C75-BFEA-A85768A1E156}.Release|Any CPU.ActiveCfg = Release|x64 + {BA58206B-1493-4C75-BFEA-A85768A1E156}.Release|ARM.ActiveCfg = Release|x64 + {BA58206B-1493-4C75-BFEA-A85768A1E156}.Release|ARM64.ActiveCfg = Release|x64 {BA58206B-1493-4C75-BFEA-A85768A1E156}.Release|x64.ActiveCfg = Release|x64 {BA58206B-1493-4C75-BFEA-A85768A1E156}.Release|x64.Build.0 = Release|x64 + {BA58206B-1493-4C75-BFEA-A85768A1E156}.Release|x86.ActiveCfg = Release|x64 + {03276A39-D4E9-417C-8FFD-200B0EE5E871}.Debug|Any CPU.ActiveCfg = Debug|x64 + {03276A39-D4E9-417C-8FFD-200B0EE5E871}.Debug|ARM.ActiveCfg = Debug|x64 + {03276A39-D4E9-417C-8FFD-200B0EE5E871}.Debug|ARM64.ActiveCfg = Debug|x64 {03276A39-D4E9-417C-8FFD-200B0EE5E871}.Debug|x64.ActiveCfg = Debug|x64 {03276A39-D4E9-417C-8FFD-200B0EE5E871}.Debug|x64.Build.0 = Debug|x64 + {03276A39-D4E9-417C-8FFD-200B0EE5E871}.Debug|x86.ActiveCfg = Debug|x64 + {03276A39-D4E9-417C-8FFD-200B0EE5E871}.Release|Any CPU.ActiveCfg = Release|x64 + {03276A39-D4E9-417C-8FFD-200B0EE5E871}.Release|ARM.ActiveCfg = Release|x64 + {03276A39-D4E9-417C-8FFD-200B0EE5E871}.Release|ARM64.ActiveCfg = Release|x64 {03276A39-D4E9-417C-8FFD-200B0EE5E871}.Release|x64.ActiveCfg = Release|x64 {03276A39-D4E9-417C-8FFD-200B0EE5E871}.Release|x64.Build.0 = Release|x64 + {03276A39-D4E9-417C-8FFD-200B0EE5E871}.Release|x86.ActiveCfg = Release|x64 + {B81FB7B6-D30E-428F-908A-41422EFC1172}.Debug|Any CPU.ActiveCfg = Debug|x64 + {B81FB7B6-D30E-428F-908A-41422EFC1172}.Debug|ARM.ActiveCfg = Debug|x64 + {B81FB7B6-D30E-428F-908A-41422EFC1172}.Debug|ARM64.ActiveCfg = Debug|x64 {B81FB7B6-D30E-428F-908A-41422EFC1172}.Debug|x64.ActiveCfg = Debug|x64 {B81FB7B6-D30E-428F-908A-41422EFC1172}.Debug|x64.Build.0 = Debug|x64 + {B81FB7B6-D30E-428F-908A-41422EFC1172}.Debug|x86.ActiveCfg = Debug|x64 + {B81FB7B6-D30E-428F-908A-41422EFC1172}.Release|Any CPU.ActiveCfg = Release|x64 + {B81FB7B6-D30E-428F-908A-41422EFC1172}.Release|ARM.ActiveCfg = Release|x64 + {B81FB7B6-D30E-428F-908A-41422EFC1172}.Release|ARM64.ActiveCfg = Release|x64 {B81FB7B6-D30E-428F-908A-41422EFC1172}.Release|x64.ActiveCfg = Release|x64 {B81FB7B6-D30E-428F-908A-41422EFC1172}.Release|x64.Build.0 = Release|x64 + {B81FB7B6-D30E-428F-908A-41422EFC1172}.Release|x86.ActiveCfg = Release|x64 + {0F85E674-34AE-443D-954C-8321EB8B93B1}.Debug|Any CPU.ActiveCfg = Debug|x64 + {0F85E674-34AE-443D-954C-8321EB8B93B1}.Debug|ARM.ActiveCfg = Debug|x64 + {0F85E674-34AE-443D-954C-8321EB8B93B1}.Debug|ARM64.ActiveCfg = Debug|x64 {0F85E674-34AE-443D-954C-8321EB8B93B1}.Debug|x64.ActiveCfg = Debug|x64 {0F85E674-34AE-443D-954C-8321EB8B93B1}.Debug|x64.Build.0 = Debug|x64 + {0F85E674-34AE-443D-954C-8321EB8B93B1}.Debug|x86.ActiveCfg = Debug|x64 + {0F85E674-34AE-443D-954C-8321EB8B93B1}.Release|Any CPU.ActiveCfg = Release|x64 + {0F85E674-34AE-443D-954C-8321EB8B93B1}.Release|ARM.ActiveCfg = Release|x64 + {0F85E674-34AE-443D-954C-8321EB8B93B1}.Release|ARM64.ActiveCfg = Release|x64 {0F85E674-34AE-443D-954C-8321EB8B93B1}.Release|x64.ActiveCfg = Release|x64 {0F85E674-34AE-443D-954C-8321EB8B93B1}.Release|x64.Build.0 = Release|x64 + {0F85E674-34AE-443D-954C-8321EB8B93B1}.Release|x86.ActiveCfg = Release|x64 + {632BBE62-5421-49EA-835A-7FFA4F499BD6}.Debug|Any CPU.ActiveCfg = Debug|x64 + {632BBE62-5421-49EA-835A-7FFA4F499BD6}.Debug|ARM.ActiveCfg = Debug|x64 + {632BBE62-5421-49EA-835A-7FFA4F499BD6}.Debug|ARM64.ActiveCfg = Debug|x64 {632BBE62-5421-49EA-835A-7FFA4F499BD6}.Debug|x64.ActiveCfg = Debug|x64 {632BBE62-5421-49EA-835A-7FFA4F499BD6}.Debug|x64.Build.0 = Debug|x64 + {632BBE62-5421-49EA-835A-7FFA4F499BD6}.Debug|x86.ActiveCfg = Debug|x64 + {632BBE62-5421-49EA-835A-7FFA4F499BD6}.Release|Any CPU.ActiveCfg = Release|x64 + {632BBE62-5421-49EA-835A-7FFA4F499BD6}.Release|ARM.ActiveCfg = Release|x64 + {632BBE62-5421-49EA-835A-7FFA4F499BD6}.Release|ARM64.ActiveCfg = Release|x64 {632BBE62-5421-49EA-835A-7FFA4F499BD6}.Release|x64.ActiveCfg = Release|x64 {632BBE62-5421-49EA-835A-7FFA4F499BD6}.Release|x64.Build.0 = Release|x64 + {632BBE62-5421-49EA-835A-7FFA4F499BD6}.Release|x86.ActiveCfg = Release|x64 + {4FA206A5-F69F-4193-BF8F-F6EEB496734C}.Debug|Any CPU.ActiveCfg = Debug|x64 + {4FA206A5-F69F-4193-BF8F-F6EEB496734C}.Debug|ARM.ActiveCfg = Debug|x64 + {4FA206A5-F69F-4193-BF8F-F6EEB496734C}.Debug|ARM64.ActiveCfg = Debug|x64 {4FA206A5-F69F-4193-BF8F-F6EEB496734C}.Debug|x64.ActiveCfg = Debug|x64 {4FA206A5-F69F-4193-BF8F-F6EEB496734C}.Debug|x64.Build.0 = Debug|x64 + {4FA206A5-F69F-4193-BF8F-F6EEB496734C}.Debug|x86.ActiveCfg = Debug|x64 + {4FA206A5-F69F-4193-BF8F-F6EEB496734C}.Release|Any CPU.ActiveCfg = Release|x64 + {4FA206A5-F69F-4193-BF8F-F6EEB496734C}.Release|ARM.ActiveCfg = Release|x64 + {4FA206A5-F69F-4193-BF8F-F6EEB496734C}.Release|ARM64.ActiveCfg = Release|x64 {4FA206A5-F69F-4193-BF8F-F6EEB496734C}.Release|x64.ActiveCfg = Release|x64 {4FA206A5-F69F-4193-BF8F-F6EEB496734C}.Release|x64.Build.0 = Release|x64 + {4FA206A5-F69F-4193-BF8F-F6EEB496734C}.Release|x86.ActiveCfg = Release|x64 + {090CD7B7-3B0C-4D1D-BC98-83EB5D799BC1}.Debug|Any CPU.ActiveCfg = Debug|x64 + {090CD7B7-3B0C-4D1D-BC98-83EB5D799BC1}.Debug|ARM.ActiveCfg = Debug|x64 + {090CD7B7-3B0C-4D1D-BC98-83EB5D799BC1}.Debug|ARM64.ActiveCfg = Debug|x64 {090CD7B7-3B0C-4D1D-BC98-83EB5D799BC1}.Debug|x64.ActiveCfg = Debug|x64 {090CD7B7-3B0C-4D1D-BC98-83EB5D799BC1}.Debug|x64.Build.0 = Debug|x64 + {090CD7B7-3B0C-4D1D-BC98-83EB5D799BC1}.Debug|x86.ActiveCfg = Debug|x64 + {090CD7B7-3B0C-4D1D-BC98-83EB5D799BC1}.Release|Any CPU.ActiveCfg = Release|x64 + {090CD7B7-3B0C-4D1D-BC98-83EB5D799BC1}.Release|ARM.ActiveCfg = Release|x64 + {090CD7B7-3B0C-4D1D-BC98-83EB5D799BC1}.Release|ARM64.ActiveCfg = Release|x64 {090CD7B7-3B0C-4D1D-BC98-83EB5D799BC1}.Release|x64.ActiveCfg = Release|x64 {090CD7B7-3B0C-4D1D-BC98-83EB5D799BC1}.Release|x64.Build.0 = Release|x64 + {090CD7B7-3B0C-4D1D-BC98-83EB5D799BC1}.Release|x86.ActiveCfg = Release|x64 + {7E1E3F13-2BD6-3F75-A6A7-873A2B55C60F}.Debug|Any CPU.ActiveCfg = Debug|x64 + {7E1E3F13-2BD6-3F75-A6A7-873A2B55C60F}.Debug|ARM.ActiveCfg = Debug|x64 + {7E1E3F13-2BD6-3F75-A6A7-873A2B55C60F}.Debug|ARM64.ActiveCfg = Debug|x64 {7E1E3F13-2BD6-3F75-A6A7-873A2B55C60F}.Debug|x64.ActiveCfg = Debug|x64 {7E1E3F13-2BD6-3F75-A6A7-873A2B55C60F}.Debug|x64.Build.0 = Debug|x64 + {7E1E3F13-2BD6-3F75-A6A7-873A2B55C60F}.Debug|x86.ActiveCfg = Debug|x64 + {7E1E3F13-2BD6-3F75-A6A7-873A2B55C60F}.Release|Any CPU.ActiveCfg = Release|x64 + {7E1E3F13-2BD6-3F75-A6A7-873A2B55C60F}.Release|ARM.ActiveCfg = Release|x64 + {7E1E3F13-2BD6-3F75-A6A7-873A2B55C60F}.Release|ARM64.ActiveCfg = Release|x64 {7E1E3F13-2BD6-3F75-A6A7-873A2B55C60F}.Release|x64.ActiveCfg = Release|x64 {7E1E3F13-2BD6-3F75-A6A7-873A2B55C60F}.Release|x64.Build.0 = Release|x64 + {7E1E3F13-2BD6-3F75-A6A7-873A2B55C60F}.Release|x86.ActiveCfg = Release|x64 + {FD8EB419-FF9C-4D88-BB6F-BF6CED37747B}.Debug|Any CPU.ActiveCfg = Debug|x64 + {FD8EB419-FF9C-4D88-BB6F-BF6CED37747B}.Debug|ARM.ActiveCfg = Debug|x64 + {FD8EB419-FF9C-4D88-BB6F-BF6CED37747B}.Debug|ARM64.ActiveCfg = Debug|x64 {FD8EB419-FF9C-4D88-BB6F-BF6CED37747B}.Debug|x64.ActiveCfg = Debug|x64 {FD8EB419-FF9C-4D88-BB6F-BF6CED37747B}.Debug|x64.Build.0 = Debug|x64 + {FD8EB419-FF9C-4D88-BB6F-BF6CED37747B}.Debug|x86.ActiveCfg = Debug|x64 + {FD8EB419-FF9C-4D88-BB6F-BF6CED37747B}.Release|Any CPU.ActiveCfg = Release|x64 + {FD8EB419-FF9C-4D88-BB6F-BF6CED37747B}.Release|ARM.ActiveCfg = Release|x64 + {FD8EB419-FF9C-4D88-BB6F-BF6CED37747B}.Release|ARM64.ActiveCfg = Release|x64 {FD8EB419-FF9C-4D88-BB6F-BF6CED37747B}.Release|x64.ActiveCfg = Release|x64 {FD8EB419-FF9C-4D88-BB6F-BF6CED37747B}.Release|x64.Build.0 = Release|x64 + {FD8EB419-FF9C-4D88-BB6F-BF6CED37747B}.Release|x86.ActiveCfg = Release|x64 + {DA5A6FE9-0040-40CC-83CC-764AE5306590}.Debug|Any CPU.ActiveCfg = Debug|x64 + {DA5A6FE9-0040-40CC-83CC-764AE5306590}.Debug|ARM.ActiveCfg = Debug|x64 + {DA5A6FE9-0040-40CC-83CC-764AE5306590}.Debug|ARM64.ActiveCfg = Debug|x64 {DA5A6FE9-0040-40CC-83CC-764AE5306590}.Debug|x64.ActiveCfg = Debug|x64 {DA5A6FE9-0040-40CC-83CC-764AE5306590}.Debug|x64.Build.0 = Debug|x64 + {DA5A6FE9-0040-40CC-83CC-764AE5306590}.Debug|x86.ActiveCfg = Debug|x64 + {DA5A6FE9-0040-40CC-83CC-764AE5306590}.Release|Any CPU.ActiveCfg = Release|x64 + {DA5A6FE9-0040-40CC-83CC-764AE5306590}.Release|ARM.ActiveCfg = Release|x64 + {DA5A6FE9-0040-40CC-83CC-764AE5306590}.Release|ARM64.ActiveCfg = Release|x64 {DA5A6FE9-0040-40CC-83CC-764AE5306590}.Release|x64.ActiveCfg = Release|x64 {DA5A6FE9-0040-40CC-83CC-764AE5306590}.Release|x64.Build.0 = Release|x64 + {DA5A6FE9-0040-40CC-83CC-764AE5306590}.Release|x86.ActiveCfg = Release|x64 + {0351ADA4-0C32-4652-9BA0-41F7B602372B}.Debug|Any CPU.ActiveCfg = Debug|x64 + {0351ADA4-0C32-4652-9BA0-41F7B602372B}.Debug|ARM.ActiveCfg = Debug|x64 + {0351ADA4-0C32-4652-9BA0-41F7B602372B}.Debug|ARM64.ActiveCfg = Debug|x64 {0351ADA4-0C32-4652-9BA0-41F7B602372B}.Debug|x64.ActiveCfg = Debug|x64 {0351ADA4-0C32-4652-9BA0-41F7B602372B}.Debug|x64.Build.0 = Debug|x64 + {0351ADA4-0C32-4652-9BA0-41F7B602372B}.Debug|x86.ActiveCfg = Debug|x64 + {0351ADA4-0C32-4652-9BA0-41F7B602372B}.Release|Any CPU.ActiveCfg = Release|x64 + {0351ADA4-0C32-4652-9BA0-41F7B602372B}.Release|ARM.ActiveCfg = Release|x64 + {0351ADA4-0C32-4652-9BA0-41F7B602372B}.Release|ARM64.ActiveCfg = Release|x64 {0351ADA4-0C32-4652-9BA0-41F7B602372B}.Release|x64.ActiveCfg = Release|x64 {0351ADA4-0C32-4652-9BA0-41F7B602372B}.Release|x64.Build.0 = Release|x64 + {0351ADA4-0C32-4652-9BA0-41F7B602372B}.Release|x86.ActiveCfg = Release|x64 + {D9B8FC84-322A-4F9F-BBB9-20915C47DDFD}.Debug|Any CPU.ActiveCfg = Debug|x64 + {D9B8FC84-322A-4F9F-BBB9-20915C47DDFD}.Debug|ARM.ActiveCfg = Debug|x64 + {D9B8FC84-322A-4F9F-BBB9-20915C47DDFD}.Debug|ARM64.ActiveCfg = Debug|x64 {D9B8FC84-322A-4F9F-BBB9-20915C47DDFD}.Debug|x64.ActiveCfg = Debug|x64 {D9B8FC84-322A-4F9F-BBB9-20915C47DDFD}.Debug|x64.Build.0 = Debug|x64 + {D9B8FC84-322A-4F9F-BBB9-20915C47DDFD}.Debug|x86.ActiveCfg = Debug|x64 + {D9B8FC84-322A-4F9F-BBB9-20915C47DDFD}.Release|Any CPU.ActiveCfg = Release|x64 + {D9B8FC84-322A-4F9F-BBB9-20915C47DDFD}.Release|ARM.ActiveCfg = Release|x64 + {D9B8FC84-322A-4F9F-BBB9-20915C47DDFD}.Release|ARM64.ActiveCfg = Release|x64 {D9B8FC84-322A-4F9F-BBB9-20915C47DDFD}.Release|x64.ActiveCfg = Release|x64 {D9B8FC84-322A-4F9F-BBB9-20915C47DDFD}.Release|x64.Build.0 = Release|x64 + {D9B8FC84-322A-4F9F-BBB9-20915C47DDFD}.Release|x86.ActiveCfg = Release|x64 + {6955446D-23F7-4023-9BB3-8657F904AF99}.Debug|Any CPU.ActiveCfg = Debug|x64 + {6955446D-23F7-4023-9BB3-8657F904AF99}.Debug|ARM.ActiveCfg = Debug|x64 + {6955446D-23F7-4023-9BB3-8657F904AF99}.Debug|ARM64.ActiveCfg = Debug|x64 {6955446D-23F7-4023-9BB3-8657F904AF99}.Debug|x64.ActiveCfg = Debug|x64 {6955446D-23F7-4023-9BB3-8657F904AF99}.Debug|x64.Build.0 = Debug|x64 + {6955446D-23F7-4023-9BB3-8657F904AF99}.Debug|x86.ActiveCfg = Debug|x64 + {6955446D-23F7-4023-9BB3-8657F904AF99}.Release|Any CPU.ActiveCfg = Release|x64 + {6955446D-23F7-4023-9BB3-8657F904AF99}.Release|ARM.ActiveCfg = Release|x64 + {6955446D-23F7-4023-9BB3-8657F904AF99}.Release|ARM64.ActiveCfg = Release|x64 {6955446D-23F7-4023-9BB3-8657F904AF99}.Release|x64.ActiveCfg = Release|x64 {6955446D-23F7-4023-9BB3-8657F904AF99}.Release|x64.Build.0 = Release|x64 + {6955446D-23F7-4023-9BB3-8657F904AF99}.Release|x86.ActiveCfg = Release|x64 + {58736667-1027-4AD7-BFDF-7A3A6474103A}.Debug|Any CPU.ActiveCfg = Debug|x64 + {58736667-1027-4AD7-BFDF-7A3A6474103A}.Debug|ARM.ActiveCfg = Debug|x64 + {58736667-1027-4AD7-BFDF-7A3A6474103A}.Debug|ARM64.ActiveCfg = Debug|x64 {58736667-1027-4AD7-BFDF-7A3A6474103A}.Debug|x64.ActiveCfg = Debug|x64 {58736667-1027-4AD7-BFDF-7A3A6474103A}.Debug|x64.Build.0 = Debug|x64 + {58736667-1027-4AD7-BFDF-7A3A6474103A}.Debug|x86.ActiveCfg = Debug|x64 + {58736667-1027-4AD7-BFDF-7A3A6474103A}.Release|Any CPU.ActiveCfg = Release|x64 + {58736667-1027-4AD7-BFDF-7A3A6474103A}.Release|ARM.ActiveCfg = Release|x64 + {58736667-1027-4AD7-BFDF-7A3A6474103A}.Release|ARM64.ActiveCfg = Release|x64 {58736667-1027-4AD7-BFDF-7A3A6474103A}.Release|x64.ActiveCfg = Release|x64 {58736667-1027-4AD7-BFDF-7A3A6474103A}.Release|x64.Build.0 = Release|x64 + {58736667-1027-4AD7-BFDF-7A3A6474103A}.Release|x86.ActiveCfg = Release|x64 + {1D5BE09D-78C0-4FD7-AF00-AE7C1AF7C525}.Debug|Any CPU.ActiveCfg = Debug|x64 + {1D5BE09D-78C0-4FD7-AF00-AE7C1AF7C525}.Debug|ARM.ActiveCfg = Debug|x64 + {1D5BE09D-78C0-4FD7-AF00-AE7C1AF7C525}.Debug|ARM64.ActiveCfg = Debug|x64 {1D5BE09D-78C0-4FD7-AF00-AE7C1AF7C525}.Debug|x64.ActiveCfg = Debug|x64 {1D5BE09D-78C0-4FD7-AF00-AE7C1AF7C525}.Debug|x64.Build.0 = Debug|x64 + {1D5BE09D-78C0-4FD7-AF00-AE7C1AF7C525}.Debug|x86.ActiveCfg = Debug|x64 + {1D5BE09D-78C0-4FD7-AF00-AE7C1AF7C525}.Release|Any CPU.ActiveCfg = Release|x64 + {1D5BE09D-78C0-4FD7-AF00-AE7C1AF7C525}.Release|ARM.ActiveCfg = Release|x64 + {1D5BE09D-78C0-4FD7-AF00-AE7C1AF7C525}.Release|ARM64.ActiveCfg = Release|x64 {1D5BE09D-78C0-4FD7-AF00-AE7C1AF7C525}.Release|x64.ActiveCfg = Release|x64 {1D5BE09D-78C0-4FD7-AF00-AE7C1AF7C525}.Release|x64.Build.0 = Release|x64 + {1D5BE09D-78C0-4FD7-AF00-AE7C1AF7C525}.Release|x86.ActiveCfg = Release|x64 + {031AC72E-FA28-4AB7-B690-6F7B9C28AA73}.Debug|Any CPU.ActiveCfg = Debug|x64 + {031AC72E-FA28-4AB7-B690-6F7B9C28AA73}.Debug|ARM.ActiveCfg = Debug|x64 + {031AC72E-FA28-4AB7-B690-6F7B9C28AA73}.Debug|ARM64.ActiveCfg = Debug|x64 {031AC72E-FA28-4AB7-B690-6F7B9C28AA73}.Debug|x64.ActiveCfg = Debug|x64 {031AC72E-FA28-4AB7-B690-6F7B9C28AA73}.Debug|x64.Build.0 = Debug|x64 + {031AC72E-FA28-4AB7-B690-6F7B9C28AA73}.Debug|x86.ActiveCfg = Debug|x64 + {031AC72E-FA28-4AB7-B690-6F7B9C28AA73}.Release|Any CPU.ActiveCfg = Release|x64 + {031AC72E-FA28-4AB7-B690-6F7B9C28AA73}.Release|ARM.ActiveCfg = Release|x64 + {031AC72E-FA28-4AB7-B690-6F7B9C28AA73}.Release|ARM64.ActiveCfg = Release|x64 {031AC72E-FA28-4AB7-B690-6F7B9C28AA73}.Release|x64.ActiveCfg = Release|x64 {031AC72E-FA28-4AB7-B690-6F7B9C28AA73}.Release|x64.Build.0 = Release|x64 + {031AC72E-FA28-4AB7-B690-6F7B9C28AA73}.Release|x86.ActiveCfg = Release|x64 + {0B593A6C-4143-4337-860E-DB5710FB87DB}.Debug|Any CPU.ActiveCfg = Debug|x64 + {0B593A6C-4143-4337-860E-DB5710FB87DB}.Debug|ARM.ActiveCfg = Debug|x64 + {0B593A6C-4143-4337-860E-DB5710FB87DB}.Debug|ARM64.ActiveCfg = Debug|x64 {0B593A6C-4143-4337-860E-DB5710FB87DB}.Debug|x64.ActiveCfg = Debug|x64 {0B593A6C-4143-4337-860E-DB5710FB87DB}.Debug|x64.Build.0 = Debug|x64 + {0B593A6C-4143-4337-860E-DB5710FB87DB}.Debug|x86.ActiveCfg = Debug|x64 + {0B593A6C-4143-4337-860E-DB5710FB87DB}.Release|Any CPU.ActiveCfg = Release|x64 + {0B593A6C-4143-4337-860E-DB5710FB87DB}.Release|ARM.ActiveCfg = Release|x64 + {0B593A6C-4143-4337-860E-DB5710FB87DB}.Release|ARM64.ActiveCfg = Release|x64 {0B593A6C-4143-4337-860E-DB5710FB87DB}.Release|x64.ActiveCfg = Release|x64 {0B593A6C-4143-4337-860E-DB5710FB87DB}.Release|x64.Build.0 = Release|x64 + {0B593A6C-4143-4337-860E-DB5710FB87DB}.Release|x86.ActiveCfg = Release|x64 + {CC6E41AC-8174-4E8A-8D22-85DD7F4851DF}.Debug|Any CPU.ActiveCfg = Debug|x64 + {CC6E41AC-8174-4E8A-8D22-85DD7F4851DF}.Debug|ARM.ActiveCfg = Debug|x64 + {CC6E41AC-8174-4E8A-8D22-85DD7F4851DF}.Debug|ARM64.ActiveCfg = Debug|x64 {CC6E41AC-8174-4E8A-8D22-85DD7F4851DF}.Debug|x64.ActiveCfg = Debug|x64 {CC6E41AC-8174-4E8A-8D22-85DD7F4851DF}.Debug|x64.Build.0 = Debug|x64 + {CC6E41AC-8174-4E8A-8D22-85DD7F4851DF}.Debug|x86.ActiveCfg = Debug|x64 + {CC6E41AC-8174-4E8A-8D22-85DD7F4851DF}.Release|Any CPU.ActiveCfg = Release|x64 + {CC6E41AC-8174-4E8A-8D22-85DD7F4851DF}.Release|ARM.ActiveCfg = Release|x64 + {CC6E41AC-8174-4E8A-8D22-85DD7F4851DF}.Release|ARM64.ActiveCfg = Release|x64 {CC6E41AC-8174-4E8A-8D22-85DD7F4851DF}.Release|x64.ActiveCfg = Release|x64 {CC6E41AC-8174-4E8A-8D22-85DD7F4851DF}.Release|x64.Build.0 = Release|x64 + {CC6E41AC-8174-4E8A-8D22-85DD7F4851DF}.Release|x86.ActiveCfg = Release|x64 + {C502A854-53AC-4EBB-8DC0-E4AF2191E4F6}.Debug|Any CPU.ActiveCfg = Debug|x64 + {C502A854-53AC-4EBB-8DC0-E4AF2191E4F6}.Debug|ARM.ActiveCfg = Debug|x64 + {C502A854-53AC-4EBB-8DC0-E4AF2191E4F6}.Debug|ARM64.ActiveCfg = Debug|x64 {C502A854-53AC-4EBB-8DC0-E4AF2191E4F6}.Debug|x64.ActiveCfg = Debug|x64 {C502A854-53AC-4EBB-8DC0-E4AF2191E4F6}.Debug|x64.Build.0 = Debug|x64 + {C502A854-53AC-4EBB-8DC0-E4AF2191E4F6}.Debug|x86.ActiveCfg = Debug|x64 + {C502A854-53AC-4EBB-8DC0-E4AF2191E4F6}.Release|Any CPU.ActiveCfg = Release|x64 + {C502A854-53AC-4EBB-8DC0-E4AF2191E4F6}.Release|ARM.ActiveCfg = Release|x64 + {C502A854-53AC-4EBB-8DC0-E4AF2191E4F6}.Release|ARM64.ActiveCfg = Release|x64 {C502A854-53AC-4EBB-8DC0-E4AF2191E4F6}.Release|x64.ActiveCfg = Release|x64 {C502A854-53AC-4EBB-8DC0-E4AF2191E4F6}.Release|x64.Build.0 = Release|x64 + {C502A854-53AC-4EBB-8DC0-E4AF2191E4F6}.Release|x86.ActiveCfg = Release|x64 + {7319089E-46D6-4400-BC65-E39BDF1416EE}.Debug|Any CPU.ActiveCfg = Debug|x64 + {7319089E-46D6-4400-BC65-E39BDF1416EE}.Debug|ARM.ActiveCfg = Debug|x64 + {7319089E-46D6-4400-BC65-E39BDF1416EE}.Debug|ARM64.ActiveCfg = Debug|x64 {7319089E-46D6-4400-BC65-E39BDF1416EE}.Debug|x64.ActiveCfg = Debug|x64 {7319089E-46D6-4400-BC65-E39BDF1416EE}.Debug|x64.Build.0 = Debug|x64 + {7319089E-46D6-4400-BC65-E39BDF1416EE}.Debug|x86.ActiveCfg = Debug|x64 + {7319089E-46D6-4400-BC65-E39BDF1416EE}.Release|Any CPU.ActiveCfg = Release|x64 + {7319089E-46D6-4400-BC65-E39BDF1416EE}.Release|ARM.ActiveCfg = Release|x64 + {7319089E-46D6-4400-BC65-E39BDF1416EE}.Release|ARM64.ActiveCfg = Release|x64 {7319089E-46D6-4400-BC65-E39BDF1416EE}.Release|x64.ActiveCfg = Release|x64 {7319089E-46D6-4400-BC65-E39BDF1416EE}.Release|x64.Build.0 = Release|x64 + {7319089E-46D6-4400-BC65-E39BDF1416EE}.Release|x86.ActiveCfg = Release|x64 + {CABA8DFB-823B-4BF2-93AC-3F31984150D9}.Debug|Any CPU.ActiveCfg = Debug|x64 + {CABA8DFB-823B-4BF2-93AC-3F31984150D9}.Debug|ARM.ActiveCfg = Debug|x64 + {CABA8DFB-823B-4BF2-93AC-3F31984150D9}.Debug|ARM64.ActiveCfg = Debug|x64 {CABA8DFB-823B-4BF2-93AC-3F31984150D9}.Debug|x64.ActiveCfg = Debug|x64 {CABA8DFB-823B-4BF2-93AC-3F31984150D9}.Debug|x64.Build.0 = Debug|x64 + {CABA8DFB-823B-4BF2-93AC-3F31984150D9}.Debug|x86.ActiveCfg = Debug|x64 + {CABA8DFB-823B-4BF2-93AC-3F31984150D9}.Release|Any CPU.ActiveCfg = Release|x64 + {CABA8DFB-823B-4BF2-93AC-3F31984150D9}.Release|ARM.ActiveCfg = Release|x64 + {CABA8DFB-823B-4BF2-93AC-3F31984150D9}.Release|ARM64.ActiveCfg = Release|x64 {CABA8DFB-823B-4BF2-93AC-3F31984150D9}.Release|x64.ActiveCfg = Release|x64 {CABA8DFB-823B-4BF2-93AC-3F31984150D9}.Release|x64.Build.0 = Release|x64 + {CABA8DFB-823B-4BF2-93AC-3F31984150D9}.Release|x86.ActiveCfg = Release|x64 + {98537082-0FDB-40DE-ABD8-0DC5A4269BAB}.Debug|Any CPU.ActiveCfg = Debug|x64 + {98537082-0FDB-40DE-ABD8-0DC5A4269BAB}.Debug|ARM.ActiveCfg = Debug|x64 + {98537082-0FDB-40DE-ABD8-0DC5A4269BAB}.Debug|ARM64.ActiveCfg = Debug|x64 {98537082-0FDB-40DE-ABD8-0DC5A4269BAB}.Debug|x64.ActiveCfg = Debug|x64 {98537082-0FDB-40DE-ABD8-0DC5A4269BAB}.Debug|x64.Build.0 = Debug|x64 + {98537082-0FDB-40DE-ABD8-0DC5A4269BAB}.Debug|x86.ActiveCfg = Debug|x64 + {98537082-0FDB-40DE-ABD8-0DC5A4269BAB}.Release|Any CPU.ActiveCfg = Release|x64 + {98537082-0FDB-40DE-ABD8-0DC5A4269BAB}.Release|ARM.ActiveCfg = Release|x64 + {98537082-0FDB-40DE-ABD8-0DC5A4269BAB}.Release|ARM64.ActiveCfg = Release|x64 {98537082-0FDB-40DE-ABD8-0DC5A4269BAB}.Release|x64.ActiveCfg = Release|x64 {98537082-0FDB-40DE-ABD8-0DC5A4269BAB}.Release|x64.Build.0 = Release|x64 + {98537082-0FDB-40DE-ABD8-0DC5A4269BAB}.Release|x86.ActiveCfg = Release|x64 + {07C389E3-6BC8-41CF-923E-307B1265FA2D}.Debug|Any CPU.ActiveCfg = Debug|x64 + {07C389E3-6BC8-41CF-923E-307B1265FA2D}.Debug|ARM.ActiveCfg = Debug|x64 + {07C389E3-6BC8-41CF-923E-307B1265FA2D}.Debug|ARM64.ActiveCfg = Debug|x64 {07C389E3-6BC8-41CF-923E-307B1265FA2D}.Debug|x64.ActiveCfg = Debug|x64 {07C389E3-6BC8-41CF-923E-307B1265FA2D}.Debug|x64.Build.0 = Debug|x64 + {07C389E3-6BC8-41CF-923E-307B1265FA2D}.Debug|x86.ActiveCfg = Debug|x64 + {07C389E3-6BC8-41CF-923E-307B1265FA2D}.Release|Any CPU.ActiveCfg = Release|x64 + {07C389E3-6BC8-41CF-923E-307B1265FA2D}.Release|ARM.ActiveCfg = Release|x64 + {07C389E3-6BC8-41CF-923E-307B1265FA2D}.Release|ARM64.ActiveCfg = Release|x64 {07C389E3-6BC8-41CF-923E-307B1265FA2D}.Release|x64.ActiveCfg = Release|x64 {07C389E3-6BC8-41CF-923E-307B1265FA2D}.Release|x64.Build.0 = Release|x64 + {07C389E3-6BC8-41CF-923E-307B1265FA2D}.Release|x86.ActiveCfg = Release|x64 + {C3A17DCA-217B-462C-BB0C-BE086AF80081}.Debug|Any CPU.ActiveCfg = Debug|x64 + {C3A17DCA-217B-462C-BB0C-BE086AF80081}.Debug|ARM.ActiveCfg = Debug|x64 + {C3A17DCA-217B-462C-BB0C-BE086AF80081}.Debug|ARM64.ActiveCfg = Debug|x64 {C3A17DCA-217B-462C-BB0C-BE086AF80081}.Debug|x64.ActiveCfg = Debug|x64 {C3A17DCA-217B-462C-BB0C-BE086AF80081}.Debug|x64.Build.0 = Debug|x64 + {C3A17DCA-217B-462C-BB0C-BE086AF80081}.Debug|x86.ActiveCfg = Debug|x64 + {C3A17DCA-217B-462C-BB0C-BE086AF80081}.Release|Any CPU.ActiveCfg = Release|x64 + {C3A17DCA-217B-462C-BB0C-BE086AF80081}.Release|ARM.ActiveCfg = Release|x64 + {C3A17DCA-217B-462C-BB0C-BE086AF80081}.Release|ARM64.ActiveCfg = Release|x64 {C3A17DCA-217B-462C-BB0C-BE086AF80081}.Release|x64.ActiveCfg = Release|x64 {C3A17DCA-217B-462C-BB0C-BE086AF80081}.Release|x64.Build.0 = Release|x64 + {C3A17DCA-217B-462C-BB0C-BE086AF80081}.Release|x86.ActiveCfg = Release|x64 + {4BABF3FE-3451-42FD-873F-3C332E18DCEF}.Debug|Any CPU.ActiveCfg = Debug|x64 + {4BABF3FE-3451-42FD-873F-3C332E18DCEF}.Debug|ARM.ActiveCfg = Debug|x64 + {4BABF3FE-3451-42FD-873F-3C332E18DCEF}.Debug|ARM64.ActiveCfg = Debug|x64 {4BABF3FE-3451-42FD-873F-3C332E18DCEF}.Debug|x64.ActiveCfg = Debug|x64 {4BABF3FE-3451-42FD-873F-3C332E18DCEF}.Debug|x64.Build.0 = Debug|x64 + {4BABF3FE-3451-42FD-873F-3C332E18DCEF}.Debug|x86.ActiveCfg = Debug|x64 + {4BABF3FE-3451-42FD-873F-3C332E18DCEF}.Release|Any CPU.ActiveCfg = Release|x64 + {4BABF3FE-3451-42FD-873F-3C332E18DCEF}.Release|ARM.ActiveCfg = Release|x64 + {4BABF3FE-3451-42FD-873F-3C332E18DCEF}.Release|ARM64.ActiveCfg = Release|x64 {4BABF3FE-3451-42FD-873F-3C332E18DCEF}.Release|x64.ActiveCfg = Release|x64 {4BABF3FE-3451-42FD-873F-3C332E18DCEF}.Release|x64.Build.0 = Release|x64 + {4BABF3FE-3451-42FD-873F-3C332E18DCEF}.Release|x86.ActiveCfg = Release|x64 + {0648DF05-5DDA-4BE1-B5F2-584926EBDB65}.Debug|Any CPU.ActiveCfg = Debug|x64 + {0648DF05-5DDA-4BE1-B5F2-584926EBDB65}.Debug|ARM.ActiveCfg = Debug|x64 + {0648DF05-5DDA-4BE1-B5F2-584926EBDB65}.Debug|ARM64.ActiveCfg = Debug|x64 {0648DF05-5DDA-4BE1-B5F2-584926EBDB65}.Debug|x64.ActiveCfg = Debug|x64 {0648DF05-5DDA-4BE1-B5F2-584926EBDB65}.Debug|x64.Build.0 = Debug|x64 + {0648DF05-5DDA-4BE1-B5F2-584926EBDB65}.Debug|x86.ActiveCfg = Debug|x64 + {0648DF05-5DDA-4BE1-B5F2-584926EBDB65}.Release|Any CPU.ActiveCfg = Release|x64 + {0648DF05-5DDA-4BE1-B5F2-584926EBDB65}.Release|ARM.ActiveCfg = Release|x64 + {0648DF05-5DDA-4BE1-B5F2-584926EBDB65}.Release|ARM64.ActiveCfg = Release|x64 {0648DF05-5DDA-4BE1-B5F2-584926EBDB65}.Release|x64.ActiveCfg = Release|x64 {0648DF05-5DDA-4BE1-B5F2-584926EBDB65}.Release|x64.Build.0 = Release|x64 + {0648DF05-5DDA-4BE1-B5F2-584926EBDB65}.Release|x86.ActiveCfg = Release|x64 + {6ED2F4FC-E122-4CEE-90F1-97E4CCC8BC7A}.Debug|Any CPU.ActiveCfg = Debug|x64 + {6ED2F4FC-E122-4CEE-90F1-97E4CCC8BC7A}.Debug|ARM.ActiveCfg = Debug|x64 + {6ED2F4FC-E122-4CEE-90F1-97E4CCC8BC7A}.Debug|ARM64.ActiveCfg = Debug|x64 {6ED2F4FC-E122-4CEE-90F1-97E4CCC8BC7A}.Debug|x64.ActiveCfg = Debug|x64 {6ED2F4FC-E122-4CEE-90F1-97E4CCC8BC7A}.Debug|x64.Build.0 = Debug|x64 + {6ED2F4FC-E122-4CEE-90F1-97E4CCC8BC7A}.Debug|x86.ActiveCfg = Debug|x64 + {6ED2F4FC-E122-4CEE-90F1-97E4CCC8BC7A}.Release|Any CPU.ActiveCfg = Release|x64 + {6ED2F4FC-E122-4CEE-90F1-97E4CCC8BC7A}.Release|ARM.ActiveCfg = Release|x64 + {6ED2F4FC-E122-4CEE-90F1-97E4CCC8BC7A}.Release|ARM64.ActiveCfg = Release|x64 {6ED2F4FC-E122-4CEE-90F1-97E4CCC8BC7A}.Release|x64.ActiveCfg = Release|x64 {6ED2F4FC-E122-4CEE-90F1-97E4CCC8BC7A}.Release|x64.Build.0 = Release|x64 + {6ED2F4FC-E122-4CEE-90F1-97E4CCC8BC7A}.Release|x86.ActiveCfg = Release|x64 + {85ACDB61-82E7-4E98-872F-7E36EAD4C75F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {85ACDB61-82E7-4E98-872F-7E36EAD4C75F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {85ACDB61-82E7-4E98-872F-7E36EAD4C75F}.Debug|ARM.ActiveCfg = Debug|Any CPU + {85ACDB61-82E7-4E98-872F-7E36EAD4C75F}.Debug|ARM.Build.0 = Debug|Any CPU + {85ACDB61-82E7-4E98-872F-7E36EAD4C75F}.Debug|ARM64.ActiveCfg = Debug|Any CPU + {85ACDB61-82E7-4E98-872F-7E36EAD4C75F}.Debug|ARM64.Build.0 = Debug|Any CPU + {85ACDB61-82E7-4E98-872F-7E36EAD4C75F}.Debug|x64.ActiveCfg = Debug|Any CPU + {85ACDB61-82E7-4E98-872F-7E36EAD4C75F}.Debug|x64.Build.0 = Debug|Any CPU + {85ACDB61-82E7-4E98-872F-7E36EAD4C75F}.Debug|x86.ActiveCfg = Debug|Any CPU + {85ACDB61-82E7-4E98-872F-7E36EAD4C75F}.Debug|x86.Build.0 = Debug|Any CPU + {85ACDB61-82E7-4E98-872F-7E36EAD4C75F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {85ACDB61-82E7-4E98-872F-7E36EAD4C75F}.Release|Any CPU.Build.0 = Release|Any CPU + {85ACDB61-82E7-4E98-872F-7E36EAD4C75F}.Release|ARM.ActiveCfg = Release|Any CPU + {85ACDB61-82E7-4E98-872F-7E36EAD4C75F}.Release|ARM.Build.0 = Release|Any CPU + {85ACDB61-82E7-4E98-872F-7E36EAD4C75F}.Release|ARM64.ActiveCfg = Release|Any CPU + {85ACDB61-82E7-4E98-872F-7E36EAD4C75F}.Release|ARM64.Build.0 = Release|Any CPU + {85ACDB61-82E7-4E98-872F-7E36EAD4C75F}.Release|x64.ActiveCfg = Release|Any CPU + {85ACDB61-82E7-4E98-872F-7E36EAD4C75F}.Release|x64.Build.0 = Release|Any CPU + {85ACDB61-82E7-4E98-872F-7E36EAD4C75F}.Release|x86.ActiveCfg = Release|Any CPU + {85ACDB61-82E7-4E98-872F-7E36EAD4C75F}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -731,6 +1407,8 @@ Global {4BABF3FE-3451-42FD-873F-3C332E18DCEF} = {4AFC9975-2456-4C70-94A4-84073C1CED93} {0648DF05-5DDA-4BE1-B5F2-584926EBDB65} = {4AFC9975-2456-4C70-94A4-84073C1CED93} {6ED2F4FC-E122-4CEE-90F1-97E4CCC8BC7A} = {C3081D9A-1586-441A-B5F4-ED815B3719C1} + {29049A7A-30D5-4E37-9C4B-ABFF400CFB4D} = {4574FDD0-F61D-4376-98BF-E5A1262C11EC} + {85ACDB61-82E7-4E98-872F-7E36EAD4C75F} = {29049A7A-30D5-4E37-9C4B-ABFF400CFB4D} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {C3A2F9D1-7930-4EF4-A6FC-7EE0A99821D0} diff --git a/src/espresso/EspressoUI/App.xaml b/src/espresso/EspressoUI/App.xaml new file mode 100644 index 0000000000..6e57c4e3e8 --- /dev/null +++ b/src/espresso/EspressoUI/App.xaml @@ -0,0 +1,9 @@ + + + + + diff --git a/src/espresso/EspressoUI/App.xaml.cs b/src/espresso/EspressoUI/App.xaml.cs new file mode 100644 index 0000000000..ed1eb28242 --- /dev/null +++ b/src/espresso/EspressoUI/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 EspressoUI +{ + /// + /// Interaction logic for App.xaml + /// + public partial class App : Application + { + } +} diff --git a/src/espresso/EspressoUI/AssemblyInfo.cs b/src/espresso/EspressoUI/AssemblyInfo.cs new file mode 100644 index 0000000000..8b5504ecfb --- /dev/null +++ b/src/espresso/EspressoUI/AssemblyInfo.cs @@ -0,0 +1,10 @@ +using System.Windows; + +[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) +)] diff --git a/src/espresso/EspressoUI/EspressoUI.csproj b/src/espresso/EspressoUI/EspressoUI.csproj new file mode 100644 index 0000000000..8ba1d0db41 --- /dev/null +++ b/src/espresso/EspressoUI/EspressoUI.csproj @@ -0,0 +1,9 @@ + + + + WinExe + netcoreapp3.1 + true + + + diff --git a/src/espresso/EspressoUI/LocProject.json b/src/espresso/EspressoUI/LocProject.json new file mode 100644 index 0000000000..98f95e8e31 --- /dev/null +++ b/src/espresso/EspressoUI/LocProject.json @@ -0,0 +1,14 @@ +{ + "Projects": [ + { + "LanguageSet": "Azure_Languages", + "LocItems": [ + { + "SourceFile": "src\\modules\\espresso\\EspressoUI\\Properties\\Resources.resx", + "CopyOption": "LangIDOnName", + "OutputPath": "src\\modules\\espresso\\EspressoUI\\Properties" + } + ] + } + ] +} diff --git a/src/espresso/EspressoUI/MainWindow.xaml b/src/espresso/EspressoUI/MainWindow.xaml new file mode 100644 index 0000000000..8e502b846e --- /dev/null +++ b/src/espresso/EspressoUI/MainWindow.xaml @@ -0,0 +1,12 @@ + + + + + diff --git a/src/espresso/EspressoUI/MainWindow.xaml.cs b/src/espresso/EspressoUI/MainWindow.xaml.cs new file mode 100644 index 0000000000..ba0b02dac0 --- /dev/null +++ b/src/espresso/EspressoUI/MainWindow.xaml.cs @@ -0,0 +1,28 @@ +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.Navigation; +using System.Windows.Shapes; + +namespace EspressoUI +{ + /// + /// Interaction logic for MainWindow.xaml + /// + public partial class MainWindow : Window + { + public MainWindow() + { + InitializeComponent(); + } + } +} From 1840cc9b62b402cab19ceda9be81ad6af494c62e Mon Sep 17 00:00:00 2001 From: Den Delimarsky <1389609+dend@users.noreply.github.com> Date: Wed, 10 Mar 2021 08:16:34 -0800 Subject: [PATCH 02/81] Getting the settings UI to show Espresso. --- src/espresso/EspressoUI/EspressoUI.csproj | 25 ++++ src/espresso/EspressoUI/Themes/Dark.xaml | 18 +++ .../EspressoUI/Themes/HighContrast1.xaml | 18 +++ .../EspressoUI/Themes/HighContrast2.xaml | 19 +++ .../EspressoUI/Themes/HighContrastBlack.xaml | 18 +++ .../EspressoUI/Themes/HighContrastWhite.xaml | 18 +++ src/espresso/EspressoUI/Themes/Light.xaml | 18 +++ .../Microsoft.PowerToys.Settings.UI.csproj | 7 ++ .../Strings/en-us/Resources.resw | 4 + .../Views/EspressoPage.xaml | 113 ++++++++++++++++++ .../Views/EspressoPage.xaml.cs | 20 ++++ .../Views/ShellPage.xaml | 6 + 12 files changed, 284 insertions(+) create mode 100644 src/espresso/EspressoUI/Themes/Dark.xaml create mode 100644 src/espresso/EspressoUI/Themes/HighContrast1.xaml create mode 100644 src/espresso/EspressoUI/Themes/HighContrast2.xaml create mode 100644 src/espresso/EspressoUI/Themes/HighContrastBlack.xaml create mode 100644 src/espresso/EspressoUI/Themes/HighContrastWhite.xaml create mode 100644 src/espresso/EspressoUI/Themes/Light.xaml create mode 100644 src/settings-ui/Microsoft.PowerToys.Settings.UI/Views/EspressoPage.xaml create mode 100644 src/settings-ui/Microsoft.PowerToys.Settings.UI/Views/EspressoPage.xaml.cs diff --git a/src/espresso/EspressoUI/EspressoUI.csproj b/src/espresso/EspressoUI/EspressoUI.csproj index 8ba1d0db41..41864b724f 100644 --- a/src/espresso/EspressoUI/EspressoUI.csproj +++ b/src/espresso/EspressoUI/EspressoUI.csproj @@ -6,4 +6,29 @@ true + + + + + + + $(DefaultXamlRuntime) + + + $(DefaultXamlRuntime) + + + $(DefaultXamlRuntime) + + + $(DefaultXamlRuntime) + + + $(DefaultXamlRuntime) + + + $(DefaultXamlRuntime) + + + diff --git a/src/espresso/EspressoUI/Themes/Dark.xaml b/src/espresso/EspressoUI/Themes/Dark.xaml new file mode 100644 index 0000000000..f0d0cb1339 --- /dev/null +++ b/src/espresso/EspressoUI/Themes/Dark.xaml @@ -0,0 +1,18 @@ + + + + Dark.Accent1 + PowerToysImageResizer + Accent1 (Dark) + Dark + Accent1 + Black + + + + + + + \ No newline at end of file diff --git a/src/espresso/EspressoUI/Themes/HighContrast1.xaml b/src/espresso/EspressoUI/Themes/HighContrast1.xaml new file mode 100644 index 0000000000..7bfaf2e19d --- /dev/null +++ b/src/espresso/EspressoUI/Themes/HighContrast1.xaml @@ -0,0 +1,18 @@ + + + + HighContrast.Accent2 + PowerToysImageResizer + Accent2 (HighContrast) + HighContrast + Accent2 + White + + + + + + + \ No newline at end of file diff --git a/src/espresso/EspressoUI/Themes/HighContrast2.xaml b/src/espresso/EspressoUI/Themes/HighContrast2.xaml new file mode 100644 index 0000000000..15f7f1b639 --- /dev/null +++ b/src/espresso/EspressoUI/Themes/HighContrast2.xaml @@ -0,0 +1,19 @@ + + + + HighContrast.Accent3 + PowerToysImageResizer + Accent3 (HighContrast) + HighContrast + Accent3 + White + + + + + + + + \ No newline at end of file diff --git a/src/espresso/EspressoUI/Themes/HighContrastBlack.xaml b/src/espresso/EspressoUI/Themes/HighContrastBlack.xaml new file mode 100644 index 0000000000..3f5458dabb --- /dev/null +++ b/src/espresso/EspressoUI/Themes/HighContrastBlack.xaml @@ -0,0 +1,18 @@ + + + + HighContrast.Accent4 + PowerToysImageResizer + Accent4 (HighContrast) + HighContrast + Accent4 + White + + + + + + + \ No newline at end of file diff --git a/src/espresso/EspressoUI/Themes/HighContrastWhite.xaml b/src/espresso/EspressoUI/Themes/HighContrastWhite.xaml new file mode 100644 index 0000000000..40ccf7f047 --- /dev/null +++ b/src/espresso/EspressoUI/Themes/HighContrastWhite.xaml @@ -0,0 +1,18 @@ + + + + HighContrast.Accent5 + PowerToysImageResizer + Accent5 (HighContrast) + HighContrast + Accent5 + White + + + + + + + \ No newline at end of file diff --git a/src/espresso/EspressoUI/Themes/Light.xaml b/src/espresso/EspressoUI/Themes/Light.xaml new file mode 100644 index 0000000000..9b8e55a430 --- /dev/null +++ b/src/espresso/EspressoUI/Themes/Light.xaml @@ -0,0 +1,18 @@ + + + + Light.Accent1 + PowerToysImageResizer + Accent1 (Light) + Light + Accent1 + White + + + + + + + \ No newline at end of file diff --git a/src/settings-ui/Microsoft.PowerToys.Settings.UI/Microsoft.PowerToys.Settings.UI.csproj b/src/settings-ui/Microsoft.PowerToys.Settings.UI/Microsoft.PowerToys.Settings.UI.csproj index c6c91d8a9a..694b388dfc 100644 --- a/src/settings-ui/Microsoft.PowerToys.Settings.UI/Microsoft.PowerToys.Settings.UI.csproj +++ b/src/settings-ui/Microsoft.PowerToys.Settings.UI/Microsoft.PowerToys.Settings.UI.csproj @@ -151,6 +151,9 @@ + + EspressoPage.xaml + ColorPickerPage.xaml @@ -344,6 +347,10 @@ MSBuild:Compile Designer + + MSBuild:Compile + Designer + Designer MSBuild:Compile diff --git a/src/settings-ui/Microsoft.PowerToys.Settings.UI/Strings/en-us/Resources.resw b/src/settings-ui/Microsoft.PowerToys.Settings.UI/Strings/en-us/Resources.resw index 10af378234..f03f4f34a0 100644 --- a/src/settings-ui/Microsoft.PowerToys.Settings.UI/Strings/en-us/Resources.resw +++ b/src/settings-ui/Microsoft.PowerToys.Settings.UI/Strings/en-us/Resources.resw @@ -121,6 +121,10 @@ General Navigation view item name for General + + Espresso + Product name: Navigation view item name for Espresso + PowerToys Run Product name: Navigation view item name for PowerToys Run diff --git a/src/settings-ui/Microsoft.PowerToys.Settings.UI/Views/EspressoPage.xaml b/src/settings-ui/Microsoft.PowerToys.Settings.UI/Views/EspressoPage.xaml new file mode 100644 index 0000000000..2e48e226c2 --- /dev/null +++ b/src/settings-ui/Microsoft.PowerToys.Settings.UI/Views/EspressoPage.xaml @@ -0,0 +1,113 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/settings-ui/Microsoft.PowerToys.Settings.UI/Views/EspressoPage.xaml.cs b/src/settings-ui/Microsoft.PowerToys.Settings.UI/Views/EspressoPage.xaml.cs new file mode 100644 index 0000000000..84bec4bf0e --- /dev/null +++ b/src/settings-ui/Microsoft.PowerToys.Settings.UI/Views/EspressoPage.xaml.cs @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation +// The Microsoft Corporation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.IO.Abstractions; +using Microsoft.PowerToys.Settings.UI.Library; +using Microsoft.PowerToys.Settings.UI.Library.ViewModels; +using Windows.UI.Xaml.Controls; + +namespace Microsoft.PowerToys.Settings.UI.Views +{ + public sealed partial class EspressoPage : Page + { + public EspressoPage() + { + var settingsUtils = new SettingsUtils(); + InitializeComponent(); + } + } +} diff --git a/src/settings-ui/Microsoft.PowerToys.Settings.UI/Views/ShellPage.xaml b/src/settings-ui/Microsoft.PowerToys.Settings.UI/Views/ShellPage.xaml index 96a250ed32..3d99a81869 100644 --- a/src/settings-ui/Microsoft.PowerToys.Settings.UI/Views/ShellPage.xaml +++ b/src/settings-ui/Microsoft.PowerToys.Settings.UI/Views/ShellPage.xaml @@ -78,6 +78,12 @@ + + + + + + From b4b4b3f95f6ab286d628c95d36a750218735143c Mon Sep 17 00:00:00 2001 From: Den Delimarsky <1389609+dend@users.noreply.github.com> Date: Wed, 10 Mar 2021 08:30:02 -0800 Subject: [PATCH 03/81] Fix icon --- .../Microsoft.PowerToys.Settings.UI/Views/ShellPage.xaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/settings-ui/Microsoft.PowerToys.Settings.UI/Views/ShellPage.xaml b/src/settings-ui/Microsoft.PowerToys.Settings.UI/Views/ShellPage.xaml index 3d99a81869..df59fc728d 100644 --- a/src/settings-ui/Microsoft.PowerToys.Settings.UI/Views/ShellPage.xaml +++ b/src/settings-ui/Microsoft.PowerToys.Settings.UI/Views/ShellPage.xaml @@ -80,7 +80,7 @@ - + From 2304eff3ca41e7eba03f05728a7124840ca9e6bb Mon Sep 17 00:00:00 2001 From: Den Delimarsky <1389609+dend@users.noreply.github.com> Date: Tue, 23 Mar 2021 08:11:49 -0700 Subject: [PATCH 04/81] Fiddling with settings to make sure I can connect them to the app --- .../Strings/en-us/Resources.resw | 24 +++++++++++ .../Views/EspressoPage.xaml | 42 +++++++++++++++---- 2 files changed, 58 insertions(+), 8 deletions(-) diff --git a/src/settings-ui/Microsoft.PowerToys.Settings.UI/Strings/en-us/Resources.resw b/src/settings-ui/Microsoft.PowerToys.Settings.UI/Strings/en-us/Resources.resw index f03f4f34a0..a718b54ded 100644 --- a/src/settings-ui/Microsoft.PowerToys.Settings.UI/Strings/en-us/Resources.resw +++ b/src/settings-ui/Microsoft.PowerToys.Settings.UI/Strings/en-us/Resources.resw @@ -1155,4 +1155,28 @@ Win + Shift + O to toggle your video PowerToys Settings + + About Espresso + + + A convenient way to keep your computer awake on-demand. + + + Enable Espresso + + + Keep awake indefinitely + + + Keep awake temporarily + + + Keeps the computer awake until the setting is disabled. + + + Keeps the computer awake until the set time elapses. + + + Keep display on + \ No newline at end of file diff --git a/src/settings-ui/Microsoft.PowerToys.Settings.UI/Views/EspressoPage.xaml b/src/settings-ui/Microsoft.PowerToys.Settings.UI/Views/EspressoPage.xaml index 2e48e226c2..97a059e3b0 100644 --- a/src/settings-ui/Microsoft.PowerToys.Settings.UI/Views/EspressoPage.xaml +++ b/src/settings-ui/Microsoft.PowerToys.Settings.UI/Views/EspressoPage.xaml @@ -53,20 +53,46 @@ HorizontalAlignment="Left" Margin="0,0,48,0" MaxWidth="{StaticResource MaxContentWidth}"> + + + - + + + + + + + + + + + + + + + + + + + + - - @@ -78,15 +104,15 @@ HorizontalAlignment="Left" Margin="{StaticResource SmallTopBottomMargin}" RelativePanel.Below="DescriptionPanel"> - - + + - + @@ -98,8 +124,8 @@ Style="{StaticResource SettingsGroupTitleStyle}" /> - + NavigateUri="https://github.com/microsoft/PowerToys/"> + Date: Wed, 24 Mar 2021 07:42:15 -0700 Subject: [PATCH 05/81] Add property storage capabilities --- .../EspressoProperties.cs | 33 ++ .../EspressoSettings.cs | 32 ++ .../ViewModels/EspressoViewModel.cs | 359 ++++++++++++++++++ 3 files changed, 424 insertions(+) create mode 100644 src/settings-ui/Microsoft.PowerToys.Settings.UI.Library/EspressoProperties.cs create mode 100644 src/settings-ui/Microsoft.PowerToys.Settings.UI.Library/EspressoSettings.cs create mode 100644 src/settings-ui/Microsoft.PowerToys.Settings.UI.Library/ViewModels/EspressoViewModel.cs diff --git a/src/settings-ui/Microsoft.PowerToys.Settings.UI.Library/EspressoProperties.cs b/src/settings-ui/Microsoft.PowerToys.Settings.UI.Library/EspressoProperties.cs new file mode 100644 index 0000000000..5aeb884a2c --- /dev/null +++ b/src/settings-ui/Microsoft.PowerToys.Settings.UI.Library/EspressoProperties.cs @@ -0,0 +1,33 @@ +using System.Text.Json.Serialization; + +namespace Microsoft.PowerToys.Settings.UI.Library +{ + public class EspressoProperties + { + public EspressoProperties() + { + IsEnabled = new BoolProperty(); + KeepDisplayOn = new BoolProperty(); + Mode = EspressoMode.INDEFINITE; + TimeAllocation = new IntProperty(); + } + + [JsonPropertyName("espresso_is_enabled")] + public BoolProperty IsEnabled { get; set; } + + [JsonPropertyName("espresso_keep_display_on")] + public BoolProperty KeepDisplayOn { get; set; } + + [JsonPropertyName("espresso_mode")] + public EspressoMode Mode { get; set; } + + [JsonPropertyName("espresso_time_allocation")] + public IntProperty TimeAllocation { get; set; } + } + + public enum EspressoMode + { + INDEFINITE = 0, + TIMED = 1, + } +} diff --git a/src/settings-ui/Microsoft.PowerToys.Settings.UI.Library/EspressoSettings.cs b/src/settings-ui/Microsoft.PowerToys.Settings.UI.Library/EspressoSettings.cs new file mode 100644 index 0000000000..8fc54b5711 --- /dev/null +++ b/src/settings-ui/Microsoft.PowerToys.Settings.UI.Library/EspressoSettings.cs @@ -0,0 +1,32 @@ +using System; +using System.Text.Json.Serialization; +using Microsoft.PowerToys.Settings.UI.Library.Interfaces; + +namespace Microsoft.PowerToys.Settings.UI.Library +{ + public class EspressoSettings : BasePTModuleSettings, ISettingsConfig + { + public const string ModuleName = "Espresso"; + public const string ModuleVersion = "1.0.0"; + + public EspressoSettings() + { + Name = ModuleName; + Version = ModuleVersion; + Properties = new EspressoProperties(); + } + + [JsonPropertyName("properties")] + public EspressoProperties Properties { get; set; } + + public string GetModuleName() + { + return Name; + } + + public bool UpgradeSettingsConfiguration() + { + return false; + } + } +} diff --git a/src/settings-ui/Microsoft.PowerToys.Settings.UI.Library/ViewModels/EspressoViewModel.cs b/src/settings-ui/Microsoft.PowerToys.Settings.UI.Library/ViewModels/EspressoViewModel.cs new file mode 100644 index 0000000000..207b75edfa --- /dev/null +++ b/src/settings-ui/Microsoft.PowerToys.Settings.UI.Library/ViewModels/EspressoViewModel.cs @@ -0,0 +1,359 @@ +using System; +using Microsoft.PowerToys.Settings.UI.Library.Helpers; + +namespace Microsoft.PowerToys.Settings.UI.Library.ViewModels +{ + public class EspressoViewModel : Observable + { + private GeneralSettings GeneralSettingsConfig { get; set; } + private readonly ISettingsUtils _settingsUtils; + private Func SendConfigMSG { get; } + + [SuppressMessage("Design", "CA1031:Do not catch general exception types", Justification = "Exceptions should not crash the program but will be logged until we can understand common exception scenarios")] + public ImageResizerViewModel(ISettingsUtils settingsUtils, ISettingsRepository settingsRepository, Func ipcMSGCallBackFunc, Func resourceLoader) + { + _settingsUtils = settingsUtils ?? throw new ArgumentNullException(nameof(settingsUtils)); + + // To obtain the general settings configurations of PowerToys. + if (settingsRepository == null) + { + throw new ArgumentNullException(nameof(settingsRepository)); + } + + GeneralSettingsConfig = settingsRepository.SettingsConfig; + + try + { + Settings = _settingsUtils.GetSettings(ModuleName); + } + catch (Exception e) + { + Logger.LogError($"Exception encountered while reading {ModuleName} settings.", e); +#if DEBUG + if (e is ArgumentException || e is ArgumentNullException || e is PathTooLongException) + { + throw; + } +#endif + Settings = new ImageResizerSettings(resourceLoader); + _settingsUtils.SaveSettings(Settings.ToJsonString(), ModuleName); + } + + // set the callback functions value to hangle outgoing IPC message. + SendConfigMSG = ipcMSGCallBackFunc; + + _isEnabled = GeneralSettingsConfig.Enabled.ImageResizer; + _advancedSizes = Settings.Properties.ImageresizerSizes.Value; + _jpegQualityLevel = Settings.Properties.ImageresizerJpegQualityLevel.Value; + _pngInterlaceOption = Settings.Properties.ImageresizerPngInterlaceOption.Value; + _tiffCompressOption = Settings.Properties.ImageresizerTiffCompressOption.Value; + _fileName = Settings.Properties.ImageresizerFileName.Value; + _keepDateModified = Settings.Properties.ImageresizerKeepDateModified.Value; + _encoderGuidId = GetEncoderIndex(Settings.Properties.ImageresizerFallbackEncoder.Value); + + int i = 0; + foreach (ImageSize size in _advancedSizes) + { + size.Id = i; + i++; + size.PropertyChanged += SizePropertyChanged; + } + } + + private bool _isEnabled; + private ObservableCollection _advancedSizes = new ObservableCollection(); + private int _jpegQualityLevel; + private int _pngInterlaceOption; + private int _tiffCompressOption; + private string _fileName; + private bool _keepDateModified; + private int _encoderGuidId; + + public bool IsListViewFocusRequested { get; set; } + + public bool IsEnabled + { + get + { + return _isEnabled; + } + + set + { + if (value != _isEnabled) + { + // To set the status of ImageResizer in the General PowerToys settings. + _isEnabled = value; + GeneralSettingsConfig.Enabled.ImageResizer = value; + OutGoingGeneralSettings snd = new OutGoingGeneralSettings(GeneralSettingsConfig); + + SendConfigMSG(snd.ToString()); + OnPropertyChanged(nameof(IsEnabled)); + } + } + } + +#pragma warning disable CA2227 // Collection properties should be read only + public ObservableCollection Sizes +#pragma warning restore CA2227 // Collection properties should be read only + { + get + { + return _advancedSizes; + } + + // FxCop demands collection properties to be read-only, but this + // setter is used in autogenerated files (ImageResizerPage.g.cs) + // and replacing the setter with its own method will break the file + set + { + SavesImageSizes(value); + _advancedSizes = value; + OnPropertyChanged(nameof(Sizes)); + } + } + + public int JPEGQualityLevel + { + get + { + return _jpegQualityLevel; + } + + set + { + if (_jpegQualityLevel != value) + { + _jpegQualityLevel = value; + Settings.Properties.ImageresizerJpegQualityLevel.Value = value; + _settingsUtils.SaveSettings(Settings.ToJsonString(), ModuleName); + OnPropertyChanged(nameof(JPEGQualityLevel)); + } + } + } + + public int PngInterlaceOption + { + get + { + return _pngInterlaceOption; + } + + set + { + if (_pngInterlaceOption != value) + { + _pngInterlaceOption = value; + Settings.Properties.ImageresizerPngInterlaceOption.Value = value; + _settingsUtils.SaveSettings(Settings.ToJsonString(), ModuleName); + OnPropertyChanged(nameof(PngInterlaceOption)); + } + } + } + + public int TiffCompressOption + { + get + { + return _tiffCompressOption; + } + + set + { + if (_tiffCompressOption != value) + { + _tiffCompressOption = value; + Settings.Properties.ImageresizerTiffCompressOption.Value = value; + _settingsUtils.SaveSettings(Settings.ToJsonString(), ModuleName); + OnPropertyChanged(nameof(TiffCompressOption)); + } + } + } + + public string FileName + { + get + { + return _fileName; + } + + set + { + if (!string.IsNullOrWhiteSpace(value)) + { + _fileName = value; + Settings.Properties.ImageresizerFileName.Value = value; + _settingsUtils.SaveSettings(Settings.ToJsonString(), ModuleName); + OnPropertyChanged(nameof(FileName)); + } + } + } + + public bool KeepDateModified + { + get + { + return _keepDateModified; + } + + set + { + _keepDateModified = value; + Settings.Properties.ImageresizerKeepDateModified.Value = value; + _settingsUtils.SaveSettings(Settings.ToJsonString(), ModuleName); + OnPropertyChanged(nameof(KeepDateModified)); + } + } + + public int Encoder + { + get + { + return _encoderGuidId; + } + + set + { + if (_encoderGuidId != value) + { + _encoderGuidId = value; + _settingsUtils.SaveSettings(Settings.Properties.ImageresizerSizes.ToJsonString(), ModuleName, "sizes.json"); + Settings.Properties.ImageresizerFallbackEncoder.Value = GetEncoderGuid(value); + _settingsUtils.SaveSettings(Settings.ToJsonString(), ModuleName); + OnPropertyChanged(nameof(Encoder)); + } + } + } + + public string EncoderGuid + { + get + { + return ImageResizerViewModel.GetEncoderGuid(_encoderGuidId); + } + } + + public void AddRow() + { + ObservableCollection imageSizes = Sizes; + int maxId = imageSizes.Count > 0 ? imageSizes.OrderBy(x => x.Id).Last().Id : -1; + ImageSize newSize = new ImageSize(maxId + 1); + newSize.PropertyChanged += SizePropertyChanged; + imageSizes.Add(newSize); + _advancedSizes = imageSizes; + SavesImageSizes(imageSizes); + + // Set the focus requested flag to indicate that an add operation has occurred during the ContainerContentChanging event + IsListViewFocusRequested = true; + } + + public void DeleteImageSize(int id) + { + ImageSize size = _advancedSizes.Where(x => x.Id == id).First(); + ObservableCollection imageSizes = Sizes; + imageSizes.Remove(size); + + _advancedSizes = imageSizes; + SavesImageSizes(imageSizes); + } + + public void SavesImageSizes(ObservableCollection imageSizes) + { + _settingsUtils.SaveSettings(Settings.Properties.ImageresizerSizes.ToJsonString(), ModuleName, "sizes.json"); + Settings.Properties.ImageresizerSizes = new ImageResizerSizes(imageSizes); + _settingsUtils.SaveSettings(Settings.ToJsonString(), ModuleName); + } + + public static string GetEncoderGuid(int value) + { + // PNG Encoder guid + if (value == 0) + { + return "1b7cfaf4-713f-473c-bbcd-6137425faeaf"; + } + + // Bitmap Encoder guid + else if (value == 1) + { + return "0af1d87e-fcfe-4188-bdeb-a7906471cbe3"; + } + + // JPEG Encoder guid + else if (value == 2) + { + return "19e4a5aa-5662-4fc5-a0c0-1758028e1057"; + } + + // Tiff encoder guid. + else if (value == 3) + { + return "163bcc30-e2e9-4f0b-961d-a3e9fdb788a3"; + } + + // Tiff encoder guid. + else if (value == 4) + { + return "57a37caa-367a-4540-916b-f183c5093a4b"; + } + + // Gif encoder guid. + else if (value == 5) + { + return "1f8a5601-7d4d-4cbd-9c82-1bc8d4eeb9a5"; + } + + return null; + } + + public static int GetEncoderIndex(string value) + { + // PNG Encoder guid + if (value == "1b7cfaf4-713f-473c-bbcd-6137425faeaf") + { + return 0; + } + + // Bitmap Encoder guid + else if (value == "0af1d87e-fcfe-4188-bdeb-a7906471cbe3") + { + return 1; + } + + // JPEG Encoder guid + else if (value == "19e4a5aa-5662-4fc5-a0c0-1758028e1057") + { + return 2; + } + + // Tiff encoder guid. + else if (value == "163bcc30-e2e9-4f0b-961d-a3e9fdb788a3") + { + return 3; + } + + // Tiff encoder guid. + else if (value == "57a37caa-367a-4540-916b-f183c5093a4b") + { + return 4; + } + + // Gif encoder guid. + else if (value == "1f8a5601-7d4d-4cbd-9c82-1bc8d4eeb9a5") + { + return 5; + } + + return -1; + } + + public void SizePropertyChanged(object sender, PropertyChangedEventArgs e) + { + ImageSize modifiedSize = (ImageSize)sender; + ObservableCollection imageSizes = Sizes; + imageSizes.Where(x => x.Id == modifiedSize.Id).First().Update(modifiedSize); + _advancedSizes = imageSizes; + SavesImageSizes(imageSizes); + } + } +} +} From ee932450dfe7c8118339ba49d5344719f31e31d0 Mon Sep 17 00:00:00 2001 From: Den Delimarsky <1389609+dend@users.noreply.github.com> Date: Wed, 24 Mar 2021 08:10:37 -0700 Subject: [PATCH 06/81] Update to settings logic. Also making sure that the proper headers are set, and that all extraneous content is removed where not necessary. This should get the foundation going for the initial set of settings, and enables me to connect the view model to the settings UI. --- .../EnabledModules.cs | 16 + .../EspressoProperties.cs | 6 +- .../EspressoSettings.cs | 5 +- .../ViewModels/EspressoViewModel.cs | 359 ++---------------- .../Views/EspressoPage.xaml | 4 + .../Views/EspressoPage.xaml.cs | 4 + 6 files changed, 61 insertions(+), 333 deletions(-) diff --git a/src/settings-ui/Microsoft.PowerToys.Settings.UI.Library/EnabledModules.cs b/src/settings-ui/Microsoft.PowerToys.Settings.UI.Library/EnabledModules.cs index 1fadcb961b..2167d610bc 100644 --- a/src/settings-ui/Microsoft.PowerToys.Settings.UI.Library/EnabledModules.cs +++ b/src/settings-ui/Microsoft.PowerToys.Settings.UI.Library/EnabledModules.cs @@ -143,6 +143,22 @@ namespace Microsoft.PowerToys.Settings.UI.Library } } + private bool espresso = true; + + [JsonPropertyName("Espresso")] + public bool Espresso + { + get => espresso; + set + { + if (espresso != value) + { + LogTelemetryEvent(value); + espresso = value; + } + } + } + public string ToJsonString() { return JsonSerializer.Serialize(this); diff --git a/src/settings-ui/Microsoft.PowerToys.Settings.UI.Library/EspressoProperties.cs b/src/settings-ui/Microsoft.PowerToys.Settings.UI.Library/EspressoProperties.cs index 5aeb884a2c..7fe4995736 100644 --- a/src/settings-ui/Microsoft.PowerToys.Settings.UI.Library/EspressoProperties.cs +++ b/src/settings-ui/Microsoft.PowerToys.Settings.UI.Library/EspressoProperties.cs @@ -1,4 +1,8 @@ -using System.Text.Json.Serialization; +// Copyright (c) Microsoft Corporation +// The Microsoft Corporation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Text.Json.Serialization; namespace Microsoft.PowerToys.Settings.UI.Library { diff --git a/src/settings-ui/Microsoft.PowerToys.Settings.UI.Library/EspressoSettings.cs b/src/settings-ui/Microsoft.PowerToys.Settings.UI.Library/EspressoSettings.cs index 8fc54b5711..63e84e9196 100644 --- a/src/settings-ui/Microsoft.PowerToys.Settings.UI.Library/EspressoSettings.cs +++ b/src/settings-ui/Microsoft.PowerToys.Settings.UI.Library/EspressoSettings.cs @@ -1,4 +1,7 @@ -using System; +// Copyright (c) Microsoft Corporation +// The Microsoft Corporation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + using System.Text.Json.Serialization; using Microsoft.PowerToys.Settings.UI.Library.Interfaces; diff --git a/src/settings-ui/Microsoft.PowerToys.Settings.UI.Library/ViewModels/EspressoViewModel.cs b/src/settings-ui/Microsoft.PowerToys.Settings.UI.Library/ViewModels/EspressoViewModel.cs index 207b75edfa..e6979ee6f5 100644 --- a/src/settings-ui/Microsoft.PowerToys.Settings.UI.Library/ViewModels/EspressoViewModel.cs +++ b/src/settings-ui/Microsoft.PowerToys.Settings.UI.Library/ViewModels/EspressoViewModel.cs @@ -1,359 +1,56 @@ -using System; +// Copyright (c) Microsoft Corporation +// The Microsoft Corporation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System; +using System.Diagnostics.CodeAnalysis; using Microsoft.PowerToys.Settings.UI.Library.Helpers; +using Microsoft.PowerToys.Settings.UI.Library.Interfaces; namespace Microsoft.PowerToys.Settings.UI.Library.ViewModels { public class EspressoViewModel : Observable { private GeneralSettings GeneralSettingsConfig { get; set; } - private readonly ISettingsUtils _settingsUtils; + + private EspressoSettings Settings { get; set; } + + private string settingsConfigFileFolder = string.Empty; + private Func SendConfigMSG { get; } - [SuppressMessage("Design", "CA1031:Do not catch general exception types", Justification = "Exceptions should not crash the program but will be logged until we can understand common exception scenarios")] - public ImageResizerViewModel(ISettingsUtils settingsUtils, ISettingsRepository settingsRepository, Func ipcMSGCallBackFunc, Func resourceLoader) + public EspressoViewModel(ISettingsRepository settingsRepository, ISettingsRepository moduleSettingsRepository, Func ipcMSGCallBackFunc, string configFileSubfolder = "") { - _settingsUtils = settingsUtils ?? throw new ArgumentNullException(nameof(settingsUtils)); - - // To obtain the general settings configurations of PowerToys. + // To obtain the general settings configurations of PowerToys Settings. if (settingsRepository == null) { throw new ArgumentNullException(nameof(settingsRepository)); } GeneralSettingsConfig = settingsRepository.SettingsConfig; + settingsConfigFileFolder = configFileSubfolder; - try + // To obtain the settings configurations of Fancy zones. + if (moduleSettingsRepository == null) { - Settings = _settingsUtils.GetSettings(ModuleName); - } - catch (Exception e) - { - Logger.LogError($"Exception encountered while reading {ModuleName} settings.", e); -#if DEBUG - if (e is ArgumentException || e is ArgumentNullException || e is PathTooLongException) - { - throw; - } -#endif - Settings = new ImageResizerSettings(resourceLoader); - _settingsUtils.SaveSettings(Settings.ToJsonString(), ModuleName); + throw new ArgumentNullException(nameof(moduleSettingsRepository)); } + Settings = moduleSettingsRepository.SettingsConfig; + + _keepDisplayOn = Settings.Properties.KeepDisplayOn.Value; + _mode = Settings.Properties.Mode; + _timeAllocation = Settings.Properties.TimeAllocation.Value; + // set the callback functions value to hangle outgoing IPC message. SendConfigMSG = ipcMSGCallBackFunc; - _isEnabled = GeneralSettingsConfig.Enabled.ImageResizer; - _advancedSizes = Settings.Properties.ImageresizerSizes.Value; - _jpegQualityLevel = Settings.Properties.ImageresizerJpegQualityLevel.Value; - _pngInterlaceOption = Settings.Properties.ImageresizerPngInterlaceOption.Value; - _tiffCompressOption = Settings.Properties.ImageresizerTiffCompressOption.Value; - _fileName = Settings.Properties.ImageresizerFileName.Value; - _keepDateModified = Settings.Properties.ImageresizerKeepDateModified.Value; - _encoderGuidId = GetEncoderIndex(Settings.Properties.ImageresizerFallbackEncoder.Value); - - int i = 0; - foreach (ImageSize size in _advancedSizes) - { - size.Id = i; - i++; - size.PropertyChanged += SizePropertyChanged; - } + _isEnabled = GeneralSettingsConfig.Enabled.Espresso; } private bool _isEnabled; - private ObservableCollection _advancedSizes = new ObservableCollection(); - private int _jpegQualityLevel; - private int _pngInterlaceOption; - private int _tiffCompressOption; - private string _fileName; - private bool _keepDateModified; - private int _encoderGuidId; - - public bool IsListViewFocusRequested { get; set; } - - public bool IsEnabled - { - get - { - return _isEnabled; - } - - set - { - if (value != _isEnabled) - { - // To set the status of ImageResizer in the General PowerToys settings. - _isEnabled = value; - GeneralSettingsConfig.Enabled.ImageResizer = value; - OutGoingGeneralSettings snd = new OutGoingGeneralSettings(GeneralSettingsConfig); - - SendConfigMSG(snd.ToString()); - OnPropertyChanged(nameof(IsEnabled)); - } - } - } - -#pragma warning disable CA2227 // Collection properties should be read only - public ObservableCollection Sizes -#pragma warning restore CA2227 // Collection properties should be read only - { - get - { - return _advancedSizes; - } - - // FxCop demands collection properties to be read-only, but this - // setter is used in autogenerated files (ImageResizerPage.g.cs) - // and replacing the setter with its own method will break the file - set - { - SavesImageSizes(value); - _advancedSizes = value; - OnPropertyChanged(nameof(Sizes)); - } - } - - public int JPEGQualityLevel - { - get - { - return _jpegQualityLevel; - } - - set - { - if (_jpegQualityLevel != value) - { - _jpegQualityLevel = value; - Settings.Properties.ImageresizerJpegQualityLevel.Value = value; - _settingsUtils.SaveSettings(Settings.ToJsonString(), ModuleName); - OnPropertyChanged(nameof(JPEGQualityLevel)); - } - } - } - - public int PngInterlaceOption - { - get - { - return _pngInterlaceOption; - } - - set - { - if (_pngInterlaceOption != value) - { - _pngInterlaceOption = value; - Settings.Properties.ImageresizerPngInterlaceOption.Value = value; - _settingsUtils.SaveSettings(Settings.ToJsonString(), ModuleName); - OnPropertyChanged(nameof(PngInterlaceOption)); - } - } - } - - public int TiffCompressOption - { - get - { - return _tiffCompressOption; - } - - set - { - if (_tiffCompressOption != value) - { - _tiffCompressOption = value; - Settings.Properties.ImageresizerTiffCompressOption.Value = value; - _settingsUtils.SaveSettings(Settings.ToJsonString(), ModuleName); - OnPropertyChanged(nameof(TiffCompressOption)); - } - } - } - - public string FileName - { - get - { - return _fileName; - } - - set - { - if (!string.IsNullOrWhiteSpace(value)) - { - _fileName = value; - Settings.Properties.ImageresizerFileName.Value = value; - _settingsUtils.SaveSettings(Settings.ToJsonString(), ModuleName); - OnPropertyChanged(nameof(FileName)); - } - } - } - - public bool KeepDateModified - { - get - { - return _keepDateModified; - } - - set - { - _keepDateModified = value; - Settings.Properties.ImageresizerKeepDateModified.Value = value; - _settingsUtils.SaveSettings(Settings.ToJsonString(), ModuleName); - OnPropertyChanged(nameof(KeepDateModified)); - } - } - - public int Encoder - { - get - { - return _encoderGuidId; - } - - set - { - if (_encoderGuidId != value) - { - _encoderGuidId = value; - _settingsUtils.SaveSettings(Settings.Properties.ImageresizerSizes.ToJsonString(), ModuleName, "sizes.json"); - Settings.Properties.ImageresizerFallbackEncoder.Value = GetEncoderGuid(value); - _settingsUtils.SaveSettings(Settings.ToJsonString(), ModuleName); - OnPropertyChanged(nameof(Encoder)); - } - } - } - - public string EncoderGuid - { - get - { - return ImageResizerViewModel.GetEncoderGuid(_encoderGuidId); - } - } - - public void AddRow() - { - ObservableCollection imageSizes = Sizes; - int maxId = imageSizes.Count > 0 ? imageSizes.OrderBy(x => x.Id).Last().Id : -1; - ImageSize newSize = new ImageSize(maxId + 1); - newSize.PropertyChanged += SizePropertyChanged; - imageSizes.Add(newSize); - _advancedSizes = imageSizes; - SavesImageSizes(imageSizes); - - // Set the focus requested flag to indicate that an add operation has occurred during the ContainerContentChanging event - IsListViewFocusRequested = true; - } - - public void DeleteImageSize(int id) - { - ImageSize size = _advancedSizes.Where(x => x.Id == id).First(); - ObservableCollection imageSizes = Sizes; - imageSizes.Remove(size); - - _advancedSizes = imageSizes; - SavesImageSizes(imageSizes); - } - - public void SavesImageSizes(ObservableCollection imageSizes) - { - _settingsUtils.SaveSettings(Settings.Properties.ImageresizerSizes.ToJsonString(), ModuleName, "sizes.json"); - Settings.Properties.ImageresizerSizes = new ImageResizerSizes(imageSizes); - _settingsUtils.SaveSettings(Settings.ToJsonString(), ModuleName); - } - - public static string GetEncoderGuid(int value) - { - // PNG Encoder guid - if (value == 0) - { - return "1b7cfaf4-713f-473c-bbcd-6137425faeaf"; - } - - // Bitmap Encoder guid - else if (value == 1) - { - return "0af1d87e-fcfe-4188-bdeb-a7906471cbe3"; - } - - // JPEG Encoder guid - else if (value == 2) - { - return "19e4a5aa-5662-4fc5-a0c0-1758028e1057"; - } - - // Tiff encoder guid. - else if (value == 3) - { - return "163bcc30-e2e9-4f0b-961d-a3e9fdb788a3"; - } - - // Tiff encoder guid. - else if (value == 4) - { - return "57a37caa-367a-4540-916b-f183c5093a4b"; - } - - // Gif encoder guid. - else if (value == 5) - { - return "1f8a5601-7d4d-4cbd-9c82-1bc8d4eeb9a5"; - } - - return null; - } - - public static int GetEncoderIndex(string value) - { - // PNG Encoder guid - if (value == "1b7cfaf4-713f-473c-bbcd-6137425faeaf") - { - return 0; - } - - // Bitmap Encoder guid - else if (value == "0af1d87e-fcfe-4188-bdeb-a7906471cbe3") - { - return 1; - } - - // JPEG Encoder guid - else if (value == "19e4a5aa-5662-4fc5-a0c0-1758028e1057") - { - return 2; - } - - // Tiff encoder guid. - else if (value == "163bcc30-e2e9-4f0b-961d-a3e9fdb788a3") - { - return 3; - } - - // Tiff encoder guid. - else if (value == "57a37caa-367a-4540-916b-f183c5093a4b") - { - return 4; - } - - // Gif encoder guid. - else if (value == "1f8a5601-7d4d-4cbd-9c82-1bc8d4eeb9a5") - { - return 5; - } - - return -1; - } - - public void SizePropertyChanged(object sender, PropertyChangedEventArgs e) - { - ImageSize modifiedSize = (ImageSize)sender; - ObservableCollection imageSizes = Sizes; - imageSizes.Where(x => x.Id == modifiedSize.Id).First().Update(modifiedSize); - _advancedSizes = imageSizes; - SavesImageSizes(imageSizes); - } + private bool _keepDisplayOn; + private EspressoMode _mode; + private int _timeAllocation; } } -} diff --git a/src/settings-ui/Microsoft.PowerToys.Settings.UI/Views/EspressoPage.xaml b/src/settings-ui/Microsoft.PowerToys.Settings.UI/Views/EspressoPage.xaml index 97a059e3b0..c53c40b1f8 100644 --- a/src/settings-ui/Microsoft.PowerToys.Settings.UI/Views/EspressoPage.xaml +++ b/src/settings-ui/Microsoft.PowerToys.Settings.UI/Views/EspressoPage.xaml @@ -60,6 +60,10 @@ + + + diff --git a/src/settings-ui/Microsoft.PowerToys.Settings.UI/Views/EspressoPage.xaml.cs b/src/settings-ui/Microsoft.PowerToys.Settings.UI/Views/EspressoPage.xaml.cs index 84bec4bf0e..36032d50b4 100644 --- a/src/settings-ui/Microsoft.PowerToys.Settings.UI/Views/EspressoPage.xaml.cs +++ b/src/settings-ui/Microsoft.PowerToys.Settings.UI/Views/EspressoPage.xaml.cs @@ -11,9 +11,13 @@ namespace Microsoft.PowerToys.Settings.UI.Views { public sealed partial class EspressoPage : Page { + private EspressoViewModel ViewModel { get; set; } + public EspressoPage() { var settingsUtils = new SettingsUtils(); + ViewModel = new EspressoViewModel(SettingsRepository.GetInstance(settingsUtils), SettingsRepository.GetInstance(settingsUtils), ShellPage.SendDefaultIPCMessage); + DataContext = ViewModel; InitializeComponent(); } } From 0e0bae01987759aa4cf432667142c6e902ad0b16 Mon Sep 17 00:00:00 2001 From: Den Delimarsky <1389609+dend@users.noreply.github.com> Date: Wed, 7 Apr 2021 10:38:17 -0700 Subject: [PATCH 07/81] Update settings configuration There is a non-zero amount of settings that I need to set up for Espresso to work properly. This change is all about updating the view model and its binding to the UI. --- .../ViewModels/EspressoViewModel.cs | 26 +++++++++--- .../Strings/en-us/Resources.resw | 3 ++ .../Views/EspressoPage.xaml | 41 +++++++++++-------- 3 files changed, 47 insertions(+), 23 deletions(-) diff --git a/src/settings-ui/Microsoft.PowerToys.Settings.UI.Library/ViewModels/EspressoViewModel.cs b/src/settings-ui/Microsoft.PowerToys.Settings.UI.Library/ViewModels/EspressoViewModel.cs index e6979ee6f5..4bde47862d 100644 --- a/src/settings-ui/Microsoft.PowerToys.Settings.UI.Library/ViewModels/EspressoViewModel.cs +++ b/src/settings-ui/Microsoft.PowerToys.Settings.UI.Library/ViewModels/EspressoViewModel.cs @@ -3,7 +3,6 @@ // See the LICENSE file in the project root for more information. using System; -using System.Diagnostics.CodeAnalysis; using Microsoft.PowerToys.Settings.UI.Library.Helpers; using Microsoft.PowerToys.Settings.UI.Library.Interfaces; @@ -15,11 +14,9 @@ namespace Microsoft.PowerToys.Settings.UI.Library.ViewModels private EspressoSettings Settings { get; set; } - private string settingsConfigFileFolder = string.Empty; - private Func SendConfigMSG { get; } - public EspressoViewModel(ISettingsRepository settingsRepository, ISettingsRepository moduleSettingsRepository, Func ipcMSGCallBackFunc, string configFileSubfolder = "") + public EspressoViewModel(ISettingsRepository settingsRepository, ISettingsRepository moduleSettingsRepository, Func ipcMSGCallBackFunc) { // To obtain the general settings configurations of PowerToys Settings. if (settingsRepository == null) @@ -28,7 +25,6 @@ namespace Microsoft.PowerToys.Settings.UI.Library.ViewModels } GeneralSettingsConfig = settingsRepository.SettingsConfig; - settingsConfigFileFolder = configFileSubfolder; // To obtain the settings configurations of Fancy zones. if (moduleSettingsRepository == null) @@ -45,7 +41,25 @@ namespace Microsoft.PowerToys.Settings.UI.Library.ViewModels // set the callback functions value to hangle outgoing IPC message. SendConfigMSG = ipcMSGCallBackFunc; - _isEnabled = GeneralSettingsConfig.Enabled.Espresso; + IsEnabled = GeneralSettingsConfig.Enabled.Espresso; + } + + public bool IsEnabled + { + get => _isEnabled; + set + { + if (_isEnabled != value) + { + _isEnabled = value; + OnPropertyChanged(nameof(IsEnabled)); + + GeneralSettingsConfig.Enabled.Espresso = value; + var outgoing = new OutGoingGeneralSettings(GeneralSettingsConfig); + + SendConfigMSG(outgoing.ToString()); + } + } } private bool _isEnabled; diff --git a/src/settings-ui/Microsoft.PowerToys.Settings.UI/Strings/en-us/Resources.resw b/src/settings-ui/Microsoft.PowerToys.Settings.UI/Strings/en-us/Resources.resw index a718b54ded..6fec1d172c 100644 --- a/src/settings-ui/Microsoft.PowerToys.Settings.UI/Strings/en-us/Resources.resw +++ b/src/settings-ui/Microsoft.PowerToys.Settings.UI/Strings/en-us/Resources.resw @@ -1179,4 +1179,7 @@ Win + Shift + O to toggle your video Keep display on + + Behavior + \ No newline at end of file diff --git a/src/settings-ui/Microsoft.PowerToys.Settings.UI/Views/EspressoPage.xaml b/src/settings-ui/Microsoft.PowerToys.Settings.UI/Views/EspressoPage.xaml index c53c40b1f8..a8ce161a7c 100644 --- a/src/settings-ui/Microsoft.PowerToys.Settings.UI/Views/EspressoPage.xaml +++ b/src/settings-ui/Microsoft.PowerToys.Settings.UI/Views/EspressoPage.xaml @@ -53,38 +53,45 @@ HorizontalAlignment="Left" Margin="0,0,48,0" MaxWidth="{StaticResource MaxContentWidth}"> - - + - - + - - - + + + + + - - - - - - + + + + + + - - - + + + + - + From 15677cef4a125276a78aa5fb6c5572e8aaf2bc11 Mon Sep 17 00:00:00 2001 From: Den Delimarsky <1389609+dend@users.noreply.github.com> Date: Wed, 7 Apr 2021 17:05:45 -0700 Subject: [PATCH 08/81] Update settings --- .../EspressoProperties.cs | 14 ++-- ...osoft.PowerToys.Settings.UI.Library.csproj | 3 + .../SndEspressoSettings.cs | 30 ++++++++ .../ViewModels/EspressoViewModel.cs | 73 +++++++++++++++++-- ...oft.PowerToys.Settings.UI.UnitTests.csproj | 5 +- .../Strings/en-us/Resources.resw | 6 ++ .../Views/EspressoPage.xaml | 24 ++++++ .../Views/EspressoPage.xaml.cs | 1 - .../PowerToys.Settings.csproj | 3 + 9 files changed, 144 insertions(+), 15 deletions(-) create mode 100644 src/settings-ui/Microsoft.PowerToys.Settings.UI.Library/SndEspressoSettings.cs diff --git a/src/settings-ui/Microsoft.PowerToys.Settings.UI.Library/EspressoProperties.cs b/src/settings-ui/Microsoft.PowerToys.Settings.UI.Library/EspressoProperties.cs index 7fe4995736..13a8305cc1 100644 --- a/src/settings-ui/Microsoft.PowerToys.Settings.UI.Library/EspressoProperties.cs +++ b/src/settings-ui/Microsoft.PowerToys.Settings.UI.Library/EspressoProperties.cs @@ -10,23 +10,23 @@ namespace Microsoft.PowerToys.Settings.UI.Library { public EspressoProperties() { - IsEnabled = new BoolProperty(); KeepDisplayOn = new BoolProperty(); Mode = EspressoMode.INDEFINITE; - TimeAllocation = new IntProperty(); + Hours = new IntProperty(); + Minutes = new IntProperty(); } - [JsonPropertyName("espresso_is_enabled")] - public BoolProperty IsEnabled { get; set; } - [JsonPropertyName("espresso_keep_display_on")] public BoolProperty KeepDisplayOn { get; set; } [JsonPropertyName("espresso_mode")] public EspressoMode Mode { get; set; } - [JsonPropertyName("espresso_time_allocation")] - public IntProperty TimeAllocation { get; set; } + [JsonPropertyName("espresso_hours")] + public IntProperty Hours { get; set; } + + [JsonPropertyName("espresso_minutes")] + public IntProperty Minutes { get; set; } } public enum EspressoMode diff --git a/src/settings-ui/Microsoft.PowerToys.Settings.UI.Library/Microsoft.PowerToys.Settings.UI.Library.csproj b/src/settings-ui/Microsoft.PowerToys.Settings.UI.Library/Microsoft.PowerToys.Settings.UI.Library.csproj index 209e2647b9..da1f09145a 100644 --- a/src/settings-ui/Microsoft.PowerToys.Settings.UI.Library/Microsoft.PowerToys.Settings.UI.Library.csproj +++ b/src/settings-ui/Microsoft.PowerToys.Settings.UI.Library/Microsoft.PowerToys.Settings.UI.Library.csproj @@ -20,6 +20,9 @@ x64 + DEBUG;TRACE + full + true diff --git a/src/settings-ui/Microsoft.PowerToys.Settings.UI.Library/SndEspressoSettings.cs b/src/settings-ui/Microsoft.PowerToys.Settings.UI.Library/SndEspressoSettings.cs new file mode 100644 index 0000000000..84bfe09014 --- /dev/null +++ b/src/settings-ui/Microsoft.PowerToys.Settings.UI.Library/SndEspressoSettings.cs @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation +// The Microsoft Corporation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; + +namespace Microsoft.PowerToys.Settings.UI.Library +{ + public class SndEspressoSettings + { + public EspressoSettings Settings { get; set; } + + public SndEspressoSettings() + { + } + + public SndEspressoSettings(EspressoSettings settings) + { + Settings = settings; + } + + public string ToJsonString() + { + return JsonSerializer.Serialize(this); + } + } +} diff --git a/src/settings-ui/Microsoft.PowerToys.Settings.UI.Library/ViewModels/EspressoViewModel.cs b/src/settings-ui/Microsoft.PowerToys.Settings.UI.Library/ViewModels/EspressoViewModel.cs index 4bde47862d..c13222097f 100644 --- a/src/settings-ui/Microsoft.PowerToys.Settings.UI.Library/ViewModels/EspressoViewModel.cs +++ b/src/settings-ui/Microsoft.PowerToys.Settings.UI.Library/ViewModels/EspressoViewModel.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System; +using System.Runtime.CompilerServices; using Microsoft.PowerToys.Settings.UI.Library.Helpers; using Microsoft.PowerToys.Settings.UI.Library.Interfaces; @@ -34,14 +35,14 @@ namespace Microsoft.PowerToys.Settings.UI.Library.ViewModels Settings = moduleSettingsRepository.SettingsConfig; + _isEnabled = GeneralSettingsConfig.Enabled.Espresso; _keepDisplayOn = Settings.Properties.KeepDisplayOn.Value; _mode = Settings.Properties.Mode; - _timeAllocation = Settings.Properties.TimeAllocation.Value; + _hours = Settings.Properties.Hours.Value; + _minutes = Settings.Properties.Minutes.Value; // set the callback functions value to hangle outgoing IPC message. SendConfigMSG = ipcMSGCallBackFunc; - - IsEnabled = GeneralSettingsConfig.Enabled.Espresso; } public bool IsEnabled @@ -52,19 +53,79 @@ namespace Microsoft.PowerToys.Settings.UI.Library.ViewModels if (_isEnabled != value) { _isEnabled = value; - OnPropertyChanged(nameof(IsEnabled)); GeneralSettingsConfig.Enabled.Espresso = value; - var outgoing = new OutGoingGeneralSettings(GeneralSettingsConfig); + var outgoing = new OutGoingGeneralSettings(GeneralSettingsConfig); SendConfigMSG(outgoing.ToString()); + NotifyPropertyChanged(); } } } + public bool KeepDisplayOn + { + get => _keepDisplayOn; + set + { + if (_keepDisplayOn != value) + { + _keepDisplayOn = value; + OnPropertyChanged(nameof(KeepDisplayOn)); + + Settings.Properties.KeepDisplayOn = new BoolProperty(value); + NotifyPropertyChanged(); + } + } + } + + public int Hours + { + get => _hours; + set + { + if (_hours != value) + { + _hours = value; + OnPropertyChanged(nameof(Hours)); + + Settings.Properties.Hours = new IntProperty(value); + NotifyPropertyChanged(); + } + } + } + + public int Minutes + { + get => _minutes; + set + { + if (_minutes != value) + { + _minutes = value; + OnPropertyChanged(nameof(Minutes)); + + Settings.Properties.Minutes = new IntProperty(value); + NotifyPropertyChanged(); + } + } + } + + public void NotifyPropertyChanged([CallerMemberName] string propertyName = null) + { + OnPropertyChanged(propertyName); + if (SendConfigMSG != null) + { + SndEspressoSettings outsettings = new SndEspressoSettings(Settings); + SndModuleSettings ipcMessage = new SndModuleSettings(outsettings); + SendConfigMSG(ipcMessage.ToJsonString()); + } + } + private bool _isEnabled; + private int _hours; + private int _minutes; private bool _keepDisplayOn; private EspressoMode _mode; - private int _timeAllocation; } } diff --git a/src/settings-ui/Microsoft.PowerToys.Settings.UI.UnitTests/Microsoft.PowerToys.Settings.UI.UnitTests.csproj b/src/settings-ui/Microsoft.PowerToys.Settings.UI.UnitTests/Microsoft.PowerToys.Settings.UI.UnitTests.csproj index a9b57204f2..3adf72b698 100644 --- a/src/settings-ui/Microsoft.PowerToys.Settings.UI.UnitTests/Microsoft.PowerToys.Settings.UI.UnitTests.csproj +++ b/src/settings-ui/Microsoft.PowerToys.Settings.UI.UnitTests/Microsoft.PowerToys.Settings.UI.UnitTests.csproj @@ -1,4 +1,4 @@ - + netcoreapp3.1 @@ -9,6 +9,9 @@ ..\..\..\x64\Debug\SettingsTests\ + full + true + DEBUG;TRACE diff --git a/src/settings-ui/Microsoft.PowerToys.Settings.UI/Strings/en-us/Resources.resw b/src/settings-ui/Microsoft.PowerToys.Settings.UI/Strings/en-us/Resources.resw index 6fec1d172c..b0381731b8 100644 --- a/src/settings-ui/Microsoft.PowerToys.Settings.UI/Strings/en-us/Resources.resw +++ b/src/settings-ui/Microsoft.PowerToys.Settings.UI/Strings/en-us/Resources.resw @@ -1182,4 +1182,10 @@ Win + Shift + O to toggle your video Behavior + + Hours + + + Minutes + \ No newline at end of file diff --git a/src/settings-ui/Microsoft.PowerToys.Settings.UI/Views/EspressoPage.xaml b/src/settings-ui/Microsoft.PowerToys.Settings.UI/Views/EspressoPage.xaml index a8ce161a7c..bd4df2fcfa 100644 --- a/src/settings-ui/Microsoft.PowerToys.Settings.UI/Views/EspressoPage.xaml +++ b/src/settings-ui/Microsoft.PowerToys.Settings.UI/Views/EspressoPage.xaml @@ -5,6 +5,7 @@ xmlns:local="using:Microsoft.PowerToys.Settings.UI.Views" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" + xmlns:muxc="using:Microsoft.UI.Xaml.Controls" xmlns:Custom="using:Microsoft.PowerToys.Settings.UI.Controls" xmlns:Color="using:Microsoft.PowerToys.Settings.UI.Library.ViewModels" xmlns:Interactivity="using:Microsoft.Xaml.Interactivity" xmlns:Core="using:Microsoft.Xaml.Interactions.Core" mc:Ignorable="d" @@ -90,6 +91,29 @@ + + + + + diff --git a/src/settings-ui/Microsoft.PowerToys.Settings.UI/Views/EspressoPage.xaml.cs b/src/settings-ui/Microsoft.PowerToys.Settings.UI/Views/EspressoPage.xaml.cs index 36032d50b4..5a47c6165b 100644 --- a/src/settings-ui/Microsoft.PowerToys.Settings.UI/Views/EspressoPage.xaml.cs +++ b/src/settings-ui/Microsoft.PowerToys.Settings.UI/Views/EspressoPage.xaml.cs @@ -2,7 +2,6 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System.IO.Abstractions; using Microsoft.PowerToys.Settings.UI.Library; using Microsoft.PowerToys.Settings.UI.Library.ViewModels; using Windows.UI.Xaml.Controls; diff --git a/src/settings-ui/PowerToys.Settings/PowerToys.Settings.csproj b/src/settings-ui/PowerToys.Settings/PowerToys.Settings.csproj index 92daaa3d46..1e2cec7e34 100644 --- a/src/settings-ui/PowerToys.Settings/PowerToys.Settings.csproj +++ b/src/settings-ui/PowerToys.Settings/PowerToys.Settings.csproj @@ -34,6 +34,9 @@ ..\..\..\$(Platform)\$(Configuration)\Settings false + full + true + DEBUG;TRACE From 2afa653effca20da422b48ca31e081e0853c0f56 Mon Sep 17 00:00:00 2001 From: Den Delimarsky <1389609+dend@users.noreply.github.com> Date: Wed, 7 Apr 2021 20:58:53 -0700 Subject: [PATCH 09/81] Latest round of changes Now that I figured out why the settings were not propagated, I started working on integrating the proper modules in the stack. --- src/runner/main.cpp | 3 +- .../Microsoft.PowerToys.Settings.UI.csproj | 2 +- .../Strings/en-us/Resources.resw | 33 ++++++++++++++++++- 3 files changed, 35 insertions(+), 3 deletions(-) diff --git a/src/runner/main.cpp b/src/runner/main.cpp index 89843c420b..cf9245c239 100644 --- a/src/runner/main.cpp +++ b/src/runner/main.cpp @@ -148,7 +148,7 @@ int runner(bool isProcessElevated, bool openSettings, bool openOobe) chdir_current_executable(); // Load Powertoys DLLs - const std::array knownModules = { + const std::array knownModules = { L"modules/FancyZones/fancyzones.dll", L"modules/FileExplorerPreview/powerpreview.dll", L"modules/ImageResizer/ImageResizerExt.dll", @@ -157,6 +157,7 @@ int runner(bool isProcessElevated, bool openSettings, bool openOobe) L"modules/PowerRename/PowerRenameExt.dll", L"modules/ShortcutGuide/ShortcutGuide.dll", L"modules/ColorPicker/ColorPicker.dll", + L"modules/Espresso/Espresso.dll", }; for (const auto& moduleSubdir : knownModules) diff --git a/src/settings-ui/Microsoft.PowerToys.Settings.UI/Microsoft.PowerToys.Settings.UI.csproj b/src/settings-ui/Microsoft.PowerToys.Settings.UI/Microsoft.PowerToys.Settings.UI.csproj index c0112d522d..34d706754a 100644 --- a/src/settings-ui/Microsoft.PowerToys.Settings.UI/Microsoft.PowerToys.Settings.UI.csproj +++ b/src/settings-ui/Microsoft.PowerToys.Settings.UI/Microsoft.PowerToys.Settings.UI.csproj @@ -278,7 +278,7 @@ - + diff --git a/src/settings-ui/Microsoft.PowerToys.Settings.UI/Strings/en-us/Resources.resw b/src/settings-ui/Microsoft.PowerToys.Settings.UI/Strings/en-us/Resources.resw index 4cf8e2c668..e0bfadc2b2 100644 --- a/src/settings-ui/Microsoft.PowerToys.Settings.UI/Strings/en-us/Resources.resw +++ b/src/settings-ui/Microsoft.PowerToys.Settings.UI/Strings/en-us/Resources.resw @@ -1166,6 +1166,37 @@ From there, simply click on a Markdown file or SVG icon in the File Explorer and PowerToys Settings - + + About Espresso + + + A convenient way to keep your computer awake on-demand. + + + Enable Espresso + + + Keep awake indefinitely + + + Keep awake temporarily + + + Keeps the computer awake until the setting is disabled. + + + Keeps the computer awake until the set time elapses. + + + Keep display on + + + Behavior + + + Hours + + + Minutes From 59b4e29be904eda0048be1726147a9347e3a298f Mon Sep 17 00:00:00 2001 From: Den Delimarsky <1389609+dend@users.noreply.github.com> Date: Thu, 8 Apr 2021 08:22:35 -0700 Subject: [PATCH 10/81] Cleanup of old content The old EspressoUI project was misplaced and is no longer necessary. --- PowerToys.sln | 10 + src/espresso/EspressoUI/App.xaml | 9 - src/espresso/EspressoUI/App.xaml.cs | 17 - src/espresso/EspressoUI/AssemblyInfo.cs | 10 - src/espresso/EspressoUI/EspressoUI.csproj | 34 -- src/espresso/EspressoUI/LocProject.json | 14 - src/espresso/EspressoUI/MainWindow.xaml | 12 - src/espresso/EspressoUI/MainWindow.xaml.cs | 28 -- src/espresso/EspressoUI/Themes/Dark.xaml | 18 - .../EspressoUI/Themes/HighContrast1.xaml | 18 - .../EspressoUI/Themes/HighContrast2.xaml | 19 - .../EspressoUI/Themes/HighContrastBlack.xaml | 18 - .../EspressoUI/Themes/HighContrastWhite.xaml | 18 - src/espresso/EspressoUI/Themes/Light.xaml | 18 - src/modules/espresso/Espresso/Espresso.rc | 32 ++ .../espresso/Espresso/Espresso.vcxproj | 126 +++++++ src/modules/espresso/Espresso/dllmain.cpp | 338 ++++++++++++++++++ src/modules/espresso/Espresso/pch.cpp | 2 + src/modules/espresso/Espresso/pch.h | 5 + src/modules/espresso/Espresso/resource.h | 0 src/modules/espresso/Espresso/trace.cpp | 29 ++ src/modules/espresso/Espresso/trace.h | 9 + 22 files changed, 551 insertions(+), 233 deletions(-) delete mode 100644 src/espresso/EspressoUI/App.xaml delete mode 100644 src/espresso/EspressoUI/App.xaml.cs delete mode 100644 src/espresso/EspressoUI/AssemblyInfo.cs delete mode 100644 src/espresso/EspressoUI/EspressoUI.csproj delete mode 100644 src/espresso/EspressoUI/LocProject.json delete mode 100644 src/espresso/EspressoUI/MainWindow.xaml delete mode 100644 src/espresso/EspressoUI/MainWindow.xaml.cs delete mode 100644 src/espresso/EspressoUI/Themes/Dark.xaml delete mode 100644 src/espresso/EspressoUI/Themes/HighContrast1.xaml delete mode 100644 src/espresso/EspressoUI/Themes/HighContrast2.xaml delete mode 100644 src/espresso/EspressoUI/Themes/HighContrastBlack.xaml delete mode 100644 src/espresso/EspressoUI/Themes/HighContrastWhite.xaml delete mode 100644 src/espresso/EspressoUI/Themes/Light.xaml create mode 100644 src/modules/espresso/Espresso/Espresso.rc create mode 100644 src/modules/espresso/Espresso/Espresso.vcxproj create mode 100644 src/modules/espresso/Espresso/dllmain.cpp create mode 100644 src/modules/espresso/Espresso/pch.cpp create mode 100644 src/modules/espresso/Espresso/pch.h create mode 100644 src/modules/espresso/Espresso/resource.h create mode 100644 src/modules/espresso/Espresso/trace.cpp create mode 100644 src/modules/espresso/Espresso/trace.h diff --git a/PowerToys.sln b/PowerToys.sln index 21179a3f5d..cd22ab483c 100644 --- a/PowerToys.sln +++ b/PowerToys.sln @@ -312,6 +312,10 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.PowerToys.Run.Plu EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PowerToys.Settings", "src\settings-ui\PowerToys.Settings\PowerToys.Settings.csproj", "{6ED2F4FC-E122-4CEE-90F1-97E4CCC8BC7A}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "espresso", "espresso", "{A81DFA80-09EB-4464-A89A-DF4AEAC93527}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Espresso", "src\modules\espresso\Espresso\Espresso.vcxproj", "{5E7360A8-D048-4ED3-8F09-0BFD64C5529A}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|x64 = Debug|x64 @@ -634,6 +638,10 @@ Global {6ED2F4FC-E122-4CEE-90F1-97E4CCC8BC7A}.Debug|x64.Build.0 = Debug|x64 {6ED2F4FC-E122-4CEE-90F1-97E4CCC8BC7A}.Release|x64.ActiveCfg = Release|x64 {6ED2F4FC-E122-4CEE-90F1-97E4CCC8BC7A}.Release|x64.Build.0 = Release|x64 + {5E7360A8-D048-4ED3-8F09-0BFD64C5529A}.Debug|x64.ActiveCfg = Debug|x64 + {5E7360A8-D048-4ED3-8F09-0BFD64C5529A}.Debug|x64.Build.0 = Debug|x64 + {5E7360A8-D048-4ED3-8F09-0BFD64C5529A}.Release|x64.ActiveCfg = Release|x64 + {5E7360A8-D048-4ED3-8F09-0BFD64C5529A}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -729,6 +737,8 @@ Global {4BABF3FE-3451-42FD-873F-3C332E18DCEF} = {4AFC9975-2456-4C70-94A4-84073C1CED93} {0648DF05-5DDA-4BE1-B5F2-584926EBDB65} = {4AFC9975-2456-4C70-94A4-84073C1CED93} {6ED2F4FC-E122-4CEE-90F1-97E4CCC8BC7A} = {C3081D9A-1586-441A-B5F4-ED815B3719C1} + {A81DFA80-09EB-4464-A89A-DF4AEAC93527} = {4574FDD0-F61D-4376-98BF-E5A1262C11EC} + {5E7360A8-D048-4ED3-8F09-0BFD64C5529A} = {A81DFA80-09EB-4464-A89A-DF4AEAC93527} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {C3A2F9D1-7930-4EF4-A6FC-7EE0A99821D0} diff --git a/src/espresso/EspressoUI/App.xaml b/src/espresso/EspressoUI/App.xaml deleted file mode 100644 index 6e57c4e3e8..0000000000 --- a/src/espresso/EspressoUI/App.xaml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - diff --git a/src/espresso/EspressoUI/App.xaml.cs b/src/espresso/EspressoUI/App.xaml.cs deleted file mode 100644 index ed1eb28242..0000000000 --- a/src/espresso/EspressoUI/App.xaml.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Configuration; -using System.Data; -using System.Linq; -using System.Threading.Tasks; -using System.Windows; - -namespace EspressoUI -{ - /// - /// Interaction logic for App.xaml - /// - public partial class App : Application - { - } -} diff --git a/src/espresso/EspressoUI/AssemblyInfo.cs b/src/espresso/EspressoUI/AssemblyInfo.cs deleted file mode 100644 index 8b5504ecfb..0000000000 --- a/src/espresso/EspressoUI/AssemblyInfo.cs +++ /dev/null @@ -1,10 +0,0 @@ -using System.Windows; - -[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) -)] diff --git a/src/espresso/EspressoUI/EspressoUI.csproj b/src/espresso/EspressoUI/EspressoUI.csproj deleted file mode 100644 index 41864b724f..0000000000 --- a/src/espresso/EspressoUI/EspressoUI.csproj +++ /dev/null @@ -1,34 +0,0 @@ - - - - WinExe - netcoreapp3.1 - true - - - - - - - - - $(DefaultXamlRuntime) - - - $(DefaultXamlRuntime) - - - $(DefaultXamlRuntime) - - - $(DefaultXamlRuntime) - - - $(DefaultXamlRuntime) - - - $(DefaultXamlRuntime) - - - - diff --git a/src/espresso/EspressoUI/LocProject.json b/src/espresso/EspressoUI/LocProject.json deleted file mode 100644 index 98f95e8e31..0000000000 --- a/src/espresso/EspressoUI/LocProject.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "Projects": [ - { - "LanguageSet": "Azure_Languages", - "LocItems": [ - { - "SourceFile": "src\\modules\\espresso\\EspressoUI\\Properties\\Resources.resx", - "CopyOption": "LangIDOnName", - "OutputPath": "src\\modules\\espresso\\EspressoUI\\Properties" - } - ] - } - ] -} diff --git a/src/espresso/EspressoUI/MainWindow.xaml b/src/espresso/EspressoUI/MainWindow.xaml deleted file mode 100644 index 8e502b846e..0000000000 --- a/src/espresso/EspressoUI/MainWindow.xaml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - diff --git a/src/espresso/EspressoUI/MainWindow.xaml.cs b/src/espresso/EspressoUI/MainWindow.xaml.cs deleted file mode 100644 index ba0b02dac0..0000000000 --- a/src/espresso/EspressoUI/MainWindow.xaml.cs +++ /dev/null @@ -1,28 +0,0 @@ -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.Navigation; -using System.Windows.Shapes; - -namespace EspressoUI -{ - /// - /// Interaction logic for MainWindow.xaml - /// - public partial class MainWindow : Window - { - public MainWindow() - { - InitializeComponent(); - } - } -} diff --git a/src/espresso/EspressoUI/Themes/Dark.xaml b/src/espresso/EspressoUI/Themes/Dark.xaml deleted file mode 100644 index f0d0cb1339..0000000000 --- a/src/espresso/EspressoUI/Themes/Dark.xaml +++ /dev/null @@ -1,18 +0,0 @@ - - - - Dark.Accent1 - PowerToysImageResizer - Accent1 (Dark) - Dark - Accent1 - Black - - - - - - - \ No newline at end of file diff --git a/src/espresso/EspressoUI/Themes/HighContrast1.xaml b/src/espresso/EspressoUI/Themes/HighContrast1.xaml deleted file mode 100644 index 7bfaf2e19d..0000000000 --- a/src/espresso/EspressoUI/Themes/HighContrast1.xaml +++ /dev/null @@ -1,18 +0,0 @@ - - - - HighContrast.Accent2 - PowerToysImageResizer - Accent2 (HighContrast) - HighContrast - Accent2 - White - - - - - - - \ No newline at end of file diff --git a/src/espresso/EspressoUI/Themes/HighContrast2.xaml b/src/espresso/EspressoUI/Themes/HighContrast2.xaml deleted file mode 100644 index 15f7f1b639..0000000000 --- a/src/espresso/EspressoUI/Themes/HighContrast2.xaml +++ /dev/null @@ -1,19 +0,0 @@ - - - - HighContrast.Accent3 - PowerToysImageResizer - Accent3 (HighContrast) - HighContrast - Accent3 - White - - - - - - - - \ No newline at end of file diff --git a/src/espresso/EspressoUI/Themes/HighContrastBlack.xaml b/src/espresso/EspressoUI/Themes/HighContrastBlack.xaml deleted file mode 100644 index 3f5458dabb..0000000000 --- a/src/espresso/EspressoUI/Themes/HighContrastBlack.xaml +++ /dev/null @@ -1,18 +0,0 @@ - - - - HighContrast.Accent4 - PowerToysImageResizer - Accent4 (HighContrast) - HighContrast - Accent4 - White - - - - - - - \ No newline at end of file diff --git a/src/espresso/EspressoUI/Themes/HighContrastWhite.xaml b/src/espresso/EspressoUI/Themes/HighContrastWhite.xaml deleted file mode 100644 index 40ccf7f047..0000000000 --- a/src/espresso/EspressoUI/Themes/HighContrastWhite.xaml +++ /dev/null @@ -1,18 +0,0 @@ - - - - HighContrast.Accent5 - PowerToysImageResizer - Accent5 (HighContrast) - HighContrast - Accent5 - White - - - - - - - \ No newline at end of file diff --git a/src/espresso/EspressoUI/Themes/Light.xaml b/src/espresso/EspressoUI/Themes/Light.xaml deleted file mode 100644 index 9b8e55a430..0000000000 --- a/src/espresso/EspressoUI/Themes/Light.xaml +++ /dev/null @@ -1,18 +0,0 @@ - - - - Light.Accent1 - PowerToysImageResizer - Accent1 (Light) - Light - Accent1 - White - - - - - - - \ No newline at end of file diff --git a/src/modules/espresso/Espresso/Espresso.rc b/src/modules/espresso/Espresso/Espresso.rc new file mode 100644 index 0000000000..af288a92d3 --- /dev/null +++ b/src/modules/espresso/Espresso/Espresso.rc @@ -0,0 +1,32 @@ +1 VERSIONINFO + FILEVERSION 0,1,0,0 + PRODUCTVERSION 0,1,0,0 + FILEFLAGSMASK 0x3fL +#ifdef _DEBUG + FILEFLAGS 0x1L +#else + FILEFLAGS 0x0L +#endif + FILEOS 0x40004L + FILETYPE 0x2L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "CompanyName", "Company Name" + VALUE "FileDescription", "$projectname$ Module" + VALUE "FileVersion", "0.1.0.0" + VALUE "InternalName", "$projectname$" + VALUE "LegalCopyright", "Copyright (C) 2019 Company Name" + VALUE "OriginalFilename", "$projectname$.dll" + VALUE "ProductName", "$projectname$" + VALUE "ProductVersion", "0.1.0.0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END \ No newline at end of file diff --git a/src/modules/espresso/Espresso/Espresso.vcxproj b/src/modules/espresso/Espresso/Espresso.vcxproj new file mode 100644 index 0000000000..7a45469124 --- /dev/null +++ b/src/modules/espresso/Espresso/Espresso.vcxproj @@ -0,0 +1,126 @@ + + + + + Debug + x64 + + + Release + x64 + + + + 15.0 + {5e7360a8-d048-4ed3-8f09-0bfd64c5529a} + Win32Proj + Espresso + 10.0.17134.0 + Espresso + + + + DynamicLibrary + true + v142 + Unicode + + + DynamicLibrary + false + v142 + true + Unicode + + + + + + + + + + + + + + + true + $(SolutionDir)$(Platform)\$(Configuration)\modules\Espresso\ + + + false + $(SolutionDir)$(Platform)\$(Configuration)\modules\ + + + + Use + Level3 + Disabled + true + _DEBUG;EXAMPLEPOWERTOY_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) + true + pch.h + MultiThreadedDebug + stdcpplatest + + + Windows + true + $(OutDir)$(TargetName)$(TargetExt) + + + + + Use + Level3 + MaxSpeed + true + true + true + NDEBUG;EXAMPLEPOWERTOY_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) + true + pch.h + MultiThreaded + stdcpplatest + + + Windows + true + true + true + $(OutDir)$(TargetName)$(TargetExt) + + + + + $(SolutionDir)src\;$(SolutionDir)src\modules;$(SolutionDir)src\common\Telemetry;%(AdditionalIncludeDirectories) + + + + + + + + + + + Create + Create + pch.h + pch.h + + + + + + {74485049-c722-400f-abe5-86ac52d929b3} + + + + + + + + + \ No newline at end of file diff --git a/src/modules/espresso/Espresso/dllmain.cpp b/src/modules/espresso/Espresso/dllmain.cpp new file mode 100644 index 0000000000..be128ce14b --- /dev/null +++ b/src/modules/espresso/Espresso/dllmain.cpp @@ -0,0 +1,338 @@ +#include "pch.h" +#include +#include +#include +#include +#include "trace.h" + +extern "C" IMAGE_DOS_HEADER __ImageBase; + +BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) +{ + switch (ul_reason_for_call) + { + case DLL_PROCESS_ATTACH: + Trace::RegisterProvider(); + break; + case DLL_THREAD_ATTACH: + case DLL_THREAD_DETACH: + break; + case DLL_PROCESS_DETACH: + Trace::UnregisterProvider(); + break; + } + return TRUE; +} + +// The PowerToy name that will be shown in the settings. +const static wchar_t* MODULE_NAME = L"$projectname$"; +// Add a description that will we shown in the module settings page. +const static wchar_t* MODULE_DESC = L""; + +// These are the properties shown in the Settings page. +struct ModuleSettings +{ + // Add the PowerToy module properties with default values. + // Currently available types: + // - int + // - bool + // - string + + //bool bool_prop = true; + //int int_prop = 10; + //std::wstring string_prop = L"The quick brown fox jumps over the lazy dog"; + //std::wstring color_prop = L"#1212FF"; + +} g_settings; + +// Implement the PowerToy Module Interface and all the required methods. +class $safeprojectname$ : public PowertoyModuleIface +{ +private: + // The PowerToy state. + bool m_enabled = false; + + // Load initial settings from the persisted values. + void init_settings(); + +public: + // Constructor + $safeprojectname$() + { + init_settings(); + }; + + // Destroy the powertoy and free memory + virtual void destroy() override + { + delete this; + } + + // Return the display name of the powertoy, this will be cached by the runner + virtual const wchar_t* get_name() override + { + return MODULE_NAME; + } + + // Return array of the names of all events that this powertoy listens for, with + // nullptr as the last element of the array. Nullptr can also be retured for empty + // list. + virtual const wchar_t** get_events() override + { + static const wchar_t* events[] = { nullptr }; + // Available events: + // - ll_keyboard + // - win_hook_event + // + // static const wchar_t* events[] = { ll_keyboard, + // win_hook_event, + // nullptr }; + + return events; + } + + // Return JSON with the configuration options. + virtual bool get_config(wchar_t* buffer, int* buffer_size) override + { + HINSTANCE hinstance = reinterpret_cast(&__ImageBase); + + // Create a Settings object. + PowerToysSettings::Settings settings(hinstance, get_name()); + settings.set_description(MODULE_DESC); + + // Show an overview link in the Settings page + //settings.set_overview_link(L"https://"); + + // Show a video link in the Settings page. + //settings.set_video_link(L"https://"); + + // A bool property with a toggle editor. + //settings.add_bool_toogle( + // L"bool_toggle_1", // property name. + // L"This is what a BoolToggle property looks like", // description or resource id of the localized string. + // g_settings.bool_prop // property value. + //); + + // An integer property with a spinner editor. + //settings.add_int_spinner( + // L"int_spinner_1", // property name + // L"This is what a IntSpinner property looks like", // description or resource id of the localized string. + // g_settings.int_prop, // property value. + // 0, // min value. + // 100, // max value. + // 10 // incremental step. + //); + + // A string property with a textbox editor. + //settings.add_string( + // L"string_text_1", // property name. + // L"This is what a String property looks like", // description or resource id of the localized string. + // g_settings.string_prop // property value. + //); + + // A string property with a color picker editor. + //settings.add_color_picker( + // L"color_picker_1", // property name. + // L"This is what a ColorPicker property looks like", // description or resource id of the localized string. + // g_settings.color_prop // property value. + //); + + // A custom action property. When using this settings type, the "PowertoyModuleIface::call_custom_action()" + // method should be overriden as well. + //settings.add_custom_action( + // L"custom_action_id", // action name. + // L"This is what a CustomAction property looks like", // label above the field. + // L"Call a custom action", // button text. + // L"Press the button to call a custom action." // display values / extended info. + //); + + return settings.serialize_to_buffer(buffer, buffer_size); + } + + // Signal from the Settings editor to call a custom action. + // This can be used to spawn more complex editors. + virtual void call_custom_action(const wchar_t* action) override + { + static UINT custom_action_num_calls = 0; + try + { + // Parse the action values, including name. + PowerToysSettings::CustomActionObject action_object = + PowerToysSettings::CustomActionObject::from_json_string(action); + + //if (action_object.get_name() == L"custom_action_id") { + // // Execute your custom action + //} + } + catch (std::exception&) + { + // Improper JSON. + } + } + + // Called by the runner to pass the updated settings values as a serialized JSON. + virtual void set_config(const wchar_t* config) override + { + try + { + // Parse the input JSON string. + PowerToysSettings::PowerToyValues values = + PowerToysSettings::PowerToyValues::from_json_string(config); + + // Update a bool property. + //if (auto v = values.get_bool_value(L"bool_toggle_1")) { + // g_settings.bool_prop = *v; + //} + + // Update an int property. + //if (auto v = values.get_int_value(L"int_spinner_1")) { + // g_settings.int_prop = *v; + //} + + // Update a string property. + //if (auto v = values.get_string_value(L"string_text_1")) { + // g_settings.string_prop = *v; + //} + + // Update a color property. + //if (auto v = values.get_string_value(L"color_picker_1")) { + // g_settings.color_prop = *v; + //} + + // If you don't need to do any custom processing of the settings, proceed + // to persists the values calling: + values.save_to_settings_file(); + // Otherwise call a custom function to process the settings before saving them to disk: + // save_settings(); + } + catch (std::exception&) + { + // Improper JSON. + } + } + + // Enable the powertoy + virtual void enable() + { + m_enabled = true; + } + + // Disable the powertoy + virtual void disable() + { + m_enabled = false; + } + + // Returns if the powertoys is enabled + virtual bool is_enabled() override + { + return m_enabled; + } + + // Handle incoming event, data is event-specific + virtual intptr_t signal_event(const wchar_t* name, intptr_t data) override + { + if (wcscmp(name, ll_keyboard) == 0) + { + auto& event = *(reinterpret_cast(data)); + // Return 1 if the keypress is to be suppressed (not forwarded to Windows), + // otherwise return 0. + return 0; + } + else if (wcscmp(name, win_hook_event) == 0) + { + auto& event = *(reinterpret_cast(data)); + // Return value is ignored + return 0; + } + return 0; + } + + // This methods are part of an experimental features not fully supported yet + virtual void register_system_menu_helper(PowertoySystemMenuIface* helper) override + { + } + + virtual void signal_system_menu_action(const wchar_t* name) override + { + } +}; + +// Load the settings file. +void $safeprojectname$::init_settings() +{ + try + { + // Load and parse the settings file for this PowerToy. + PowerToysSettings::PowerToyValues settings = + PowerToysSettings::PowerToyValues::load_from_settings_file($safeprojectname$::get_name()); + + // Load a bool property. + //if (auto v = settings.get_bool_value(L"bool_toggle_1")) { + // g_settings.bool_prop = *v; + //} + + // Load an int property. + //if (auto v = settings.get_int_value(L"int_spinner_1")) { + // g_settings.int_prop = *v; + //} + + // Load a string property. + //if (auto v = settings.get_string_value(L"string_text_1")) { + // g_settings.string_prop = *v; + //} + + // Load a color property. + //if (auto v = settings.get_string_value(L"color_picker_1")) { + // g_settings.color_prop = *v; + //} + } + catch (std::exception&) + { + // Error while loading from the settings file. Let default values stay as they are. + } +} + +// This method of saving the module settings is only required if you need to do any +// custom processing of the settings before saving them to disk. +//void $projectname$::save_settings() { +// try { +// // Create a PowerToyValues object for this PowerToy +// PowerToysSettings::PowerToyValues values(get_name()); +// +// // Save a bool property. +// //values.add_property( +// // L"bool_toggle_1", // property name +// // g_settings.bool_prop // property value +// //); +// +// // Save an int property. +// //values.add_property( +// // L"int_spinner_1", // property name +// // g_settings.int_prop // property value +// //); +// +// // Save a string property. +// //values.add_property( +// // L"string_text_1", // property name +// // g_settings.string_prop // property value +// ); +// +// // Save a color property. +// //values.add_property( +// // L"color_picker_1", // property name +// // g_settings.color_prop // property value +// //); +// +// // Save the PowerToyValues JSON to the power toy settings file. +// values.save_to_settings_file(); +// } +// catch (std::exception ex) { +// // Couldn't save the settings. +// } +//} + +extern "C" __declspec(dllexport) PowertoyModuleIface* __cdecl powertoy_create() +{ + return new $safeprojectname$(); +} \ No newline at end of file diff --git a/src/modules/espresso/Espresso/pch.cpp b/src/modules/espresso/Espresso/pch.cpp new file mode 100644 index 0000000000..a83d3bb2cc --- /dev/null +++ b/src/modules/espresso/Espresso/pch.cpp @@ -0,0 +1,2 @@ +#include "pch.h" +#pragma comment(lib, "windowsapp") \ No newline at end of file diff --git a/src/modules/espresso/Espresso/pch.h b/src/modules/espresso/Espresso/pch.h new file mode 100644 index 0000000000..769a37b377 --- /dev/null +++ b/src/modules/espresso/Espresso/pch.h @@ -0,0 +1,5 @@ +#pragma once +#define WIN32_LEAN_AND_MEAN +#include +#include +#include \ No newline at end of file diff --git a/src/modules/espresso/Espresso/resource.h b/src/modules/espresso/Espresso/resource.h new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/modules/espresso/Espresso/trace.cpp b/src/modules/espresso/Espresso/trace.cpp new file mode 100644 index 0000000000..d8c81500f8 --- /dev/null +++ b/src/modules/espresso/Espresso/trace.cpp @@ -0,0 +1,29 @@ +#include "pch.h" +#include "trace.h" + +TRACELOGGING_DEFINE_PROVIDER( + g_hProvider, + "Microsoft.PowerToys", + // {38e8889b-9731-53f5-e901-e8a7c1753074} + (0x38e8889b, 0x9731, 0x53f5, 0xe9, 0x01, 0xe8, 0xa7, 0xc1, 0x75, 0x30, 0x74), + TraceLoggingOptionProjectTelemetry()); + +void Trace::RegisterProvider() +{ + TraceLoggingRegister(g_hProvider); +} + +void Trace::UnregisterProvider() +{ + TraceLoggingUnregister(g_hProvider); +} + +void Trace::MyEvent() +{ + TraceLoggingWrite( + g_hProvider, + "PowerToyName_MyEvent", + ProjectTelemetryPrivacyDataTag(ProjectTelemetryTag_ProductAndServicePerformance), + TraceLoggingBoolean(TRUE, "UTCReplace_AppSessionGuid"), + TraceLoggingKeyword(PROJECT_KEYWORD_MEASURE)); +} diff --git a/src/modules/espresso/Espresso/trace.h b/src/modules/espresso/Espresso/trace.h new file mode 100644 index 0000000000..3939f62fd1 --- /dev/null +++ b/src/modules/espresso/Espresso/trace.h @@ -0,0 +1,9 @@ +#pragma once + +class Trace +{ +public: + static void RegisterProvider(); + static void UnregisterProvider(); + static void MyEvent(); +}; From afbddfc23bf3c3c891532f2970623c99bbfe6f44 Mon Sep 17 00:00:00 2001 From: Den Delimarsky <1389609+dend@users.noreply.github.com> Date: Thu, 8 Apr 2021 10:47:28 -0700 Subject: [PATCH 11/81] Updating proper references. --- src/modules/espresso/Espresso/Espresso.rc | 69 +++++++++- .../espresso/Espresso/Espresso.vcxproj | 14 +- .../Espresso/Espresso.vcxproj.filters | 36 +++++ .../espresso/Espresso/EspressoConstants.h | 7 + src/modules/espresso/Espresso/dllmain.cpp | 129 +++++++++++------- src/modules/espresso/Espresso/pch.h | 7 +- src/modules/espresso/Espresso/resource.h | 16 +++ 7 files changed, 219 insertions(+), 59 deletions(-) create mode 100644 src/modules/espresso/Espresso/Espresso.vcxproj.filters create mode 100644 src/modules/espresso/Espresso/EspressoConstants.h diff --git a/src/modules/espresso/Espresso/Espresso.rc b/src/modules/espresso/Espresso/Espresso.rc index af288a92d3..fc17ffa577 100644 --- a/src/modules/espresso/Espresso/Espresso.rc +++ b/src/modules/espresso/Espresso/Espresso.rc @@ -1,3 +1,18 @@ +// Microsoft Visual C++ generated resource script. +// +#include "resource.h" +///////////////////////////////////////////////////////////////////////////// +// English (United States) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US +#pragma code_page(1252) + +///////////////////////////////////////////////////////////////////////////// +// +// Version +// + 1 VERSIONINFO FILEVERSION 0,1,0,0 PRODUCTVERSION 0,1,0,0 @@ -29,4 +44,56 @@ BEGIN BEGIN VALUE "Translation", 0x409, 1200 END -END \ No newline at end of file +END + + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE +BEGIN + "\0" +END + +3 TEXTINCLUDE +BEGIN + "\r\n" + "\0" +END + +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE +BEGIN + IDS_ESPRESSO_NAME "Espresso" +END + +#endif // English (United States) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// + + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/src/modules/espresso/Espresso/Espresso.vcxproj b/src/modules/espresso/Espresso/Espresso.vcxproj index 7a45469124..db8b101340 100644 --- a/src/modules/espresso/Espresso/Espresso.vcxproj +++ b/src/modules/espresso/Espresso/Espresso.vcxproj @@ -22,7 +22,6 @@ DynamicLibrary true - v142 Unicode @@ -58,7 +57,7 @@ Level3 Disabled true - _DEBUG;EXAMPLEPOWERTOY_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) + EXAMPLEPOWERTOY_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) true pch.h MultiThreadedDebug @@ -94,10 +93,12 @@ - $(SolutionDir)src\;$(SolutionDir)src\modules;$(SolutionDir)src\common\Telemetry;%(AdditionalIncludeDirectories) + ..\..\..\common\Telemetry;..\..\;..\..\..\;%(AdditionalIncludeDirectories) + false + @@ -113,8 +114,11 @@ - - {74485049-c722-400f-abe5-86ac52d929b3} + + {d9b8fc84-322a-4f9f-bbb9-20915c47ddfd} + + + {6955446d-23f7-4023-9bb3-8657f904af99} diff --git a/src/modules/espresso/Espresso/Espresso.vcxproj.filters b/src/modules/espresso/Espresso/Espresso.vcxproj.filters new file mode 100644 index 0000000000..5c1e6e58b0 --- /dev/null +++ b/src/modules/espresso/Espresso/Espresso.vcxproj.filters @@ -0,0 +1,36 @@ + + + + + + + + + + + Header Files + + + Header Files + + + Generated Files + + + + + {e8ef1c4e-cc50-4ce5-b00d-4e3ac5c1a7db} + + + {fbd9cdd2-e7d5-4417-9b52-25e345ae9562} + + + {c2a23a2b-5846-440f-b29e-eea748dba12d} + + + + + Generated Files + + + \ No newline at end of file diff --git a/src/modules/espresso/Espresso/EspressoConstants.h b/src/modules/espresso/Espresso/EspressoConstants.h new file mode 100644 index 0000000000..6b97fe7021 --- /dev/null +++ b/src/modules/espresso/Espresso/EspressoConstants.h @@ -0,0 +1,7 @@ +#include + +namespace EspressoConstants +{ + // Name of the powertoy module. + inline const std::wstring ModuleKey = L"Espresso"; +} \ No newline at end of file diff --git a/src/modules/espresso/Espresso/dllmain.cpp b/src/modules/espresso/Espresso/dllmain.cpp index be128ce14b..c48c2024cc 100644 --- a/src/modules/espresso/Espresso/dllmain.cpp +++ b/src/modules/espresso/Espresso/dllmain.cpp @@ -1,9 +1,22 @@ #include "pch.h" -#include -#include -#include -#include +#include "resource.h" #include "trace.h" +#include "EspressoConstants.h" + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + extern "C" IMAGE_DOS_HEADER __ImageBase; @@ -24,8 +37,10 @@ BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserv return TRUE; } + + // The PowerToy name that will be shown in the settings. -const static wchar_t* MODULE_NAME = L"$projectname$"; +const static wchar_t* MODULE_NAME = L"Espresso"; // Add a description that will we shown in the module settings page. const static wchar_t* MODULE_DESC = L""; @@ -46,8 +61,12 @@ struct ModuleSettings } g_settings; // Implement the PowerToy Module Interface and all the required methods. -class $safeprojectname$ : public PowertoyModuleIface +class Espresso : public PowertoyModuleIface { + std::wstring app_name; + //contains the non localized key of the powertoy + std::wstring app_key; + private: // The PowerToy state. bool m_enabled = false; @@ -57,8 +76,10 @@ private: public: // Constructor - $safeprojectname$() + Espresso() { + app_name = GET_RESOURCE_STRING(IDS_ESPRESSO_NAME); + app_key = EspressoConstants::ModuleKey; init_settings(); }; @@ -74,22 +95,22 @@ public: return MODULE_NAME; } - // Return array of the names of all events that this powertoy listens for, with - // nullptr as the last element of the array. Nullptr can also be retured for empty - // list. - virtual const wchar_t** get_events() override - { - static const wchar_t* events[] = { nullptr }; - // Available events: - // - ll_keyboard - // - win_hook_event - // - // static const wchar_t* events[] = { ll_keyboard, - // win_hook_event, - // nullptr }; + //// Return array of the names of all events that this powertoy listens for, with + //// nullptr as the last element of the array. Nullptr can also be retured for empty + //// list. + //virtual const wchar_t** get_events() override + //{ + // static const wchar_t* events[] = { nullptr }; + // // Available events: + // // - ll_keyboard + // // - win_hook_event + // // + // // static const wchar_t* events[] = { ll_keyboard, + // // win_hook_event, + // // nullptr }; - return events; - } + // return events; + //} // Return JSON with the configuration options. virtual bool get_config(wchar_t* buffer, int* buffer_size) override @@ -149,6 +170,12 @@ public: return settings.serialize_to_buffer(buffer, buffer_size); } + // Return the non localized key of the powertoy, this will be cached by the runner + virtual const wchar_t* get_key() override + { + return app_key.c_str(); + } + // Signal from the Settings editor to call a custom action. // This can be used to spawn more complex editors. virtual void call_custom_action(const wchar_t* action) override @@ -177,7 +204,7 @@ public: { // Parse the input JSON string. PowerToysSettings::PowerToyValues values = - PowerToysSettings::PowerToyValues::from_json_string(config); + PowerToysSettings::PowerToyValues::from_json_string(config, get_key()); // Update a bool property. //if (auto v = values.get_bool_value(L"bool_toggle_1")) { @@ -229,43 +256,43 @@ public: return m_enabled; } - // Handle incoming event, data is event-specific - virtual intptr_t signal_event(const wchar_t* name, intptr_t data) override - { - if (wcscmp(name, ll_keyboard) == 0) - { - auto& event = *(reinterpret_cast(data)); - // Return 1 if the keypress is to be suppressed (not forwarded to Windows), - // otherwise return 0. - return 0; - } - else if (wcscmp(name, win_hook_event) == 0) - { - auto& event = *(reinterpret_cast(data)); - // Return value is ignored - return 0; - } - return 0; - } + //// Handle incoming event, data is event-specific + //virtual intptr_t signal_event(const wchar_t* name, intptr_t data) override + //{ + // if (wcscmp(name, ll_keyboard) == 0) + // { + // auto& event = *(reinterpret_cast(data)); + // // Return 1 if the keypress is to be suppressed (not forwarded to Windows), + // // otherwise return 0. + // return 0; + // } + // else if (wcscmp(name, win_hook_event) == 0) + // { + // auto& event = *(reinterpret_cast(data)); + // // Return value is ignored + // return 0; + // } + // return 0; + //} - // This methods are part of an experimental features not fully supported yet - virtual void register_system_menu_helper(PowertoySystemMenuIface* helper) override - { - } + //// This methods are part of an experimental features not fully supported yet + //virtual void register_system_menu_helper(PowertoySystemMenuIface* helper) override + //{ + //} - virtual void signal_system_menu_action(const wchar_t* name) override - { - } + //virtual void signal_system_menu_action(const wchar_t* name) override + //{ + //} }; // Load the settings file. -void $safeprojectname$::init_settings() +void Espresso::init_settings() { try { // Load and parse the settings file for this PowerToy. PowerToysSettings::PowerToyValues settings = - PowerToysSettings::PowerToyValues::load_from_settings_file($safeprojectname$::get_name()); + PowerToysSettings::PowerToyValues::load_from_settings_file(Espresso::get_name()); // Load a bool property. //if (auto v = settings.get_bool_value(L"bool_toggle_1")) { @@ -334,5 +361,5 @@ void $safeprojectname$::init_settings() extern "C" __declspec(dllexport) PowertoyModuleIface* __cdecl powertoy_create() { - return new $safeprojectname$(); + return new Espresso(); } \ No newline at end of file diff --git a/src/modules/espresso/Espresso/pch.h b/src/modules/espresso/Espresso/pch.h index 769a37b377..46fc911b44 100644 --- a/src/modules/espresso/Espresso/pch.h +++ b/src/modules/espresso/Espresso/pch.h @@ -1,5 +1,8 @@ #pragma once #define WIN32_LEAN_AND_MEAN #include -#include -#include \ No newline at end of file +#include +#include +#include +#include +#include \ No newline at end of file diff --git a/src/modules/espresso/Espresso/resource.h b/src/modules/espresso/Espresso/resource.h index e69de29bb2..e2a786bc46 100644 --- a/src/modules/espresso/Espresso/resource.h +++ b/src/modules/espresso/Espresso/resource.h @@ -0,0 +1,16 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Visual C++ generated include file. +// Used by Espresso.rc +// +#define IDS_ESPRESSO_NAME 101 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 102 +#define _APS_NEXT_COMMAND_VALUE 40001 +#define _APS_NEXT_CONTROL_VALUE 1000 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif From d74f2406b721d47778d74e88e1ca3273ce7e6a89 Mon Sep 17 00:00:00 2001 From: Den Delimarsky <1389609+dend@users.noreply.github.com> Date: Thu, 8 Apr 2021 10:56:20 -0700 Subject: [PATCH 12/81] Setting compiler flag Without this change, the project is throwing WinRT errors. --- src/modules/espresso/Espresso/Espresso.vcxproj | 1 + 1 file changed, 1 insertion(+) diff --git a/src/modules/espresso/Espresso/Espresso.vcxproj b/src/modules/espresso/Espresso/Espresso.vcxproj index db8b101340..b68dc3b0e9 100644 --- a/src/modules/espresso/Espresso/Espresso.vcxproj +++ b/src/modules/espresso/Espresso/Espresso.vcxproj @@ -95,6 +95,7 @@ ..\..\..\common\Telemetry;..\..\;..\..\..\;%(AdditionalIncludeDirectories) false + /Zc:twoPhase- %(AdditionalOptions) From 162f7498a4b9a533dc7b3d5972a5b0126c991ec7 Mon Sep 17 00:00:00 2001 From: Den Delimarsky <1389609+dend@users.noreply.github.com> Date: Thu, 8 Apr 2021 13:39:13 -0700 Subject: [PATCH 13/81] Update project so that it finally compiles. --- src/modules/espresso/Espresso/Espresso.rc | 51 +++--------- .../espresso/Espresso/Espresso.vcxproj | 82 +++++-------------- .../Espresso/Espresso.vcxproj.filters | 8 +- src/modules/espresso/Espresso/dllmain.cpp | 15 ++-- src/modules/espresso/Espresso/packages.config | 4 + src/modules/espresso/Espresso/pch.cpp | 3 +- src/modules/espresso/Espresso/resource.h | 2 +- src/modules/espresso/Espresso/trace.cpp | 10 --- src/modules/espresso/Espresso/trace.h | 1 - 9 files changed, 49 insertions(+), 127 deletions(-) create mode 100644 src/modules/espresso/Espresso/packages.config diff --git a/src/modules/espresso/Espresso/Espresso.rc b/src/modules/espresso/Espresso/Espresso.rc index fc17ffa577..91d08ea09e 100644 --- a/src/modules/espresso/Espresso/Espresso.rc +++ b/src/modules/espresso/Espresso/Espresso.rc @@ -1,6 +1,17 @@ // Microsoft Visual C++ generated resource script. // #include "resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#include "winres.h" + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + ///////////////////////////////////////////////////////////////////////////// // English (United States) resources @@ -8,45 +19,6 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US #pragma code_page(1252) -///////////////////////////////////////////////////////////////////////////// -// -// Version -// - -1 VERSIONINFO - FILEVERSION 0,1,0,0 - PRODUCTVERSION 0,1,0,0 - FILEFLAGSMASK 0x3fL -#ifdef _DEBUG - FILEFLAGS 0x1L -#else - FILEFLAGS 0x0L -#endif - FILEOS 0x40004L - FILETYPE 0x2L - FILESUBTYPE 0x0L -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904b0" - BEGIN - VALUE "CompanyName", "Company Name" - VALUE "FileDescription", "$projectname$ Module" - VALUE "FileVersion", "0.1.0.0" - VALUE "InternalName", "$projectname$" - VALUE "LegalCopyright", "Copyright (C) 2019 Company Name" - VALUE "OriginalFilename", "$projectname$.dll" - VALUE "ProductName", "$projectname$" - VALUE "ProductVersion", "0.1.0.0" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x409, 1200 - END -END - - #ifdef APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// // @@ -60,6 +32,7 @@ END 2 TEXTINCLUDE BEGIN + "#include ""winres.h""\r\n" "\0" END diff --git a/src/modules/espresso/Espresso/Espresso.vcxproj b/src/modules/espresso/Espresso/Espresso.vcxproj index b68dc3b0e9..52c37c5126 100644 --- a/src/modules/espresso/Espresso/Espresso.vcxproj +++ b/src/modules/espresso/Espresso/Espresso.vcxproj @@ -1,5 +1,6 @@ + Debug @@ -15,21 +16,11 @@ {5e7360a8-d048-4ed3-8f09-0bfd64c5529a} Win32Proj Espresso - 10.0.17134.0 Espresso - + DynamicLibrary - true - Unicode - - - DynamicLibrary - false - v142 - true - Unicode @@ -43,60 +34,17 @@ - - true - $(SolutionDir)$(Platform)\$(Configuration)\modules\Espresso\ + + $(SolutionDir)$(Platform)\$(Configuration)\modules\$(ProjectName)\ - - false - $(SolutionDir)$(Platform)\$(Configuration)\modules\ - - - - Use - Level3 - Disabled - true - EXAMPLEPOWERTOY_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) - true - pch.h - MultiThreadedDebug - stdcpplatest - - - Windows - true - $(OutDir)$(TargetName)$(TargetExt) - - - - - Use - Level3 - MaxSpeed - true - true - true - NDEBUG;EXAMPLEPOWERTOY_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) - true - pch.h - MultiThreaded - stdcpplatest - - - Windows - true - true - true - $(OutDir)$(TargetName)$(TargetExt) - - - ..\..\..\common\Telemetry;..\..\;..\..\..\;%(AdditionalIncludeDirectories) - false - /Zc:twoPhase- %(AdditionalOptions) + EXAMPLEPOWERTOY_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) + ..\..\..\common\inc;..\..\..\common\Telemetry;..\..\;..\..\..\;%(AdditionalIncludeDirectories) + + $(OutDir)$(TargetName)$(TargetExt) + @@ -125,7 +73,19 @@ + + + + + + + + This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + \ No newline at end of file diff --git a/src/modules/espresso/Espresso/Espresso.vcxproj.filters b/src/modules/espresso/Espresso/Espresso.vcxproj.filters index 5c1e6e58b0..cb9d38b2c1 100644 --- a/src/modules/espresso/Espresso/Espresso.vcxproj.filters +++ b/src/modules/espresso/Espresso/Espresso.vcxproj.filters @@ -13,9 +13,7 @@ Header Files - - Generated Files - + @@ -29,8 +27,6 @@ - - Generated Files - + \ No newline at end of file diff --git a/src/modules/espresso/Espresso/dllmain.cpp b/src/modules/espresso/Espresso/dllmain.cpp index c48c2024cc..05cd084f6f 100644 --- a/src/modules/espresso/Espresso/dllmain.cpp +++ b/src/modules/espresso/Espresso/dllmain.cpp @@ -1,14 +1,13 @@ #include "pch.h" -#include "resource.h" -#include "trace.h" -#include "EspressoConstants.h" - #include - #include #include +#include "trace.h" +#include "resource.h" +#include "EspressoConstants.h" #include #include + #include #include #include @@ -18,8 +17,6 @@ #include -extern "C" IMAGE_DOS_HEADER __ImageBase; - BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) { switch (ul_reason_for_call) @@ -80,6 +77,10 @@ public: { app_name = GET_RESOURCE_STRING(IDS_ESPRESSO_NAME); app_key = EspressoConstants::ModuleKey; + + std::filesystem::path logFilePath(PTSettingsHelper::get_module_save_folder_location(this->app_key)); + Logger::init(LogSettings::launcherLoggerName, logFilePath.wstring(), PTSettingsHelper::get_log_settings_file_location()); + Logger::info("Launcher object is constructing"); init_settings(); }; diff --git a/src/modules/espresso/Espresso/packages.config b/src/modules/espresso/Espresso/packages.config new file mode 100644 index 0000000000..6a0a5a1e09 --- /dev/null +++ b/src/modules/espresso/Espresso/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/src/modules/espresso/Espresso/pch.cpp b/src/modules/espresso/Espresso/pch.cpp index a83d3bb2cc..17305716aa 100644 --- a/src/modules/espresso/Espresso/pch.cpp +++ b/src/modules/espresso/Espresso/pch.cpp @@ -1,2 +1 @@ -#include "pch.h" -#pragma comment(lib, "windowsapp") \ No newline at end of file +#include "pch.h" \ No newline at end of file diff --git a/src/modules/espresso/Espresso/resource.h b/src/modules/espresso/Espresso/resource.h index e2a786bc46..53fc0ecf48 100644 --- a/src/modules/espresso/Espresso/resource.h +++ b/src/modules/espresso/Espresso/resource.h @@ -10,7 +10,7 @@ #ifndef APSTUDIO_READONLY_SYMBOLS #define _APS_NEXT_RESOURCE_VALUE 102 #define _APS_NEXT_COMMAND_VALUE 40001 -#define _APS_NEXT_CONTROL_VALUE 1000 +#define _APS_NEXT_CONTROL_VALUE 1001 #define _APS_NEXT_SYMED_VALUE 101 #endif #endif diff --git a/src/modules/espresso/Espresso/trace.cpp b/src/modules/espresso/Espresso/trace.cpp index d8c81500f8..e2508396ca 100644 --- a/src/modules/espresso/Espresso/trace.cpp +++ b/src/modules/espresso/Espresso/trace.cpp @@ -17,13 +17,3 @@ void Trace::UnregisterProvider() { TraceLoggingUnregister(g_hProvider); } - -void Trace::MyEvent() -{ - TraceLoggingWrite( - g_hProvider, - "PowerToyName_MyEvent", - ProjectTelemetryPrivacyDataTag(ProjectTelemetryTag_ProductAndServicePerformance), - TraceLoggingBoolean(TRUE, "UTCReplace_AppSessionGuid"), - TraceLoggingKeyword(PROJECT_KEYWORD_MEASURE)); -} diff --git a/src/modules/espresso/Espresso/trace.h b/src/modules/espresso/Espresso/trace.h index 3939f62fd1..e5c7680cf0 100644 --- a/src/modules/espresso/Espresso/trace.h +++ b/src/modules/espresso/Espresso/trace.h @@ -5,5 +5,4 @@ class Trace public: static void RegisterProvider(); static void UnregisterProvider(); - static void MyEvent(); }; From a178ad7524126c54ec748c08a9bfe7863bb8c529 Mon Sep 17 00:00:00 2001 From: Den Delimarsky <1389609+dend@users.noreply.github.com> Date: Thu, 8 Apr 2021 14:00:07 -0700 Subject: [PATCH 14/81] Settings work properly now --- .../Espresso/Espresso.vcxproj.filters | 30 +++++++++++++++---- src/modules/espresso/Espresso/dllmain.cpp | 25 ++-------------- 2 files changed, 27 insertions(+), 28 deletions(-) diff --git a/src/modules/espresso/Espresso/Espresso.vcxproj.filters b/src/modules/espresso/Espresso/Espresso.vcxproj.filters index cb9d38b2c1..d890c2b1e6 100644 --- a/src/modules/espresso/Espresso/Espresso.vcxproj.filters +++ b/src/modules/espresso/Espresso/Espresso.vcxproj.filters @@ -1,19 +1,29 @@  - - - + + Source Files + + + Source Files + + + Source Files + - Header Files Header Files - + + Header Files + + + Generated Files + @@ -25,8 +35,16 @@ {c2a23a2b-5846-440f-b29e-eea748dba12d} + + {77f1702b-da7f-4ff6-90a3-19db515cf963} + - + + + + + Resource Files + \ No newline at end of file diff --git a/src/modules/espresso/Espresso/dllmain.cpp b/src/modules/espresso/Espresso/dllmain.cpp index 05cd084f6f..863c337105 100644 --- a/src/modules/espresso/Espresso/dllmain.cpp +++ b/src/modules/espresso/Espresso/dllmain.cpp @@ -293,30 +293,11 @@ void Espresso::init_settings() { // Load and parse the settings file for this PowerToy. PowerToysSettings::PowerToyValues settings = - PowerToysSettings::PowerToyValues::load_from_settings_file(Espresso::get_name()); - - // Load a bool property. - //if (auto v = settings.get_bool_value(L"bool_toggle_1")) { - // g_settings.bool_prop = *v; - //} - - // Load an int property. - //if (auto v = settings.get_int_value(L"int_spinner_1")) { - // g_settings.int_prop = *v; - //} - - // Load a string property. - //if (auto v = settings.get_string_value(L"string_text_1")) { - // g_settings.string_prop = *v; - //} - - // Load a color property. - //if (auto v = settings.get_string_value(L"color_picker_1")) { - // g_settings.color_prop = *v; - //} + PowerToysSettings::PowerToyValues::load_from_settings_file(get_key()); } - catch (std::exception&) + catch (std::exception ex) { + Logger::warn(L"An exception occurred while loading the settings file"); // Error while loading from the settings file. Let default values stay as they are. } } From c141e4eec35b2709dc355658dc24e683173102e9 Mon Sep 17 00:00:00 2001 From: Den Delimarsky <1389609+dend@users.noreply.github.com> Date: Thu, 8 Apr 2021 15:12:09 -0700 Subject: [PATCH 15/81] Update Espresso managed application with proper command line parsing --- PowerToys.sln | 173 ++++++++++++++++++ .../espresso/Espresso.Shell/Core/APIHelper.cs | 76 ++++++++ .../Espresso.Shell/Espresso.Shell.csproj | 12 ++ .../espresso/Espresso.Shell/Program.cs | 70 +++++++ 4 files changed, 331 insertions(+) create mode 100644 src/modules/espresso/Espresso.Shell/Core/APIHelper.cs create mode 100644 src/modules/espresso/Espresso.Shell/Espresso.Shell.csproj create mode 100644 src/modules/espresso/Espresso.Shell/Program.cs diff --git a/PowerToys.sln b/PowerToys.sln index cd22ab483c..0636bd37b0 100644 --- a/PowerToys.sln +++ b/PowerToys.sln @@ -316,332 +316,504 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "espresso", "espresso", "{A8 EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Espresso", "src\modules\espresso\Espresso\Espresso.vcxproj", "{5E7360A8-D048-4ED3-8F09-0BFD64C5529A}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Espresso.Shell", "src\modules\espresso\Espresso.Shell\Espresso.Shell.csproj", "{495F91A0-DE4A-4DEF-BF92-092174A79168}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU Debug|x64 = Debug|x64 + Release|Any CPU = Release|Any CPU Release|x64 = Release|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution + {9412D5C6-2CF2-4FC2-A601-B55508EA9B27}.Debug|Any CPU.ActiveCfg = Debug|x64 {9412D5C6-2CF2-4FC2-A601-B55508EA9B27}.Debug|x64.ActiveCfg = Debug|x64 {9412D5C6-2CF2-4FC2-A601-B55508EA9B27}.Debug|x64.Build.0 = Debug|x64 + {9412D5C6-2CF2-4FC2-A601-B55508EA9B27}.Release|Any CPU.ActiveCfg = Release|x64 {9412D5C6-2CF2-4FC2-A601-B55508EA9B27}.Release|x64.ActiveCfg = Release|x64 {9412D5C6-2CF2-4FC2-A601-B55508EA9B27}.Release|x64.Build.0 = Release|x64 + {A46629C4-1A6C-40FA-A8B6-10E5102BB0BA}.Debug|Any CPU.ActiveCfg = Debug|x64 {A46629C4-1A6C-40FA-A8B6-10E5102BB0BA}.Debug|x64.ActiveCfg = Debug|x64 {A46629C4-1A6C-40FA-A8B6-10E5102BB0BA}.Debug|x64.Build.0 = Debug|x64 + {A46629C4-1A6C-40FA-A8B6-10E5102BB0BA}.Release|Any CPU.ActiveCfg = Release|x64 {A46629C4-1A6C-40FA-A8B6-10E5102BB0BA}.Release|x64.ActiveCfg = Release|x64 {A46629C4-1A6C-40FA-A8B6-10E5102BB0BA}.Release|x64.Build.0 = Release|x64 + {F9C68EDF-AC74-4B77-9AF1-005D9C9F6A99}.Debug|Any CPU.ActiveCfg = Debug|x64 {F9C68EDF-AC74-4B77-9AF1-005D9C9F6A99}.Debug|x64.ActiveCfg = Debug|x64 {F9C68EDF-AC74-4B77-9AF1-005D9C9F6A99}.Debug|x64.Build.0 = Debug|x64 + {F9C68EDF-AC74-4B77-9AF1-005D9C9F6A99}.Release|Any CPU.ActiveCfg = Release|x64 {F9C68EDF-AC74-4B77-9AF1-005D9C9F6A99}.Release|x64.ActiveCfg = Release|x64 {F9C68EDF-AC74-4B77-9AF1-005D9C9F6A99}.Release|x64.Build.0 = Release|x64 + {48804216-2A0E-4168-A6D8-9CD068D14227}.Debug|Any CPU.ActiveCfg = Debug|x64 {48804216-2A0E-4168-A6D8-9CD068D14227}.Debug|x64.ActiveCfg = Debug|x64 {48804216-2A0E-4168-A6D8-9CD068D14227}.Debug|x64.Build.0 = Debug|x64 + {48804216-2A0E-4168-A6D8-9CD068D14227}.Release|Any CPU.ActiveCfg = Release|x64 {48804216-2A0E-4168-A6D8-9CD068D14227}.Release|x64.ActiveCfg = Release|x64 {48804216-2A0E-4168-A6D8-9CD068D14227}.Release|x64.Build.0 = Release|x64 + {9C6A7905-72D4-4BF5-B256-ABFDAEF68AE9}.Debug|Any CPU.ActiveCfg = Debug|x64 {9C6A7905-72D4-4BF5-B256-ABFDAEF68AE9}.Debug|x64.ActiveCfg = Debug|x64 {9C6A7905-72D4-4BF5-B256-ABFDAEF68AE9}.Debug|x64.Build.0 = Debug|x64 + {9C6A7905-72D4-4BF5-B256-ABFDAEF68AE9}.Release|Any CPU.ActiveCfg = Release|x64 {9C6A7905-72D4-4BF5-B256-ABFDAEF68AE9}.Release|x64.ActiveCfg = Release|x64 {9C6A7905-72D4-4BF5-B256-ABFDAEF68AE9}.Release|x64.Build.0 = Release|x64 + {1A066C63-64B3-45F8-92FE-664E1CCE8077}.Debug|Any CPU.ActiveCfg = Debug|x64 {1A066C63-64B3-45F8-92FE-664E1CCE8077}.Debug|x64.ActiveCfg = Debug|x64 {1A066C63-64B3-45F8-92FE-664E1CCE8077}.Debug|x64.Build.0 = Debug|x64 + {1A066C63-64B3-45F8-92FE-664E1CCE8077}.Release|Any CPU.ActiveCfg = Release|x64 {1A066C63-64B3-45F8-92FE-664E1CCE8077}.Release|x64.ActiveCfg = Release|x64 {1A066C63-64B3-45F8-92FE-664E1CCE8077}.Release|x64.Build.0 = Release|x64 + {5CCC8468-DEC8-4D36-99D4-5C891BEBD481}.Debug|Any CPU.ActiveCfg = Debug|x64 {5CCC8468-DEC8-4D36-99D4-5C891BEBD481}.Debug|x64.ActiveCfg = Debug|x64 {5CCC8468-DEC8-4D36-99D4-5C891BEBD481}.Debug|x64.Build.0 = Debug|x64 + {5CCC8468-DEC8-4D36-99D4-5C891BEBD481}.Release|Any CPU.ActiveCfg = Release|x64 {5CCC8468-DEC8-4D36-99D4-5C891BEBD481}.Release|x64.ActiveCfg = Release|x64 {5CCC8468-DEC8-4D36-99D4-5C891BEBD481}.Release|x64.Build.0 = Release|x64 + {B25AC7A5-FB9F-4789-B392-D5C85E948670}.Debug|Any CPU.ActiveCfg = Debug|x64 {B25AC7A5-FB9F-4789-B392-D5C85E948670}.Debug|x64.ActiveCfg = Debug|x64 {B25AC7A5-FB9F-4789-B392-D5C85E948670}.Debug|x64.Build.0 = Debug|x64 + {B25AC7A5-FB9F-4789-B392-D5C85E948670}.Release|Any CPU.ActiveCfg = Release|x64 {B25AC7A5-FB9F-4789-B392-D5C85E948670}.Release|x64.ActiveCfg = Release|x64 {B25AC7A5-FB9F-4789-B392-D5C85E948670}.Release|x64.Build.0 = Release|x64 + {51920F1F-C28C-4ADF-8660-4238766796C2}.Debug|Any CPU.ActiveCfg = Debug|x64 {51920F1F-C28C-4ADF-8660-4238766796C2}.Debug|x64.ActiveCfg = Debug|x64 {51920F1F-C28C-4ADF-8660-4238766796C2}.Debug|x64.Build.0 = Debug|x64 + {51920F1F-C28C-4ADF-8660-4238766796C2}.Release|Any CPU.ActiveCfg = Release|x64 {51920F1F-C28C-4ADF-8660-4238766796C2}.Release|x64.ActiveCfg = Release|x64 {51920F1F-C28C-4ADF-8660-4238766796C2}.Release|x64.Build.0 = Release|x64 + {0E072714-D127-460B-AFAD-B4C40B412798}.Debug|Any CPU.ActiveCfg = Debug|x64 {0E072714-D127-460B-AFAD-B4C40B412798}.Debug|x64.ActiveCfg = Debug|x64 {0E072714-D127-460B-AFAD-B4C40B412798}.Debug|x64.Build.0 = Debug|x64 + {0E072714-D127-460B-AFAD-B4C40B412798}.Release|Any CPU.ActiveCfg = Release|x64 {0E072714-D127-460B-AFAD-B4C40B412798}.Release|x64.ActiveCfg = Release|x64 {0E072714-D127-460B-AFAD-B4C40B412798}.Release|x64.Build.0 = Release|x64 + {A3935CF4-46C5-4A88-84D3-6B12E16E6BA2}.Debug|Any CPU.ActiveCfg = Debug|x64 {A3935CF4-46C5-4A88-84D3-6B12E16E6BA2}.Debug|x64.ActiveCfg = Debug|x64 {A3935CF4-46C5-4A88-84D3-6B12E16E6BA2}.Debug|x64.Build.0 = Debug|x64 + {A3935CF4-46C5-4A88-84D3-6B12E16E6BA2}.Release|Any CPU.ActiveCfg = Release|x64 {A3935CF4-46C5-4A88-84D3-6B12E16E6BA2}.Release|x64.ActiveCfg = Release|x64 {A3935CF4-46C5-4A88-84D3-6B12E16E6BA2}.Release|x64.Build.0 = Release|x64 + {2151F984-E006-4A9F-92EF-C6DDE3DC8413}.Debug|Any CPU.ActiveCfg = Debug|x64 {2151F984-E006-4A9F-92EF-C6DDE3DC8413}.Debug|x64.ActiveCfg = Debug|x64 {2151F984-E006-4A9F-92EF-C6DDE3DC8413}.Debug|x64.Build.0 = Debug|x64 + {2151F984-E006-4A9F-92EF-C6DDE3DC8413}.Release|Any CPU.ActiveCfg = Release|x64 {2151F984-E006-4A9F-92EF-C6DDE3DC8413}.Release|x64.ActiveCfg = Release|x64 {2151F984-E006-4A9F-92EF-C6DDE3DC8413}.Release|x64.Build.0 = Release|x64 + {64A80062-4D8B-4229-8A38-DFA1D7497749}.Debug|Any CPU.ActiveCfg = Debug|x64 {64A80062-4D8B-4229-8A38-DFA1D7497749}.Debug|x64.ActiveCfg = Debug|x64 {64A80062-4D8B-4229-8A38-DFA1D7497749}.Debug|x64.Build.0 = Debug|x64 + {64A80062-4D8B-4229-8A38-DFA1D7497749}.Release|Any CPU.ActiveCfg = Release|x64 {64A80062-4D8B-4229-8A38-DFA1D7497749}.Release|x64.ActiveCfg = Release|x64 {64A80062-4D8B-4229-8A38-DFA1D7497749}.Release|x64.Build.0 = Release|x64 + {0485F45C-EA7A-4BB5-804B-3E8D14699387}.Debug|Any CPU.ActiveCfg = Debug|x64 {0485F45C-EA7A-4BB5-804B-3E8D14699387}.Debug|x64.ActiveCfg = Debug|x64 {0485F45C-EA7A-4BB5-804B-3E8D14699387}.Debug|x64.Build.0 = Debug|x64 + {0485F45C-EA7A-4BB5-804B-3E8D14699387}.Release|Any CPU.ActiveCfg = Release|x64 {0485F45C-EA7A-4BB5-804B-3E8D14699387}.Release|x64.ActiveCfg = Release|x64 {0485F45C-EA7A-4BB5-804B-3E8D14699387}.Release|x64.Build.0 = Release|x64 + {89F34AF7-1C34-4A72-AA6E-534BCF972BD9}.Debug|Any CPU.ActiveCfg = Debug|x64 {89F34AF7-1C34-4A72-AA6E-534BCF972BD9}.Debug|x64.ActiveCfg = Debug|x64 {89F34AF7-1C34-4A72-AA6E-534BCF972BD9}.Debug|x64.Build.0 = Debug|x64 + {89F34AF7-1C34-4A72-AA6E-534BCF972BD9}.Release|Any CPU.ActiveCfg = Release|x64 {89F34AF7-1C34-4A72-AA6E-534BCF972BD9}.Release|x64.ActiveCfg = Release|x64 {89F34AF7-1C34-4A72-AA6E-534BCF972BD9}.Release|x64.Build.0 = Release|x64 + {2BE46397-4DFA-414C-9BD4-41E4BBF8CB34}.Debug|Any CPU.ActiveCfg = Debug|x64 {2BE46397-4DFA-414C-9BD4-41E4BBF8CB34}.Debug|x64.ActiveCfg = Debug|x64 {2BE46397-4DFA-414C-9BD4-41E4BBF8CB34}.Debug|x64.Build.0 = Debug|x64 + {2BE46397-4DFA-414C-9BD4-41E4BBF8CB34}.Release|Any CPU.ActiveCfg = Release|x64 {2BE46397-4DFA-414C-9BD4-41E4BBF8CB34}.Release|x64.ActiveCfg = Release|x64 {2BE46397-4DFA-414C-9BD4-41E4BBF8CB34}.Release|x64.Build.0 = Release|x64 + {0B43679E-EDFA-4DA0-AD30-F4628B308B1B}.Debug|Any CPU.ActiveCfg = Debug|x64 {0B43679E-EDFA-4DA0-AD30-F4628B308B1B}.Debug|x64.ActiveCfg = Debug|x64 {0B43679E-EDFA-4DA0-AD30-F4628B308B1B}.Debug|x64.Build.0 = Debug|x64 + {0B43679E-EDFA-4DA0-AD30-F4628B308B1B}.Release|Any CPU.ActiveCfg = Release|x64 {0B43679E-EDFA-4DA0-AD30-F4628B308B1B}.Release|x64.ActiveCfg = Release|x64 {0B43679E-EDFA-4DA0-AD30-F4628B308B1B}.Release|x64.Build.0 = Release|x64 + {E0CC7526-D85E-43AC-844F-D5DF0D2F5AB8}.Debug|Any CPU.ActiveCfg = Debug|x64 {E0CC7526-D85E-43AC-844F-D5DF0D2F5AB8}.Debug|x64.ActiveCfg = Debug|x64 {E0CC7526-D85E-43AC-844F-D5DF0D2F5AB8}.Debug|x64.Build.0 = Debug|x64 + {E0CC7526-D85E-43AC-844F-D5DF0D2F5AB8}.Release|Any CPU.ActiveCfg = Release|x64 {E0CC7526-D85E-43AC-844F-D5DF0D2F5AB8}.Release|x64.ActiveCfg = Release|x64 {E0CC7526-D85E-43AC-844F-D5DF0D2F5AB8}.Release|x64.Build.0 = Release|x64 + {EAF23649-EF6E-478B-980E-81FAD96CCA2A}.Debug|Any CPU.ActiveCfg = Debug|x64 {EAF23649-EF6E-478B-980E-81FAD96CCA2A}.Debug|x64.ActiveCfg = Debug|x64 {EAF23649-EF6E-478B-980E-81FAD96CCA2A}.Debug|x64.Build.0 = Debug|x64 + {EAF23649-EF6E-478B-980E-81FAD96CCA2A}.Release|Any CPU.ActiveCfg = Release|x64 {EAF23649-EF6E-478B-980E-81FAD96CCA2A}.Release|x64.ActiveCfg = Release|x64 {EAF23649-EF6E-478B-980E-81FAD96CCA2A}.Release|x64.Build.0 = Release|x64 + {D29DDD63-E2CF-4657-9FD5-2AEDE4257E5D}.Debug|Any CPU.ActiveCfg = Debug|x64 {D29DDD63-E2CF-4657-9FD5-2AEDE4257E5D}.Debug|x64.ActiveCfg = Debug|x64 {D29DDD63-E2CF-4657-9FD5-2AEDE4257E5D}.Debug|x64.Build.0 = Debug|x64 + {D29DDD63-E2CF-4657-9FD5-2AEDE4257E5D}.Release|Any CPU.ActiveCfg = Release|x64 {D29DDD63-E2CF-4657-9FD5-2AEDE4257E5D}.Release|x64.ActiveCfg = Release|x64 {D29DDD63-E2CF-4657-9FD5-2AEDE4257E5D}.Release|x64.Build.0 = Release|x64 + {17DA04DF-E393-4397-9CF0-84DABE11032E}.Debug|Any CPU.ActiveCfg = Debug|x64 {17DA04DF-E393-4397-9CF0-84DABE11032E}.Debug|x64.ActiveCfg = Debug|x64 {17DA04DF-E393-4397-9CF0-84DABE11032E}.Debug|x64.Build.0 = Debug|x64 + {17DA04DF-E393-4397-9CF0-84DABE11032E}.Release|Any CPU.ActiveCfg = Release|x64 {17DA04DF-E393-4397-9CF0-84DABE11032E}.Release|x64.ActiveCfg = Release|x64 {17DA04DF-E393-4397-9CF0-84DABE11032E}.Release|x64.Build.0 = Release|x64 + {8AFFA899-0B73-49EC-8C50-0FADDA57B2FC}.Debug|Any CPU.ActiveCfg = Debug|x64 {8AFFA899-0B73-49EC-8C50-0FADDA57B2FC}.Debug|x64.ActiveCfg = Debug|x64 {8AFFA899-0B73-49EC-8C50-0FADDA57B2FC}.Debug|x64.Build.0 = Debug|x64 + {8AFFA899-0B73-49EC-8C50-0FADDA57B2FC}.Release|Any CPU.ActiveCfg = Release|x64 {8AFFA899-0B73-49EC-8C50-0FADDA57B2FC}.Release|x64.ActiveCfg = Release|x64 {8AFFA899-0B73-49EC-8C50-0FADDA57B2FC}.Release|x64.Build.0 = Release|x64 + {4FD29318-A8AB-4D8F-AA47-60BC241B8DA3}.Debug|Any CPU.ActiveCfg = Debug|x64 {4FD29318-A8AB-4D8F-AA47-60BC241B8DA3}.Debug|x64.ActiveCfg = Debug|x64 {4FD29318-A8AB-4D8F-AA47-60BC241B8DA3}.Debug|x64.Build.0 = Debug|x64 + {4FD29318-A8AB-4D8F-AA47-60BC241B8DA3}.Release|Any CPU.ActiveCfg = Release|x64 {4FD29318-A8AB-4D8F-AA47-60BC241B8DA3}.Release|x64.ActiveCfg = Release|x64 {4FD29318-A8AB-4D8F-AA47-60BC241B8DA3}.Release|x64.Build.0 = Release|x64 + {8451ECDD-2EA4-4966-BB0A-7BBC40138E80}.Debug|Any CPU.ActiveCfg = Debug|x64 {8451ECDD-2EA4-4966-BB0A-7BBC40138E80}.Debug|x64.ActiveCfg = Debug|x64 {8451ECDD-2EA4-4966-BB0A-7BBC40138E80}.Debug|x64.Build.0 = Debug|x64 + {8451ECDD-2EA4-4966-BB0A-7BBC40138E80}.Release|Any CPU.ActiveCfg = Release|x64 {8451ECDD-2EA4-4966-BB0A-7BBC40138E80}.Release|x64.ActiveCfg = Release|x64 {8451ECDD-2EA4-4966-BB0A-7BBC40138E80}.Release|x64.Build.0 = Release|x64 + {FF742965-9A80-41A5-B042-D6C7D3A21708}.Debug|Any CPU.ActiveCfg = Debug|x64 {FF742965-9A80-41A5-B042-D6C7D3A21708}.Debug|x64.ActiveCfg = Debug|x64 {FF742965-9A80-41A5-B042-D6C7D3A21708}.Debug|x64.Build.0 = Debug|x64 + {FF742965-9A80-41A5-B042-D6C7D3A21708}.Release|Any CPU.ActiveCfg = Release|x64 {FF742965-9A80-41A5-B042-D6C7D3A21708}.Release|x64.ActiveCfg = Release|x64 {FF742965-9A80-41A5-B042-D6C7D3A21708}.Release|x64.Build.0 = Release|x64 + {59BD9891-3837-438A-958D-ADC7F91F6F7E}.Debug|Any CPU.ActiveCfg = Debug|x64 {59BD9891-3837-438A-958D-ADC7F91F6F7E}.Debug|x64.ActiveCfg = Debug|x64 {59BD9891-3837-438A-958D-ADC7F91F6F7E}.Debug|x64.Build.0 = Debug|x64 + {59BD9891-3837-438A-958D-ADC7F91F6F7E}.Release|Any CPU.ActiveCfg = Release|x64 {59BD9891-3837-438A-958D-ADC7F91F6F7E}.Release|x64.ActiveCfg = Release|x64 {59BD9891-3837-438A-958D-ADC7F91F6F7E}.Release|x64.Build.0 = Release|x64 + {4D971245-7A70-41D5-BAA0-DDB5684CAF51}.Debug|Any CPU.ActiveCfg = Debug|x64 {4D971245-7A70-41D5-BAA0-DDB5684CAF51}.Debug|x64.ActiveCfg = Debug|x64 {4D971245-7A70-41D5-BAA0-DDB5684CAF51}.Debug|x64.Build.0 = Debug|x64 + {4D971245-7A70-41D5-BAA0-DDB5684CAF51}.Release|Any CPU.ActiveCfg = Release|x64 {4D971245-7A70-41D5-BAA0-DDB5684CAF51}.Release|x64.ActiveCfg = Release|x64 {4D971245-7A70-41D5-BAA0-DDB5684CAF51}.Release|x64.Build.0 = Release|x64 + {74F1B9ED-F59C-4FE7-B473-7B453E30837E}.Debug|Any CPU.ActiveCfg = Debug|x64 {74F1B9ED-F59C-4FE7-B473-7B453E30837E}.Debug|x64.ActiveCfg = Debug|x64 {74F1B9ED-F59C-4FE7-B473-7B453E30837E}.Debug|x64.Build.0 = Debug|x64 + {74F1B9ED-F59C-4FE7-B473-7B453E30837E}.Release|Any CPU.ActiveCfg = Release|x64 {74F1B9ED-F59C-4FE7-B473-7B453E30837E}.Release|x64.ActiveCfg = Release|x64 {74F1B9ED-F59C-4FE7-B473-7B453E30837E}.Release|x64.Build.0 = Release|x64 + {FDB3555B-58EF-4AE6-B5F1-904719637AB4}.Debug|Any CPU.ActiveCfg = Debug|x64 {FDB3555B-58EF-4AE6-B5F1-904719637AB4}.Debug|x64.ActiveCfg = Debug|x64 {FDB3555B-58EF-4AE6-B5F1-904719637AB4}.Debug|x64.Build.0 = Debug|x64 + {FDB3555B-58EF-4AE6-B5F1-904719637AB4}.Release|Any CPU.ActiveCfg = Release|x64 {FDB3555B-58EF-4AE6-B5F1-904719637AB4}.Release|x64.ActiveCfg = Release|x64 {FDB3555B-58EF-4AE6-B5F1-904719637AB4}.Release|x64.Build.0 = Release|x64 + {C21BFF9C-2C99-4B5F-B7C9-A5E6DDDB37B0}.Debug|Any CPU.ActiveCfg = Debug|x64 {C21BFF9C-2C99-4B5F-B7C9-A5E6DDDB37B0}.Debug|x64.ActiveCfg = Debug|x64 {C21BFF9C-2C99-4B5F-B7C9-A5E6DDDB37B0}.Debug|x64.Build.0 = Debug|x64 + {C21BFF9C-2C99-4B5F-B7C9-A5E6DDDB37B0}.Release|Any CPU.ActiveCfg = Release|x64 {C21BFF9C-2C99-4B5F-B7C9-A5E6DDDB37B0}.Release|x64.ActiveCfg = Release|x64 {C21BFF9C-2C99-4B5F-B7C9-A5E6DDDB37B0}.Release|x64.Build.0 = Release|x64 + {F8B870EB-D5F5-45BA-9CF7-A5C459818820}.Debug|Any CPU.ActiveCfg = Debug|x64 {F8B870EB-D5F5-45BA-9CF7-A5C459818820}.Debug|x64.ActiveCfg = Debug|x64 {F8B870EB-D5F5-45BA-9CF7-A5C459818820}.Debug|x64.Build.0 = Debug|x64 + {F8B870EB-D5F5-45BA-9CF7-A5C459818820}.Release|Any CPU.ActiveCfg = Release|x64 {F8B870EB-D5F5-45BA-9CF7-A5C459818820}.Release|x64.ActiveCfg = Release|x64 {F8B870EB-D5F5-45BA-9CF7-A5C459818820}.Release|x64.Build.0 = Release|x64 + {E364F67B-BB12-4E91-B639-355866EBCD8B}.Debug|Any CPU.ActiveCfg = Debug|x64 {E364F67B-BB12-4E91-B639-355866EBCD8B}.Debug|x64.ActiveCfg = Debug|x64 {E364F67B-BB12-4E91-B639-355866EBCD8B}.Debug|x64.Build.0 = Debug|x64 + {E364F67B-BB12-4E91-B639-355866EBCD8B}.Release|Any CPU.ActiveCfg = Release|x64 {E364F67B-BB12-4E91-B639-355866EBCD8B}.Release|x64.ActiveCfg = Release|x64 {E364F67B-BB12-4E91-B639-355866EBCD8B}.Release|x64.Build.0 = Release|x64 + {F97E5003-F263-4D4A-A964-0F1F3C82DEF2}.Debug|Any CPU.ActiveCfg = Debug|x64 {F97E5003-F263-4D4A-A964-0F1F3C82DEF2}.Debug|x64.ActiveCfg = Debug|x64 {F97E5003-F263-4D4A-A964-0F1F3C82DEF2}.Debug|x64.Build.0 = Debug|x64 + {F97E5003-F263-4D4A-A964-0F1F3C82DEF2}.Release|Any CPU.ActiveCfg = Release|x64 {F97E5003-F263-4D4A-A964-0F1F3C82DEF2}.Release|x64.ActiveCfg = Release|x64 {F97E5003-F263-4D4A-A964-0F1F3C82DEF2}.Release|x64.Build.0 = Release|x64 + {AF2349B8-E5B6-4004-9502-687C1C7730B1}.Debug|Any CPU.ActiveCfg = Debug|x64 {AF2349B8-E5B6-4004-9502-687C1C7730B1}.Debug|x64.ActiveCfg = Debug|x64 {AF2349B8-E5B6-4004-9502-687C1C7730B1}.Debug|x64.Build.0 = Debug|x64 + {AF2349B8-E5B6-4004-9502-687C1C7730B1}.Release|Any CPU.ActiveCfg = Release|x64 {AF2349B8-E5B6-4004-9502-687C1C7730B1}.Release|x64.ActiveCfg = Release|x64 {AF2349B8-E5B6-4004-9502-687C1C7730B1}.Release|x64.Build.0 = Release|x64 + {6A71162E-FC4C-4A2C-B90F-3CF94F59A9BB}.Debug|Any CPU.ActiveCfg = Debug|x64 {6A71162E-FC4C-4A2C-B90F-3CF94F59A9BB}.Debug|x64.ActiveCfg = Debug|x64 {6A71162E-FC4C-4A2C-B90F-3CF94F59A9BB}.Debug|x64.Build.0 = Debug|x64 + {6A71162E-FC4C-4A2C-B90F-3CF94F59A9BB}.Release|Any CPU.ActiveCfg = Release|x64 {6A71162E-FC4C-4A2C-B90F-3CF94F59A9BB}.Release|x64.ActiveCfg = Release|x64 {6A71162E-FC4C-4A2C-B90F-3CF94F59A9BB}.Release|x64.Build.0 = Release|x64 + {A2B51B8B-8F90-424E-BC97-F9AB7D76CA1A}.Debug|Any CPU.ActiveCfg = Debug|x64 {A2B51B8B-8F90-424E-BC97-F9AB7D76CA1A}.Debug|x64.ActiveCfg = Debug|x64 {A2B51B8B-8F90-424E-BC97-F9AB7D76CA1A}.Debug|x64.Build.0 = Debug|x64 + {A2B51B8B-8F90-424E-BC97-F9AB7D76CA1A}.Release|Any CPU.ActiveCfg = Release|x64 {A2B51B8B-8F90-424E-BC97-F9AB7D76CA1A}.Release|x64.ActiveCfg = Release|x64 {A2B51B8B-8F90-424E-BC97-F9AB7D76CA1A}.Release|x64.Build.0 = Release|x64 + {DA425894-6E13-404F-8DCB-78584EC0557A}.Debug|Any CPU.ActiveCfg = Debug|x64 {DA425894-6E13-404F-8DCB-78584EC0557A}.Debug|x64.ActiveCfg = Debug|x64 {DA425894-6E13-404F-8DCB-78584EC0557A}.Debug|x64.Build.0 = Debug|x64 + {DA425894-6E13-404F-8DCB-78584EC0557A}.Release|Any CPU.ActiveCfg = Release|x64 {DA425894-6E13-404F-8DCB-78584EC0557A}.Release|x64.ActiveCfg = Release|x64 {DA425894-6E13-404F-8DCB-78584EC0557A}.Release|x64.Build.0 = Release|x64 + {060D75DA-2D1C-48E6-A4A1-6F0718B64661}.Debug|Any CPU.ActiveCfg = Debug|x64 {060D75DA-2D1C-48E6-A4A1-6F0718B64661}.Debug|x64.ActiveCfg = Debug|x64 {060D75DA-2D1C-48E6-A4A1-6F0718B64661}.Debug|x64.Build.0 = Debug|x64 + {060D75DA-2D1C-48E6-A4A1-6F0718B64661}.Release|Any CPU.ActiveCfg = Release|x64 {060D75DA-2D1C-48E6-A4A1-6F0718B64661}.Release|x64.ActiveCfg = Release|x64 {060D75DA-2D1C-48E6-A4A1-6F0718B64661}.Release|x64.Build.0 = Release|x64 + {748417CA-F17E-487F-9411-CAFB6D3F4877}.Debug|Any CPU.ActiveCfg = Debug|x64 {748417CA-F17E-487F-9411-CAFB6D3F4877}.Debug|x64.ActiveCfg = Debug|x64 {748417CA-F17E-487F-9411-CAFB6D3F4877}.Debug|x64.Build.0 = Debug|x64 + {748417CA-F17E-487F-9411-CAFB6D3F4877}.Release|Any CPU.ActiveCfg = Release|x64 {748417CA-F17E-487F-9411-CAFB6D3F4877}.Release|x64.ActiveCfg = Release|x64 {748417CA-F17E-487F-9411-CAFB6D3F4877}.Release|x64.Build.0 = Release|x64 + {217DF501-135C-4E38-BFC8-99D4821032EA}.Debug|Any CPU.ActiveCfg = Debug|x64 {217DF501-135C-4E38-BFC8-99D4821032EA}.Debug|x64.ActiveCfg = Debug|x64 {217DF501-135C-4E38-BFC8-99D4821032EA}.Debug|x64.Build.0 = Debug|x64 + {217DF501-135C-4E38-BFC8-99D4821032EA}.Release|Any CPU.ActiveCfg = Release|x64 {217DF501-135C-4E38-BFC8-99D4821032EA}.Release|x64.ActiveCfg = Release|x64 {217DF501-135C-4E38-BFC8-99D4821032EA}.Release|x64.Build.0 = Release|x64 + {47310AB4-9034-4BD1-8D8B-E88AD21A171B}.Debug|Any CPU.ActiveCfg = Debug|x64 {47310AB4-9034-4BD1-8D8B-E88AD21A171B}.Debug|x64.ActiveCfg = Debug|x64 {47310AB4-9034-4BD1-8D8B-E88AD21A171B}.Debug|x64.Build.0 = Debug|x64 + {47310AB4-9034-4BD1-8D8B-E88AD21A171B}.Release|Any CPU.ActiveCfg = Release|x64 {47310AB4-9034-4BD1-8D8B-E88AD21A171B}.Release|x64.ActiveCfg = Release|x64 {47310AB4-9034-4BD1-8D8B-E88AD21A171B}.Release|x64.Build.0 = Release|x64 + {A7D5099E-F0FD-4BF3-8522-5A682759F915}.Debug|Any CPU.ActiveCfg = Debug|Win32 {A7D5099E-F0FD-4BF3-8522-5A682759F915}.Debug|x64.ActiveCfg = Debug|x64 {A7D5099E-F0FD-4BF3-8522-5A682759F915}.Debug|x64.Build.0 = Debug|x64 + {A7D5099E-F0FD-4BF3-8522-5A682759F915}.Release|Any CPU.ActiveCfg = Release|Win32 {A7D5099E-F0FD-4BF3-8522-5A682759F915}.Release|x64.ActiveCfg = Release|x64 {A7D5099E-F0FD-4BF3-8522-5A682759F915}.Release|x64.Build.0 = Release|x64 + {B1BCC8C6-46B5-4BFA-8F22-20F32D99EC6A}.Debug|Any CPU.ActiveCfg = Debug|x64 {B1BCC8C6-46B5-4BFA-8F22-20F32D99EC6A}.Debug|x64.ActiveCfg = Debug|x64 {B1BCC8C6-46B5-4BFA-8F22-20F32D99EC6A}.Debug|x64.Build.0 = Debug|x64 + {B1BCC8C6-46B5-4BFA-8F22-20F32D99EC6A}.Release|Any CPU.ActiveCfg = Release|x64 {B1BCC8C6-46B5-4BFA-8F22-20F32D99EC6A}.Release|x64.ActiveCfg = Release|x64 {B1BCC8C6-46B5-4BFA-8F22-20F32D99EC6A}.Release|x64.Build.0 = Release|x64 + {F055103B-F80B-4D0C-BF48-057C55620033}.Debug|Any CPU.ActiveCfg = Debug|x64 {F055103B-F80B-4D0C-BF48-057C55620033}.Debug|x64.ActiveCfg = Debug|x64 {F055103B-F80B-4D0C-BF48-057C55620033}.Debug|x64.Build.0 = Debug|x64 + {F055103B-F80B-4D0C-BF48-057C55620033}.Release|Any CPU.ActiveCfg = Release|x64 {F055103B-F80B-4D0C-BF48-057C55620033}.Release|x64.ActiveCfg = Release|x64 {F055103B-F80B-4D0C-BF48-057C55620033}.Release|x64.Build.0 = Release|x64 + {787B8AA6-CA93-4C84-96FE-DF31110AD1C4}.Debug|Any CPU.ActiveCfg = Debug|x64 {787B8AA6-CA93-4C84-96FE-DF31110AD1C4}.Debug|x64.ActiveCfg = Debug|x64 {787B8AA6-CA93-4C84-96FE-DF31110AD1C4}.Debug|x64.Build.0 = Debug|x64 + {787B8AA6-CA93-4C84-96FE-DF31110AD1C4}.Release|Any CPU.ActiveCfg = Release|x64 {787B8AA6-CA93-4C84-96FE-DF31110AD1C4}.Release|x64.ActiveCfg = Release|x64 {787B8AA6-CA93-4C84-96FE-DF31110AD1C4}.Release|x64.Build.0 = Release|x64 + {08C8C05F-0362-41BC-818C-724572DF8B06}.Debug|Any CPU.ActiveCfg = Debug|x64 {08C8C05F-0362-41BC-818C-724572DF8B06}.Debug|x64.ActiveCfg = Debug|x64 {08C8C05F-0362-41BC-818C-724572DF8B06}.Debug|x64.Build.0 = Debug|x64 + {08C8C05F-0362-41BC-818C-724572DF8B06}.Release|Any CPU.ActiveCfg = Release|x64 {08C8C05F-0362-41BC-818C-724572DF8B06}.Release|x64.ActiveCfg = Release|x64 {08C8C05F-0362-41BC-818C-724572DF8B06}.Release|x64.Build.0 = Release|x64 + {5D00D290-4016-4CFE-9E41-1E7C724509BA}.Debug|Any CPU.ActiveCfg = Debug|x64 {5D00D290-4016-4CFE-9E41-1E7C724509BA}.Debug|x64.ActiveCfg = Debug|x64 {5D00D290-4016-4CFE-9E41-1E7C724509BA}.Debug|x64.Build.0 = Debug|x64 + {5D00D290-4016-4CFE-9E41-1E7C724509BA}.Release|Any CPU.ActiveCfg = Release|x64 {5D00D290-4016-4CFE-9E41-1E7C724509BA}.Release|x64.ActiveCfg = Release|x64 {5D00D290-4016-4CFE-9E41-1E7C724509BA}.Release|x64.Build.0 = Release|x64 + {62173D9A-6724-4C00-A1C8-FB646480A9EC}.Debug|Any CPU.ActiveCfg = Debug|x64 {62173D9A-6724-4C00-A1C8-FB646480A9EC}.Debug|x64.ActiveCfg = Debug|x64 {62173D9A-6724-4C00-A1C8-FB646480A9EC}.Debug|x64.Build.0 = Debug|x64 + {62173D9A-6724-4C00-A1C8-FB646480A9EC}.Release|Any CPU.ActiveCfg = Release|x64 {62173D9A-6724-4C00-A1C8-FB646480A9EC}.Release|x64.ActiveCfg = Release|x64 {62173D9A-6724-4C00-A1C8-FB646480A9EC}.Release|x64.Build.0 = Release|x64 + {4AED67B6-55FD-486F-B917-E543DEE2CB3C}.Debug|Any CPU.ActiveCfg = Debug|x64 {4AED67B6-55FD-486F-B917-E543DEE2CB3C}.Debug|x64.ActiveCfg = Debug|x64 {4AED67B6-55FD-486F-B917-E543DEE2CB3C}.Debug|x64.Build.0 = Debug|x64 + {4AED67B6-55FD-486F-B917-E543DEE2CB3C}.Release|Any CPU.ActiveCfg = Release|x64 {4AED67B6-55FD-486F-B917-E543DEE2CB3C}.Release|x64.ActiveCfg = Release|x64 {4AED67B6-55FD-486F-B917-E543DEE2CB3C}.Release|x64.Build.0 = Release|x64 + {42851751-CBC8-45A6-97F5-7A0753F7B4D1}.Debug|Any CPU.ActiveCfg = Debug|x64 {42851751-CBC8-45A6-97F5-7A0753F7B4D1}.Debug|x64.ActiveCfg = Debug|x64 {42851751-CBC8-45A6-97F5-7A0753F7B4D1}.Debug|x64.Build.0 = Debug|x64 + {42851751-CBC8-45A6-97F5-7A0753F7B4D1}.Release|Any CPU.ActiveCfg = Release|x64 {42851751-CBC8-45A6-97F5-7A0753F7B4D1}.Release|x64.ActiveCfg = Release|x64 {42851751-CBC8-45A6-97F5-7A0753F7B4D1}.Release|x64.Build.0 = Release|x64 + {1EF1EEF0-10F0-4F2E-8550-39B6D8044D3E}.Debug|Any CPU.ActiveCfg = Debug|x64 {1EF1EEF0-10F0-4F2E-8550-39B6D8044D3E}.Debug|x64.ActiveCfg = Debug|x64 {1EF1EEF0-10F0-4F2E-8550-39B6D8044D3E}.Debug|x64.Build.0 = Debug|x64 + {1EF1EEF0-10F0-4F2E-8550-39B6D8044D3E}.Release|Any CPU.ActiveCfg = Release|x64 {1EF1EEF0-10F0-4F2E-8550-39B6D8044D3E}.Release|x64.ActiveCfg = Release|x64 {1EF1EEF0-10F0-4F2E-8550-39B6D8044D3E}.Release|x64.Build.0 = Release|x64 + {8FFE09DA-FA4F-4EE1-B3A2-AD5497FBD1AD}.Debug|Any CPU.ActiveCfg = Debug|x64 {8FFE09DA-FA4F-4EE1-B3A2-AD5497FBD1AD}.Debug|x64.ActiveCfg = Debug|x64 {8FFE09DA-FA4F-4EE1-B3A2-AD5497FBD1AD}.Debug|x64.Build.0 = Debug|x64 + {8FFE09DA-FA4F-4EE1-B3A2-AD5497FBD1AD}.Release|Any CPU.ActiveCfg = Release|x64 {8FFE09DA-FA4F-4EE1-B3A2-AD5497FBD1AD}.Release|x64.ActiveCfg = Release|x64 {8FFE09DA-FA4F-4EE1-B3A2-AD5497FBD1AD}.Release|x64.Build.0 = Release|x64 + {655C9AF2-18D3-4DA6-80E4-85504A7722BA}.Debug|Any CPU.ActiveCfg = Debug|x64 {655C9AF2-18D3-4DA6-80E4-85504A7722BA}.Debug|x64.ActiveCfg = Debug|x64 {655C9AF2-18D3-4DA6-80E4-85504A7722BA}.Debug|x64.Build.0 = Debug|x64 + {655C9AF2-18D3-4DA6-80E4-85504A7722BA}.Release|Any CPU.ActiveCfg = Release|x64 {655C9AF2-18D3-4DA6-80E4-85504A7722BA}.Release|x64.ActiveCfg = Release|x64 {655C9AF2-18D3-4DA6-80E4-85504A7722BA}.Release|x64.Build.0 = Release|x64 + {BA58206B-1493-4C75-BFEA-A85768A1E156}.Debug|Any CPU.ActiveCfg = Debug|x64 {BA58206B-1493-4C75-BFEA-A85768A1E156}.Debug|x64.ActiveCfg = Debug|x64 {BA58206B-1493-4C75-BFEA-A85768A1E156}.Debug|x64.Build.0 = Debug|x64 + {BA58206B-1493-4C75-BFEA-A85768A1E156}.Release|Any CPU.ActiveCfg = Release|x64 {BA58206B-1493-4C75-BFEA-A85768A1E156}.Release|x64.ActiveCfg = Release|x64 {BA58206B-1493-4C75-BFEA-A85768A1E156}.Release|x64.Build.0 = Release|x64 + {03276A39-D4E9-417C-8FFD-200B0EE5E871}.Debug|Any CPU.ActiveCfg = Debug|x64 {03276A39-D4E9-417C-8FFD-200B0EE5E871}.Debug|x64.ActiveCfg = Debug|x64 {03276A39-D4E9-417C-8FFD-200B0EE5E871}.Debug|x64.Build.0 = Debug|x64 + {03276A39-D4E9-417C-8FFD-200B0EE5E871}.Release|Any CPU.ActiveCfg = Release|x64 {03276A39-D4E9-417C-8FFD-200B0EE5E871}.Release|x64.ActiveCfg = Release|x64 {03276A39-D4E9-417C-8FFD-200B0EE5E871}.Release|x64.Build.0 = Release|x64 + {B81FB7B6-D30E-428F-908A-41422EFC1172}.Debug|Any CPU.ActiveCfg = Debug|x64 {B81FB7B6-D30E-428F-908A-41422EFC1172}.Debug|x64.ActiveCfg = Debug|x64 {B81FB7B6-D30E-428F-908A-41422EFC1172}.Debug|x64.Build.0 = Debug|x64 + {B81FB7B6-D30E-428F-908A-41422EFC1172}.Release|Any CPU.ActiveCfg = Release|x64 {B81FB7B6-D30E-428F-908A-41422EFC1172}.Release|x64.ActiveCfg = Release|x64 {B81FB7B6-D30E-428F-908A-41422EFC1172}.Release|x64.Build.0 = Release|x64 + {0F85E674-34AE-443D-954C-8321EB8B93B1}.Debug|Any CPU.ActiveCfg = Debug|x64 {0F85E674-34AE-443D-954C-8321EB8B93B1}.Debug|x64.ActiveCfg = Debug|x64 {0F85E674-34AE-443D-954C-8321EB8B93B1}.Debug|x64.Build.0 = Debug|x64 + {0F85E674-34AE-443D-954C-8321EB8B93B1}.Release|Any CPU.ActiveCfg = Release|x64 {0F85E674-34AE-443D-954C-8321EB8B93B1}.Release|x64.ActiveCfg = Release|x64 {0F85E674-34AE-443D-954C-8321EB8B93B1}.Release|x64.Build.0 = Release|x64 + {632BBE62-5421-49EA-835A-7FFA4F499BD6}.Debug|Any CPU.ActiveCfg = Debug|x64 {632BBE62-5421-49EA-835A-7FFA4F499BD6}.Debug|x64.ActiveCfg = Debug|x64 {632BBE62-5421-49EA-835A-7FFA4F499BD6}.Debug|x64.Build.0 = Debug|x64 + {632BBE62-5421-49EA-835A-7FFA4F499BD6}.Release|Any CPU.ActiveCfg = Release|x64 {632BBE62-5421-49EA-835A-7FFA4F499BD6}.Release|x64.ActiveCfg = Release|x64 {632BBE62-5421-49EA-835A-7FFA4F499BD6}.Release|x64.Build.0 = Release|x64 + {4FA206A5-F69F-4193-BF8F-F6EEB496734C}.Debug|Any CPU.ActiveCfg = Debug|x64 {4FA206A5-F69F-4193-BF8F-F6EEB496734C}.Debug|x64.ActiveCfg = Debug|x64 {4FA206A5-F69F-4193-BF8F-F6EEB496734C}.Debug|x64.Build.0 = Debug|x64 + {4FA206A5-F69F-4193-BF8F-F6EEB496734C}.Release|Any CPU.ActiveCfg = Release|x64 {4FA206A5-F69F-4193-BF8F-F6EEB496734C}.Release|x64.ActiveCfg = Release|x64 {4FA206A5-F69F-4193-BF8F-F6EEB496734C}.Release|x64.Build.0 = Release|x64 + {090CD7B7-3B0C-4D1D-BC98-83EB5D799BC1}.Debug|Any CPU.ActiveCfg = Debug|x64 {090CD7B7-3B0C-4D1D-BC98-83EB5D799BC1}.Debug|x64.ActiveCfg = Debug|x64 {090CD7B7-3B0C-4D1D-BC98-83EB5D799BC1}.Debug|x64.Build.0 = Debug|x64 + {090CD7B7-3B0C-4D1D-BC98-83EB5D799BC1}.Release|Any CPU.ActiveCfg = Release|x64 {090CD7B7-3B0C-4D1D-BC98-83EB5D799BC1}.Release|x64.ActiveCfg = Release|x64 {090CD7B7-3B0C-4D1D-BC98-83EB5D799BC1}.Release|x64.Build.0 = Release|x64 + {7E1E3F13-2BD6-3F75-A6A7-873A2B55C60F}.Debug|Any CPU.ActiveCfg = Debug|x64 {7E1E3F13-2BD6-3F75-A6A7-873A2B55C60F}.Debug|x64.ActiveCfg = Debug|x64 {7E1E3F13-2BD6-3F75-A6A7-873A2B55C60F}.Debug|x64.Build.0 = Debug|x64 + {7E1E3F13-2BD6-3F75-A6A7-873A2B55C60F}.Release|Any CPU.ActiveCfg = Release|x64 {7E1E3F13-2BD6-3F75-A6A7-873A2B55C60F}.Release|x64.ActiveCfg = Release|x64 {7E1E3F13-2BD6-3F75-A6A7-873A2B55C60F}.Release|x64.Build.0 = Release|x64 + {FD8EB419-FF9C-4D88-BB6F-BF6CED37747B}.Debug|Any CPU.ActiveCfg = Debug|x64 {FD8EB419-FF9C-4D88-BB6F-BF6CED37747B}.Debug|x64.ActiveCfg = Debug|x64 {FD8EB419-FF9C-4D88-BB6F-BF6CED37747B}.Debug|x64.Build.0 = Debug|x64 + {FD8EB419-FF9C-4D88-BB6F-BF6CED37747B}.Release|Any CPU.ActiveCfg = Release|x64 {FD8EB419-FF9C-4D88-BB6F-BF6CED37747B}.Release|x64.ActiveCfg = Release|x64 {FD8EB419-FF9C-4D88-BB6F-BF6CED37747B}.Release|x64.Build.0 = Release|x64 + {DA5A6FE9-0040-40CC-83CC-764AE5306590}.Debug|Any CPU.ActiveCfg = Debug|x64 {DA5A6FE9-0040-40CC-83CC-764AE5306590}.Debug|x64.ActiveCfg = Debug|x64 {DA5A6FE9-0040-40CC-83CC-764AE5306590}.Debug|x64.Build.0 = Debug|x64 + {DA5A6FE9-0040-40CC-83CC-764AE5306590}.Release|Any CPU.ActiveCfg = Release|x64 {DA5A6FE9-0040-40CC-83CC-764AE5306590}.Release|x64.ActiveCfg = Release|x64 {DA5A6FE9-0040-40CC-83CC-764AE5306590}.Release|x64.Build.0 = Release|x64 + {0351ADA4-0C32-4652-9BA0-41F7B602372B}.Debug|Any CPU.ActiveCfg = Debug|x64 {0351ADA4-0C32-4652-9BA0-41F7B602372B}.Debug|x64.ActiveCfg = Debug|x64 {0351ADA4-0C32-4652-9BA0-41F7B602372B}.Debug|x64.Build.0 = Debug|x64 + {0351ADA4-0C32-4652-9BA0-41F7B602372B}.Release|Any CPU.ActiveCfg = Release|x64 {0351ADA4-0C32-4652-9BA0-41F7B602372B}.Release|x64.ActiveCfg = Release|x64 {0351ADA4-0C32-4652-9BA0-41F7B602372B}.Release|x64.Build.0 = Release|x64 + {D9B8FC84-322A-4F9F-BBB9-20915C47DDFD}.Debug|Any CPU.ActiveCfg = Debug|x64 {D9B8FC84-322A-4F9F-BBB9-20915C47DDFD}.Debug|x64.ActiveCfg = Debug|x64 {D9B8FC84-322A-4F9F-BBB9-20915C47DDFD}.Debug|x64.Build.0 = Debug|x64 + {D9B8FC84-322A-4F9F-BBB9-20915C47DDFD}.Release|Any CPU.ActiveCfg = Release|x64 {D9B8FC84-322A-4F9F-BBB9-20915C47DDFD}.Release|x64.ActiveCfg = Release|x64 {D9B8FC84-322A-4F9F-BBB9-20915C47DDFD}.Release|x64.Build.0 = Release|x64 + {6955446D-23F7-4023-9BB3-8657F904AF99}.Debug|Any CPU.ActiveCfg = Debug|x64 {6955446D-23F7-4023-9BB3-8657F904AF99}.Debug|x64.ActiveCfg = Debug|x64 {6955446D-23F7-4023-9BB3-8657F904AF99}.Debug|x64.Build.0 = Debug|x64 + {6955446D-23F7-4023-9BB3-8657F904AF99}.Release|Any CPU.ActiveCfg = Release|x64 {6955446D-23F7-4023-9BB3-8657F904AF99}.Release|x64.ActiveCfg = Release|x64 {6955446D-23F7-4023-9BB3-8657F904AF99}.Release|x64.Build.0 = Release|x64 + {58736667-1027-4AD7-BFDF-7A3A6474103A}.Debug|Any CPU.ActiveCfg = Debug|x64 {58736667-1027-4AD7-BFDF-7A3A6474103A}.Debug|x64.ActiveCfg = Debug|x64 {58736667-1027-4AD7-BFDF-7A3A6474103A}.Debug|x64.Build.0 = Debug|x64 + {58736667-1027-4AD7-BFDF-7A3A6474103A}.Release|Any CPU.ActiveCfg = Release|x64 {58736667-1027-4AD7-BFDF-7A3A6474103A}.Release|x64.ActiveCfg = Release|x64 {58736667-1027-4AD7-BFDF-7A3A6474103A}.Release|x64.Build.0 = Release|x64 + {1D5BE09D-78C0-4FD7-AF00-AE7C1AF7C525}.Debug|Any CPU.ActiveCfg = Debug|x64 {1D5BE09D-78C0-4FD7-AF00-AE7C1AF7C525}.Debug|x64.ActiveCfg = Debug|x64 {1D5BE09D-78C0-4FD7-AF00-AE7C1AF7C525}.Debug|x64.Build.0 = Debug|x64 + {1D5BE09D-78C0-4FD7-AF00-AE7C1AF7C525}.Release|Any CPU.ActiveCfg = Release|x64 {1D5BE09D-78C0-4FD7-AF00-AE7C1AF7C525}.Release|x64.ActiveCfg = Release|x64 {1D5BE09D-78C0-4FD7-AF00-AE7C1AF7C525}.Release|x64.Build.0 = Release|x64 + {031AC72E-FA28-4AB7-B690-6F7B9C28AA73}.Debug|Any CPU.ActiveCfg = Debug|x64 {031AC72E-FA28-4AB7-B690-6F7B9C28AA73}.Debug|x64.ActiveCfg = Debug|x64 {031AC72E-FA28-4AB7-B690-6F7B9C28AA73}.Debug|x64.Build.0 = Debug|x64 + {031AC72E-FA28-4AB7-B690-6F7B9C28AA73}.Release|Any CPU.ActiveCfg = Release|x64 {031AC72E-FA28-4AB7-B690-6F7B9C28AA73}.Release|x64.ActiveCfg = Release|x64 {031AC72E-FA28-4AB7-B690-6F7B9C28AA73}.Release|x64.Build.0 = Release|x64 + {0B593A6C-4143-4337-860E-DB5710FB87DB}.Debug|Any CPU.ActiveCfg = Debug|x64 {0B593A6C-4143-4337-860E-DB5710FB87DB}.Debug|x64.ActiveCfg = Debug|x64 {0B593A6C-4143-4337-860E-DB5710FB87DB}.Debug|x64.Build.0 = Debug|x64 + {0B593A6C-4143-4337-860E-DB5710FB87DB}.Release|Any CPU.ActiveCfg = Release|x64 {0B593A6C-4143-4337-860E-DB5710FB87DB}.Release|x64.ActiveCfg = Release|x64 {0B593A6C-4143-4337-860E-DB5710FB87DB}.Release|x64.Build.0 = Release|x64 + {CC6E41AC-8174-4E8A-8D22-85DD7F4851DF}.Debug|Any CPU.ActiveCfg = Debug|x64 {CC6E41AC-8174-4E8A-8D22-85DD7F4851DF}.Debug|x64.ActiveCfg = Debug|x64 {CC6E41AC-8174-4E8A-8D22-85DD7F4851DF}.Debug|x64.Build.0 = Debug|x64 + {CC6E41AC-8174-4E8A-8D22-85DD7F4851DF}.Release|Any CPU.ActiveCfg = Release|x64 {CC6E41AC-8174-4E8A-8D22-85DD7F4851DF}.Release|x64.ActiveCfg = Release|x64 {CC6E41AC-8174-4E8A-8D22-85DD7F4851DF}.Release|x64.Build.0 = Release|x64 + {C502A854-53AC-4EBB-8DC0-E4AF2191E4F6}.Debug|Any CPU.ActiveCfg = Debug|x64 {C502A854-53AC-4EBB-8DC0-E4AF2191E4F6}.Debug|x64.ActiveCfg = Debug|x64 {C502A854-53AC-4EBB-8DC0-E4AF2191E4F6}.Debug|x64.Build.0 = Debug|x64 + {C502A854-53AC-4EBB-8DC0-E4AF2191E4F6}.Release|Any CPU.ActiveCfg = Release|x64 {C502A854-53AC-4EBB-8DC0-E4AF2191E4F6}.Release|x64.ActiveCfg = Release|x64 {C502A854-53AC-4EBB-8DC0-E4AF2191E4F6}.Release|x64.Build.0 = Release|x64 + {7319089E-46D6-4400-BC65-E39BDF1416EE}.Debug|Any CPU.ActiveCfg = Debug|x64 {7319089E-46D6-4400-BC65-E39BDF1416EE}.Debug|x64.ActiveCfg = Debug|x64 {7319089E-46D6-4400-BC65-E39BDF1416EE}.Debug|x64.Build.0 = Debug|x64 + {7319089E-46D6-4400-BC65-E39BDF1416EE}.Release|Any CPU.ActiveCfg = Release|x64 {7319089E-46D6-4400-BC65-E39BDF1416EE}.Release|x64.ActiveCfg = Release|x64 {7319089E-46D6-4400-BC65-E39BDF1416EE}.Release|x64.Build.0 = Release|x64 + {CABA8DFB-823B-4BF2-93AC-3F31984150D9}.Debug|Any CPU.ActiveCfg = Debug|x64 {CABA8DFB-823B-4BF2-93AC-3F31984150D9}.Debug|x64.ActiveCfg = Debug|x64 {CABA8DFB-823B-4BF2-93AC-3F31984150D9}.Debug|x64.Build.0 = Debug|x64 + {CABA8DFB-823B-4BF2-93AC-3F31984150D9}.Release|Any CPU.ActiveCfg = Release|x64 {CABA8DFB-823B-4BF2-93AC-3F31984150D9}.Release|x64.ActiveCfg = Release|x64 {CABA8DFB-823B-4BF2-93AC-3F31984150D9}.Release|x64.Build.0 = Release|x64 + {98537082-0FDB-40DE-ABD8-0DC5A4269BAB}.Debug|Any CPU.ActiveCfg = Debug|x64 {98537082-0FDB-40DE-ABD8-0DC5A4269BAB}.Debug|x64.ActiveCfg = Debug|x64 {98537082-0FDB-40DE-ABD8-0DC5A4269BAB}.Debug|x64.Build.0 = Debug|x64 + {98537082-0FDB-40DE-ABD8-0DC5A4269BAB}.Release|Any CPU.ActiveCfg = Release|x64 {98537082-0FDB-40DE-ABD8-0DC5A4269BAB}.Release|x64.ActiveCfg = Release|x64 {98537082-0FDB-40DE-ABD8-0DC5A4269BAB}.Release|x64.Build.0 = Release|x64 + {C3A17DCA-217B-462C-BB0C-BE086AF80081}.Debug|Any CPU.ActiveCfg = Debug|x64 {C3A17DCA-217B-462C-BB0C-BE086AF80081}.Debug|x64.ActiveCfg = Debug|x64 {C3A17DCA-217B-462C-BB0C-BE086AF80081}.Debug|x64.Build.0 = Debug|x64 + {C3A17DCA-217B-462C-BB0C-BE086AF80081}.Release|Any CPU.ActiveCfg = Release|x64 {C3A17DCA-217B-462C-BB0C-BE086AF80081}.Release|x64.ActiveCfg = Release|x64 {C3A17DCA-217B-462C-BB0C-BE086AF80081}.Release|x64.Build.0 = Release|x64 + {4BABF3FE-3451-42FD-873F-3C332E18DCEF}.Debug|Any CPU.ActiveCfg = Debug|x64 {4BABF3FE-3451-42FD-873F-3C332E18DCEF}.Debug|x64.ActiveCfg = Debug|x64 {4BABF3FE-3451-42FD-873F-3C332E18DCEF}.Debug|x64.Build.0 = Debug|x64 + {4BABF3FE-3451-42FD-873F-3C332E18DCEF}.Release|Any CPU.ActiveCfg = Release|x64 {4BABF3FE-3451-42FD-873F-3C332E18DCEF}.Release|x64.ActiveCfg = Release|x64 {4BABF3FE-3451-42FD-873F-3C332E18DCEF}.Release|x64.Build.0 = Release|x64 + {0648DF05-5DDA-4BE1-B5F2-584926EBDB65}.Debug|Any CPU.ActiveCfg = Debug|x64 {0648DF05-5DDA-4BE1-B5F2-584926EBDB65}.Debug|x64.ActiveCfg = Debug|x64 {0648DF05-5DDA-4BE1-B5F2-584926EBDB65}.Debug|x64.Build.0 = Debug|x64 + {0648DF05-5DDA-4BE1-B5F2-584926EBDB65}.Release|Any CPU.ActiveCfg = Release|x64 {0648DF05-5DDA-4BE1-B5F2-584926EBDB65}.Release|x64.ActiveCfg = Release|x64 {0648DF05-5DDA-4BE1-B5F2-584926EBDB65}.Release|x64.Build.0 = Release|x64 + {6ED2F4FC-E122-4CEE-90F1-97E4CCC8BC7A}.Debug|Any CPU.ActiveCfg = Debug|x64 {6ED2F4FC-E122-4CEE-90F1-97E4CCC8BC7A}.Debug|x64.ActiveCfg = Debug|x64 {6ED2F4FC-E122-4CEE-90F1-97E4CCC8BC7A}.Debug|x64.Build.0 = Debug|x64 + {6ED2F4FC-E122-4CEE-90F1-97E4CCC8BC7A}.Release|Any CPU.ActiveCfg = Release|x64 {6ED2F4FC-E122-4CEE-90F1-97E4CCC8BC7A}.Release|x64.ActiveCfg = Release|x64 {6ED2F4FC-E122-4CEE-90F1-97E4CCC8BC7A}.Release|x64.Build.0 = Release|x64 + {5E7360A8-D048-4ED3-8F09-0BFD64C5529A}.Debug|Any CPU.ActiveCfg = Debug|x64 {5E7360A8-D048-4ED3-8F09-0BFD64C5529A}.Debug|x64.ActiveCfg = Debug|x64 {5E7360A8-D048-4ED3-8F09-0BFD64C5529A}.Debug|x64.Build.0 = Debug|x64 + {5E7360A8-D048-4ED3-8F09-0BFD64C5529A}.Release|Any CPU.ActiveCfg = Release|x64 {5E7360A8-D048-4ED3-8F09-0BFD64C5529A}.Release|x64.ActiveCfg = Release|x64 {5E7360A8-D048-4ED3-8F09-0BFD64C5529A}.Release|x64.Build.0 = Release|x64 + {495F91A0-DE4A-4DEF-BF92-092174A79168}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {495F91A0-DE4A-4DEF-BF92-092174A79168}.Debug|Any CPU.Build.0 = Debug|Any CPU + {495F91A0-DE4A-4DEF-BF92-092174A79168}.Debug|x64.ActiveCfg = Debug|Any CPU + {495F91A0-DE4A-4DEF-BF92-092174A79168}.Debug|x64.Build.0 = Debug|Any CPU + {495F91A0-DE4A-4DEF-BF92-092174A79168}.Release|Any CPU.ActiveCfg = Release|Any CPU + {495F91A0-DE4A-4DEF-BF92-092174A79168}.Release|Any CPU.Build.0 = Release|Any CPU + {495F91A0-DE4A-4DEF-BF92-092174A79168}.Release|x64.ActiveCfg = Release|Any CPU + {495F91A0-DE4A-4DEF-BF92-092174A79168}.Release|x64.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -739,6 +911,7 @@ Global {6ED2F4FC-E122-4CEE-90F1-97E4CCC8BC7A} = {C3081D9A-1586-441A-B5F4-ED815B3719C1} {A81DFA80-09EB-4464-A89A-DF4AEAC93527} = {4574FDD0-F61D-4376-98BF-E5A1262C11EC} {5E7360A8-D048-4ED3-8F09-0BFD64C5529A} = {A81DFA80-09EB-4464-A89A-DF4AEAC93527} + {495F91A0-DE4A-4DEF-BF92-092174A79168} = {A81DFA80-09EB-4464-A89A-DF4AEAC93527} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {C3A2F9D1-7930-4EF4-A6FC-7EE0A99821D0} diff --git a/src/modules/espresso/Espresso.Shell/Core/APIHelper.cs b/src/modules/espresso/Espresso.Shell/Core/APIHelper.cs new file mode 100644 index 0000000000..a7e16946c8 --- /dev/null +++ b/src/modules/espresso/Espresso.Shell/Core/APIHelper.cs @@ -0,0 +1,76 @@ +using System; +using System.Runtime.InteropServices; + +namespace Espresso.Shell.Core +{ + [FlagsAttribute] + public enum EXECUTION_STATE : uint + { + ES_AWAYMODE_REQUIRED = 0x00000040, + ES_CONTINUOUS = 0x80000000, + ES_DISPLAY_REQUIRED = 0x00000002, + ES_SYSTEM_REQUIRED = 0x00000001 + } + + /// + /// Helper class that allows talking to Win32 APIs without having to rely on PInvoke in other parts + /// of the codebase. + /// + public class APIHelper + { + // More details about the API used: https://docs.microsoft.com/windows/win32/api/winbase/nf-winbase-setthreadexecutionstate + [DllImport("kernel32.dll", CharSet = CharSet.Auto, SetLastError = true)] + static extern EXECUTION_STATE SetThreadExecutionState(EXECUTION_STATE esFlags); + + /// + /// Sets the computer awake state using the native Win32 SetThreadExecutionState API. This + /// function is just a nice-to-have wrapper that helps avoid tracking the success or failure of + /// the call. + /// + /// Single or multiple EXECUTION_STATE entries. + /// true if successful, false if failed + private static bool SetAwakeState(EXECUTION_STATE state) + { + try + { + bool stateSettingSucceeded = (SetThreadExecutionState(state) != 0); + if (stateSettingSucceeded) + { + return true; + } + else + { + return false; + } + } + catch + { + return false; + } + } + + public static bool SetIndefiniteKeepAwake(bool keepDisplayOn = true) + { + if (keepDisplayOn) + { + return SetAwakeState(EXECUTION_STATE.ES_DISPLAY_REQUIRED | EXECUTION_STATE.ES_CONTINUOUS); + } + else + { + return SetAwakeState(EXECUTION_STATE.ES_CONTINUOUS); + } + } + + public static bool SetTimedKeepAwake(int seconds, bool keepDisplayOn = true) + { + if (keepDisplayOn) + { + return false; + } + else + { + return false; + } + } + } +} diff --git a/src/modules/espresso/Espresso.Shell/Espresso.Shell.csproj b/src/modules/espresso/Espresso.Shell/Espresso.Shell.csproj new file mode 100644 index 0000000000..0b1ad4d993 --- /dev/null +++ b/src/modules/espresso/Espresso.Shell/Espresso.Shell.csproj @@ -0,0 +1,12 @@ + + + + Exe + netcoreapp3.1 + + + + + + + diff --git a/src/modules/espresso/Espresso.Shell/Program.cs b/src/modules/espresso/Espresso.Shell/Program.cs new file mode 100644 index 0000000000..0a77bcdcbe --- /dev/null +++ b/src/modules/espresso/Espresso.Shell/Program.cs @@ -0,0 +1,70 @@ +using Espresso.Shell.Core; +using System; +using System.CommandLine; +using System.CommandLine.Invocation; +using System.Threading; + +namespace Espresso.Shell +{ + class Program + { + private static Mutex mutex = null; + private const string appName = "Espresso"; + + static int Main(string[] args) + { + bool instantiated; + mutex = new Mutex(true, appName, out instantiated); + + if (!instantiated) + { + Console.WriteLine(appName + " is already running! Exiting the application."); + Console.ReadKey(); + Environment.Exit(1); + } + + Console.WriteLine("Espresso - Computer Caffeination Engine"); + + + var rootCommand = new RootCommand + { + new Option( + aliases: new string[] {"--display-on", "-d" }, + getDefaultValue: () => false, + description: "Determines whether the display should be kept awake."), + new Option( + aliases: new string[] {"--time-limit", "-t" }, + getDefaultValue: () => 0, + description: "Determines the interval, in seconds, during which the computer is kept awake.") + }; + + rootCommand.Description = appName; + + rootCommand.Handler = CommandHandler.Create(HandleCommandLineArguments); + + return rootCommand.InvokeAsync(args).Result; + } + + private static void HandleCommandLineArguments(bool displayOption, long timeOption) + { + Console.WriteLine($"The value for --display-on is: {displayOption}"); + Console.WriteLine($"The value for --time-limit is: {timeOption}"); + + if (timeOption <= 0) + { + // Indefinite keep awake. + bool success = APIHelper.SetIndefiniteKeepAwake(displayOption); + if (success) + { + Console.WriteLine($"Currently in indefinite keep awake. Display always on: {displayOption}"); + } + else + { + Console.WriteLine("Could not set up the state to be indefinite keep awake."); + } + } + + new ManualResetEvent(false).WaitOne(); + } + } +} From 18f94fc0e604bc0ae45de1541e1faed776e98ba7 Mon Sep 17 00:00:00 2001 From: Den Delimarsky <1389609+dend@users.noreply.github.com> Date: Thu, 8 Apr 2021 16:09:59 -0700 Subject: [PATCH 16/81] Adding functionality to not sleep --- .../espresso/Espresso.Shell/Core/APIHelper.cs | 8 ++-- .../espresso/Espresso.Shell/Program.cs | 47 +++++++++++++------ 2 files changed, 37 insertions(+), 18 deletions(-) diff --git a/src/modules/espresso/Espresso.Shell/Core/APIHelper.cs b/src/modules/espresso/Espresso.Shell/Core/APIHelper.cs index a7e16946c8..aa07896962 100644 --- a/src/modules/espresso/Espresso.Shell/Core/APIHelper.cs +++ b/src/modules/espresso/Espresso.Shell/Core/APIHelper.cs @@ -49,15 +49,15 @@ namespace Espresso.Shell.Core } } - public static bool SetIndefiniteKeepAwake(bool keepDisplayOn = true) + public static bool SetIndefiniteKeepAwake(bool? keepDisplayOn = true) { - if (keepDisplayOn) + if ((bool)keepDisplayOn) { - return SetAwakeState(EXECUTION_STATE.ES_DISPLAY_REQUIRED | EXECUTION_STATE.ES_CONTINUOUS); + return SetAwakeState(EXECUTION_STATE.ES_SYSTEM_REQUIRED | EXECUTION_STATE.ES_DISPLAY_REQUIRED | EXECUTION_STATE.ES_CONTINUOUS); } else { - return SetAwakeState(EXECUTION_STATE.ES_CONTINUOUS); + return SetAwakeState(EXECUTION_STATE.ES_SYSTEM_REQUIRED | EXECUTION_STATE.ES_CONTINUOUS); } } diff --git a/src/modules/espresso/Espresso.Shell/Program.cs b/src/modules/espresso/Espresso.Shell/Program.cs index 0a77bcdcbe..db8106c524 100644 --- a/src/modules/espresso/Espresso.Shell/Program.cs +++ b/src/modules/espresso/Espresso.Shell/Program.cs @@ -25,17 +25,36 @@ namespace Espresso.Shell Console.WriteLine("Espresso - Computer Caffeination Engine"); + var displayOption = new Option( + aliases: new[] { "--display-on", "-d" }, + getDefaultValue: () => true, + description: "Determines whether the display should be kept awake.") + { + Argument = new Argument(() => false) + { + Arity = ArgumentArity.ZeroOrOne, + }, + }; + + displayOption.Required = false; + + var timeOption = new Option( + aliases: new[] { "--time-limit", "-t" }, + getDefaultValue: () => 0, + description: "Determines the interval, in seconds, during which the computer is kept awake.") + { + Argument = new Argument(() => 0) + { + Arity = ArgumentArity.ExactlyOne, + }, + }; + + timeOption.Required = false; var rootCommand = new RootCommand { - new Option( - aliases: new string[] {"--display-on", "-d" }, - getDefaultValue: () => false, - description: "Determines whether the display should be kept awake."), - new Option( - aliases: new string[] {"--time-limit", "-t" }, - getDefaultValue: () => 0, - description: "Determines the interval, in seconds, during which the computer is kept awake.") + displayOption, + timeOption }; rootCommand.Description = appName; @@ -45,18 +64,18 @@ namespace Espresso.Shell return rootCommand.InvokeAsync(args).Result; } - private static void HandleCommandLineArguments(bool displayOption, long timeOption) + private static void HandleCommandLineArguments(bool displayOn, long timeLimit) { - Console.WriteLine($"The value for --display-on is: {displayOption}"); - Console.WriteLine($"The value for --time-limit is: {timeOption}"); + Console.WriteLine($"The value for --display-on is: {displayOn}"); + Console.WriteLine($"The value for --time-limit is: {timeLimit}"); - if (timeOption <= 0) + if (timeLimit <= 0) { // Indefinite keep awake. - bool success = APIHelper.SetIndefiniteKeepAwake(displayOption); + bool success = APIHelper.SetIndefiniteKeepAwake(displayOn); if (success) { - Console.WriteLine($"Currently in indefinite keep awake. Display always on: {displayOption}"); + Console.WriteLine($"Currently in indefinite keep awake. Display always on: {displayOn}"); } else { From cd647eb352eb1d3831da9f17ea180d3b823153dd Mon Sep 17 00:00:00 2001 From: Den Delimarsky <1389609+dend@users.noreply.github.com> Date: Thu, 8 Apr 2021 16:30:56 -0700 Subject: [PATCH 17/81] Adding the option to have timed keep-awake --- .../espresso/Espresso.Shell/Core/APIHelper.cs | 37 ++++++++++++++++--- .../espresso/Espresso.Shell/Program.cs | 18 +++++++++ 2 files changed, 50 insertions(+), 5 deletions(-) diff --git a/src/modules/espresso/Espresso.Shell/Core/APIHelper.cs b/src/modules/espresso/Espresso.Shell/Core/APIHelper.cs index aa07896962..a8dd28a695 100644 --- a/src/modules/espresso/Espresso.Shell/Core/APIHelper.cs +++ b/src/modules/espresso/Espresso.Shell/Core/APIHelper.cs @@ -49,9 +49,9 @@ namespace Espresso.Shell.Core } } - public static bool SetIndefiniteKeepAwake(bool? keepDisplayOn = true) + public static bool SetIndefiniteKeepAwake(bool keepDisplayOn = true) { - if ((bool)keepDisplayOn) + if (keepDisplayOn) { return SetAwakeState(EXECUTION_STATE.ES_SYSTEM_REQUIRED | EXECUTION_STATE.ES_DISPLAY_REQUIRED | EXECUTION_STATE.ES_CONTINUOUS); } @@ -61,15 +61,42 @@ namespace Espresso.Shell.Core } } - public static bool SetTimedKeepAwake(int seconds, bool keepDisplayOn = true) + public static bool SetTimedKeepAwake(long seconds, bool keepDisplayOn = true) { if (keepDisplayOn) { - return false; + var success = SetAwakeState(EXECUTION_STATE.ES_SYSTEM_REQUIRED | EXECUTION_STATE.ES_DISPLAY_REQUIRED | EXECUTION_STATE.ES_CONTINUOUS); + if (success) + { + RunTimedLoop(seconds); + return true; + } + else + { + return false; + } } else { - return false; + var success = SetAwakeState(EXECUTION_STATE.ES_SYSTEM_REQUIRED | EXECUTION_STATE.ES_CONTINUOUS); + if (success) + { + RunTimedLoop(seconds); + return true; + } + else + { + return false; + } + } + } + + private static void RunTimedLoop(long seconds) + { + var startTime = DateTime.UtcNow; + while (DateTime.UtcNow - startTime < TimeSpan.FromSeconds(seconds)) + { + // We do nothing. } } } diff --git a/src/modules/espresso/Espresso.Shell/Program.cs b/src/modules/espresso/Espresso.Shell/Program.cs index db8106c524..75fbe48d46 100644 --- a/src/modules/espresso/Espresso.Shell/Program.cs +++ b/src/modules/espresso/Espresso.Shell/Program.cs @@ -82,6 +82,24 @@ namespace Espresso.Shell Console.WriteLine("Could not set up the state to be indefinite keep awake."); } } + else + { + // Timed keep-awake. + bool success = APIHelper.SetTimedKeepAwake(timeLimit, displayOn); + if (success) + { + Console.WriteLine($"Finished execution of timed keep-awake."); + + // Because the timed keep-awake execution completed, there is no reason for + // Espresso to stay alive - I will just shut down the application until it's + // launched again by the user. + Environment.Exit(0); + } + else + { + Console.WriteLine("Could not set up the state to be timed keep awake."); + } + } new ManualResetEvent(false).WaitOne(); } From aa46bf6076aef64e45ed2a49f209083a1d7684af Mon Sep 17 00:00:00 2001 From: Den Delimarsky <1389609+dend@users.noreply.github.com> Date: Tue, 20 Apr 2021 07:54:03 -0700 Subject: [PATCH 18/81] Can currently watch the file system. --- .../espresso/Espresso.Shell/Program.cs | 83 ++++++++++++++----- 1 file changed, 60 insertions(+), 23 deletions(-) diff --git a/src/modules/espresso/Espresso.Shell/Program.cs b/src/modules/espresso/Espresso.Shell/Program.cs index 75fbe48d46..86aed38eb6 100644 --- a/src/modules/espresso/Espresso.Shell/Program.cs +++ b/src/modules/espresso/Espresso.Shell/Program.cs @@ -2,6 +2,7 @@ using System; using System.CommandLine; using System.CommandLine.Invocation; +using System.IO; using System.Threading; namespace Espresso.Shell @@ -25,6 +26,19 @@ namespace Espresso.Shell Console.WriteLine("Espresso - Computer Caffeination Engine"); + var configOption = new Option( + aliases: new[] { "--config", "-c" }, + getDefaultValue: () => string.Empty, + description: "Pointer to a PowerToys configuration file that the tool will be watching for changes. All other options are disregarded if config is used.") + { + Argument = new Argument(() => string.Empty) + { + Arity = ArgumentArity.ZeroOrOne, + }, + }; + + configOption.Required = false; + var displayOption = new Option( aliases: new[] { "--display-on", "-d" }, getDefaultValue: () => true, @@ -53,55 +67,78 @@ namespace Espresso.Shell var rootCommand = new RootCommand { + configOption, displayOption, timeOption }; rootCommand.Description = appName; - rootCommand.Handler = CommandHandler.Create(HandleCommandLineArguments); + rootCommand.Handler = CommandHandler.Create(HandleCommandLineArguments); return rootCommand.InvokeAsync(args).Result; } - private static void HandleCommandLineArguments(bool displayOn, long timeLimit) + private static void HandleCommandLineArguments(string config, bool displayOn, long timeLimit) { Console.WriteLine($"The value for --display-on is: {displayOn}"); Console.WriteLine($"The value for --time-limit is: {timeLimit}"); - - if (timeLimit <= 0) + + if (!string.IsNullOrWhiteSpace(config)) { - // Indefinite keep awake. - bool success = APIHelper.SetIndefiniteKeepAwake(displayOn); - if (success) + // Configuration file is used, therefore we disregard any other command-line parameter + // and instead watch for changes in the file. + + FileSystemWatcher watcher = new FileSystemWatcher { - Console.WriteLine($"Currently in indefinite keep awake. Display always on: {displayOn}"); - } - else - { - Console.WriteLine("Could not set up the state to be indefinite keep awake."); - } + Path = Path.GetDirectoryName(config), + EnableRaisingEvents = true, + NotifyFilter = NotifyFilters.LastWrite, + Filter = Path.GetFileName(config) + }; + watcher.Changed += new FileSystemEventHandler(HandleEspressoConfigChange); } else { - // Timed keep-awake. - bool success = APIHelper.SetTimedKeepAwake(timeLimit, displayOn); - if (success) + if (timeLimit <= 0) { - Console.WriteLine($"Finished execution of timed keep-awake."); - - // Because the timed keep-awake execution completed, there is no reason for - // Espresso to stay alive - I will just shut down the application until it's - // launched again by the user. - Environment.Exit(0); + // Indefinite keep awake. + bool success = APIHelper.SetIndefiniteKeepAwake(displayOn); + if (success) + { + Console.WriteLine($"Currently in indefinite keep awake. Display always on: {displayOn}"); + } + else + { + Console.WriteLine("Could not set up the state to be indefinite keep awake."); + } } else { - Console.WriteLine("Could not set up the state to be timed keep awake."); + // Timed keep-awake. + bool success = APIHelper.SetTimedKeepAwake(timeLimit, displayOn); + if (success) + { + Console.WriteLine($"Finished execution of timed keep-awake."); + + // Because the timed keep-awake execution completed, there is no reason for + // Espresso to stay alive - I will just shut down the application until it's + // launched again by the user. + Environment.Exit(0); + } + else + { + Console.WriteLine("Could not set up the state to be timed keep awake."); + } } } new ManualResetEvent(false).WaitOne(); } + + private static void HandleEspressoConfigChange(object sender, FileSystemEventArgs e) + { + Console.WriteLine("Reached test!"); + } } } From a0c5f8cc59022cdb9d299ff29ac64ea0c53f9d29 Mon Sep 17 00:00:00 2001 From: Den Delimarsky <1389609+dend@users.noreply.github.com> Date: Tue, 20 Apr 2021 08:31:18 -0700 Subject: [PATCH 19/81] File watcher with keep-awake state binding --- .../espresso/Espresso.Shell/Core/APIHelper.cs | 5 + .../Espresso.Shell/Espresso.Shell.csproj | 1 + .../Models/EspressoSettingsModel.cs | 42 +++++++ .../espresso/Espresso.Shell/Program.cs | 103 ++++++++++++++++-- 4 files changed, 140 insertions(+), 11 deletions(-) create mode 100644 src/modules/espresso/Espresso.Shell/Models/EspressoSettingsModel.cs diff --git a/src/modules/espresso/Espresso.Shell/Core/APIHelper.cs b/src/modules/espresso/Espresso.Shell/Core/APIHelper.cs index a8dd28a695..1b8931df37 100644 --- a/src/modules/espresso/Espresso.Shell/Core/APIHelper.cs +++ b/src/modules/espresso/Espresso.Shell/Core/APIHelper.cs @@ -49,6 +49,11 @@ namespace Espresso.Shell.Core } } + public static bool SetNormalKeepAwake() + { + return SetAwakeState(EXECUTION_STATE.ES_CONTINUOUS); + } + public static bool SetIndefiniteKeepAwake(bool keepDisplayOn = true) { if (keepDisplayOn) diff --git a/src/modules/espresso/Espresso.Shell/Espresso.Shell.csproj b/src/modules/espresso/Espresso.Shell/Espresso.Shell.csproj index 0b1ad4d993..fcef0fe5b7 100644 --- a/src/modules/espresso/Espresso.Shell/Espresso.Shell.csproj +++ b/src/modules/espresso/Espresso.Shell/Espresso.Shell.csproj @@ -6,6 +6,7 @@ + diff --git a/src/modules/espresso/Espresso.Shell/Models/EspressoSettingsModel.cs b/src/modules/espresso/Espresso.Shell/Models/EspressoSettingsModel.cs new file mode 100644 index 0000000000..8fd358861b --- /dev/null +++ b/src/modules/espresso/Espresso.Shell/Models/EspressoSettingsModel.cs @@ -0,0 +1,42 @@ +using Newtonsoft.Json; + +namespace Espresso.Shell.Models +{ + public class EspressoSettingsModel + { + [JsonProperty("properties")] + public Properties Properties { get; set; } + [JsonProperty("name")] + public string Name { get; set; } + [JsonProperty("version")] + public string Version { get; set; } + } + + public class Properties + { + [JsonProperty("espresso_keep_display_on")] + public KeepDisplayOn KeepDisplayOn { get; set; } + [JsonProperty("espresso_mode")] + public int Mode { get; set; } + [JsonProperty("espresso_hours")] + public Hours Hours { get; set; } + [JsonProperty("espresso_minutes")] + public Minutes Minutes { get; set; } + } + + public class KeepDisplayOn + { + public bool Value { get; set; } + } + + public class Hours + { + public int Value { get; set; } + } + + public class Minutes + { + public int Value { get; set; } + } + +} diff --git a/src/modules/espresso/Espresso.Shell/Program.cs b/src/modules/espresso/Espresso.Shell/Program.cs index 86aed38eb6..2f3790b33f 100644 --- a/src/modules/espresso/Espresso.Shell/Program.cs +++ b/src/modules/espresso/Espresso.Shell/Program.cs @@ -1,4 +1,6 @@ using Espresso.Shell.Core; +using Espresso.Shell.Models; +using Newtonsoft.Json; using System; using System.CommandLine; using System.CommandLine.Invocation; @@ -19,9 +21,7 @@ namespace Espresso.Shell if (!instantiated) { - Console.WriteLine(appName + " is already running! Exiting the application."); - Console.ReadKey(); - Environment.Exit(1); + ForceExit(appName + " is already running! Exiting the application.", 1); } Console.WriteLine("Espresso - Computer Caffeination Engine"); @@ -79,6 +79,13 @@ namespace Espresso.Shell return rootCommand.InvokeAsync(args).Result; } + private static void ForceExit(string message, int exitCode) + { + Console.WriteLine(message); + Console.ReadKey(); + Environment.Exit(exitCode); + } + private static void HandleCommandLineArguments(string config, bool displayOn, long timeLimit) { Console.WriteLine($"The value for --display-on is: {displayOn}"); @@ -89,14 +96,21 @@ namespace Espresso.Shell // Configuration file is used, therefore we disregard any other command-line parameter // and instead watch for changes in the file. - FileSystemWatcher watcher = new FileSystemWatcher + try { - Path = Path.GetDirectoryName(config), - EnableRaisingEvents = true, - NotifyFilter = NotifyFilters.LastWrite, - Filter = Path.GetFileName(config) - }; - watcher.Changed += new FileSystemEventHandler(HandleEspressoConfigChange); + var watcher = new FileSystemWatcher + { + Path = Path.GetDirectoryName(config), + EnableRaisingEvents = true, + NotifyFilter = NotifyFilters.LastWrite, + Filter = Path.GetFileName(config) + }; + watcher.Changed += new FileSystemEventHandler(HandleEspressoConfigChange); + } + catch (Exception ex) + { + ForceExit($"There was a problem with the configuration file. Make sure it exists.\n{ex.Message}", 1); + } } else { @@ -138,7 +152,74 @@ namespace Espresso.Shell private static void HandleEspressoConfigChange(object sender, FileSystemEventArgs e) { - Console.WriteLine("Reached test!"); + Console.WriteLine("Detected a file change. Reacting..."); + try + { + var settings = JsonConvert.DeserializeObject(File.ReadAllText(e.FullPath)); + + // If the settings were successfully processed, we need to set the right mode of operation. + // INDEFINITE = 0 + // TIMED = 1 + + switch (settings.Properties.Mode) + { + case 0: + { + // Indefinite keep awake. + bool success = APIHelper.SetIndefiniteKeepAwake(settings.Properties.KeepDisplayOn.Value); + if (success) + { + Console.WriteLine($"Currently in indefinite keep awake. Display always on: {settings.Properties.KeepDisplayOn.Value}"); + } + else + { + Console.WriteLine("Could not set up the state to be indefinite keep awake."); + } + break; + } + case 1: + { + // Timed keep-awake. + long computedTime = (settings.Properties.Hours.Value * 60 * 60) + (settings.Properties.Minutes.Value * 60); + Console.WriteLine($"In timed keep-awake mode. Expecting to be awake for {computedTime} seconds."); + + bool success = APIHelper.SetTimedKeepAwake(computedTime, settings.Properties.KeepDisplayOn.Value); + if (success) + { + Console.WriteLine($"Finished execution of timed keep-awake."); + + ResetNormalPowerState(); + } + else + { + Console.WriteLine("Could not set up the state to be timed keep awake."); + } + break; + } + default: + { + ForceExit("Could not select the right mode of operation. Existing...", 1); + break; + } + } + } + catch (Exception ex) + { + ForceExit($"There was a problem reading the configuration file.\n{ex.Message}", 1); + } + } + + private static void ResetNormalPowerState() + { + bool success = APIHelper.SetNormalKeepAwake(); + if (success) + { + Console.WriteLine("Returned to normal keep-awake state."); + } + else + { + Console.WriteLine("Could not return to normal keep-awake state."); + } } } } From 919f7bacfe958c90dc34784b5fa53f56c0990108 Mon Sep 17 00:00:00 2001 From: Den Delimarsky <1389609+dend@users.noreply.github.com> Date: Thu, 22 Apr 2021 08:14:07 -0700 Subject: [PATCH 20/81] Update file handling logic --- .../espresso/Espresso.Shell/Program.cs | 139 +++++++++++++----- 1 file changed, 99 insertions(+), 40 deletions(-) diff --git a/src/modules/espresso/Espresso.Shell/Program.cs b/src/modules/espresso/Espresso.Shell/Program.cs index 2f3790b33f..b6b1e213bf 100644 --- a/src/modules/espresso/Espresso.Shell/Program.cs +++ b/src/modules/espresso/Espresso.Shell/Program.cs @@ -5,6 +5,7 @@ using System; using System.CommandLine; using System.CommandLine.Invocation; using System.IO; +using System.Runtime.InteropServices; using System.Threading; namespace Espresso.Shell @@ -14,6 +15,9 @@ namespace Espresso.Shell private static Mutex mutex = null; private const string appName = "Espresso"; + const int ERROR_SHARING_VIOLATION = 32; + const int ERROR_LOCK_VIOLATION = 33; + static int Main(string[] args) { bool instantiated; @@ -106,6 +110,10 @@ namespace Espresso.Shell Filter = Path.GetFileName(config) }; watcher.Changed += new FileSystemEventHandler(HandleEspressoConfigChange); + + // Initially the file might not be updated, so we need to start processing + // settings right away. + ProcessSettings(config); } catch (Exception ex) { @@ -151,56 +159,82 @@ namespace Espresso.Shell } private static void HandleEspressoConfigChange(object sender, FileSystemEventArgs e) + { + ProcessSettings(e.FullPath); + } + + private static void ProcessSettings(string fullPath) { Console.WriteLine("Detected a file change. Reacting..."); try { - var settings = JsonConvert.DeserializeObject(File.ReadAllText(e.FullPath)); + EspressoSettingsModel settings = null; - // If the settings were successfully processed, we need to set the right mode of operation. - // INDEFINITE = 0 - // TIMED = 1 - - switch (settings.Properties.Mode) + var fileStream = GetSettingsFile(fullPath, 10); + if (fileStream != null) { - case 0: - { - // Indefinite keep awake. - bool success = APIHelper.SetIndefiniteKeepAwake(settings.Properties.KeepDisplayOn.Value); - if (success) - { - Console.WriteLine($"Currently in indefinite keep awake. Display always on: {settings.Properties.KeepDisplayOn.Value}"); - } - else - { - Console.WriteLine("Could not set up the state to be indefinite keep awake."); - } - break; - } - case 1: - { - // Timed keep-awake. - long computedTime = (settings.Properties.Hours.Value * 60 * 60) + (settings.Properties.Minutes.Value * 60); - Console.WriteLine($"In timed keep-awake mode. Expecting to be awake for {computedTime} seconds."); + using (fileStream) + { + using StreamReader reader = new StreamReader(fileStream); + settings = JsonConvert.DeserializeObject(reader.ReadToEnd()); + } - bool success = APIHelper.SetTimedKeepAwake(computedTime, settings.Properties.KeepDisplayOn.Value); - if (success) - { - Console.WriteLine($"Finished execution of timed keep-awake."); + if (settings != null) + { + // If the settings were successfully processed, we need to set the right mode of operation. + // INDEFINITE = 0 + // TIMED = 1 - ResetNormalPowerState(); - } - else - { - Console.WriteLine("Could not set up the state to be timed keep awake."); - } - break; - } - default: + switch (settings.Properties.Mode) { - ForceExit("Could not select the right mode of operation. Existing...", 1); - break; + case 0: + { + // Indefinite keep awake. + bool success = APIHelper.SetIndefiniteKeepAwake(settings.Properties.KeepDisplayOn.Value); + if (success) + { + Console.WriteLine($"Currently in indefinite keep awake. Display always on: {settings.Properties.KeepDisplayOn.Value}"); + } + else + { + Console.WriteLine("Could not set up the state to be indefinite keep awake."); + } + break; + } + case 1: + { + // Timed keep-awake. + long computedTime = (settings.Properties.Hours.Value * 60 * 60) + (settings.Properties.Minutes.Value * 60); + Console.WriteLine($"In timed keep-awake mode. Expecting to be awake for {computedTime} seconds."); + + bool success = APIHelper.SetTimedKeepAwake(computedTime, settings.Properties.KeepDisplayOn.Value); + if (success) + { + Console.WriteLine($"Finished execution of timed keep-awake."); + + ResetNormalPowerState(); + } + else + { + Console.WriteLine("Could not set up the state to be timed keep awake."); + } + break; + } + default: + { + ForceExit("Could not select the right mode of operation. Existing...", 1); + break; + } } + } + else + { + Console.WriteLine("Settings are null."); + } + } + else + { + Console.WriteLine("Could not get handle on file."); } } catch (Exception ex) @@ -209,6 +243,31 @@ namespace Espresso.Shell } } + private static FileStream GetSettingsFile(string path, int retries) + { + for (int i = 0; i < retries; i++) + { + FileStream fileStream = null; + try + { + fileStream = new FileStream(path, FileMode.Open, FileAccess.Read, FileShare.None); + return fileStream; + } + catch (IOException ex) + { + var errorCode = Marshal.GetHRForException(ex) & ((1 << 16) - 1); + if (errorCode == ERROR_SHARING_VIOLATION || errorCode == ERROR_LOCK_VIOLATION) + { + Console.WriteLine("There was another process using the file, so couldn't pick the settings up."); + } + + Thread.Sleep(50); + } + } + + return null; + } + private static void ResetNormalPowerState() { bool success = APIHelper.SetNormalKeepAwake(); From 849c376fb8aba57f766d722f9cee578ffa562037 Mon Sep 17 00:00:00 2001 From: Den Delimarsky <1389609+dend@users.noreply.github.com> Date: Fri, 23 Apr 2021 08:00:22 -0700 Subject: [PATCH 21/81] Update settings configuration --- src/modules/espresso/Espresso.Shell/Core/APIHelper.cs | 5 ++++- src/modules/espresso/Espresso.Shell/Program.cs | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/modules/espresso/Espresso.Shell/Core/APIHelper.cs b/src/modules/espresso/Espresso.Shell/Core/APIHelper.cs index 1b8931df37..879d0f2b27 100644 --- a/src/modules/espresso/Espresso.Shell/Core/APIHelper.cs +++ b/src/modules/espresso/Espresso.Shell/Core/APIHelper.cs @@ -33,7 +33,10 @@ namespace Espresso.Shell.Core { try { - bool stateSettingSucceeded = (SetThreadExecutionState(state) != 0); + var stateResult = SetThreadExecutionState(state); + bool stateSettingSucceeded = (stateResult != 0); + Console.WriteLine($"State setting result: {stateResult}"); + if (stateSettingSucceeded) { return true; diff --git a/src/modules/espresso/Espresso.Shell/Program.cs b/src/modules/espresso/Espresso.Shell/Program.cs index b6b1e213bf..bbe9b84f5f 100644 --- a/src/modules/espresso/Espresso.Shell/Program.cs +++ b/src/modules/espresso/Espresso.Shell/Program.cs @@ -239,7 +239,8 @@ namespace Espresso.Shell } catch (Exception ex) { - ForceExit($"There was a problem reading the configuration file.\n{ex.Message}", 1); + Console.WriteLine($"There was a problem reading the configuration file.\n{ex.Message}"); + //ForceExit($"There was a problem reading the configuration file.\n{ex.Message}", 1); } } From c0757b74e84ce62f58a74bdd38d3fae92095fc79 Mon Sep 17 00:00:00 2001 From: Den Delimarsky <1389609+dend@users.noreply.github.com> Date: Fri, 23 Apr 2021 08:11:32 -0700 Subject: [PATCH 22/81] Cleanup the code --- .../espresso/Espresso.Shell/Core/APIHelper.cs | 6 ++- .../Espresso.Shell/Core/SettingsHelper.cs | 42 +++++++++++++++++++ .../Models/EspressoSettingsModel.cs | 6 ++- .../espresso/Espresso.Shell/Program.cs | 40 ++++-------------- 4 files changed, 60 insertions(+), 34 deletions(-) create mode 100644 src/modules/espresso/Espresso.Shell/Core/SettingsHelper.cs diff --git a/src/modules/espresso/Espresso.Shell/Core/APIHelper.cs b/src/modules/espresso/Espresso.Shell/Core/APIHelper.cs index 879d0f2b27..3d5b29b4a8 100644 --- a/src/modules/espresso/Espresso.Shell/Core/APIHelper.cs +++ b/src/modules/espresso/Espresso.Shell/Core/APIHelper.cs @@ -1,4 +1,8 @@ -using System; +// Copyright (c) Microsoft Corporation +// The Microsoft Corporation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System; using System.Runtime.InteropServices; namespace Espresso.Shell.Core diff --git a/src/modules/espresso/Espresso.Shell/Core/SettingsHelper.cs b/src/modules/espresso/Espresso.Shell/Core/SettingsHelper.cs new file mode 100644 index 0000000000..2960155d1d --- /dev/null +++ b/src/modules/espresso/Espresso.Shell/Core/SettingsHelper.cs @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation +// The Microsoft Corporation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System; +using System.IO; +using System.Runtime.InteropServices; +using System.Threading; + +namespace Espresso.Shell.Core +{ + public class SettingsHelper + { + const int ERROR_SHARING_VIOLATION = 32; + const int ERROR_LOCK_VIOLATION = 33; + + public static FileStream GetSettingsFile(string path, int retries) + { + for (int i = 0; i < retries; i++) + { + FileStream fileStream = null; + try + { + fileStream = new FileStream(path, FileMode.Open, FileAccess.Read, FileShare.None); + return fileStream; + } + catch (IOException ex) + { + var errorCode = Marshal.GetHRForException(ex) & ((1 << 16) - 1); + if (errorCode == ERROR_SHARING_VIOLATION || errorCode == ERROR_LOCK_VIOLATION) + { + Console.WriteLine("There was another process using the file, so couldn't pick the settings up."); + } + + Thread.Sleep(50); + } + } + + return null; + } + } +} diff --git a/src/modules/espresso/Espresso.Shell/Models/EspressoSettingsModel.cs b/src/modules/espresso/Espresso.Shell/Models/EspressoSettingsModel.cs index 8fd358861b..cb005bbc0c 100644 --- a/src/modules/espresso/Espresso.Shell/Models/EspressoSettingsModel.cs +++ b/src/modules/espresso/Espresso.Shell/Models/EspressoSettingsModel.cs @@ -1,4 +1,8 @@ -using Newtonsoft.Json; +// Copyright (c) Microsoft Corporation +// The Microsoft Corporation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using Newtonsoft.Json; namespace Espresso.Shell.Models { diff --git a/src/modules/espresso/Espresso.Shell/Program.cs b/src/modules/espresso/Espresso.Shell/Program.cs index bbe9b84f5f..c7dac47540 100644 --- a/src/modules/espresso/Espresso.Shell/Program.cs +++ b/src/modules/espresso/Espresso.Shell/Program.cs @@ -1,11 +1,14 @@ -using Espresso.Shell.Core; +// Copyright (c) Microsoft Corporation +// The Microsoft Corporation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using Espresso.Shell.Core; using Espresso.Shell.Models; using Newtonsoft.Json; using System; using System.CommandLine; using System.CommandLine.Invocation; using System.IO; -using System.Runtime.InteropServices; using System.Threading; namespace Espresso.Shell @@ -15,13 +18,12 @@ namespace Espresso.Shell private static Mutex mutex = null; private const string appName = "Espresso"; - const int ERROR_SHARING_VIOLATION = 32; - const int ERROR_LOCK_VIOLATION = 33; + public static Mutex Mutex { get => mutex; set => mutex = value; } static int Main(string[] args) { bool instantiated; - mutex = new Mutex(true, appName, out instantiated); + Mutex = new Mutex(true, appName, out instantiated); if (!instantiated) { @@ -170,7 +172,7 @@ namespace Espresso.Shell { EspressoSettingsModel settings = null; - var fileStream = GetSettingsFile(fullPath, 10); + var fileStream = SettingsHelper.GetSettingsFile(fullPath, 10); if (fileStream != null) { using (fileStream) @@ -240,35 +242,9 @@ namespace Espresso.Shell catch (Exception ex) { Console.WriteLine($"There was a problem reading the configuration file.\n{ex.Message}"); - //ForceExit($"There was a problem reading the configuration file.\n{ex.Message}", 1); } } - private static FileStream GetSettingsFile(string path, int retries) - { - for (int i = 0; i < retries; i++) - { - FileStream fileStream = null; - try - { - fileStream = new FileStream(path, FileMode.Open, FileAccess.Read, FileShare.None); - return fileStream; - } - catch (IOException ex) - { - var errorCode = Marshal.GetHRForException(ex) & ((1 << 16) - 1); - if (errorCode == ERROR_SHARING_VIOLATION || errorCode == ERROR_LOCK_VIOLATION) - { - Console.WriteLine("There was another process using the file, so couldn't pick the settings up."); - } - - Thread.Sleep(50); - } - } - - return null; - } - private static void ResetNormalPowerState() { bool success = APIHelper.SetNormalKeepAwake(); From 5e897a546aed395102355ca3595fd35641aa431f Mon Sep 17 00:00:00 2001 From: Den Delimarsky <1389609+dend@users.noreply.github.com> Date: Fri, 23 Apr 2021 08:47:18 -0700 Subject: [PATCH 23/81] Update minor details --- src/modules/espresso/Espresso.Shell/Program.cs | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/modules/espresso/Espresso.Shell/Program.cs b/src/modules/espresso/Espresso.Shell/Program.cs index c7dac47540..a6807f5c3f 100644 --- a/src/modules/espresso/Espresso.Shell/Program.cs +++ b/src/modules/espresso/Espresso.Shell/Program.cs @@ -17,7 +17,7 @@ namespace Espresso.Shell { private static Mutex mutex = null; private const string appName = "Espresso"; - + private static FileSystemWatcher watcher = null; public static Mutex Mutex { get => mutex; set => mutex = value; } static int Main(string[] args) @@ -104,11 +104,11 @@ namespace Espresso.Shell try { - var watcher = new FileSystemWatcher + watcher = new FileSystemWatcher { Path = Path.GetDirectoryName(config), EnableRaisingEvents = true, - NotifyFilter = NotifyFilters.LastWrite, + NotifyFilter = NotifyFilters.LastWrite | NotifyFilters.Size, Filter = Path.GetFileName(config) }; watcher.Changed += new FileSystemEventHandler(HandleEspressoConfigChange); @@ -119,7 +119,8 @@ namespace Espresso.Shell } catch (Exception ex) { - ForceExit($"There was a problem with the configuration file. Make sure it exists.\n{ex.Message}", 1); + Console.WriteLine($"There was a problem with the configuration file. Make sure it exists.\n{ex.Message}"); + //ForceExit($"There was a problem with the configuration file. Make sure it exists.\n{ex.Message}", 1); } } else @@ -162,17 +163,17 @@ namespace Espresso.Shell private static void HandleEspressoConfigChange(object sender, FileSystemEventArgs e) { + Console.WriteLine("Detected a file change. Reacting..."); ProcessSettings(e.FullPath); } private static void ProcessSettings(string fullPath) { - Console.WriteLine("Detected a file change. Reacting..."); try { EspressoSettingsModel settings = null; - var fileStream = SettingsHelper.GetSettingsFile(fullPath, 10); + var fileStream = SettingsHelper.GetSettingsFile(fullPath, 3); if (fileStream != null) { using (fileStream) From f27783218877cd529e17da05bbb6effcc20921dd Mon Sep 17 00:00:00 2001 From: Den Delimarsky <1389609+dend@users.noreply.github.com> Date: Sat, 24 Apr 2021 09:59:52 -0700 Subject: [PATCH 24/81] Updating the threading model for timed keep-awake --- .../espresso/Espresso.Shell/Core/APIHelper.cs | 73 ++++++++++++++----- .../espresso/Espresso.Shell/Program.cs | 55 ++++++++------ 2 files changed, 86 insertions(+), 42 deletions(-) diff --git a/src/modules/espresso/Espresso.Shell/Core/APIHelper.cs b/src/modules/espresso/Espresso.Shell/Core/APIHelper.cs index 3d5b29b4a8..f7383b3b3c 100644 --- a/src/modules/espresso/Espresso.Shell/Core/APIHelper.cs +++ b/src/modules/espresso/Espresso.Shell/Core/APIHelper.cs @@ -4,6 +4,8 @@ using System; using System.Runtime.InteropServices; +using System.Threading; +using System.Threading.Tasks; namespace Espresso.Shell.Core { @@ -22,6 +24,9 @@ namespace Espresso.Shell.Core /// public class APIHelper { + private static CancellationTokenSource TokenSource = new CancellationTokenSource(); + private static CancellationToken ThreadToken; + // More details about the API used: https://docs.microsoft.com/windows/win32/api/winbase/nf-winbase-setthreadexecutionstate [DllImport("kernel32.dll", CharSet = CharSet.Auto, SetLastError = true)] static extern EXECUTION_STATE SetThreadExecutionState(EXECUTION_STATE esFlags); @@ -58,6 +63,7 @@ namespace Espresso.Shell.Core public static bool SetNormalKeepAwake() { + //TokenSource.Cancel(); return SetAwakeState(EXECUTION_STATE.ES_CONTINUOUS); } @@ -73,43 +79,74 @@ namespace Espresso.Shell.Core } } - public static bool SetTimedKeepAwake(long seconds, bool keepDisplayOn = true) + public static void SetTimedKeepAwake(long seconds, Action callback, bool keepDisplayOn = true) { + ThreadToken = TokenSource.Token; + + try + { + Task.Run(() => RunTimedLoop(seconds, keepDisplayOn), ThreadToken).ContinueWith((result) => callback(result.Result)); + } + catch (OperationCanceledException e) + { + Console.WriteLine($"{nameof(OperationCanceledException)} thrown with message: {e.Message}"); + } + finally + { + TokenSource.Dispose(); + } + + } + + private static bool RunTimedLoop(long seconds, bool keepDisplayOn = true) + { + bool success; + + // In case cancellation was already requested. + //ThreadToken.ThrowIfCancellationRequested(); + if (keepDisplayOn) { - var success = SetAwakeState(EXECUTION_STATE.ES_SYSTEM_REQUIRED | EXECUTION_STATE.ES_DISPLAY_REQUIRED | EXECUTION_STATE.ES_CONTINUOUS); + success = SetAwakeState(EXECUTION_STATE.ES_SYSTEM_REQUIRED | EXECUTION_STATE.ES_DISPLAY_REQUIRED | EXECUTION_STATE.ES_CONTINUOUS); if (success) { - RunTimedLoop(seconds); - return true; + Console.WriteLine("Timed keep-awake with display on."); + var startTime = DateTime.UtcNow; + while (DateTime.UtcNow - startTime < TimeSpan.FromSeconds(seconds)) + { + if (ThreadToken.IsCancellationRequested) + { + ThreadToken.ThrowIfCancellationRequested(); + } + } + return success; } else { - return false; + return success; } } else { - var success = SetAwakeState(EXECUTION_STATE.ES_SYSTEM_REQUIRED | EXECUTION_STATE.ES_CONTINUOUS); + success = SetAwakeState(EXECUTION_STATE.ES_SYSTEM_REQUIRED | EXECUTION_STATE.ES_CONTINUOUS); if (success) { - RunTimedLoop(seconds); - return true; + Console.WriteLine("Timed keep-awake with display off."); + var startTime = DateTime.UtcNow; + while (DateTime.UtcNow - startTime < TimeSpan.FromSeconds(seconds)) + { + if (ThreadToken.IsCancellationRequested) + { + ThreadToken.ThrowIfCancellationRequested(); + } + } + return success; } else { - return false; + return success; } } } - - private static void RunTimedLoop(long seconds) - { - var startTime = DateTime.UtcNow; - while (DateTime.UtcNow - startTime < TimeSpan.FromSeconds(seconds)) - { - // We do nothing. - } - } } } diff --git a/src/modules/espresso/Espresso.Shell/Program.cs b/src/modules/espresso/Espresso.Shell/Program.cs index a6807f5c3f..a44d21c98a 100644 --- a/src/modules/espresso/Espresso.Shell/Program.cs +++ b/src/modules/espresso/Espresso.Shell/Program.cs @@ -141,20 +141,20 @@ namespace Espresso.Shell else { // Timed keep-awake. - bool success = APIHelper.SetTimedKeepAwake(timeLimit, displayOn); - if (success) - { - Console.WriteLine($"Finished execution of timed keep-awake."); + APIHelper.SetTimedKeepAwake(timeLimit, LogTimedKeepAwakeCompletion, displayOn); + //if (success) + //{ + // Console.WriteLine($"Finished execution of timed keep-awake."); - // Because the timed keep-awake execution completed, there is no reason for - // Espresso to stay alive - I will just shut down the application until it's - // launched again by the user. - Environment.Exit(0); - } - else - { - Console.WriteLine("Could not set up the state to be timed keep awake."); - } + // // Because the timed keep-awake execution completed, there is no reason for + // // Espresso to stay alive - I will just shut down the application until it's + // // launched again by the user. + // Environment.Exit(0); + //} + //else + //{ + // Console.WriteLine("Could not set up the state to be timed keep awake."); + //} } } @@ -163,6 +163,8 @@ namespace Espresso.Shell private static void HandleEspressoConfigChange(object sender, FileSystemEventArgs e) { + Console.WriteLine("Resetting keep-awake to normal state due to settings change."); + ResetNormalPowerState(); Console.WriteLine("Detected a file change. Reacting..."); ProcessSettings(e.FullPath); } @@ -210,22 +212,22 @@ namespace Espresso.Shell long computedTime = (settings.Properties.Hours.Value * 60 * 60) + (settings.Properties.Minutes.Value * 60); Console.WriteLine($"In timed keep-awake mode. Expecting to be awake for {computedTime} seconds."); - bool success = APIHelper.SetTimedKeepAwake(computedTime, settings.Properties.KeepDisplayOn.Value); - if (success) - { - Console.WriteLine($"Finished execution of timed keep-awake."); + APIHelper.SetTimedKeepAwake(computedTime, LogTimedKeepAwakeCompletion, settings.Properties.KeepDisplayOn.Value); + //if (success) + //{ + // Console.WriteLine($"Finished execution of timed keep-awake."); - ResetNormalPowerState(); - } - else - { - Console.WriteLine("Could not set up the state to be timed keep awake."); - } + // ResetNormalPowerState(); + //} + //else + //{ + // Console.WriteLine("Could not set up the state to be timed keep awake."); + //} break; } default: { - ForceExit("Could not select the right mode of operation. Existing...", 1); + Console.WriteLine("Unknown mode of operation. Check config file."); break; } } @@ -246,6 +248,11 @@ namespace Espresso.Shell } } + private static void LogTimedKeepAwakeCompletion(bool result) + { + Console.Write($"Completed timed keep-awake successfully: {result}"); + } + private static void ResetNormalPowerState() { bool success = APIHelper.SetNormalKeepAwake(); From 798667d0e564a843172ea80ff3e3f3bd33eb2a2a Mon Sep 17 00:00:00 2001 From: Den Delimarsky <1389609+dend@users.noreply.github.com> Date: Sat, 24 Apr 2021 10:07:42 -0700 Subject: [PATCH 25/81] More thread fine-tuning. --- .../espresso/Espresso.Shell/Core/APIHelper.cs | 19 +++-------- .../espresso/Espresso.Shell/Program.cs | 32 ++++--------------- 2 files changed, 12 insertions(+), 39 deletions(-) diff --git a/src/modules/espresso/Espresso.Shell/Core/APIHelper.cs b/src/modules/espresso/Espresso.Shell/Core/APIHelper.cs index f7383b3b3c..43682c2f1c 100644 --- a/src/modules/espresso/Espresso.Shell/Core/APIHelper.cs +++ b/src/modules/espresso/Espresso.Shell/Core/APIHelper.cs @@ -63,7 +63,7 @@ namespace Espresso.Shell.Core public static bool SetNormalKeepAwake() { - //TokenSource.Cancel(); + TokenSource.Cancel(); return SetAwakeState(EXECUTION_STATE.ES_CONTINUOUS); } @@ -79,22 +79,13 @@ namespace Espresso.Shell.Core } } - public static void SetTimedKeepAwake(long seconds, Action callback, bool keepDisplayOn = true) + public static void SetTimedKeepAwake(long seconds, Action callback, Action failureCallback, bool keepDisplayOn = true) { ThreadToken = TokenSource.Token; - try - { - Task.Run(() => RunTimedLoop(seconds, keepDisplayOn), ThreadToken).ContinueWith((result) => callback(result.Result)); - } - catch (OperationCanceledException e) - { - Console.WriteLine($"{nameof(OperationCanceledException)} thrown with message: {e.Message}"); - } - finally - { - TokenSource.Dispose(); - } + Task.Run(() => RunTimedLoop(seconds, keepDisplayOn), ThreadToken) + .ContinueWith((result) => callback(result.Result), TaskContinuationOptions.OnlyOnRanToCompletion) + .ContinueWith((result) => failureCallback, TaskContinuationOptions.NotOnRanToCompletion); ; } diff --git a/src/modules/espresso/Espresso.Shell/Program.cs b/src/modules/espresso/Espresso.Shell/Program.cs index a44d21c98a..9f4f7624c1 100644 --- a/src/modules/espresso/Espresso.Shell/Program.cs +++ b/src/modules/espresso/Espresso.Shell/Program.cs @@ -120,7 +120,6 @@ namespace Espresso.Shell catch (Exception ex) { Console.WriteLine($"There was a problem with the configuration file. Make sure it exists.\n{ex.Message}"); - //ForceExit($"There was a problem with the configuration file. Make sure it exists.\n{ex.Message}", 1); } } else @@ -141,20 +140,7 @@ namespace Espresso.Shell else { // Timed keep-awake. - APIHelper.SetTimedKeepAwake(timeLimit, LogTimedKeepAwakeCompletion, displayOn); - //if (success) - //{ - // Console.WriteLine($"Finished execution of timed keep-awake."); - - // // Because the timed keep-awake execution completed, there is no reason for - // // Espresso to stay alive - I will just shut down the application until it's - // // launched again by the user. - // Environment.Exit(0); - //} - //else - //{ - // Console.WriteLine("Could not set up the state to be timed keep awake."); - //} + APIHelper.SetTimedKeepAwake(timeLimit, LogTimedKeepAwakeCompletion, LogUnexpectedOrCancelledKeepAwakeCompletion, displayOn); } } @@ -212,17 +198,8 @@ namespace Espresso.Shell long computedTime = (settings.Properties.Hours.Value * 60 * 60) + (settings.Properties.Minutes.Value * 60); Console.WriteLine($"In timed keep-awake mode. Expecting to be awake for {computedTime} seconds."); - APIHelper.SetTimedKeepAwake(computedTime, LogTimedKeepAwakeCompletion, settings.Properties.KeepDisplayOn.Value); - //if (success) - //{ - // Console.WriteLine($"Finished execution of timed keep-awake."); + APIHelper.SetTimedKeepAwake(computedTime, LogTimedKeepAwakeCompletion, LogUnexpectedOrCancelledKeepAwakeCompletion, settings.Properties.KeepDisplayOn.Value); - // ResetNormalPowerState(); - //} - //else - //{ - // Console.WriteLine("Could not set up the state to be timed keep awake."); - //} break; } default: @@ -248,6 +225,11 @@ namespace Espresso.Shell } } + private static void LogUnexpectedOrCancelledKeepAwakeCompletion() + { + Console.Write("The keep-awake thread was terminated early."); + } + private static void LogTimedKeepAwakeCompletion(bool result) { Console.Write($"Completed timed keep-awake successfully: {result}"); From 395309c67c25e469855389e3cd4507e92b7a680f Mon Sep 17 00:00:00 2001 From: Den Delimarsky <1389609+dend@users.noreply.github.com> Date: Sat, 24 Apr 2021 11:06:13 -0700 Subject: [PATCH 26/81] Update with proper event caching --- .../espresso/Espresso.Shell/Core/APIHelper.cs | 68 +++++++++++-------- .../Espresso.Shell/Espresso.Shell.csproj | 1 + .../espresso/Espresso.Shell/Program.cs | 28 +++++++- 3 files changed, 64 insertions(+), 33 deletions(-) diff --git a/src/modules/espresso/Espresso.Shell/Core/APIHelper.cs b/src/modules/espresso/Espresso.Shell/Core/APIHelper.cs index 43682c2f1c..12454cafbf 100644 --- a/src/modules/espresso/Espresso.Shell/Core/APIHelper.cs +++ b/src/modules/espresso/Espresso.Shell/Core/APIHelper.cs @@ -91,52 +91,60 @@ namespace Espresso.Shell.Core private static bool RunTimedLoop(long seconds, bool keepDisplayOn = true) { - bool success; + bool success = false; // In case cancellation was already requested. //ThreadToken.ThrowIfCancellationRequested(); - if (keepDisplayOn) + try { - success = SetAwakeState(EXECUTION_STATE.ES_SYSTEM_REQUIRED | EXECUTION_STATE.ES_DISPLAY_REQUIRED | EXECUTION_STATE.ES_CONTINUOUS); - if (success) + if (keepDisplayOn) { - Console.WriteLine("Timed keep-awake with display on."); - var startTime = DateTime.UtcNow; - while (DateTime.UtcNow - startTime < TimeSpan.FromSeconds(seconds)) + success = SetAwakeState(EXECUTION_STATE.ES_SYSTEM_REQUIRED | EXECUTION_STATE.ES_DISPLAY_REQUIRED | EXECUTION_STATE.ES_CONTINUOUS); + if (success) { - if (ThreadToken.IsCancellationRequested) + Console.WriteLine("Timed keep-awake with display on."); + var startTime = DateTime.UtcNow; + while (DateTime.UtcNow - startTime < TimeSpan.FromSeconds(seconds)) { - ThreadToken.ThrowIfCancellationRequested(); + if (ThreadToken.IsCancellationRequested) + { + ThreadToken.ThrowIfCancellationRequested(); + } } + return success; + } + else + { + return success; } - return success; } else { - return success; + success = SetAwakeState(EXECUTION_STATE.ES_SYSTEM_REQUIRED | EXECUTION_STATE.ES_CONTINUOUS); + if (success) + { + Console.WriteLine("Timed keep-awake with display off."); + var startTime = DateTime.UtcNow; + while (DateTime.UtcNow - startTime < TimeSpan.FromSeconds(seconds)) + { + if (ThreadToken.IsCancellationRequested) + { + ThreadToken.ThrowIfCancellationRequested(); + } + } + return success; + } + else + { + return success; + } } } - else + catch (OperationCanceledException ex) { - success = SetAwakeState(EXECUTION_STATE.ES_SYSTEM_REQUIRED | EXECUTION_STATE.ES_CONTINUOUS); - if (success) - { - Console.WriteLine("Timed keep-awake with display off."); - var startTime = DateTime.UtcNow; - while (DateTime.UtcNow - startTime < TimeSpan.FromSeconds(seconds)) - { - if (ThreadToken.IsCancellationRequested) - { - ThreadToken.ThrowIfCancellationRequested(); - } - } - return success; - } - else - { - return success; - } + // Task was clearly cancelled. + return success; } } } diff --git a/src/modules/espresso/Espresso.Shell/Espresso.Shell.csproj b/src/modules/espresso/Espresso.Shell/Espresso.Shell.csproj index fcef0fe5b7..6c3fac8cd6 100644 --- a/src/modules/espresso/Espresso.Shell/Espresso.Shell.csproj +++ b/src/modules/espresso/Espresso.Shell/Espresso.Shell.csproj @@ -8,6 +8,7 @@ + diff --git a/src/modules/espresso/Espresso.Shell/Program.cs b/src/modules/espresso/Espresso.Shell/Program.cs index 9f4f7624c1..abb0f1cf42 100644 --- a/src/modules/espresso/Espresso.Shell/Program.cs +++ b/src/modules/espresso/Espresso.Shell/Program.cs @@ -9,6 +9,7 @@ using System; using System.CommandLine; using System.CommandLine.Invocation; using System.IO; +using System.Runtime.Caching; using System.Threading; namespace Espresso.Shell @@ -20,6 +21,10 @@ namespace Espresso.Shell private static FileSystemWatcher watcher = null; public static Mutex Mutex { get => mutex; set => mutex = value; } + private static MemoryCache _memoryCache; + private static CacheItemPolicy _cacheItemPolicy; + private const int CacheExpirationTimeframe = 500; + static int Main(string[] args) { bool instantiated; @@ -104,13 +109,21 @@ namespace Espresso.Shell try { + _memoryCache = MemoryCache.Default; + watcher = new FileSystemWatcher { Path = Path.GetDirectoryName(config), EnableRaisingEvents = true, - NotifyFilter = NotifyFilters.LastWrite | NotifyFilters.Size, + NotifyFilter = NotifyFilters.LastWrite, Filter = Path.GetFileName(config) }; + + _cacheItemPolicy = new CacheItemPolicy() + { + RemovedCallback = HandleCacheRemoval + }; + watcher.Changed += new FileSystemEventHandler(HandleEspressoConfigChange); // Initially the file might not be updated, so we need to start processing @@ -147,12 +160,21 @@ namespace Espresso.Shell new ManualResetEvent(false).WaitOne(); } - private static void HandleEspressoConfigChange(object sender, FileSystemEventArgs e) + private static void HandleCacheRemoval(CacheEntryRemovedArguments args) { + if (args.RemovedReason != CacheEntryRemovedReason.Expired) return; + + var fileEvent = (FileSystemEventArgs)args.CacheItem.Value; Console.WriteLine("Resetting keep-awake to normal state due to settings change."); ResetNormalPowerState(); Console.WriteLine("Detected a file change. Reacting..."); - ProcessSettings(e.FullPath); + ProcessSettings(fileEvent.FullPath); + } + + private static void HandleEspressoConfigChange(object sender, FileSystemEventArgs e) + { + _cacheItemPolicy.AbsoluteExpiration = DateTimeOffset.Now.AddMilliseconds(CacheExpirationTimeframe); + _memoryCache.AddOrGetExisting(e.Name, e, _cacheItemPolicy); } private static void ProcessSettings(string fullPath) From 7d71e8828cfe1dd7aedcf0e37bff5ec0e41725af Mon Sep 17 00:00:00 2001 From: Den Delimarsky <1389609+dend@users.noreply.github.com> Date: Sat, 24 Apr 2021 12:37:28 -0700 Subject: [PATCH 27/81] Cache tweaks --- src/modules/espresso/Espresso.Shell/Program.cs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/modules/espresso/Espresso.Shell/Program.cs b/src/modules/espresso/Espresso.Shell/Program.cs index abb0f1cf42..da51c6e699 100644 --- a/src/modules/espresso/Espresso.Shell/Program.cs +++ b/src/modules/espresso/Espresso.Shell/Program.cs @@ -6,6 +6,7 @@ using Espresso.Shell.Core; using Espresso.Shell.Models; using Newtonsoft.Json; using System; +using System.Collections.Specialized; using System.CommandLine; using System.CommandLine.Invocation; using System.IO; @@ -23,7 +24,7 @@ namespace Espresso.Shell private static MemoryCache _memoryCache; private static CacheItemPolicy _cacheItemPolicy; - private const int CacheExpirationTimeframe = 500; + private const int CacheExpirationTimeframe = 1000; static int Main(string[] args) { @@ -109,7 +110,12 @@ namespace Espresso.Shell try { - _memoryCache = MemoryCache.Default; + var cacheConfig = new NameValueCollection() + { + {"CacheMemoryLimitMegabytes", "1"}, + {"PollingInterval", TimeSpan.FromMilliseconds(1000).ToString()}, + }; + _memoryCache = new MemoryCache("EventCache", cacheConfig); watcher = new FileSystemWatcher { @@ -174,7 +180,7 @@ namespace Espresso.Shell private static void HandleEspressoConfigChange(object sender, FileSystemEventArgs e) { _cacheItemPolicy.AbsoluteExpiration = DateTimeOffset.Now.AddMilliseconds(CacheExpirationTimeframe); - _memoryCache.AddOrGetExisting(e.Name, e, _cacheItemPolicy); + _memoryCache.Set(e.Name, e, _cacheItemPolicy); } private static void ProcessSettings(string fullPath) From c2d54b0733c096814f80d4ee5f96948422cd773d Mon Sep 17 00:00:00 2001 From: Den Delimarsky <1389609+dend@users.noreply.github.com> Date: Wed, 28 Apr 2021 18:27:42 -0700 Subject: [PATCH 28/81] Update how file changes are handled Instead of relying on MemoryCache, I am using Rx, per a suggestion from Twitter, which enables me to automatically de-dupe things on the fly instead of using a polling method for a temporary cache. --- .../Espresso.Shell/Espresso.Shell.csproj | 1 + .../espresso/Espresso.Shell/Program.cs | 41 ++++++------------- 2 files changed, 13 insertions(+), 29 deletions(-) diff --git a/src/modules/espresso/Espresso.Shell/Espresso.Shell.csproj b/src/modules/espresso/Espresso.Shell/Espresso.Shell.csproj index 6c3fac8cd6..8e140bda75 100644 --- a/src/modules/espresso/Espresso.Shell/Espresso.Shell.csproj +++ b/src/modules/espresso/Espresso.Shell/Espresso.Shell.csproj @@ -8,6 +8,7 @@ + diff --git a/src/modules/espresso/Espresso.Shell/Program.cs b/src/modules/espresso/Espresso.Shell/Program.cs index da51c6e699..180159a88c 100644 --- a/src/modules/espresso/Espresso.Shell/Program.cs +++ b/src/modules/espresso/Espresso.Shell/Program.cs @@ -6,10 +6,12 @@ using Espresso.Shell.Core; using Espresso.Shell.Models; using Newtonsoft.Json; using System; -using System.Collections.Specialized; using System.CommandLine; using System.CommandLine.Invocation; using System.IO; +using System.Linq; +using System.Reactive.Concurrency; +using System.Reactive.Linq; using System.Runtime.Caching; using System.Threading; @@ -22,10 +24,6 @@ namespace Espresso.Shell private static FileSystemWatcher watcher = null; public static Mutex Mutex { get => mutex; set => mutex = value; } - private static MemoryCache _memoryCache; - private static CacheItemPolicy _cacheItemPolicy; - private const int CacheExpirationTimeframe = 1000; - static int Main(string[] args) { bool instantiated; @@ -107,16 +105,8 @@ namespace Espresso.Shell { // Configuration file is used, therefore we disregard any other command-line parameter // and instead watch for changes in the file. - try { - var cacheConfig = new NameValueCollection() - { - {"CacheMemoryLimitMegabytes", "1"}, - {"PollingInterval", TimeSpan.FromMilliseconds(1000).ToString()}, - }; - _memoryCache = new MemoryCache("EventCache", cacheConfig); - watcher = new FileSystemWatcher { Path = Path.GetDirectoryName(config), @@ -125,12 +115,14 @@ namespace Espresso.Shell Filter = Path.GetFileName(config) }; - _cacheItemPolicy = new CacheItemPolicy() - { - RemovedCallback = HandleCacheRemoval - }; - - watcher.Changed += new FileSystemEventHandler(HandleEspressoConfigChange); + Observable.FromEventPattern( + h => watcher.Changed += h, + h => watcher.Changed -= h + ) + .SubscribeOn(TaskPoolScheduler.Default) + .Select(e => e.EventArgs) + .Throttle(TimeSpan.FromMilliseconds(25)) + .Subscribe(HandleEspressoConfigChange); // Initially the file might not be updated, so we need to start processing // settings right away. @@ -166,23 +158,14 @@ namespace Espresso.Shell new ManualResetEvent(false).WaitOne(); } - private static void HandleCacheRemoval(CacheEntryRemovedArguments args) + private static void HandleEspressoConfigChange(FileSystemEventArgs fileEvent) { - if (args.RemovedReason != CacheEntryRemovedReason.Expired) return; - - var fileEvent = (FileSystemEventArgs)args.CacheItem.Value; Console.WriteLine("Resetting keep-awake to normal state due to settings change."); ResetNormalPowerState(); Console.WriteLine("Detected a file change. Reacting..."); ProcessSettings(fileEvent.FullPath); } - private static void HandleEspressoConfigChange(object sender, FileSystemEventArgs e) - { - _cacheItemPolicy.AbsoluteExpiration = DateTimeOffset.Now.AddMilliseconds(CacheExpirationTimeframe); - _memoryCache.Set(e.Name, e, _cacheItemPolicy); - } - private static void ProcessSettings(string fullPath) { try From 3651c66d5b61cc27eaf0baf08d33f73a951c5e60 Mon Sep 17 00:00:00 2001 From: Den Delimarsky <1389609+dend@users.noreply.github.com> Date: Wed, 28 Apr 2021 19:43:03 -0700 Subject: [PATCH 29/81] Fix project state --- PowerToys.sln | 191 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 191 insertions(+) diff --git a/PowerToys.sln b/PowerToys.sln index 79abcae51e..d7a7bfc47f 100644 --- a/PowerToys.sln +++ b/PowerToys.sln @@ -324,344 +324,532 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "KeyboardManagerEditorLibrar EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "KeyboardManagerEditorTest", "src\modules\keyboardmanager\KeyboardManagerEditorTest\KeyboardManagerEditorTest.vcxproj", "{62173D9A-6724-4C00-A1C8-FB646480A9EC}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "espresso", "espresso", "{127F38E0-40AA-4594-B955-5616BF206882}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Espresso", "src\modules\espresso\Espresso\Espresso.vcxproj", "{5E7360A8-D048-4ED3-8F09-0BFD64C5529A}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Espresso.Shell", "src\modules\espresso\Espresso.Shell\Espresso.Shell.csproj", "{3B77A64A-8005-4D43-B31A-F692E213BAE4}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU Debug|x64 = Debug|x64 + Release|Any CPU = Release|Any CPU Release|x64 = Release|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution + {9412D5C6-2CF2-4FC2-A601-B55508EA9B27}.Debug|Any CPU.ActiveCfg = Debug|x64 {9412D5C6-2CF2-4FC2-A601-B55508EA9B27}.Debug|x64.ActiveCfg = Debug|x64 {9412D5C6-2CF2-4FC2-A601-B55508EA9B27}.Debug|x64.Build.0 = Debug|x64 + {9412D5C6-2CF2-4FC2-A601-B55508EA9B27}.Release|Any CPU.ActiveCfg = Release|x64 {9412D5C6-2CF2-4FC2-A601-B55508EA9B27}.Release|x64.ActiveCfg = Release|x64 {9412D5C6-2CF2-4FC2-A601-B55508EA9B27}.Release|x64.Build.0 = Release|x64 + {A46629C4-1A6C-40FA-A8B6-10E5102BB0BA}.Debug|Any CPU.ActiveCfg = Debug|x64 {A46629C4-1A6C-40FA-A8B6-10E5102BB0BA}.Debug|x64.ActiveCfg = Debug|x64 {A46629C4-1A6C-40FA-A8B6-10E5102BB0BA}.Debug|x64.Build.0 = Debug|x64 + {A46629C4-1A6C-40FA-A8B6-10E5102BB0BA}.Release|Any CPU.ActiveCfg = Release|x64 {A46629C4-1A6C-40FA-A8B6-10E5102BB0BA}.Release|x64.ActiveCfg = Release|x64 {A46629C4-1A6C-40FA-A8B6-10E5102BB0BA}.Release|x64.Build.0 = Release|x64 + {F9C68EDF-AC74-4B77-9AF1-005D9C9F6A99}.Debug|Any CPU.ActiveCfg = Debug|x64 {F9C68EDF-AC74-4B77-9AF1-005D9C9F6A99}.Debug|x64.ActiveCfg = Debug|x64 {F9C68EDF-AC74-4B77-9AF1-005D9C9F6A99}.Debug|x64.Build.0 = Debug|x64 + {F9C68EDF-AC74-4B77-9AF1-005D9C9F6A99}.Release|Any CPU.ActiveCfg = Release|x64 {F9C68EDF-AC74-4B77-9AF1-005D9C9F6A99}.Release|x64.ActiveCfg = Release|x64 {F9C68EDF-AC74-4B77-9AF1-005D9C9F6A99}.Release|x64.Build.0 = Release|x64 + {48804216-2A0E-4168-A6D8-9CD068D14227}.Debug|Any CPU.ActiveCfg = Debug|x64 {48804216-2A0E-4168-A6D8-9CD068D14227}.Debug|x64.ActiveCfg = Debug|x64 {48804216-2A0E-4168-A6D8-9CD068D14227}.Debug|x64.Build.0 = Debug|x64 + {48804216-2A0E-4168-A6D8-9CD068D14227}.Release|Any CPU.ActiveCfg = Release|x64 {48804216-2A0E-4168-A6D8-9CD068D14227}.Release|x64.ActiveCfg = Release|x64 {48804216-2A0E-4168-A6D8-9CD068D14227}.Release|x64.Build.0 = Release|x64 + {9C6A7905-72D4-4BF5-B256-ABFDAEF68AE9}.Debug|Any CPU.ActiveCfg = Debug|x64 {9C6A7905-72D4-4BF5-B256-ABFDAEF68AE9}.Debug|x64.ActiveCfg = Debug|x64 {9C6A7905-72D4-4BF5-B256-ABFDAEF68AE9}.Debug|x64.Build.0 = Debug|x64 + {9C6A7905-72D4-4BF5-B256-ABFDAEF68AE9}.Release|Any CPU.ActiveCfg = Release|x64 {9C6A7905-72D4-4BF5-B256-ABFDAEF68AE9}.Release|x64.ActiveCfg = Release|x64 {9C6A7905-72D4-4BF5-B256-ABFDAEF68AE9}.Release|x64.Build.0 = Release|x64 + {1A066C63-64B3-45F8-92FE-664E1CCE8077}.Debug|Any CPU.ActiveCfg = Debug|x64 {1A066C63-64B3-45F8-92FE-664E1CCE8077}.Debug|x64.ActiveCfg = Debug|x64 {1A066C63-64B3-45F8-92FE-664E1CCE8077}.Debug|x64.Build.0 = Debug|x64 + {1A066C63-64B3-45F8-92FE-664E1CCE8077}.Release|Any CPU.ActiveCfg = Release|x64 {1A066C63-64B3-45F8-92FE-664E1CCE8077}.Release|x64.ActiveCfg = Release|x64 {1A066C63-64B3-45F8-92FE-664E1CCE8077}.Release|x64.Build.0 = Release|x64 + {5CCC8468-DEC8-4D36-99D4-5C891BEBD481}.Debug|Any CPU.ActiveCfg = Debug|x64 {5CCC8468-DEC8-4D36-99D4-5C891BEBD481}.Debug|x64.ActiveCfg = Debug|x64 {5CCC8468-DEC8-4D36-99D4-5C891BEBD481}.Debug|x64.Build.0 = Debug|x64 + {5CCC8468-DEC8-4D36-99D4-5C891BEBD481}.Release|Any CPU.ActiveCfg = Release|x64 {5CCC8468-DEC8-4D36-99D4-5C891BEBD481}.Release|x64.ActiveCfg = Release|x64 {5CCC8468-DEC8-4D36-99D4-5C891BEBD481}.Release|x64.Build.0 = Release|x64 + {B25AC7A5-FB9F-4789-B392-D5C85E948670}.Debug|Any CPU.ActiveCfg = Debug|x64 {B25AC7A5-FB9F-4789-B392-D5C85E948670}.Debug|x64.ActiveCfg = Debug|x64 {B25AC7A5-FB9F-4789-B392-D5C85E948670}.Debug|x64.Build.0 = Debug|x64 + {B25AC7A5-FB9F-4789-B392-D5C85E948670}.Release|Any CPU.ActiveCfg = Release|x64 {B25AC7A5-FB9F-4789-B392-D5C85E948670}.Release|x64.ActiveCfg = Release|x64 {B25AC7A5-FB9F-4789-B392-D5C85E948670}.Release|x64.Build.0 = Release|x64 + {51920F1F-C28C-4ADF-8660-4238766796C2}.Debug|Any CPU.ActiveCfg = Debug|x64 {51920F1F-C28C-4ADF-8660-4238766796C2}.Debug|x64.ActiveCfg = Debug|x64 {51920F1F-C28C-4ADF-8660-4238766796C2}.Debug|x64.Build.0 = Debug|x64 + {51920F1F-C28C-4ADF-8660-4238766796C2}.Release|Any CPU.ActiveCfg = Release|x64 {51920F1F-C28C-4ADF-8660-4238766796C2}.Release|x64.ActiveCfg = Release|x64 {51920F1F-C28C-4ADF-8660-4238766796C2}.Release|x64.Build.0 = Release|x64 + {0E072714-D127-460B-AFAD-B4C40B412798}.Debug|Any CPU.ActiveCfg = Debug|x64 {0E072714-D127-460B-AFAD-B4C40B412798}.Debug|x64.ActiveCfg = Debug|x64 {0E072714-D127-460B-AFAD-B4C40B412798}.Debug|x64.Build.0 = Debug|x64 + {0E072714-D127-460B-AFAD-B4C40B412798}.Release|Any CPU.ActiveCfg = Release|x64 {0E072714-D127-460B-AFAD-B4C40B412798}.Release|x64.ActiveCfg = Release|x64 {0E072714-D127-460B-AFAD-B4C40B412798}.Release|x64.Build.0 = Release|x64 + {A3935CF4-46C5-4A88-84D3-6B12E16E6BA2}.Debug|Any CPU.ActiveCfg = Debug|x64 {A3935CF4-46C5-4A88-84D3-6B12E16E6BA2}.Debug|x64.ActiveCfg = Debug|x64 {A3935CF4-46C5-4A88-84D3-6B12E16E6BA2}.Debug|x64.Build.0 = Debug|x64 + {A3935CF4-46C5-4A88-84D3-6B12E16E6BA2}.Release|Any CPU.ActiveCfg = Release|x64 {A3935CF4-46C5-4A88-84D3-6B12E16E6BA2}.Release|x64.ActiveCfg = Release|x64 {A3935CF4-46C5-4A88-84D3-6B12E16E6BA2}.Release|x64.Build.0 = Release|x64 + {2151F984-E006-4A9F-92EF-C6DDE3DC8413}.Debug|Any CPU.ActiveCfg = Debug|x64 {2151F984-E006-4A9F-92EF-C6DDE3DC8413}.Debug|x64.ActiveCfg = Debug|x64 {2151F984-E006-4A9F-92EF-C6DDE3DC8413}.Debug|x64.Build.0 = Debug|x64 + {2151F984-E006-4A9F-92EF-C6DDE3DC8413}.Release|Any CPU.ActiveCfg = Release|x64 {2151F984-E006-4A9F-92EF-C6DDE3DC8413}.Release|x64.ActiveCfg = Release|x64 {2151F984-E006-4A9F-92EF-C6DDE3DC8413}.Release|x64.Build.0 = Release|x64 + {64A80062-4D8B-4229-8A38-DFA1D7497749}.Debug|Any CPU.ActiveCfg = Debug|x64 {64A80062-4D8B-4229-8A38-DFA1D7497749}.Debug|x64.ActiveCfg = Debug|x64 {64A80062-4D8B-4229-8A38-DFA1D7497749}.Debug|x64.Build.0 = Debug|x64 + {64A80062-4D8B-4229-8A38-DFA1D7497749}.Release|Any CPU.ActiveCfg = Release|x64 {64A80062-4D8B-4229-8A38-DFA1D7497749}.Release|x64.ActiveCfg = Release|x64 {64A80062-4D8B-4229-8A38-DFA1D7497749}.Release|x64.Build.0 = Release|x64 + {0485F45C-EA7A-4BB5-804B-3E8D14699387}.Debug|Any CPU.ActiveCfg = Debug|x64 {0485F45C-EA7A-4BB5-804B-3E8D14699387}.Debug|x64.ActiveCfg = Debug|x64 {0485F45C-EA7A-4BB5-804B-3E8D14699387}.Debug|x64.Build.0 = Debug|x64 + {0485F45C-EA7A-4BB5-804B-3E8D14699387}.Release|Any CPU.ActiveCfg = Release|x64 {0485F45C-EA7A-4BB5-804B-3E8D14699387}.Release|x64.ActiveCfg = Release|x64 {0485F45C-EA7A-4BB5-804B-3E8D14699387}.Release|x64.Build.0 = Release|x64 + {89F34AF7-1C34-4A72-AA6E-534BCF972BD9}.Debug|Any CPU.ActiveCfg = Debug|x64 {89F34AF7-1C34-4A72-AA6E-534BCF972BD9}.Debug|x64.ActiveCfg = Debug|x64 {89F34AF7-1C34-4A72-AA6E-534BCF972BD9}.Debug|x64.Build.0 = Debug|x64 + {89F34AF7-1C34-4A72-AA6E-534BCF972BD9}.Release|Any CPU.ActiveCfg = Release|x64 {89F34AF7-1C34-4A72-AA6E-534BCF972BD9}.Release|x64.ActiveCfg = Release|x64 {89F34AF7-1C34-4A72-AA6E-534BCF972BD9}.Release|x64.Build.0 = Release|x64 + {2BE46397-4DFA-414C-9BD4-41E4BBF8CB34}.Debug|Any CPU.ActiveCfg = Debug|x64 {2BE46397-4DFA-414C-9BD4-41E4BBF8CB34}.Debug|x64.ActiveCfg = Debug|x64 {2BE46397-4DFA-414C-9BD4-41E4BBF8CB34}.Debug|x64.Build.0 = Debug|x64 + {2BE46397-4DFA-414C-9BD4-41E4BBF8CB34}.Release|Any CPU.ActiveCfg = Release|x64 {2BE46397-4DFA-414C-9BD4-41E4BBF8CB34}.Release|x64.ActiveCfg = Release|x64 {2BE46397-4DFA-414C-9BD4-41E4BBF8CB34}.Release|x64.Build.0 = Release|x64 + {0B43679E-EDFA-4DA0-AD30-F4628B308B1B}.Debug|Any CPU.ActiveCfg = Debug|x64 {0B43679E-EDFA-4DA0-AD30-F4628B308B1B}.Debug|x64.ActiveCfg = Debug|x64 {0B43679E-EDFA-4DA0-AD30-F4628B308B1B}.Debug|x64.Build.0 = Debug|x64 + {0B43679E-EDFA-4DA0-AD30-F4628B308B1B}.Release|Any CPU.ActiveCfg = Release|x64 {0B43679E-EDFA-4DA0-AD30-F4628B308B1B}.Release|x64.ActiveCfg = Release|x64 {0B43679E-EDFA-4DA0-AD30-F4628B308B1B}.Release|x64.Build.0 = Release|x64 + {E0CC7526-D85E-43AC-844F-D5DF0D2F5AB8}.Debug|Any CPU.ActiveCfg = Debug|x64 {E0CC7526-D85E-43AC-844F-D5DF0D2F5AB8}.Debug|x64.ActiveCfg = Debug|x64 {E0CC7526-D85E-43AC-844F-D5DF0D2F5AB8}.Debug|x64.Build.0 = Debug|x64 + {E0CC7526-D85E-43AC-844F-D5DF0D2F5AB8}.Release|Any CPU.ActiveCfg = Release|x64 {E0CC7526-D85E-43AC-844F-D5DF0D2F5AB8}.Release|x64.ActiveCfg = Release|x64 {E0CC7526-D85E-43AC-844F-D5DF0D2F5AB8}.Release|x64.Build.0 = Release|x64 + {D29DDD63-E2CF-4657-9FD5-2AEDE4257E5D}.Debug|Any CPU.ActiveCfg = Debug|x64 {D29DDD63-E2CF-4657-9FD5-2AEDE4257E5D}.Debug|x64.ActiveCfg = Debug|x64 {D29DDD63-E2CF-4657-9FD5-2AEDE4257E5D}.Debug|x64.Build.0 = Debug|x64 + {D29DDD63-E2CF-4657-9FD5-2AEDE4257E5D}.Release|Any CPU.ActiveCfg = Release|x64 {D29DDD63-E2CF-4657-9FD5-2AEDE4257E5D}.Release|x64.ActiveCfg = Release|x64 {D29DDD63-E2CF-4657-9FD5-2AEDE4257E5D}.Release|x64.Build.0 = Release|x64 + {17DA04DF-E393-4397-9CF0-84DABE11032E}.Debug|Any CPU.ActiveCfg = Debug|x64 {17DA04DF-E393-4397-9CF0-84DABE11032E}.Debug|x64.ActiveCfg = Debug|x64 {17DA04DF-E393-4397-9CF0-84DABE11032E}.Debug|x64.Build.0 = Debug|x64 + {17DA04DF-E393-4397-9CF0-84DABE11032E}.Release|Any CPU.ActiveCfg = Release|x64 {17DA04DF-E393-4397-9CF0-84DABE11032E}.Release|x64.ActiveCfg = Release|x64 {17DA04DF-E393-4397-9CF0-84DABE11032E}.Release|x64.Build.0 = Release|x64 + {8AFFA899-0B73-49EC-8C50-0FADDA57B2FC}.Debug|Any CPU.ActiveCfg = Debug|x64 {8AFFA899-0B73-49EC-8C50-0FADDA57B2FC}.Debug|x64.ActiveCfg = Debug|x64 {8AFFA899-0B73-49EC-8C50-0FADDA57B2FC}.Debug|x64.Build.0 = Debug|x64 + {8AFFA899-0B73-49EC-8C50-0FADDA57B2FC}.Release|Any CPU.ActiveCfg = Release|x64 {8AFFA899-0B73-49EC-8C50-0FADDA57B2FC}.Release|x64.ActiveCfg = Release|x64 {8AFFA899-0B73-49EC-8C50-0FADDA57B2FC}.Release|x64.Build.0 = Release|x64 + {4FD29318-A8AB-4D8F-AA47-60BC241B8DA3}.Debug|Any CPU.ActiveCfg = Debug|x64 {4FD29318-A8AB-4D8F-AA47-60BC241B8DA3}.Debug|x64.ActiveCfg = Debug|x64 {4FD29318-A8AB-4D8F-AA47-60BC241B8DA3}.Debug|x64.Build.0 = Debug|x64 + {4FD29318-A8AB-4D8F-AA47-60BC241B8DA3}.Release|Any CPU.ActiveCfg = Release|x64 {4FD29318-A8AB-4D8F-AA47-60BC241B8DA3}.Release|x64.ActiveCfg = Release|x64 {4FD29318-A8AB-4D8F-AA47-60BC241B8DA3}.Release|x64.Build.0 = Release|x64 + {8451ECDD-2EA4-4966-BB0A-7BBC40138E80}.Debug|Any CPU.ActiveCfg = Debug|x64 {8451ECDD-2EA4-4966-BB0A-7BBC40138E80}.Debug|x64.ActiveCfg = Debug|x64 {8451ECDD-2EA4-4966-BB0A-7BBC40138E80}.Debug|x64.Build.0 = Debug|x64 + {8451ECDD-2EA4-4966-BB0A-7BBC40138E80}.Release|Any CPU.ActiveCfg = Release|x64 {8451ECDD-2EA4-4966-BB0A-7BBC40138E80}.Release|x64.ActiveCfg = Release|x64 {8451ECDD-2EA4-4966-BB0A-7BBC40138E80}.Release|x64.Build.0 = Release|x64 + {FF742965-9A80-41A5-B042-D6C7D3A21708}.Debug|Any CPU.ActiveCfg = Debug|x64 {FF742965-9A80-41A5-B042-D6C7D3A21708}.Debug|x64.ActiveCfg = Debug|x64 {FF742965-9A80-41A5-B042-D6C7D3A21708}.Debug|x64.Build.0 = Debug|x64 + {FF742965-9A80-41A5-B042-D6C7D3A21708}.Release|Any CPU.ActiveCfg = Release|x64 {FF742965-9A80-41A5-B042-D6C7D3A21708}.Release|x64.ActiveCfg = Release|x64 {FF742965-9A80-41A5-B042-D6C7D3A21708}.Release|x64.Build.0 = Release|x64 + {59BD9891-3837-438A-958D-ADC7F91F6F7E}.Debug|Any CPU.ActiveCfg = Debug|x64 {59BD9891-3837-438A-958D-ADC7F91F6F7E}.Debug|x64.ActiveCfg = Debug|x64 {59BD9891-3837-438A-958D-ADC7F91F6F7E}.Debug|x64.Build.0 = Debug|x64 + {59BD9891-3837-438A-958D-ADC7F91F6F7E}.Release|Any CPU.ActiveCfg = Release|x64 {59BD9891-3837-438A-958D-ADC7F91F6F7E}.Release|x64.ActiveCfg = Release|x64 {59BD9891-3837-438A-958D-ADC7F91F6F7E}.Release|x64.Build.0 = Release|x64 + {4D971245-7A70-41D5-BAA0-DDB5684CAF51}.Debug|Any CPU.ActiveCfg = Debug|x64 {4D971245-7A70-41D5-BAA0-DDB5684CAF51}.Debug|x64.ActiveCfg = Debug|x64 {4D971245-7A70-41D5-BAA0-DDB5684CAF51}.Debug|x64.Build.0 = Debug|x64 + {4D971245-7A70-41D5-BAA0-DDB5684CAF51}.Release|Any CPU.ActiveCfg = Release|x64 {4D971245-7A70-41D5-BAA0-DDB5684CAF51}.Release|x64.ActiveCfg = Release|x64 {4D971245-7A70-41D5-BAA0-DDB5684CAF51}.Release|x64.Build.0 = Release|x64 + {74F1B9ED-F59C-4FE7-B473-7B453E30837E}.Debug|Any CPU.ActiveCfg = Debug|x64 {74F1B9ED-F59C-4FE7-B473-7B453E30837E}.Debug|x64.ActiveCfg = Debug|x64 {74F1B9ED-F59C-4FE7-B473-7B453E30837E}.Debug|x64.Build.0 = Debug|x64 + {74F1B9ED-F59C-4FE7-B473-7B453E30837E}.Release|Any CPU.ActiveCfg = Release|x64 {74F1B9ED-F59C-4FE7-B473-7B453E30837E}.Release|x64.ActiveCfg = Release|x64 {74F1B9ED-F59C-4FE7-B473-7B453E30837E}.Release|x64.Build.0 = Release|x64 + {FDB3555B-58EF-4AE6-B5F1-904719637AB4}.Debug|Any CPU.ActiveCfg = Debug|x64 {FDB3555B-58EF-4AE6-B5F1-904719637AB4}.Debug|x64.ActiveCfg = Debug|x64 {FDB3555B-58EF-4AE6-B5F1-904719637AB4}.Debug|x64.Build.0 = Debug|x64 + {FDB3555B-58EF-4AE6-B5F1-904719637AB4}.Release|Any CPU.ActiveCfg = Release|x64 {FDB3555B-58EF-4AE6-B5F1-904719637AB4}.Release|x64.ActiveCfg = Release|x64 {FDB3555B-58EF-4AE6-B5F1-904719637AB4}.Release|x64.Build.0 = Release|x64 + {C21BFF9C-2C99-4B5F-B7C9-A5E6DDDB37B0}.Debug|Any CPU.ActiveCfg = Debug|x64 {C21BFF9C-2C99-4B5F-B7C9-A5E6DDDB37B0}.Debug|x64.ActiveCfg = Debug|x64 {C21BFF9C-2C99-4B5F-B7C9-A5E6DDDB37B0}.Debug|x64.Build.0 = Debug|x64 + {C21BFF9C-2C99-4B5F-B7C9-A5E6DDDB37B0}.Release|Any CPU.ActiveCfg = Release|x64 {C21BFF9C-2C99-4B5F-B7C9-A5E6DDDB37B0}.Release|x64.ActiveCfg = Release|x64 {C21BFF9C-2C99-4B5F-B7C9-A5E6DDDB37B0}.Release|x64.Build.0 = Release|x64 + {F8B870EB-D5F5-45BA-9CF7-A5C459818820}.Debug|Any CPU.ActiveCfg = Debug|x64 {F8B870EB-D5F5-45BA-9CF7-A5C459818820}.Debug|x64.ActiveCfg = Debug|x64 {F8B870EB-D5F5-45BA-9CF7-A5C459818820}.Debug|x64.Build.0 = Debug|x64 + {F8B870EB-D5F5-45BA-9CF7-A5C459818820}.Release|Any CPU.ActiveCfg = Release|x64 {F8B870EB-D5F5-45BA-9CF7-A5C459818820}.Release|x64.ActiveCfg = Release|x64 {F8B870EB-D5F5-45BA-9CF7-A5C459818820}.Release|x64.Build.0 = Release|x64 + {E364F67B-BB12-4E91-B639-355866EBCD8B}.Debug|Any CPU.ActiveCfg = Debug|x64 {E364F67B-BB12-4E91-B639-355866EBCD8B}.Debug|x64.ActiveCfg = Debug|x64 {E364F67B-BB12-4E91-B639-355866EBCD8B}.Debug|x64.Build.0 = Debug|x64 + {E364F67B-BB12-4E91-B639-355866EBCD8B}.Release|Any CPU.ActiveCfg = Release|x64 {E364F67B-BB12-4E91-B639-355866EBCD8B}.Release|x64.ActiveCfg = Release|x64 {E364F67B-BB12-4E91-B639-355866EBCD8B}.Release|x64.Build.0 = Release|x64 + {F97E5003-F263-4D4A-A964-0F1F3C82DEF2}.Debug|Any CPU.ActiveCfg = Debug|x64 {F97E5003-F263-4D4A-A964-0F1F3C82DEF2}.Debug|x64.ActiveCfg = Debug|x64 {F97E5003-F263-4D4A-A964-0F1F3C82DEF2}.Debug|x64.Build.0 = Debug|x64 + {F97E5003-F263-4D4A-A964-0F1F3C82DEF2}.Release|Any CPU.ActiveCfg = Release|x64 {F97E5003-F263-4D4A-A964-0F1F3C82DEF2}.Release|x64.ActiveCfg = Release|x64 {F97E5003-F263-4D4A-A964-0F1F3C82DEF2}.Release|x64.Build.0 = Release|x64 + {AF2349B8-E5B6-4004-9502-687C1C7730B1}.Debug|Any CPU.ActiveCfg = Debug|x64 {AF2349B8-E5B6-4004-9502-687C1C7730B1}.Debug|x64.ActiveCfg = Debug|x64 {AF2349B8-E5B6-4004-9502-687C1C7730B1}.Debug|x64.Build.0 = Debug|x64 + {AF2349B8-E5B6-4004-9502-687C1C7730B1}.Release|Any CPU.ActiveCfg = Release|x64 {AF2349B8-E5B6-4004-9502-687C1C7730B1}.Release|x64.ActiveCfg = Release|x64 {AF2349B8-E5B6-4004-9502-687C1C7730B1}.Release|x64.Build.0 = Release|x64 + {6A71162E-FC4C-4A2C-B90F-3CF94F59A9BB}.Debug|Any CPU.ActiveCfg = Debug|x64 {6A71162E-FC4C-4A2C-B90F-3CF94F59A9BB}.Debug|x64.ActiveCfg = Debug|x64 {6A71162E-FC4C-4A2C-B90F-3CF94F59A9BB}.Debug|x64.Build.0 = Debug|x64 + {6A71162E-FC4C-4A2C-B90F-3CF94F59A9BB}.Release|Any CPU.ActiveCfg = Release|x64 {6A71162E-FC4C-4A2C-B90F-3CF94F59A9BB}.Release|x64.ActiveCfg = Release|x64 {6A71162E-FC4C-4A2C-B90F-3CF94F59A9BB}.Release|x64.Build.0 = Release|x64 + {A2B51B8B-8F90-424E-BC97-F9AB7D76CA1A}.Debug|Any CPU.ActiveCfg = Debug|x64 {A2B51B8B-8F90-424E-BC97-F9AB7D76CA1A}.Debug|x64.ActiveCfg = Debug|x64 {A2B51B8B-8F90-424E-BC97-F9AB7D76CA1A}.Debug|x64.Build.0 = Debug|x64 + {A2B51B8B-8F90-424E-BC97-F9AB7D76CA1A}.Release|Any CPU.ActiveCfg = Release|x64 {A2B51B8B-8F90-424E-BC97-F9AB7D76CA1A}.Release|x64.ActiveCfg = Release|x64 {A2B51B8B-8F90-424E-BC97-F9AB7D76CA1A}.Release|x64.Build.0 = Release|x64 + {DA425894-6E13-404F-8DCB-78584EC0557A}.Debug|Any CPU.ActiveCfg = Debug|x64 {DA425894-6E13-404F-8DCB-78584EC0557A}.Debug|x64.ActiveCfg = Debug|x64 {DA425894-6E13-404F-8DCB-78584EC0557A}.Debug|x64.Build.0 = Debug|x64 + {DA425894-6E13-404F-8DCB-78584EC0557A}.Release|Any CPU.ActiveCfg = Release|x64 {DA425894-6E13-404F-8DCB-78584EC0557A}.Release|x64.ActiveCfg = Release|x64 {DA425894-6E13-404F-8DCB-78584EC0557A}.Release|x64.Build.0 = Release|x64 + {060D75DA-2D1C-48E6-A4A1-6F0718B64661}.Debug|Any CPU.ActiveCfg = Debug|x64 {060D75DA-2D1C-48E6-A4A1-6F0718B64661}.Debug|x64.ActiveCfg = Debug|x64 {060D75DA-2D1C-48E6-A4A1-6F0718B64661}.Debug|x64.Build.0 = Debug|x64 + {060D75DA-2D1C-48E6-A4A1-6F0718B64661}.Release|Any CPU.ActiveCfg = Release|x64 {060D75DA-2D1C-48E6-A4A1-6F0718B64661}.Release|x64.ActiveCfg = Release|x64 {060D75DA-2D1C-48E6-A4A1-6F0718B64661}.Release|x64.Build.0 = Release|x64 + {748417CA-F17E-487F-9411-CAFB6D3F4877}.Debug|Any CPU.ActiveCfg = Debug|x64 {748417CA-F17E-487F-9411-CAFB6D3F4877}.Debug|x64.ActiveCfg = Debug|x64 {748417CA-F17E-487F-9411-CAFB6D3F4877}.Debug|x64.Build.0 = Debug|x64 + {748417CA-F17E-487F-9411-CAFB6D3F4877}.Release|Any CPU.ActiveCfg = Release|x64 {748417CA-F17E-487F-9411-CAFB6D3F4877}.Release|x64.ActiveCfg = Release|x64 {748417CA-F17E-487F-9411-CAFB6D3F4877}.Release|x64.Build.0 = Release|x64 + {217DF501-135C-4E38-BFC8-99D4821032EA}.Debug|Any CPU.ActiveCfg = Debug|x64 {217DF501-135C-4E38-BFC8-99D4821032EA}.Debug|x64.ActiveCfg = Debug|x64 {217DF501-135C-4E38-BFC8-99D4821032EA}.Debug|x64.Build.0 = Debug|x64 + {217DF501-135C-4E38-BFC8-99D4821032EA}.Release|Any CPU.ActiveCfg = Release|x64 {217DF501-135C-4E38-BFC8-99D4821032EA}.Release|x64.ActiveCfg = Release|x64 {217DF501-135C-4E38-BFC8-99D4821032EA}.Release|x64.Build.0 = Release|x64 + {47310AB4-9034-4BD1-8D8B-E88AD21A171B}.Debug|Any CPU.ActiveCfg = Debug|x64 {47310AB4-9034-4BD1-8D8B-E88AD21A171B}.Debug|x64.ActiveCfg = Debug|x64 {47310AB4-9034-4BD1-8D8B-E88AD21A171B}.Debug|x64.Build.0 = Debug|x64 + {47310AB4-9034-4BD1-8D8B-E88AD21A171B}.Release|Any CPU.ActiveCfg = Release|x64 {47310AB4-9034-4BD1-8D8B-E88AD21A171B}.Release|x64.ActiveCfg = Release|x64 {47310AB4-9034-4BD1-8D8B-E88AD21A171B}.Release|x64.Build.0 = Release|x64 + {A7D5099E-F0FD-4BF3-8522-5A682759F915}.Debug|Any CPU.ActiveCfg = Debug|Win32 {A7D5099E-F0FD-4BF3-8522-5A682759F915}.Debug|x64.ActiveCfg = Debug|x64 {A7D5099E-F0FD-4BF3-8522-5A682759F915}.Debug|x64.Build.0 = Debug|x64 + {A7D5099E-F0FD-4BF3-8522-5A682759F915}.Release|Any CPU.ActiveCfg = Release|Win32 {A7D5099E-F0FD-4BF3-8522-5A682759F915}.Release|x64.ActiveCfg = Release|x64 {A7D5099E-F0FD-4BF3-8522-5A682759F915}.Release|x64.Build.0 = Release|x64 + {B1BCC8C6-46B5-4BFA-8F22-20F32D99EC6A}.Debug|Any CPU.ActiveCfg = Debug|x64 {B1BCC8C6-46B5-4BFA-8F22-20F32D99EC6A}.Debug|x64.ActiveCfg = Debug|x64 {B1BCC8C6-46B5-4BFA-8F22-20F32D99EC6A}.Debug|x64.Build.0 = Debug|x64 + {B1BCC8C6-46B5-4BFA-8F22-20F32D99EC6A}.Release|Any CPU.ActiveCfg = Release|x64 {B1BCC8C6-46B5-4BFA-8F22-20F32D99EC6A}.Release|x64.ActiveCfg = Release|x64 {B1BCC8C6-46B5-4BFA-8F22-20F32D99EC6A}.Release|x64.Build.0 = Release|x64 + {F055103B-F80B-4D0C-BF48-057C55620033}.Debug|Any CPU.ActiveCfg = Debug|x64 {F055103B-F80B-4D0C-BF48-057C55620033}.Debug|x64.ActiveCfg = Debug|x64 {F055103B-F80B-4D0C-BF48-057C55620033}.Debug|x64.Build.0 = Debug|x64 + {F055103B-F80B-4D0C-BF48-057C55620033}.Release|Any CPU.ActiveCfg = Release|x64 {F055103B-F80B-4D0C-BF48-057C55620033}.Release|x64.ActiveCfg = Release|x64 {F055103B-F80B-4D0C-BF48-057C55620033}.Release|x64.Build.0 = Release|x64 + {787B8AA6-CA93-4C84-96FE-DF31110AD1C4}.Debug|Any CPU.ActiveCfg = Debug|x64 {787B8AA6-CA93-4C84-96FE-DF31110AD1C4}.Debug|x64.ActiveCfg = Debug|x64 {787B8AA6-CA93-4C84-96FE-DF31110AD1C4}.Debug|x64.Build.0 = Debug|x64 + {787B8AA6-CA93-4C84-96FE-DF31110AD1C4}.Release|Any CPU.ActiveCfg = Release|x64 {787B8AA6-CA93-4C84-96FE-DF31110AD1C4}.Release|x64.ActiveCfg = Release|x64 {787B8AA6-CA93-4C84-96FE-DF31110AD1C4}.Release|x64.Build.0 = Release|x64 + {08C8C05F-0362-41BC-818C-724572DF8B06}.Debug|Any CPU.ActiveCfg = Debug|x64 {08C8C05F-0362-41BC-818C-724572DF8B06}.Debug|x64.ActiveCfg = Debug|x64 {08C8C05F-0362-41BC-818C-724572DF8B06}.Debug|x64.Build.0 = Debug|x64 + {08C8C05F-0362-41BC-818C-724572DF8B06}.Release|Any CPU.ActiveCfg = Release|x64 {08C8C05F-0362-41BC-818C-724572DF8B06}.Release|x64.ActiveCfg = Release|x64 {08C8C05F-0362-41BC-818C-724572DF8B06}.Release|x64.Build.0 = Release|x64 + {5D00D290-4016-4CFE-9E41-1E7C724509BA}.Debug|Any CPU.ActiveCfg = Debug|x64 {5D00D290-4016-4CFE-9E41-1E7C724509BA}.Debug|x64.ActiveCfg = Debug|x64 {5D00D290-4016-4CFE-9E41-1E7C724509BA}.Debug|x64.Build.0 = Debug|x64 + {5D00D290-4016-4CFE-9E41-1E7C724509BA}.Release|Any CPU.ActiveCfg = Release|x64 {5D00D290-4016-4CFE-9E41-1E7C724509BA}.Release|x64.ActiveCfg = Release|x64 {5D00D290-4016-4CFE-9E41-1E7C724509BA}.Release|x64.Build.0 = Release|x64 + {4AED67B6-55FD-486F-B917-E543DEE2CB3C}.Debug|Any CPU.ActiveCfg = Debug|x64 {4AED67B6-55FD-486F-B917-E543DEE2CB3C}.Debug|x64.ActiveCfg = Debug|x64 {4AED67B6-55FD-486F-B917-E543DEE2CB3C}.Debug|x64.Build.0 = Debug|x64 + {4AED67B6-55FD-486F-B917-E543DEE2CB3C}.Release|Any CPU.ActiveCfg = Release|x64 {4AED67B6-55FD-486F-B917-E543DEE2CB3C}.Release|x64.ActiveCfg = Release|x64 {4AED67B6-55FD-486F-B917-E543DEE2CB3C}.Release|x64.Build.0 = Release|x64 + {42851751-CBC8-45A6-97F5-7A0753F7B4D1}.Debug|Any CPU.ActiveCfg = Debug|x64 {42851751-CBC8-45A6-97F5-7A0753F7B4D1}.Debug|x64.ActiveCfg = Debug|x64 {42851751-CBC8-45A6-97F5-7A0753F7B4D1}.Debug|x64.Build.0 = Debug|x64 + {42851751-CBC8-45A6-97F5-7A0753F7B4D1}.Release|Any CPU.ActiveCfg = Release|x64 {42851751-CBC8-45A6-97F5-7A0753F7B4D1}.Release|x64.ActiveCfg = Release|x64 {42851751-CBC8-45A6-97F5-7A0753F7B4D1}.Release|x64.Build.0 = Release|x64 + {1EF1EEF0-10F0-4F2E-8550-39B6D8044D3E}.Debug|Any CPU.ActiveCfg = Debug|x64 {1EF1EEF0-10F0-4F2E-8550-39B6D8044D3E}.Debug|x64.ActiveCfg = Debug|x64 {1EF1EEF0-10F0-4F2E-8550-39B6D8044D3E}.Debug|x64.Build.0 = Debug|x64 + {1EF1EEF0-10F0-4F2E-8550-39B6D8044D3E}.Release|Any CPU.ActiveCfg = Release|x64 {1EF1EEF0-10F0-4F2E-8550-39B6D8044D3E}.Release|x64.ActiveCfg = Release|x64 {1EF1EEF0-10F0-4F2E-8550-39B6D8044D3E}.Release|x64.Build.0 = Release|x64 + {8FFE09DA-FA4F-4EE1-B3A2-AD5497FBD1AD}.Debug|Any CPU.ActiveCfg = Debug|x64 {8FFE09DA-FA4F-4EE1-B3A2-AD5497FBD1AD}.Debug|x64.ActiveCfg = Debug|x64 {8FFE09DA-FA4F-4EE1-B3A2-AD5497FBD1AD}.Debug|x64.Build.0 = Debug|x64 + {8FFE09DA-FA4F-4EE1-B3A2-AD5497FBD1AD}.Release|Any CPU.ActiveCfg = Release|x64 {8FFE09DA-FA4F-4EE1-B3A2-AD5497FBD1AD}.Release|x64.ActiveCfg = Release|x64 {8FFE09DA-FA4F-4EE1-B3A2-AD5497FBD1AD}.Release|x64.Build.0 = Release|x64 + {655C9AF2-18D3-4DA6-80E4-85504A7722BA}.Debug|Any CPU.ActiveCfg = Debug|x64 {655C9AF2-18D3-4DA6-80E4-85504A7722BA}.Debug|x64.ActiveCfg = Debug|x64 {655C9AF2-18D3-4DA6-80E4-85504A7722BA}.Debug|x64.Build.0 = Debug|x64 + {655C9AF2-18D3-4DA6-80E4-85504A7722BA}.Release|Any CPU.ActiveCfg = Release|x64 {655C9AF2-18D3-4DA6-80E4-85504A7722BA}.Release|x64.ActiveCfg = Release|x64 {655C9AF2-18D3-4DA6-80E4-85504A7722BA}.Release|x64.Build.0 = Release|x64 + {BA58206B-1493-4C75-BFEA-A85768A1E156}.Debug|Any CPU.ActiveCfg = Debug|x64 {BA58206B-1493-4C75-BFEA-A85768A1E156}.Debug|x64.ActiveCfg = Debug|x64 {BA58206B-1493-4C75-BFEA-A85768A1E156}.Debug|x64.Build.0 = Debug|x64 + {BA58206B-1493-4C75-BFEA-A85768A1E156}.Release|Any CPU.ActiveCfg = Release|x64 {BA58206B-1493-4C75-BFEA-A85768A1E156}.Release|x64.ActiveCfg = Release|x64 {BA58206B-1493-4C75-BFEA-A85768A1E156}.Release|x64.Build.0 = Release|x64 + {03276A39-D4E9-417C-8FFD-200B0EE5E871}.Debug|Any CPU.ActiveCfg = Debug|x64 {03276A39-D4E9-417C-8FFD-200B0EE5E871}.Debug|x64.ActiveCfg = Debug|x64 {03276A39-D4E9-417C-8FFD-200B0EE5E871}.Debug|x64.Build.0 = Debug|x64 + {03276A39-D4E9-417C-8FFD-200B0EE5E871}.Release|Any CPU.ActiveCfg = Release|x64 {03276A39-D4E9-417C-8FFD-200B0EE5E871}.Release|x64.ActiveCfg = Release|x64 {03276A39-D4E9-417C-8FFD-200B0EE5E871}.Release|x64.Build.0 = Release|x64 + {B81FB7B6-D30E-428F-908A-41422EFC1172}.Debug|Any CPU.ActiveCfg = Debug|x64 {B81FB7B6-D30E-428F-908A-41422EFC1172}.Debug|x64.ActiveCfg = Debug|x64 {B81FB7B6-D30E-428F-908A-41422EFC1172}.Debug|x64.Build.0 = Debug|x64 + {B81FB7B6-D30E-428F-908A-41422EFC1172}.Release|Any CPU.ActiveCfg = Release|x64 {B81FB7B6-D30E-428F-908A-41422EFC1172}.Release|x64.ActiveCfg = Release|x64 {B81FB7B6-D30E-428F-908A-41422EFC1172}.Release|x64.Build.0 = Release|x64 + {0F85E674-34AE-443D-954C-8321EB8B93B1}.Debug|Any CPU.ActiveCfg = Debug|x64 {0F85E674-34AE-443D-954C-8321EB8B93B1}.Debug|x64.ActiveCfg = Debug|x64 {0F85E674-34AE-443D-954C-8321EB8B93B1}.Debug|x64.Build.0 = Debug|x64 + {0F85E674-34AE-443D-954C-8321EB8B93B1}.Release|Any CPU.ActiveCfg = Release|x64 {0F85E674-34AE-443D-954C-8321EB8B93B1}.Release|x64.ActiveCfg = Release|x64 {0F85E674-34AE-443D-954C-8321EB8B93B1}.Release|x64.Build.0 = Release|x64 + {632BBE62-5421-49EA-835A-7FFA4F499BD6}.Debug|Any CPU.ActiveCfg = Debug|x64 {632BBE62-5421-49EA-835A-7FFA4F499BD6}.Debug|x64.ActiveCfg = Debug|x64 {632BBE62-5421-49EA-835A-7FFA4F499BD6}.Debug|x64.Build.0 = Debug|x64 + {632BBE62-5421-49EA-835A-7FFA4F499BD6}.Release|Any CPU.ActiveCfg = Release|x64 {632BBE62-5421-49EA-835A-7FFA4F499BD6}.Release|x64.ActiveCfg = Release|x64 {632BBE62-5421-49EA-835A-7FFA4F499BD6}.Release|x64.Build.0 = Release|x64 + {4FA206A5-F69F-4193-BF8F-F6EEB496734C}.Debug|Any CPU.ActiveCfg = Debug|x64 {4FA206A5-F69F-4193-BF8F-F6EEB496734C}.Debug|x64.ActiveCfg = Debug|x64 {4FA206A5-F69F-4193-BF8F-F6EEB496734C}.Debug|x64.Build.0 = Debug|x64 + {4FA206A5-F69F-4193-BF8F-F6EEB496734C}.Release|Any CPU.ActiveCfg = Release|x64 {4FA206A5-F69F-4193-BF8F-F6EEB496734C}.Release|x64.ActiveCfg = Release|x64 {4FA206A5-F69F-4193-BF8F-F6EEB496734C}.Release|x64.Build.0 = Release|x64 + {090CD7B7-3B0C-4D1D-BC98-83EB5D799BC1}.Debug|Any CPU.ActiveCfg = Debug|x64 {090CD7B7-3B0C-4D1D-BC98-83EB5D799BC1}.Debug|x64.ActiveCfg = Debug|x64 {090CD7B7-3B0C-4D1D-BC98-83EB5D799BC1}.Debug|x64.Build.0 = Debug|x64 + {090CD7B7-3B0C-4D1D-BC98-83EB5D799BC1}.Release|Any CPU.ActiveCfg = Release|x64 {090CD7B7-3B0C-4D1D-BC98-83EB5D799BC1}.Release|x64.ActiveCfg = Release|x64 {090CD7B7-3B0C-4D1D-BC98-83EB5D799BC1}.Release|x64.Build.0 = Release|x64 + {7E1E3F13-2BD6-3F75-A6A7-873A2B55C60F}.Debug|Any CPU.ActiveCfg = Debug|x64 {7E1E3F13-2BD6-3F75-A6A7-873A2B55C60F}.Debug|x64.ActiveCfg = Debug|x64 {7E1E3F13-2BD6-3F75-A6A7-873A2B55C60F}.Debug|x64.Build.0 = Debug|x64 + {7E1E3F13-2BD6-3F75-A6A7-873A2B55C60F}.Release|Any CPU.ActiveCfg = Release|x64 {7E1E3F13-2BD6-3F75-A6A7-873A2B55C60F}.Release|x64.ActiveCfg = Release|x64 {7E1E3F13-2BD6-3F75-A6A7-873A2B55C60F}.Release|x64.Build.0 = Release|x64 + {FD8EB419-FF9C-4D88-BB6F-BF6CED37747B}.Debug|Any CPU.ActiveCfg = Debug|x64 {FD8EB419-FF9C-4D88-BB6F-BF6CED37747B}.Debug|x64.ActiveCfg = Debug|x64 {FD8EB419-FF9C-4D88-BB6F-BF6CED37747B}.Debug|x64.Build.0 = Debug|x64 + {FD8EB419-FF9C-4D88-BB6F-BF6CED37747B}.Release|Any CPU.ActiveCfg = Release|x64 {FD8EB419-FF9C-4D88-BB6F-BF6CED37747B}.Release|x64.ActiveCfg = Release|x64 {FD8EB419-FF9C-4D88-BB6F-BF6CED37747B}.Release|x64.Build.0 = Release|x64 + {DA5A6FE9-0040-40CC-83CC-764AE5306590}.Debug|Any CPU.ActiveCfg = Debug|x64 {DA5A6FE9-0040-40CC-83CC-764AE5306590}.Debug|x64.ActiveCfg = Debug|x64 {DA5A6FE9-0040-40CC-83CC-764AE5306590}.Debug|x64.Build.0 = Debug|x64 + {DA5A6FE9-0040-40CC-83CC-764AE5306590}.Release|Any CPU.ActiveCfg = Release|x64 {DA5A6FE9-0040-40CC-83CC-764AE5306590}.Release|x64.ActiveCfg = Release|x64 {DA5A6FE9-0040-40CC-83CC-764AE5306590}.Release|x64.Build.0 = Release|x64 + {0351ADA4-0C32-4652-9BA0-41F7B602372B}.Debug|Any CPU.ActiveCfg = Debug|x64 {0351ADA4-0C32-4652-9BA0-41F7B602372B}.Debug|x64.ActiveCfg = Debug|x64 {0351ADA4-0C32-4652-9BA0-41F7B602372B}.Debug|x64.Build.0 = Debug|x64 + {0351ADA4-0C32-4652-9BA0-41F7B602372B}.Release|Any CPU.ActiveCfg = Release|x64 {0351ADA4-0C32-4652-9BA0-41F7B602372B}.Release|x64.ActiveCfg = Release|x64 {0351ADA4-0C32-4652-9BA0-41F7B602372B}.Release|x64.Build.0 = Release|x64 + {D9B8FC84-322A-4F9F-BBB9-20915C47DDFD}.Debug|Any CPU.ActiveCfg = Debug|x64 {D9B8FC84-322A-4F9F-BBB9-20915C47DDFD}.Debug|x64.ActiveCfg = Debug|x64 {D9B8FC84-322A-4F9F-BBB9-20915C47DDFD}.Debug|x64.Build.0 = Debug|x64 + {D9B8FC84-322A-4F9F-BBB9-20915C47DDFD}.Release|Any CPU.ActiveCfg = Release|x64 {D9B8FC84-322A-4F9F-BBB9-20915C47DDFD}.Release|x64.ActiveCfg = Release|x64 {D9B8FC84-322A-4F9F-BBB9-20915C47DDFD}.Release|x64.Build.0 = Release|x64 + {6955446D-23F7-4023-9BB3-8657F904AF99}.Debug|Any CPU.ActiveCfg = Debug|x64 {6955446D-23F7-4023-9BB3-8657F904AF99}.Debug|x64.ActiveCfg = Debug|x64 {6955446D-23F7-4023-9BB3-8657F904AF99}.Debug|x64.Build.0 = Debug|x64 + {6955446D-23F7-4023-9BB3-8657F904AF99}.Release|Any CPU.ActiveCfg = Release|x64 {6955446D-23F7-4023-9BB3-8657F904AF99}.Release|x64.ActiveCfg = Release|x64 {6955446D-23F7-4023-9BB3-8657F904AF99}.Release|x64.Build.0 = Release|x64 + {58736667-1027-4AD7-BFDF-7A3A6474103A}.Debug|Any CPU.ActiveCfg = Debug|x64 {58736667-1027-4AD7-BFDF-7A3A6474103A}.Debug|x64.ActiveCfg = Debug|x64 {58736667-1027-4AD7-BFDF-7A3A6474103A}.Debug|x64.Build.0 = Debug|x64 + {58736667-1027-4AD7-BFDF-7A3A6474103A}.Release|Any CPU.ActiveCfg = Release|x64 {58736667-1027-4AD7-BFDF-7A3A6474103A}.Release|x64.ActiveCfg = Release|x64 {58736667-1027-4AD7-BFDF-7A3A6474103A}.Release|x64.Build.0 = Release|x64 + {1D5BE09D-78C0-4FD7-AF00-AE7C1AF7C525}.Debug|Any CPU.ActiveCfg = Debug|x64 {1D5BE09D-78C0-4FD7-AF00-AE7C1AF7C525}.Debug|x64.ActiveCfg = Debug|x64 {1D5BE09D-78C0-4FD7-AF00-AE7C1AF7C525}.Debug|x64.Build.0 = Debug|x64 + {1D5BE09D-78C0-4FD7-AF00-AE7C1AF7C525}.Release|Any CPU.ActiveCfg = Release|x64 {1D5BE09D-78C0-4FD7-AF00-AE7C1AF7C525}.Release|x64.ActiveCfg = Release|x64 {1D5BE09D-78C0-4FD7-AF00-AE7C1AF7C525}.Release|x64.Build.0 = Release|x64 + {031AC72E-FA28-4AB7-B690-6F7B9C28AA73}.Debug|Any CPU.ActiveCfg = Debug|x64 {031AC72E-FA28-4AB7-B690-6F7B9C28AA73}.Debug|x64.ActiveCfg = Debug|x64 {031AC72E-FA28-4AB7-B690-6F7B9C28AA73}.Debug|x64.Build.0 = Debug|x64 + {031AC72E-FA28-4AB7-B690-6F7B9C28AA73}.Release|Any CPU.ActiveCfg = Release|x64 {031AC72E-FA28-4AB7-B690-6F7B9C28AA73}.Release|x64.ActiveCfg = Release|x64 {031AC72E-FA28-4AB7-B690-6F7B9C28AA73}.Release|x64.Build.0 = Release|x64 + {0B593A6C-4143-4337-860E-DB5710FB87DB}.Debug|Any CPU.ActiveCfg = Debug|x64 {0B593A6C-4143-4337-860E-DB5710FB87DB}.Debug|x64.ActiveCfg = Debug|x64 {0B593A6C-4143-4337-860E-DB5710FB87DB}.Debug|x64.Build.0 = Debug|x64 + {0B593A6C-4143-4337-860E-DB5710FB87DB}.Release|Any CPU.ActiveCfg = Release|x64 {0B593A6C-4143-4337-860E-DB5710FB87DB}.Release|x64.ActiveCfg = Release|x64 {0B593A6C-4143-4337-860E-DB5710FB87DB}.Release|x64.Build.0 = Release|x64 + {CC6E41AC-8174-4E8A-8D22-85DD7F4851DF}.Debug|Any CPU.ActiveCfg = Debug|x64 {CC6E41AC-8174-4E8A-8D22-85DD7F4851DF}.Debug|x64.ActiveCfg = Debug|x64 {CC6E41AC-8174-4E8A-8D22-85DD7F4851DF}.Debug|x64.Build.0 = Debug|x64 + {CC6E41AC-8174-4E8A-8D22-85DD7F4851DF}.Release|Any CPU.ActiveCfg = Release|x64 {CC6E41AC-8174-4E8A-8D22-85DD7F4851DF}.Release|x64.ActiveCfg = Release|x64 {CC6E41AC-8174-4E8A-8D22-85DD7F4851DF}.Release|x64.Build.0 = Release|x64 + {C502A854-53AC-4EBB-8DC0-E4AF2191E4F6}.Debug|Any CPU.ActiveCfg = Debug|x64 {C502A854-53AC-4EBB-8DC0-E4AF2191E4F6}.Debug|x64.ActiveCfg = Debug|x64 {C502A854-53AC-4EBB-8DC0-E4AF2191E4F6}.Debug|x64.Build.0 = Debug|x64 + {C502A854-53AC-4EBB-8DC0-E4AF2191E4F6}.Release|Any CPU.ActiveCfg = Release|x64 {C502A854-53AC-4EBB-8DC0-E4AF2191E4F6}.Release|x64.ActiveCfg = Release|x64 {C502A854-53AC-4EBB-8DC0-E4AF2191E4F6}.Release|x64.Build.0 = Release|x64 + {7319089E-46D6-4400-BC65-E39BDF1416EE}.Debug|Any CPU.ActiveCfg = Debug|x64 {7319089E-46D6-4400-BC65-E39BDF1416EE}.Debug|x64.ActiveCfg = Debug|x64 {7319089E-46D6-4400-BC65-E39BDF1416EE}.Debug|x64.Build.0 = Debug|x64 + {7319089E-46D6-4400-BC65-E39BDF1416EE}.Release|Any CPU.ActiveCfg = Release|x64 {7319089E-46D6-4400-BC65-E39BDF1416EE}.Release|x64.ActiveCfg = Release|x64 {7319089E-46D6-4400-BC65-E39BDF1416EE}.Release|x64.Build.0 = Release|x64 + {CABA8DFB-823B-4BF2-93AC-3F31984150D9}.Debug|Any CPU.ActiveCfg = Debug|x64 {CABA8DFB-823B-4BF2-93AC-3F31984150D9}.Debug|x64.ActiveCfg = Debug|x64 {CABA8DFB-823B-4BF2-93AC-3F31984150D9}.Debug|x64.Build.0 = Debug|x64 + {CABA8DFB-823B-4BF2-93AC-3F31984150D9}.Release|Any CPU.ActiveCfg = Release|x64 {CABA8DFB-823B-4BF2-93AC-3F31984150D9}.Release|x64.ActiveCfg = Release|x64 {CABA8DFB-823B-4BF2-93AC-3F31984150D9}.Release|x64.Build.0 = Release|x64 + {98537082-0FDB-40DE-ABD8-0DC5A4269BAB}.Debug|Any CPU.ActiveCfg = Debug|x64 {98537082-0FDB-40DE-ABD8-0DC5A4269BAB}.Debug|x64.ActiveCfg = Debug|x64 {98537082-0FDB-40DE-ABD8-0DC5A4269BAB}.Debug|x64.Build.0 = Debug|x64 + {98537082-0FDB-40DE-ABD8-0DC5A4269BAB}.Release|Any CPU.ActiveCfg = Release|x64 {98537082-0FDB-40DE-ABD8-0DC5A4269BAB}.Release|x64.ActiveCfg = Release|x64 {98537082-0FDB-40DE-ABD8-0DC5A4269BAB}.Release|x64.Build.0 = Release|x64 + {C3A17DCA-217B-462C-BB0C-BE086AF80081}.Debug|Any CPU.ActiveCfg = Debug|x64 {C3A17DCA-217B-462C-BB0C-BE086AF80081}.Debug|x64.ActiveCfg = Debug|x64 {C3A17DCA-217B-462C-BB0C-BE086AF80081}.Debug|x64.Build.0 = Debug|x64 + {C3A17DCA-217B-462C-BB0C-BE086AF80081}.Release|Any CPU.ActiveCfg = Release|x64 {C3A17DCA-217B-462C-BB0C-BE086AF80081}.Release|x64.ActiveCfg = Release|x64 {C3A17DCA-217B-462C-BB0C-BE086AF80081}.Release|x64.Build.0 = Release|x64 + {4BABF3FE-3451-42FD-873F-3C332E18DCEF}.Debug|Any CPU.ActiveCfg = Debug|x64 {4BABF3FE-3451-42FD-873F-3C332E18DCEF}.Debug|x64.ActiveCfg = Debug|x64 {4BABF3FE-3451-42FD-873F-3C332E18DCEF}.Debug|x64.Build.0 = Debug|x64 + {4BABF3FE-3451-42FD-873F-3C332E18DCEF}.Release|Any CPU.ActiveCfg = Release|x64 {4BABF3FE-3451-42FD-873F-3C332E18DCEF}.Release|x64.ActiveCfg = Release|x64 {4BABF3FE-3451-42FD-873F-3C332E18DCEF}.Release|x64.Build.0 = Release|x64 + {0648DF05-5DDA-4BE1-B5F2-584926EBDB65}.Debug|Any CPU.ActiveCfg = Debug|x64 {0648DF05-5DDA-4BE1-B5F2-584926EBDB65}.Debug|x64.ActiveCfg = Debug|x64 {0648DF05-5DDA-4BE1-B5F2-584926EBDB65}.Debug|x64.Build.0 = Debug|x64 + {0648DF05-5DDA-4BE1-B5F2-584926EBDB65}.Release|Any CPU.ActiveCfg = Release|x64 {0648DF05-5DDA-4BE1-B5F2-584926EBDB65}.Release|x64.ActiveCfg = Release|x64 {0648DF05-5DDA-4BE1-B5F2-584926EBDB65}.Release|x64.Build.0 = Release|x64 + {6ED2F4FC-E122-4CEE-90F1-97E4CCC8BC7A}.Debug|Any CPU.ActiveCfg = Debug|x64 {6ED2F4FC-E122-4CEE-90F1-97E4CCC8BC7A}.Debug|x64.ActiveCfg = Debug|x64 {6ED2F4FC-E122-4CEE-90F1-97E4CCC8BC7A}.Debug|x64.Build.0 = Debug|x64 + {6ED2F4FC-E122-4CEE-90F1-97E4CCC8BC7A}.Release|Any CPU.ActiveCfg = Release|x64 {6ED2F4FC-E122-4CEE-90F1-97E4CCC8BC7A}.Release|x64.ActiveCfg = Release|x64 {6ED2F4FC-E122-4CEE-90F1-97E4CCC8BC7A}.Release|x64.Build.0 = Release|x64 + {BA661F5B-1D5A-4FFC-9BF1-FC39DF280BDD}.Debug|Any CPU.ActiveCfg = Debug|x64 {BA661F5B-1D5A-4FFC-9BF1-FC39DF280BDD}.Debug|x64.ActiveCfg = Debug|x64 {BA661F5B-1D5A-4FFC-9BF1-FC39DF280BDD}.Debug|x64.Build.0 = Debug|x64 + {BA661F5B-1D5A-4FFC-9BF1-FC39DF280BDD}.Release|Any CPU.ActiveCfg = Release|x64 {BA661F5B-1D5A-4FFC-9BF1-FC39DF280BDD}.Release|x64.ActiveCfg = Release|x64 {BA661F5B-1D5A-4FFC-9BF1-FC39DF280BDD}.Release|x64.Build.0 = Release|x64 + {E496B7FC-1E99-4BAB-849B-0E8367040B02}.Debug|Any CPU.ActiveCfg = Debug|x64 {E496B7FC-1E99-4BAB-849B-0E8367040B02}.Debug|x64.ActiveCfg = Debug|x64 {E496B7FC-1E99-4BAB-849B-0E8367040B02}.Debug|x64.Build.0 = Debug|x64 + {E496B7FC-1E99-4BAB-849B-0E8367040B02}.Release|Any CPU.ActiveCfg = Release|x64 {E496B7FC-1E99-4BAB-849B-0E8367040B02}.Release|x64.ActiveCfg = Release|x64 {E496B7FC-1E99-4BAB-849B-0E8367040B02}.Release|x64.Build.0 = Release|x64 + {7F4B3A60-BC27-45A7-8000-68B0B6EA7466}.Debug|Any CPU.ActiveCfg = Debug|x64 {7F4B3A60-BC27-45A7-8000-68B0B6EA7466}.Debug|x64.ActiveCfg = Debug|x64 {7F4B3A60-BC27-45A7-8000-68B0B6EA7466}.Debug|x64.Build.0 = Debug|x64 + {7F4B3A60-BC27-45A7-8000-68B0B6EA7466}.Release|Any CPU.ActiveCfg = Release|x64 {7F4B3A60-BC27-45A7-8000-68B0B6EA7466}.Release|x64.ActiveCfg = Release|x64 {7F4B3A60-BC27-45A7-8000-68B0B6EA7466}.Release|x64.Build.0 = Release|x64 + {8DF78B53-200E-451F-9328-01EB907193AE}.Debug|Any CPU.ActiveCfg = Debug|x64 {8DF78B53-200E-451F-9328-01EB907193AE}.Debug|x64.ActiveCfg = Debug|x64 {8DF78B53-200E-451F-9328-01EB907193AE}.Debug|x64.Build.0 = Debug|x64 + {8DF78B53-200E-451F-9328-01EB907193AE}.Release|Any CPU.ActiveCfg = Release|x64 {8DF78B53-200E-451F-9328-01EB907193AE}.Release|x64.ActiveCfg = Release|x64 {8DF78B53-200E-451F-9328-01EB907193AE}.Release|x64.Build.0 = Release|x64 + {23D2070D-E4AD-4ADD-85A7-083D9C76AD49}.Debug|Any CPU.ActiveCfg = Debug|x64 {23D2070D-E4AD-4ADD-85A7-083D9C76AD49}.Debug|x64.ActiveCfg = Debug|x64 {23D2070D-E4AD-4ADD-85A7-083D9C76AD49}.Debug|x64.Build.0 = Debug|x64 + {23D2070D-E4AD-4ADD-85A7-083D9C76AD49}.Release|Any CPU.ActiveCfg = Release|x64 {23D2070D-E4AD-4ADD-85A7-083D9C76AD49}.Release|x64.ActiveCfg = Release|x64 {23D2070D-E4AD-4ADD-85A7-083D9C76AD49}.Release|x64.Build.0 = Release|x64 + {62173D9A-6724-4C00-A1C8-FB646480A9EC}.Debug|Any CPU.ActiveCfg = Debug|x64 {62173D9A-6724-4C00-A1C8-FB646480A9EC}.Debug|x64.ActiveCfg = Debug|x64 {62173D9A-6724-4C00-A1C8-FB646480A9EC}.Debug|x64.Build.0 = Debug|x64 + {62173D9A-6724-4C00-A1C8-FB646480A9EC}.Release|Any CPU.ActiveCfg = Release|x64 {62173D9A-6724-4C00-A1C8-FB646480A9EC}.Release|x64.ActiveCfg = Release|x64 {62173D9A-6724-4C00-A1C8-FB646480A9EC}.Release|x64.Build.0 = Release|x64 + {5E7360A8-D048-4ED3-8F09-0BFD64C5529A}.Debug|Any CPU.ActiveCfg = Debug|x64 + {5E7360A8-D048-4ED3-8F09-0BFD64C5529A}.Debug|x64.ActiveCfg = Debug|x64 + {5E7360A8-D048-4ED3-8F09-0BFD64C5529A}.Debug|x64.Build.0 = Debug|x64 + {5E7360A8-D048-4ED3-8F09-0BFD64C5529A}.Release|Any CPU.ActiveCfg = Release|x64 + {5E7360A8-D048-4ED3-8F09-0BFD64C5529A}.Release|x64.ActiveCfg = Release|x64 + {5E7360A8-D048-4ED3-8F09-0BFD64C5529A}.Release|x64.Build.0 = Release|x64 + {3B77A64A-8005-4D43-B31A-F692E213BAE4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3B77A64A-8005-4D43-B31A-F692E213BAE4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3B77A64A-8005-4D43-B31A-F692E213BAE4}.Debug|x64.ActiveCfg = Debug|Any CPU + {3B77A64A-8005-4D43-B31A-F692E213BAE4}.Debug|x64.Build.0 = Debug|Any CPU + {3B77A64A-8005-4D43-B31A-F692E213BAE4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3B77A64A-8005-4D43-B31A-F692E213BAE4}.Release|Any CPU.Build.0 = Release|Any CPU + {3B77A64A-8005-4D43-B31A-F692E213BAE4}.Release|x64.ActiveCfg = Release|Any CPU + {3B77A64A-8005-4D43-B31A-F692E213BAE4}.Release|x64.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -761,6 +949,9 @@ Global {8DF78B53-200E-451F-9328-01EB907193AE} = {38BDB927-829B-4C65-9CD9-93FB05D66D65} {23D2070D-E4AD-4ADD-85A7-083D9C76AD49} = {38BDB927-829B-4C65-9CD9-93FB05D66D65} {62173D9A-6724-4C00-A1C8-FB646480A9EC} = {38BDB927-829B-4C65-9CD9-93FB05D66D65} + {127F38E0-40AA-4594-B955-5616BF206882} = {4574FDD0-F61D-4376-98BF-E5A1262C11EC} + {5E7360A8-D048-4ED3-8F09-0BFD64C5529A} = {127F38E0-40AA-4594-B955-5616BF206882} + {3B77A64A-8005-4D43-B31A-F692E213BAE4} = {127F38E0-40AA-4594-B955-5616BF206882} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {C3A2F9D1-7930-4EF4-A6FC-7EE0A99821D0} From 994af18770243f7dc73c7f4d4dcf48404457e397 Mon Sep 17 00:00:00 2001 From: Den Delimarsky <1389609+dend@users.noreply.github.com> Date: Wed, 28 Apr 2021 20:03:18 -0700 Subject: [PATCH 30/81] Remove unnecessary using --- src/modules/espresso/Espresso.Shell/Program.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/src/modules/espresso/Espresso.Shell/Program.cs b/src/modules/espresso/Espresso.Shell/Program.cs index 180159a88c..79e295c7fd 100644 --- a/src/modules/espresso/Espresso.Shell/Program.cs +++ b/src/modules/espresso/Espresso.Shell/Program.cs @@ -12,7 +12,6 @@ using System.IO; using System.Linq; using System.Reactive.Concurrency; using System.Reactive.Linq; -using System.Runtime.Caching; using System.Threading; namespace Espresso.Shell From 8496b1dc094b9c2be28b9cafa9cb60be217cf861 Mon Sep 17 00:00:00 2001 From: Den Delimarsky <1389609+dend@users.noreply.github.com> Date: Thu, 29 Apr 2021 08:02:24 -0700 Subject: [PATCH 31/81] Updating how we handle logging. Instead of using Console.WriteLine for everything, I decided that it's time to switch to a more mature logging platform. This will enable me to better track any kinds of issues, and make sure that there is an actual log file that lives outside the console that I can use for diagnostics. --- .../espresso/Espresso.Shell/Core/APIHelper.cs | 13 +++- .../Espresso.Shell/Espresso.Shell.csproj | 15 +++- .../espresso/Espresso.Shell/NLog.config | 14 ++++ .../espresso/Espresso.Shell/Program.cs | 68 +++++++++++++------ 4 files changed, 85 insertions(+), 25 deletions(-) create mode 100644 src/modules/espresso/Espresso.Shell/NLog.config diff --git a/src/modules/espresso/Espresso.Shell/Core/APIHelper.cs b/src/modules/espresso/Espresso.Shell/Core/APIHelper.cs index 12454cafbf..824a492e16 100644 --- a/src/modules/espresso/Espresso.Shell/Core/APIHelper.cs +++ b/src/modules/espresso/Espresso.Shell/Core/APIHelper.cs @@ -2,6 +2,7 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using NLog; using System; using System.Runtime.InteropServices; using System.Threading; @@ -27,6 +28,13 @@ namespace Espresso.Shell.Core private static CancellationTokenSource TokenSource = new CancellationTokenSource(); private static CancellationToken ThreadToken; + private static Logger log; + + static APIHelper() + { + log = LogManager.GetCurrentClassLogger(); + } + // More details about the API used: https://docs.microsoft.com/windows/win32/api/winbase/nf-winbase-setthreadexecutionstate [DllImport("kernel32.dll", CharSet = CharSet.Auto, SetLastError = true)] static extern EXECUTION_STATE SetThreadExecutionState(EXECUTION_STATE esFlags); @@ -44,7 +52,6 @@ namespace Espresso.Shell.Core { var stateResult = SetThreadExecutionState(state); bool stateSettingSucceeded = (stateResult != 0); - Console.WriteLine($"State setting result: {stateResult}"); if (stateSettingSucceeded) { @@ -103,7 +110,7 @@ namespace Espresso.Shell.Core success = SetAwakeState(EXECUTION_STATE.ES_SYSTEM_REQUIRED | EXECUTION_STATE.ES_DISPLAY_REQUIRED | EXECUTION_STATE.ES_CONTINUOUS); if (success) { - Console.WriteLine("Timed keep-awake with display on."); + log.Info("Timed keep-awake with display on."); var startTime = DateTime.UtcNow; while (DateTime.UtcNow - startTime < TimeSpan.FromSeconds(seconds)) { @@ -124,7 +131,7 @@ namespace Espresso.Shell.Core success = SetAwakeState(EXECUTION_STATE.ES_SYSTEM_REQUIRED | EXECUTION_STATE.ES_CONTINUOUS); if (success) { - Console.WriteLine("Timed keep-awake with display off."); + log.Info("Timed keep-awake with display off."); var startTime = DateTime.UtcNow; while (DateTime.UtcNow - startTime < TimeSpan.FromSeconds(seconds)) { diff --git a/src/modules/espresso/Espresso.Shell/Espresso.Shell.csproj b/src/modules/espresso/Espresso.Shell/Espresso.Shell.csproj index 8e140bda75..1fbdc1b64c 100644 --- a/src/modules/espresso/Espresso.Shell/Espresso.Shell.csproj +++ b/src/modules/espresso/Espresso.Shell/Espresso.Shell.csproj @@ -1,4 +1,4 @@ - + Exe @@ -7,9 +7,22 @@ + + + + Never + + + + + + PreserveNewest + + + diff --git a/src/modules/espresso/Espresso.Shell/NLog.config b/src/modules/espresso/Espresso.Shell/NLog.config new file mode 100644 index 0000000000..ffaa395d61 --- /dev/null +++ b/src/modules/espresso/Espresso.Shell/NLog.config @@ -0,0 +1,14 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/modules/espresso/Espresso.Shell/Program.cs b/src/modules/espresso/Espresso.Shell/Program.cs index 79e295c7fd..5be5ca5929 100644 --- a/src/modules/espresso/Espresso.Shell/Program.cs +++ b/src/modules/espresso/Espresso.Shell/Program.cs @@ -5,13 +5,16 @@ using Espresso.Shell.Core; using Espresso.Shell.Models; using Newtonsoft.Json; +using NLog; using System; using System.CommandLine; using System.CommandLine.Invocation; +using System.Diagnostics; using System.IO; using System.Linq; using System.Reactive.Concurrency; using System.Reactive.Linq; +using System.Reflection; using System.Threading; namespace Espresso.Shell @@ -23,6 +26,8 @@ namespace Espresso.Shell private static FileSystemWatcher watcher = null; public static Mutex Mutex { get => mutex; set => mutex = value; } + private static Logger log; + static int Main(string[] args) { bool instantiated; @@ -33,7 +38,10 @@ namespace Espresso.Shell ForceExit(appName + " is already running! Exiting the application.", 1); } - Console.WriteLine("Espresso - Computer Caffeination Engine"); + log = LogManager.GetCurrentClassLogger(); + + log.Info("Launching Espresso..."); + log.Info(FileVersionInfo.GetVersionInfo(Assembly.GetExecutingAssembly().Location).FileVersion); var configOption = new Option( aliases: new[] { "--config", "-c" }, @@ -90,15 +98,16 @@ namespace Espresso.Shell private static void ForceExit(string message, int exitCode) { - Console.WriteLine(message); + log.Debug(message); + log.Info(message); Console.ReadKey(); Environment.Exit(exitCode); } private static void HandleCommandLineArguments(string config, bool displayOn, long timeLimit) { - Console.WriteLine($"The value for --display-on is: {displayOn}"); - Console.WriteLine($"The value for --time-limit is: {timeLimit}"); + log.Info($"The value for --display-on is: {displayOn}"); + log.Info($"The value for --time-limit is: {timeLimit}"); if (!string.IsNullOrWhiteSpace(config)) { @@ -129,7 +138,9 @@ namespace Espresso.Shell } catch (Exception ex) { - Console.WriteLine($"There was a problem with the configuration file. Make sure it exists.\n{ex.Message}"); + var errorString = $"There was a problem with the configuration file. Make sure it exists.\n{ex.Message}"; + log.Info(errorString); + log.Debug(errorString); } } else @@ -140,11 +151,13 @@ namespace Espresso.Shell bool success = APIHelper.SetIndefiniteKeepAwake(displayOn); if (success) { - Console.WriteLine($"Currently in indefinite keep awake. Display always on: {displayOn}"); + log.Info($"Currently in indefinite keep awake. Display always on: {displayOn}"); } else { - Console.WriteLine("Could not set up the state to be indefinite keep awake."); + var errorMessage = "Could not set up the state to be indefinite keep awake."; + log.Info(errorMessage); + log.Debug(errorMessage); } } else @@ -159,9 +172,9 @@ namespace Espresso.Shell private static void HandleEspressoConfigChange(FileSystemEventArgs fileEvent) { - Console.WriteLine("Resetting keep-awake to normal state due to settings change."); + log.Info("Detected a settings file change. Updating configuration..."); + log.Info("Resetting keep-awake to normal state due to settings change."); ResetNormalPowerState(); - Console.WriteLine("Detected a file change. Reacting..."); ProcessSettings(fileEvent.FullPath); } @@ -185,7 +198,6 @@ namespace Espresso.Shell // If the settings were successfully processed, we need to set the right mode of operation. // INDEFINITE = 0 // TIMED = 1 - switch (settings.Properties.Mode) { case 0: @@ -194,11 +206,13 @@ namespace Espresso.Shell bool success = APIHelper.SetIndefiniteKeepAwake(settings.Properties.KeepDisplayOn.Value); if (success) { - Console.WriteLine($"Currently in indefinite keep awake. Display always on: {settings.Properties.KeepDisplayOn.Value}"); + log.Info($"Indefinite keep-awake. Display always on: {settings.Properties.KeepDisplayOn.Value}"); } else { - Console.WriteLine("Could not set up the state to be indefinite keep awake."); + var errorMessage = "Could not set up the state to be indefinite keep-awake."; + log.Info(errorMessage); + log.Debug(errorMessage); } break; } @@ -206,7 +220,7 @@ namespace Espresso.Shell { // Timed keep-awake. long computedTime = (settings.Properties.Hours.Value * 60 * 60) + (settings.Properties.Minutes.Value * 60); - Console.WriteLine($"In timed keep-awake mode. Expecting to be awake for {computedTime} seconds."); + log.Info($"Timed keep-awake. Expected runtime: {computedTime} seconds."); APIHelper.SetTimedKeepAwake(computedTime, LogTimedKeepAwakeCompletion, LogUnexpectedOrCancelledKeepAwakeCompletion, settings.Properties.KeepDisplayOn.Value); @@ -214,35 +228,45 @@ namespace Espresso.Shell } default: { - Console.WriteLine("Unknown mode of operation. Check config file."); + var errorMessage= "Unknown mode of operation. Check config file."; + log.Info(errorMessage); + log.Debug(errorMessage); break; } } } else { - Console.WriteLine("Settings are null."); + var errorMessage = "Settings are null."; + log.Info(errorMessage); + log.Debug(errorMessage); } } else { - Console.WriteLine("Could not get handle on file."); + var errorMessage = "Could not get handle on file."; + log.Info(errorMessage); + log.Debug(errorMessage); } } catch (Exception ex) { - Console.WriteLine($"There was a problem reading the configuration file.\n{ex.Message}"); + var errorMessage = $"There was a problem reading the configuration file.\n{ex.Message}"; + log.Info(errorMessage); + log.Debug(errorMessage); } } private static void LogUnexpectedOrCancelledKeepAwakeCompletion() { - Console.Write("The keep-awake thread was terminated early."); + var errorMessage = "The keep-awake thread was terminated early."; + log.Info(errorMessage); + log.Debug(errorMessage); } private static void LogTimedKeepAwakeCompletion(bool result) { - Console.Write($"Completed timed keep-awake successfully: {result}"); + log.Info($"Completed timed keep-awake successfully: {result}"); } private static void ResetNormalPowerState() @@ -250,11 +274,13 @@ namespace Espresso.Shell bool success = APIHelper.SetNormalKeepAwake(); if (success) { - Console.WriteLine("Returned to normal keep-awake state."); + log.Info("Returned to normal keep-awake state."); } else { - Console.WriteLine("Could not return to normal keep-awake state."); + var errorMessage = "Could not return to normal keep-awake state."; + log.Info(errorMessage); + log.Debug(errorMessage); } } } From d3face8664a1e8d37550e182901d2b7215be6f6d Mon Sep 17 00:00:00 2001 From: Den Delimarsky <1389609+dend@users.noreply.github.com> Date: Thu, 29 Apr 2021 08:18:35 -0700 Subject: [PATCH 32/81] Improved logging for better diagnostics --- .../espresso/Espresso.Shell/Core/APIHelper.cs | 19 +++++++++++++++++++ .../Espresso.Shell/Espresso.Shell.csproj | 1 + .../espresso/Espresso.Shell/Program.cs | 6 +++++- 3 files changed, 25 insertions(+), 1 deletion(-) diff --git a/src/modules/espresso/Espresso.Shell/Core/APIHelper.cs b/src/modules/espresso/Espresso.Shell/Core/APIHelper.cs index 824a492e16..16f72bee5a 100644 --- a/src/modules/espresso/Espresso.Shell/Core/APIHelper.cs +++ b/src/modules/espresso/Espresso.Shell/Core/APIHelper.cs @@ -2,6 +2,7 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using Microsoft.Win32; using NLog; using System; using System.Runtime.InteropServices; @@ -25,6 +26,8 @@ namespace Espresso.Shell.Core /// public class APIHelper { + private const string BUILD_REGISTRY_LOCATION = @"SOFTWARE\Microsoft\Windows NT\CurrentVersion"; + private static CancellationTokenSource TokenSource = new CancellationTokenSource(); private static CancellationToken ThreadToken; @@ -154,5 +157,21 @@ namespace Espresso.Shell.Core return success; } } + + public static string GetOperatingSystemBuild() + { + try + { + RegistryKey registryKey = Registry.LocalMachine.OpenSubKey(BUILD_REGISTRY_LOCATION); + + var versionString = $"{registryKey.GetValue("ProductName")} {registryKey.GetValue("DisplayVersion")} {registryKey.GetValue("BuildLabEx")}"; + return versionString; + } + catch (Exception ex) + { + log.Debug($"Could not get registry key for the build number. Error: {ex.Message}"); + return string.Empty; + } + } } } diff --git a/src/modules/espresso/Espresso.Shell/Espresso.Shell.csproj b/src/modules/espresso/Espresso.Shell/Espresso.Shell.csproj index 1fbdc1b64c..04aba56431 100644 --- a/src/modules/espresso/Espresso.Shell/Espresso.Shell.csproj +++ b/src/modules/espresso/Espresso.Shell/Espresso.Shell.csproj @@ -6,6 +6,7 @@ + diff --git a/src/modules/espresso/Espresso.Shell/Program.cs b/src/modules/espresso/Espresso.Shell/Program.cs index 5be5ca5929..2211dc1a55 100644 --- a/src/modules/espresso/Espresso.Shell/Program.cs +++ b/src/modules/espresso/Espresso.Shell/Program.cs @@ -42,6 +42,8 @@ namespace Espresso.Shell log.Info("Launching Espresso..."); log.Info(FileVersionInfo.GetVersionInfo(Assembly.GetExecutingAssembly().Location).FileVersion); + log.Debug($"OS: {Environment.OSVersion}"); + log.Debug($"OS Build: {APIHelper.GetOperatingSystemBuild()}"); var configOption = new Option( aliases: new[] { "--config", "-c" }, @@ -106,6 +108,7 @@ namespace Espresso.Shell private static void HandleCommandLineArguments(string config, bool displayOn, long timeLimit) { + log.Info($"The value for --config is: {config}"); log.Info($"The value for --display-on is: {displayOn}"); log.Info($"The value for --time-limit is: {timeLimit}"); @@ -251,9 +254,10 @@ namespace Espresso.Shell } catch (Exception ex) { - var errorMessage = $"There was a problem reading the configuration file.\n{ex.Message}"; + var errorMessage = $"There was a problem reading the configuration file. Error: {ex.Message}"; log.Info(errorMessage); log.Debug(errorMessage); + log.Debug($"Configuration path: {fullPath}"); } } From 45e24a26056589d46fb1fb8c0f301c57a4bb4188 Mon Sep 17 00:00:00 2001 From: Den Delimarsky <1389609+dend@users.noreply.github.com> Date: Sat, 1 May 2021 09:36:24 -0700 Subject: [PATCH 33/81] Remove redundant assignment --- src/modules/espresso/Espresso.Shell/Core/SettingsHelper.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/modules/espresso/Espresso.Shell/Core/SettingsHelper.cs b/src/modules/espresso/Espresso.Shell/Core/SettingsHelper.cs index 2960155d1d..1275c459ff 100644 --- a/src/modules/espresso/Espresso.Shell/Core/SettingsHelper.cs +++ b/src/modules/espresso/Espresso.Shell/Core/SettingsHelper.cs @@ -18,10 +18,9 @@ namespace Espresso.Shell.Core { for (int i = 0; i < retries; i++) { - FileStream fileStream = null; try { - fileStream = new FileStream(path, FileMode.Open, FileAccess.Read, FileShare.None); + FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read, FileShare.None); return fileStream; } catch (IOException ex) From a13a5fde847aee0c577db3b2f1db5ed4df8b3ed1 Mon Sep 17 00:00:00 2001 From: Den Delimarsky <1389609+dend@users.noreply.github.com> Date: Sat, 1 May 2021 09:41:22 -0700 Subject: [PATCH 34/81] Fix logging for background thread --- src/modules/espresso/Espresso.Shell/Core/APIHelper.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/espresso/Espresso.Shell/Core/APIHelper.cs b/src/modules/espresso/Espresso.Shell/Core/APIHelper.cs index 16f72bee5a..0e2af67c9d 100644 --- a/src/modules/espresso/Espresso.Shell/Core/APIHelper.cs +++ b/src/modules/espresso/Espresso.Shell/Core/APIHelper.cs @@ -105,7 +105,6 @@ namespace Espresso.Shell.Core // In case cancellation was already requested. //ThreadToken.ThrowIfCancellationRequested(); - try { if (keepDisplayOn) @@ -153,6 +152,7 @@ namespace Espresso.Shell.Core } catch (OperationCanceledException ex) { + log.Debug($"Background thread termination. Message: {ex.Message}"); // Task was clearly cancelled. return success; } From 75ed9c7b12118ba65267991cceaaf1ccc842362f Mon Sep 17 00:00:00 2001 From: Den Delimarsky <1389609+dend@users.noreply.github.com> Date: Sat, 1 May 2021 10:32:36 -0700 Subject: [PATCH 35/81] Adding code to launch Espresso --- src/common/SettingsAPI/settings_helpers.h | 1 + .../espresso/Espresso.Shell/Core/APIHelper.cs | 2 +- src/modules/espresso/Espresso/dllmain.cpp | 64 +++++++++++++++---- src/modules/espresso/Espresso/pch.h | 1 - 4 files changed, 53 insertions(+), 15 deletions(-) diff --git a/src/common/SettingsAPI/settings_helpers.h b/src/common/SettingsAPI/settings_helpers.h index 1174032fe2..cd8f39432b 100644 --- a/src/common/SettingsAPI/settings_helpers.h +++ b/src/common/SettingsAPI/settings_helpers.h @@ -8,6 +8,7 @@ namespace PTSettingsHelper { constexpr inline const wchar_t* log_settings_filename = L"log_settings.json"; + std::wstring get_module_save_file_location(std::wstring_view powertoy_key); std::wstring get_module_save_folder_location(std::wstring_view powertoy_name); std::wstring get_root_save_folder_location(); diff --git a/src/modules/espresso/Espresso.Shell/Core/APIHelper.cs b/src/modules/espresso/Espresso.Shell/Core/APIHelper.cs index 0e2af67c9d..5d947f359c 100644 --- a/src/modules/espresso/Espresso.Shell/Core/APIHelper.cs +++ b/src/modules/espresso/Espresso.Shell/Core/APIHelper.cs @@ -152,8 +152,8 @@ namespace Espresso.Shell.Core } catch (OperationCanceledException ex) { - log.Debug($"Background thread termination. Message: {ex.Message}"); // Task was clearly cancelled. + log.Debug($"Background thread termination. Message: {ex.Message}"); return success; } } diff --git a/src/modules/espresso/Espresso/dllmain.cpp b/src/modules/espresso/Espresso/dllmain.cpp index 863c337105..f285318e84 100644 --- a/src/modules/espresso/Espresso/dllmain.cpp +++ b/src/modules/espresso/Espresso/dllmain.cpp @@ -44,16 +44,6 @@ const static wchar_t* MODULE_DESC = L""; // These are the properties shown in the Settings page. struct ModuleSettings { - // Add the PowerToy module properties with default values. - // Currently available types: - // - int - // - bool - // - string - - //bool bool_prop = true; - //int int_prop = 10; - //std::wstring string_prop = L"The quick brown fox jumps over the lazy dog"; - //std::wstring color_prop = L"#1212FF"; } g_settings; @@ -68,9 +58,48 @@ private: // The PowerToy state. bool m_enabled = false; + HANDLE m_hProcess; + + HANDLE send_telemetry_event; + + // Handle to event used to invoke Espresso + HANDLE m_hInvokeEvent; + // Load initial settings from the persisted values. void init_settings(); + bool is_process_running() + { + return WaitForSingleObject(m_hProcess, 0) == WAIT_TIMEOUT; + } + + void launch_process() + { + Logger::trace(L"Launching Espresso process"); + unsigned long powertoys_pid = GetCurrentProcessId(); + + // Get the configuration file that will be passed to the process. + std::wstring espresso_settings_location = PTSettingsHelper::get_module_save_file_location(MODULE_NAME); + + std::wstring executable_args = L"--config " + espresso_settings_location; + executable_args.append(std::to_wstring(powertoys_pid)); + + SHELLEXECUTEINFOW sei{ sizeof(sei) }; + sei.fMask = { SEE_MASK_NOCLOSEPROCESS | SEE_MASK_FLAG_NO_UI }; + sei.lpFile = L"modules\\Espresso\\Espresso.exe"; + sei.nShow = SW_SHOWNORMAL; + sei.lpParameters = executable_args.data(); + if (!ShellExecuteExW(&sei)) + { + DWORD error = GetLastError(); + std::wstring message = L"Espresso failed to start with error = "; + message += std::to_wstring(error); + Logger::error(message); + } + + m_hProcess = sei.hProcess; + } + public: // Constructor Espresso() @@ -96,6 +125,7 @@ public: return MODULE_NAME; } + //// Return array of the names of all events that this powertoy listens for, with //// nullptr as the last element of the array. Nullptr can also be retured for empty //// list. @@ -239,15 +269,23 @@ public: } } - // Enable the powertoy virtual void enable() { + ResetEvent(send_telemetry_event); + ResetEvent(m_hInvokeEvent); + launch_process(); m_enabled = true; - } + }; - // Disable the powertoy virtual void disable() { + if (m_enabled) + { + ResetEvent(send_telemetry_event); + ResetEvent(m_hInvokeEvent); + TerminateProcess(m_hProcess, 1); + } + m_enabled = false; } diff --git a/src/modules/espresso/Espresso/pch.h b/src/modules/espresso/Espresso/pch.h index 46fc911b44..eddac0fdc1 100644 --- a/src/modules/espresso/Espresso/pch.h +++ b/src/modules/espresso/Espresso/pch.h @@ -1,4 +1,3 @@ -#pragma once #define WIN32_LEAN_AND_MEAN #include #include From 7f5558bd8aebb26d68d0bb5f49dcfc4f1f20ad96 Mon Sep 17 00:00:00 2001 From: Den Delimarsky <1389609+dend@users.noreply.github.com> Date: Sat, 1 May 2021 11:04:47 -0700 Subject: [PATCH 36/81] Update project configuration --- PowerToys.sln | 4 +-- .../espresso/Espresso.Shell/Core/APIHelper.cs | 14 +++++++-- .../Espresso.Shell/Core/SettingsHelper.cs | 2 +- .../Espresso.Shell/Espresso.Shell.csproj | 29 +++++++++++++++++++ .../Models/EspressoSettingsModel.cs | 14 ++++----- .../espresso/Espresso.Shell/Program.cs | 12 ++++++-- 6 files changed, 60 insertions(+), 15 deletions(-) diff --git a/PowerToys.sln b/PowerToys.sln index d7a7bfc47f..c379a605d4 100644 --- a/PowerToys.sln +++ b/PowerToys.sln @@ -844,8 +844,8 @@ Global {5E7360A8-D048-4ED3-8F09-0BFD64C5529A}.Release|x64.Build.0 = Release|x64 {3B77A64A-8005-4D43-B31A-F692E213BAE4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {3B77A64A-8005-4D43-B31A-F692E213BAE4}.Debug|Any CPU.Build.0 = Debug|Any CPU - {3B77A64A-8005-4D43-B31A-F692E213BAE4}.Debug|x64.ActiveCfg = Debug|Any CPU - {3B77A64A-8005-4D43-B31A-F692E213BAE4}.Debug|x64.Build.0 = Debug|Any CPU + {3B77A64A-8005-4D43-B31A-F692E213BAE4}.Debug|x64.ActiveCfg = Debug|x64 + {3B77A64A-8005-4D43-B31A-F692E213BAE4}.Debug|x64.Build.0 = Debug|x64 {3B77A64A-8005-4D43-B31A-F692E213BAE4}.Release|Any CPU.ActiveCfg = Release|Any CPU {3B77A64A-8005-4D43-B31A-F692E213BAE4}.Release|Any CPU.Build.0 = Release|Any CPU {3B77A64A-8005-4D43-B31A-F692E213BAE4}.Release|x64.ActiveCfg = Release|Any CPU diff --git a/src/modules/espresso/Espresso.Shell/Core/APIHelper.cs b/src/modules/espresso/Espresso.Shell/Core/APIHelper.cs index 5d947f359c..e0c96ad75c 100644 --- a/src/modules/espresso/Espresso.Shell/Core/APIHelper.cs +++ b/src/modules/espresso/Espresso.Shell/Core/APIHelper.cs @@ -162,10 +162,20 @@ namespace Espresso.Shell.Core { try { +#pragma warning disable CS8600 // Converting null literal or possible null value to non-nullable type. RegistryKey registryKey = Registry.LocalMachine.OpenSubKey(BUILD_REGISTRY_LOCATION); +#pragma warning restore CS8600 // Converting null literal or possible null value to non-nullable type. - var versionString = $"{registryKey.GetValue("ProductName")} {registryKey.GetValue("DisplayVersion")} {registryKey.GetValue("BuildLabEx")}"; - return versionString; + if (registryKey != null) + { + var versionString = $"{registryKey.GetValue("ProductName")} {registryKey.GetValue("DisplayVersion")} {registryKey.GetValue("BuildLabEx")}"; + return versionString; + } + else + { + log.Debug("Registry key acquisition for OS failed."); + return string.Empty; + } } catch (Exception ex) { diff --git a/src/modules/espresso/Espresso.Shell/Core/SettingsHelper.cs b/src/modules/espresso/Espresso.Shell/Core/SettingsHelper.cs index 1275c459ff..3a3aabd2f9 100644 --- a/src/modules/espresso/Espresso.Shell/Core/SettingsHelper.cs +++ b/src/modules/espresso/Espresso.Shell/Core/SettingsHelper.cs @@ -14,7 +14,7 @@ namespace Espresso.Shell.Core const int ERROR_SHARING_VIOLATION = 32; const int ERROR_LOCK_VIOLATION = 33; - public static FileStream GetSettingsFile(string path, int retries) + public static FileStream? GetSettingsFile(string path, int retries) { for (int i = 0; i < retries; i++) { diff --git a/src/modules/espresso/Espresso.Shell/Espresso.Shell.csproj b/src/modules/espresso/Espresso.Shell/Espresso.Shell.csproj index 04aba56431..4e2bd2fb4c 100644 --- a/src/modules/espresso/Espresso.Shell/Espresso.Shell.csproj +++ b/src/modules/espresso/Espresso.Shell/Espresso.Shell.csproj @@ -3,6 +3,35 @@ Exe netcoreapp3.1 + $(SolutionDir)$(Platform)\$(Configuration)\modules\Espresso + enable + AnyCPU;x64 + false + false + + + + ..\..\..\..\$(Platform)\$(Configuration)\modules\Espresso\ + DEBUG;TRACE + full + x64 + prompt + MinimumRecommendedRules.ruleset + 4 + false + true + + + + ..\..\..\..\$(Platform)\$(Configuration)\modules\Espresso\ + TRACE;RELEASE + true + pdbonly + x64 + prompt + MinimumRecommendedRules.ruleset + 4 + true diff --git a/src/modules/espresso/Espresso.Shell/Models/EspressoSettingsModel.cs b/src/modules/espresso/Espresso.Shell/Models/EspressoSettingsModel.cs index cb005bbc0c..8925fac979 100644 --- a/src/modules/espresso/Espresso.Shell/Models/EspressoSettingsModel.cs +++ b/src/modules/espresso/Espresso.Shell/Models/EspressoSettingsModel.cs @@ -9,23 +9,23 @@ namespace Espresso.Shell.Models public class EspressoSettingsModel { [JsonProperty("properties")] - public Properties Properties { get; set; } + public Properties? Properties { get; set; } [JsonProperty("name")] - public string Name { get; set; } + public string? Name { get; set; } [JsonProperty("version")] - public string Version { get; set; } + public string? Version { get; set; } } public class Properties { [JsonProperty("espresso_keep_display_on")] - public KeepDisplayOn KeepDisplayOn { get; set; } + public KeepDisplayOn? KeepDisplayOn { get; set; } [JsonProperty("espresso_mode")] - public int Mode { get; set; } + public int? Mode { get; set; } [JsonProperty("espresso_hours")] - public Hours Hours { get; set; } + public Hours? Hours { get; set; } [JsonProperty("espresso_minutes")] - public Minutes Minutes { get; set; } + public Minutes? Minutes { get; set; } } public class KeepDisplayOn diff --git a/src/modules/espresso/Espresso.Shell/Program.cs b/src/modules/espresso/Espresso.Shell/Program.cs index 2211dc1a55..91393ea80e 100644 --- a/src/modules/espresso/Espresso.Shell/Program.cs +++ b/src/modules/espresso/Espresso.Shell/Program.cs @@ -17,16 +17,21 @@ using System.Reactive.Linq; using System.Reflection; using System.Threading; +#pragma warning disable CS8602 // Dereference of a possibly null reference. +#pragma warning disable CS8600 // Converting null literal or possible null value to non-nullable type. +#pragma warning disable CS8603 // Possible null reference return. + namespace Espresso.Shell { class Program { - private static Mutex mutex = null; + private static Mutex? mutex = null; private const string appName = "Espresso"; - private static FileSystemWatcher watcher = null; + private static FileSystemWatcher? watcher = null; + public static Mutex Mutex { get => mutex; set => mutex = value; } - private static Logger log; + private static Logger? log; static int Main(string[] args) { @@ -193,6 +198,7 @@ namespace Espresso.Shell using (fileStream) { using StreamReader reader = new StreamReader(fileStream); + settings = JsonConvert.DeserializeObject(reader.ReadToEnd()); } From a458aba2d3497af80a72d38f41e0466fd98f659d Mon Sep 17 00:00:00 2001 From: Den Delimarsky <1389609+dend@users.noreply.github.com> Date: Sat, 1 May 2021 11:25:06 -0700 Subject: [PATCH 37/81] Update launch settings --- src/modules/espresso/Espresso/dllmain.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/espresso/Espresso/dllmain.cpp b/src/modules/espresso/Espresso/dllmain.cpp index f285318e84..6b7b897ceb 100644 --- a/src/modules/espresso/Espresso/dllmain.cpp +++ b/src/modules/espresso/Espresso/dllmain.cpp @@ -82,11 +82,11 @@ private: std::wstring espresso_settings_location = PTSettingsHelper::get_module_save_file_location(MODULE_NAME); std::wstring executable_args = L"--config " + espresso_settings_location; - executable_args.append(std::to_wstring(powertoys_pid)); + //executable_args.append(std::to_wstring(powertoys_pid)); SHELLEXECUTEINFOW sei{ sizeof(sei) }; sei.fMask = { SEE_MASK_NOCLOSEPROCESS | SEE_MASK_FLAG_NO_UI }; - sei.lpFile = L"modules\\Espresso\\Espresso.exe"; + sei.lpFile = L"modules\\Espresso\\Espresso.Shell.exe"; sei.nShow = SW_SHOWNORMAL; sei.lpParameters = executable_args.data(); if (!ShellExecuteExW(&sei)) From 9a009d63eb43dcc12dabc39902432b5017c87277 Mon Sep 17 00:00:00 2001 From: Den Delimarsky <1389609+dend@users.noreply.github.com> Date: Sat, 1 May 2021 13:15:06 -0700 Subject: [PATCH 38/81] Update binding --- .../Microsoft.PowerToys.Settings.UI/Views/EspressoPage.xaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/settings-ui/Microsoft.PowerToys.Settings.UI/Views/EspressoPage.xaml b/src/settings-ui/Microsoft.PowerToys.Settings.UI/Views/EspressoPage.xaml index bd4df2fcfa..6db360bcb4 100644 --- a/src/settings-ui/Microsoft.PowerToys.Settings.UI/Views/EspressoPage.xaml +++ b/src/settings-ui/Microsoft.PowerToys.Settings.UI/Views/EspressoPage.xaml @@ -65,7 +65,7 @@ Style="{StaticResource SettingsGroupTitleStyle}"/> + IsOn="{Binding KeepDisplayOn, Mode=TwoWay}" /> From 485c15e981899f3dc23b53584b281a57e1d5b041 Mon Sep 17 00:00:00 2001 From: Den Delimarsky <1389609+dend@users.noreply.github.com> Date: Sun, 2 May 2021 09:30:26 -0700 Subject: [PATCH 39/81] Fixing settings issue to make sure configuration can propagate. --- .../SndEspressoSettings.cs | 2 ++ .../ViewModels/EspressoViewModel.cs | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/settings-ui/Microsoft.PowerToys.Settings.UI.Library/SndEspressoSettings.cs b/src/settings-ui/Microsoft.PowerToys.Settings.UI.Library/SndEspressoSettings.cs index 84bfe09014..e9ccea662c 100644 --- a/src/settings-ui/Microsoft.PowerToys.Settings.UI.Library/SndEspressoSettings.cs +++ b/src/settings-ui/Microsoft.PowerToys.Settings.UI.Library/SndEspressoSettings.cs @@ -6,11 +6,13 @@ using System; using System.Collections.Generic; using System.Text; using System.Text.Json; +using System.Text.Json.Serialization; namespace Microsoft.PowerToys.Settings.UI.Library { public class SndEspressoSettings { + [JsonPropertyName("Espresso")] public EspressoSettings Settings { get; set; } public SndEspressoSettings() diff --git a/src/settings-ui/Microsoft.PowerToys.Settings.UI.Library/ViewModels/EspressoViewModel.cs b/src/settings-ui/Microsoft.PowerToys.Settings.UI.Library/ViewModels/EspressoViewModel.cs index c13222097f..0d4bef052d 100644 --- a/src/settings-ui/Microsoft.PowerToys.Settings.UI.Library/ViewModels/EspressoViewModel.cs +++ b/src/settings-ui/Microsoft.PowerToys.Settings.UI.Library/ViewModels/EspressoViewModel.cs @@ -118,7 +118,9 @@ namespace Microsoft.PowerToys.Settings.UI.Library.ViewModels { SndEspressoSettings outsettings = new SndEspressoSettings(Settings); SndModuleSettings ipcMessage = new SndModuleSettings(outsettings); - SendConfigMSG(ipcMessage.ToJsonString()); + + var targetMessage = ipcMessage.ToJsonString(); + SendConfigMSG(targetMessage); } } From 15df1a2f1db01dd779bfae7334a26daa2459a5ea Mon Sep 17 00:00:00 2001 From: Den Delimarsky <1389609+dend@users.noreply.github.com> Date: Sun, 2 May 2021 10:29:50 -0700 Subject: [PATCH 40/81] Update settings config. --- .../ViewModels/EspressoViewModel.cs | 16 +++++++ .../Converters/EspressoModeToBoolConverter.cs | 44 +++++++++++++++++++ .../EspressoModeToReverseBoolConverter.cs | 44 +++++++++++++++++++ .../Microsoft.PowerToys.Settings.UI.csproj | 2 + .../Views/EspressoPage.xaml | 14 ++++-- 5 files changed, 117 insertions(+), 3 deletions(-) create mode 100644 src/settings-ui/Microsoft.PowerToys.Settings.UI/Converters/EspressoModeToBoolConverter.cs create mode 100644 src/settings-ui/Microsoft.PowerToys.Settings.UI/Converters/EspressoModeToReverseBoolConverter.cs diff --git a/src/settings-ui/Microsoft.PowerToys.Settings.UI.Library/ViewModels/EspressoViewModel.cs b/src/settings-ui/Microsoft.PowerToys.Settings.UI.Library/ViewModels/EspressoViewModel.cs index 0d4bef052d..599e12bb74 100644 --- a/src/settings-ui/Microsoft.PowerToys.Settings.UI.Library/ViewModels/EspressoViewModel.cs +++ b/src/settings-ui/Microsoft.PowerToys.Settings.UI.Library/ViewModels/EspressoViewModel.cs @@ -63,6 +63,22 @@ namespace Microsoft.PowerToys.Settings.UI.Library.ViewModels } } + public EspressoMode Mode + { + get => _mode; + set + { + if (_mode != value) + { + _mode = value; + OnPropertyChanged(nameof(Mode)); + + Settings.Properties.Mode = value; + NotifyPropertyChanged(); + } + } + } + public bool KeepDisplayOn { get => _keepDisplayOn; diff --git a/src/settings-ui/Microsoft.PowerToys.Settings.UI/Converters/EspressoModeToBoolConverter.cs b/src/settings-ui/Microsoft.PowerToys.Settings.UI/Converters/EspressoModeToBoolConverter.cs new file mode 100644 index 0000000000..22bb728e21 --- /dev/null +++ b/src/settings-ui/Microsoft.PowerToys.Settings.UI/Converters/EspressoModeToBoolConverter.cs @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation +// The Microsoft Corporation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System; +using Microsoft.PowerToys.Settings.UI.Library; +using Windows.UI.Xaml.Data; + +namespace Microsoft.PowerToys.Settings.UI.Converters +{ + public sealed class EspressoModeToBoolConverter : IValueConverter + { + public object Convert(object value, Type targetType, object parameter, string language) + { + if (targetType != typeof(bool)) + { + throw new InvalidOperationException("The target type needs to be a boolean."); + } + + switch ((EspressoMode)value) + { + case EspressoMode.INDEFINITE: + return true; + case EspressoMode.TIMED: + return false; + } + + return false; + } + + public object ConvertBack(object value, Type targetType, object parameter, string language) + { + switch ((bool)value) + { + case true: + return EspressoMode.INDEFINITE; + case false: + return EspressoMode.TIMED; + } + + return EspressoMode.INDEFINITE; + } + } +} diff --git a/src/settings-ui/Microsoft.PowerToys.Settings.UI/Converters/EspressoModeToReverseBoolConverter.cs b/src/settings-ui/Microsoft.PowerToys.Settings.UI/Converters/EspressoModeToReverseBoolConverter.cs new file mode 100644 index 0000000000..c9af415458 --- /dev/null +++ b/src/settings-ui/Microsoft.PowerToys.Settings.UI/Converters/EspressoModeToReverseBoolConverter.cs @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation +// The Microsoft Corporation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System; +using Microsoft.PowerToys.Settings.UI.Library; +using Windows.UI.Xaml.Data; + +namespace Microsoft.PowerToys.Settings.UI.Converters +{ + public sealed class EspressoModeToReverseBoolConverter : IValueConverter + { + public object Convert(object value, Type targetType, object parameter, string language) + { + if (targetType != typeof(bool)) + { + throw new InvalidOperationException("The target type needs to be a boolean."); + } + + switch ((EspressoMode)value) + { + case EspressoMode.INDEFINITE: + return false; + case EspressoMode.TIMED: + return true; + } + + return false; + } + + public object ConvertBack(object value, Type targetType, object parameter, string language) + { + switch ((bool)value) + { + case false: + return EspressoMode.INDEFINITE; + case true: + return EspressoMode.TIMED; + } + + return EspressoMode.INDEFINITE; + } + } +} diff --git a/src/settings-ui/Microsoft.PowerToys.Settings.UI/Microsoft.PowerToys.Settings.UI.csproj b/src/settings-ui/Microsoft.PowerToys.Settings.UI/Microsoft.PowerToys.Settings.UI.csproj index 34d706754a..77aa5811fe 100644 --- a/src/settings-ui/Microsoft.PowerToys.Settings.UI/Microsoft.PowerToys.Settings.UI.csproj +++ b/src/settings-ui/Microsoft.PowerToys.Settings.UI/Microsoft.PowerToys.Settings.UI.csproj @@ -105,6 +105,8 @@ ShortcutVisualControl.xaml + + Code diff --git a/src/settings-ui/Microsoft.PowerToys.Settings.UI/Views/EspressoPage.xaml b/src/settings-ui/Microsoft.PowerToys.Settings.UI/Views/EspressoPage.xaml index 6db360bcb4..9f69ed35e0 100644 --- a/src/settings-ui/Microsoft.PowerToys.Settings.UI/Views/EspressoPage.xaml +++ b/src/settings-ui/Microsoft.PowerToys.Settings.UI/Views/EspressoPage.xaml @@ -5,7 +5,8 @@ xmlns:local="using:Microsoft.PowerToys.Settings.UI.Views" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" - xmlns:muxc="using:Microsoft.UI.Xaml.Controls" + xmlns:muxc="using:Microsoft.UI.Xaml.Controls" + xmlns:c="using:Microsoft.PowerToys.Settings.UI.Converters" xmlns:Custom="using:Microsoft.PowerToys.Settings.UI.Controls" xmlns:Color="using:Microsoft.PowerToys.Settings.UI.Library.ViewModels" xmlns:Interactivity="using:Microsoft.Xaml.Interactivity" xmlns:Core="using:Microsoft.Xaml.Interactions.Core" mc:Ignorable="d" @@ -14,6 +15,11 @@ Background="{ThemeResource ApplicationPageBackgroundThemeBrush}" AutomationProperties.LandmarkType="Main"> + + + + + @@ -70,7 +76,8 @@ + IsEnabled="{Binding IsEnabled}" + IsChecked="{Binding Mode, Mode=TwoWay, Converter={StaticResource EspressoModeToBoolConverter}}"> @@ -81,7 +88,8 @@ + IsEnabled="{Binding IsEnabled}" + IsChecked="{Binding Mode, Mode=TwoWay, Converter={StaticResource EspressoModeToReverseBoolConverter}}"> From 31ca8ff2ce8694bc2f31630875470dca5c2b73f0 Mon Sep 17 00:00:00 2001 From: Den Delimarsky <1389609+dend@users.noreply.github.com> Date: Sun, 2 May 2021 11:14:59 -0700 Subject: [PATCH 41/81] Fix binding --- .../Microsoft.PowerToys.Settings.UI/Views/EspressoPage.xaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/settings-ui/Microsoft.PowerToys.Settings.UI/Views/EspressoPage.xaml b/src/settings-ui/Microsoft.PowerToys.Settings.UI/Views/EspressoPage.xaml index 9f69ed35e0..3e2ac54be3 100644 --- a/src/settings-ui/Microsoft.PowerToys.Settings.UI/Views/EspressoPage.xaml +++ b/src/settings-ui/Microsoft.PowerToys.Settings.UI/Views/EspressoPage.xaml @@ -108,7 +108,7 @@ HorizontalAlignment="Left" Margin="{StaticResource SmallTopMargin}" MinWidth="90" - IsEnabled="{Binding IsEnabled}" + IsEnabled="{Binding Mode, Converter={StaticResource EspressoModeToReverseBoolConverter}}" SmallChange="1" LargeChange="5"/> From 33a81416fc1fd518a99c0b726164696f621e536b Mon Sep 17 00:00:00 2001 From: Den Delimarsky <1389609+dend@users.noreply.github.com> Date: Mon, 3 May 2021 08:04:53 -0700 Subject: [PATCH 42/81] Proper handling for PID binding Now Espresso can be connected directly to the PowerToys PID. --- .../Espresso.Shell/Espresso.Shell.csproj | 4 +++ .../espresso/Espresso.Shell/Program.cs | 30 +++++++++++++++++-- src/modules/espresso/Espresso/dllmain.cpp | 4 +-- 3 files changed, 33 insertions(+), 5 deletions(-) diff --git a/src/modules/espresso/Espresso.Shell/Espresso.Shell.csproj b/src/modules/espresso/Espresso.Shell/Espresso.Shell.csproj index 4e2bd2fb4c..ea61957bbd 100644 --- a/src/modules/espresso/Espresso.Shell/Espresso.Shell.csproj +++ b/src/modules/espresso/Espresso.Shell/Espresso.Shell.csproj @@ -43,6 +43,10 @@ + + + + Never diff --git a/src/modules/espresso/Espresso.Shell/Program.cs b/src/modules/espresso/Espresso.Shell/Program.cs index 91393ea80e..4e16cd1135 100644 --- a/src/modules/espresso/Espresso.Shell/Program.cs +++ b/src/modules/espresso/Espresso.Shell/Program.cs @@ -4,6 +4,7 @@ using Espresso.Shell.Core; using Espresso.Shell.Models; +using ManagedCommon; using Newtonsoft.Json; using NLog; using System; @@ -89,16 +90,30 @@ namespace Espresso.Shell timeOption.Required = false; + var powerToysPidOption = new Option( + aliases: new[] { "--ptpid", "-p" }, + getDefaultValue: () => 0, + description: "Reference to PowerToys PID, when executed under the application context.") + { + Argument = new Argument(() => 0) + { + Arity = ArgumentArity.ZeroOrOne, + }, + }; + + powerToysPidOption.Required = false; + var rootCommand = new RootCommand { configOption, displayOption, - timeOption + timeOption, + powerToysPidOption }; rootCommand.Description = appName; - rootCommand.Handler = CommandHandler.Create(HandleCommandLineArguments); + rootCommand.Handler = CommandHandler.Create(HandleCommandLineArguments); return rootCommand.InvokeAsync(args).Result; } @@ -111,11 +126,12 @@ namespace Espresso.Shell Environment.Exit(exitCode); } - private static void HandleCommandLineArguments(string config, bool displayOn, long timeLimit) + private static void HandleCommandLineArguments(string config, bool displayOn, long timeLimit, int ptpid) { log.Info($"The value for --config is: {config}"); log.Info($"The value for --display-on is: {displayOn}"); log.Info($"The value for --time-limit is: {timeLimit}"); + log.Info($"The value for --ptpid is: {ptpid}"); if (!string.IsNullOrWhiteSpace(config)) { @@ -150,6 +166,14 @@ namespace Espresso.Shell log.Info(errorString); log.Debug(errorString); } + + if (ptpid != 0) + { + RunnerHelper.WaitForPowerToysRunner(ptpid, () => + { + Environment.Exit(0); + }); + } } else { diff --git a/src/modules/espresso/Espresso/dllmain.cpp b/src/modules/espresso/Espresso/dllmain.cpp index 6b7b897ceb..1b877910a3 100644 --- a/src/modules/espresso/Espresso/dllmain.cpp +++ b/src/modules/espresso/Espresso/dllmain.cpp @@ -81,8 +81,8 @@ private: // Get the configuration file that will be passed to the process. std::wstring espresso_settings_location = PTSettingsHelper::get_module_save_file_location(MODULE_NAME); - std::wstring executable_args = L"--config " + espresso_settings_location; - //executable_args.append(std::to_wstring(powertoys_pid)); + std::wstring executable_args = L"--config " + espresso_settings_location + L" --ptpid " + std::to_wstring(powertoys_pid); + Logger::trace(L"Espresso launching with parameters: " + executable_args); SHELLEXECUTEINFOW sei{ sizeof(sei) }; sei.fMask = { SEE_MASK_NOCLOSEPROCESS | SEE_MASK_FLAG_NO_UI }; From ff1ca4dac1888862eb8ee159e18cd3b8e015849e Mon Sep 17 00:00:00 2001 From: Den Delimarsky <1389609+dend@users.noreply.github.com> Date: Tue, 4 May 2021 08:21:58 -0700 Subject: [PATCH 43/81] Working on putting together tray capabilities. --- .../Espresso.Shell/Core/TrayHelper.cs | 44 +++++++++++++++++++ .../Espresso.Shell/Espresso.Shell.csproj | 3 +- .../Models/EspressoSettingsModel.cs | 8 +++- .../espresso/Espresso.Shell/Program.cs | 34 +++++++------- src/modules/espresso/Espresso/dllmain.cpp | 2 +- 5 files changed, 71 insertions(+), 20 deletions(-) create mode 100644 src/modules/espresso/Espresso.Shell/Core/TrayHelper.cs diff --git a/src/modules/espresso/Espresso.Shell/Core/TrayHelper.cs b/src/modules/espresso/Espresso.Shell/Core/TrayHelper.cs new file mode 100644 index 0000000000..53e6a863b5 --- /dev/null +++ b/src/modules/espresso/Espresso.Shell/Core/TrayHelper.cs @@ -0,0 +1,44 @@ +using Espresso.Shell.Models; +using System; +using System.Collections.Generic; +using System.Drawing; +using System.Text; +using System.Windows.Forms; + +namespace Espresso.Shell.Core +{ + internal static class TrayHelper + { + static NotifyIcon trayIcon; + static TrayHelper() + { + trayIcon = new NotifyIcon(); + } + + private static void InitializeTrayIcon(string text, Icon icon, ContextMenuStrip contextMenu) + { + trayIcon.Text = text; + trayIcon.Icon = icon; + trayIcon.ContextMenuStrip = contextMenu; + trayIcon.Visible = true; + } + + internal static void InitializeEspressoTray(EspressoMode mode, bool keepDisplayOn, Action indefiniteSelectionCallback, Action timedSelectionCallback) + { + var contextMenuStrip = new ContextMenuStrip(); + + // Main toolstrip. + var operationContextMenu = new ToolStrip(); + operationContextMenu.Text = "Mode"; + + // Indefinite keep-awake menu item. + var indefiniteMenuItem = new ToolStripMenuItem(); + indefiniteMenuItem.Text = "Indefinite"; + if (mode == EspressoMode.INDEFINITE) + { + indefiniteMenuItem.Checked = true; + } + operationContextMenu.Items.Add(indefiniteMenuItem); + } + } +} diff --git a/src/modules/espresso/Espresso.Shell/Espresso.Shell.csproj b/src/modules/espresso/Espresso.Shell/Espresso.Shell.csproj index ea61957bbd..ff765c4f09 100644 --- a/src/modules/espresso/Espresso.Shell/Espresso.Shell.csproj +++ b/src/modules/espresso/Espresso.Shell/Espresso.Shell.csproj @@ -7,7 +7,8 @@ enable AnyCPU;x64 false - false + false + true diff --git a/src/modules/espresso/Espresso.Shell/Models/EspressoSettingsModel.cs b/src/modules/espresso/Espresso.Shell/Models/EspressoSettingsModel.cs index 8925fac979..db9263dac5 100644 --- a/src/modules/espresso/Espresso.Shell/Models/EspressoSettingsModel.cs +++ b/src/modules/espresso/Espresso.Shell/Models/EspressoSettingsModel.cs @@ -6,6 +6,12 @@ using Newtonsoft.Json; namespace Espresso.Shell.Models { + public enum EspressoMode + { + INDEFINITE = 0, + TIMED = 1, + } + public class EspressoSettingsModel { [JsonProperty("properties")] @@ -21,7 +27,7 @@ namespace Espresso.Shell.Models [JsonProperty("espresso_keep_display_on")] public KeepDisplayOn? KeepDisplayOn { get; set; } [JsonProperty("espresso_mode")] - public int? Mode { get; set; } + public EspressoMode Mode { get; set; } [JsonProperty("espresso_hours")] public Hours? Hours { get; set; } [JsonProperty("espresso_minutes")] diff --git a/src/modules/espresso/Espresso.Shell/Program.cs b/src/modules/espresso/Espresso.Shell/Program.cs index 4e16cd1135..2dbbdce75d 100644 --- a/src/modules/espresso/Espresso.Shell/Program.cs +++ b/src/modules/espresso/Espresso.Shell/Program.cs @@ -90,10 +90,10 @@ namespace Espresso.Shell timeOption.Required = false; - var powerToysPidOption = new Option( - aliases: new[] { "--ptpid", "-p" }, + var pidOption = new Option( + aliases: new[] { "--pid", "-p" }, getDefaultValue: () => 0, - description: "Reference to PowerToys PID, when executed under the application context.") + description: "Bind the execution of Espresso to another process.") { Argument = new Argument(() => 0) { @@ -101,14 +101,14 @@ namespace Espresso.Shell }, }; - powerToysPidOption.Required = false; + pidOption.Required = false; var rootCommand = new RootCommand { configOption, displayOption, timeOption, - powerToysPidOption + pidOption }; rootCommand.Description = appName; @@ -126,12 +126,12 @@ namespace Espresso.Shell Environment.Exit(exitCode); } - private static void HandleCommandLineArguments(string config, bool displayOn, long timeLimit, int ptpid) + private static void HandleCommandLineArguments(string config, bool displayOn, long timeLimit, int pid) { log.Info($"The value for --config is: {config}"); log.Info($"The value for --display-on is: {displayOn}"); log.Info($"The value for --time-limit is: {timeLimit}"); - log.Info($"The value for --ptpid is: {ptpid}"); + log.Info($"The value for --pid is: {pid}"); if (!string.IsNullOrWhiteSpace(config)) { @@ -166,14 +166,6 @@ namespace Espresso.Shell log.Info(errorString); log.Debug(errorString); } - - if (ptpid != 0) - { - RunnerHelper.WaitForPowerToysRunner(ptpid, () => - { - Environment.Exit(0); - }); - } } else { @@ -199,6 +191,14 @@ namespace Espresso.Shell } } + if (pid != 0) + { + RunnerHelper.WaitForPowerToysRunner(pid, () => + { + Environment.Exit(0); + }); + } + new ManualResetEvent(false).WaitOne(); } @@ -233,7 +233,7 @@ namespace Espresso.Shell // TIMED = 1 switch (settings.Properties.Mode) { - case 0: + case EspressoMode.INDEFINITE: { // Indefinite keep awake. bool success = APIHelper.SetIndefiniteKeepAwake(settings.Properties.KeepDisplayOn.Value); @@ -249,7 +249,7 @@ namespace Espresso.Shell } break; } - case 1: + case EspressoMode.TIMED: { // Timed keep-awake. long computedTime = (settings.Properties.Hours.Value * 60 * 60) + (settings.Properties.Minutes.Value * 60); diff --git a/src/modules/espresso/Espresso/dllmain.cpp b/src/modules/espresso/Espresso/dllmain.cpp index 1b877910a3..de9457ea85 100644 --- a/src/modules/espresso/Espresso/dllmain.cpp +++ b/src/modules/espresso/Espresso/dllmain.cpp @@ -81,7 +81,7 @@ private: // Get the configuration file that will be passed to the process. std::wstring espresso_settings_location = PTSettingsHelper::get_module_save_file_location(MODULE_NAME); - std::wstring executable_args = L"--config " + espresso_settings_location + L" --ptpid " + std::to_wstring(powertoys_pid); + std::wstring executable_args = L"--config " + espresso_settings_location + L" --pid " + std::to_wstring(powertoys_pid); Logger::trace(L"Espresso launching with parameters: " + executable_args); SHELLEXECUTEINFOW sei{ sizeof(sei) }; From 077f3b79c1a8f2cec8a4184569faeb8b8b5e6313 Mon Sep 17 00:00:00 2001 From: Den Delimarsky <1389609+dend@users.noreply.github.com> Date: Tue, 4 May 2021 08:28:35 -0700 Subject: [PATCH 44/81] Minor cleanup --- .../espresso/Espresso.Shell/Core/TrayHelper.cs | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/modules/espresso/Espresso.Shell/Core/TrayHelper.cs b/src/modules/espresso/Espresso.Shell/Core/TrayHelper.cs index 53e6a863b5..0cd3f48822 100644 --- a/src/modules/espresso/Espresso.Shell/Core/TrayHelper.cs +++ b/src/modules/espresso/Espresso.Shell/Core/TrayHelper.cs @@ -1,8 +1,10 @@ -using Espresso.Shell.Models; +// Copyright (c) Microsoft Corporation +// The Microsoft Corporation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using Espresso.Shell.Models; using System; -using System.Collections.Generic; using System.Drawing; -using System.Text; using System.Windows.Forms; namespace Espresso.Shell.Core @@ -39,6 +41,12 @@ namespace Espresso.Shell.Core indefiniteMenuItem.Checked = true; } operationContextMenu.Items.Add(indefiniteMenuItem); + + // Timed keep-awake menu item + + // Exit menu item + + // About menu item } } } From 3f5f83ae1cd4a2821a787d67b1b7a58e6fd44103 Mon Sep 17 00:00:00 2001 From: Den Delimarsky <1389609+dend@users.noreply.github.com> Date: Wed, 5 May 2021 07:52:08 -0700 Subject: [PATCH 45/81] Adding the ability to have a tray icon --- .../espresso/Espresso.Shell/Core/APIHelper.cs | 30 +++++++++++++--- .../Espresso.Shell/Core/TrayHelper.cs | 34 +++++++++++++++---- .../espresso/Espresso.Shell/Program.cs | 2 ++ 3 files changed, 56 insertions(+), 10 deletions(-) diff --git a/src/modules/espresso/Espresso.Shell/Core/APIHelper.cs b/src/modules/espresso/Espresso.Shell/Core/APIHelper.cs index e0c96ad75c..befa736a73 100644 --- a/src/modules/espresso/Espresso.Shell/Core/APIHelper.cs +++ b/src/modules/espresso/Espresso.Shell/Core/APIHelper.cs @@ -5,6 +5,7 @@ using Microsoft.Win32; using NLog; using System; +using System.Drawing; using System.Runtime.InteropServices; using System.Threading; using System.Threading.Tasks; @@ -33,15 +34,18 @@ namespace Espresso.Shell.Core private static Logger log; + // More details about the API used: https://docs.microsoft.com/windows/win32/api/winbase/nf-winbase-setthreadexecutionstate + [DllImport("kernel32.dll", CharSet = CharSet.Auto, SetLastError = true)] + static extern EXECUTION_STATE SetThreadExecutionState(EXECUTION_STATE esFlags); + + [DllImport("Shell32.dll", EntryPoint = "ExtractIconExW", CharSet = CharSet.Unicode, ExactSpelling = true, CallingConvention = CallingConvention.StdCall)] + private static extern int ExtractIconEx(string sFile, int iIndex, out IntPtr piLargeVersion, out IntPtr piSmallVersion, int amountIcons); + static APIHelper() { log = LogManager.GetCurrentClassLogger(); } - // More details about the API used: https://docs.microsoft.com/windows/win32/api/winbase/nf-winbase-setthreadexecutionstate - [DllImport("kernel32.dll", CharSet = CharSet.Auto, SetLastError = true)] - static extern EXECUTION_STATE SetThreadExecutionState(EXECUTION_STATE esFlags); - /// /// Sets the computer awake state using the native Win32 SetThreadExecutionState API. This /// function is just a nice-to-have wrapper that helps avoid tracking the success or failure of @@ -183,5 +187,23 @@ namespace Espresso.Shell.Core return string.Empty; } } + + + public static Icon? Extract(string file, int number, bool largeIcon) + { + IntPtr large; + IntPtr small; + ExtractIconEx(file, number, out large, out small, 1); + try + { + return Icon.FromHandle(largeIcon ? large : small); + } + catch + { + return null; + } + + } + } } diff --git a/src/modules/espresso/Espresso.Shell/Core/TrayHelper.cs b/src/modules/espresso/Espresso.Shell/Core/TrayHelper.cs index 0cd3f48822..73c81e3ec6 100644 --- a/src/modules/espresso/Espresso.Shell/Core/TrayHelper.cs +++ b/src/modules/espresso/Espresso.Shell/Core/TrayHelper.cs @@ -5,6 +5,7 @@ using Espresso.Shell.Models; using System; using System.Drawing; +using System.Threading.Tasks; using System.Windows.Forms; namespace Espresso.Shell.Core @@ -23,14 +24,16 @@ namespace Espresso.Shell.Core trayIcon.Icon = icon; trayIcon.ContextMenuStrip = contextMenu; trayIcon.Visible = true; + + Application.Run(); } - internal static void InitializeEspressoTray(EspressoMode mode, bool keepDisplayOn, Action indefiniteSelectionCallback, Action timedSelectionCallback) + internal static void InitializeEspressoTray(string text, EspressoMode mode, bool keepDisplayOn, Action indefiniteSelectionCallback, Action timedSelectionCallback) { var contextMenuStrip = new ContextMenuStrip(); - + // Main toolstrip. - var operationContextMenu = new ToolStrip(); + var operationContextMenu = new ToolStripMenuItem(); operationContextMenu.Text = "Mode"; // Indefinite keep-awake menu item. @@ -40,13 +43,32 @@ namespace Espresso.Shell.Core { indefiniteMenuItem.Checked = true; } - operationContextMenu.Items.Add(indefiniteMenuItem); // Timed keep-awake menu item + var timedMenuItem = new ToolStripMenuItem(); + timedMenuItem.Text = "Timed"; - // Exit menu item + var halfHourMenuItem = new ToolStripMenuItem(); + halfHourMenuItem.Text = "30 minutes"; - // About menu item + var oneHourMenuItem = new ToolStripMenuItem(); + halfHourMenuItem.Text = "1 hour"; + + var twoHousrMenuItem = new ToolStripMenuItem(); + halfHourMenuItem.Text = "2 hours"; + + timedMenuItem.DropDownItems.Add(halfHourMenuItem); + timedMenuItem.DropDownItems.Add(oneHourMenuItem); + timedMenuItem.DropDownItems.Add(twoHousrMenuItem); + + operationContextMenu.DropDownItems.Add(indefiniteMenuItem); + operationContextMenu.DropDownItems.Add(timedMenuItem); + + contextMenuStrip.Items.Add(operationContextMenu); + +#pragma warning disable CS8604 // Possible null reference argument. + Task.Factory.StartNew(() => InitializeTrayIcon(text, APIHelper.Extract("shell32.dll", 42, true), contextMenuStrip)); +#pragma warning restore CS8604 // Possible null reference argument. } } } diff --git a/src/modules/espresso/Espresso.Shell/Program.cs b/src/modules/espresso/Espresso.Shell/Program.cs index 2dbbdce75d..acfeb0955b 100644 --- a/src/modules/espresso/Espresso.Shell/Program.cs +++ b/src/modules/espresso/Espresso.Shell/Program.cs @@ -199,6 +199,8 @@ namespace Espresso.Shell }); } + TrayHelper.InitializeEspressoTray("Espresso", EspressoMode.INDEFINITE, true, new Action(()=>Console.WriteLine("test")), new Action(() => Console.WriteLine("test"))); + new ManualResetEvent(false).WaitOne(); } From 5cf82d7000cd6f52835af59aa37d6632159ecd39 Mon Sep 17 00:00:00 2001 From: Den Delimarsky <1389609+dend@users.noreply.github.com> Date: Sun, 9 May 2021 15:53:43 -0700 Subject: [PATCH 46/81] Fix typo and minor resource changes --- .../espresso/Espresso.Shell/Core/TrayHelper.cs | 4 ++-- .../Strings/en-us/Resources.resw | 14 ++++++++++++++ .../Views/EspressoPage.xaml | 8 ++++---- 3 files changed, 20 insertions(+), 6 deletions(-) diff --git a/src/modules/espresso/Espresso.Shell/Core/TrayHelper.cs b/src/modules/espresso/Espresso.Shell/Core/TrayHelper.cs index 73c81e3ec6..11f261cc21 100644 --- a/src/modules/espresso/Espresso.Shell/Core/TrayHelper.cs +++ b/src/modules/espresso/Espresso.Shell/Core/TrayHelper.cs @@ -54,12 +54,12 @@ namespace Espresso.Shell.Core var oneHourMenuItem = new ToolStripMenuItem(); halfHourMenuItem.Text = "1 hour"; - var twoHousrMenuItem = new ToolStripMenuItem(); + var twoHoursMenuItem = new ToolStripMenuItem(); halfHourMenuItem.Text = "2 hours"; timedMenuItem.DropDownItems.Add(halfHourMenuItem); timedMenuItem.DropDownItems.Add(oneHourMenuItem); - timedMenuItem.DropDownItems.Add(twoHousrMenuItem); + timedMenuItem.DropDownItems.Add(twoHoursMenuItem); operationContextMenu.DropDownItems.Add(indefiniteMenuItem); operationContextMenu.DropDownItems.Add(timedMenuItem); diff --git a/src/settings-ui/Microsoft.PowerToys.Settings.UI/Strings/en-us/Resources.resw b/src/settings-ui/Microsoft.PowerToys.Settings.UI/Strings/en-us/Resources.resw index 1ce9a18393..22fcea96e7 100644 --- a/src/settings-ui/Microsoft.PowerToys.Settings.UI/Strings/en-us/Resources.resw +++ b/src/settings-ui/Microsoft.PowerToys.Settings.UI/Strings/en-us/Resources.resw @@ -1198,4 +1198,18 @@ From there, simply click on a Markdown file or SVG icon in the File Explorer and Minutes + + Den Delimarsky's Espresso + + + Niels Laute's UX concept + + + https://medium.com/@Niels9001/a-fluent-color-meter-for-powertoys-20407ededf0c + URL. Do not loc + + + https://espresso.den.dev + URL. Do not loc + diff --git a/src/settings-ui/Microsoft.PowerToys.Settings.UI/Views/EspressoPage.xaml b/src/settings-ui/Microsoft.PowerToys.Settings.UI/Views/EspressoPage.xaml index 3e2ac54be3..5e1e048293 100644 --- a/src/settings-ui/Microsoft.PowerToys.Settings.UI/Views/EspressoPage.xaml +++ b/src/settings-ui/Microsoft.PowerToys.Settings.UI/Views/EspressoPage.xaml @@ -167,13 +167,13 @@ Style="{StaticResource SettingsGroupTitleStyle}" /> - + x:Uid="Espresso_ModuleAttributionHyperlink"> + - + x:Uid="Espresso_UXAttributionHyperlink"> + From 7b6762609e5697339e72396786fa9c3dd6135b8e Mon Sep 17 00:00:00 2001 From: Den Delimarsky <1389609+dend@users.noreply.github.com> Date: Sun, 9 May 2021 16:27:59 -0700 Subject: [PATCH 47/81] Cleanup and set correct assembly name --- .../Espresso.Shell/Espresso.Shell.csproj | 1 + src/modules/espresso/Espresso/dllmain.cpp | 158 +----------------- 2 files changed, 2 insertions(+), 157 deletions(-) diff --git a/src/modules/espresso/Espresso.Shell/Espresso.Shell.csproj b/src/modules/espresso/Espresso.Shell/Espresso.Shell.csproj index ff765c4f09..93baa75357 100644 --- a/src/modules/espresso/Espresso.Shell/Espresso.Shell.csproj +++ b/src/modules/espresso/Espresso.Shell/Espresso.Shell.csproj @@ -9,6 +9,7 @@ false false true + PowerToys.Espresso diff --git a/src/modules/espresso/Espresso/dllmain.cpp b/src/modules/espresso/Espresso/dllmain.cpp index de9457ea85..747587403b 100644 --- a/src/modules/espresso/Espresso/dllmain.cpp +++ b/src/modules/espresso/Espresso/dllmain.cpp @@ -86,7 +86,7 @@ private: SHELLEXECUTEINFOW sei{ sizeof(sei) }; sei.fMask = { SEE_MASK_NOCLOSEPROCESS | SEE_MASK_FLAG_NO_UI }; - sei.lpFile = L"modules\\Espresso\\Espresso.Shell.exe"; + sei.lpFile = L"modules\\Espresso\\PowerToys.Espresso.exe"; sei.nShow = SW_SHOWNORMAL; sei.lpParameters = executable_args.data(); if (!ShellExecuteExW(&sei)) @@ -125,24 +125,6 @@ public: return MODULE_NAME; } - - //// Return array of the names of all events that this powertoy listens for, with - //// nullptr as the last element of the array. Nullptr can also be retured for empty - //// list. - //virtual const wchar_t** get_events() override - //{ - // static const wchar_t* events[] = { nullptr }; - // // Available events: - // // - ll_keyboard - // // - win_hook_event - // // - // // static const wchar_t* events[] = { ll_keyboard, - // // win_hook_event, - // // nullptr }; - - // return events; - //} - // Return JSON with the configuration options. virtual bool get_config(wchar_t* buffer, int* buffer_size) override { @@ -152,52 +134,6 @@ public: PowerToysSettings::Settings settings(hinstance, get_name()); settings.set_description(MODULE_DESC); - // Show an overview link in the Settings page - //settings.set_overview_link(L"https://"); - - // Show a video link in the Settings page. - //settings.set_video_link(L"https://"); - - // A bool property with a toggle editor. - //settings.add_bool_toogle( - // L"bool_toggle_1", // property name. - // L"This is what a BoolToggle property looks like", // description or resource id of the localized string. - // g_settings.bool_prop // property value. - //); - - // An integer property with a spinner editor. - //settings.add_int_spinner( - // L"int_spinner_1", // property name - // L"This is what a IntSpinner property looks like", // description or resource id of the localized string. - // g_settings.int_prop, // property value. - // 0, // min value. - // 100, // max value. - // 10 // incremental step. - //); - - // A string property with a textbox editor. - //settings.add_string( - // L"string_text_1", // property name. - // L"This is what a String property looks like", // description or resource id of the localized string. - // g_settings.string_prop // property value. - //); - - // A string property with a color picker editor. - //settings.add_color_picker( - // L"color_picker_1", // property name. - // L"This is what a ColorPicker property looks like", // description or resource id of the localized string. - // g_settings.color_prop // property value. - //); - - // A custom action property. When using this settings type, the "PowertoyModuleIface::call_custom_action()" - // method should be overriden as well. - //settings.add_custom_action( - // L"custom_action_id", // action name. - // L"This is what a CustomAction property looks like", // label above the field. - // L"Call a custom action", // button text. - // L"Press the button to call a custom action." // display values / extended info. - //); - return settings.serialize_to_buffer(buffer, buffer_size); } @@ -217,10 +153,6 @@ public: // Parse the action values, including name. PowerToysSettings::CustomActionObject action_object = PowerToysSettings::CustomActionObject::from_json_string(action); - - //if (action_object.get_name() == L"custom_action_id") { - // // Execute your custom action - //} } catch (std::exception&) { @@ -237,31 +169,9 @@ public: PowerToysSettings::PowerToyValues values = PowerToysSettings::PowerToyValues::from_json_string(config, get_key()); - // Update a bool property. - //if (auto v = values.get_bool_value(L"bool_toggle_1")) { - // g_settings.bool_prop = *v; - //} - - // Update an int property. - //if (auto v = values.get_int_value(L"int_spinner_1")) { - // g_settings.int_prop = *v; - //} - - // Update a string property. - //if (auto v = values.get_string_value(L"string_text_1")) { - // g_settings.string_prop = *v; - //} - - // Update a color property. - //if (auto v = values.get_string_value(L"color_picker_1")) { - // g_settings.color_prop = *v; - //} - // If you don't need to do any custom processing of the settings, proceed // to persists the values calling: values.save_to_settings_file(); - // Otherwise call a custom function to process the settings before saving them to disk: - // save_settings(); } catch (std::exception&) { @@ -294,34 +204,6 @@ public: { return m_enabled; } - - //// Handle incoming event, data is event-specific - //virtual intptr_t signal_event(const wchar_t* name, intptr_t data) override - //{ - // if (wcscmp(name, ll_keyboard) == 0) - // { - // auto& event = *(reinterpret_cast(data)); - // // Return 1 if the keypress is to be suppressed (not forwarded to Windows), - // // otherwise return 0. - // return 0; - // } - // else if (wcscmp(name, win_hook_event) == 0) - // { - // auto& event = *(reinterpret_cast(data)); - // // Return value is ignored - // return 0; - // } - // return 0; - //} - - //// This methods are part of an experimental features not fully supported yet - //virtual void register_system_menu_helper(PowertoySystemMenuIface* helper) override - //{ - //} - - //virtual void signal_system_menu_action(const wchar_t* name) override - //{ - //} }; // Load the settings file. @@ -340,44 +222,6 @@ void Espresso::init_settings() } } -// This method of saving the module settings is only required if you need to do any -// custom processing of the settings before saving them to disk. -//void $projectname$::save_settings() { -// try { -// // Create a PowerToyValues object for this PowerToy -// PowerToysSettings::PowerToyValues values(get_name()); -// -// // Save a bool property. -// //values.add_property( -// // L"bool_toggle_1", // property name -// // g_settings.bool_prop // property value -// //); -// -// // Save an int property. -// //values.add_property( -// // L"int_spinner_1", // property name -// // g_settings.int_prop // property value -// //); -// -// // Save a string property. -// //values.add_property( -// // L"string_text_1", // property name -// // g_settings.string_prop // property value -// ); -// -// // Save a color property. -// //values.add_property( -// // L"color_picker_1", // property name -// // g_settings.color_prop // property value -// //); -// -// // Save the PowerToyValues JSON to the power toy settings file. -// values.save_to_settings_file(); -// } -// catch (std::exception ex) { -// // Couldn't save the settings. -// } -//} extern "C" __declspec(dllexport) PowertoyModuleIface* __cdecl powertoy_create() { From fd3c55866eb5f587d42211d902bc2a4993e05fff Mon Sep 17 00:00:00 2001 From: Den Delimarsky <1389609+dend@users.noreply.github.com> Date: Sun, 9 May 2021 17:14:48 -0700 Subject: [PATCH 48/81] Fix naming --- PowerToys.sln | 18 +++++++++--------- .../{Espresso.Shell.csproj => Espresso.csproj} | 0 .../EspressoConstants.h | 0 .../EspressoModuleInterface.rc} | 0 .../EspressoModuleInterface.vcxproj} | 4 ++-- .../EspressoModuleInterface.vcxproj.filters} | 2 +- .../dllmain.cpp | 0 .../packages.config | 0 .../pch.cpp | 0 .../pch.h | 0 .../resource.h | 0 .../trace.cpp | 0 .../trace.h | 0 src/runner/main.cpp | 2 +- 14 files changed, 13 insertions(+), 13 deletions(-) rename src/modules/espresso/Espresso.Shell/{Espresso.Shell.csproj => Espresso.csproj} (100%) rename src/modules/espresso/{Espresso => EspressoModuleInterface}/EspressoConstants.h (100%) rename src/modules/espresso/{Espresso/Espresso.rc => EspressoModuleInterface/EspressoModuleInterface.rc} (100%) rename src/modules/espresso/{Espresso/Espresso.vcxproj => EspressoModuleInterface/EspressoModuleInterface.vcxproj} (97%) rename src/modules/espresso/{Espresso/Espresso.vcxproj.filters => EspressoModuleInterface/EspressoModuleInterface.vcxproj.filters} (96%) rename src/modules/espresso/{Espresso => EspressoModuleInterface}/dllmain.cpp (100%) rename src/modules/espresso/{Espresso => EspressoModuleInterface}/packages.config (100%) rename src/modules/espresso/{Espresso => EspressoModuleInterface}/pch.cpp (100%) rename src/modules/espresso/{Espresso => EspressoModuleInterface}/pch.h (100%) rename src/modules/espresso/{Espresso => EspressoModuleInterface}/resource.h (100%) rename src/modules/espresso/{Espresso => EspressoModuleInterface}/trace.cpp (100%) rename src/modules/espresso/{Espresso => EspressoModuleInterface}/trace.h (100%) diff --git a/PowerToys.sln b/PowerToys.sln index c379a605d4..76271df75d 100644 --- a/PowerToys.sln +++ b/PowerToys.sln @@ -326,9 +326,9 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "KeyboardManagerEditorTest", EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "espresso", "espresso", "{127F38E0-40AA-4594-B955-5616BF206882}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Espresso", "src\modules\espresso\Espresso\Espresso.vcxproj", "{5E7360A8-D048-4ED3-8F09-0BFD64C5529A}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Espresso", "src\modules\espresso\Espresso.Shell\Espresso.csproj", "{3B77A64A-8005-4D43-B31A-F692E213BAE4}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Espresso.Shell", "src\modules\espresso\Espresso.Shell\Espresso.Shell.csproj", "{3B77A64A-8005-4D43-B31A-F692E213BAE4}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "EspressoModuleInterface", "src\modules\espresso\EspressoModuleInterface\EspressoModuleInterface.vcxproj", "{5E7360A8-D048-4ED3-8F09-0BFD64C5529A}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -836,12 +836,6 @@ Global {62173D9A-6724-4C00-A1C8-FB646480A9EC}.Release|Any CPU.ActiveCfg = Release|x64 {62173D9A-6724-4C00-A1C8-FB646480A9EC}.Release|x64.ActiveCfg = Release|x64 {62173D9A-6724-4C00-A1C8-FB646480A9EC}.Release|x64.Build.0 = Release|x64 - {5E7360A8-D048-4ED3-8F09-0BFD64C5529A}.Debug|Any CPU.ActiveCfg = Debug|x64 - {5E7360A8-D048-4ED3-8F09-0BFD64C5529A}.Debug|x64.ActiveCfg = Debug|x64 - {5E7360A8-D048-4ED3-8F09-0BFD64C5529A}.Debug|x64.Build.0 = Debug|x64 - {5E7360A8-D048-4ED3-8F09-0BFD64C5529A}.Release|Any CPU.ActiveCfg = Release|x64 - {5E7360A8-D048-4ED3-8F09-0BFD64C5529A}.Release|x64.ActiveCfg = Release|x64 - {5E7360A8-D048-4ED3-8F09-0BFD64C5529A}.Release|x64.Build.0 = Release|x64 {3B77A64A-8005-4D43-B31A-F692E213BAE4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {3B77A64A-8005-4D43-B31A-F692E213BAE4}.Debug|Any CPU.Build.0 = Debug|Any CPU {3B77A64A-8005-4D43-B31A-F692E213BAE4}.Debug|x64.ActiveCfg = Debug|x64 @@ -850,6 +844,12 @@ Global {3B77A64A-8005-4D43-B31A-F692E213BAE4}.Release|Any CPU.Build.0 = Release|Any CPU {3B77A64A-8005-4D43-B31A-F692E213BAE4}.Release|x64.ActiveCfg = Release|Any CPU {3B77A64A-8005-4D43-B31A-F692E213BAE4}.Release|x64.Build.0 = Release|Any CPU + {5E7360A8-D048-4ED3-8F09-0BFD64C5529A}.Debug|Any CPU.ActiveCfg = Debug|x64 + {5E7360A8-D048-4ED3-8F09-0BFD64C5529A}.Debug|x64.ActiveCfg = Debug|x64 + {5E7360A8-D048-4ED3-8F09-0BFD64C5529A}.Debug|x64.Build.0 = Debug|x64 + {5E7360A8-D048-4ED3-8F09-0BFD64C5529A}.Release|Any CPU.ActiveCfg = Release|x64 + {5E7360A8-D048-4ED3-8F09-0BFD64C5529A}.Release|x64.ActiveCfg = Release|x64 + {5E7360A8-D048-4ED3-8F09-0BFD64C5529A}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -950,8 +950,8 @@ Global {23D2070D-E4AD-4ADD-85A7-083D9C76AD49} = {38BDB927-829B-4C65-9CD9-93FB05D66D65} {62173D9A-6724-4C00-A1C8-FB646480A9EC} = {38BDB927-829B-4C65-9CD9-93FB05D66D65} {127F38E0-40AA-4594-B955-5616BF206882} = {4574FDD0-F61D-4376-98BF-E5A1262C11EC} - {5E7360A8-D048-4ED3-8F09-0BFD64C5529A} = {127F38E0-40AA-4594-B955-5616BF206882} {3B77A64A-8005-4D43-B31A-F692E213BAE4} = {127F38E0-40AA-4594-B955-5616BF206882} + {5E7360A8-D048-4ED3-8F09-0BFD64C5529A} = {127F38E0-40AA-4594-B955-5616BF206882} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {C3A2F9D1-7930-4EF4-A6FC-7EE0A99821D0} diff --git a/src/modules/espresso/Espresso.Shell/Espresso.Shell.csproj b/src/modules/espresso/Espresso.Shell/Espresso.csproj similarity index 100% rename from src/modules/espresso/Espresso.Shell/Espresso.Shell.csproj rename to src/modules/espresso/Espresso.Shell/Espresso.csproj diff --git a/src/modules/espresso/Espresso/EspressoConstants.h b/src/modules/espresso/EspressoModuleInterface/EspressoConstants.h similarity index 100% rename from src/modules/espresso/Espresso/EspressoConstants.h rename to src/modules/espresso/EspressoModuleInterface/EspressoConstants.h diff --git a/src/modules/espresso/Espresso/Espresso.rc b/src/modules/espresso/EspressoModuleInterface/EspressoModuleInterface.rc similarity index 100% rename from src/modules/espresso/Espresso/Espresso.rc rename to src/modules/espresso/EspressoModuleInterface/EspressoModuleInterface.rc diff --git a/src/modules/espresso/Espresso/Espresso.vcxproj b/src/modules/espresso/EspressoModuleInterface/EspressoModuleInterface.vcxproj similarity index 97% rename from src/modules/espresso/Espresso/Espresso.vcxproj rename to src/modules/espresso/EspressoModuleInterface/EspressoModuleInterface.vcxproj index 52c37c5126..33ee183a86 100644 --- a/src/modules/espresso/Espresso/Espresso.vcxproj +++ b/src/modules/espresso/EspressoModuleInterface/EspressoModuleInterface.vcxproj @@ -16,7 +16,7 @@ {5e7360a8-d048-4ed3-8f09-0bfd64c5529a} Win32Proj Espresso - Espresso + EspressoModuleInterface @@ -71,7 +71,7 @@ - + diff --git a/src/modules/espresso/Espresso/Espresso.vcxproj.filters b/src/modules/espresso/EspressoModuleInterface/EspressoModuleInterface.vcxproj.filters similarity index 96% rename from src/modules/espresso/Espresso/Espresso.vcxproj.filters rename to src/modules/espresso/EspressoModuleInterface/EspressoModuleInterface.vcxproj.filters index d890c2b1e6..2dd5624a53 100644 --- a/src/modules/espresso/Espresso/Espresso.vcxproj.filters +++ b/src/modules/espresso/EspressoModuleInterface/EspressoModuleInterface.vcxproj.filters @@ -43,7 +43,7 @@ - + Resource Files diff --git a/src/modules/espresso/Espresso/dllmain.cpp b/src/modules/espresso/EspressoModuleInterface/dllmain.cpp similarity index 100% rename from src/modules/espresso/Espresso/dllmain.cpp rename to src/modules/espresso/EspressoModuleInterface/dllmain.cpp diff --git a/src/modules/espresso/Espresso/packages.config b/src/modules/espresso/EspressoModuleInterface/packages.config similarity index 100% rename from src/modules/espresso/Espresso/packages.config rename to src/modules/espresso/EspressoModuleInterface/packages.config diff --git a/src/modules/espresso/Espresso/pch.cpp b/src/modules/espresso/EspressoModuleInterface/pch.cpp similarity index 100% rename from src/modules/espresso/Espresso/pch.cpp rename to src/modules/espresso/EspressoModuleInterface/pch.cpp diff --git a/src/modules/espresso/Espresso/pch.h b/src/modules/espresso/EspressoModuleInterface/pch.h similarity index 100% rename from src/modules/espresso/Espresso/pch.h rename to src/modules/espresso/EspressoModuleInterface/pch.h diff --git a/src/modules/espresso/Espresso/resource.h b/src/modules/espresso/EspressoModuleInterface/resource.h similarity index 100% rename from src/modules/espresso/Espresso/resource.h rename to src/modules/espresso/EspressoModuleInterface/resource.h diff --git a/src/modules/espresso/Espresso/trace.cpp b/src/modules/espresso/EspressoModuleInterface/trace.cpp similarity index 100% rename from src/modules/espresso/Espresso/trace.cpp rename to src/modules/espresso/EspressoModuleInterface/trace.cpp diff --git a/src/modules/espresso/Espresso/trace.h b/src/modules/espresso/EspressoModuleInterface/trace.h similarity index 100% rename from src/modules/espresso/Espresso/trace.h rename to src/modules/espresso/EspressoModuleInterface/trace.h diff --git a/src/runner/main.cpp b/src/runner/main.cpp index cf9245c239..e070073600 100644 --- a/src/runner/main.cpp +++ b/src/runner/main.cpp @@ -157,7 +157,7 @@ int runner(bool isProcessElevated, bool openSettings, bool openOobe) L"modules/PowerRename/PowerRenameExt.dll", L"modules/ShortcutGuide/ShortcutGuide.dll", L"modules/ColorPicker/ColorPicker.dll", - L"modules/Espresso/Espresso.dll", + L"modules/EspressoModuleInterface/EspressoModuleInterface.dll", }; for (const auto& moduleSubdir : knownModules) From f0ea81542793a925a0b61ed0e3fb496e1fb1306b Mon Sep 17 00:00:00 2001 From: Den Delimarsky <1389609+dend@users.noreply.github.com> Date: Sun, 9 May 2021 17:17:51 -0700 Subject: [PATCH 49/81] More naming fixes --- PowerToys.sln | 2 +- .../espresso/{Espresso.Shell => Espresso}/Core/APIHelper.cs | 0 .../{Espresso.Shell => Espresso}/Core/SettingsHelper.cs | 0 .../espresso/{Espresso.Shell => Espresso}/Core/TrayHelper.cs | 0 .../espresso/{Espresso.Shell => Espresso}/Espresso.csproj | 0 .../Models/EspressoSettingsModel.cs | 0 src/modules/espresso/{Espresso.Shell => Espresso}/NLog.config | 0 src/modules/espresso/{Espresso.Shell => Espresso}/Program.cs | 0 8 files changed, 1 insertion(+), 1 deletion(-) rename src/modules/espresso/{Espresso.Shell => Espresso}/Core/APIHelper.cs (100%) rename src/modules/espresso/{Espresso.Shell => Espresso}/Core/SettingsHelper.cs (100%) rename src/modules/espresso/{Espresso.Shell => Espresso}/Core/TrayHelper.cs (100%) rename src/modules/espresso/{Espresso.Shell => Espresso}/Espresso.csproj (100%) rename src/modules/espresso/{Espresso.Shell => Espresso}/Models/EspressoSettingsModel.cs (100%) rename src/modules/espresso/{Espresso.Shell => Espresso}/NLog.config (100%) rename src/modules/espresso/{Espresso.Shell => Espresso}/Program.cs (100%) diff --git a/PowerToys.sln b/PowerToys.sln index 76271df75d..9855209dd3 100644 --- a/PowerToys.sln +++ b/PowerToys.sln @@ -326,7 +326,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "KeyboardManagerEditorTest", EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "espresso", "espresso", "{127F38E0-40AA-4594-B955-5616BF206882}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Espresso", "src\modules\espresso\Espresso.Shell\Espresso.csproj", "{3B77A64A-8005-4D43-B31A-F692E213BAE4}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Espresso", "src\modules\espresso\Espresso\Espresso.csproj", "{3B77A64A-8005-4D43-B31A-F692E213BAE4}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "EspressoModuleInterface", "src\modules\espresso\EspressoModuleInterface\EspressoModuleInterface.vcxproj", "{5E7360A8-D048-4ED3-8F09-0BFD64C5529A}" EndProject diff --git a/src/modules/espresso/Espresso.Shell/Core/APIHelper.cs b/src/modules/espresso/Espresso/Core/APIHelper.cs similarity index 100% rename from src/modules/espresso/Espresso.Shell/Core/APIHelper.cs rename to src/modules/espresso/Espresso/Core/APIHelper.cs diff --git a/src/modules/espresso/Espresso.Shell/Core/SettingsHelper.cs b/src/modules/espresso/Espresso/Core/SettingsHelper.cs similarity index 100% rename from src/modules/espresso/Espresso.Shell/Core/SettingsHelper.cs rename to src/modules/espresso/Espresso/Core/SettingsHelper.cs diff --git a/src/modules/espresso/Espresso.Shell/Core/TrayHelper.cs b/src/modules/espresso/Espresso/Core/TrayHelper.cs similarity index 100% rename from src/modules/espresso/Espresso.Shell/Core/TrayHelper.cs rename to src/modules/espresso/Espresso/Core/TrayHelper.cs diff --git a/src/modules/espresso/Espresso.Shell/Espresso.csproj b/src/modules/espresso/Espresso/Espresso.csproj similarity index 100% rename from src/modules/espresso/Espresso.Shell/Espresso.csproj rename to src/modules/espresso/Espresso/Espresso.csproj diff --git a/src/modules/espresso/Espresso.Shell/Models/EspressoSettingsModel.cs b/src/modules/espresso/Espresso/Models/EspressoSettingsModel.cs similarity index 100% rename from src/modules/espresso/Espresso.Shell/Models/EspressoSettingsModel.cs rename to src/modules/espresso/Espresso/Models/EspressoSettingsModel.cs diff --git a/src/modules/espresso/Espresso.Shell/NLog.config b/src/modules/espresso/Espresso/NLog.config similarity index 100% rename from src/modules/espresso/Espresso.Shell/NLog.config rename to src/modules/espresso/Espresso/NLog.config diff --git a/src/modules/espresso/Espresso.Shell/Program.cs b/src/modules/espresso/Espresso/Program.cs similarity index 100% rename from src/modules/espresso/Espresso.Shell/Program.cs rename to src/modules/espresso/Espresso/Program.cs From 924057cf41e6e37c0b384b55393854c39045523e Mon Sep 17 00:00:00 2001 From: Den Delimarsky <1389609+dend@users.noreply.github.com> Date: Sun, 9 May 2021 17:23:49 -0700 Subject: [PATCH 50/81] Add expected spelling --- .github/actions/spell-check/expect.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/actions/spell-check/expect.txt b/.github/actions/spell-check/expect.txt index 24a5b0055a..76a6a541bf 100644 --- a/.github/actions/spell-check/expect.txt +++ b/.github/actions/spell-check/expect.txt @@ -93,6 +93,7 @@ args argv Arial arik +arity arjunbalgovind ARPINSTALLLOCATION ARPPRODUCTICON @@ -130,6 +131,7 @@ Autorun AUTOSIZECOLUMNS autoupdate AValid +AWAYMODE azurecr azurewebsites backend @@ -1201,6 +1203,8 @@ localport localtime LOCATIONCHANGE Lockyour +logconsole +logfile LOGFONT LOGMSG logon @@ -1317,6 +1321,7 @@ mimetype Minimizeallwindows MINIMIZEBOX miniz +minlevel MINMAXINFO Miracast mixin From 6b2b0666969b5cea1ae43b59aa2e21947c6f1e24 Mon Sep 17 00:00:00 2001 From: Den Delimarsky <1389609+dend@users.noreply.github.com> Date: Sun, 9 May 2021 17:50:15 -0700 Subject: [PATCH 51/81] Add more words to expected collection --- .github/actions/spell-check/expect.txt | 3 +++ src/modules/espresso/Espresso/Core/TrayHelper.cs | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/actions/spell-check/expect.txt b/.github/actions/spell-check/expect.txt index 76a6a541bf..4ed296aa88 100644 --- a/.github/actions/spell-check/expect.txt +++ b/.github/actions/spell-check/expect.txt @@ -425,6 +425,7 @@ DEFPUSHBUTTON deinitialization DELA deletethis +Delimarsky delims DENORMAL depersist @@ -2161,6 +2162,7 @@ toggleright toggleswitch toolbar toolset +toolstrip tooltip toolwindow TOPDOWNDIB @@ -2475,6 +2477,7 @@ XOffset xpath XResource xsd +xsi XSmall XStr XToolset diff --git a/src/modules/espresso/Espresso/Core/TrayHelper.cs b/src/modules/espresso/Espresso/Core/TrayHelper.cs index 11f261cc21..248ab5741e 100644 --- a/src/modules/espresso/Espresso/Core/TrayHelper.cs +++ b/src/modules/espresso/Espresso/Core/TrayHelper.cs @@ -52,10 +52,10 @@ namespace Espresso.Shell.Core halfHourMenuItem.Text = "30 minutes"; var oneHourMenuItem = new ToolStripMenuItem(); - halfHourMenuItem.Text = "1 hour"; + oneHourMenuItem.Text = "1 hour"; var twoHoursMenuItem = new ToolStripMenuItem(); - halfHourMenuItem.Text = "2 hours"; + twoHoursMenuItem.Text = "2 hours"; timedMenuItem.DropDownItems.Add(halfHourMenuItem); timedMenuItem.DropDownItems.Add(oneHourMenuItem); From c6c19e38247eb176fb58290d0d3d95a5de165f2d Mon Sep 17 00:00:00 2001 From: Den Delimarsky <1389609+dend@users.noreply.github.com> Date: Sun, 9 May 2021 17:57:04 -0700 Subject: [PATCH 52/81] Update with reference to missing string --- .github/actions/spell-check/expect.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/actions/spell-check/expect.txt b/.github/actions/spell-check/expect.txt index 4ed296aa88..e31bf2dce1 100644 --- a/.github/actions/spell-check/expect.txt +++ b/.github/actions/spell-check/expect.txt @@ -426,6 +426,7 @@ deinitialization DELA deletethis Delimarsky +Delimarsky's delims DENORMAL depersist From 64bc9cb7716c97014c39dbcd47d1ea41bc62d88c Mon Sep 17 00:00:00 2001 From: Den Delimarsky <1389609+dend@users.noreply.github.com> Date: Sun, 9 May 2021 18:21:51 -0700 Subject: [PATCH 53/81] Fix project issue that prevented the launch of the console window for testing --- PowerToys.sln | 22 +++++++++---------- .../espresso/Espresso/Core/TrayHelper.cs | 2 +- src/modules/espresso/Espresso/Espresso.csproj | 2 ++ 3 files changed, 14 insertions(+), 12 deletions(-) diff --git a/PowerToys.sln b/PowerToys.sln index 9855209dd3..304512217a 100644 --- a/PowerToys.sln +++ b/PowerToys.sln @@ -326,10 +326,10 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "KeyboardManagerEditorTest", EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "espresso", "espresso", "{127F38E0-40AA-4594-B955-5616BF206882}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Espresso", "src\modules\espresso\Espresso\Espresso.csproj", "{3B77A64A-8005-4D43-B31A-F692E213BAE4}" -EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "EspressoModuleInterface", "src\modules\espresso\EspressoModuleInterface\EspressoModuleInterface.vcxproj", "{5E7360A8-D048-4ED3-8F09-0BFD64C5529A}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Espresso", "src\modules\espresso\Espresso\Espresso.csproj", "{D940E07F-532C-4FF3-883F-790DA014F19A}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -836,20 +836,20 @@ Global {62173D9A-6724-4C00-A1C8-FB646480A9EC}.Release|Any CPU.ActiveCfg = Release|x64 {62173D9A-6724-4C00-A1C8-FB646480A9EC}.Release|x64.ActiveCfg = Release|x64 {62173D9A-6724-4C00-A1C8-FB646480A9EC}.Release|x64.Build.0 = Release|x64 - {3B77A64A-8005-4D43-B31A-F692E213BAE4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {3B77A64A-8005-4D43-B31A-F692E213BAE4}.Debug|Any CPU.Build.0 = Debug|Any CPU - {3B77A64A-8005-4D43-B31A-F692E213BAE4}.Debug|x64.ActiveCfg = Debug|x64 - {3B77A64A-8005-4D43-B31A-F692E213BAE4}.Debug|x64.Build.0 = Debug|x64 - {3B77A64A-8005-4D43-B31A-F692E213BAE4}.Release|Any CPU.ActiveCfg = Release|Any CPU - {3B77A64A-8005-4D43-B31A-F692E213BAE4}.Release|Any CPU.Build.0 = Release|Any CPU - {3B77A64A-8005-4D43-B31A-F692E213BAE4}.Release|x64.ActiveCfg = Release|Any CPU - {3B77A64A-8005-4D43-B31A-F692E213BAE4}.Release|x64.Build.0 = Release|Any CPU {5E7360A8-D048-4ED3-8F09-0BFD64C5529A}.Debug|Any CPU.ActiveCfg = Debug|x64 {5E7360A8-D048-4ED3-8F09-0BFD64C5529A}.Debug|x64.ActiveCfg = Debug|x64 {5E7360A8-D048-4ED3-8F09-0BFD64C5529A}.Debug|x64.Build.0 = Debug|x64 {5E7360A8-D048-4ED3-8F09-0BFD64C5529A}.Release|Any CPU.ActiveCfg = Release|x64 {5E7360A8-D048-4ED3-8F09-0BFD64C5529A}.Release|x64.ActiveCfg = Release|x64 {5E7360A8-D048-4ED3-8F09-0BFD64C5529A}.Release|x64.Build.0 = Release|x64 + {D940E07F-532C-4FF3-883F-790DA014F19A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D940E07F-532C-4FF3-883F-790DA014F19A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D940E07F-532C-4FF3-883F-790DA014F19A}.Debug|x64.ActiveCfg = Debug|x64 + {D940E07F-532C-4FF3-883F-790DA014F19A}.Debug|x64.Build.0 = Debug|x64 + {D940E07F-532C-4FF3-883F-790DA014F19A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D940E07F-532C-4FF3-883F-790DA014F19A}.Release|Any CPU.Build.0 = Release|Any CPU + {D940E07F-532C-4FF3-883F-790DA014F19A}.Release|x64.ActiveCfg = Release|x64 + {D940E07F-532C-4FF3-883F-790DA014F19A}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -950,8 +950,8 @@ Global {23D2070D-E4AD-4ADD-85A7-083D9C76AD49} = {38BDB927-829B-4C65-9CD9-93FB05D66D65} {62173D9A-6724-4C00-A1C8-FB646480A9EC} = {38BDB927-829B-4C65-9CD9-93FB05D66D65} {127F38E0-40AA-4594-B955-5616BF206882} = {4574FDD0-F61D-4376-98BF-E5A1262C11EC} - {3B77A64A-8005-4D43-B31A-F692E213BAE4} = {127F38E0-40AA-4594-B955-5616BF206882} {5E7360A8-D048-4ED3-8F09-0BFD64C5529A} = {127F38E0-40AA-4594-B955-5616BF206882} + {D940E07F-532C-4FF3-883F-790DA014F19A} = {127F38E0-40AA-4594-B955-5616BF206882} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {C3A2F9D1-7930-4EF4-A6FC-7EE0A99821D0} diff --git a/src/modules/espresso/Espresso/Core/TrayHelper.cs b/src/modules/espresso/Espresso/Core/TrayHelper.cs index 248ab5741e..55bde4447b 100644 --- a/src/modules/espresso/Espresso/Core/TrayHelper.cs +++ b/src/modules/espresso/Espresso/Core/TrayHelper.cs @@ -67,7 +67,7 @@ namespace Espresso.Shell.Core contextMenuStrip.Items.Add(operationContextMenu); #pragma warning disable CS8604 // Possible null reference argument. - Task.Factory.StartNew(() => InitializeTrayIcon(text, APIHelper.Extract("shell32.dll", 42, true), contextMenuStrip)); + Task.Factory.StartNew(() => InitializeTrayIcon(text, APIHelper.Extract("shell32.dll", 12, true), contextMenuStrip)); #pragma warning restore CS8604 // Possible null reference argument. } } diff --git a/src/modules/espresso/Espresso/Espresso.csproj b/src/modules/espresso/Espresso/Espresso.csproj index 93baa75357..4643acd75e 100644 --- a/src/modules/espresso/Espresso/Espresso.csproj +++ b/src/modules/espresso/Espresso/Espresso.csproj @@ -9,6 +9,8 @@ false false true + + true PowerToys.Espresso From 134722370750ae809bcb9afce330a34c1952c7e7 Mon Sep 17 00:00:00 2001 From: Den Delimarsky <1389609+dend@users.noreply.github.com> Date: Sun, 9 May 2021 18:55:56 -0700 Subject: [PATCH 54/81] Update expected words --- .github/actions/spell-check/expect.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/actions/spell-check/expect.txt b/.github/actions/spell-check/expect.txt index 0826878799..1ce28c87ac 100644 --- a/.github/actions/spell-check/expect.txt +++ b/.github/actions/spell-check/expect.txt @@ -1398,6 +1398,7 @@ otating OUTOFCONTEXT OUTOFMEMORY Outptr +outputtype outro OVERLAPPEDWINDOW overlaywindow @@ -2168,6 +2169,8 @@ windowsx windowwalker winerror WINEVENT +winexe +winforms winfx winget Winhook From af4ec9ad8bc40be13a0358fba12f4904c16eab8e Mon Sep 17 00:00:00 2001 From: Den Delimarsky <1389609+dend@users.noreply.github.com> Date: Sun, 9 May 2021 22:25:52 -0700 Subject: [PATCH 55/81] Change how settings and tray are handled. --- .../espresso/Espresso/Core/SettingsHelper.cs | 41 ------ .../espresso/Espresso/Core/TrayHelper.cs | 103 +++++++++++-- src/modules/espresso/Espresso/Espresso.csproj | 1 + .../Espresso/Models/EspressoSettingsModel.cs | 52 ------- src/modules/espresso/Espresso/Program.cs | 139 ++++++++---------- 5 files changed, 152 insertions(+), 184 deletions(-) delete mode 100644 src/modules/espresso/Espresso/Core/SettingsHelper.cs delete mode 100644 src/modules/espresso/Espresso/Models/EspressoSettingsModel.cs diff --git a/src/modules/espresso/Espresso/Core/SettingsHelper.cs b/src/modules/espresso/Espresso/Core/SettingsHelper.cs deleted file mode 100644 index 3a3aabd2f9..0000000000 --- a/src/modules/espresso/Espresso/Core/SettingsHelper.cs +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation -// The Microsoft Corporation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.IO; -using System.Runtime.InteropServices; -using System.Threading; - -namespace Espresso.Shell.Core -{ - public class SettingsHelper - { - const int ERROR_SHARING_VIOLATION = 32; - const int ERROR_LOCK_VIOLATION = 33; - - public static FileStream? GetSettingsFile(string path, int retries) - { - for (int i = 0; i < retries; i++) - { - try - { - FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read, FileShare.None); - return fileStream; - } - catch (IOException ex) - { - var errorCode = Marshal.GetHRForException(ex) & ((1 << 16) - 1); - if (errorCode == ERROR_SHARING_VIOLATION || errorCode == ERROR_LOCK_VIOLATION) - { - Console.WriteLine("There was another process using the file, so couldn't pick the settings up."); - } - - Thread.Sleep(50); - } - } - - return null; - } - } -} diff --git a/src/modules/espresso/Espresso/Core/TrayHelper.cs b/src/modules/espresso/Espresso/Core/TrayHelper.cs index 55bde4447b..1d0472ee6e 100644 --- a/src/modules/espresso/Espresso/Core/TrayHelper.cs +++ b/src/modules/espresso/Espresso/Core/TrayHelper.cs @@ -2,36 +2,76 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using Espresso.Shell.Models; +using Microsoft.PowerToys.Settings.UI.Library; +using Newtonsoft.Json; using System; using System.Drawing; -using System.Threading.Tasks; using System.Windows.Forms; +#pragma warning disable CS8602 // Dereference of a possibly null reference. +#pragma warning disable CS8603 // Possible null reference return. + namespace Espresso.Shell.Core { internal static class TrayHelper { - static NotifyIcon trayIcon; + static NotifyIcon? trayIcon; + private static NotifyIcon TrayIcon { get => trayIcon; set => trayIcon = value; } + + static SettingsUtils? moduleSettings; + private static SettingsUtils ModuleSettings { get => moduleSettings; set => moduleSettings = value; } + static TrayHelper() { - trayIcon = new NotifyIcon(); + TrayIcon = new NotifyIcon(); + ModuleSettings = new SettingsUtils(); } - private static void InitializeTrayIcon(string text, Icon icon, ContextMenuStrip contextMenu) + public static void InitializeTray(string text, Icon icon, ContextMenuStrip? contextMenu) { - trayIcon.Text = text; - trayIcon.Icon = icon; - trayIcon.ContextMenuStrip = contextMenu; - trayIcon.Visible = true; + System.Threading.Tasks.Task.Factory.StartNew((tray) => + { + ((NotifyIcon?)tray).Text = text; + ((NotifyIcon?)tray).Icon = icon; + ((NotifyIcon?)tray).ContextMenuStrip = contextMenu; + ((NotifyIcon?)tray).Visible = true; - Application.Run(); + Application.Run(); + }, TrayIcon); } - internal static void InitializeEspressoTray(string text, EspressoMode mode, bool keepDisplayOn, Action indefiniteSelectionCallback, Action timedSelectionCallback) + internal static void SetTray(string text, EspressoSettings settings) + { + SetTray(text, settings.Properties.KeepDisplayOn.Value, settings.Properties.Mode, settings.Properties.Hours.Value, settings.Properties.Minutes.Value, + () => { + // Set indefinite keep awake. + var currentSettings = ModuleSettings.GetSettings(text); + currentSettings.Properties.Mode = EspressoMode.INDEFINITE; + ModuleSettings.SaveSettings(JsonConvert.SerializeObject(currentSettings), text); + }, + () => { + // Set timed keep awake. + var currentSettings = ModuleSettings.GetSettings(text); + currentSettings.Properties.Mode = EspressoMode.TIMED; + currentSettings.Properties.Hours.Value = settings.Properties.Hours.Value; + currentSettings.Properties.Minutes.Value = settings.Properties.Minutes.Value; + + ModuleSettings.SaveSettings(JsonConvert.SerializeObject(currentSettings), text); + }, + () => + { + // Just changing the display mode. + var currentSettings = ModuleSettings.GetSettings(text); + currentSettings.Properties.KeepDisplayOn = settings.Properties.KeepDisplayOn; + + ModuleSettings.SaveSettings(JsonConvert.SerializeObject(currentSettings), text); + }); + } + + internal static void SetTray(string text, bool keepDisplayOn, EspressoMode mode, int hours, int minutes, Action indefiniteKeepAwakeCallback, Action timedKeepAwakeCallback, Action keepDisplayOnCallback) { var contextMenuStrip = new ContextMenuStrip(); - + // Main toolstrip. var operationContextMenu = new ToolStripMenuItem(); operationContextMenu.Text = "Mode"; @@ -39,10 +79,28 @@ namespace Espresso.Shell.Core // Indefinite keep-awake menu item. var indefiniteMenuItem = new ToolStripMenuItem(); indefiniteMenuItem.Text = "Indefinite"; + if (mode == EspressoMode.INDEFINITE) { indefiniteMenuItem.Checked = true; } + indefiniteMenuItem.Click += (e, s) => + { + // User opted to set the mode to indefinite, so we need to write new settings. + indefiniteKeepAwakeCallback(); + }; + + var displayOnMenuItem = new ToolStripMenuItem(); + displayOnMenuItem.Text = "Keep display on"; + if (keepDisplayOn) + { + displayOnMenuItem.Checked = true; + } + displayOnMenuItem.Click += (e, s) => + { + // User opted to set the display mode directly. + keepDisplayOnCallback(); + }; // Timed keep-awake menu item var timedMenuItem = new ToolStripMenuItem(); @@ -50,12 +108,27 @@ namespace Espresso.Shell.Core var halfHourMenuItem = new ToolStripMenuItem(); halfHourMenuItem.Text = "30 minutes"; + halfHourMenuItem.Click += (e, s) => + { + // User is setting the keep-awake to 30 minutes. + timedKeepAwakeCallback(); + }; var oneHourMenuItem = new ToolStripMenuItem(); oneHourMenuItem.Text = "1 hour"; + oneHourMenuItem.Click += (e, s) => + { + // User is setting the keep-awake to 1 hour. + timedKeepAwakeCallback(); + }; var twoHoursMenuItem = new ToolStripMenuItem(); twoHoursMenuItem.Text = "2 hours"; + twoHoursMenuItem.Click += (e, s) => + { + // User is setting the keep-awake to 2 hours. + timedKeepAwakeCallback(); + }; timedMenuItem.DropDownItems.Add(halfHourMenuItem); timedMenuItem.DropDownItems.Add(oneHourMenuItem); @@ -63,12 +136,12 @@ namespace Espresso.Shell.Core operationContextMenu.DropDownItems.Add(indefiniteMenuItem); operationContextMenu.DropDownItems.Add(timedMenuItem); + operationContextMenu.DropDownItems.Add(new ToolStripSeparator()); + operationContextMenu.DropDownItems.Add(displayOnMenuItem); contextMenuStrip.Items.Add(operationContextMenu); -#pragma warning disable CS8604 // Possible null reference argument. - Task.Factory.StartNew(() => InitializeTrayIcon(text, APIHelper.Extract("shell32.dll", 12, true), contextMenuStrip)); -#pragma warning restore CS8604 // Possible null reference argument. + TrayIcon.ContextMenuStrip = contextMenuStrip; } } } diff --git a/src/modules/espresso/Espresso/Espresso.csproj b/src/modules/espresso/Espresso/Espresso.csproj index 4643acd75e..65a7be85cc 100644 --- a/src/modules/espresso/Espresso/Espresso.csproj +++ b/src/modules/espresso/Espresso/Espresso.csproj @@ -49,6 +49,7 @@ + diff --git a/src/modules/espresso/Espresso/Models/EspressoSettingsModel.cs b/src/modules/espresso/Espresso/Models/EspressoSettingsModel.cs deleted file mode 100644 index db9263dac5..0000000000 --- a/src/modules/espresso/Espresso/Models/EspressoSettingsModel.cs +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation -// The Microsoft Corporation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using Newtonsoft.Json; - -namespace Espresso.Shell.Models -{ - public enum EspressoMode - { - INDEFINITE = 0, - TIMED = 1, - } - - public class EspressoSettingsModel - { - [JsonProperty("properties")] - public Properties? Properties { get; set; } - [JsonProperty("name")] - public string? Name { get; set; } - [JsonProperty("version")] - public string? Version { get; set; } - } - - public class Properties - { - [JsonProperty("espresso_keep_display_on")] - public KeepDisplayOn? KeepDisplayOn { get; set; } - [JsonProperty("espresso_mode")] - public EspressoMode Mode { get; set; } - [JsonProperty("espresso_hours")] - public Hours? Hours { get; set; } - [JsonProperty("espresso_minutes")] - public Minutes? Minutes { get; set; } - } - - public class KeepDisplayOn - { - public bool Value { get; set; } - } - - public class Hours - { - public int Value { get; set; } - } - - public class Minutes - { - public int Value { get; set; } - } - -} diff --git a/src/modules/espresso/Espresso/Program.cs b/src/modules/espresso/Espresso/Program.cs index acfeb0955b..1d0dc6695e 100644 --- a/src/modules/espresso/Espresso/Program.cs +++ b/src/modules/espresso/Espresso/Program.cs @@ -3,8 +3,8 @@ // See the LICENSE file in the project root for more information. using Espresso.Shell.Core; -using Espresso.Shell.Models; using ManagedCommon; +using Microsoft.PowerToys.Settings.UI.Library; using Newtonsoft.Json; using NLog; using System; @@ -19,7 +19,6 @@ using System.Reflection; using System.Threading; #pragma warning disable CS8602 // Dereference of a possibly null reference. -#pragma warning disable CS8600 // Converting null literal or possible null value to non-nullable type. #pragma warning disable CS8603 // Possible null reference return. namespace Espresso.Shell @@ -29,6 +28,7 @@ namespace Espresso.Shell private static Mutex? mutex = null; private const string appName = "Espresso"; private static FileSystemWatcher? watcher = null; + private static SettingsUtils? settingsUtils = null; public static Mutex Mutex { get => mutex; set => mutex = value; } @@ -45,7 +45,8 @@ namespace Espresso.Shell } log = LogManager.GetCurrentClassLogger(); - + settingsUtils = new SettingsUtils(); + log.Info("Launching Espresso..."); log.Info(FileVersionInfo.GetVersionInfo(Assembly.GetExecutingAssembly().Location).FileVersion); log.Debug($"OS: {Environment.OSVersion}"); @@ -158,7 +159,7 @@ namespace Espresso.Shell // Initially the file might not be updated, so we need to start processing // settings right away. - ProcessSettings(config); + ProcessSettings(); } catch (Exception ex) { @@ -171,23 +172,12 @@ namespace Espresso.Shell { if (timeLimit <= 0) { - // Indefinite keep awake. - bool success = APIHelper.SetIndefiniteKeepAwake(displayOn); - if (success) - { - log.Info($"Currently in indefinite keep awake. Display always on: {displayOn}"); - } - else - { - var errorMessage = "Could not set up the state to be indefinite keep awake."; - log.Info(errorMessage); - log.Debug(errorMessage); - } + SetupIndefiniteKeepAwake(displayOn); } else { // Timed keep-awake. - APIHelper.SetTimedKeepAwake(timeLimit, LogTimedKeepAwakeCompletion, LogUnexpectedOrCancelledKeepAwakeCompletion, displayOn); + SetupTimedKeepAwake(timeLimit, displayOn); } } @@ -199,87 +189,78 @@ namespace Espresso.Shell }); } - TrayHelper.InitializeEspressoTray("Espresso", EspressoMode.INDEFINITE, true, new Action(()=>Console.WriteLine("test")), new Action(() => Console.WriteLine("test"))); +#pragma warning disable CS8604 // Possible null reference argument. + TrayHelper.InitializeTray(appName, APIHelper.Extract("shell32.dll", 21, true), null); +#pragma warning restore CS8604 // Possible null reference argument. new ManualResetEvent(false).WaitOne(); } + private static void SetupIndefiniteKeepAwake(bool displayOn) + { + // Indefinite keep awake. + bool success = APIHelper.SetIndefiniteKeepAwake(displayOn); + if (success) + { + log.Info($"Currently in indefinite keep awake. Display always on: {displayOn}"); + } + else + { + var errorMessage = "Could not set up the state to be indefinite keep awake."; + log.Info(errorMessage); + log.Debug(errorMessage); + } + } + private static void HandleEspressoConfigChange(FileSystemEventArgs fileEvent) { log.Info("Detected a settings file change. Updating configuration..."); log.Info("Resetting keep-awake to normal state due to settings change."); ResetNormalPowerState(); - ProcessSettings(fileEvent.FullPath); + ProcessSettings(); } - private static void ProcessSettings(string fullPath) + private static void ProcessSettings() { try { - EspressoSettingsModel settings = null; + EspressoSettings settings = settingsUtils.GetSettings(appName); - var fileStream = SettingsHelper.GetSettingsFile(fullPath, 3); - if (fileStream != null) + if (settings != null) { - using (fileStream) + // If the settings were successfully processed, we need to set the right mode of operation. + // INDEFINITE = 0 + // TIMED = 1 + switch (settings.Properties.Mode) { - using StreamReader reader = new StreamReader(fileStream); + case EspressoMode.INDEFINITE: + { + // Indefinite keep awake. + SetupIndefiniteKeepAwake(settings.Properties.KeepDisplayOn.Value); + break; + } + case EspressoMode.TIMED: + { + // Timed keep-awake. + long computedTime = (settings.Properties.Hours.Value * 60 * 60) + (settings.Properties.Minutes.Value * 60); + SetupTimedKeepAwake(computedTime, settings.Properties.KeepDisplayOn.Value); - settings = JsonConvert.DeserializeObject(reader.ReadToEnd()); + break; + } + default: + { + var errorMessage = "Unknown mode of operation. Check config file."; + log.Info(errorMessage); + log.Debug(errorMessage); + break; + } } - if (settings != null) - { - // If the settings were successfully processed, we need to set the right mode of operation. - // INDEFINITE = 0 - // TIMED = 1 - switch (settings.Properties.Mode) - { - case EspressoMode.INDEFINITE: - { - // Indefinite keep awake. - bool success = APIHelper.SetIndefiniteKeepAwake(settings.Properties.KeepDisplayOn.Value); - if (success) - { - log.Info($"Indefinite keep-awake. Display always on: {settings.Properties.KeepDisplayOn.Value}"); - } - else - { - var errorMessage = "Could not set up the state to be indefinite keep-awake."; - log.Info(errorMessage); - log.Debug(errorMessage); - } - break; - } - case EspressoMode.TIMED: - { - // Timed keep-awake. - long computedTime = (settings.Properties.Hours.Value * 60 * 60) + (settings.Properties.Minutes.Value * 60); - log.Info($"Timed keep-awake. Expected runtime: {computedTime} seconds."); - - APIHelper.SetTimedKeepAwake(computedTime, LogTimedKeepAwakeCompletion, LogUnexpectedOrCancelledKeepAwakeCompletion, settings.Properties.KeepDisplayOn.Value); - - break; - } - default: - { - var errorMessage= "Unknown mode of operation. Check config file."; - log.Info(errorMessage); - log.Debug(errorMessage); - break; - } - } - } - else - { - var errorMessage = "Settings are null."; - log.Info(errorMessage); - log.Debug(errorMessage); - } + TrayHelper.SetTray(appName, settings); } else { - var errorMessage = "Could not get handle on file."; + var errorMessage = "Settings are null."; log.Info(errorMessage); log.Debug(errorMessage); } @@ -289,10 +270,16 @@ namespace Espresso.Shell var errorMessage = $"There was a problem reading the configuration file. Error: {ex.Message}"; log.Info(errorMessage); log.Debug(errorMessage); - log.Debug($"Configuration path: {fullPath}"); } } + private static void SetupTimedKeepAwake(long time, bool displayOn) + { + log.Info($"Timed keep-awake. Expected runtime: {time} seconds."); + + APIHelper.SetTimedKeepAwake(time, LogTimedKeepAwakeCompletion, LogUnexpectedOrCancelledKeepAwakeCompletion, displayOn); + } + private static void LogUnexpectedOrCancelledKeepAwakeCompletion() { var errorMessage = "The keep-awake thread was terminated early."; From d8762a8ed8905259e39112eda5846aa9b3f28304 Mon Sep 17 00:00:00 2001 From: Clint Rutkas Date: Mon, 10 May 2021 11:56:01 -0700 Subject: [PATCH 56/81] removing AnyCPU --- PowerToys.sln | 174 -------------------------------------------------- 1 file changed, 174 deletions(-) diff --git a/PowerToys.sln b/PowerToys.sln index 304512217a..bdd7d9c1eb 100644 --- a/PowerToys.sln +++ b/PowerToys.sln @@ -332,522 +332,348 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Espresso", "src\modules\esp EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU Debug|x64 = Debug|x64 - Release|Any CPU = Release|Any CPU Release|x64 = Release|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {9412D5C6-2CF2-4FC2-A601-B55508EA9B27}.Debug|Any CPU.ActiveCfg = Debug|x64 {9412D5C6-2CF2-4FC2-A601-B55508EA9B27}.Debug|x64.ActiveCfg = Debug|x64 {9412D5C6-2CF2-4FC2-A601-B55508EA9B27}.Debug|x64.Build.0 = Debug|x64 - {9412D5C6-2CF2-4FC2-A601-B55508EA9B27}.Release|Any CPU.ActiveCfg = Release|x64 {9412D5C6-2CF2-4FC2-A601-B55508EA9B27}.Release|x64.ActiveCfg = Release|x64 {9412D5C6-2CF2-4FC2-A601-B55508EA9B27}.Release|x64.Build.0 = Release|x64 - {A46629C4-1A6C-40FA-A8B6-10E5102BB0BA}.Debug|Any CPU.ActiveCfg = Debug|x64 {A46629C4-1A6C-40FA-A8B6-10E5102BB0BA}.Debug|x64.ActiveCfg = Debug|x64 {A46629C4-1A6C-40FA-A8B6-10E5102BB0BA}.Debug|x64.Build.0 = Debug|x64 - {A46629C4-1A6C-40FA-A8B6-10E5102BB0BA}.Release|Any CPU.ActiveCfg = Release|x64 {A46629C4-1A6C-40FA-A8B6-10E5102BB0BA}.Release|x64.ActiveCfg = Release|x64 {A46629C4-1A6C-40FA-A8B6-10E5102BB0BA}.Release|x64.Build.0 = Release|x64 - {F9C68EDF-AC74-4B77-9AF1-005D9C9F6A99}.Debug|Any CPU.ActiveCfg = Debug|x64 {F9C68EDF-AC74-4B77-9AF1-005D9C9F6A99}.Debug|x64.ActiveCfg = Debug|x64 {F9C68EDF-AC74-4B77-9AF1-005D9C9F6A99}.Debug|x64.Build.0 = Debug|x64 - {F9C68EDF-AC74-4B77-9AF1-005D9C9F6A99}.Release|Any CPU.ActiveCfg = Release|x64 {F9C68EDF-AC74-4B77-9AF1-005D9C9F6A99}.Release|x64.ActiveCfg = Release|x64 {F9C68EDF-AC74-4B77-9AF1-005D9C9F6A99}.Release|x64.Build.0 = Release|x64 - {48804216-2A0E-4168-A6D8-9CD068D14227}.Debug|Any CPU.ActiveCfg = Debug|x64 {48804216-2A0E-4168-A6D8-9CD068D14227}.Debug|x64.ActiveCfg = Debug|x64 {48804216-2A0E-4168-A6D8-9CD068D14227}.Debug|x64.Build.0 = Debug|x64 - {48804216-2A0E-4168-A6D8-9CD068D14227}.Release|Any CPU.ActiveCfg = Release|x64 {48804216-2A0E-4168-A6D8-9CD068D14227}.Release|x64.ActiveCfg = Release|x64 {48804216-2A0E-4168-A6D8-9CD068D14227}.Release|x64.Build.0 = Release|x64 - {9C6A7905-72D4-4BF5-B256-ABFDAEF68AE9}.Debug|Any CPU.ActiveCfg = Debug|x64 {9C6A7905-72D4-4BF5-B256-ABFDAEF68AE9}.Debug|x64.ActiveCfg = Debug|x64 {9C6A7905-72D4-4BF5-B256-ABFDAEF68AE9}.Debug|x64.Build.0 = Debug|x64 - {9C6A7905-72D4-4BF5-B256-ABFDAEF68AE9}.Release|Any CPU.ActiveCfg = Release|x64 {9C6A7905-72D4-4BF5-B256-ABFDAEF68AE9}.Release|x64.ActiveCfg = Release|x64 {9C6A7905-72D4-4BF5-B256-ABFDAEF68AE9}.Release|x64.Build.0 = Release|x64 - {1A066C63-64B3-45F8-92FE-664E1CCE8077}.Debug|Any CPU.ActiveCfg = Debug|x64 {1A066C63-64B3-45F8-92FE-664E1CCE8077}.Debug|x64.ActiveCfg = Debug|x64 {1A066C63-64B3-45F8-92FE-664E1CCE8077}.Debug|x64.Build.0 = Debug|x64 - {1A066C63-64B3-45F8-92FE-664E1CCE8077}.Release|Any CPU.ActiveCfg = Release|x64 {1A066C63-64B3-45F8-92FE-664E1CCE8077}.Release|x64.ActiveCfg = Release|x64 {1A066C63-64B3-45F8-92FE-664E1CCE8077}.Release|x64.Build.0 = Release|x64 - {5CCC8468-DEC8-4D36-99D4-5C891BEBD481}.Debug|Any CPU.ActiveCfg = Debug|x64 {5CCC8468-DEC8-4D36-99D4-5C891BEBD481}.Debug|x64.ActiveCfg = Debug|x64 {5CCC8468-DEC8-4D36-99D4-5C891BEBD481}.Debug|x64.Build.0 = Debug|x64 - {5CCC8468-DEC8-4D36-99D4-5C891BEBD481}.Release|Any CPU.ActiveCfg = Release|x64 {5CCC8468-DEC8-4D36-99D4-5C891BEBD481}.Release|x64.ActiveCfg = Release|x64 {5CCC8468-DEC8-4D36-99D4-5C891BEBD481}.Release|x64.Build.0 = Release|x64 - {B25AC7A5-FB9F-4789-B392-D5C85E948670}.Debug|Any CPU.ActiveCfg = Debug|x64 {B25AC7A5-FB9F-4789-B392-D5C85E948670}.Debug|x64.ActiveCfg = Debug|x64 {B25AC7A5-FB9F-4789-B392-D5C85E948670}.Debug|x64.Build.0 = Debug|x64 - {B25AC7A5-FB9F-4789-B392-D5C85E948670}.Release|Any CPU.ActiveCfg = Release|x64 {B25AC7A5-FB9F-4789-B392-D5C85E948670}.Release|x64.ActiveCfg = Release|x64 {B25AC7A5-FB9F-4789-B392-D5C85E948670}.Release|x64.Build.0 = Release|x64 - {51920F1F-C28C-4ADF-8660-4238766796C2}.Debug|Any CPU.ActiveCfg = Debug|x64 {51920F1F-C28C-4ADF-8660-4238766796C2}.Debug|x64.ActiveCfg = Debug|x64 {51920F1F-C28C-4ADF-8660-4238766796C2}.Debug|x64.Build.0 = Debug|x64 - {51920F1F-C28C-4ADF-8660-4238766796C2}.Release|Any CPU.ActiveCfg = Release|x64 {51920F1F-C28C-4ADF-8660-4238766796C2}.Release|x64.ActiveCfg = Release|x64 {51920F1F-C28C-4ADF-8660-4238766796C2}.Release|x64.Build.0 = Release|x64 - {0E072714-D127-460B-AFAD-B4C40B412798}.Debug|Any CPU.ActiveCfg = Debug|x64 {0E072714-D127-460B-AFAD-B4C40B412798}.Debug|x64.ActiveCfg = Debug|x64 {0E072714-D127-460B-AFAD-B4C40B412798}.Debug|x64.Build.0 = Debug|x64 - {0E072714-D127-460B-AFAD-B4C40B412798}.Release|Any CPU.ActiveCfg = Release|x64 {0E072714-D127-460B-AFAD-B4C40B412798}.Release|x64.ActiveCfg = Release|x64 {0E072714-D127-460B-AFAD-B4C40B412798}.Release|x64.Build.0 = Release|x64 - {A3935CF4-46C5-4A88-84D3-6B12E16E6BA2}.Debug|Any CPU.ActiveCfg = Debug|x64 {A3935CF4-46C5-4A88-84D3-6B12E16E6BA2}.Debug|x64.ActiveCfg = Debug|x64 {A3935CF4-46C5-4A88-84D3-6B12E16E6BA2}.Debug|x64.Build.0 = Debug|x64 - {A3935CF4-46C5-4A88-84D3-6B12E16E6BA2}.Release|Any CPU.ActiveCfg = Release|x64 {A3935CF4-46C5-4A88-84D3-6B12E16E6BA2}.Release|x64.ActiveCfg = Release|x64 {A3935CF4-46C5-4A88-84D3-6B12E16E6BA2}.Release|x64.Build.0 = Release|x64 - {2151F984-E006-4A9F-92EF-C6DDE3DC8413}.Debug|Any CPU.ActiveCfg = Debug|x64 {2151F984-E006-4A9F-92EF-C6DDE3DC8413}.Debug|x64.ActiveCfg = Debug|x64 {2151F984-E006-4A9F-92EF-C6DDE3DC8413}.Debug|x64.Build.0 = Debug|x64 - {2151F984-E006-4A9F-92EF-C6DDE3DC8413}.Release|Any CPU.ActiveCfg = Release|x64 {2151F984-E006-4A9F-92EF-C6DDE3DC8413}.Release|x64.ActiveCfg = Release|x64 {2151F984-E006-4A9F-92EF-C6DDE3DC8413}.Release|x64.Build.0 = Release|x64 - {64A80062-4D8B-4229-8A38-DFA1D7497749}.Debug|Any CPU.ActiveCfg = Debug|x64 {64A80062-4D8B-4229-8A38-DFA1D7497749}.Debug|x64.ActiveCfg = Debug|x64 {64A80062-4D8B-4229-8A38-DFA1D7497749}.Debug|x64.Build.0 = Debug|x64 - {64A80062-4D8B-4229-8A38-DFA1D7497749}.Release|Any CPU.ActiveCfg = Release|x64 {64A80062-4D8B-4229-8A38-DFA1D7497749}.Release|x64.ActiveCfg = Release|x64 {64A80062-4D8B-4229-8A38-DFA1D7497749}.Release|x64.Build.0 = Release|x64 - {0485F45C-EA7A-4BB5-804B-3E8D14699387}.Debug|Any CPU.ActiveCfg = Debug|x64 {0485F45C-EA7A-4BB5-804B-3E8D14699387}.Debug|x64.ActiveCfg = Debug|x64 {0485F45C-EA7A-4BB5-804B-3E8D14699387}.Debug|x64.Build.0 = Debug|x64 - {0485F45C-EA7A-4BB5-804B-3E8D14699387}.Release|Any CPU.ActiveCfg = Release|x64 {0485F45C-EA7A-4BB5-804B-3E8D14699387}.Release|x64.ActiveCfg = Release|x64 {0485F45C-EA7A-4BB5-804B-3E8D14699387}.Release|x64.Build.0 = Release|x64 - {89F34AF7-1C34-4A72-AA6E-534BCF972BD9}.Debug|Any CPU.ActiveCfg = Debug|x64 {89F34AF7-1C34-4A72-AA6E-534BCF972BD9}.Debug|x64.ActiveCfg = Debug|x64 {89F34AF7-1C34-4A72-AA6E-534BCF972BD9}.Debug|x64.Build.0 = Debug|x64 - {89F34AF7-1C34-4A72-AA6E-534BCF972BD9}.Release|Any CPU.ActiveCfg = Release|x64 {89F34AF7-1C34-4A72-AA6E-534BCF972BD9}.Release|x64.ActiveCfg = Release|x64 {89F34AF7-1C34-4A72-AA6E-534BCF972BD9}.Release|x64.Build.0 = Release|x64 - {2BE46397-4DFA-414C-9BD4-41E4BBF8CB34}.Debug|Any CPU.ActiveCfg = Debug|x64 {2BE46397-4DFA-414C-9BD4-41E4BBF8CB34}.Debug|x64.ActiveCfg = Debug|x64 {2BE46397-4DFA-414C-9BD4-41E4BBF8CB34}.Debug|x64.Build.0 = Debug|x64 - {2BE46397-4DFA-414C-9BD4-41E4BBF8CB34}.Release|Any CPU.ActiveCfg = Release|x64 {2BE46397-4DFA-414C-9BD4-41E4BBF8CB34}.Release|x64.ActiveCfg = Release|x64 {2BE46397-4DFA-414C-9BD4-41E4BBF8CB34}.Release|x64.Build.0 = Release|x64 - {0B43679E-EDFA-4DA0-AD30-F4628B308B1B}.Debug|Any CPU.ActiveCfg = Debug|x64 {0B43679E-EDFA-4DA0-AD30-F4628B308B1B}.Debug|x64.ActiveCfg = Debug|x64 {0B43679E-EDFA-4DA0-AD30-F4628B308B1B}.Debug|x64.Build.0 = Debug|x64 - {0B43679E-EDFA-4DA0-AD30-F4628B308B1B}.Release|Any CPU.ActiveCfg = Release|x64 {0B43679E-EDFA-4DA0-AD30-F4628B308B1B}.Release|x64.ActiveCfg = Release|x64 {0B43679E-EDFA-4DA0-AD30-F4628B308B1B}.Release|x64.Build.0 = Release|x64 - {E0CC7526-D85E-43AC-844F-D5DF0D2F5AB8}.Debug|Any CPU.ActiveCfg = Debug|x64 {E0CC7526-D85E-43AC-844F-D5DF0D2F5AB8}.Debug|x64.ActiveCfg = Debug|x64 {E0CC7526-D85E-43AC-844F-D5DF0D2F5AB8}.Debug|x64.Build.0 = Debug|x64 - {E0CC7526-D85E-43AC-844F-D5DF0D2F5AB8}.Release|Any CPU.ActiveCfg = Release|x64 {E0CC7526-D85E-43AC-844F-D5DF0D2F5AB8}.Release|x64.ActiveCfg = Release|x64 {E0CC7526-D85E-43AC-844F-D5DF0D2F5AB8}.Release|x64.Build.0 = Release|x64 - {D29DDD63-E2CF-4657-9FD5-2AEDE4257E5D}.Debug|Any CPU.ActiveCfg = Debug|x64 {D29DDD63-E2CF-4657-9FD5-2AEDE4257E5D}.Debug|x64.ActiveCfg = Debug|x64 {D29DDD63-E2CF-4657-9FD5-2AEDE4257E5D}.Debug|x64.Build.0 = Debug|x64 - {D29DDD63-E2CF-4657-9FD5-2AEDE4257E5D}.Release|Any CPU.ActiveCfg = Release|x64 {D29DDD63-E2CF-4657-9FD5-2AEDE4257E5D}.Release|x64.ActiveCfg = Release|x64 {D29DDD63-E2CF-4657-9FD5-2AEDE4257E5D}.Release|x64.Build.0 = Release|x64 - {17DA04DF-E393-4397-9CF0-84DABE11032E}.Debug|Any CPU.ActiveCfg = Debug|x64 {17DA04DF-E393-4397-9CF0-84DABE11032E}.Debug|x64.ActiveCfg = Debug|x64 {17DA04DF-E393-4397-9CF0-84DABE11032E}.Debug|x64.Build.0 = Debug|x64 - {17DA04DF-E393-4397-9CF0-84DABE11032E}.Release|Any CPU.ActiveCfg = Release|x64 {17DA04DF-E393-4397-9CF0-84DABE11032E}.Release|x64.ActiveCfg = Release|x64 {17DA04DF-E393-4397-9CF0-84DABE11032E}.Release|x64.Build.0 = Release|x64 - {8AFFA899-0B73-49EC-8C50-0FADDA57B2FC}.Debug|Any CPU.ActiveCfg = Debug|x64 {8AFFA899-0B73-49EC-8C50-0FADDA57B2FC}.Debug|x64.ActiveCfg = Debug|x64 {8AFFA899-0B73-49EC-8C50-0FADDA57B2FC}.Debug|x64.Build.0 = Debug|x64 - {8AFFA899-0B73-49EC-8C50-0FADDA57B2FC}.Release|Any CPU.ActiveCfg = Release|x64 {8AFFA899-0B73-49EC-8C50-0FADDA57B2FC}.Release|x64.ActiveCfg = Release|x64 {8AFFA899-0B73-49EC-8C50-0FADDA57B2FC}.Release|x64.Build.0 = Release|x64 - {4FD29318-A8AB-4D8F-AA47-60BC241B8DA3}.Debug|Any CPU.ActiveCfg = Debug|x64 {4FD29318-A8AB-4D8F-AA47-60BC241B8DA3}.Debug|x64.ActiveCfg = Debug|x64 {4FD29318-A8AB-4D8F-AA47-60BC241B8DA3}.Debug|x64.Build.0 = Debug|x64 - {4FD29318-A8AB-4D8F-AA47-60BC241B8DA3}.Release|Any CPU.ActiveCfg = Release|x64 {4FD29318-A8AB-4D8F-AA47-60BC241B8DA3}.Release|x64.ActiveCfg = Release|x64 {4FD29318-A8AB-4D8F-AA47-60BC241B8DA3}.Release|x64.Build.0 = Release|x64 - {8451ECDD-2EA4-4966-BB0A-7BBC40138E80}.Debug|Any CPU.ActiveCfg = Debug|x64 {8451ECDD-2EA4-4966-BB0A-7BBC40138E80}.Debug|x64.ActiveCfg = Debug|x64 {8451ECDD-2EA4-4966-BB0A-7BBC40138E80}.Debug|x64.Build.0 = Debug|x64 - {8451ECDD-2EA4-4966-BB0A-7BBC40138E80}.Release|Any CPU.ActiveCfg = Release|x64 {8451ECDD-2EA4-4966-BB0A-7BBC40138E80}.Release|x64.ActiveCfg = Release|x64 {8451ECDD-2EA4-4966-BB0A-7BBC40138E80}.Release|x64.Build.0 = Release|x64 - {FF742965-9A80-41A5-B042-D6C7D3A21708}.Debug|Any CPU.ActiveCfg = Debug|x64 {FF742965-9A80-41A5-B042-D6C7D3A21708}.Debug|x64.ActiveCfg = Debug|x64 {FF742965-9A80-41A5-B042-D6C7D3A21708}.Debug|x64.Build.0 = Debug|x64 - {FF742965-9A80-41A5-B042-D6C7D3A21708}.Release|Any CPU.ActiveCfg = Release|x64 {FF742965-9A80-41A5-B042-D6C7D3A21708}.Release|x64.ActiveCfg = Release|x64 {FF742965-9A80-41A5-B042-D6C7D3A21708}.Release|x64.Build.0 = Release|x64 - {59BD9891-3837-438A-958D-ADC7F91F6F7E}.Debug|Any CPU.ActiveCfg = Debug|x64 {59BD9891-3837-438A-958D-ADC7F91F6F7E}.Debug|x64.ActiveCfg = Debug|x64 {59BD9891-3837-438A-958D-ADC7F91F6F7E}.Debug|x64.Build.0 = Debug|x64 - {59BD9891-3837-438A-958D-ADC7F91F6F7E}.Release|Any CPU.ActiveCfg = Release|x64 {59BD9891-3837-438A-958D-ADC7F91F6F7E}.Release|x64.ActiveCfg = Release|x64 {59BD9891-3837-438A-958D-ADC7F91F6F7E}.Release|x64.Build.0 = Release|x64 - {4D971245-7A70-41D5-BAA0-DDB5684CAF51}.Debug|Any CPU.ActiveCfg = Debug|x64 {4D971245-7A70-41D5-BAA0-DDB5684CAF51}.Debug|x64.ActiveCfg = Debug|x64 {4D971245-7A70-41D5-BAA0-DDB5684CAF51}.Debug|x64.Build.0 = Debug|x64 - {4D971245-7A70-41D5-BAA0-DDB5684CAF51}.Release|Any CPU.ActiveCfg = Release|x64 {4D971245-7A70-41D5-BAA0-DDB5684CAF51}.Release|x64.ActiveCfg = Release|x64 {4D971245-7A70-41D5-BAA0-DDB5684CAF51}.Release|x64.Build.0 = Release|x64 - {74F1B9ED-F59C-4FE7-B473-7B453E30837E}.Debug|Any CPU.ActiveCfg = Debug|x64 {74F1B9ED-F59C-4FE7-B473-7B453E30837E}.Debug|x64.ActiveCfg = Debug|x64 {74F1B9ED-F59C-4FE7-B473-7B453E30837E}.Debug|x64.Build.0 = Debug|x64 - {74F1B9ED-F59C-4FE7-B473-7B453E30837E}.Release|Any CPU.ActiveCfg = Release|x64 {74F1B9ED-F59C-4FE7-B473-7B453E30837E}.Release|x64.ActiveCfg = Release|x64 {74F1B9ED-F59C-4FE7-B473-7B453E30837E}.Release|x64.Build.0 = Release|x64 - {FDB3555B-58EF-4AE6-B5F1-904719637AB4}.Debug|Any CPU.ActiveCfg = Debug|x64 {FDB3555B-58EF-4AE6-B5F1-904719637AB4}.Debug|x64.ActiveCfg = Debug|x64 {FDB3555B-58EF-4AE6-B5F1-904719637AB4}.Debug|x64.Build.0 = Debug|x64 - {FDB3555B-58EF-4AE6-B5F1-904719637AB4}.Release|Any CPU.ActiveCfg = Release|x64 {FDB3555B-58EF-4AE6-B5F1-904719637AB4}.Release|x64.ActiveCfg = Release|x64 {FDB3555B-58EF-4AE6-B5F1-904719637AB4}.Release|x64.Build.0 = Release|x64 - {C21BFF9C-2C99-4B5F-B7C9-A5E6DDDB37B0}.Debug|Any CPU.ActiveCfg = Debug|x64 {C21BFF9C-2C99-4B5F-B7C9-A5E6DDDB37B0}.Debug|x64.ActiveCfg = Debug|x64 {C21BFF9C-2C99-4B5F-B7C9-A5E6DDDB37B0}.Debug|x64.Build.0 = Debug|x64 - {C21BFF9C-2C99-4B5F-B7C9-A5E6DDDB37B0}.Release|Any CPU.ActiveCfg = Release|x64 {C21BFF9C-2C99-4B5F-B7C9-A5E6DDDB37B0}.Release|x64.ActiveCfg = Release|x64 {C21BFF9C-2C99-4B5F-B7C9-A5E6DDDB37B0}.Release|x64.Build.0 = Release|x64 - {F8B870EB-D5F5-45BA-9CF7-A5C459818820}.Debug|Any CPU.ActiveCfg = Debug|x64 {F8B870EB-D5F5-45BA-9CF7-A5C459818820}.Debug|x64.ActiveCfg = Debug|x64 {F8B870EB-D5F5-45BA-9CF7-A5C459818820}.Debug|x64.Build.0 = Debug|x64 - {F8B870EB-D5F5-45BA-9CF7-A5C459818820}.Release|Any CPU.ActiveCfg = Release|x64 {F8B870EB-D5F5-45BA-9CF7-A5C459818820}.Release|x64.ActiveCfg = Release|x64 {F8B870EB-D5F5-45BA-9CF7-A5C459818820}.Release|x64.Build.0 = Release|x64 - {E364F67B-BB12-4E91-B639-355866EBCD8B}.Debug|Any CPU.ActiveCfg = Debug|x64 {E364F67B-BB12-4E91-B639-355866EBCD8B}.Debug|x64.ActiveCfg = Debug|x64 {E364F67B-BB12-4E91-B639-355866EBCD8B}.Debug|x64.Build.0 = Debug|x64 - {E364F67B-BB12-4E91-B639-355866EBCD8B}.Release|Any CPU.ActiveCfg = Release|x64 {E364F67B-BB12-4E91-B639-355866EBCD8B}.Release|x64.ActiveCfg = Release|x64 {E364F67B-BB12-4E91-B639-355866EBCD8B}.Release|x64.Build.0 = Release|x64 - {F97E5003-F263-4D4A-A964-0F1F3C82DEF2}.Debug|Any CPU.ActiveCfg = Debug|x64 {F97E5003-F263-4D4A-A964-0F1F3C82DEF2}.Debug|x64.ActiveCfg = Debug|x64 {F97E5003-F263-4D4A-A964-0F1F3C82DEF2}.Debug|x64.Build.0 = Debug|x64 - {F97E5003-F263-4D4A-A964-0F1F3C82DEF2}.Release|Any CPU.ActiveCfg = Release|x64 {F97E5003-F263-4D4A-A964-0F1F3C82DEF2}.Release|x64.ActiveCfg = Release|x64 {F97E5003-F263-4D4A-A964-0F1F3C82DEF2}.Release|x64.Build.0 = Release|x64 - {AF2349B8-E5B6-4004-9502-687C1C7730B1}.Debug|Any CPU.ActiveCfg = Debug|x64 {AF2349B8-E5B6-4004-9502-687C1C7730B1}.Debug|x64.ActiveCfg = Debug|x64 {AF2349B8-E5B6-4004-9502-687C1C7730B1}.Debug|x64.Build.0 = Debug|x64 - {AF2349B8-E5B6-4004-9502-687C1C7730B1}.Release|Any CPU.ActiveCfg = Release|x64 {AF2349B8-E5B6-4004-9502-687C1C7730B1}.Release|x64.ActiveCfg = Release|x64 {AF2349B8-E5B6-4004-9502-687C1C7730B1}.Release|x64.Build.0 = Release|x64 - {6A71162E-FC4C-4A2C-B90F-3CF94F59A9BB}.Debug|Any CPU.ActiveCfg = Debug|x64 {6A71162E-FC4C-4A2C-B90F-3CF94F59A9BB}.Debug|x64.ActiveCfg = Debug|x64 {6A71162E-FC4C-4A2C-B90F-3CF94F59A9BB}.Debug|x64.Build.0 = Debug|x64 - {6A71162E-FC4C-4A2C-B90F-3CF94F59A9BB}.Release|Any CPU.ActiveCfg = Release|x64 {6A71162E-FC4C-4A2C-B90F-3CF94F59A9BB}.Release|x64.ActiveCfg = Release|x64 {6A71162E-FC4C-4A2C-B90F-3CF94F59A9BB}.Release|x64.Build.0 = Release|x64 - {A2B51B8B-8F90-424E-BC97-F9AB7D76CA1A}.Debug|Any CPU.ActiveCfg = Debug|x64 {A2B51B8B-8F90-424E-BC97-F9AB7D76CA1A}.Debug|x64.ActiveCfg = Debug|x64 {A2B51B8B-8F90-424E-BC97-F9AB7D76CA1A}.Debug|x64.Build.0 = Debug|x64 - {A2B51B8B-8F90-424E-BC97-F9AB7D76CA1A}.Release|Any CPU.ActiveCfg = Release|x64 {A2B51B8B-8F90-424E-BC97-F9AB7D76CA1A}.Release|x64.ActiveCfg = Release|x64 {A2B51B8B-8F90-424E-BC97-F9AB7D76CA1A}.Release|x64.Build.0 = Release|x64 - {DA425894-6E13-404F-8DCB-78584EC0557A}.Debug|Any CPU.ActiveCfg = Debug|x64 {DA425894-6E13-404F-8DCB-78584EC0557A}.Debug|x64.ActiveCfg = Debug|x64 {DA425894-6E13-404F-8DCB-78584EC0557A}.Debug|x64.Build.0 = Debug|x64 - {DA425894-6E13-404F-8DCB-78584EC0557A}.Release|Any CPU.ActiveCfg = Release|x64 {DA425894-6E13-404F-8DCB-78584EC0557A}.Release|x64.ActiveCfg = Release|x64 {DA425894-6E13-404F-8DCB-78584EC0557A}.Release|x64.Build.0 = Release|x64 - {060D75DA-2D1C-48E6-A4A1-6F0718B64661}.Debug|Any CPU.ActiveCfg = Debug|x64 {060D75DA-2D1C-48E6-A4A1-6F0718B64661}.Debug|x64.ActiveCfg = Debug|x64 {060D75DA-2D1C-48E6-A4A1-6F0718B64661}.Debug|x64.Build.0 = Debug|x64 - {060D75DA-2D1C-48E6-A4A1-6F0718B64661}.Release|Any CPU.ActiveCfg = Release|x64 {060D75DA-2D1C-48E6-A4A1-6F0718B64661}.Release|x64.ActiveCfg = Release|x64 {060D75DA-2D1C-48E6-A4A1-6F0718B64661}.Release|x64.Build.0 = Release|x64 - {748417CA-F17E-487F-9411-CAFB6D3F4877}.Debug|Any CPU.ActiveCfg = Debug|x64 {748417CA-F17E-487F-9411-CAFB6D3F4877}.Debug|x64.ActiveCfg = Debug|x64 {748417CA-F17E-487F-9411-CAFB6D3F4877}.Debug|x64.Build.0 = Debug|x64 - {748417CA-F17E-487F-9411-CAFB6D3F4877}.Release|Any CPU.ActiveCfg = Release|x64 {748417CA-F17E-487F-9411-CAFB6D3F4877}.Release|x64.ActiveCfg = Release|x64 {748417CA-F17E-487F-9411-CAFB6D3F4877}.Release|x64.Build.0 = Release|x64 - {217DF501-135C-4E38-BFC8-99D4821032EA}.Debug|Any CPU.ActiveCfg = Debug|x64 {217DF501-135C-4E38-BFC8-99D4821032EA}.Debug|x64.ActiveCfg = Debug|x64 {217DF501-135C-4E38-BFC8-99D4821032EA}.Debug|x64.Build.0 = Debug|x64 - {217DF501-135C-4E38-BFC8-99D4821032EA}.Release|Any CPU.ActiveCfg = Release|x64 {217DF501-135C-4E38-BFC8-99D4821032EA}.Release|x64.ActiveCfg = Release|x64 {217DF501-135C-4E38-BFC8-99D4821032EA}.Release|x64.Build.0 = Release|x64 - {47310AB4-9034-4BD1-8D8B-E88AD21A171B}.Debug|Any CPU.ActiveCfg = Debug|x64 {47310AB4-9034-4BD1-8D8B-E88AD21A171B}.Debug|x64.ActiveCfg = Debug|x64 {47310AB4-9034-4BD1-8D8B-E88AD21A171B}.Debug|x64.Build.0 = Debug|x64 - {47310AB4-9034-4BD1-8D8B-E88AD21A171B}.Release|Any CPU.ActiveCfg = Release|x64 {47310AB4-9034-4BD1-8D8B-E88AD21A171B}.Release|x64.ActiveCfg = Release|x64 {47310AB4-9034-4BD1-8D8B-E88AD21A171B}.Release|x64.Build.0 = Release|x64 - {A7D5099E-F0FD-4BF3-8522-5A682759F915}.Debug|Any CPU.ActiveCfg = Debug|Win32 {A7D5099E-F0FD-4BF3-8522-5A682759F915}.Debug|x64.ActiveCfg = Debug|x64 {A7D5099E-F0FD-4BF3-8522-5A682759F915}.Debug|x64.Build.0 = Debug|x64 - {A7D5099E-F0FD-4BF3-8522-5A682759F915}.Release|Any CPU.ActiveCfg = Release|Win32 {A7D5099E-F0FD-4BF3-8522-5A682759F915}.Release|x64.ActiveCfg = Release|x64 {A7D5099E-F0FD-4BF3-8522-5A682759F915}.Release|x64.Build.0 = Release|x64 - {B1BCC8C6-46B5-4BFA-8F22-20F32D99EC6A}.Debug|Any CPU.ActiveCfg = Debug|x64 {B1BCC8C6-46B5-4BFA-8F22-20F32D99EC6A}.Debug|x64.ActiveCfg = Debug|x64 {B1BCC8C6-46B5-4BFA-8F22-20F32D99EC6A}.Debug|x64.Build.0 = Debug|x64 - {B1BCC8C6-46B5-4BFA-8F22-20F32D99EC6A}.Release|Any CPU.ActiveCfg = Release|x64 {B1BCC8C6-46B5-4BFA-8F22-20F32D99EC6A}.Release|x64.ActiveCfg = Release|x64 {B1BCC8C6-46B5-4BFA-8F22-20F32D99EC6A}.Release|x64.Build.0 = Release|x64 - {F055103B-F80B-4D0C-BF48-057C55620033}.Debug|Any CPU.ActiveCfg = Debug|x64 {F055103B-F80B-4D0C-BF48-057C55620033}.Debug|x64.ActiveCfg = Debug|x64 {F055103B-F80B-4D0C-BF48-057C55620033}.Debug|x64.Build.0 = Debug|x64 - {F055103B-F80B-4D0C-BF48-057C55620033}.Release|Any CPU.ActiveCfg = Release|x64 {F055103B-F80B-4D0C-BF48-057C55620033}.Release|x64.ActiveCfg = Release|x64 {F055103B-F80B-4D0C-BF48-057C55620033}.Release|x64.Build.0 = Release|x64 - {787B8AA6-CA93-4C84-96FE-DF31110AD1C4}.Debug|Any CPU.ActiveCfg = Debug|x64 {787B8AA6-CA93-4C84-96FE-DF31110AD1C4}.Debug|x64.ActiveCfg = Debug|x64 {787B8AA6-CA93-4C84-96FE-DF31110AD1C4}.Debug|x64.Build.0 = Debug|x64 - {787B8AA6-CA93-4C84-96FE-DF31110AD1C4}.Release|Any CPU.ActiveCfg = Release|x64 {787B8AA6-CA93-4C84-96FE-DF31110AD1C4}.Release|x64.ActiveCfg = Release|x64 {787B8AA6-CA93-4C84-96FE-DF31110AD1C4}.Release|x64.Build.0 = Release|x64 - {08C8C05F-0362-41BC-818C-724572DF8B06}.Debug|Any CPU.ActiveCfg = Debug|x64 {08C8C05F-0362-41BC-818C-724572DF8B06}.Debug|x64.ActiveCfg = Debug|x64 {08C8C05F-0362-41BC-818C-724572DF8B06}.Debug|x64.Build.0 = Debug|x64 - {08C8C05F-0362-41BC-818C-724572DF8B06}.Release|Any CPU.ActiveCfg = Release|x64 {08C8C05F-0362-41BC-818C-724572DF8B06}.Release|x64.ActiveCfg = Release|x64 {08C8C05F-0362-41BC-818C-724572DF8B06}.Release|x64.Build.0 = Release|x64 - {5D00D290-4016-4CFE-9E41-1E7C724509BA}.Debug|Any CPU.ActiveCfg = Debug|x64 {5D00D290-4016-4CFE-9E41-1E7C724509BA}.Debug|x64.ActiveCfg = Debug|x64 {5D00D290-4016-4CFE-9E41-1E7C724509BA}.Debug|x64.Build.0 = Debug|x64 - {5D00D290-4016-4CFE-9E41-1E7C724509BA}.Release|Any CPU.ActiveCfg = Release|x64 {5D00D290-4016-4CFE-9E41-1E7C724509BA}.Release|x64.ActiveCfg = Release|x64 {5D00D290-4016-4CFE-9E41-1E7C724509BA}.Release|x64.Build.0 = Release|x64 - {4AED67B6-55FD-486F-B917-E543DEE2CB3C}.Debug|Any CPU.ActiveCfg = Debug|x64 {4AED67B6-55FD-486F-B917-E543DEE2CB3C}.Debug|x64.ActiveCfg = Debug|x64 {4AED67B6-55FD-486F-B917-E543DEE2CB3C}.Debug|x64.Build.0 = Debug|x64 - {4AED67B6-55FD-486F-B917-E543DEE2CB3C}.Release|Any CPU.ActiveCfg = Release|x64 {4AED67B6-55FD-486F-B917-E543DEE2CB3C}.Release|x64.ActiveCfg = Release|x64 {4AED67B6-55FD-486F-B917-E543DEE2CB3C}.Release|x64.Build.0 = Release|x64 - {42851751-CBC8-45A6-97F5-7A0753F7B4D1}.Debug|Any CPU.ActiveCfg = Debug|x64 {42851751-CBC8-45A6-97F5-7A0753F7B4D1}.Debug|x64.ActiveCfg = Debug|x64 {42851751-CBC8-45A6-97F5-7A0753F7B4D1}.Debug|x64.Build.0 = Debug|x64 - {42851751-CBC8-45A6-97F5-7A0753F7B4D1}.Release|Any CPU.ActiveCfg = Release|x64 {42851751-CBC8-45A6-97F5-7A0753F7B4D1}.Release|x64.ActiveCfg = Release|x64 {42851751-CBC8-45A6-97F5-7A0753F7B4D1}.Release|x64.Build.0 = Release|x64 - {1EF1EEF0-10F0-4F2E-8550-39B6D8044D3E}.Debug|Any CPU.ActiveCfg = Debug|x64 {1EF1EEF0-10F0-4F2E-8550-39B6D8044D3E}.Debug|x64.ActiveCfg = Debug|x64 {1EF1EEF0-10F0-4F2E-8550-39B6D8044D3E}.Debug|x64.Build.0 = Debug|x64 - {1EF1EEF0-10F0-4F2E-8550-39B6D8044D3E}.Release|Any CPU.ActiveCfg = Release|x64 {1EF1EEF0-10F0-4F2E-8550-39B6D8044D3E}.Release|x64.ActiveCfg = Release|x64 {1EF1EEF0-10F0-4F2E-8550-39B6D8044D3E}.Release|x64.Build.0 = Release|x64 - {8FFE09DA-FA4F-4EE1-B3A2-AD5497FBD1AD}.Debug|Any CPU.ActiveCfg = Debug|x64 {8FFE09DA-FA4F-4EE1-B3A2-AD5497FBD1AD}.Debug|x64.ActiveCfg = Debug|x64 {8FFE09DA-FA4F-4EE1-B3A2-AD5497FBD1AD}.Debug|x64.Build.0 = Debug|x64 - {8FFE09DA-FA4F-4EE1-B3A2-AD5497FBD1AD}.Release|Any CPU.ActiveCfg = Release|x64 {8FFE09DA-FA4F-4EE1-B3A2-AD5497FBD1AD}.Release|x64.ActiveCfg = Release|x64 {8FFE09DA-FA4F-4EE1-B3A2-AD5497FBD1AD}.Release|x64.Build.0 = Release|x64 - {655C9AF2-18D3-4DA6-80E4-85504A7722BA}.Debug|Any CPU.ActiveCfg = Debug|x64 {655C9AF2-18D3-4DA6-80E4-85504A7722BA}.Debug|x64.ActiveCfg = Debug|x64 {655C9AF2-18D3-4DA6-80E4-85504A7722BA}.Debug|x64.Build.0 = Debug|x64 - {655C9AF2-18D3-4DA6-80E4-85504A7722BA}.Release|Any CPU.ActiveCfg = Release|x64 {655C9AF2-18D3-4DA6-80E4-85504A7722BA}.Release|x64.ActiveCfg = Release|x64 {655C9AF2-18D3-4DA6-80E4-85504A7722BA}.Release|x64.Build.0 = Release|x64 - {BA58206B-1493-4C75-BFEA-A85768A1E156}.Debug|Any CPU.ActiveCfg = Debug|x64 {BA58206B-1493-4C75-BFEA-A85768A1E156}.Debug|x64.ActiveCfg = Debug|x64 {BA58206B-1493-4C75-BFEA-A85768A1E156}.Debug|x64.Build.0 = Debug|x64 - {BA58206B-1493-4C75-BFEA-A85768A1E156}.Release|Any CPU.ActiveCfg = Release|x64 {BA58206B-1493-4C75-BFEA-A85768A1E156}.Release|x64.ActiveCfg = Release|x64 {BA58206B-1493-4C75-BFEA-A85768A1E156}.Release|x64.Build.0 = Release|x64 - {03276A39-D4E9-417C-8FFD-200B0EE5E871}.Debug|Any CPU.ActiveCfg = Debug|x64 {03276A39-D4E9-417C-8FFD-200B0EE5E871}.Debug|x64.ActiveCfg = Debug|x64 {03276A39-D4E9-417C-8FFD-200B0EE5E871}.Debug|x64.Build.0 = Debug|x64 - {03276A39-D4E9-417C-8FFD-200B0EE5E871}.Release|Any CPU.ActiveCfg = Release|x64 {03276A39-D4E9-417C-8FFD-200B0EE5E871}.Release|x64.ActiveCfg = Release|x64 {03276A39-D4E9-417C-8FFD-200B0EE5E871}.Release|x64.Build.0 = Release|x64 - {B81FB7B6-D30E-428F-908A-41422EFC1172}.Debug|Any CPU.ActiveCfg = Debug|x64 {B81FB7B6-D30E-428F-908A-41422EFC1172}.Debug|x64.ActiveCfg = Debug|x64 {B81FB7B6-D30E-428F-908A-41422EFC1172}.Debug|x64.Build.0 = Debug|x64 - {B81FB7B6-D30E-428F-908A-41422EFC1172}.Release|Any CPU.ActiveCfg = Release|x64 {B81FB7B6-D30E-428F-908A-41422EFC1172}.Release|x64.ActiveCfg = Release|x64 {B81FB7B6-D30E-428F-908A-41422EFC1172}.Release|x64.Build.0 = Release|x64 - {0F85E674-34AE-443D-954C-8321EB8B93B1}.Debug|Any CPU.ActiveCfg = Debug|x64 {0F85E674-34AE-443D-954C-8321EB8B93B1}.Debug|x64.ActiveCfg = Debug|x64 {0F85E674-34AE-443D-954C-8321EB8B93B1}.Debug|x64.Build.0 = Debug|x64 - {0F85E674-34AE-443D-954C-8321EB8B93B1}.Release|Any CPU.ActiveCfg = Release|x64 {0F85E674-34AE-443D-954C-8321EB8B93B1}.Release|x64.ActiveCfg = Release|x64 {0F85E674-34AE-443D-954C-8321EB8B93B1}.Release|x64.Build.0 = Release|x64 - {632BBE62-5421-49EA-835A-7FFA4F499BD6}.Debug|Any CPU.ActiveCfg = Debug|x64 {632BBE62-5421-49EA-835A-7FFA4F499BD6}.Debug|x64.ActiveCfg = Debug|x64 {632BBE62-5421-49EA-835A-7FFA4F499BD6}.Debug|x64.Build.0 = Debug|x64 - {632BBE62-5421-49EA-835A-7FFA4F499BD6}.Release|Any CPU.ActiveCfg = Release|x64 {632BBE62-5421-49EA-835A-7FFA4F499BD6}.Release|x64.ActiveCfg = Release|x64 {632BBE62-5421-49EA-835A-7FFA4F499BD6}.Release|x64.Build.0 = Release|x64 - {4FA206A5-F69F-4193-BF8F-F6EEB496734C}.Debug|Any CPU.ActiveCfg = Debug|x64 {4FA206A5-F69F-4193-BF8F-F6EEB496734C}.Debug|x64.ActiveCfg = Debug|x64 {4FA206A5-F69F-4193-BF8F-F6EEB496734C}.Debug|x64.Build.0 = Debug|x64 - {4FA206A5-F69F-4193-BF8F-F6EEB496734C}.Release|Any CPU.ActiveCfg = Release|x64 {4FA206A5-F69F-4193-BF8F-F6EEB496734C}.Release|x64.ActiveCfg = Release|x64 {4FA206A5-F69F-4193-BF8F-F6EEB496734C}.Release|x64.Build.0 = Release|x64 - {090CD7B7-3B0C-4D1D-BC98-83EB5D799BC1}.Debug|Any CPU.ActiveCfg = Debug|x64 {090CD7B7-3B0C-4D1D-BC98-83EB5D799BC1}.Debug|x64.ActiveCfg = Debug|x64 {090CD7B7-3B0C-4D1D-BC98-83EB5D799BC1}.Debug|x64.Build.0 = Debug|x64 - {090CD7B7-3B0C-4D1D-BC98-83EB5D799BC1}.Release|Any CPU.ActiveCfg = Release|x64 {090CD7B7-3B0C-4D1D-BC98-83EB5D799BC1}.Release|x64.ActiveCfg = Release|x64 {090CD7B7-3B0C-4D1D-BC98-83EB5D799BC1}.Release|x64.Build.0 = Release|x64 - {7E1E3F13-2BD6-3F75-A6A7-873A2B55C60F}.Debug|Any CPU.ActiveCfg = Debug|x64 {7E1E3F13-2BD6-3F75-A6A7-873A2B55C60F}.Debug|x64.ActiveCfg = Debug|x64 {7E1E3F13-2BD6-3F75-A6A7-873A2B55C60F}.Debug|x64.Build.0 = Debug|x64 - {7E1E3F13-2BD6-3F75-A6A7-873A2B55C60F}.Release|Any CPU.ActiveCfg = Release|x64 {7E1E3F13-2BD6-3F75-A6A7-873A2B55C60F}.Release|x64.ActiveCfg = Release|x64 {7E1E3F13-2BD6-3F75-A6A7-873A2B55C60F}.Release|x64.Build.0 = Release|x64 - {FD8EB419-FF9C-4D88-BB6F-BF6CED37747B}.Debug|Any CPU.ActiveCfg = Debug|x64 {FD8EB419-FF9C-4D88-BB6F-BF6CED37747B}.Debug|x64.ActiveCfg = Debug|x64 {FD8EB419-FF9C-4D88-BB6F-BF6CED37747B}.Debug|x64.Build.0 = Debug|x64 - {FD8EB419-FF9C-4D88-BB6F-BF6CED37747B}.Release|Any CPU.ActiveCfg = Release|x64 {FD8EB419-FF9C-4D88-BB6F-BF6CED37747B}.Release|x64.ActiveCfg = Release|x64 {FD8EB419-FF9C-4D88-BB6F-BF6CED37747B}.Release|x64.Build.0 = Release|x64 - {DA5A6FE9-0040-40CC-83CC-764AE5306590}.Debug|Any CPU.ActiveCfg = Debug|x64 {DA5A6FE9-0040-40CC-83CC-764AE5306590}.Debug|x64.ActiveCfg = Debug|x64 {DA5A6FE9-0040-40CC-83CC-764AE5306590}.Debug|x64.Build.0 = Debug|x64 - {DA5A6FE9-0040-40CC-83CC-764AE5306590}.Release|Any CPU.ActiveCfg = Release|x64 {DA5A6FE9-0040-40CC-83CC-764AE5306590}.Release|x64.ActiveCfg = Release|x64 {DA5A6FE9-0040-40CC-83CC-764AE5306590}.Release|x64.Build.0 = Release|x64 - {0351ADA4-0C32-4652-9BA0-41F7B602372B}.Debug|Any CPU.ActiveCfg = Debug|x64 {0351ADA4-0C32-4652-9BA0-41F7B602372B}.Debug|x64.ActiveCfg = Debug|x64 {0351ADA4-0C32-4652-9BA0-41F7B602372B}.Debug|x64.Build.0 = Debug|x64 - {0351ADA4-0C32-4652-9BA0-41F7B602372B}.Release|Any CPU.ActiveCfg = Release|x64 {0351ADA4-0C32-4652-9BA0-41F7B602372B}.Release|x64.ActiveCfg = Release|x64 {0351ADA4-0C32-4652-9BA0-41F7B602372B}.Release|x64.Build.0 = Release|x64 - {D9B8FC84-322A-4F9F-BBB9-20915C47DDFD}.Debug|Any CPU.ActiveCfg = Debug|x64 {D9B8FC84-322A-4F9F-BBB9-20915C47DDFD}.Debug|x64.ActiveCfg = Debug|x64 {D9B8FC84-322A-4F9F-BBB9-20915C47DDFD}.Debug|x64.Build.0 = Debug|x64 - {D9B8FC84-322A-4F9F-BBB9-20915C47DDFD}.Release|Any CPU.ActiveCfg = Release|x64 {D9B8FC84-322A-4F9F-BBB9-20915C47DDFD}.Release|x64.ActiveCfg = Release|x64 {D9B8FC84-322A-4F9F-BBB9-20915C47DDFD}.Release|x64.Build.0 = Release|x64 - {6955446D-23F7-4023-9BB3-8657F904AF99}.Debug|Any CPU.ActiveCfg = Debug|x64 {6955446D-23F7-4023-9BB3-8657F904AF99}.Debug|x64.ActiveCfg = Debug|x64 {6955446D-23F7-4023-9BB3-8657F904AF99}.Debug|x64.Build.0 = Debug|x64 - {6955446D-23F7-4023-9BB3-8657F904AF99}.Release|Any CPU.ActiveCfg = Release|x64 {6955446D-23F7-4023-9BB3-8657F904AF99}.Release|x64.ActiveCfg = Release|x64 {6955446D-23F7-4023-9BB3-8657F904AF99}.Release|x64.Build.0 = Release|x64 - {58736667-1027-4AD7-BFDF-7A3A6474103A}.Debug|Any CPU.ActiveCfg = Debug|x64 {58736667-1027-4AD7-BFDF-7A3A6474103A}.Debug|x64.ActiveCfg = Debug|x64 {58736667-1027-4AD7-BFDF-7A3A6474103A}.Debug|x64.Build.0 = Debug|x64 - {58736667-1027-4AD7-BFDF-7A3A6474103A}.Release|Any CPU.ActiveCfg = Release|x64 {58736667-1027-4AD7-BFDF-7A3A6474103A}.Release|x64.ActiveCfg = Release|x64 {58736667-1027-4AD7-BFDF-7A3A6474103A}.Release|x64.Build.0 = Release|x64 - {1D5BE09D-78C0-4FD7-AF00-AE7C1AF7C525}.Debug|Any CPU.ActiveCfg = Debug|x64 {1D5BE09D-78C0-4FD7-AF00-AE7C1AF7C525}.Debug|x64.ActiveCfg = Debug|x64 {1D5BE09D-78C0-4FD7-AF00-AE7C1AF7C525}.Debug|x64.Build.0 = Debug|x64 - {1D5BE09D-78C0-4FD7-AF00-AE7C1AF7C525}.Release|Any CPU.ActiveCfg = Release|x64 {1D5BE09D-78C0-4FD7-AF00-AE7C1AF7C525}.Release|x64.ActiveCfg = Release|x64 {1D5BE09D-78C0-4FD7-AF00-AE7C1AF7C525}.Release|x64.Build.0 = Release|x64 - {031AC72E-FA28-4AB7-B690-6F7B9C28AA73}.Debug|Any CPU.ActiveCfg = Debug|x64 {031AC72E-FA28-4AB7-B690-6F7B9C28AA73}.Debug|x64.ActiveCfg = Debug|x64 {031AC72E-FA28-4AB7-B690-6F7B9C28AA73}.Debug|x64.Build.0 = Debug|x64 - {031AC72E-FA28-4AB7-B690-6F7B9C28AA73}.Release|Any CPU.ActiveCfg = Release|x64 {031AC72E-FA28-4AB7-B690-6F7B9C28AA73}.Release|x64.ActiveCfg = Release|x64 {031AC72E-FA28-4AB7-B690-6F7B9C28AA73}.Release|x64.Build.0 = Release|x64 - {0B593A6C-4143-4337-860E-DB5710FB87DB}.Debug|Any CPU.ActiveCfg = Debug|x64 {0B593A6C-4143-4337-860E-DB5710FB87DB}.Debug|x64.ActiveCfg = Debug|x64 {0B593A6C-4143-4337-860E-DB5710FB87DB}.Debug|x64.Build.0 = Debug|x64 - {0B593A6C-4143-4337-860E-DB5710FB87DB}.Release|Any CPU.ActiveCfg = Release|x64 {0B593A6C-4143-4337-860E-DB5710FB87DB}.Release|x64.ActiveCfg = Release|x64 {0B593A6C-4143-4337-860E-DB5710FB87DB}.Release|x64.Build.0 = Release|x64 - {CC6E41AC-8174-4E8A-8D22-85DD7F4851DF}.Debug|Any CPU.ActiveCfg = Debug|x64 {CC6E41AC-8174-4E8A-8D22-85DD7F4851DF}.Debug|x64.ActiveCfg = Debug|x64 {CC6E41AC-8174-4E8A-8D22-85DD7F4851DF}.Debug|x64.Build.0 = Debug|x64 - {CC6E41AC-8174-4E8A-8D22-85DD7F4851DF}.Release|Any CPU.ActiveCfg = Release|x64 {CC6E41AC-8174-4E8A-8D22-85DD7F4851DF}.Release|x64.ActiveCfg = Release|x64 {CC6E41AC-8174-4E8A-8D22-85DD7F4851DF}.Release|x64.Build.0 = Release|x64 - {C502A854-53AC-4EBB-8DC0-E4AF2191E4F6}.Debug|Any CPU.ActiveCfg = Debug|x64 {C502A854-53AC-4EBB-8DC0-E4AF2191E4F6}.Debug|x64.ActiveCfg = Debug|x64 {C502A854-53AC-4EBB-8DC0-E4AF2191E4F6}.Debug|x64.Build.0 = Debug|x64 - {C502A854-53AC-4EBB-8DC0-E4AF2191E4F6}.Release|Any CPU.ActiveCfg = Release|x64 {C502A854-53AC-4EBB-8DC0-E4AF2191E4F6}.Release|x64.ActiveCfg = Release|x64 {C502A854-53AC-4EBB-8DC0-E4AF2191E4F6}.Release|x64.Build.0 = Release|x64 - {7319089E-46D6-4400-BC65-E39BDF1416EE}.Debug|Any CPU.ActiveCfg = Debug|x64 {7319089E-46D6-4400-BC65-E39BDF1416EE}.Debug|x64.ActiveCfg = Debug|x64 {7319089E-46D6-4400-BC65-E39BDF1416EE}.Debug|x64.Build.0 = Debug|x64 - {7319089E-46D6-4400-BC65-E39BDF1416EE}.Release|Any CPU.ActiveCfg = Release|x64 {7319089E-46D6-4400-BC65-E39BDF1416EE}.Release|x64.ActiveCfg = Release|x64 {7319089E-46D6-4400-BC65-E39BDF1416EE}.Release|x64.Build.0 = Release|x64 - {CABA8DFB-823B-4BF2-93AC-3F31984150D9}.Debug|Any CPU.ActiveCfg = Debug|x64 {CABA8DFB-823B-4BF2-93AC-3F31984150D9}.Debug|x64.ActiveCfg = Debug|x64 {CABA8DFB-823B-4BF2-93AC-3F31984150D9}.Debug|x64.Build.0 = Debug|x64 - {CABA8DFB-823B-4BF2-93AC-3F31984150D9}.Release|Any CPU.ActiveCfg = Release|x64 {CABA8DFB-823B-4BF2-93AC-3F31984150D9}.Release|x64.ActiveCfg = Release|x64 {CABA8DFB-823B-4BF2-93AC-3F31984150D9}.Release|x64.Build.0 = Release|x64 - {98537082-0FDB-40DE-ABD8-0DC5A4269BAB}.Debug|Any CPU.ActiveCfg = Debug|x64 {98537082-0FDB-40DE-ABD8-0DC5A4269BAB}.Debug|x64.ActiveCfg = Debug|x64 {98537082-0FDB-40DE-ABD8-0DC5A4269BAB}.Debug|x64.Build.0 = Debug|x64 - {98537082-0FDB-40DE-ABD8-0DC5A4269BAB}.Release|Any CPU.ActiveCfg = Release|x64 {98537082-0FDB-40DE-ABD8-0DC5A4269BAB}.Release|x64.ActiveCfg = Release|x64 {98537082-0FDB-40DE-ABD8-0DC5A4269BAB}.Release|x64.Build.0 = Release|x64 - {C3A17DCA-217B-462C-BB0C-BE086AF80081}.Debug|Any CPU.ActiveCfg = Debug|x64 {C3A17DCA-217B-462C-BB0C-BE086AF80081}.Debug|x64.ActiveCfg = Debug|x64 {C3A17DCA-217B-462C-BB0C-BE086AF80081}.Debug|x64.Build.0 = Debug|x64 - {C3A17DCA-217B-462C-BB0C-BE086AF80081}.Release|Any CPU.ActiveCfg = Release|x64 {C3A17DCA-217B-462C-BB0C-BE086AF80081}.Release|x64.ActiveCfg = Release|x64 {C3A17DCA-217B-462C-BB0C-BE086AF80081}.Release|x64.Build.0 = Release|x64 - {4BABF3FE-3451-42FD-873F-3C332E18DCEF}.Debug|Any CPU.ActiveCfg = Debug|x64 {4BABF3FE-3451-42FD-873F-3C332E18DCEF}.Debug|x64.ActiveCfg = Debug|x64 {4BABF3FE-3451-42FD-873F-3C332E18DCEF}.Debug|x64.Build.0 = Debug|x64 - {4BABF3FE-3451-42FD-873F-3C332E18DCEF}.Release|Any CPU.ActiveCfg = Release|x64 {4BABF3FE-3451-42FD-873F-3C332E18DCEF}.Release|x64.ActiveCfg = Release|x64 {4BABF3FE-3451-42FD-873F-3C332E18DCEF}.Release|x64.Build.0 = Release|x64 - {0648DF05-5DDA-4BE1-B5F2-584926EBDB65}.Debug|Any CPU.ActiveCfg = Debug|x64 {0648DF05-5DDA-4BE1-B5F2-584926EBDB65}.Debug|x64.ActiveCfg = Debug|x64 {0648DF05-5DDA-4BE1-B5F2-584926EBDB65}.Debug|x64.Build.0 = Debug|x64 - {0648DF05-5DDA-4BE1-B5F2-584926EBDB65}.Release|Any CPU.ActiveCfg = Release|x64 {0648DF05-5DDA-4BE1-B5F2-584926EBDB65}.Release|x64.ActiveCfg = Release|x64 {0648DF05-5DDA-4BE1-B5F2-584926EBDB65}.Release|x64.Build.0 = Release|x64 - {6ED2F4FC-E122-4CEE-90F1-97E4CCC8BC7A}.Debug|Any CPU.ActiveCfg = Debug|x64 {6ED2F4FC-E122-4CEE-90F1-97E4CCC8BC7A}.Debug|x64.ActiveCfg = Debug|x64 {6ED2F4FC-E122-4CEE-90F1-97E4CCC8BC7A}.Debug|x64.Build.0 = Debug|x64 - {6ED2F4FC-E122-4CEE-90F1-97E4CCC8BC7A}.Release|Any CPU.ActiveCfg = Release|x64 {6ED2F4FC-E122-4CEE-90F1-97E4CCC8BC7A}.Release|x64.ActiveCfg = Release|x64 {6ED2F4FC-E122-4CEE-90F1-97E4CCC8BC7A}.Release|x64.Build.0 = Release|x64 - {BA661F5B-1D5A-4FFC-9BF1-FC39DF280BDD}.Debug|Any CPU.ActiveCfg = Debug|x64 {BA661F5B-1D5A-4FFC-9BF1-FC39DF280BDD}.Debug|x64.ActiveCfg = Debug|x64 {BA661F5B-1D5A-4FFC-9BF1-FC39DF280BDD}.Debug|x64.Build.0 = Debug|x64 - {BA661F5B-1D5A-4FFC-9BF1-FC39DF280BDD}.Release|Any CPU.ActiveCfg = Release|x64 {BA661F5B-1D5A-4FFC-9BF1-FC39DF280BDD}.Release|x64.ActiveCfg = Release|x64 {BA661F5B-1D5A-4FFC-9BF1-FC39DF280BDD}.Release|x64.Build.0 = Release|x64 - {E496B7FC-1E99-4BAB-849B-0E8367040B02}.Debug|Any CPU.ActiveCfg = Debug|x64 {E496B7FC-1E99-4BAB-849B-0E8367040B02}.Debug|x64.ActiveCfg = Debug|x64 {E496B7FC-1E99-4BAB-849B-0E8367040B02}.Debug|x64.Build.0 = Debug|x64 - {E496B7FC-1E99-4BAB-849B-0E8367040B02}.Release|Any CPU.ActiveCfg = Release|x64 {E496B7FC-1E99-4BAB-849B-0E8367040B02}.Release|x64.ActiveCfg = Release|x64 {E496B7FC-1E99-4BAB-849B-0E8367040B02}.Release|x64.Build.0 = Release|x64 - {7F4B3A60-BC27-45A7-8000-68B0B6EA7466}.Debug|Any CPU.ActiveCfg = Debug|x64 {7F4B3A60-BC27-45A7-8000-68B0B6EA7466}.Debug|x64.ActiveCfg = Debug|x64 {7F4B3A60-BC27-45A7-8000-68B0B6EA7466}.Debug|x64.Build.0 = Debug|x64 - {7F4B3A60-BC27-45A7-8000-68B0B6EA7466}.Release|Any CPU.ActiveCfg = Release|x64 {7F4B3A60-BC27-45A7-8000-68B0B6EA7466}.Release|x64.ActiveCfg = Release|x64 {7F4B3A60-BC27-45A7-8000-68B0B6EA7466}.Release|x64.Build.0 = Release|x64 - {8DF78B53-200E-451F-9328-01EB907193AE}.Debug|Any CPU.ActiveCfg = Debug|x64 {8DF78B53-200E-451F-9328-01EB907193AE}.Debug|x64.ActiveCfg = Debug|x64 {8DF78B53-200E-451F-9328-01EB907193AE}.Debug|x64.Build.0 = Debug|x64 - {8DF78B53-200E-451F-9328-01EB907193AE}.Release|Any CPU.ActiveCfg = Release|x64 {8DF78B53-200E-451F-9328-01EB907193AE}.Release|x64.ActiveCfg = Release|x64 {8DF78B53-200E-451F-9328-01EB907193AE}.Release|x64.Build.0 = Release|x64 - {23D2070D-E4AD-4ADD-85A7-083D9C76AD49}.Debug|Any CPU.ActiveCfg = Debug|x64 {23D2070D-E4AD-4ADD-85A7-083D9C76AD49}.Debug|x64.ActiveCfg = Debug|x64 {23D2070D-E4AD-4ADD-85A7-083D9C76AD49}.Debug|x64.Build.0 = Debug|x64 - {23D2070D-E4AD-4ADD-85A7-083D9C76AD49}.Release|Any CPU.ActiveCfg = Release|x64 {23D2070D-E4AD-4ADD-85A7-083D9C76AD49}.Release|x64.ActiveCfg = Release|x64 {23D2070D-E4AD-4ADD-85A7-083D9C76AD49}.Release|x64.Build.0 = Release|x64 - {62173D9A-6724-4C00-A1C8-FB646480A9EC}.Debug|Any CPU.ActiveCfg = Debug|x64 {62173D9A-6724-4C00-A1C8-FB646480A9EC}.Debug|x64.ActiveCfg = Debug|x64 {62173D9A-6724-4C00-A1C8-FB646480A9EC}.Debug|x64.Build.0 = Debug|x64 - {62173D9A-6724-4C00-A1C8-FB646480A9EC}.Release|Any CPU.ActiveCfg = Release|x64 {62173D9A-6724-4C00-A1C8-FB646480A9EC}.Release|x64.ActiveCfg = Release|x64 {62173D9A-6724-4C00-A1C8-FB646480A9EC}.Release|x64.Build.0 = Release|x64 - {5E7360A8-D048-4ED3-8F09-0BFD64C5529A}.Debug|Any CPU.ActiveCfg = Debug|x64 {5E7360A8-D048-4ED3-8F09-0BFD64C5529A}.Debug|x64.ActiveCfg = Debug|x64 {5E7360A8-D048-4ED3-8F09-0BFD64C5529A}.Debug|x64.Build.0 = Debug|x64 - {5E7360A8-D048-4ED3-8F09-0BFD64C5529A}.Release|Any CPU.ActiveCfg = Release|x64 {5E7360A8-D048-4ED3-8F09-0BFD64C5529A}.Release|x64.ActiveCfg = Release|x64 {5E7360A8-D048-4ED3-8F09-0BFD64C5529A}.Release|x64.Build.0 = Release|x64 - {D940E07F-532C-4FF3-883F-790DA014F19A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {D940E07F-532C-4FF3-883F-790DA014F19A}.Debug|Any CPU.Build.0 = Debug|Any CPU {D940E07F-532C-4FF3-883F-790DA014F19A}.Debug|x64.ActiveCfg = Debug|x64 {D940E07F-532C-4FF3-883F-790DA014F19A}.Debug|x64.Build.0 = Debug|x64 - {D940E07F-532C-4FF3-883F-790DA014F19A}.Release|Any CPU.ActiveCfg = Release|Any CPU - {D940E07F-532C-4FF3-883F-790DA014F19A}.Release|Any CPU.Build.0 = Release|Any CPU {D940E07F-532C-4FF3-883F-790DA014F19A}.Release|x64.ActiveCfg = Release|x64 {D940E07F-532C-4FF3-883F-790DA014F19A}.Release|x64.Build.0 = Release|x64 EndGlobalSection From f20e3fffe4dc33fc252492dfd95034949c7fe529 Mon Sep 17 00:00:00 2001 From: Clint Rutkas Date: Mon, 10 May 2021 13:59:17 -0700 Subject: [PATCH 57/81] Adjusting locations --- src/modules/espresso/Espresso/Espresso.csproj | 4 +--- .../EspressoModuleInterface/EspressoModuleInterface.vcxproj | 3 ++- src/runner/main.cpp | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/modules/espresso/Espresso/Espresso.csproj b/src/modules/espresso/Espresso/Espresso.csproj index 65a7be85cc..9658706b49 100644 --- a/src/modules/espresso/Espresso/Espresso.csproj +++ b/src/modules/espresso/Espresso/Espresso.csproj @@ -5,7 +5,7 @@ netcoreapp3.1 $(SolutionDir)$(Platform)\$(Configuration)\modules\Espresso enable - AnyCPU;x64 + x64 false false true @@ -15,7 +15,6 @@ - ..\..\..\..\$(Platform)\$(Configuration)\modules\Espresso\ DEBUG;TRACE full x64 @@ -27,7 +26,6 @@ - ..\..\..\..\$(Platform)\$(Configuration)\modules\Espresso\ TRACE;RELEASE true pdbonly diff --git a/src/modules/espresso/EspressoModuleInterface/EspressoModuleInterface.vcxproj b/src/modules/espresso/EspressoModuleInterface/EspressoModuleInterface.vcxproj index 33ee183a86..5f880d835a 100644 --- a/src/modules/espresso/EspressoModuleInterface/EspressoModuleInterface.vcxproj +++ b/src/modules/espresso/EspressoModuleInterface/EspressoModuleInterface.vcxproj @@ -17,6 +17,7 @@ Win32Proj Espresso EspressoModuleInterface + 10.0.17134.0 @@ -35,7 +36,7 @@ - $(SolutionDir)$(Platform)\$(Configuration)\modules\$(ProjectName)\ + $(SolutionDir)$(Platform)\$(Configuration)\modules\Espresso\ diff --git a/src/runner/main.cpp b/src/runner/main.cpp index e070073600..deceb91edc 100644 --- a/src/runner/main.cpp +++ b/src/runner/main.cpp @@ -157,7 +157,7 @@ int runner(bool isProcessElevated, bool openSettings, bool openOobe) L"modules/PowerRename/PowerRenameExt.dll", L"modules/ShortcutGuide/ShortcutGuide.dll", L"modules/ColorPicker/ColorPicker.dll", - L"modules/EspressoModuleInterface/EspressoModuleInterface.dll", + L"modules/Espresso/EspressoModuleInterface.dll", }; for (const auto& moduleSubdir : knownModules) From f0e5be9982ad44b43743303aa0e6199e0c76049a Mon Sep 17 00:00:00 2001 From: Clint Rutkas Date: Mon, 10 May 2021 14:35:27 -0700 Subject: [PATCH 58/81] changing settings order --- .../Views/ShellPage.xaml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/settings-ui/Microsoft.PowerToys.Settings.UI/Views/ShellPage.xaml b/src/settings-ui/Microsoft.PowerToys.Settings.UI/Views/ShellPage.xaml index df59fc728d..46cd11f4db 100644 --- a/src/settings-ui/Microsoft.PowerToys.Settings.UI/Views/ShellPage.xaml +++ b/src/settings-ui/Microsoft.PowerToys.Settings.UI/Views/ShellPage.xaml @@ -41,7 +41,13 @@ - + + + + + + + @@ -78,12 +84,6 @@ - - - - - - From 79c70b399884f8b7ed027916171d0a04234e5192 Mon Sep 17 00:00:00 2001 From: Den Delimarsky <1389609+dend@users.noreply.github.com> Date: Mon, 10 May 2021 17:55:11 -0700 Subject: [PATCH 59/81] Modify how settings are handled by Espresso --- src/modules/espresso/Espresso/Program.cs | 25 +++++++++++-------- .../ISettingsUtils.cs | 2 ++ .../SettingsUtils.cs | 6 +++++ 3 files changed, 22 insertions(+), 11 deletions(-) diff --git a/src/modules/espresso/Espresso/Program.cs b/src/modules/espresso/Espresso/Program.cs index 1d0dc6695e..8579c00baf 100644 --- a/src/modules/espresso/Espresso/Program.cs +++ b/src/modules/espresso/Espresso/Program.cs @@ -52,12 +52,12 @@ namespace Espresso.Shell log.Debug($"OS: {Environment.OSVersion}"); log.Debug($"OS Build: {APIHelper.GetOperatingSystemBuild()}"); - var configOption = new Option( - aliases: new[] { "--config", "-c" }, - getDefaultValue: () => string.Empty, - description: "Pointer to a PowerToys configuration file that the tool will be watching for changes. All other options are disregarded if config is used.") + var configOption = new Option( + aliases: new[] { "--use-pt-config", "-c" }, + getDefaultValue: () => true, + description: "Specifies whether Espresso will be using the PowerToys configuration file for managing the state.") { - Argument = new Argument(() => string.Empty) + Argument = new Argument(() => true) { Arity = ArgumentArity.ZeroOrOne, }, @@ -114,7 +114,7 @@ namespace Espresso.Shell rootCommand.Description = appName; - rootCommand.Handler = CommandHandler.Create(HandleCommandLineArguments); + rootCommand.Handler = CommandHandler.Create(HandleCommandLineArguments); return rootCommand.InvokeAsync(args).Result; } @@ -127,25 +127,28 @@ namespace Espresso.Shell Environment.Exit(exitCode); } - private static void HandleCommandLineArguments(string config, bool displayOn, long timeLimit, int pid) + private static void HandleCommandLineArguments(bool usePtConfig, bool displayOn, long timeLimit, int pid) { - log.Info($"The value for --config is: {config}"); + log.Info($"The value for --use-pt-config is: {usePtConfig}"); log.Info($"The value for --display-on is: {displayOn}"); log.Info($"The value for --time-limit is: {timeLimit}"); log.Info($"The value for --pid is: {pid}"); - if (!string.IsNullOrWhiteSpace(config)) + if (usePtConfig) { // Configuration file is used, therefore we disregard any other command-line parameter // and instead watch for changes in the file. try { + var settingsPath = settingsUtils.GetSettingsFilePath(appName); + log.Info($"Reading configuration file: {settingsPath}"); + watcher = new FileSystemWatcher { - Path = Path.GetDirectoryName(config), + Path = Path.GetDirectoryName(settingsPath), EnableRaisingEvents = true, NotifyFilter = NotifyFilters.LastWrite, - Filter = Path.GetFileName(config) + Filter = Path.GetFileName(settingsPath) }; Observable.FromEventPattern( diff --git a/src/settings-ui/Microsoft.PowerToys.Settings.UI.Library/ISettingsUtils.cs b/src/settings-ui/Microsoft.PowerToys.Settings.UI.Library/ISettingsUtils.cs index ea7b615fcf..7cfa33be62 100644 --- a/src/settings-ui/Microsoft.PowerToys.Settings.UI.Library/ISettingsUtils.cs +++ b/src/settings-ui/Microsoft.PowerToys.Settings.UI.Library/ISettingsUtils.cs @@ -19,5 +19,7 @@ namespace Microsoft.PowerToys.Settings.UI.Library bool SettingsExists(string powertoy = "", string fileName = "settings.json"); void DeleteSettings(string powertoy = ""); + + string GetSettingsFilePath(string powertoy = "", string fileName = "settings.json"); } } diff --git a/src/settings-ui/Microsoft.PowerToys.Settings.UI.Library/SettingsUtils.cs b/src/settings-ui/Microsoft.PowerToys.Settings.UI.Library/SettingsUtils.cs index eb40f04cf6..926674ab03 100644 --- a/src/settings-ui/Microsoft.PowerToys.Settings.UI.Library/SettingsUtils.cs +++ b/src/settings-ui/Microsoft.PowerToys.Settings.UI.Library/SettingsUtils.cs @@ -135,5 +135,11 @@ namespace Microsoft.PowerToys.Settings.UI.Library #endif } } + + // Returns the file path to the settings file, that is exposed from the local ISettingsPath instance. + public string GetSettingsFilePath(string powertoy = "", string fileName = "settings.json") + { + return _settingsPath.GetSettingsPath(powertoy, fileName); + } } } From bd8decdfc8c857d126cced19d6e4f6cdc6eb33b8 Mon Sep 17 00:00:00 2001 From: Den Delimarsky <1389609+dend@users.noreply.github.com> Date: Mon, 10 May 2021 17:58:36 -0700 Subject: [PATCH 60/81] Update the logic for Espresso launches --- src/modules/espresso/EspressoModuleInterface/dllmain.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/modules/espresso/EspressoModuleInterface/dllmain.cpp b/src/modules/espresso/EspressoModuleInterface/dllmain.cpp index 747587403b..1dc07afd44 100644 --- a/src/modules/espresso/EspressoModuleInterface/dllmain.cpp +++ b/src/modules/espresso/EspressoModuleInterface/dllmain.cpp @@ -78,10 +78,7 @@ private: Logger::trace(L"Launching Espresso process"); unsigned long powertoys_pid = GetCurrentProcessId(); - // Get the configuration file that will be passed to the process. - std::wstring espresso_settings_location = PTSettingsHelper::get_module_save_file_location(MODULE_NAME); - - std::wstring executable_args = L"--config " + espresso_settings_location + L" --pid " + std::to_wstring(powertoys_pid); + std::wstring executable_args = L"--use-pt-config --pid " + std::to_wstring(powertoys_pid); Logger::trace(L"Espresso launching with parameters: " + executable_args); SHELLEXECUTEINFOW sei{ sizeof(sei) }; From 8013664eef25a39a90e65d8fa2a1fe4751116bb3 Mon Sep 17 00:00:00 2001 From: Den Delimarsky <1389609+dend@users.noreply.github.com> Date: Mon, 10 May 2021 18:25:40 -0700 Subject: [PATCH 61/81] Updating how the tray works --- .../espresso/Espresso/Core/TrayHelper.cs | 18 +++++++++--------- src/modules/espresso/Espresso/Program.cs | 8 ++++---- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/modules/espresso/Espresso/Core/TrayHelper.cs b/src/modules/espresso/Espresso/Core/TrayHelper.cs index 1d0472ee6e..fe03a731d1 100644 --- a/src/modules/espresso/Espresso/Core/TrayHelper.cs +++ b/src/modules/espresso/Espresso/Core/TrayHelper.cs @@ -27,7 +27,7 @@ namespace Espresso.Shell.Core ModuleSettings = new SettingsUtils(); } - public static void InitializeTray(string text, Icon icon, ContextMenuStrip? contextMenu) + public static void InitializeTray(string text, Icon icon, ContextMenuStrip? contextMenu = null) { System.Threading.Tasks.Task.Factory.StartNew((tray) => { @@ -42,19 +42,19 @@ namespace Espresso.Shell.Core internal static void SetTray(string text, EspressoSettings settings) { - SetTray(text, settings.Properties.KeepDisplayOn.Value, settings.Properties.Mode, settings.Properties.Hours.Value, settings.Properties.Minutes.Value, + SetTray(text, settings.Properties.KeepDisplayOn.Value, settings.Properties.Mode, () => { // Set indefinite keep awake. var currentSettings = ModuleSettings.GetSettings(text); currentSettings.Properties.Mode = EspressoMode.INDEFINITE; ModuleSettings.SaveSettings(JsonConvert.SerializeObject(currentSettings), text); }, - () => { + (hours, minutes) => { // Set timed keep awake. var currentSettings = ModuleSettings.GetSettings(text); currentSettings.Properties.Mode = EspressoMode.TIMED; - currentSettings.Properties.Hours.Value = settings.Properties.Hours.Value; - currentSettings.Properties.Minutes.Value = settings.Properties.Minutes.Value; + currentSettings.Properties.Hours.Value = hours; + currentSettings.Properties.Minutes.Value = minutes; ModuleSettings.SaveSettings(JsonConvert.SerializeObject(currentSettings), text); }, @@ -68,7 +68,7 @@ namespace Espresso.Shell.Core }); } - internal static void SetTray(string text, bool keepDisplayOn, EspressoMode mode, int hours, int minutes, Action indefiniteKeepAwakeCallback, Action timedKeepAwakeCallback, Action keepDisplayOnCallback) + internal static void SetTray(string text, bool keepDisplayOn, EspressoMode mode, Action indefiniteKeepAwakeCallback, Action timedKeepAwakeCallback, Action keepDisplayOnCallback) { var contextMenuStrip = new ContextMenuStrip(); @@ -111,7 +111,7 @@ namespace Espresso.Shell.Core halfHourMenuItem.Click += (e, s) => { // User is setting the keep-awake to 30 minutes. - timedKeepAwakeCallback(); + timedKeepAwakeCallback(0, 30); }; var oneHourMenuItem = new ToolStripMenuItem(); @@ -119,7 +119,7 @@ namespace Espresso.Shell.Core oneHourMenuItem.Click += (e, s) => { // User is setting the keep-awake to 1 hour. - timedKeepAwakeCallback(); + timedKeepAwakeCallback(1, 0); }; var twoHoursMenuItem = new ToolStripMenuItem(); @@ -127,7 +127,7 @@ namespace Espresso.Shell.Core twoHoursMenuItem.Click += (e, s) => { // User is setting the keep-awake to 2 hours. - timedKeepAwakeCallback(); + timedKeepAwakeCallback(2, 0); }; timedMenuItem.DropDownItems.Add(halfHourMenuItem); diff --git a/src/modules/espresso/Espresso/Program.cs b/src/modules/espresso/Espresso/Program.cs index 8579c00baf..c9be92c806 100644 --- a/src/modules/espresso/Espresso/Program.cs +++ b/src/modules/espresso/Espresso/Program.cs @@ -134,6 +134,10 @@ namespace Espresso.Shell log.Info($"The value for --time-limit is: {timeLimit}"); log.Info($"The value for --pid is: {pid}"); +#pragma warning disable CS8604 // Possible null reference argument. + TrayHelper.InitializeTray(appName, APIHelper.Extract("shell32.dll", 32, true)); +#pragma warning restore CS8604 // Possible null reference argument. + if (usePtConfig) { // Configuration file is used, therefore we disregard any other command-line parameter @@ -192,10 +196,6 @@ namespace Espresso.Shell }); } -#pragma warning disable CS8604 // Possible null reference argument. - TrayHelper.InitializeTray(appName, APIHelper.Extract("shell32.dll", 21, true), null); -#pragma warning restore CS8604 // Possible null reference argument. - new ManualResetEvent(false).WaitOne(); } From 61a787844b3975d4df22ad8a53a7f94d65d6e3e6 Mon Sep 17 00:00:00 2001 From: Den Delimarsky <1389609+dend@users.noreply.github.com> Date: Mon, 10 May 2021 18:46:39 -0700 Subject: [PATCH 62/81] Proper use of serialization routines --- src/modules/espresso/Espresso/Core/TrayHelper.cs | 9 +++++---- src/modules/espresso/Espresso/Espresso.csproj | 1 - src/modules/espresso/Espresso/Program.cs | 1 - 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/modules/espresso/Espresso/Core/TrayHelper.cs b/src/modules/espresso/Espresso/Core/TrayHelper.cs index fe03a731d1..ead4705514 100644 --- a/src/modules/espresso/Espresso/Core/TrayHelper.cs +++ b/src/modules/espresso/Espresso/Core/TrayHelper.cs @@ -3,9 +3,9 @@ // See the LICENSE file in the project root for more information. using Microsoft.PowerToys.Settings.UI.Library; -using Newtonsoft.Json; using System; using System.Drawing; +using System.Text.Json; using System.Windows.Forms; #pragma warning disable CS8602 // Dereference of a possibly null reference. @@ -47,7 +47,8 @@ namespace Espresso.Shell.Core // Set indefinite keep awake. var currentSettings = ModuleSettings.GetSettings(text); currentSettings.Properties.Mode = EspressoMode.INDEFINITE; - ModuleSettings.SaveSettings(JsonConvert.SerializeObject(currentSettings), text); + + ModuleSettings.SaveSettings(JsonSerializer.Serialize(currentSettings), text); }, (hours, minutes) => { // Set timed keep awake. @@ -56,7 +57,7 @@ namespace Espresso.Shell.Core currentSettings.Properties.Hours.Value = hours; currentSettings.Properties.Minutes.Value = minutes; - ModuleSettings.SaveSettings(JsonConvert.SerializeObject(currentSettings), text); + ModuleSettings.SaveSettings(JsonSerializer.Serialize(currentSettings), text); }, () => { @@ -64,7 +65,7 @@ namespace Espresso.Shell.Core var currentSettings = ModuleSettings.GetSettings(text); currentSettings.Properties.KeepDisplayOn = settings.Properties.KeepDisplayOn; - ModuleSettings.SaveSettings(JsonConvert.SerializeObject(currentSettings), text); + ModuleSettings.SaveSettings(JsonSerializer.Serialize(currentSettings), text); }); } diff --git a/src/modules/espresso/Espresso/Espresso.csproj b/src/modules/espresso/Espresso/Espresso.csproj index 9658706b49..6f847d6715 100644 --- a/src/modules/espresso/Espresso/Espresso.csproj +++ b/src/modules/espresso/Espresso/Espresso.csproj @@ -38,7 +38,6 @@ - diff --git a/src/modules/espresso/Espresso/Program.cs b/src/modules/espresso/Espresso/Program.cs index c9be92c806..e9a3469e60 100644 --- a/src/modules/espresso/Espresso/Program.cs +++ b/src/modules/espresso/Espresso/Program.cs @@ -5,7 +5,6 @@ using Espresso.Shell.Core; using ManagedCommon; using Microsoft.PowerToys.Settings.UI.Library; -using Newtonsoft.Json; using NLog; using System; using System.CommandLine; From 4a46619857660753ceb3fd755aa2ad61dafe363e Mon Sep 17 00:00:00 2001 From: Clint Rutkas Date: Mon, 10 May 2021 20:33:19 -0700 Subject: [PATCH 63/81] adding wsx, think this is everything needed --- installer/PowerToysSetup/Product.wxs | 49 +++++++++++++++++++++++++++- 1 file changed, 48 insertions(+), 1 deletion(-) diff --git a/installer/PowerToysSetup/Product.wxs b/installer/PowerToysSetup/Product.wxs index 7787e2984d..85ca4e69dc 100644 --- a/installer/PowerToysSetup/Product.wxs +++ b/installer/PowerToysSetup/Product.wxs @@ -2,12 +2,14 @@ + + @@ -212,16 +214,26 @@ + + + + + + + + + + @@ -266,9 +278,10 @@ - + + @@ -355,6 +368,7 @@ + @@ -372,6 +386,8 @@ + + @@ -477,6 +493,7 @@ + @@ -506,6 +523,7 @@ + + @@ -582,30 +601,35 @@ + + + + + @@ -614,6 +638,7 @@ + @@ -621,6 +646,27 @@ + + + + + + + + + + @@ -800,6 +846,7 @@ + From c2f1cbf86762cea7a572b1e36af68e25a954f07f Mon Sep 17 00:00:00 2001 From: Den Delimarsky <1389609+dend@users.noreply.github.com> Date: Mon, 10 May 2021 20:58:34 -0700 Subject: [PATCH 64/81] Code cleanup --- .../espresso/Espresso/Core/APIHelper.cs | 8 ++- .../espresso/Espresso/Core/TrayHelper.cs | 53 +++++++++++++------ src/modules/espresso/Espresso/Program.cs | 3 -- 3 files changed, 41 insertions(+), 23 deletions(-) diff --git a/src/modules/espresso/Espresso/Core/APIHelper.cs b/src/modules/espresso/Espresso/Core/APIHelper.cs index befa736a73..fae3d4733f 100644 --- a/src/modules/espresso/Espresso/Core/APIHelper.cs +++ b/src/modules/espresso/Espresso/Core/APIHelper.cs @@ -12,7 +12,7 @@ using System.Threading.Tasks; namespace Espresso.Shell.Core { - [FlagsAttribute] + [Flags] public enum EXECUTION_STATE : uint { ES_AWAYMODE_REQUIRED = 0x00000040, @@ -32,7 +32,7 @@ namespace Espresso.Shell.Core private static CancellationTokenSource TokenSource = new CancellationTokenSource(); private static CancellationToken ThreadToken; - private static Logger log; + private static readonly Logger log; // More details about the API used: https://docs.microsoft.com/windows/win32/api/winbase/nf-winbase-setthreadexecutionstate [DllImport("kernel32.dll", CharSet = CharSet.Auto, SetLastError = true)] @@ -191,9 +191,7 @@ namespace Espresso.Shell.Core public static Icon? Extract(string file, int number, bool largeIcon) { - IntPtr large; - IntPtr small; - ExtractIconEx(file, number, out large, out small, 1); + ExtractIconEx(file, number, out IntPtr large, out IntPtr small, 1); try { return Icon.FromHandle(largeIcon ? large : small); diff --git a/src/modules/espresso/Espresso/Core/TrayHelper.cs b/src/modules/espresso/Espresso/Core/TrayHelper.cs index ead4705514..0afb5ac8e2 100644 --- a/src/modules/espresso/Espresso/Core/TrayHelper.cs +++ b/src/modules/espresso/Espresso/Core/TrayHelper.cs @@ -63,7 +63,7 @@ namespace Espresso.Shell.Core { // Just changing the display mode. var currentSettings = ModuleSettings.GetSettings(text); - currentSettings.Properties.KeepDisplayOn = settings.Properties.KeepDisplayOn; + currentSettings.Properties.KeepDisplayOn.Value = !currentSettings.Properties.KeepDisplayOn.Value; ModuleSettings.SaveSettings(JsonSerializer.Serialize(currentSettings), text); }); @@ -74,29 +74,43 @@ namespace Espresso.Shell.Core var contextMenuStrip = new ContextMenuStrip(); // Main toolstrip. - var operationContextMenu = new ToolStripMenuItem(); - operationContextMenu.Text = "Mode"; + var operationContextMenu = new ToolStripMenuItem + { + Text = "Mode" + }; // Indefinite keep-awake menu item. - var indefiniteMenuItem = new ToolStripMenuItem(); - indefiniteMenuItem.Text = "Indefinite"; + var indefiniteMenuItem = new ToolStripMenuItem + { + Text = "Indefinite" + }; if (mode == EspressoMode.INDEFINITE) { indefiniteMenuItem.Checked = true; } + else + { + indefiniteMenuItem.Checked = false; + } indefiniteMenuItem.Click += (e, s) => { // User opted to set the mode to indefinite, so we need to write new settings. indefiniteKeepAwakeCallback(); }; - var displayOnMenuItem = new ToolStripMenuItem(); - displayOnMenuItem.Text = "Keep display on"; + var displayOnMenuItem = new ToolStripMenuItem + { + Text = "Keep display on" + }; if (keepDisplayOn) { displayOnMenuItem.Checked = true; } + else + { + displayOnMenuItem.Checked = false; + } displayOnMenuItem.Click += (e, s) => { // User opted to set the display mode directly. @@ -104,27 +118,35 @@ namespace Espresso.Shell.Core }; // Timed keep-awake menu item - var timedMenuItem = new ToolStripMenuItem(); - timedMenuItem.Text = "Timed"; + var timedMenuItem = new ToolStripMenuItem + { + Text = "Timed" + }; - var halfHourMenuItem = new ToolStripMenuItem(); - halfHourMenuItem.Text = "30 minutes"; + var halfHourMenuItem = new ToolStripMenuItem + { + Text = "30 minutes" + }; halfHourMenuItem.Click += (e, s) => { // User is setting the keep-awake to 30 minutes. timedKeepAwakeCallback(0, 30); }; - var oneHourMenuItem = new ToolStripMenuItem(); - oneHourMenuItem.Text = "1 hour"; + var oneHourMenuItem = new ToolStripMenuItem + { + Text = "1 hour" + }; oneHourMenuItem.Click += (e, s) => { // User is setting the keep-awake to 1 hour. timedKeepAwakeCallback(1, 0); }; - var twoHoursMenuItem = new ToolStripMenuItem(); - twoHoursMenuItem.Text = "2 hours"; + var twoHoursMenuItem = new ToolStripMenuItem + { + Text = "2 hours" + }; twoHoursMenuItem.Click += (e, s) => { // User is setting the keep-awake to 2 hours. @@ -142,6 +164,7 @@ namespace Espresso.Shell.Core contextMenuStrip.Items.Add(operationContextMenu); + TrayIcon.Text = text; TrayIcon.ContextMenuStrip = contextMenuStrip; } } diff --git a/src/modules/espresso/Espresso/Program.cs b/src/modules/espresso/Espresso/Program.cs index e9a3469e60..29f259edaa 100644 --- a/src/modules/espresso/Espresso/Program.cs +++ b/src/modules/espresso/Espresso/Program.cs @@ -230,9 +230,6 @@ namespace Espresso.Shell if (settings != null) { - // If the settings were successfully processed, we need to set the right mode of operation. - // INDEFINITE = 0 - // TIMED = 1 switch (settings.Properties.Mode) { case EspressoMode.INDEFINITE: From 0931d23fc51f22addc6e191fabdfa99459486525 Mon Sep 17 00:00:00 2001 From: Den Delimarsky <1389609+dend@users.noreply.github.com> Date: Mon, 10 May 2021 21:06:03 -0700 Subject: [PATCH 65/81] Add contextual comments. --- src/modules/espresso/Espresso/Core/APIHelper.cs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/modules/espresso/Espresso/Core/APIHelper.cs b/src/modules/espresso/Espresso/Core/APIHelper.cs index fae3d4733f..e589ba951b 100644 --- a/src/modules/espresso/Espresso/Core/APIHelper.cs +++ b/src/modules/espresso/Espresso/Core/APIHelper.cs @@ -38,6 +38,7 @@ namespace Espresso.Shell.Core [DllImport("kernel32.dll", CharSet = CharSet.Auto, SetLastError = true)] static extern EXECUTION_STATE SetThreadExecutionState(EXECUTION_STATE esFlags); + // More details about the API used: https://docs.microsoft.com/windows/win32/api/shellapi/nf-shellapi-extracticonexw [DllImport("Shell32.dll", EntryPoint = "ExtractIconExW", CharSet = CharSet.Unicode, ExactSpelling = true, CallingConvention = CallingConvention.StdCall)] private static extern int ExtractIconEx(string sFile, int iIndex, out IntPtr piLargeVersion, out IntPtr piSmallVersion, int amountIcons); @@ -74,13 +75,23 @@ namespace Espresso.Shell.Core return false; } } - + + /// + /// Attempts to reset the current machine state to one where Espresso doesn't try to keep it awake. + /// This does not interfere with the state that can be potentially set by other applications. + /// + /// Status of the attempt. True is successful, false if not. public static bool SetNormalKeepAwake() { TokenSource.Cancel(); return SetAwakeState(EXECUTION_STATE.ES_CONTINUOUS); } + /// + /// Sets up the machine to be awake indefinitely. + /// + /// Determines whether the display should be kept on while the machine is awake. + /// Status of the attempt. True if successful, false if not. public static bool SetIndefiniteKeepAwake(bool keepDisplayOn = true) { if (keepDisplayOn) From e366e8e878045595af696ef54898bdf71886f4b9 Mon Sep 17 00:00:00 2001 From: Den Delimarsky <1389609+dend@users.noreply.github.com> Date: Mon, 10 May 2021 22:07:03 -0700 Subject: [PATCH 66/81] Fixing how cancellation token is handled. --- src/modules/espresso/Espresso/Core/APIHelper.cs | 10 +++++++--- src/modules/espresso/Espresso/Program.cs | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/modules/espresso/Espresso/Core/APIHelper.cs b/src/modules/espresso/Espresso/Core/APIHelper.cs index e589ba951b..11e7949a08 100644 --- a/src/modules/espresso/Espresso/Core/APIHelper.cs +++ b/src/modules/espresso/Espresso/Core/APIHelper.cs @@ -29,7 +29,7 @@ namespace Espresso.Shell.Core { private const string BUILD_REGISTRY_LOCATION = @"SOFTWARE\Microsoft\Windows NT\CurrentVersion"; - private static CancellationTokenSource TokenSource = new CancellationTokenSource(); + private static CancellationTokenSource TokenSource; private static CancellationToken ThreadToken; private static readonly Logger log; @@ -45,6 +45,7 @@ namespace Espresso.Shell.Core static APIHelper() { log = LogManager.GetCurrentClassLogger(); + TokenSource = new CancellationTokenSource(); } /// @@ -106,6 +107,7 @@ namespace Espresso.Shell.Core public static void SetTimedKeepAwake(long seconds, Action callback, Action failureCallback, bool keepDisplayOn = true) { + TokenSource = new CancellationTokenSource(); ThreadToken = TokenSource.Token; Task.Run(() => RunTimedLoop(seconds, keepDisplayOn), ThreadToken) @@ -119,7 +121,7 @@ namespace Espresso.Shell.Core bool success = false; // In case cancellation was already requested. - //ThreadToken.ThrowIfCancellationRequested(); + ThreadToken.ThrowIfCancellationRequested(); try { if (keepDisplayOn) @@ -140,6 +142,7 @@ namespace Espresso.Shell.Core } else { + log.Info("Could not set up timed keep-awake with display on."); return success; } } @@ -161,6 +164,7 @@ namespace Espresso.Shell.Core } else { + log.Info("Could not set up timed keep-awake with display off."); return success; } } @@ -168,7 +172,7 @@ namespace Espresso.Shell.Core catch (OperationCanceledException ex) { // Task was clearly cancelled. - log.Debug($"Background thread termination. Message: {ex.Message}"); + log.Info($"Background thread termination. Message: {ex.Message}"); return success; } } diff --git a/src/modules/espresso/Espresso/Program.cs b/src/modules/espresso/Espresso/Program.cs index 29f259edaa..9db711c9be 100644 --- a/src/modules/espresso/Espresso/Program.cs +++ b/src/modules/espresso/Espresso/Program.cs @@ -274,7 +274,7 @@ namespace Espresso.Shell private static void SetupTimedKeepAwake(long time, bool displayOn) { - log.Info($"Timed keep-awake. Expected runtime: {time} seconds."); + log.Info($"Timed keep-awake. Expected runtime: {time} seconds with display on setting set to {displayOn}."); APIHelper.SetTimedKeepAwake(time, LogTimedKeepAwakeCompletion, LogUnexpectedOrCancelledKeepAwakeCompletion, displayOn); } From 6617444f14742d11c3c06cb24b758986be108c26 Mon Sep 17 00:00:00 2001 From: Den Delimarsky <1389609+dend@users.noreply.github.com> Date: Tue, 11 May 2021 08:22:00 -0700 Subject: [PATCH 67/81] Fixing the margin --- .../Microsoft.PowerToys.Settings.UI/Views/EspressoPage.xaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/settings-ui/Microsoft.PowerToys.Settings.UI/Views/EspressoPage.xaml b/src/settings-ui/Microsoft.PowerToys.Settings.UI/Views/EspressoPage.xaml index 5e1e048293..f120c9bb94 100644 --- a/src/settings-ui/Microsoft.PowerToys.Settings.UI/Views/EspressoPage.xaml +++ b/src/settings-ui/Microsoft.PowerToys.Settings.UI/Views/EspressoPage.xaml @@ -100,7 +100,7 @@ - + Date: Tue, 11 May 2021 17:52:58 +0200 Subject: [PATCH 68/81] Tweaked settings UX --- .../Strings/en-us/Resources.resw | 16 +++----- .../Views/EspressoPage.xaml | 38 +++++++++++-------- 2 files changed, 28 insertions(+), 26 deletions(-) diff --git a/src/settings-ui/Microsoft.PowerToys.Settings.UI/Strings/en-us/Resources.resw b/src/settings-ui/Microsoft.PowerToys.Settings.UI/Strings/en-us/Resources.resw index 22fcea96e7..25d1e7f0f6 100644 --- a/src/settings-ui/Microsoft.PowerToys.Settings.UI/Strings/en-us/Resources.resw +++ b/src/settings-ui/Microsoft.PowerToys.Settings.UI/Strings/en-us/Resources.resw @@ -1186,8 +1186,11 @@ From there, simply click on a Markdown file or SVG icon in the File Explorer and Keeps the computer awake until the set time elapses. - - Keep display on + + Keep screen on + + + Mode Behavior @@ -1201,15 +1204,8 @@ From there, simply click on a Markdown file or SVG icon in the File Explorer and Den Delimarsky's Espresso - - Niels Laute's UX concept - - - https://medium.com/@Niels9001/a-fluent-color-meter-for-powertoys-20407ededf0c - URL. Do not loc - https://espresso.den.dev URL. Do not loc - + \ No newline at end of file diff --git a/src/settings-ui/Microsoft.PowerToys.Settings.UI/Views/EspressoPage.xaml b/src/settings-ui/Microsoft.PowerToys.Settings.UI/Views/EspressoPage.xaml index f120c9bb94..3394317ff5 100644 --- a/src/settings-ui/Microsoft.PowerToys.Settings.UI/Views/EspressoPage.xaml +++ b/src/settings-ui/Microsoft.PowerToys.Settings.UI/Views/EspressoPage.xaml @@ -69,13 +69,21 @@ - - - + + + + + @@ -88,6 +96,7 @@ @@ -100,13 +109,12 @@ - + + + + - + x:Uid="Espresso_ModuleAttributionHyperlink"> + - - - - - From b22e409d9178b2b9a0452cec53cba9c5b17848d7 Mon Sep 17 00:00:00 2001 From: Den Delimarsky <1389609+dend@users.noreply.github.com> Date: Tue, 11 May 2021 09:21:40 -0700 Subject: [PATCH 69/81] Add visual assets --- doc/images/icons/Espresso.png | Bin 0 -> 14255 bytes src/modules/espresso/Espresso/Espresso.ico | Bin 0 -> 67646 bytes .../Assets/FluentIcons/FluentIconsEspresso.png | Bin 0 -> 3022 bytes 3 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 doc/images/icons/Espresso.png create mode 100644 src/modules/espresso/Espresso/Espresso.ico create mode 100644 src/settings-ui/Microsoft.PowerToys.Settings.UI/Assets/FluentIcons/FluentIconsEspresso.png diff --git a/doc/images/icons/Espresso.png b/doc/images/icons/Espresso.png new file mode 100644 index 0000000000000000000000000000000000000000..2ff48cb39e49f2c4ca3485aad7b3bbb24ef8c715 GIT binary patch literal 14255 zcmeHuWm6qbu=gGg?gV#tcL;WHLU7mML4pSN0|W~mJh($3cyLc}w;;jY-8sO+|9*kz z{jIxIyHi`gs-5ZX>7KTYR8x`1KqWy10085if{e!N*!ACyjQIN0Sh7cY9pGK1-f1Df zUVg}y5dc61ypxgC^7?S>kCJJmo&5asK!vKXHSuIj?u`s`D=!=k4aB<$Fzb7o?c3qnQMdG{IMSX8Z=eTPL_pC>+L8#k0?vvPQ*WFBoBe&y z5KqAQ?f<>~|2W}90{C>??v)U;lJ9Xl&GE1vuX|IlCM!m-NRCm!3T`KM?>vPtpZi}h z`@6AVzA#sxd&YQcyPjQ~TiH3n+xNHheF+z?55<9Sc~&towC$p}TS^zZjn>E$KAq~D z@w_D2gu-#xZ+)AMJ{}%q-+o?TUB*alE$?jTH9mrQVyH6A^P@wvPsM*#Ymu~5?7$o} zbdwEak&{(FQqV_%qJRu)BTD7s5#E68mw?}Px;xaETSF{=Vrdr#^dJcu&!Yn3 zA0n6as(j~CN|f3gUfP~km`KnuK)IJov+bIT2UyUeKwS9%f%oZdZIz^CTHK2H=mu@I zbiQ=P`cpxCiyQKWLxtyjj_1D>DO0R3MUzKe<-OfTkzshEz4XbHZ7(PJ&Y1|)zR|8)#a526t0ejCY7U3zxh7^PQ(-WD+u1{x{mUVXvqG`7G z_#j&*fk}&;c$|pnvJEk9X(I`mltGzB^nP-3(jK!;%JO6t(zdm(a7I+*X3)gtvV0)Y zrHex5<9J`zG00gBg@(O@cp*|)wLi;hCL5J(u1@`H!@xl>!!N;*p0!#L#Mmczom{ z@!u&DVskT}{c5tQH14IS6jWvf@JD=x1g#nvnDeklS`fOUnGcJCg|+oauY87v)y!t4u}qV4 zc$g_H4av?r>}M6L+LS5$oJ_0IaJHyj+F?OJGa?hopFGxf_>jsW?j!o&XWLg1u&6#R zjAbdS#D$aea=?^XJ=6!^<9fJxFw*?8(W7fs>!;Nw z4WwETuxN*_YJ?;AG6c=AJc;$udaYDFa0+deehj7(1bl+v=w19PVYTE^27Z5_@S*+1 zj{Kp<Xt=@K}N++u`*{hECw6fvjPqy$prHMbWsJ%0Ii;V9i2TpH0;V%lE>A4e|C@ z8l9(m9&gsox5aF3wMl>0)O5%6Alnjjelf-2guR8*i#uC4N-BAZK#SnRPZ8xi(N3%b z7KZ}Aor6~VF};H8G7y4aB`;A}bWNzr;NIdyS%O3JV z;ZaxoyLvJdQY~qMJk1~Yd6a-cf^^GOCucOwH+6)$hSki}$OkKlOr`MmrC0 zu=U&0E$Y#j~6R09~$54jL^4EwJ)14k|F7DNNz6zL{q)V3sl4=ch;2{TgCg%fE;)R-jyq5C2F1{;8M9qo78GGPN+o$KISg zl_Mv-_Me|Ba;Mw`_1(c7Qh@VXBW?2K7ekSj z;%Gk-GBmyODSML*8#3IVfJ9e0mUo4JTo4*ozz=ooEkww;XBRkPa01Mh&+Vl%ax*dd z*T(X0Qoxtp)NpKmXzF+$&7|dv5rKp`kMeCs_r|B)PhWc*KU)j$OJaTN+2~iZ$=TSw zwImhPn*S8&^KDwM$rC>jdb0t;MuwB4!2v#}m8^(4gy{++s5lb{rC>@3;Pue~VezoT zl@Kr?`9nhwFoA|QaG+!55ne04R?+o^is>W!fm!>%@%+bGUNeCx%1^|J7@xt%FECt@=*-P@s z9?){_X+r1Qp`4rVQ$E@jq1f>Z;zLgUpdXMY-lBfd=7gRZSd9ZNRG+9!bP_F^=^JbG zuB4h?llvOtT+r_^?>3qDY0Bughms?31&4sjf`Zr~dI-*>eEG@^l-KOniOdI!5ftzC z@bD88V?Xq!??KfJEjJ4olPncJohN=%w-wWmDB4dk*xey1RW`8Upg<-6n8~@2h``>V z2yc^pKKn>vLF+F~2ET{0B{D^YPZ~icFNc-Ox*g5A?967gM)=N6q1ah=@A^}&RP!PD z)!w_F{C`gx^{(p*IAw{`PW49a;~tCQ!KiWKU#XyY>mEM z`uADzKP3Va7jI&P60%ekSH7rIq$%S5qG_z3nBRPjSXixM%TFVB^|pm2L!2=s_wS>8 z!9IiDKYdLo^?aP&urp16h^Rgsto`8mk#JB0lFC&Q^BMWp3Ji-h_wiJTWixl4UTGS>hF zcrCC{Jt&R}aR3VtHJ%$3Gy-CGq9j$ZQBeCF$(r`K_LRn+hcKYou9O>gETQ50ln?N$ z36B( zVAlm6@I8LmxWMOfLMpm|2S(K6j>X*0&2FtjA^)?7rfk96a7@>cU&ljCbVzCK_Eb!}DG*8s>UHfrJRB7$gMt?B?WPQHXAfoMSn{DjeLGE;&C?^@{Q1HSb zp3Zk%zy*G}mbr|bKoQPFJ-Y%9*fV@WXZ@wTu9IW_su)WFG(?tR1-1b6(j&m--a0pD zLs5dKXZVZnkEV`UR&Z)S^{4-_DG{szQ~*JlDjXaXV4h&hg|v%sVBfpvUF!_njGv^1 zjG1)vw@Tu&G`$r9mub`qDr7PeD7~5bSeWB&gu^X;;)0-2q`vv1!aL|%;+c&(pbWjt zzWxpp-h{9P)}=B%I(jam6k;r=kt1JqpSoaNdm|DGXZl_p=Ph<@h0#U#VV#kPAi{z0 z?l=o#ZZbEM5)7WTQz6LC^objp0t_6r@vG(D7lR`>?DF3ejr zrru;QMyXCRxcX@}C#jU*|EToOz7}gpNnV@;L&&Jwp%EZUY^AXI%MPPv)AQRpCbOlQ zEXJpsoZO8zwwZXQ&Mj8BA8X0U@3CI&Q$7h|0$NfV&sQM;T;FS4r511nw+Hg+0+;%x z@QlSHa8LeL&5bdx=608IAh2L*N}-E|*LKUznA(_rLipS&mz&X(xPK98e>reEXwG`_ zodBc4o5CFWi|U)lMBo|V#kq#E_lO4!yD@2)-h@7*5t?Mnq9n#1zuj*<43fK{`zZo# z8@2!h%f51jr#KCdG^^G3a4AphsS;lu%K-_r;Nwx0tz8M z=nyJweX3lEEf5!W7*Vcg$K2dA#;<1dD~My6hLFM>l;Yz{oOFSTqQVQO0Z5 z=mEkQBxZFU`czEul;b5o)=;;vT9vm;iv+$qfX;i%UG^5zEwkB@=!fP^{HM}C3foez<#hxHY#;@`p2GA5MgPL$uIE-wTVBSMpc2fYZtVfO1@7p3J4sK zJQD$u!2oz6G>Cf$s55n&QX1CF?D9wgi)PP_G6aLV0lZYvW4nTu=lq)g@S<{fJ-FGP z;eBg|rpKiSkRL|79xMnVDkT1ZuTcL0{8d*S2cc0;%C7{+fdQ&g%xmS+^f%kPk^~wp zHfyz5pIeePk|}}J0H{~c){9ZPHz_=SPaaa26j8BcH`wj88ZwET@z~&U`EIhVz$%@= zcRV%|OY>b5cS23r42of>c2(z|TR{sV^Tc%5Q;9Pcgd6x6;+zEpMBO4LNLTniO1UnI zF}rb2QYSGlEZv& z@Eae&s@f2jpdcAW7H80ARCGf^{Ulu}>wC)t4vP%=Db%{+E1Lb9_i)G?ecJk$=)C|s z4@3`ThZ_h6etlq(hy(R0+TV7gVcI_Y4Krqh?a(!K$qpgQB1#?w1-*}(|Fi^}z@UI4 zxxvBDpvI(C_XEo^L2f@cQkdPvC1|jf>uth%BOK{(>bRxw^AGUkSTuPn8lp=8lS))a ztG?eo`|R+xYxZQTU!LieF=2=t53@%J=oy0ROupkPw&6Fn6e_()fr} zn^x7$KQ6^NG5rIx>mStwc#Y>>_EX+Vk71y71s$E5ZimZz z6pA@H0`W-5e*iLgBA@_?D1>c~h*c7MiPjt%-xMJ>I;|OHSN^G56<0?GB^50{ zGF;Kv)(m^y9u3?p91iAhDr5`A^VME#kqDe^)#Vd1aUcR%&XZ=%?kp6$Nr!S(~^emCf|KJv2?}iSLco}YA&|)dLj)egePfoXt{Xjms z&(6)|e1$PJmy_IhtUFJ#f)Zx=J4q~~n4}y@*Q<)8yU$G34i%3xoli+*CPD9?O;sGW zny&1%qZu#v4X>IIbtHOO)X>%rLAfMkIAG|tFFwG<`SZd`xbpC_(*Q(V8Uk}i`b_Zj zD0dBK=qG#q70aLFxS8}4(1P_4=%M?mdw*f=A=mZ>e#pHn@1)c>ljM$dUO z$MdgF^ead1AK~_|!VU6!KPvzLDQN*8(_c{2luaxo6?$RE+~ggNzQsJ+$GpJ9Han?Q zwwN^Yk@$%wdg4R-UGhhxAVd+dZBoZ;<%T=CuMHqof~@@QOa7*h>`q~Ie?iXTvxqIj zNE{z(>7vX_gc~l=URo*9PcczGTR1c$8o=6gs@N&oF48ilG8?H;XTW$&Jc!Uxu6barYrlu8WC&mOZm5_@A0OM_z`u z%6!)Wqdq=C@0vML2a_CpmmE3t1}t3WGq|2wIMr5| z!5XW$j5wK#)D*{5@)a~;K5UQ8|0hzB>kp8H<~yG$=8L5jRJI2>F)UoEdJ|b#$yR+x)*r>GX%t=+YhqAKAd2Ou3#T0!r= zuf=-v&M!4y&MSDX+CIXr(Tm1M{ppo6ZZVmCsj#!~#6QIKb2Uhj?KdHhpEM zK@xTAsV3pijm+4Va8Ecv)ka8=C&{zz1RvYUzTp%=*KP`}BCucY(O{n0u|e5sByGxq zKd#+kZ>ZpO`1AE^V^(gYx8r^CvXK!Vmv=3@dNt`LZq!MK}1;A&@Mq0{j&Y27r~ zH^oNdxFxrrgT(lKg=RcY2Dh}tUj@E%miGv)^;5>0ib+(WJEQ#UR$$4@t83=krT~OHVPrln7|mq^ICF zqEaWw@~`JJ;74htS^TTcVWp9#x)e~@NddiT;Ib=PJ-r)oKV@x9 z4RGQO`%9EN)?uLUan-C}mGfURu#NDqP0GrCKhQ*mnFAk^Y+5MAgWOl#gwybpcN!+j zupsd=thxl&X_i&e60~&LCG~X0}C&pFkk=tLqj_TN#o%QD^RaWKQX3x;naA$iY zVRtE^!V#K`@0SZara)^#45M!W^g5aO9@$>ToNOEcaCYz8VL}qaxP@X;IX{vU8XV^1 z#FLs)I0b<&Fr-@Ztq>k~qEFBHHxYO(-%BBMV{r}P@p!BuZJ{g}TG-YoksmV*YM$3O3Ef*{}8jNMN42}r^IAB&c)&4-#YcLPP@SW$$mMj9Fo%YwA}%zXX;y} zHW;{XI-i)G#+n{5dtO08tItWPO9jg?@5^KgIw#Lg2jswzpN%HV#353IU;4c~1U zCrr|C$8BW7`z56!w(lI5W%?a~3F6x4>@brD)Lot*RI}aG zb_$bB;9Z|y8v#H8Yy=VOp@$eiPl}I0reAuUa;I#K14@guHZ{|^#YC7}RFl_LexF;2 zrsq5jnV$FF*XsG<{+U>T?b!(+Kf=9xkRGPCRj!Tz?PZDSH(y1}kf#aA(l7E3IR?45 z^XuVK0h;NYv29sv>D_q zgTtKg`vBtuOZl5pH25SYn@KmUZ(1@uOhS|4e)vnyHo2EXt&E9^xulU@jc-_+-j2?Q zDU|k*^HyGaE)B{dg?Rz!UrmCQuvdvOnXy;s;kq8pwx?(%a&%Ez#a)j@sKsFj3SOkO zFhvPJ3!*}?jpnIOti!Q`nfH^Yyn?{TO#hes&)!G2^di6bQBN>l(@bz6k_{VuI>!W_ zo(8ck<1;mT=c2c*6Kob1_(tulYEvw>a3PMG(7q;|cdmX>l+9${x~ML%FOXaxXjzvq zylM-xv+A?iJQ^_^jDE$CE*!EtBKC$0|DIvg4n}xMC8lBlC5vmc!yoK3hI9&!%Wt3R{d zFBbf<-5uv}ks?J-V{scklHEF&L2POE5Z1soRMqzqCKF>K!#z%_EMG(c` zNI+gXP<40k$EO^#S$Q4l70Q21gfW zxlFW)91r!UkMV7i##=@`gbY2yfIU0{ZKEujPxwWJAgf0AobSwwLaGF`IT7x}-D&o} zm&@k|S_EZC`Sb#t8A})6gnoR;KG>E&{`8&i(TSYVsPU8S$Rpm;f<)J^29@D!|HZFx zGz}}swLuB zLKPFi-5abWiF_zlKKezf)1|}IgiB_E1n~t;R!%r?Hj%=!M_aFwl+SWdwruQ8s9+oV z-z@(8H@xl8=CcpcsSG5l6>(C|S;h%+7N1>`a*Odm+&aZtjS?0v_ z%6>bgXi}d$+i%@$pm1y9cKHC%T;Ei|x^xi>>(c$O0yu$9uJw*-9cPD)LCx-8AIm2m z6D94w^_Em<33&`UoLktcP`TuyC=Qie+-=&Qp)6r=0DzBpnwMN!11ld^Mf!6h#rJRmB0yHI|oNG|ikM=mV_sTyC(Apwp8 z044-}#W-9Bc}B_Nk--N}i-`;c7wH*ROqLGVC)-8-{gpCq$<$gN^$^bmBJ^Z3rYo0Xi- zrOTA0-%T6B6z-A7Gk)|dQtA?kgyAgSO}(#p>5z!bTDz0xhGDpHBMhZVP6a@&Ub;|Q zyZnoG9|&}1GFM5%9Og1AVWXg~163@|>(e6M?CgOM)TZh;o*j!&wK*xZ`Z9pggS_qcrgCjSrzCR7ug9HxL_PvG>=}ET@tdV26 z{O`$sNB#_|ES6asqc?Iy zf7zH))Z4z@bzuNY6krP%>`+I=Bkb-PryyeSk*6m}$q|L7w12zY^o8e*zh+(d{+2{8 z(nzE@TU@*OV6U~$@cta83<9!kcJw{PkiT~zp{9mF@Ostmsd4{!MgmwsdGFpJche`b z0nZF+%v{;Ow(J3Z5TXVfbux)b9@Iw1yEokW?^yrB1(-|uc$oWEXn65l{jFMcqrH^t zQd6H`%|Jx%u*)G`qsA4ul^DPwrwU*k4PB; zFU#qJXP2P|j?ORz-4ZG~eGI(PQ##G74RqXmFjcC&Y`d@u(WS&tmdAauBLN1`{ImhZYL|MO#W8`)bP361Z{L4_z0E24Q<`a&wHN^ASBAz8D zcw{|ueoV`5ty+B{{B-{FU3`Rnv|N>a_K40E+GMkuxXC=Gv8U8VM4Yj}&%ms9mws~C zy-CY;iFMH6E^xP;qu^`9sYVh<52$QCT=Q3_E{)57I+h^o*cl*X_;CEhDnJOlZct{f z!?|3w>NF`-cG4{_{;v*in&cp&;>qTqGk6EhVf$yv$GQe~(>YMWJMBiB^pSe+)4MJK ze~7%Ue@0rCr9I%d7!K+iBmpBX zcJ=(O!T05=vPj0PTXY=tyqD+mVbVU@Zms_5{B+5YI)O6Nd%IzqG=qStLXU{}UMw$) z^y{7ynO3J;_Zk&%O(NgdaAB$;;;CZ=P~{!vkwiO)8#3ImJ*Z zE2HXQT+K~ZW1CI7Ojn>MtGxq@lN>fw%C@*2@LGig86edn3kMMsB^8772A9F^ICAI) z3CC`aI!F(f%v!Y+?a;a^QYJTI3&4gdJ?88IVcA)CP_g#jIIQ_;-&)hJ9yaVpk1xAO z!gIPNW(J9TR_2CW`RMH zS-o98;*^{&he>!>3>#}CE8}NlubSd#oWA$t^)5wx-rCbX32w0xATg1$zM_8g?}v+5 z2g4Pol@e$6aW-CwhB=qnluHOCnmPH$pp|~Pe(|?{qv3%m+Jg+2=bLcQ*t(O4)*GK= z&P>O(w;*)XYB4yxIFIPHS6y^Uds8&Sgak)0w)52KS;xH0dv{yWTRzdRxc};e5YHcY z+wHT|52IEW9#7R*|CDLL&r(E(3WYPG8Tft2x)c0+i}=r(RLHhasQzEbz{6S!WBqk= z>7B+6l9&>yQif;$TCK%R&d5;a?n)oRtHtCUZ+pr(yTSMx^6p6Le&3iQL7_hWlHMY2GJUP(Po+6r_{5^%@@pXd_|1Y?I{PPl zGF=Coc!wq{`gxLwVavbr_Flv65{Nx*lQ9Y;2yM|Zm~);BS0?>p3G%Ou@a)3?g!YK7 zSDxj$9(*sizXhibJV`S%#IwKI!>LxsY?ZAsHcv{XrsZ>b@vLjW+^Z*OF|D)FXwrYU zpw*1mXYUwkI^eCC*T#%>!kE8w^;;HNBbz}&TJWictuU1Kp&k6beb`#g&b-`gEfn*c zW=(5#&0}9LPt;GiT={ngw-((>P}49eulT|C{R%V79C}m^GXW%yN+&jQ)}qbV4SlNM z*naH!)a*Em{D-l*6iZV}uj-z747wY}#KAssB#AF+P*726MJ#)mdbavJ$#I|B;xD_< zcF<6qt!nS1b}C~qq(F?$A>rX_p7Pa0UuLWdR=zonVFjGej9+{nBiHmei+g$am=}Az zeM%eb(-PaI^yqN0=70Yr`1c+N_N*)8{rLUJoXp3A!DkLZ#DAK!cZ-I^mqOwvV>!lE z4MyYY5Mk2eJiv`{`xnK}z|Qq1KlJtp z9$lo9G7Bg^lD)8{cD|i6G4n4!f#c2xO%XK4U!W~YQ(^o1ecRrp0BXhMv0nD>4lh{d zcFx*SK)~aL^t5%#-0$G93&Xu2AD@J1isGPH5b1WVSuDY1L{^ckPtsq4&4QF?iUW9& zQ#!V!GO~vgEL(O9i*eWm>8X@H&8&q5$3+Cz{4uxmjxi74xX{(iX2k`U{ilfTpQUF* z;f8mrzB0pcs(ys0$ijET#p~bl%HzarUDY<^PF&0Zz*Feh#L-x2)&eW|$M{ByN})9K zEVBj3Pad0!$g($W4teW$V+lKyo#1vMW4E%-c^zQf0sWGzy|y2rJ6@Qan=$C7gCQ`y zLCo!G-AAyg>vmMZ+4HHd%eXTZ+dluju*&HqLHNEl} zK;s|SL2PeR@pUX!yftxf!>~IupNBjmwC~50{o0DQeSMYc@X48|go8uA4OZpRH>{S# z`)8gMTM9BGO@G4HV@fmak=5rcO4;#XrZ;vIhCDDQ2%3Y*6tj?IH zgT%v^8||Dp=N=H0Fw47-JqNL<^(z~nzH>*?xBmXSc#M4%0DdFLSMCwM_IB({OdcKj$DN1_JK>N||9BZWkJy!DD+wx7A|Hd<~O;Y$8}hJG_o>IzPnl>tc( zJ}1I84k(DN^Rvtv-{Ih8e6^fZ({8$+B-EFMKCi8QZsA3p3H1WJd3jY^?}4fjZ1`zy zg75=48*eKQg-Y7B_pCJ#xg?aiH*2T)HLZ_Z5fit+mX&EukTs>JZBmg(W48 zC^sB25wiE|^Hvp3;PT3VFEMR*`2#Dak8npdZ2Oq{0qMJhMmZ4Znv}~L4PgRM>RbLJ zxkGxMQv!*7K?<;0s z`tE+zMElQt%+E@3)C0w#R{K$Es0Esrv~l&YpU={ScrSQ}2YUYa%re%vpPV{BF|AsS z<7J1oTB=wv|IGotwp7-L@)CCE=x9Zgvlna%h2A0#+>jAaNFD-t&Hy&D%F9y&Hk2JH z*$YioxhMR<8>~f#{laC6h(MU6&Z zEnmgzMVm2y_MOqR{Y0}uoR5uU1_t>%zB`;xz$Q=#=z6$6;D5lsFw5@zAmMa(usLpL zwasWPWLq6@usq$O7&6y|;h$z`SCb!IEA_cm_Lw=TzAvpGv8`2$tv>Gu&lKH?g$xB) z0&EfakK6IrGEGCTsFxfFp^2Noq&QqRPq>=~2>#Um8HL;W)7sn|7_2J71 zAuK`XW4DCY6oW|_y~g*#qqObyPoDmjoUOuO{14-#WW?98%U7G5PWJBGIYt0B$*lXq zSI+LZ_u7b=i=YX#wTu%KHP*Y$w5DsqUcM{fGcSimK#dr!H{P=^@xy8(JeSg{hp&Lu ziC;bnbu4E^$YhM^MCQ)T(b`5{&D`@)nEL+91CN7hPb*I-JtOA0ZCpOT0e4i3@b(7& z(8(H5-9w+VqcHuXJ$)fYPR!Q^!rUnqDZ zv~2%oXDzBF$5aN!#5n4W_aQzk?2-Cch>Nl%Wh&P7Ohqjd4Qvd1Amp5!4OPO7u1*sf z<5MX4vx@IaW(frXQhwh3iPsD;Szw?C_HNb^(v2M)QhToaqc8EF;Ym(V&LlqSGIJJ7 zj*DEs88jz>gIrNW$_llOL9>BICp^Bd_SD&NPP@peOx6zAB1-#5!MB)y|AqqT-NhqE zLCaHX>lAIDyZyiLSK~LL!2Bx$!AxG1<=3~b-H9xuAq`sw?#Oy1Q#^Q`_F{iiC^goG z_R)16?bUt@Ao}exE0<4&GkYrB6h z@}(AzDt9Jn?)LF|UsR5su(Q&||3T#XYDrYc=uzl#LEgl5h*Bp&oHC>P(?hCbw&9Ij zAabJ5m+GIv-TCI9t03;+Oe?GN=5LpZwaA5o8}F@BeN$1bQr(eefBx_$N=k^9EhI!8 zRK7*_YQtt1cye)I93CM@G_b2bH=jeOxkhe0GrHfmw@dhXhNrj>W^F(=deBOF=sUQc z7Wm)_i~Hm7wu3TnHv<9KYS*+^tKvjpUzFAw_UoOoLB~4vf>z)Wwkm07gsKJ5kp$nI zd7x8RULIkWNQ)wNZwl{3H^jsnpkS*dyh955_~}o_gQx{mMoC6-F96@-KX$-qcsq&;d={Ek{qT&Vmg;JH(MY>ph%IS9UBWV$ z-~ZaIC$N}6ecLSll6{7~6k~IZ#J-c;3F6XXqdB(AG)p#x$fmC0C@Ot_hn0p)&u?}g zT1%>^8Y^w!_hGPzNJfq20jQJx^`MFr-p;!)E;4;Gvp9@!d6-nPS*LxVa ztonjT)^MT%jb1m!c#3Xa;Y%accF8e{>?W1`1gGGv+&KBuWdD{&h|0MpQ-`Q!-4)P% z?%=+0L7!{Q_`5S?G@GV|<~?GQ<+)W=0$U}uG0qzG;uq@@F+8ETxjI!hGf}8l0&zU< zaRQ&*Gco(GqwRG?j^C#FyfUS9%iWuNSb5WAi#hU??zaA;mnj%nvz#sj5+MzSm=2gg z?pKjI2WLt)$@RDFOPi=UKOv`gtuQ0s-P`;Z`rnXzmAzRHIC2q$vHEf!1*9K!^=Svj zOcE?PC&Xu`cOr};G>BbY+VFoa2&@DYnTv8ohNQcK7N76!EQ2eNf8Oq+2SEx1z5G$r z5d1Zaa(Fc7qP>qgsY6>)#{b0ztN1K1(Cv$$1cr~ykiG`?61D=(qavAMpb7WIp-Zz$ zaa31<@J}&QZ!&dOHFjX4OJQrbyTikiBFre9AJoNjOpN^;gP|vC-?fsLac+NlRB`Pm zDRyr}+Oic-J+^S3#Ibb}bu@80u5a(=+sNk1s8XNK>H1`o;0JG3N-YcCG917?dnMgX z(%$z!qV}AMERi32W(`%j+#hVle@=48K2D$r2IoMsI{w*}o^!CdU=483c%5i|f&mYotn#Q?UhLj}+bo-!K7s zY@OfLF<@8exfXAk6q>oB3YgPtuA4a7h1K6|?HnT{iyd^-`a2#5)eaJ)Iv`;^&&lf& z{2cMFd@W}2su-SEndXh5#cSGL@I_hTv`ncukj$Ea&?pO*)D=$yD=ngZL(iTrw$lPy zw9?fu(e|k;D3th)nBOyB!U(uDs4}jEkwP5FY=Z4mmgL);*1fjJKE9Sqz98ysZ-_Qj z8dyh}N{&J(=-Dnr?m^BEqpBgF*-%^G8)7L73|qALm(`2wp+{Big_a#jzPG(pcuusJ zLFFH+9UgLp-u#&o!`QNXw=W)&typ4fD2yGYt>o(~W)cwmyV>&vt zKaKF^JZ0((n>+gljt};Bw;MSoF{t;$hM0!hv-0KxDmti|^p@U&t~563KpykyE^%(R zwiqFRSrBMZF?3oGh2`TU*vJtD z=a@aP26~sd`N)Oze-Hig-YpJyZam>L0R^Fq z5PH6$xXzE9j&sHwzYYkwq7Y`?T^yH9Q%Bnhki~oBxMZz?NsxQlMZ+H|`pTNyRJnHMz6Zr~CD%EhaCx zrR}KXSFGm3QbzpTL#xK^rvFVW3Oc#y nReZ(t?pw!1X5OE;lK*WKF0}%%z4n!P?I1q6l;y}cKhyxJ^A`V0xh&T{&;2)R+%Zrn$ zt~hb#@?pu++F_}Ti)ENE8|p_5<`P91ZB${bDoi3cntA1rWTtXR%0@D?bTA`jBblif zltOScv1DK}vjp?S7(+22nOPK!{>jWjiG&#+OlHa-OxVD@UounHFJU8@DecQhnDK!` zW&!34INF$xasK^&%)@-%eSXZveD1xBxE&Lj+4sb4aE`b;o|z?)z=*gjo|%bpCdL_e z#pceuGv}Q7x8$gKx1PLc?>%0`AJ~trElz2PVHgp>-^9?A2JVQY8H-Z7Iv9m14Gtje zI3%fozYWe2gHswDKqPeqV~`)fUV{T(fCGB*07gPaa6m8W?*}-b7e0u<2>fj%by+_~ z!bVa9e?-Cy;I4xK>~%2a-51xuUjo=`V6WXc2Xhl~J?Ead2KF{EzdNphy$#IoGBJbW zow<+C1@?1qJ9*Jw{A){+h09A)dU1LQ-H1DyLjFkEPr2bK%v;DZT=zdsrd_+I5!+17vctg;R5FO0(-{; zaA1ybfLtK{*^$sQ?_$LDjJxx`H~sEBb+V$p_yhM$9q|_qSRPOV$OWqfwZuQ52Zjs2 z9@GdIEFUZnxbCS5vi=2sGxs1=iAK^yMx%M%78i2Jg9DokU zXF)xH7El{}EAI3Mf}@!;7kK#~kQc%{uo^&b0K6H- z8#pa+9B^9Td;vzu2MPFrgf_Sv>=yxhFMz+dzQF;(o7fU#;O=l1EG_1x-~q2o`{MTm zLcD=o8%~7$LBJcd)B*CqvhBP100|hI6VmX0(b?o=l&J_Y>M^5H49vN-p<^&{e= zmk&>lt1C&4kr;+iA|+$(u=tqTVTm!z5H)SZP<*WjF*Gq0iHH^pu7tjwVu`v|mFh)w%W2_yP zhls0Xh?=%yXiQZX#Ss__}o$Mg)0)1kdH@cU;WX5;UWeC;?Pe6Z`h zZ+v&nz}zWMeYf*JeYVhi7Qs}<%`tbAc^a~MX zSnmt4*5_eO67yNa8|!!)aR#Pup{9NdIKSB^t|#3Y({I>#{f?M^{dNRL8*gCb*C*X+ ze*a|5$q@$su4&-J4CZ6u131P!&YTV|P$!nM78wxVSa@ycKBwauI{fvm^SY?puIj3g z6BKkxHG==B0~B)ne{uX{vi7TiGxC6{9@+(%$5cJBFN%L1_&2zE(B*sTz0rCfcflM# z|LItt)3C;;0Po4bix?8uiMPe{E4Sq7mu||_Kf5WWe{y4<{>hK>^b0rS+Q1yw{QReg z7xDXE!tZz=Wznd=dxRyZ&e1p;UIvxLv8%;?vUqPh9`V z1;lw7)J6tUjNdUblnrD>BXZ?)pLpp^rZV!!kH(?r|Y}v=fH&* z@!xn2JbN8HU`~0fkIw_<2FC;X%oX^zG!(@%Bd+ao%?)QeHBhQ+C#5Fc(pfFMKTpA% zs)hX$s+|5HkQe?I`~`Qc={a|GRCDj@tQOptt5B05-^74*N|imBROS6*s;nVw9SX|>`Z>=l$0sHTz};NMNv7N>`}9zl)8pZUH5 z*e}MqF9Y`Tu;ynYzfZ%@l8_n-bKS3gTUpw&|cfZWrh@l2p6a~6UhUF@IbsHJ%aHB^aUm- z;NNg(*HOJrF&yZGXYRfHBc;mk#hU$5C-vr!ausS3)r6lFaVHPj!k?I%TCjtfcTZQr zysR($1^82r(cqs@W#AS17{ERce8^D?Fs~TUMO6({sxm7+ZTxG2bxldWYQS252cB^4 zL-2(U6Z@1}F~Z=#vLx1JMM>V2TJ{M`lIRt(4`ejI0)4(k@KdFz<=mQ|il6E0!2Lz) zJ8*yVe*FH&PSfvAIalvlbb&qstdG|8)`ymUS?>Y9yUKd$-H2Uf=VLry?<&oXp8BH& zJ@qaGN14yZ2+UpVEdwVOfe+xq0gQi~eU9Gv@|k+xumb%8e8TweAiv;ydF5t!1^5Jd z1n~#ZrkM!m4dDAV^iP*RkT>PbR0nZ~6Mqc+?*|q)D0NX>sk2Y%te*HjY9shW`h!y7 zIqM$Z|GQj1N7i|c;9O4K=$iz_Nzsxr{27BkaQ_VPC)PE?^O4iLsk#wZ>xlKkyQ!@s zI;i&^QfdwGua~uN@JFBUtoq^Ub?6zON0fyJ2@h|E(?oH|^=rz8ZqhH1MN3Zx6zTYYE z2lNJx1N4V=&^7d!e|7np9eX`_J@CIzshXRWx;*XYhAY3+NsYfgS2(a@XhQ10nRj%8 z#&=Q+9>`PJp8)1D!MO}tPt3XgnM?j&_%{vDQ;anwUDWy!UDX!gzI}uO{z`2_WZ{1X zu-{fcJgLz$l>RXLfH()Bmtfr!`}x40dOrpE^rf3}^~=!Na^&;vlh4%$DlgQ>mtQ2~ zZeYH9;g=B@p#kQaxSRPd%LStY)B|8lJ~%B1a$&*w`Xk^=+y#4bK(xSW0=Xb@u8ap4 z_tZy_D?WsmXnN{2J?TF1;ClK+Y60s7jY$b-FQ;K9?U z=~sdM6W{HoUq&s-eDF5>A$w2a34lNA1D;L59@B~0cXj-isvBF!-|=83ygV+@q z{aEkE>MqiIf%|UYPV7x!-E$5O5PzQo7f3Gfw18Z&dBNoeFDE#E;PfCkiYFi!Y)&8_ ztUnN4@but3(E#F4pYXeBJ@mYyeEl?P26`3tm6!{rv3DdjBKwA>S5VqNet6lf9WT8E z`M|Xj$D=yIos=lK4EV&Rt+}((|T=O&N0Ae@C02fR?z~@d2Y)cN`lPM6-&vp>icParygJ_Y@N>?@E1 z=vg-oNgVk0*&WZ$>#9^<7X(K;KQ-O~9`N&z|K<^0RGaZoXSM2~c-4xLY2EM;>S5q- zbRTEAfc+xm!v)a8>A?P#n{y=3?*h)p>o3-OmtKf<56lsJi8tpQ9T%7ftR9F41USH& zAe;}t1(dQ+pW2Vw z?sKgFt48Fja1^N359LcVj>;e3I5J;1j!bE;e_8uD3&5Pe2sQo!yAJI2zW#14Ok<3`M}LRZ(um!uqPK2@mdFS{rA9|!+23AH9GR*z0jXd0E)O~9Vo&$Z8UVO;x*;rHjm z>%V?mu3m;7{V`yFsP+=UeV<@|k(N=oU^yUM0M_IKxZw0a{DIQ~a)ExpX#x5|L4V-# zg6M&)f9nrj??7<({ejT{gTK*&fF}^20IbP{?B0R%2ew`y7Y;4yr9YT)j-G@)%AcZV z$bDs(2bcrM0iI1O?HhY@{%xJqLe%(D^Gojke6Ro2W032^aqgHlmVmC`E_)c*Pr zX{`M;JfG41xBBGirK7)~4=ukGIUm?pVa-=vtoLDLPy-wnJUwt)AR}`ExnMNG@xf>T zH6g$Q@raHKew|?a0q~|KxP0J7j|+ZYF#Z5|+qyCA4;&YKO>p(1s~3(`^wPhcubc zYr&t|5B%$({Z;UNi_znoc5h72!usD;agjdOc$vYyn%D>M5AeWn0ayp~f#X6p{x%={ zHE+hEHy&hBRFTg(TlzU=&+gm;LpPH}G`+)m?VqblU!C&UQh8M6L5Ix}B`htDp z4WJP=7dVfwC+H6xFQ5a$h3wwJBGwCGf8g}M_(W)e*E2BO@cPN34deiGgWX@^-17yk z=LG7&Zq$Z{paYeoPSHR4VUCGtP{{1P~7d3w20K8)@_IirY z|Np|@tN*`dR7#nE=O3M(x_WHB=K60!(EHT^{~E4+X#bSEa`g(-dB>Zs&4>6w%?SBRP8|)8L1LVxPXaMe000(%# zlDSvSo^8cv?*0^WubRgLjXj_P;K8%dg{!%D_*w4%t;0D-8$H&HP5*iIn6zFsCWZB% z)+^xuS@Tt*-k*ze^>a|`?y9_4A6t33;J$y^C3?T*fE!zIL9`%C53>D1kO!F4Cpu5y z^^k0C@ahHIJ951P*F!Wq;QNGdAIWfmy#r4VyqwTB7e10b1;YjEz|pD;^!lHip?`KG zyddfUo1J+o$9f%frd?x*iVj~~6h>G$U0jLq5l#HuTS{iRy4C;kXe2RtsA9MDn|tUt6K z(Rf4VhEMhfQY(i1fz^Zn4?^{#S1W=G!Fs{-hyj0KIpFsX=n1lNf~N^R^&Xrp*j?UJ z&l{4~uil&|=ag9sIuF2ml>~oi07toZ4V*A~z`S6!0He(X-e`Gn5cvQ2vpD~;c5G6u z9h>N~c3k@Xwd3+NG(gt>O00k8{%UCd0{(l37wA3E`NIvD19RYynomZ~iMuzF5AX$& z7o0x`@WJ}Tz0eU?E9}KSLD(OF4jlRHQ#)FJkXDHJv#|CzzS=_{UwxI{zx*-;@y7@c z5axo>gZ4A7dgTK^_Q3J>gU`@Q8 zH{h8P(FKG19{9x|7fdh7O|&0aC_cRVm!U^RjFunPy6Gr)l${+vrbK##p|-fJiG{MY(NQ)>Mq>5_F= z`)>U=!vi#8{Vzw|zi<%p8hZU7Rv_;;T`Bk<00#~@{K)|q)BpsvfH}c=0*+1(JPtU& z2t8o$z|{+;Ui9mQunrhqVDG^B12?j#?DY*C4{UCr7PvmL8-))p7r0S;qB)D?`~mgA z?642^oYS)f%Rf2 zA22sy&08**exmh?u2#s-3B=#>g1rN$1K#L7fztx!1m*#10cuBAFE~ADQ7=N=<%vs>kn)`5N}{Tf#d<%XF|@WCUCDg*gFtk zV7&r4V70)VIXF_)TW`X>2NSUeK3mR(07K?~;9oHy@xhV-i9Be(!m}(?c}x7k3+xjP zNSqEYP+@X`)dJxHbAt5-7*Q+yuKa=AZj1WmDHrX!0pA}GZ}1|>1I*2yg6|Dnz2Nl_ zLmtue4afz&%2t@`a{=8q%SD% z8-JGfA652GNwgP#U_W`o_yU9fqhb7^QF=4ZYaeO8%ESL4IgrHzlLyEJlNW>!RtG}< zKzso>A^E_L)PR6LH2q||{yjbL_m?C$xSRm|Tkjn(9~eDw-oW|8kU#MBAe;|^IiZC= zu)Rdbfql^bkHCYn!hAgi=Z2~Oyx)z_uHmz6mJW;$tOD+pgJSS*F$F!4b0Jp$J^ai1 zrBua`ZfeP(E=4#iY&am^(0K!s8^DGCT--0#vjX>pRP@bh_x;}+CghjBBkMn{Q3qiC z=ga!9NAI_+f1ZACI?nQ~yG9>u!1`y@TOG*ef#d|E1N%8A{w_C2y%^8}&nFs>==w>b z0geknf8cb%%LgVmNIu|aQaf5-81jm4e-U4kI??0<*E?ugFR*ST7oZE)9|pPLX@RE+ zrd~XZ98fi~yPk|a@lvi`yZ$Tid;>h+Vm6*{0$fet`DZ2PRQ5qj87v6m>y6w_JC?}&cAASTK{43#rpV~tARKCAA%#X z_wmot1nUh`%^ z9N2(61Nh4_t1rbMc5_e`tD$^oRl6Tj9V#=>Iz} zo{9SeEdI>>vi6BTpMM$uC;C4ZOJ$y?@N5)3TOwD@M^9%yaF>yD8w&^Iy|{P)YJb~5 z4)Nf@L}mGdxv@_H|IDVxfIl=~12lj&fZ$(}(96dZ=-t(q>0_&bf8$j?2T%(bE?6C4 zE@%Mm;ten-{+!E5K0yCDmpZ}Z23h;`2Tlu?aqc)lUqCLHF;p)KAIODZy#VZm3zh@o z6No?a0P}*KJ8$6i4tx&q9u=ntre3s~AR6F$2hJb(wF33vAlCmcUOh{CfL#Cde$;;N zS%*X758$~+Dm(C8JXMA@KYvgMwID0_S=qqOy_O6}{U>`#=oy(lGS)pWRDDhtr#2<6&05w5I^1$Q;;%;gL;O{hn{s8!k zCkTvA5B%PN#h+YY9w7eUgyaG8A*2OC{4uwEWEs&*3hpoM^Lhu?56~yDP9z_!H!$;n z7O18y|Ffb~H9{`TU(nfO0mpy>g){+R<-1ApG%wS07e-o^F5<{Ev7>)%C) z3nniZZ(#I5{DIQ~H*)<4LVAg!2jSj<(Sx8CPzT5bs|Vl!dEmIvY7a^LAvD6)3o<$_ zaHG=#J39RRJto5i(?1Gwf%(93!RW!E>I?Ozm%09-|ET{KBlnB$W8Z|&z*$Yb z!k=6?gnpps2|RD$=Yya>4Eciq2P7|eH6k!~^EUkf^8wa6b-`+Z>m9V{8??v=So7e6 z@dn5ft$KrCKCt*RSBOWn-oVoY;|u5w4%d7|Z~WO=I3p3n-#qV5o`F=Dn!B_x4g6aV z^okVLd8>i1-R+)6`tSJzdIKAd3xVE&o70C^(f9DS{cX>hT2G=_v{?G&B zzvbs=%Q-L~e{cZWPyF$GtjfmX4r)bKn9n)_fA$85KY7q1F2~pYPiy$2m$<3D_;dZg z3;Z`fp076|2cRFQ*8ucALz@7p8g#$8LJ&=50HK7%6U^IYS@bw_bhZcGu z`-|j)@dn}>MGNQ)7y(VNz98riTux}q8%WP6u;=V@g6M+y1L7YH$Av(Ca2&vRXc_VE zVfKG;R*LU9sFbyDo`Z~Mq1IIw<=~l^xvd6j#ny0lpM8t#A0f|7WnV#pHRgb1yVpOk z_we7u^$+~l0{=SX|Auj==)Lgn$JSx}H(lL=1HpXY>4E1Bzz63GY@HCopZehRK=J{v zfw{{GGG^g#Inc6RaCxB(e;^uQbA+b{$PYFr1kaurE-)XM8X=npk`IEt1K@vn*+m}y zya$BOzhd66#{Q|iJEJJsEYCybGf`WKR@S`3p5x7YK4q);4@xd-|N1Y;{Nl+14IR*% zpaJXyti@hn9r`~j9_bGJuN3?bHyiv9iw0zK0a!B+1bl(Z3EVprufY1y;{&h`Xn~&} zE;qGfc0ZYVz#anew_$w3rE(5^zv~@HULY4*@rcX`@CB{kuVB2P(FHrVI^gX!w$KAV zCmgE1NN>e+>SpskFyPN;-|>AId=}m^iPVM~`24m4bs~DdZN_NnBiNc^3Er0w(12Ik zi+|=Rga0pxKWhL4*MI$pB=G0@C;ng8g1>Np*k|MKa)aT(p+@Ein-Ay{vvY#<3jBN^ zy#uQSP7}g9V0?kA7vyV>3z837%L(9t=MgO@T+I;b9Z?4Y!E-3Vv#G*^RN~G}F9=<<= zoDv=Yd%jBvJoxjX!SVm`sp0=5@COIP1EL0K9GTQjg8x;({~P)+@wXf}L>+Je9!O5e z@`uhFgml2xj4gTxq6fws8n5Vk1HYfxx;F^s1lK!i>&$^yFFGBt<6r9?csapgk1@M< za2U17wn^v6^RKw~&$VyfmxUgRS^vL79!MipcGTfn>DV8@-aq&M{Q%zhJaHS}n*a_V z%;<4oP;%Si!HF~4i~p9V3o=`{{(--z0l?h8Iq?e3sdjP zdo!3%g743v77R+fi0IH>{I@>UJp&GC=70=1ARZ7oplMW6uYT-Q!T;C>u78WYjKtgU zAe0Zt3+9Dp>j%7?;J9FMC;s#Y(l_7;tf>tg9Tx(cU^KvL0_z6m1M(y`pqj13If|n2YxmPPVE?|@%B6tzdgG0Cnp7`?_*X;dN%lop3y@&sY zc#iTH`7C7=to~zna*ikhPP^uZvcU^_39g=fLCElOHXDbT!$SJ-C z&p!P5iJD`w{ebM5*CE;kr0$nuDe3*rq7{+=FKUGVUCJg|CT z`bdro7s)dacD{A4Jogs+I#Tm31NQO`CB8?eIMo9GI=m;Nen?l~-%YJ3iQ_rTakU(4 zzP1q0nIDpSHvHgW_bwgQlJ5PA&;-6;@0V3WVqLg@-0t-c{oji9Z!`cofIa~D!=|Pe|kyQlO7L-BnqpBC(2R`a0cZgF z0UI7o=?#ye{zo1@vFTd||25QrubDYDz;Pj@31M&Gw885gIxYlqgX4nRQ*gZllNaa% zY+kUr!RY}a|upFR2kUa%nW8JsWI|y;W(*xT(U=P9Sfa8Lv2lNE=2i6-L#WQd+ z*#BRG^Ro1Pe2th=!E|Lg5LU1TmG9qf<1sEz@K3_K>W=- zln*Qy9PYk9a5=%|g@6{28;%3UE7B)ePZ0D4RtscLfoD*H^`f`G6!Zm_4}m=eFDJXhd<8HVg3=`sdO6O ztHgIGG~oRibuIBf6YtMkV(P{4`_%mR>fxT8!n_-*3%jCU&`qMf_-`Zr&lU*&+o%Ii z=L-ii(148-QhM_LcIfvzx9dP`%69-0zB|^z@0g0t#`one~CT_UwN$Q3cVAx zUnTC7q}ONP95`#fQxVU~#x?GvE=he@Uy}SHMupFTf6U-N7~Zcqr)xuTys&mydXLnK ztQVzbWZ%f~0QDqv0PBBV75u@ci+=&|H|t;U2M6c{wpbn5FfO4p&!4LI)?ThpynC(i z;Kb%{=@Xm3jo^qte)tpO_@-~_6C2(5O?~_wUNgR7=I?Mcae^a!1#3$$&}U+=={WWq zj>#M&=Lq=>=g^PiEb=i1&ZKxF&L%UihQO*P4%r^SOWvmlTt!R1%0Up>rgnz3oN){|f4tDWY$G12~z(c(k3_LUby~*e3oo+;pwZq0vj9hm+ z0_8uGyNo?#-2OVQUq2gxYX#@h--{ny*Nv6#eV))oax%aKyH^2 z^R1jCHsSdns~YKj6Jc0zh8g^bVJ+uF8F&vE zqbM$84acmg9um{b3S)vXpN+c$c*`i*6Mq*b4=@)vJz!1-wxavh6fx?UXc0_{UP#zd|;oz^b6C%3-%1&eZtH)V-I;V zxFUf*68DrhO-Q4!%z&2Qe31k`dxwGZhP?NHBkw<8@C+hj9cmB;?@QvjEB-UW$J?kcTb_w$_<~bI8mJOe0f#;j)W(1#WvC7W*e6vvCes}gf8GP;)pL@$^ zUwT1|5seJ@xp$4{CE$Kp2G@Qtd>$B0a2)XXAhm+UA9Ke6asv2&3@>ma@W;CqPY(Xu zpD)->{C7Nu96%lj2QU{MaK4Z{;M~-SmNH_*glfsh3P4=rw|P8HTnTg zVBeXs$&Q@!o&<74?oY*B_yMl)US;73I6-ds{4n>gxM!J|=NXU_e(?Tg;e>F5dPiGh6XXj5m@^#yjliEAaatf;2;~A_2MibdTG8YJaKLE6&gH|> z|6GHf;mO1wxG&l9e1Vp*I$*e9I3V7@X@b;=l+j&U#u;T=V1NgeT&>DIC<-T=ko>E?|8oZ#|UVE@d3UL1o8o~w{_xH@WJ^5$qo3L z;Q;-D=_5HVINaSB#GZ49zl_A)o<(*eIj{-X`&^(dkP8-f;ef&1!#{w#a3Bl&wZtBu z`S=^mJ?tI+;DU!g&O-aTV6Z3tjss0W9l+;K4`lrZ@`B_8@WSK;#|6uS;i+c4Z|}e3 zU7C2eBJ}<47_eKg03BnIhd__O03Winz~S#k z!vp39bM`321LO){3z#Ru_)`nK{6PGj76iE9bYMNWz%W|C{6HOWqvL=%^GrTC4p0L) z=d)14TEN^uE*Kp!&&l?AAUPp`zu^J%LC_Zf_YpW_0X=|kJb^l)6g9!Wur}oT7C%e; zcRm$Uzj`LAe))X&q8%@E|E=MHpAUQ46O0}hO)wrI zn+Fbm=M9_=g!4iA_bW#vDp9kHhR-~g?^R@95P9LV$N%X#@J|u{Bs@R~^1)J!nVskh z0DBwKBS4>ky+Y|1vS(=K&vfVhfge0i5Dc6zgD3FgNjY!EGlvqupXW~zIEQS`qT_xP z-jg8rCGg%P+@F?jqaXtgWU%%TX2f~L3_O7Z{6I$H(fkas_v4ZL4A#FN-s zM&yrb9-i~f#^JG3nns%UD*nCjZ*Tt~`t!Qodoa<@F!~ur9Edm&aUkMA#DRzd5eFg; zL>!1X5OE;lK*WKF0}%%z4n!P?I1q6l;y}cKhyxJ^A`V0xh&T{&AmTv8frtYU2O!1X5OE;lK*WKF0}%%z4n!P?I1q6l;y}cKhyxJ^{>yLx zP)EN$w?BcE%KJ5*-(>dn1nx;Kk)xPUhE{15x}PWJ2OuUE?b2R^W0=PlLzwbEUWmrMT# za9!4Q4|DB)yZr_}_O4U%b@%PKZz%iPeS7$0@&^Lf@*TNvmwzq)i@|ID6F=Y=>@WV4 zK5!QtalJBlJwEIDx~%ISA-v@~n&AKW@%)(vuCH5(pK0*=aMtyI;2R2l{V(C`9v|Zy z41B%CwFc8 zLKHB8MFvO$0ALZE*kme;;l!jn5@-O8N&#pTDw9N|a+ov@l}?zrh?q46B;p!4ys&r;v;phXfQ@0!v|;62-98 zDXcseQ6gw8@*C7s%fB*!g_g&gvhhVNQt6ZlROu6sxiJxtFQU;=1q>iC(5Cvu!Q%C=NKETV1uRw$%3ATWS_<0fne7smxHj71~k*Q;Hc|1;l3{`?M0UY4X zC1SxLi$oBI1yPv-A;Xyju$+V>8k4~$IkO-J<~9|CV7kDG3a}^ldn1B4T?y#+kDmqz z5nvqumFFx38T4otl@v`EvPe!a10qEOFdd_$L(U)!3Y{6WNw#2x2s@CVa76bqw3)YqWSS4}%MJSeI^~6D14R4wlNkoLP z;^BY--J#$T1-fd0A>zce=nL`qQCi2oN*7<;-*vFc^|dh*_;{Z?P1)TvdE{vgf9tP0`0Hb>i^*U z6_>)0)?42VL7jeKHMA{mhx2~wd1PbQ!AQ;F-97F%y}@;fH#fcyKXNkrI5T)J64j%L z8PdB$8&v>XMRiZVDsDM?1!zb<<79CU#pQ;6j4<^Trvu%OWv)90wp8`y%rW?6Sm_TF z*DOR=s)zTb6Bs|^AS3(7PJWfA^uw30DR}k1rV|gm%Z$HUW`5sEKW~2g?Q>xoob|N> z1*t@(YmwDF=Gr}-X4_58QzV}N$NGeicX-;!>j9A+$g-C1uJ-m{jO%kg zWu>h@m91SopFUlG6F=mxS7#Mon?9?0`d!I4!#2xjRnvgQCG#`q)G7|PZKGJDuEhr5 zrM3)SYe@Vd@O^#YCZ@d`+rZz%)(;M7DS6%XF=BVnZo?AW4|U~X`@;UN4gOxO2syCx z8rOebjRU&sWL3zHClzE5+byVXb@{$)8jill<=gEdB2(Lx3cg`*j<(?H@}uVYcb5Lh4p|sp@s?;^fBx%L;(QR&?^u3vbM~`a-_3vIP*ulcHe~lKP2atL{zttgK`r~D@JCB|2lf(PDaoL<>+w7F#)u) zHuFWCp`!hT<));g8~ZAHBe&+VvnR&?ols!Y=Gj9M8n2+bbiE1!PrdEK%p z(iJJLD6<-^(PX{cJX|_&``T)rfp V$UG Date: Tue, 11 May 2021 10:22:29 -0700 Subject: [PATCH 70/81] StyleCop enabled. --- .../espresso/Espresso/Core/APIHelper.cs | 78 +++++------- .../espresso/Espresso/Core/TrayHelper.cs | 91 +++++++++----- src/modules/espresso/Espresso/Espresso.csproj | 16 ++- src/modules/espresso/Espresso/Program.cs | 117 +++++++++--------- 4 files changed, 165 insertions(+), 137 deletions(-) diff --git a/src/modules/espresso/Espresso/Core/APIHelper.cs b/src/modules/espresso/Espresso/Core/APIHelper.cs index 11e7949a08..ac7b67e064 100644 --- a/src/modules/espresso/Espresso/Core/APIHelper.cs +++ b/src/modules/espresso/Espresso/Core/APIHelper.cs @@ -2,13 +2,13 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using Microsoft.Win32; -using NLog; using System; using System.Drawing; using System.Runtime.InteropServices; using System.Threading; using System.Threading.Tasks; +using Microsoft.Win32; +using NLog; namespace Espresso.Shell.Core { @@ -18,7 +18,7 @@ namespace Espresso.Shell.Core ES_AWAYMODE_REQUIRED = 0x00000040, ES_CONTINUOUS = 0x80000000, ES_DISPLAY_REQUIRED = 0x00000002, - ES_SYSTEM_REQUIRED = 0x00000001 + ES_SYSTEM_REQUIRED = 0x00000001, } /// @@ -27,16 +27,15 @@ namespace Espresso.Shell.Core /// public class APIHelper { - private const string BUILD_REGISTRY_LOCATION = @"SOFTWARE\Microsoft\Windows NT\CurrentVersion"; + private const string BuildRegistryLocation = @"SOFTWARE\Microsoft\Windows NT\CurrentVersion"; - private static CancellationTokenSource TokenSource; - private static CancellationToken ThreadToken; - - private static readonly Logger log; + private static readonly Logger _log; + private static CancellationTokenSource _tokenSource; + private static CancellationToken _threadToken; // More details about the API used: https://docs.microsoft.com/windows/win32/api/winbase/nf-winbase-setthreadexecutionstate [DllImport("kernel32.dll", CharSet = CharSet.Auto, SetLastError = true)] - static extern EXECUTION_STATE SetThreadExecutionState(EXECUTION_STATE esFlags); + private static extern EXECUTION_STATE SetThreadExecutionState(EXECUTION_STATE esFlags); // More details about the API used: https://docs.microsoft.com/windows/win32/api/shellapi/nf-shellapi-extracticonexw [DllImport("Shell32.dll", EntryPoint = "ExtractIconExW", CharSet = CharSet.Unicode, ExactSpelling = true, CallingConvention = CallingConvention.StdCall)] @@ -44,8 +43,8 @@ namespace Espresso.Shell.Core static APIHelper() { - log = LogManager.GetCurrentClassLogger(); - TokenSource = new CancellationTokenSource(); + _log = LogManager.GetCurrentClassLogger(); + _tokenSource = new CancellationTokenSource(); } /// @@ -60,23 +59,14 @@ namespace Espresso.Shell.Core try { var stateResult = SetThreadExecutionState(state); - bool stateSettingSucceeded = (stateResult != 0); - - if (stateSettingSucceeded) - { - return true; - } - else - { - return false; - } + return stateResult != 0; } catch { return false; } } - + /// /// Attempts to reset the current machine state to one where Espresso doesn't try to keep it awake. /// This does not interfere with the state that can be potentially set by other applications. @@ -84,7 +74,7 @@ namespace Espresso.Shell.Core /// Status of the attempt. True is successful, false if not. public static bool SetNormalKeepAwake() { - TokenSource.Cancel(); + _tokenSource.Cancel(); return SetAwakeState(EXECUTION_STATE.ES_CONTINUOUS); } @@ -102,18 +92,17 @@ namespace Espresso.Shell.Core else { return SetAwakeState(EXECUTION_STATE.ES_SYSTEM_REQUIRED | EXECUTION_STATE.ES_CONTINUOUS); - } + } } public static void SetTimedKeepAwake(long seconds, Action callback, Action failureCallback, bool keepDisplayOn = true) { - TokenSource = new CancellationTokenSource(); - ThreadToken = TokenSource.Token; + _tokenSource = new CancellationTokenSource(); + _threadToken = _tokenSource.Token; - Task.Run(() => RunTimedLoop(seconds, keepDisplayOn), ThreadToken) + Task.Run(() => RunTimedLoop(seconds, keepDisplayOn), _threadToken) .ContinueWith((result) => callback(result.Result), TaskContinuationOptions.OnlyOnRanToCompletion) - .ContinueWith((result) => failureCallback, TaskContinuationOptions.NotOnRanToCompletion); ; - + .ContinueWith((result) => failureCallback, TaskContinuationOptions.NotOnRanToCompletion); } private static bool RunTimedLoop(long seconds, bool keepDisplayOn = true) @@ -121,7 +110,7 @@ namespace Espresso.Shell.Core bool success = false; // In case cancellation was already requested. - ThreadToken.ThrowIfCancellationRequested(); + _threadToken.ThrowIfCancellationRequested(); try { if (keepDisplayOn) @@ -129,20 +118,21 @@ namespace Espresso.Shell.Core success = SetAwakeState(EXECUTION_STATE.ES_SYSTEM_REQUIRED | EXECUTION_STATE.ES_DISPLAY_REQUIRED | EXECUTION_STATE.ES_CONTINUOUS); if (success) { - log.Info("Timed keep-awake with display on."); + _log.Info("Timed keep-awake with display on."); var startTime = DateTime.UtcNow; while (DateTime.UtcNow - startTime < TimeSpan.FromSeconds(seconds)) { - if (ThreadToken.IsCancellationRequested) + if (_threadToken.IsCancellationRequested) { - ThreadToken.ThrowIfCancellationRequested(); + _threadToken.ThrowIfCancellationRequested(); } } + return success; } else { - log.Info("Could not set up timed keep-awake with display on."); + _log.Info("Could not set up timed keep-awake with display on."); return success; } } @@ -151,20 +141,21 @@ namespace Espresso.Shell.Core success = SetAwakeState(EXECUTION_STATE.ES_SYSTEM_REQUIRED | EXECUTION_STATE.ES_CONTINUOUS); if (success) { - log.Info("Timed keep-awake with display off."); + _log.Info("Timed keep-awake with display off."); var startTime = DateTime.UtcNow; while (DateTime.UtcNow - startTime < TimeSpan.FromSeconds(seconds)) { - if (ThreadToken.IsCancellationRequested) + if (_threadToken.IsCancellationRequested) { - ThreadToken.ThrowIfCancellationRequested(); + _threadToken.ThrowIfCancellationRequested(); } } + return success; } else { - log.Info("Could not set up timed keep-awake with display off."); + _log.Info("Could not set up timed keep-awake with display off."); return success; } } @@ -172,7 +163,7 @@ namespace Espresso.Shell.Core catch (OperationCanceledException ex) { // Task was clearly cancelled. - log.Info($"Background thread termination. Message: {ex.Message}"); + _log.Info($"Background thread termination. Message: {ex.Message}"); return success; } } @@ -182,7 +173,7 @@ namespace Espresso.Shell.Core try { #pragma warning disable CS8600 // Converting null literal or possible null value to non-nullable type. - RegistryKey registryKey = Registry.LocalMachine.OpenSubKey(BUILD_REGISTRY_LOCATION); + RegistryKey registryKey = Registry.LocalMachine.OpenSubKey(BuildRegistryLocation); #pragma warning restore CS8600 // Converting null literal or possible null value to non-nullable type. if (registryKey != null) @@ -192,18 +183,17 @@ namespace Espresso.Shell.Core } else { - log.Debug("Registry key acquisition for OS failed."); + _log.Debug("Registry key acquisition for OS failed."); return string.Empty; } } catch (Exception ex) { - log.Debug($"Could not get registry key for the build number. Error: {ex.Message}"); + _log.Debug($"Could not get registry key for the build number. Error: {ex.Message}"); return string.Empty; } } - public static Icon? Extract(string file, int number, bool largeIcon) { ExtractIconEx(file, number, out IntPtr large, out IntPtr small, 1); @@ -215,8 +205,6 @@ namespace Espresso.Shell.Core { return null; } - } - } } diff --git a/src/modules/espresso/Espresso/Core/TrayHelper.cs b/src/modules/espresso/Espresso/Core/TrayHelper.cs index 0afb5ac8e2..fe41509b68 100644 --- a/src/modules/espresso/Espresso/Core/TrayHelper.cs +++ b/src/modules/espresso/Espresso/Core/TrayHelper.cs @@ -2,11 +2,11 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using Microsoft.PowerToys.Settings.UI.Library; using System; using System.Drawing; using System.Text.Json; using System.Windows.Forms; +using Microsoft.PowerToys.Settings.UI.Library; #pragma warning disable CS8602 // Dereference of a possibly null reference. #pragma warning disable CS8603 // Possible null reference return. @@ -15,10 +15,12 @@ namespace Espresso.Shell.Core { internal static class TrayHelper { - static NotifyIcon? trayIcon; + private static NotifyIcon? trayIcon; + private static NotifyIcon TrayIcon { get => trayIcon; set => trayIcon = value; } - static SettingsUtils? moduleSettings; + private static SettingsUtils? moduleSettings; + private static SettingsUtils ModuleSettings { get => moduleSettings; set => moduleSettings = value; } static TrayHelper() @@ -29,7 +31,8 @@ namespace Espresso.Shell.Core public static void InitializeTray(string text, Icon icon, ContextMenuStrip? contextMenu = null) { - System.Threading.Tasks.Task.Factory.StartNew((tray) => + System.Threading.Tasks.Task.Factory.StartNew( + (tray) => { ((NotifyIcon?)tray).Text = text; ((NotifyIcon?)tray).Icon = icon; @@ -42,31 +45,51 @@ namespace Espresso.Shell.Core internal static void SetTray(string text, EspressoSettings settings) { - SetTray(text, settings.Properties.KeepDisplayOn.Value, settings.Properties.Mode, - () => { - // Set indefinite keep awake. - var currentSettings = ModuleSettings.GetSettings(text); - currentSettings.Properties.Mode = EspressoMode.INDEFINITE; + SetTray( + text, + settings.Properties.KeepDisplayOn.Value, + settings.Properties.Mode, + IndefiniteKeepAwakeCallback(text), + TimedKeepAwakeCallback(text), + KeepDisplayOnCallback(text)); + } - ModuleSettings.SaveSettings(JsonSerializer.Serialize(currentSettings), text); - }, - (hours, minutes) => { - // Set timed keep awake. - var currentSettings = ModuleSettings.GetSettings(text); - currentSettings.Properties.Mode = EspressoMode.TIMED; - currentSettings.Properties.Hours.Value = hours; - currentSettings.Properties.Minutes.Value = minutes; + private static Action KeepDisplayOnCallback(string text) + { + return () => + { + // Just changing the display mode. + var currentSettings = ModuleSettings.GetSettings(text); + currentSettings.Properties.KeepDisplayOn.Value = !currentSettings.Properties.KeepDisplayOn.Value; - ModuleSettings.SaveSettings(JsonSerializer.Serialize(currentSettings), text); - }, - () => - { - // Just changing the display mode. - var currentSettings = ModuleSettings.GetSettings(text); - currentSettings.Properties.KeepDisplayOn.Value = !currentSettings.Properties.KeepDisplayOn.Value; + ModuleSettings.SaveSettings(JsonSerializer.Serialize(currentSettings), text); + }; + } - ModuleSettings.SaveSettings(JsonSerializer.Serialize(currentSettings), text); - }); + private static Action TimedKeepAwakeCallback(string text) + { + return (hours, minutes) => + { + // Set timed keep awake. + var currentSettings = ModuleSettings.GetSettings(text); + currentSettings.Properties.Mode = EspressoMode.TIMED; + currentSettings.Properties.Hours.Value = hours; + currentSettings.Properties.Minutes.Value = minutes; + + ModuleSettings.SaveSettings(JsonSerializer.Serialize(currentSettings), text); + }; + } + + private static Action IndefiniteKeepAwakeCallback(string text) + { + return () => + { + // Set indefinite keep awake. + var currentSettings = ModuleSettings.GetSettings(text); + currentSettings.Properties.Mode = EspressoMode.INDEFINITE; + + ModuleSettings.SaveSettings(JsonSerializer.Serialize(currentSettings), text); + }; } internal static void SetTray(string text, bool keepDisplayOn, EspressoMode mode, Action indefiniteKeepAwakeCallback, Action timedKeepAwakeCallback, Action keepDisplayOnCallback) @@ -76,13 +99,13 @@ namespace Espresso.Shell.Core // Main toolstrip. var operationContextMenu = new ToolStripMenuItem { - Text = "Mode" + Text = "Mode", }; // Indefinite keep-awake menu item. var indefiniteMenuItem = new ToolStripMenuItem { - Text = "Indefinite" + Text = "Indefinite", }; if (mode == EspressoMode.INDEFINITE) @@ -93,6 +116,7 @@ namespace Espresso.Shell.Core { indefiniteMenuItem.Checked = false; } + indefiniteMenuItem.Click += (e, s) => { // User opted to set the mode to indefinite, so we need to write new settings. @@ -101,7 +125,7 @@ namespace Espresso.Shell.Core var displayOnMenuItem = new ToolStripMenuItem { - Text = "Keep display on" + Text = "Keep display on", }; if (keepDisplayOn) { @@ -111,6 +135,7 @@ namespace Espresso.Shell.Core { displayOnMenuItem.Checked = false; } + displayOnMenuItem.Click += (e, s) => { // User opted to set the display mode directly. @@ -120,12 +145,12 @@ namespace Espresso.Shell.Core // Timed keep-awake menu item var timedMenuItem = new ToolStripMenuItem { - Text = "Timed" + Text = "Timed", }; var halfHourMenuItem = new ToolStripMenuItem { - Text = "30 minutes" + Text = "30 minutes", }; halfHourMenuItem.Click += (e, s) => { @@ -135,7 +160,7 @@ namespace Espresso.Shell.Core var oneHourMenuItem = new ToolStripMenuItem { - Text = "1 hour" + Text = "1 hour", }; oneHourMenuItem.Click += (e, s) => { @@ -145,7 +170,7 @@ namespace Espresso.Shell.Core var twoHoursMenuItem = new ToolStripMenuItem { - Text = "2 hours" + Text = "2 hours", }; twoHoursMenuItem.Click += (e, s) => { diff --git a/src/modules/espresso/Espresso/Espresso.csproj b/src/modules/espresso/Espresso/Espresso.csproj index 6f847d6715..bc968ac88b 100644 --- a/src/modules/espresso/Espresso/Espresso.csproj +++ b/src/modules/espresso/Espresso/Espresso.csproj @@ -60,5 +60,19 @@ PreserveNewest - + + + GlobalSuppressions.cs + + + StyleCop.json + + + + + 1.1.118 + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + diff --git a/src/modules/espresso/Espresso/Program.cs b/src/modules/espresso/Espresso/Program.cs index 9db711c9be..025d163d88 100644 --- a/src/modules/espresso/Espresso/Program.cs +++ b/src/modules/espresso/Espresso/Program.cs @@ -2,10 +2,6 @@ // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using Espresso.Shell.Core; -using ManagedCommon; -using Microsoft.PowerToys.Settings.UI.Library; -using NLog; using System; using System.CommandLine; using System.CommandLine.Invocation; @@ -16,40 +12,44 @@ using System.Reactive.Concurrency; using System.Reactive.Linq; using System.Reflection; using System.Threading; +using Espresso.Shell.Core; +using ManagedCommon; +using Microsoft.PowerToys.Settings.UI.Library; +using NLog; #pragma warning disable CS8602 // Dereference of a possibly null reference. #pragma warning disable CS8603 // Possible null reference return. namespace Espresso.Shell { - class Program + internal class Program { - private static Mutex? mutex = null; - private const string appName = "Espresso"; - private static FileSystemWatcher? watcher = null; - private static SettingsUtils? settingsUtils = null; + private static Mutex? _mutex = null; + private const string AppName = "Espresso"; + private static FileSystemWatcher? _watcher = null; + private static SettingsUtils? _settingsUtils = null; - public static Mutex Mutex { get => mutex; set => mutex = value; } + public static Mutex LockMutex { get => _mutex; set => _mutex = value; } - private static Logger? log; + private static Logger? _log; - static int Main(string[] args) + private static int Main(string[] args) { bool instantiated; - Mutex = new Mutex(true, appName, out instantiated); + LockMutex = new Mutex(true, AppName, out instantiated); if (!instantiated) { - ForceExit(appName + " is already running! Exiting the application.", 1); + ForceExit(AppName + " is already running! Exiting the application.", 1); } - log = LogManager.GetCurrentClassLogger(); - settingsUtils = new SettingsUtils(); + _log = LogManager.GetCurrentClassLogger(); + _settingsUtils = new SettingsUtils(); - log.Info("Launching Espresso..."); - log.Info(FileVersionInfo.GetVersionInfo(Assembly.GetExecutingAssembly().Location).FileVersion); - log.Debug($"OS: {Environment.OSVersion}"); - log.Debug($"OS Build: {APIHelper.GetOperatingSystemBuild()}"); + _log.Info("Launching Espresso..."); + _log.Info(FileVersionInfo.GetVersionInfo(Assembly.GetExecutingAssembly().Location).FileVersion); + _log.Debug($"OS: {Environment.OSVersion}"); + _log.Debug($"OS Build: {APIHelper.GetOperatingSystemBuild()}"); var configOption = new Option( aliases: new[] { "--use-pt-config", "-c" }, @@ -108,10 +108,10 @@ namespace Espresso.Shell configOption, displayOption, timeOption, - pidOption + pidOption, }; - rootCommand.Description = appName; + rootCommand.Description = AppName; rootCommand.Handler = CommandHandler.Create(HandleCommandLineArguments); @@ -120,21 +120,21 @@ namespace Espresso.Shell private static void ForceExit(string message, int exitCode) { - log.Debug(message); - log.Info(message); + _log.Debug(message); + _log.Info(message); Console.ReadKey(); Environment.Exit(exitCode); } private static void HandleCommandLineArguments(bool usePtConfig, bool displayOn, long timeLimit, int pid) { - log.Info($"The value for --use-pt-config is: {usePtConfig}"); - log.Info($"The value for --display-on is: {displayOn}"); - log.Info($"The value for --time-limit is: {timeLimit}"); - log.Info($"The value for --pid is: {pid}"); + _log.Info($"The value for --use-pt-config is: {usePtConfig}"); + _log.Info($"The value for --display-on is: {displayOn}"); + _log.Info($"The value for --time-limit is: {timeLimit}"); + _log.Info($"The value for --pid is: {pid}"); #pragma warning disable CS8604 // Possible null reference argument. - TrayHelper.InitializeTray(appName, APIHelper.Extract("shell32.dll", 32, true)); + TrayHelper.InitializeTray(AppName, APIHelper.Extract("shell32.dll", 32, true)); #pragma warning restore CS8604 // Possible null reference argument. if (usePtConfig) @@ -143,21 +143,20 @@ namespace Espresso.Shell // and instead watch for changes in the file. try { - var settingsPath = settingsUtils.GetSettingsFilePath(appName); - log.Info($"Reading configuration file: {settingsPath}"); + var settingsPath = _settingsUtils.GetSettingsFilePath(AppName); + _log.Info($"Reading configuration file: {settingsPath}"); - watcher = new FileSystemWatcher + _watcher = new FileSystemWatcher { Path = Path.GetDirectoryName(settingsPath), EnableRaisingEvents = true, NotifyFilter = NotifyFilters.LastWrite, - Filter = Path.GetFileName(settingsPath) + Filter = Path.GetFileName(settingsPath), }; Observable.FromEventPattern( - h => watcher.Changed += h, - h => watcher.Changed -= h - ) + h => _watcher.Changed += h, + h => _watcher.Changed -= h) .SubscribeOn(TaskPoolScheduler.Default) .Select(e => e.EventArgs) .Throttle(TimeSpan.FromMilliseconds(25)) @@ -170,8 +169,8 @@ namespace Espresso.Shell catch (Exception ex) { var errorString = $"There was a problem with the configuration file. Make sure it exists.\n{ex.Message}"; - log.Info(errorString); - log.Debug(errorString); + _log.Info(errorString); + _log.Debug(errorString); } } else @@ -204,20 +203,20 @@ namespace Espresso.Shell bool success = APIHelper.SetIndefiniteKeepAwake(displayOn); if (success) { - log.Info($"Currently in indefinite keep awake. Display always on: {displayOn}"); + _log.Info($"Currently in indefinite keep awake. Display always on: {displayOn}"); } else { var errorMessage = "Could not set up the state to be indefinite keep awake."; - log.Info(errorMessage); - log.Debug(errorMessage); + _log.Info(errorMessage); + _log.Debug(errorMessage); } } private static void HandleEspressoConfigChange(FileSystemEventArgs fileEvent) { - log.Info("Detected a settings file change. Updating configuration..."); - log.Info("Resetting keep-awake to normal state due to settings change."); + _log.Info("Detected a settings file change. Updating configuration..."); + _log.Info("Resetting keep-awake to normal state due to settings change."); ResetNormalPowerState(); ProcessSettings(); } @@ -226,7 +225,7 @@ namespace Espresso.Shell { try { - EspressoSettings settings = settingsUtils.GetSettings(appName); + EspressoSettings settings = _settingsUtils.GetSettings(AppName); if (settings != null) { @@ -238,6 +237,7 @@ namespace Espresso.Shell SetupIndefiniteKeepAwake(settings.Properties.KeepDisplayOn.Value); break; } + case EspressoMode.TIMED: { // Timed keep-awake. @@ -246,35 +246,36 @@ namespace Espresso.Shell break; } + default: { var errorMessage = "Unknown mode of operation. Check config file."; - log.Info(errorMessage); - log.Debug(errorMessage); + _log.Info(errorMessage); + _log.Debug(errorMessage); break; } } - TrayHelper.SetTray(appName, settings); + TrayHelper.SetTray(AppName, settings); } else { var errorMessage = "Settings are null."; - log.Info(errorMessage); - log.Debug(errorMessage); + _log.Info(errorMessage); + _log.Debug(errorMessage); } } catch (Exception ex) { var errorMessage = $"There was a problem reading the configuration file. Error: {ex.Message}"; - log.Info(errorMessage); - log.Debug(errorMessage); + _log.Info(errorMessage); + _log.Debug(errorMessage); } } private static void SetupTimedKeepAwake(long time, bool displayOn) { - log.Info($"Timed keep-awake. Expected runtime: {time} seconds with display on setting set to {displayOn}."); + _log.Info($"Timed keep-awake. Expected runtime: {time} seconds with display on setting set to {displayOn}."); APIHelper.SetTimedKeepAwake(time, LogTimedKeepAwakeCompletion, LogUnexpectedOrCancelledKeepAwakeCompletion, displayOn); } @@ -282,13 +283,13 @@ namespace Espresso.Shell private static void LogUnexpectedOrCancelledKeepAwakeCompletion() { var errorMessage = "The keep-awake thread was terminated early."; - log.Info(errorMessage); - log.Debug(errorMessage); + _log.Info(errorMessage); + _log.Debug(errorMessage); } private static void LogTimedKeepAwakeCompletion(bool result) { - log.Info($"Completed timed keep-awake successfully: {result}"); + _log.Info($"Completed timed keep-awake successfully: {result}"); } private static void ResetNormalPowerState() @@ -296,13 +297,13 @@ namespace Espresso.Shell bool success = APIHelper.SetNormalKeepAwake(); if (success) { - log.Info("Returned to normal keep-awake state."); + _log.Info("Returned to normal keep-awake state."); } else { var errorMessage = "Could not return to normal keep-awake state."; - log.Info(errorMessage); - log.Debug(errorMessage); + _log.Info(errorMessage); + _log.Debug(errorMessage); } } } From 465d850e89a1305f841ac25c855b65f13eb969d5 Mon Sep 17 00:00:00 2001 From: Clint Rutkas Date: Tue, 11 May 2021 10:51:30 -0700 Subject: [PATCH 71/81] correcting versioning numbering --- src/modules/espresso/Espresso/Espresso.csproj | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/modules/espresso/Espresso/Espresso.csproj b/src/modules/espresso/Espresso/Espresso.csproj index bc968ac88b..2564272338 100644 --- a/src/modules/espresso/Espresso/Espresso.csproj +++ b/src/modules/espresso/Espresso/Espresso.csproj @@ -1,5 +1,5 @@  - + Exe netcoreapp3.1 @@ -12,6 +12,7 @@ true PowerToys.Espresso + $(Version).0 From f3414c16dce1467720398b772768a953fb9b60b4 Mon Sep 17 00:00:00 2001 From: Niels Laute Date: Tue, 11 May 2021 22:44:36 +0200 Subject: [PATCH 72/81] Added OOBE --- .../Microsoft.PowerToys.Settings.UI.csproj | 8 +++ .../OOBE/Enums/PowerToysModulesEnum.cs | 1 + .../OOBE/Views/OobeEspresso.xaml | 70 +++++++++++++++++++ .../OOBE/Views/OobeEspresso.xaml.cs | 48 +++++++++++++ .../OOBE/Views/OobeShellPage.xaml.cs | 13 ++++ .../Strings/en-us/Resources.resw | 13 ++++ 6 files changed, 153 insertions(+) create mode 100644 src/settings-ui/Microsoft.PowerToys.Settings.UI/OOBE/Views/OobeEspresso.xaml create mode 100644 src/settings-ui/Microsoft.PowerToys.Settings.UI/OOBE/Views/OobeEspresso.xaml.cs diff --git a/src/settings-ui/Microsoft.PowerToys.Settings.UI/Microsoft.PowerToys.Settings.UI.csproj b/src/settings-ui/Microsoft.PowerToys.Settings.UI/Microsoft.PowerToys.Settings.UI.csproj index 77aa5811fe..d2745a3fbe 100644 --- a/src/settings-ui/Microsoft.PowerToys.Settings.UI/Microsoft.PowerToys.Settings.UI.csproj +++ b/src/settings-ui/Microsoft.PowerToys.Settings.UI/Microsoft.PowerToys.Settings.UI.csproj @@ -123,6 +123,9 @@ + + OobeEspresso.xaml + OobeColorPicker.xaml @@ -202,6 +205,7 @@ + @@ -299,6 +303,10 @@ Designer MSBuild:Compile + + MSBuild:Compile + Designer + Designer MSBuild:Compile diff --git a/src/settings-ui/Microsoft.PowerToys.Settings.UI/OOBE/Enums/PowerToysModulesEnum.cs b/src/settings-ui/Microsoft.PowerToys.Settings.UI/OOBE/Enums/PowerToysModulesEnum.cs index 83ca42c99f..3a5c7aa1b5 100644 --- a/src/settings-ui/Microsoft.PowerToys.Settings.UI/OOBE/Enums/PowerToysModulesEnum.cs +++ b/src/settings-ui/Microsoft.PowerToys.Settings.UI/OOBE/Enums/PowerToysModulesEnum.cs @@ -8,6 +8,7 @@ namespace Microsoft.PowerToys.Settings.UI.OOBE.Enums { Overview = 0, ColorPicker, + Espresso, FancyZones, FileExplorer, ImageResizer, diff --git a/src/settings-ui/Microsoft.PowerToys.Settings.UI/OOBE/Views/OobeEspresso.xaml b/src/settings-ui/Microsoft.PowerToys.Settings.UI/OOBE/Views/OobeEspresso.xaml new file mode 100644 index 0000000000..c6581b629b --- /dev/null +++ b/src/settings-ui/Microsoft.PowerToys.Settings.UI/OOBE/Views/OobeEspresso.xaml @@ -0,0 +1,70 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/settings-ui/Microsoft.PowerToys.Settings.UI/OOBE/Views/OobeEspresso.xaml.cs b/src/settings-ui/Microsoft.PowerToys.Settings.UI/OOBE/Views/OobeEspresso.xaml.cs new file mode 100644 index 0000000000..6bfe060378 --- /dev/null +++ b/src/settings-ui/Microsoft.PowerToys.Settings.UI/OOBE/Views/OobeEspresso.xaml.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation +// The Microsoft Corporation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Threading; +using Microsoft.PowerToys.Settings.UI.OOBE.Enums; +using Microsoft.PowerToys.Settings.UI.OOBE.ViewModel; +using Microsoft.PowerToys.Settings.UI.Views; +using Windows.UI.Xaml.Controls; +using Windows.UI.Xaml.Navigation; + +namespace Microsoft.PowerToys.Settings.UI.OOBE.Views +{ + /// + /// An empty page that can be used on its own or navigated to within a Frame. + /// + public sealed partial class OobeEspresso : Page + { + public OobePowerToysModule ViewModel { get; set; } + + public OobeEspresso() + { + this.InitializeComponent(); + ViewModel = new OobePowerToysModule(OobeShellPage.OobeShellHandler.Modules[(int)PowerToysModulesEnum.Espresso]); + DataContext = ViewModel; + } + + private void SettingsLaunchButton_Click(object sender, Windows.UI.Xaml.RoutedEventArgs e) + { + if (OobeShellPage.OpenMainWindowCallback != null) + { + OobeShellPage.OpenMainWindowCallback(typeof(EspressoPage)); + } + + ViewModel.LogOpeningSettingsEvent(); + } + + protected override void OnNavigatedTo(NavigationEventArgs e) + { + ViewModel.LogOpeningModuleEvent(); + } + + protected override void OnNavigatedFrom(NavigationEventArgs e) + { + ViewModel.LogClosingModuleEvent(); + } + } +} diff --git a/src/settings-ui/Microsoft.PowerToys.Settings.UI/OOBE/Views/OobeShellPage.xaml.cs b/src/settings-ui/Microsoft.PowerToys.Settings.UI/OOBE/Views/OobeShellPage.xaml.cs index f9eb0df929..afe9f34c48 100644 --- a/src/settings-ui/Microsoft.PowerToys.Settings.UI/OOBE/Views/OobeShellPage.xaml.cs +++ b/src/settings-ui/Microsoft.PowerToys.Settings.UI/OOBE/Views/OobeShellPage.xaml.cs @@ -88,6 +88,18 @@ namespace Microsoft.PowerToys.Settings.UI.OOBE.Views Description = loader.GetString("Oobe_ColorPicker_Description"), Link = "https://aka.ms/PowerToysOverview_ColorPicker", }); + Modules.Insert((int)PowerToysModulesEnum.Espresso, new OobePowerToysModule() + { + ModuleName = loader.GetString("Oobe_Espresso"), + Tag = "Espresso", + IsNew = false, + Icon = "\uEC32", + Image = "ms-appx:///Assets/Modules/Espresso.png", + FluentIcon = "ms-appx:///Assets/FluentIcons/FluentIconsEspresso.png", + PreviewImageSource = "ms-appx:///Assets/Modules/OOBE/FancyZones.gif", + Description = loader.GetString("Oobe_Espresso_Description"), + Link = "https://aka.ms/PowerToysOverview_Espresso", + }); Modules.Insert((int)PowerToysModulesEnum.FancyZones, new OobePowerToysModule() { ModuleName = loader.GetString("Oobe_FancyZones"), @@ -211,6 +223,7 @@ namespace Microsoft.PowerToys.Settings.UI.OOBE.Views { case "Overview": NavigationFrame.Navigate(typeof(OobeOverview)); break; case "ColorPicker": NavigationFrame.Navigate(typeof(OobeColorPicker)); break; + case "Espresso": NavigationFrame.Navigate(typeof(OobeEspresso)); break; case "FancyZones": NavigationFrame.Navigate(typeof(OobeFancyZones)); break; case "Run": NavigationFrame.Navigate(typeof(OobeRun)); break; case "ImageResizer": NavigationFrame.Navigate(typeof(OobeImageResizer)); break; diff --git a/src/settings-ui/Microsoft.PowerToys.Settings.UI/Strings/en-us/Resources.resw b/src/settings-ui/Microsoft.PowerToys.Settings.UI/Strings/en-us/Resources.resw index 25d1e7f0f6..714235baaa 100644 --- a/src/settings-ui/Microsoft.PowerToys.Settings.UI/Strings/en-us/Resources.resw +++ b/src/settings-ui/Microsoft.PowerToys.Settings.UI/Strings/en-us/Resources.resw @@ -1208,4 +1208,17 @@ From there, simply click on a Markdown file or SVG icon in the File Explorer and https://espresso.den.dev URL. Do not loc + + Espresso + Module name, do not loc + + + Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. + + + Open PowerToys Settings and {turn on Espresso} + + + You can always change modes quickly by clicking the {Espresso icon in the system tray} + \ No newline at end of file From 9c6b96fa37e591c7539601827de263a127b56d80 Mon Sep 17 00:00:00 2001 From: Niels Laute Date: Tue, 11 May 2021 23:41:04 +0200 Subject: [PATCH 73/81] Added aka.ms link for Espresso --- .../Strings/en-us/Resources.resw | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/settings-ui/Microsoft.PowerToys.Settings.UI/Strings/en-us/Resources.resw b/src/settings-ui/Microsoft.PowerToys.Settings.UI/Strings/en-us/Resources.resw index 714235baaa..828ea9ac82 100644 --- a/src/settings-ui/Microsoft.PowerToys.Settings.UI/Strings/en-us/Resources.resw +++ b/src/settings-ui/Microsoft.PowerToys.Settings.UI/Strings/en-us/Resources.resw @@ -909,6 +909,10 @@ https://aka.ms/PowerToysOverview_ColorPicker URL. Do not loc + + https://aka.ms/PowerToysOverview_Espresso + URL. Do not loc + https://aka.ms/PowerToysOverview_FancyZones URL. Do not loc From 3196de2e296977edcfa70c8deefdd562391133c3 Mon Sep 17 00:00:00 2001 From: Den Delimarsky <1389609+dend@users.noreply.github.com> Date: Tue, 11 May 2021 14:42:42 -0700 Subject: [PATCH 74/81] Update loops --- .../espresso/Espresso/Core/APIHelper.cs | 30 ++++++++++++++----- src/modules/espresso/Espresso/Espresso.csproj | 6 ++++ .../Microsoft.PowerToys.Settings.UI.csproj | 1 + 3 files changed, 29 insertions(+), 8 deletions(-) diff --git a/src/modules/espresso/Espresso/Core/APIHelper.cs b/src/modules/espresso/Espresso/Core/APIHelper.cs index 11e7949a08..e0f23315c4 100644 --- a/src/modules/espresso/Espresso/Core/APIHelper.cs +++ b/src/modules/espresso/Espresso/Core/APIHelper.cs @@ -95,14 +95,10 @@ namespace Espresso.Shell.Core /// Status of the attempt. True if successful, false if not. public static bool SetIndefiniteKeepAwake(bool keepDisplayOn = true) { - if (keepDisplayOn) - { - return SetAwakeState(EXECUTION_STATE.ES_SYSTEM_REQUIRED | EXECUTION_STATE.ES_DISPLAY_REQUIRED | EXECUTION_STATE.ES_CONTINUOUS); - } - else - { - return SetAwakeState(EXECUTION_STATE.ES_SYSTEM_REQUIRED | EXECUTION_STATE.ES_CONTINUOUS); - } + TokenSource = new CancellationTokenSource(); + ThreadToken = TokenSource.Token; + + //Put thread for indefinite loop. } public static void SetTimedKeepAwake(long seconds, Action callback, Action failureCallback, bool keepDisplayOn = true) @@ -116,12 +112,30 @@ namespace Espresso.Shell.Core } + private static void RunIndefiniteLoop(bool keepDisplayOn = true) + { + bool success = false; + + // In case cancellation was already requested. + ThreadToken.ThrowIfCancellationRequested(); + + if (keepDisplayOn) + { + SetAwakeState(EXECUTION_STATE.ES_SYSTEM_REQUIRED | EXECUTION_STATE.ES_DISPLAY_REQUIRED | EXECUTION_STATE.ES_CONTINUOUS); + } + else + { + return SetAwakeState(EXECUTION_STATE.ES_SYSTEM_REQUIRED | EXECUTION_STATE.ES_CONTINUOUS); + } + } + private static bool RunTimedLoop(long seconds, bool keepDisplayOn = true) { bool success = false; // In case cancellation was already requested. ThreadToken.ThrowIfCancellationRequested(); + try { if (keepDisplayOn) diff --git a/src/modules/espresso/Espresso/Espresso.csproj b/src/modules/espresso/Espresso/Espresso.csproj index 6f847d6715..3669444ea8 100644 --- a/src/modules/espresso/Espresso/Espresso.csproj +++ b/src/modules/espresso/Espresso/Espresso.csproj @@ -12,6 +12,12 @@ true PowerToys.Espresso + Espresso.ico + Den Delimarsky + Den Delimarsky + Espresso + https://espresso.den.dev + Espresso.png diff --git a/src/settings-ui/Microsoft.PowerToys.Settings.UI/Microsoft.PowerToys.Settings.UI.csproj b/src/settings-ui/Microsoft.PowerToys.Settings.UI/Microsoft.PowerToys.Settings.UI.csproj index 77aa5811fe..20f1a6e98c 100644 --- a/src/settings-ui/Microsoft.PowerToys.Settings.UI/Microsoft.PowerToys.Settings.UI.csproj +++ b/src/settings-ui/Microsoft.PowerToys.Settings.UI/Microsoft.PowerToys.Settings.UI.csproj @@ -202,6 +202,7 @@ + From 3d8ed3905e9ef029d01e3484330a23d939c2698c Mon Sep 17 00:00:00 2001 From: Den Delimarsky <1389609+dend@users.noreply.github.com> Date: Tue, 11 May 2021 19:10:15 -0700 Subject: [PATCH 75/81] Proper threading support for all parts of the keep-awake process --- .../espresso/Espresso/Core/APIHelper.cs | 60 ++++++++++++++----- src/modules/espresso/Espresso/Program.cs | 40 +++---------- 2 files changed, 54 insertions(+), 46 deletions(-) diff --git a/src/modules/espresso/Espresso/Core/APIHelper.cs b/src/modules/espresso/Espresso/Core/APIHelper.cs index ac7b67e064..b56025286e 100644 --- a/src/modules/espresso/Espresso/Core/APIHelper.cs +++ b/src/modules/espresso/Espresso/Core/APIHelper.cs @@ -78,21 +78,14 @@ namespace Espresso.Shell.Core return SetAwakeState(EXECUTION_STATE.ES_CONTINUOUS); } - /// - /// Sets up the machine to be awake indefinitely. - /// - /// Determines whether the display should be kept on while the machine is awake. - /// Status of the attempt. True if successful, false if not. - public static bool SetIndefiniteKeepAwake(bool keepDisplayOn = true) + public static void SetIndefiniteKeepAwake(Action callback, Action failureCallback, bool keepDisplayOn = true) { - if (keepDisplayOn) - { - return SetAwakeState(EXECUTION_STATE.ES_SYSTEM_REQUIRED | EXECUTION_STATE.ES_DISPLAY_REQUIRED | EXECUTION_STATE.ES_CONTINUOUS); - } - else - { - return SetAwakeState(EXECUTION_STATE.ES_SYSTEM_REQUIRED | EXECUTION_STATE.ES_CONTINUOUS); - } + _tokenSource = new CancellationTokenSource(); + _threadToken = _tokenSource.Token; + + Task.Run(() => RunIndefiniteLoop(keepDisplayOn), _threadToken) + .ContinueWith((result) => callback(result.Result), TaskContinuationOptions.OnlyOnRanToCompletion) + .ContinueWith((result) => failureCallback, TaskContinuationOptions.NotOnRanToCompletion); } public static void SetTimedKeepAwake(long seconds, Action callback, Action failureCallback, bool keepDisplayOn = true) @@ -105,6 +98,45 @@ namespace Espresso.Shell.Core .ContinueWith((result) => failureCallback, TaskContinuationOptions.NotOnRanToCompletion); } + private static bool RunIndefiniteLoop(bool keepDisplayOn = true) + { + bool success; + if (keepDisplayOn) + { + success = SetAwakeState(EXECUTION_STATE.ES_SYSTEM_REQUIRED | EXECUTION_STATE.ES_DISPLAY_REQUIRED | EXECUTION_STATE.ES_CONTINUOUS); + } + else + { + success = SetAwakeState(EXECUTION_STATE.ES_SYSTEM_REQUIRED | EXECUTION_STATE.ES_CONTINUOUS); + } + + try + { + if (success) + { + _log.Info("Initiated indefinite keep awake in background thread."); + while (true) + { + if (_threadToken.IsCancellationRequested) + { + _threadToken.ThrowIfCancellationRequested(); + } + } + } + else + { + _log.Info("Could not successfully set up indefinite keep awake."); + return success; + } + } + catch (OperationCanceledException ex) + { + // Task was clearly cancelled. + _log.Info($"Background thread termination. Message: {ex.Message}"); + return success; + } + } + private static bool RunTimedLoop(long seconds, bool keepDisplayOn = true) { bool success = false; diff --git a/src/modules/espresso/Espresso/Program.cs b/src/modules/espresso/Espresso/Program.cs index 025d163d88..2e3f06cb39 100644 --- a/src/modules/espresso/Espresso/Program.cs +++ b/src/modules/espresso/Espresso/Program.cs @@ -186,38 +186,29 @@ namespace Espresso.Shell } } + var exitSignal = new ManualResetEvent(false); if (pid != 0) { RunnerHelper.WaitForPowerToysRunner(pid, () => { + exitSignal.Set(); Environment.Exit(0); }); } - new ManualResetEvent(false).WaitOne(); + exitSignal.WaitOne(); } private static void SetupIndefiniteKeepAwake(bool displayOn) { // Indefinite keep awake. - bool success = APIHelper.SetIndefiniteKeepAwake(displayOn); - if (success) - { - _log.Info($"Currently in indefinite keep awake. Display always on: {displayOn}"); - } - else - { - var errorMessage = "Could not set up the state to be indefinite keep awake."; - _log.Info(errorMessage); - _log.Debug(errorMessage); - } + APIHelper.SetIndefiniteKeepAwake(LogCompletedKeepAwakeThread, LogUnexpectedOrCancelledKeepAwakeThreadCompletion, displayOn); } private static void HandleEspressoConfigChange(FileSystemEventArgs fileEvent) { _log.Info("Detected a settings file change. Updating configuration..."); _log.Info("Resetting keep-awake to normal state due to settings change."); - ResetNormalPowerState(); ProcessSettings(); } @@ -277,34 +268,19 @@ namespace Espresso.Shell { _log.Info($"Timed keep-awake. Expected runtime: {time} seconds with display on setting set to {displayOn}."); - APIHelper.SetTimedKeepAwake(time, LogTimedKeepAwakeCompletion, LogUnexpectedOrCancelledKeepAwakeCompletion, displayOn); + APIHelper.SetTimedKeepAwake(time, LogCompletedKeepAwakeThread, LogUnexpectedOrCancelledKeepAwakeThreadCompletion, displayOn); } - private static void LogUnexpectedOrCancelledKeepAwakeCompletion() + private static void LogUnexpectedOrCancelledKeepAwakeThreadCompletion() { var errorMessage = "The keep-awake thread was terminated early."; _log.Info(errorMessage); _log.Debug(errorMessage); } - private static void LogTimedKeepAwakeCompletion(bool result) + private static void LogCompletedKeepAwakeThread(bool result) { - _log.Info($"Completed timed keep-awake successfully: {result}"); - } - - private static void ResetNormalPowerState() - { - bool success = APIHelper.SetNormalKeepAwake(); - if (success) - { - _log.Info("Returned to normal keep-awake state."); - } - else - { - var errorMessage = "Could not return to normal keep-awake state."; - _log.Info(errorMessage); - _log.Debug(errorMessage); - } + _log.Info($"Exited keep-awake thread successfully: {result}"); } } } From 95bac54c0ec602c16faa609764e7c4cf5d21bdc9 Mon Sep 17 00:00:00 2001 From: Den Delimarsky <1389609+dend@users.noreply.github.com> Date: Tue, 11 May 2021 19:40:02 -0700 Subject: [PATCH 76/81] Update how tray is handled --- .../espresso/Espresso/Core/APIHelper.cs | 18 --------- .../espresso/Espresso/Core/TrayHelper.cs | 38 ++++++++++++++++-- src/modules/espresso/Espresso/Espresso.csproj | 8 ++++ .../Espresso/{ => Images}/Espresso.ico | Bin src/modules/espresso/Espresso/Program.cs | 4 +- 5 files changed, 45 insertions(+), 23 deletions(-) rename src/modules/espresso/Espresso/{ => Images}/Espresso.ico (100%) diff --git a/src/modules/espresso/Espresso/Core/APIHelper.cs b/src/modules/espresso/Espresso/Core/APIHelper.cs index b56025286e..54a6bb3b8b 100644 --- a/src/modules/espresso/Espresso/Core/APIHelper.cs +++ b/src/modules/espresso/Espresso/Core/APIHelper.cs @@ -3,7 +3,6 @@ // See the LICENSE file in the project root for more information. using System; -using System.Drawing; using System.Runtime.InteropServices; using System.Threading; using System.Threading.Tasks; @@ -37,10 +36,6 @@ namespace Espresso.Shell.Core [DllImport("kernel32.dll", CharSet = CharSet.Auto, SetLastError = true)] private static extern EXECUTION_STATE SetThreadExecutionState(EXECUTION_STATE esFlags); - // More details about the API used: https://docs.microsoft.com/windows/win32/api/shellapi/nf-shellapi-extracticonexw - [DllImport("Shell32.dll", EntryPoint = "ExtractIconExW", CharSet = CharSet.Unicode, ExactSpelling = true, CallingConvention = CallingConvention.StdCall)] - private static extern int ExtractIconEx(string sFile, int iIndex, out IntPtr piLargeVersion, out IntPtr piSmallVersion, int amountIcons); - static APIHelper() { _log = LogManager.GetCurrentClassLogger(); @@ -225,18 +220,5 @@ namespace Espresso.Shell.Core return string.Empty; } } - - public static Icon? Extract(string file, int number, bool largeIcon) - { - ExtractIconEx(file, number, out IntPtr large, out IntPtr small, 1); - try - { - return Icon.FromHandle(largeIcon ? large : small); - } - catch - { - return null; - } - } } } diff --git a/src/modules/espresso/Espresso/Core/TrayHelper.cs b/src/modules/espresso/Espresso/Core/TrayHelper.cs index fe41509b68..3aea4656e4 100644 --- a/src/modules/espresso/Espresso/Core/TrayHelper.cs +++ b/src/modules/espresso/Espresso/Core/TrayHelper.cs @@ -51,7 +51,16 @@ namespace Espresso.Shell.Core settings.Properties.Mode, IndefiniteKeepAwakeCallback(text), TimedKeepAwakeCallback(text), - KeepDisplayOnCallback(text)); + KeepDisplayOnCallback(text), + ExitCallback()); + } + + private static Action ExitCallback() + { + return () => + { + Environment.Exit(0); + }; } private static Action KeepDisplayOnCallback(string text) @@ -92,7 +101,7 @@ namespace Espresso.Shell.Core }; } - internal static void SetTray(string text, bool keepDisplayOn, EspressoMode mode, Action indefiniteKeepAwakeCallback, Action timedKeepAwakeCallback, Action keepDisplayOnCallback) + internal static void SetTray(string text, bool keepDisplayOn, EspressoMode mode, Action indefiniteKeepAwakeCallback, Action timedKeepAwakeCallback, Action keepDisplayOnCallback, Action exitCallback) { var contextMenuStrip = new ContextMenuStrip(); @@ -105,7 +114,7 @@ namespace Espresso.Shell.Core // Indefinite keep-awake menu item. var indefiniteMenuItem = new ToolStripMenuItem { - Text = "Indefinite", + Text = "Keep awake indefinitely", }; if (mode == EspressoMode.INDEFINITE) @@ -145,8 +154,16 @@ namespace Espresso.Shell.Core // Timed keep-awake menu item var timedMenuItem = new ToolStripMenuItem { - Text = "Timed", + Text = "Keep awake temporarily", }; + if (mode == EspressoMode.TIMED) + { + timedMenuItem.Checked = true; + } + else + { + timedMenuItem.Checked = false; + } var halfHourMenuItem = new ToolStripMenuItem { @@ -178,6 +195,17 @@ namespace Espresso.Shell.Core timedKeepAwakeCallback(2, 0); }; + // Exit menu item. + var exitContextMenu = new ToolStripMenuItem + { + Text = "Exit", + }; + exitContextMenu.Click += (e, s) => + { + // User is setting the keep-awake to 2 hours. + exitCallback(); + }; + timedMenuItem.DropDownItems.Add(halfHourMenuItem); timedMenuItem.DropDownItems.Add(oneHourMenuItem); timedMenuItem.DropDownItems.Add(twoHoursMenuItem); @@ -188,6 +216,8 @@ namespace Espresso.Shell.Core operationContextMenu.DropDownItems.Add(displayOnMenuItem); contextMenuStrip.Items.Add(operationContextMenu); + contextMenuStrip.Items.Add(new ToolStripSeparator()); + contextMenuStrip.Items.Add(exitContextMenu); TrayIcon.Text = text; TrayIcon.ContextMenuStrip = contextMenuStrip; diff --git a/src/modules/espresso/Espresso/Espresso.csproj b/src/modules/espresso/Espresso/Espresso.csproj index 2564272338..8ae7328e0b 100644 --- a/src/modules/espresso/Espresso/Espresso.csproj +++ b/src/modules/espresso/Espresso/Espresso.csproj @@ -13,6 +13,7 @@ true PowerToys.Espresso $(Version).0 + Images\Espresso.ico @@ -37,6 +38,10 @@ true + + + + @@ -76,4 +81,7 @@ all + + + diff --git a/src/modules/espresso/Espresso/Espresso.ico b/src/modules/espresso/Espresso/Images/Espresso.ico similarity index 100% rename from src/modules/espresso/Espresso/Espresso.ico rename to src/modules/espresso/Espresso/Images/Espresso.ico diff --git a/src/modules/espresso/Espresso/Program.cs b/src/modules/espresso/Espresso/Program.cs index 2e3f06cb39..6b826878cb 100644 --- a/src/modules/espresso/Espresso/Program.cs +++ b/src/modules/espresso/Espresso/Program.cs @@ -6,12 +6,14 @@ using System; using System.CommandLine; using System.CommandLine.Invocation; using System.Diagnostics; +using System.Drawing; using System.IO; using System.Linq; using System.Reactive.Concurrency; using System.Reactive.Linq; using System.Reflection; using System.Threading; +using System.Windows; using Espresso.Shell.Core; using ManagedCommon; using Microsoft.PowerToys.Settings.UI.Library; @@ -134,7 +136,7 @@ namespace Espresso.Shell _log.Info($"The value for --pid is: {pid}"); #pragma warning disable CS8604 // Possible null reference argument. - TrayHelper.InitializeTray(AppName, APIHelper.Extract("shell32.dll", 32, true)); + TrayHelper.InitializeTray(AppName, new Icon(Application.GetResourceStream(new Uri("/Images/Espresso.ico", UriKind.Relative)).Stream)); #pragma warning restore CS8604 // Possible null reference argument. if (usePtConfig) From ff486e5a6190f5595ce106c30beebf5c883fbad0 Mon Sep 17 00:00:00 2001 From: Den Delimarsky <1389609+dend@users.noreply.github.com> Date: Tue, 11 May 2021 20:50:02 -0700 Subject: [PATCH 77/81] Making sure the app can run well without a console window Only applicable when a PID is specified. --- .../espresso/Espresso/Core/APIHelper.cs | 41 +++++++++++++++++++ .../espresso/Espresso/Core/TrayHelper.cs | 20 ++++----- src/modules/espresso/Espresso/Espresso.csproj | 2 +- src/modules/espresso/Espresso/Program.cs | 22 ++++++---- 4 files changed, 66 insertions(+), 19 deletions(-) diff --git a/src/modules/espresso/Espresso/Core/APIHelper.cs b/src/modules/espresso/Espresso/Core/APIHelper.cs index 54a6bb3b8b..da437f0204 100644 --- a/src/modules/espresso/Espresso/Core/APIHelper.cs +++ b/src/modules/espresso/Espresso/Core/APIHelper.cs @@ -3,12 +3,15 @@ // See the LICENSE file in the project root for more information. using System; +using System.IO; using System.Runtime.InteropServices; using System.Threading; using System.Threading.Tasks; using Microsoft.Win32; using NLog; +#pragma warning disable SA1116 // Split parameters should start on line after declaration + namespace Espresso.Shell.Core { [Flags] @@ -27,6 +30,11 @@ namespace Espresso.Shell.Core public class APIHelper { private const string BuildRegistryLocation = @"SOFTWARE\Microsoft\Windows NT\CurrentVersion"; + public const int StdOutputHandle = -11; + public const int StdInputHandle = -10; + public const int StdErrorHandle = -12; + public const uint GenericWrite = 0x40000000; + public const uint GenericRead = 0x80000000; private static readonly Logger _log; private static CancellationTokenSource _tokenSource; @@ -36,12 +44,45 @@ namespace Espresso.Shell.Core [DllImport("kernel32.dll", CharSet = CharSet.Auto, SetLastError = true)] private static extern EXECUTION_STATE SetThreadExecutionState(EXECUTION_STATE esFlags); + [DllImport("kernel32.dll", SetLastError = true)] + [return: MarshalAs(UnmanagedType.Bool)] + private static extern bool AllocConsole(); + + [DllImport("kernel32.dll", SetLastError = true)] + public static extern IntPtr GetStdHandle(int nStdHandle); + + [DllImport("kernel32.dll", SetLastError = true)] + public static extern bool SetStdHandle(int nStdHandle, IntPtr hHandle); + + [DllImport("kernel32.dll", CharSet = CharSet.Auto, SetLastError = true)] + + public static extern IntPtr CreateFile([MarshalAs(UnmanagedType.LPTStr)] string filename, + [MarshalAs(UnmanagedType.U4)] uint access, + [MarshalAs(UnmanagedType.U4)] FileShare share, + IntPtr securityAttributes, + [MarshalAs(UnmanagedType.U4)] FileMode creationDisposition, + [MarshalAs(UnmanagedType.U4)] FileAttributes flagsAndAttributes, + IntPtr templateFile); + static APIHelper() { _log = LogManager.GetCurrentClassLogger(); _tokenSource = new CancellationTokenSource(); } + public static void AllocateConsole() + { + AllocConsole(); + + var outputHandle = GetStdHandle(StdOutputHandle); + var outputFilePointer = CreateFile("CONOUT$", GenericRead | GenericWrite, FileShare.Write, IntPtr.Zero, FileMode.OpenOrCreate, 0, IntPtr.Zero); + if (outputFilePointer != outputHandle) + { + SetStdHandle(StdOutputHandle, outputFilePointer); + Console.SetOut(new StreamWriter(Console.OpenStandardOutput(), Console.OutputEncoding) { AutoFlush = true }); + } + } + /// /// Sets the computer awake state using the native Win32 SetThreadExecutionState API. This /// function is just a nice-to-have wrapper that helps avoid tracking the success or failure of diff --git a/src/modules/espresso/Espresso/Core/TrayHelper.cs b/src/modules/espresso/Espresso/Core/TrayHelper.cs index 3aea4656e4..3ec3e9aef6 100644 --- a/src/modules/espresso/Espresso/Core/TrayHelper.cs +++ b/src/modules/espresso/Espresso/Core/TrayHelper.cs @@ -63,45 +63,45 @@ namespace Espresso.Shell.Core }; } - private static Action KeepDisplayOnCallback(string text) + private static Action KeepDisplayOnCallback(string moduleName) { return () => { // Just changing the display mode. - var currentSettings = ModuleSettings.GetSettings(text); + var currentSettings = ModuleSettings.GetSettings(moduleName); currentSettings.Properties.KeepDisplayOn.Value = !currentSettings.Properties.KeepDisplayOn.Value; - ModuleSettings.SaveSettings(JsonSerializer.Serialize(currentSettings), text); + ModuleSettings.SaveSettings(JsonSerializer.Serialize(currentSettings), moduleName); }; } - private static Action TimedKeepAwakeCallback(string text) + private static Action TimedKeepAwakeCallback(string moduleName) { return (hours, minutes) => { // Set timed keep awake. - var currentSettings = ModuleSettings.GetSettings(text); + var currentSettings = ModuleSettings.GetSettings(moduleName); currentSettings.Properties.Mode = EspressoMode.TIMED; currentSettings.Properties.Hours.Value = hours; currentSettings.Properties.Minutes.Value = minutes; - ModuleSettings.SaveSettings(JsonSerializer.Serialize(currentSettings), text); + ModuleSettings.SaveSettings(JsonSerializer.Serialize(currentSettings), moduleName); }; } - private static Action IndefiniteKeepAwakeCallback(string text) + private static Action IndefiniteKeepAwakeCallback(string moduleName) { return () => { // Set indefinite keep awake. - var currentSettings = ModuleSettings.GetSettings(text); + var currentSettings = ModuleSettings.GetSettings(moduleName); currentSettings.Properties.Mode = EspressoMode.INDEFINITE; - ModuleSettings.SaveSettings(JsonSerializer.Serialize(currentSettings), text); + ModuleSettings.SaveSettings(JsonSerializer.Serialize(currentSettings), moduleName); }; } - internal static void SetTray(string text, bool keepDisplayOn, EspressoMode mode, Action indefiniteKeepAwakeCallback, Action timedKeepAwakeCallback, Action keepDisplayOnCallback, Action exitCallback) + public static void SetTray(string text, bool keepDisplayOn, EspressoMode mode, Action indefiniteKeepAwakeCallback, Action timedKeepAwakeCallback, Action keepDisplayOnCallback, Action exitCallback) { var contextMenuStrip = new ContextMenuStrip(); diff --git a/src/modules/espresso/Espresso/Espresso.csproj b/src/modules/espresso/Espresso/Espresso.csproj index 8ae7328e0b..7a23756ddf 100644 --- a/src/modules/espresso/Espresso/Espresso.csproj +++ b/src/modules/espresso/Espresso/Espresso.csproj @@ -1,7 +1,7 @@  - Exe + WinExe netcoreapp3.1 $(SolutionDir)$(Platform)\$(Configuration)\modules\Espresso enable diff --git a/src/modules/espresso/Espresso/Program.cs b/src/modules/espresso/Espresso/Program.cs index 6b826878cb..b7c2d79f16 100644 --- a/src/modules/espresso/Espresso/Program.cs +++ b/src/modules/espresso/Espresso/Program.cs @@ -55,10 +55,10 @@ namespace Espresso.Shell var configOption = new Option( aliases: new[] { "--use-pt-config", "-c" }, - getDefaultValue: () => true, + getDefaultValue: () => false, description: "Specifies whether Espresso will be using the PowerToys configuration file for managing the state.") { - Argument = new Argument(() => true) + Argument = new Argument(() => false) { Arity = ArgumentArity.ZeroOrOne, }, @@ -130,17 +130,22 @@ namespace Espresso.Shell private static void HandleCommandLineArguments(bool usePtConfig, bool displayOn, long timeLimit, int pid) { + if (pid == 0) + { + APIHelper.AllocateConsole(); + } + _log.Info($"The value for --use-pt-config is: {usePtConfig}"); _log.Info($"The value for --display-on is: {displayOn}"); _log.Info($"The value for --time-limit is: {timeLimit}"); _log.Info($"The value for --pid is: {pid}"); -#pragma warning disable CS8604 // Possible null reference argument. - TrayHelper.InitializeTray(AppName, new Icon(Application.GetResourceStream(new Uri("/Images/Espresso.ico", UriKind.Relative)).Stream)); -#pragma warning restore CS8604 // Possible null reference argument. - if (usePtConfig) { +#pragma warning disable CS8604 // Possible null reference argument. + TrayHelper.InitializeTray(AppName, new Icon(Application.GetResourceStream(new Uri("/Images/Espresso.ico", UriKind.Relative)).Stream)); +#pragma warning restore CS8604 // Possible null reference argument. + // Configuration file is used, therefore we disregard any other command-line parameter // and instead watch for changes in the file. try @@ -177,13 +182,14 @@ namespace Espresso.Shell } else { - if (timeLimit <= 0) + var mode = timeLimit <= 0 ? EspressoMode.INDEFINITE : EspressoMode.TIMED; + + if (mode == EspressoMode.INDEFINITE) { SetupIndefiniteKeepAwake(displayOn); } else { - // Timed keep-awake. SetupTimedKeepAwake(timeLimit, displayOn); } } From a23279f3de955be459fee91b74d8d11bd7f93d0f Mon Sep 17 00:00:00 2001 From: Den Delimarsky <1389609+dend@users.noreply.github.com> Date: Tue, 11 May 2021 20:53:26 -0700 Subject: [PATCH 78/81] Remove redundancy --- src/modules/espresso/Espresso/Core/APIHelper.cs | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/src/modules/espresso/Espresso/Core/APIHelper.cs b/src/modules/espresso/Espresso/Core/APIHelper.cs index da437f0204..1dbb0af057 100644 --- a/src/modules/espresso/Espresso/Core/APIHelper.cs +++ b/src/modules/espresso/Espresso/Core/APIHelper.cs @@ -48,14 +48,10 @@ namespace Espresso.Shell.Core [return: MarshalAs(UnmanagedType.Bool)] private static extern bool AllocConsole(); - [DllImport("kernel32.dll", SetLastError = true)] - public static extern IntPtr GetStdHandle(int nStdHandle); - [DllImport("kernel32.dll", SetLastError = true)] public static extern bool SetStdHandle(int nStdHandle, IntPtr hHandle); [DllImport("kernel32.dll", CharSet = CharSet.Auto, SetLastError = true)] - public static extern IntPtr CreateFile([MarshalAs(UnmanagedType.LPTStr)] string filename, [MarshalAs(UnmanagedType.U4)] uint access, [MarshalAs(UnmanagedType.U4)] FileShare share, @@ -74,13 +70,10 @@ namespace Espresso.Shell.Core { AllocConsole(); - var outputHandle = GetStdHandle(StdOutputHandle); var outputFilePointer = CreateFile("CONOUT$", GenericRead | GenericWrite, FileShare.Write, IntPtr.Zero, FileMode.OpenOrCreate, 0, IntPtr.Zero); - if (outputFilePointer != outputHandle) - { - SetStdHandle(StdOutputHandle, outputFilePointer); - Console.SetOut(new StreamWriter(Console.OpenStandardOutput(), Console.OutputEncoding) { AutoFlush = true }); - } + + SetStdHandle(StdOutputHandle, outputFilePointer); + Console.SetOut(new StreamWriter(Console.OpenStandardOutput(), Console.OutputEncoding) { AutoFlush = true }); } /// From fcae21bb5fdde026d36e7c6b689b869f9c148d2a Mon Sep 17 00:00:00 2001 From: Den Delimarsky <1389609+dend@users.noreply.github.com> Date: Tue, 11 May 2021 20:57:40 -0700 Subject: [PATCH 79/81] Code cleanup --- .../espresso/Espresso/Core/APIHelper.cs | 29 +++++-------------- 1 file changed, 8 insertions(+), 21 deletions(-) diff --git a/src/modules/espresso/Espresso/Core/APIHelper.cs b/src/modules/espresso/Espresso/Core/APIHelper.cs index 1dbb0af057..d63e5266fa 100644 --- a/src/modules/espresso/Espresso/Core/APIHelper.cs +++ b/src/modules/espresso/Espresso/Core/APIHelper.cs @@ -10,8 +10,6 @@ using System.Threading.Tasks; using Microsoft.Win32; using NLog; -#pragma warning disable SA1116 // Split parameters should start on line after declaration - namespace Espresso.Shell.Core { [Flags] @@ -40,7 +38,6 @@ namespace Espresso.Shell.Core private static CancellationTokenSource _tokenSource; private static CancellationToken _threadToken; - // More details about the API used: https://docs.microsoft.com/windows/win32/api/winbase/nf-winbase-setthreadexecutionstate [DllImport("kernel32.dll", CharSet = CharSet.Auto, SetLastError = true)] private static extern EXECUTION_STATE SetThreadExecutionState(EXECUTION_STATE esFlags); @@ -52,13 +49,14 @@ namespace Espresso.Shell.Core public static extern bool SetStdHandle(int nStdHandle, IntPtr hHandle); [DllImport("kernel32.dll", CharSet = CharSet.Auto, SetLastError = true)] - public static extern IntPtr CreateFile([MarshalAs(UnmanagedType.LPTStr)] string filename, - [MarshalAs(UnmanagedType.U4)] uint access, - [MarshalAs(UnmanagedType.U4)] FileShare share, - IntPtr securityAttributes, - [MarshalAs(UnmanagedType.U4)] FileMode creationDisposition, - [MarshalAs(UnmanagedType.U4)] FileAttributes flagsAndAttributes, - IntPtr templateFile); + public static extern IntPtr CreateFile( + [MarshalAs(UnmanagedType.LPTStr)] string filename, + [MarshalAs(UnmanagedType.U4)] uint access, + [MarshalAs(UnmanagedType.U4)] FileShare share, + IntPtr securityAttributes, + [MarshalAs(UnmanagedType.U4)] FileMode creationDisposition, + [MarshalAs(UnmanagedType.U4)] FileAttributes flagsAndAttributes, + IntPtr templateFile); static APIHelper() { @@ -96,17 +94,6 @@ namespace Espresso.Shell.Core } } - /// - /// Attempts to reset the current machine state to one where Espresso doesn't try to keep it awake. - /// This does not interfere with the state that can be potentially set by other applications. - /// - /// Status of the attempt. True is successful, false if not. - public static bool SetNormalKeepAwake() - { - _tokenSource.Cancel(); - return SetAwakeState(EXECUTION_STATE.ES_CONTINUOUS); - } - public static void SetIndefiniteKeepAwake(Action callback, Action failureCallback, bool keepDisplayOn = true) { _tokenSource = new CancellationTokenSource(); From 65ecfd2424fd5ad9d99c29f3755f1bac75aeeeaf Mon Sep 17 00:00:00 2001 From: Den Delimarsky <1389609+dend@users.noreply.github.com> Date: Tue, 11 May 2021 21:12:59 -0700 Subject: [PATCH 80/81] Set correct minimum for minutes --- .../Microsoft.PowerToys.Settings.UI/Views/EspressoPage.xaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/settings-ui/Microsoft.PowerToys.Settings.UI/Views/EspressoPage.xaml b/src/settings-ui/Microsoft.PowerToys.Settings.UI/Views/EspressoPage.xaml index 3394317ff5..a0e52bf57a 100644 --- a/src/settings-ui/Microsoft.PowerToys.Settings.UI/Views/EspressoPage.xaml +++ b/src/settings-ui/Microsoft.PowerToys.Settings.UI/Views/EspressoPage.xaml @@ -121,7 +121,7 @@ LargeChange="5"/> Date: Tue, 11 May 2021 21:41:07 -0700 Subject: [PATCH 81/81] Simplify settings handling to not rely on complex properties --- .../espresso/Espresso/Core/APIHelper.cs | 8 +++---- .../espresso/Espresso/Core/TrayHelper.cs | 12 +++++------ src/modules/espresso/Espresso/Program.cs | 16 +++++++------- .../EspressoProperties.cs | 12 +++++------ .../ViewModels/EspressoViewModel.cs | 21 +++++++++---------- 5 files changed, 34 insertions(+), 35 deletions(-) diff --git a/src/modules/espresso/Espresso/Core/APIHelper.cs b/src/modules/espresso/Espresso/Core/APIHelper.cs index d63e5266fa..03902740c4 100644 --- a/src/modules/espresso/Espresso/Core/APIHelper.cs +++ b/src/modules/espresso/Espresso/Core/APIHelper.cs @@ -104,7 +104,7 @@ namespace Espresso.Shell.Core .ContinueWith((result) => failureCallback, TaskContinuationOptions.NotOnRanToCompletion); } - public static void SetTimedKeepAwake(long seconds, Action callback, Action failureCallback, bool keepDisplayOn = true) + public static void SetTimedKeepAwake(uint seconds, Action callback, Action failureCallback, bool keepDisplayOn = true) { _tokenSource = new CancellationTokenSource(); _threadToken = _tokenSource.Token; @@ -153,7 +153,7 @@ namespace Espresso.Shell.Core } } - private static bool RunTimedLoop(long seconds, bool keepDisplayOn = true) + private static bool RunTimedLoop(uint seconds, bool keepDisplayOn = true) { bool success = false; @@ -168,7 +168,7 @@ namespace Espresso.Shell.Core { _log.Info("Timed keep-awake with display on."); var startTime = DateTime.UtcNow; - while (DateTime.UtcNow - startTime < TimeSpan.FromSeconds(seconds)) + while (DateTime.UtcNow - startTime < TimeSpan.FromSeconds(Math.Abs(seconds))) { if (_threadToken.IsCancellationRequested) { @@ -191,7 +191,7 @@ namespace Espresso.Shell.Core { _log.Info("Timed keep-awake with display off."); var startTime = DateTime.UtcNow; - while (DateTime.UtcNow - startTime < TimeSpan.FromSeconds(seconds)) + while (DateTime.UtcNow - startTime < TimeSpan.FromSeconds(Math.Abs(seconds))) { if (_threadToken.IsCancellationRequested) { diff --git a/src/modules/espresso/Espresso/Core/TrayHelper.cs b/src/modules/espresso/Espresso/Core/TrayHelper.cs index 3ec3e9aef6..0e163cef57 100644 --- a/src/modules/espresso/Espresso/Core/TrayHelper.cs +++ b/src/modules/espresso/Espresso/Core/TrayHelper.cs @@ -47,7 +47,7 @@ namespace Espresso.Shell.Core { SetTray( text, - settings.Properties.KeepDisplayOn.Value, + settings.Properties.KeepDisplayOn, settings.Properties.Mode, IndefiniteKeepAwakeCallback(text), TimedKeepAwakeCallback(text), @@ -69,21 +69,21 @@ namespace Espresso.Shell.Core { // Just changing the display mode. var currentSettings = ModuleSettings.GetSettings(moduleName); - currentSettings.Properties.KeepDisplayOn.Value = !currentSettings.Properties.KeepDisplayOn.Value; + currentSettings.Properties.KeepDisplayOn = !currentSettings.Properties.KeepDisplayOn; ModuleSettings.SaveSettings(JsonSerializer.Serialize(currentSettings), moduleName); }; } - private static Action TimedKeepAwakeCallback(string moduleName) + private static Action TimedKeepAwakeCallback(string moduleName) { return (hours, minutes) => { // Set timed keep awake. var currentSettings = ModuleSettings.GetSettings(moduleName); currentSettings.Properties.Mode = EspressoMode.TIMED; - currentSettings.Properties.Hours.Value = hours; - currentSettings.Properties.Minutes.Value = minutes; + currentSettings.Properties.Hours = hours; + currentSettings.Properties.Minutes = minutes; ModuleSettings.SaveSettings(JsonSerializer.Serialize(currentSettings), moduleName); }; @@ -101,7 +101,7 @@ namespace Espresso.Shell.Core }; } - public static void SetTray(string text, bool keepDisplayOn, EspressoMode mode, Action indefiniteKeepAwakeCallback, Action timedKeepAwakeCallback, Action keepDisplayOnCallback, Action exitCallback) + public static void SetTray(string text, bool keepDisplayOn, EspressoMode mode, Action indefiniteKeepAwakeCallback, Action timedKeepAwakeCallback, Action keepDisplayOnCallback, Action exitCallback) { var contextMenuStrip = new ContextMenuStrip(); diff --git a/src/modules/espresso/Espresso/Program.cs b/src/modules/espresso/Espresso/Program.cs index b7c2d79f16..31b45eebfa 100644 --- a/src/modules/espresso/Espresso/Program.cs +++ b/src/modules/espresso/Espresso/Program.cs @@ -79,12 +79,12 @@ namespace Espresso.Shell displayOption.Required = false; - var timeOption = new Option( + var timeOption = new Option( aliases: new[] { "--time-limit", "-t" }, getDefaultValue: () => 0, description: "Determines the interval, in seconds, during which the computer is kept awake.") { - Argument = new Argument(() => 0) + Argument = new Argument(() => 0) { Arity = ArgumentArity.ExactlyOne, }, @@ -115,7 +115,7 @@ namespace Espresso.Shell rootCommand.Description = AppName; - rootCommand.Handler = CommandHandler.Create(HandleCommandLineArguments); + rootCommand.Handler = CommandHandler.Create(HandleCommandLineArguments); return rootCommand.InvokeAsync(args).Result; } @@ -128,7 +128,7 @@ namespace Espresso.Shell Environment.Exit(exitCode); } - private static void HandleCommandLineArguments(bool usePtConfig, bool displayOn, long timeLimit, int pid) + private static void HandleCommandLineArguments(bool usePtConfig, bool displayOn, uint timeLimit, int pid) { if (pid == 0) { @@ -233,15 +233,15 @@ namespace Espresso.Shell case EspressoMode.INDEFINITE: { // Indefinite keep awake. - SetupIndefiniteKeepAwake(settings.Properties.KeepDisplayOn.Value); + SetupIndefiniteKeepAwake(settings.Properties.KeepDisplayOn); break; } case EspressoMode.TIMED: { // Timed keep-awake. - long computedTime = (settings.Properties.Hours.Value * 60 * 60) + (settings.Properties.Minutes.Value * 60); - SetupTimedKeepAwake(computedTime, settings.Properties.KeepDisplayOn.Value); + uint computedTime = (settings.Properties.Hours * 60 * 60) + (settings.Properties.Minutes * 60); + SetupTimedKeepAwake(computedTime, settings.Properties.KeepDisplayOn); break; } @@ -272,7 +272,7 @@ namespace Espresso.Shell } } - private static void SetupTimedKeepAwake(long time, bool displayOn) + private static void SetupTimedKeepAwake(uint time, bool displayOn) { _log.Info($"Timed keep-awake. Expected runtime: {time} seconds with display on setting set to {displayOn}."); diff --git a/src/settings-ui/Microsoft.PowerToys.Settings.UI.Library/EspressoProperties.cs b/src/settings-ui/Microsoft.PowerToys.Settings.UI.Library/EspressoProperties.cs index 13a8305cc1..f52be93315 100644 --- a/src/settings-ui/Microsoft.PowerToys.Settings.UI.Library/EspressoProperties.cs +++ b/src/settings-ui/Microsoft.PowerToys.Settings.UI.Library/EspressoProperties.cs @@ -10,23 +10,23 @@ namespace Microsoft.PowerToys.Settings.UI.Library { public EspressoProperties() { - KeepDisplayOn = new BoolProperty(); + KeepDisplayOn = false; Mode = EspressoMode.INDEFINITE; - Hours = new IntProperty(); - Minutes = new IntProperty(); + Hours = 0; + Minutes = 0; } [JsonPropertyName("espresso_keep_display_on")] - public BoolProperty KeepDisplayOn { get; set; } + public bool KeepDisplayOn { get; set; } [JsonPropertyName("espresso_mode")] public EspressoMode Mode { get; set; } [JsonPropertyName("espresso_hours")] - public IntProperty Hours { get; set; } + public uint Hours { get; set; } [JsonPropertyName("espresso_minutes")] - public IntProperty Minutes { get; set; } + public uint Minutes { get; set; } } public enum EspressoMode diff --git a/src/settings-ui/Microsoft.PowerToys.Settings.UI.Library/ViewModels/EspressoViewModel.cs b/src/settings-ui/Microsoft.PowerToys.Settings.UI.Library/ViewModels/EspressoViewModel.cs index 599e12bb74..3483a35e82 100644 --- a/src/settings-ui/Microsoft.PowerToys.Settings.UI.Library/ViewModels/EspressoViewModel.cs +++ b/src/settings-ui/Microsoft.PowerToys.Settings.UI.Library/ViewModels/EspressoViewModel.cs @@ -36,10 +36,10 @@ namespace Microsoft.PowerToys.Settings.UI.Library.ViewModels Settings = moduleSettingsRepository.SettingsConfig; _isEnabled = GeneralSettingsConfig.Enabled.Espresso; - _keepDisplayOn = Settings.Properties.KeepDisplayOn.Value; + _keepDisplayOn = Settings.Properties.KeepDisplayOn; _mode = Settings.Properties.Mode; - _hours = Settings.Properties.Hours.Value; - _minutes = Settings.Properties.Minutes.Value; + _hours = Settings.Properties.Hours; + _minutes = Settings.Properties.Minutes; // set the callback functions value to hangle outgoing IPC message. SendConfigMSG = ipcMSGCallBackFunc; @@ -89,13 +89,12 @@ namespace Microsoft.PowerToys.Settings.UI.Library.ViewModels _keepDisplayOn = value; OnPropertyChanged(nameof(KeepDisplayOn)); - Settings.Properties.KeepDisplayOn = new BoolProperty(value); - NotifyPropertyChanged(); + Settings.Properties.KeepDisplayOn = value; } } } - public int Hours + public uint Hours { get => _hours; set @@ -105,13 +104,13 @@ namespace Microsoft.PowerToys.Settings.UI.Library.ViewModels _hours = value; OnPropertyChanged(nameof(Hours)); - Settings.Properties.Hours = new IntProperty(value); + Settings.Properties.Hours = value; NotifyPropertyChanged(); } } } - public int Minutes + public uint Minutes { get => _minutes; set @@ -121,7 +120,7 @@ namespace Microsoft.PowerToys.Settings.UI.Library.ViewModels _minutes = value; OnPropertyChanged(nameof(Minutes)); - Settings.Properties.Minutes = new IntProperty(value); + Settings.Properties.Minutes = value; NotifyPropertyChanged(); } } @@ -141,8 +140,8 @@ namespace Microsoft.PowerToys.Settings.UI.Library.ViewModels } private bool _isEnabled; - private int _hours; - private int _minutes; + private uint _hours; + private uint _minutes; private bool _keepDisplayOn; private EspressoMode _mode; }