├── .gitattributes ├── .gitignore ├── CODE_OF_CONDUCT.md ├── LICENSE.txt ├── README.md ├── SECURITY.md └── TpmRcDecoder ├── .vs └── config │ └── applicationhost.config ├── TpmRcDecoder.Universal ├── App.xaml ├── App.xaml.cs ├── AppShell.xaml ├── AppShell.xaml.cs ├── ApplicationInsights.config ├── Assets │ ├── LargeTile.scale-100.png │ ├── LargeTile.scale-125.png │ ├── LargeTile.scale-150.png │ ├── LargeTile.scale-200.png │ ├── LargeTile.scale-400.png │ ├── LockScreenLogo.scale-200.png │ ├── SmallTile.scale-100.png │ ├── SmallTile.scale-125.png │ ├── SmallTile.scale-150.png │ ├── SmallTile.scale-200.png │ ├── SmallTile.scale-400.png │ ├── SplashScreen.scale-200.png │ ├── Square150x150Logo.scale-100.png │ ├── Square150x150Logo.scale-125.png │ ├── Square150x150Logo.scale-150.png │ ├── Square150x150Logo.scale-200.png │ ├── Square150x150Logo.scale-400.png │ ├── Square44x44Logo.scale-200.png │ ├── Square44x44Logo.targetsize-24_altform-unplated.png │ ├── Square71x71Logo.scale-200.png │ ├── Square88x88Logo.png │ ├── StoreLogo.png │ ├── Wide310x150Logo.scale-100.png │ ├── Wide310x150Logo.scale-125.png │ ├── Wide310x150Logo.scale-150.png │ ├── Wide310x150Logo.scale-200.png │ └── Wide310x150Logo.scale-400.png ├── BundleArtifacts │ ├── Upload │ │ ├── arm.txt │ │ ├── x64.txt │ │ └── x86.txt │ ├── arm.txt │ ├── x64.txt │ └── x86.txt ├── CommandCodes.xaml ├── CommandCodes.xaml.cs ├── Decoder.cs ├── LandingPage.xaml ├── LandingPage.xaml.cs ├── Manufacturers.xaml ├── Manufacturers.xaml.cs ├── NavMenuItem.cs ├── NavMenuListView.cs ├── NavigationHelper.cs ├── Package.StoreAssociation.xml ├── Package.appxmanifest ├── PageHeader.xaml ├── PageHeader.xaml.cs ├── Properties │ ├── AssemblyInfo.cs │ └── Default.rd.xml ├── RcDecoder.xaml ├── RcDecoder.xaml.cs ├── Settings.xaml ├── Settings.xaml.cs ├── SuspensionManager.cs ├── TpmRcDecoder.csproj ├── VoiceCommands.xml └── _pkginfo.txt └── TpmRcDecoder.sln /.gitattributes: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # Set default behavior to automatically normalize line endings. 3 | ############################################################################### 4 | * text=auto 5 | 6 | ############################################################################### 7 | # Set default behavior for command prompt diff. 8 | # 9 | # This is need for earlier builds of msysgit that does not have it on by 10 | # default for csharp files. 11 | # Note: This is only used by command line 12 | ############################################################################### 13 | #*.cs diff=csharp 14 | 15 | ############################################################################### 16 | # Set the merge driver for project and solution files 17 | # 18 | # Merging from the command prompt will add diff markers to the files if there 19 | # are conflicts (Merging from VS is not affected by the settings below, in VS 20 | # the diff markers are never inserted). Diff markers may cause the following 21 | # file extensions to fail to load in VS. An alternative would be to treat 22 | # these files as binary and thus will always conflict and require user 23 | # intervention with every merge. To do so, just uncomment the entries below 24 | ############################################################################### 25 | #*.sln merge=binary 26 | #*.csproj merge=binary 27 | #*.vbproj merge=binary 28 | #*.vcxproj merge=binary 29 | #*.vcproj merge=binary 30 | #*.dbproj merge=binary 31 | #*.fsproj merge=binary 32 | #*.lsproj merge=binary 33 | #*.wixproj merge=binary 34 | #*.modelproj merge=binary 35 | #*.sqlproj merge=binary 36 | #*.wwaproj merge=binary 37 | 38 | ############################################################################### 39 | # behavior for image files 40 | # 41 | # image files are treated as binary by default. 42 | ############################################################################### 43 | #*.jpg binary 44 | #*.png binary 45 | #*.gif binary 46 | 47 | ############################################################################### 48 | # diff behavior for common document formats 49 | # 50 | # Convert binary document formats to text before diffing them. This feature 51 | # is only available from the command line. Turn it on by uncommenting the 52 | # entries below. 53 | ############################################################################### 54 | #*.doc diff=astextplain 55 | #*.DOC diff=astextplain 56 | #*.docx diff=astextplain 57 | #*.DOCX diff=astextplain 58 | #*.dot diff=astextplain 59 | #*.DOT diff=astextplain 60 | #*.pdf diff=astextplain 61 | #*.PDF diff=astextplain 62 | #*.rtf diff=astextplain 63 | #*.RTF diff=astextplain 64 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | 4 | # User-specific files 5 | *.suo 6 | *.user 7 | *.sln.docstates 8 | 9 | # Build results 10 | [Dd]ebug/ 11 | [Dd]ebugPublic/ 12 | [Rr]elease/ 13 | x64/ 14 | build/ 15 | bld/ 16 | [Bb]in/ 17 | [Oo]bj/ 18 | 19 | # Roslyn cache directories 20 | *.ide/ 21 | 22 | # MSTest test Results 23 | [Tt]est[Rr]esult*/ 24 | [Bb]uild[Ll]og.* 25 | 26 | #NUNIT 27 | *.VisualState.xml 28 | TestResult.xml 29 | 30 | # Build Results of an ATL Project 31 | [Dd]ebugPS/ 32 | [Rr]eleasePS/ 33 | dlldata.c 34 | 35 | *_i.c 36 | *_p.c 37 | *_i.h 38 | *.ilk 39 | *.meta 40 | *.obj 41 | *.pch 42 | *.pdb 43 | *.pgc 44 | *.pgd 45 | *.rsp 46 | *.sbr 47 | *.tlb 48 | *.tli 49 | *.tlh 50 | *.tmp 51 | *.tmp_proj 52 | *.log 53 | *.vspscc 54 | *.vssscc 55 | .builds 56 | *.pidb 57 | *.svclog 58 | *.scc 59 | 60 | # Chutzpah Test files 61 | _Chutzpah* 62 | 63 | # Visual C++ cache files 64 | ipch/ 65 | *.aps 66 | *.ncb 67 | *.opensdf 68 | *.sdf 69 | *.cachefile 70 | 71 | # Visual Studio profiler 72 | *.psess 73 | *.vsp 74 | *.vspx 75 | 76 | # TFS 2012 Local Workspace 77 | $tf/ 78 | 79 | # Guidance Automation Toolkit 80 | *.gpState 81 | 82 | # ReSharper is a .NET coding add-in 83 | _ReSharper*/ 84 | *.[Rr]e[Ss]harper 85 | *.DotSettings.user 86 | 87 | # JustCode is a .NET coding addin-in 88 | .JustCode 89 | 90 | # TeamCity is a build add-in 91 | _TeamCity* 92 | 93 | # DotCover is a Code Coverage Tool 94 | *.dotCover 95 | 96 | # NCrunch 97 | _NCrunch_* 98 | .*crunch*.local.xml 99 | 100 | # MightyMoose 101 | *.mm.* 102 | AutoTest.Net/ 103 | 104 | # Web workbench (sass) 105 | .sass-cache/ 106 | 107 | # Installshield output folder 108 | [Ee]xpress/ 109 | 110 | # DocProject is a documentation generator add-in 111 | DocProject/buildhelp/ 112 | DocProject/Help/*.HxT 113 | DocProject/Help/*.HxC 114 | DocProject/Help/*.hhc 115 | DocProject/Help/*.hhk 116 | DocProject/Help/*.hhp 117 | DocProject/Help/Html2 118 | DocProject/Help/html 119 | 120 | # Click-Once directory 121 | publish/ 122 | 123 | # Publish Web Output 124 | *.[Pp]ublish.xml 125 | *.azurePubxml 126 | ## TODO: Comment the next line if you want to checkin your 127 | ## web deploy settings but do note that will include unencrypted 128 | ## passwords 129 | #*.pubxml 130 | 131 | # NuGet Packages Directory 132 | packages/* 133 | ## TODO: If the tool you use requires repositories.config 134 | ## uncomment the next line 135 | #!packages/repositories.config 136 | 137 | # Enable "build/" folder in the NuGet Packages folder since 138 | # NuGet packages use it for MSBuild targets. 139 | # This line needs to be after the ignore of the build folder 140 | # (and the packages folder if the line above has been uncommented) 141 | !packages/build/ 142 | 143 | # Windows Azure Build Output 144 | csx/ 145 | *.build.csdef 146 | 147 | # Windows Store app package directory 148 | AppPackages/ 149 | 150 | # Others 151 | sql/ 152 | *.Cache 153 | ClientBin/ 154 | [Ss]tyle[Cc]op.* 155 | ~$* 156 | *~ 157 | *.dbmdl 158 | *.dbproj.schemaview 159 | *.pfx 160 | *.publishsettings 161 | node_modules/ 162 | 163 | # RIA/Silverlight projects 164 | Generated_Code/ 165 | 166 | # Backup & report files from converting an old project file 167 | # to a newer Visual Studio version. Backup files are not needed, 168 | # because we have git ;-) 169 | _UpgradeReport_Files/ 170 | Backup*/ 171 | UpgradeLog*.XML 172 | UpgradeLog*.htm 173 | 174 | # SQL Server files 175 | *.mdf 176 | *.ldf 177 | 178 | # Business Intelligence projects 179 | *.rdl.data 180 | *.bim.layout 181 | *.bim_*.settings 182 | 183 | # Microsoft Fakes 184 | FakesAssemblies/ 185 | 186 | # LightSwitch generated files 187 | GeneratedArtifacts/ 188 | _Pvt_Extensions/ 189 | ModelManifest.xml 190 | /.vs 191 | /TpmRcDecoder/.vs 192 | /TpmRcDecoder/TpmRcDecoder.Universal/.vs 193 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Microsoft Open Source Code of Conduct 2 | 3 | This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). 4 | 5 | Resources: 6 | 7 | - [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/) 8 | - [Microsoft Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) 9 | - Contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with questions or concerns 10 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2016-2018 Microsoft 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19 | SOFTWARE. 20 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # TpmRCDecoder 2 | TPM Return Code Decoder 3 | 4 | The decoder for TPM 1.2 and TPM 2.0 return codes converts the return codes returned by a TPM device into readable format. 5 | It will also accept Windows return codes that are returned by the TPM Base Services (TBS). 6 | 7 | This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). 8 | For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact 9 | [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments. 10 | -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | ## Security 4 | 5 | Microsoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet), [Xamarin](https://github.com/xamarin), and [our GitHub organizations](https://opensource.microsoft.com/). 6 | 7 | If you believe you have found a security vulnerability in any Microsoft-owned repository that meets [Microsoft's definition of a security vulnerability](https://aka.ms/opensource/security/definition), please report it to us as described below. 8 | 9 | ## Reporting Security Issues 10 | 11 | **Please do not report security vulnerabilities through public GitHub issues.** 12 | 13 | Instead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://aka.ms/opensource/security/create-report). 14 | 15 | If you prefer to submit without logging in, send email to [secure@microsoft.com](mailto:secure@microsoft.com). If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://aka.ms/opensource/security/pgpkey). 16 | 17 | You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://aka.ms/opensource/security/msrc). 18 | 19 | Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue: 20 | 21 | * Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.) 22 | * Full paths of source file(s) related to the manifestation of the issue 23 | * The location of the affected source code (tag/branch/commit or direct URL) 24 | * Any special configuration required to reproduce the issue 25 | * Step-by-step instructions to reproduce the issue 26 | * Proof-of-concept or exploit code (if possible) 27 | * Impact of the issue, including how an attacker might exploit the issue 28 | 29 | This information will help us triage your report more quickly. 30 | 31 | If you are reporting for a bug bounty, more complete reports can contribute to a higher bounty award. Please visit our [Microsoft Bug Bounty Program](https://aka.ms/opensource/security/bounty) page for more details about our active programs. 32 | 33 | ## Preferred Languages 34 | 35 | We prefer all communications to be in English. 36 | 37 | ## Policy 38 | 39 | Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://aka.ms/opensource/security/cvd). 40 | 41 | 42 | -------------------------------------------------------------------------------- /TpmRcDecoder/TpmRcDecoder.Universal/App.xaml: -------------------------------------------------------------------------------- 1 |  7 | 8 | 9 | 12 | 13 | 14 | 15 | 0 16 | 17 | 18 | 2 19 | 20 | 21 | 0 22 | 23 | 24 | 25 | 26 | 0 27 | 641 28 | 1008 29 | 30 | 31 | 12 32 | 33 | 116 | 117 | 124 | 125 | 128 | 129 | 291 | 292 | 293 | 294 | -------------------------------------------------------------------------------- /TpmRcDecoder/TpmRcDecoder.Universal/App.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | using TpmRcDecoder.Views; 4 | using Windows.ApplicationModel; 5 | using Windows.ApplicationModel.Activation; 6 | using Windows.Foundation; 7 | using Windows.Media.SpeechRecognition; 8 | using Windows.Storage; 9 | using Windows.UI; 10 | using Windows.UI.ViewManagement; 11 | using Windows.UI.Xaml; 12 | using Windows.UI.Xaml.Controls; 13 | using Windows.UI.Xaml.Navigation; 14 | 15 | namespace TpmRcDecoder 16 | { 17 | /// 18 | /// Provides application-specific behavior to supplement the default Application class. 19 | /// 20 | sealed partial class App : Application 21 | { 22 | /// 23 | /// Initializes the singleton application object. This is the first line of authored code 24 | /// executed, and as such is the logical equivalent of main() or WinMain(). 25 | /// 26 | public App() 27 | { 28 | Microsoft.ApplicationInsights.WindowsAppInitializer.InitializeAsync( 29 | Microsoft.ApplicationInsights.WindowsCollectors.Metadata | 30 | Microsoft.ApplicationInsights.WindowsCollectors.Session); 31 | this.InitializeComponent(); 32 | this.Suspending += OnSuspending; 33 | } 34 | 35 | /// 36 | /// Both the OnLaunched and OnActivated event handlers need to make sure the root frame has been created, so the common 37 | /// code to do that is factored into this method and called from both. 38 | /// 39 | private void EnsureRootFrame(ApplicationExecutionState previousExecutionState, string arguments) 40 | { 41 | AppShell shell = Window.Current.Content as AppShell; 42 | 43 | // Do not repeat app initialization when the Window already has content, 44 | // just ensure that the window is active 45 | if (shell == null) 46 | { 47 | // Create a AppShell to act as the navigation context and navigate to the first page 48 | shell = new AppShell(); 49 | 50 | // Set the default language 51 | shell.Language = Windows.Globalization.ApplicationLanguages.Languages[0]; 52 | 53 | shell.AppFrame.NavigationFailed += OnNavigationFailed; 54 | 55 | if (previousExecutionState == ApplicationExecutionState.Terminated) 56 | { 57 | //TODO: Load state from previously suspended application 58 | } 59 | } 60 | 61 | // Place our app shell in the current Window 62 | Window.Current.Content = shell; 63 | 64 | if (shell.AppFrame.Content == null) 65 | { 66 | ApplicationDataContainer roamingSettings = ApplicationData.Current.RoamingSettings; 67 | const string DontShowLandingPageSetting = "DontShowLandingPage"; 68 | 69 | if (roamingSettings.Values[DontShowLandingPageSetting] != null && 70 | roamingSettings.Values[DontShowLandingPageSetting].Equals(true.ToString())) 71 | { 72 | // When the navigation stack isn't restored, navigate to the first page 73 | // suppressing the initial entrance animation. Because landing page is disabled, 74 | // got to first content page. 75 | shell.AppFrame.Navigate(typeof(RcDecoder), arguments, new Windows.UI.Xaml.Media.Animation.SuppressNavigationTransitionInfo()); 76 | } 77 | else 78 | { 79 | // When the navigation stack isn't restored, navigate to the first page 80 | // suppressing the initial entrance animation. 81 | shell.AppFrame.Navigate(typeof(LandingPage), arguments, new Windows.UI.Xaml.Media.Animation.SuppressNavigationTransitionInfo()); 82 | } 83 | } 84 | 85 | // Ensure the current window is active 86 | Window.Current.Activate(); 87 | } 88 | 89 | /// 90 | /// Invoked when the application is launched normally by the end user. Other entry points 91 | /// will be used such as when the application is launched to open a specific file. 92 | /// 93 | /// Details about the launch request and process. 94 | protected override void OnLaunched(LaunchActivatedEventArgs e) 95 | { 96 | #if DEBUG 97 | if (System.Diagnostics.Debugger.IsAttached) 98 | { 99 | this.DebugSettings.EnableFrameRateCounter = true; 100 | } 101 | #endif 102 | 103 | // Change minimum window size 104 | ApplicationView.GetForCurrentView().SetPreferredMinSize(new Size(320, 600)); 105 | 106 | // Darken the window title bar using a color value to match app theme 107 | ApplicationViewTitleBar titleBar = ApplicationView.GetForCurrentView().TitleBar; 108 | if (titleBar != null) 109 | { 110 | Color titleBarColor = (Color)App.Current.Resources["SystemChromeMediumColor"]; 111 | titleBar.BackgroundColor = titleBarColor; 112 | titleBar.ButtonBackgroundColor = titleBarColor; 113 | } 114 | 115 | EnsureRootFrame(e.PreviousExecutionState, e.Arguments); 116 | } 117 | 118 | private string SemanticInterpretation(string interpretationKey, SpeechRecognitionResult speechRecognitionResult) 119 | { 120 | if (speechRecognitionResult.SemanticInterpretation.Properties.ContainsKey(interpretationKey)) 121 | { 122 | return speechRecognitionResult.SemanticInterpretation.Properties[interpretationKey].FirstOrDefault(); 123 | } 124 | else 125 | { 126 | return ""; 127 | } 128 | } 129 | 130 | /// 131 | /// Invoked when Navigation to a certain page fails 132 | /// 133 | /// The Frame which failed navigation 134 | /// Details about the navigation failure 135 | void OnNavigationFailed(object sender, NavigationFailedEventArgs e) 136 | { 137 | throw new Exception("Failed to load Page " + e.SourcePageType.FullName); 138 | } 139 | 140 | /// 141 | /// Invoked when application execution is being suspended. Application state is saved 142 | /// without knowing whether the application will be terminated or resumed with the contents 143 | /// of memory still intact. 144 | /// 145 | /// The source of the suspend request. 146 | /// Details about the suspend request. 147 | private void OnSuspending(object sender, SuspendingEventArgs e) 148 | { 149 | var deferral = e.SuspendingOperation.GetDeferral(); 150 | //TODO: Save application state and stop any background activity 151 | deferral.Complete(); 152 | } 153 | } 154 | } 155 | -------------------------------------------------------------------------------- /TpmRcDecoder/TpmRcDecoder.Universal/AppShell.xaml.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Linq; 3 | using Windows.Foundation; 4 | using Windows.UI.Xaml.Automation; 5 | using Windows.UI.Core; 6 | using Windows.UI.Xaml; 7 | using Windows.UI.Xaml.Controls; 8 | using Windows.UI.Xaml.Input; 9 | using Windows.UI.Xaml.Navigation; 10 | using TpmRcDecoder.Controls; 11 | using TpmRcDecoder.Views; 12 | 13 | namespace TpmRcDecoder 14 | { 15 | /// 16 | /// The "chrome" layer of the app that provides top-level navigation with 17 | /// proper keyboarding navigation. 18 | /// 19 | public sealed partial class AppShell : Page 20 | { 21 | private bool isPaddingAdded = false; 22 | // Declare the top level nav items 23 | private List navlist = new List( 24 | new[] 25 | { 26 | new NavMenuItem() 27 | { 28 | Symbol = Symbol.Rename, 29 | Label = "Return Code Decoder", 30 | DestPage = typeof(RcDecoder) 31 | }, 32 | new NavMenuItem() 33 | { 34 | Symbol = Symbol.Find, 35 | Label = "Command Codes", 36 | DestPage = typeof(CommandCodes) 37 | }, 38 | new NavMenuItem() 39 | { 40 | Symbol = Symbol.Contact, 41 | Label = "TPM Manufacturers", 42 | DestPage = typeof(Manufacturers) 43 | }, 44 | new NavMenuItem() 45 | { 46 | Symbol = Symbol.Setting, 47 | Label = "Settings", 48 | DestPage = typeof(Settings) 49 | }, 50 | }); 51 | 52 | public static AppShell Current = null; 53 | 54 | /// 55 | /// Initializes a new instance of the AppShell, sets the static 'Current' reference, 56 | /// adds callbacks for Back requests and changes in the SplitView's DisplayMode, and 57 | /// provide the nav menu list with the data to display. 58 | /// 59 | public AppShell() 60 | { 61 | this.InitializeComponent(); 62 | 63 | this.Loaded += (sender, args) => 64 | { 65 | Current = this; 66 | 67 | this.CheckTogglePaneButtonSizeChanged(); 68 | 69 | var titleBar = Windows.ApplicationModel.Core.CoreApplication.GetCurrentView().TitleBar; 70 | titleBar.IsVisibleChanged += TitleBar_IsVisibleChanged; 71 | }; 72 | 73 | this.RootSplitView.RegisterPropertyChangedCallback( 74 | SplitView.DisplayModeProperty, 75 | (s, a) => 76 | { 77 | // Ensure that we update the reported size of the TogglePaneButton when the SplitView's 78 | // DisplayMode changes. 79 | this.CheckTogglePaneButtonSizeChanged(); 80 | }); 81 | 82 | SystemNavigationManager.GetForCurrentView().BackRequested += SystemNavigationManager_BackRequested; 83 | SystemNavigationManager.GetForCurrentView().AppViewBackButtonVisibility = AppViewBackButtonVisibility.Visible; 84 | 85 | NavMenuList.ItemsSource = navlist; 86 | } 87 | 88 | public Frame AppFrame { get { return this.frame; } } 89 | 90 | /// 91 | /// Invoked when window title bar visibility changes, such as after loading or in tablet mode 92 | /// Ensures correct padding at window top, between title bar and app content 93 | /// 94 | /// 95 | /// 96 | private void TitleBar_IsVisibleChanged(Windows.ApplicationModel.Core.CoreApplicationViewTitleBar sender, object args) 97 | { 98 | if (!this.isPaddingAdded && sender.IsVisible) 99 | { 100 | //add extra padding between window title bar and app content 101 | double extraPadding = (double)Windows.UI.Xaml.Application.Current.Resources["DesktopWindowTopPadding"]; 102 | this.isPaddingAdded = true; 103 | 104 | Thickness margin = NavMenuList.Margin; 105 | NavMenuList.Margin = new Thickness(margin.Left, margin.Top + extraPadding, margin.Right, margin.Bottom); 106 | margin = frame.Margin; 107 | frame.Margin = new Thickness(margin.Left, margin.Top + extraPadding, margin.Right, margin.Bottom); 108 | margin = TogglePaneButton.Margin; 109 | TogglePaneButton.Margin = new Thickness(margin.Left, margin.Top + extraPadding, margin.Right, margin.Bottom); 110 | } 111 | } 112 | 113 | /// 114 | /// Default keyboard focus movement for any unhandled keyboarding 115 | /// 116 | /// 117 | /// 118 | private void AppShell_KeyDown(object sender, KeyRoutedEventArgs e) 119 | { 120 | FocusNavigationDirection direction = FocusNavigationDirection.None; 121 | switch (e.Key) 122 | { 123 | case Windows.System.VirtualKey.Left: 124 | case Windows.System.VirtualKey.GamepadDPadLeft: 125 | case Windows.System.VirtualKey.GamepadLeftThumbstickLeft: 126 | case Windows.System.VirtualKey.NavigationLeft: 127 | direction = FocusNavigationDirection.Left; 128 | break; 129 | case Windows.System.VirtualKey.Right: 130 | case Windows.System.VirtualKey.GamepadDPadRight: 131 | case Windows.System.VirtualKey.GamepadLeftThumbstickRight: 132 | case Windows.System.VirtualKey.NavigationRight: 133 | direction = FocusNavigationDirection.Right; 134 | break; 135 | 136 | case Windows.System.VirtualKey.Up: 137 | case Windows.System.VirtualKey.GamepadDPadUp: 138 | case Windows.System.VirtualKey.GamepadLeftThumbstickUp: 139 | case Windows.System.VirtualKey.NavigationUp: 140 | direction = FocusNavigationDirection.Up; 141 | break; 142 | 143 | case Windows.System.VirtualKey.Down: 144 | case Windows.System.VirtualKey.GamepadDPadDown: 145 | case Windows.System.VirtualKey.GamepadLeftThumbstickDown: 146 | case Windows.System.VirtualKey.NavigationDown: 147 | direction = FocusNavigationDirection.Down; 148 | break; 149 | } 150 | 151 | if (direction != FocusNavigationDirection.None) 152 | { 153 | var control = FocusManager.FindNextFocusableElement(direction) as Control; 154 | if (control != null) 155 | { 156 | control.Focus(FocusState.Programmatic); 157 | e.Handled = true; 158 | } 159 | } 160 | } 161 | 162 | #region BackRequested Handlers 163 | 164 | private void SystemNavigationManager_BackRequested(object sender, BackRequestedEventArgs e) 165 | { 166 | bool handled = e.Handled; 167 | this.BackRequested(ref handled); 168 | e.Handled = handled; 169 | } 170 | 171 | private void BackRequested(ref bool handled) 172 | { 173 | // Get a hold of the current frame so that we can inspect the app back stack. 174 | 175 | if (this.AppFrame == null) 176 | return; 177 | 178 | // Check to see if this is the top-most page on the app back stack. 179 | if (this.AppFrame.CanGoBack && !handled) 180 | { 181 | // If not, set the event to handled and go back to the previous page in the app. 182 | handled = true; 183 | this.AppFrame.GoBack(); 184 | } 185 | } 186 | 187 | #endregion 188 | 189 | #region Navigation 190 | 191 | /// 192 | /// Navigate to the Page for the selected . 193 | /// 194 | /// 195 | /// 196 | private void NavMenuList_ItemInvoked(object sender, ListViewItem listViewItem) 197 | { 198 | var item = (NavMenuItem)((NavMenuListView)sender).ItemFromContainer(listViewItem); 199 | 200 | if (item != null) 201 | { 202 | if (item.DestPage != null && 203 | item.DestPage != this.AppFrame.CurrentSourcePageType) 204 | { 205 | this.AppFrame.Navigate(item.DestPage, item.Arguments); 206 | } 207 | } 208 | } 209 | 210 | /// 211 | /// Ensures the nav menu reflects reality when navigation is triggered outside of 212 | /// the nav menu buttons. 213 | /// 214 | /// 215 | /// 216 | private void OnNavigatingToPage(object sender, NavigatingCancelEventArgs e) 217 | { 218 | if (e.NavigationMode == NavigationMode.Back) 219 | { 220 | var item = (from p in this.navlist where p.DestPage == e.SourcePageType select p).SingleOrDefault(); 221 | if (item == null && this.AppFrame.BackStackDepth > 0) 222 | { 223 | // In cases where a page drills into sub-pages then we'll highlight the most recent 224 | // navigation menu item that appears in the BackStack 225 | foreach (var entry in this.AppFrame.BackStack.Reverse()) 226 | { 227 | item = (from p in this.navlist where p.DestPage == entry.SourcePageType select p).SingleOrDefault(); 228 | if (item != null) 229 | break; 230 | } 231 | } 232 | 233 | var container = (ListViewItem)NavMenuList.ContainerFromItem(item); 234 | 235 | // While updating the selection state of the item prevent it from taking keyboard focus. If a 236 | // user is invoking the back button via the keyboard causing the selected nav menu item to change 237 | // then focus will remain on the back button. 238 | if (container != null) container.IsTabStop = false; 239 | NavMenuList.SetSelectedItem(container); 240 | if (container != null) container.IsTabStop = true; 241 | } 242 | } 243 | 244 | private void OnNavigatedToPage(object sender, NavigationEventArgs e) 245 | { 246 | // After a successful navigation set keyboard focus to the loaded page 247 | if (e.Content is Page && e.Content != null) 248 | { 249 | var control = (Page)e.Content; 250 | control.Loaded += Page_Loaded; 251 | } 252 | } 253 | 254 | private void Page_Loaded(object sender, RoutedEventArgs e) 255 | { 256 | ((Page)sender).Focus(FocusState.Programmatic); 257 | ((Page)sender).Loaded -= Page_Loaded; 258 | } 259 | 260 | #endregion 261 | 262 | public Rect TogglePaneButtonRect 263 | { 264 | get; 265 | private set; 266 | } 267 | 268 | /// 269 | /// An event to notify listeners when the hamburger button may occlude other content in the app. 270 | /// The custom "PageHeader" user control is using this. 271 | /// 272 | public event TypedEventHandler TogglePaneButtonRectChanged; 273 | 274 | /// 275 | /// Public method to allow pages to open SplitView's pane. 276 | /// Used for custom app shortcuts like navigating left from page's left-most item 277 | /// 278 | public void OpenNavePane() 279 | { 280 | TogglePaneButton.IsChecked = true; 281 | //NavPaneDivider.Visibility = Visibility.Visible; 282 | } 283 | 284 | /// 285 | /// Hides divider when nav pane is closed. 286 | /// 287 | /// 288 | /// 289 | private void RootSplitView_PaneClosed(SplitView sender, object args) 290 | { 291 | //NavPaneDivider.Visibility = Visibility.Collapsed; 292 | } 293 | 294 | /// 295 | /// Callback when the SplitView's Pane is toggled closed. When the Pane is not visible 296 | /// then the floating hamburger may be occluding other content in the app unless it is aware. 297 | /// 298 | /// 299 | /// 300 | private void TogglePaneButton_Unchecked(object sender, RoutedEventArgs e) 301 | { 302 | this.CheckTogglePaneButtonSizeChanged(); 303 | } 304 | 305 | /// 306 | /// Callback when the SplitView's Pane is toggled opened. 307 | /// Restores divider's visibility and ensures that margins around the floating hamburger are correctly set. 308 | /// 309 | /// 310 | /// 311 | private void TogglePaneButton_Checked(object sender, RoutedEventArgs e) 312 | { 313 | //NavPaneDivider.Visibility = Visibility.Visible; 314 | this.CheckTogglePaneButtonSizeChanged(); 315 | } 316 | 317 | /// 318 | /// Check for the conditions where the navigation pane does not occupy the space under the floating 319 | /// hamburger button and trigger the event. 320 | /// 321 | private void CheckTogglePaneButtonSizeChanged() 322 | { 323 | if (this.RootSplitView.DisplayMode == SplitViewDisplayMode.Inline || 324 | this.RootSplitView.DisplayMode == SplitViewDisplayMode.Overlay) 325 | { 326 | var transform = this.TogglePaneButton.TransformToVisual(this); 327 | var rect = transform.TransformBounds(new Rect(0, 0, this.TogglePaneButton.ActualWidth, this.TogglePaneButton.ActualHeight)); 328 | this.TogglePaneButtonRect = rect; 329 | } 330 | else 331 | { 332 | this.TogglePaneButtonRect = new Rect(); 333 | } 334 | 335 | var handler = this.TogglePaneButtonRectChanged; 336 | if (handler != null) 337 | { 338 | // handler(this, this.TogglePaneButtonRect); 339 | handler.DynamicInvoke(this, this.TogglePaneButtonRect); 340 | } 341 | } 342 | 343 | /// 344 | /// Enable accessibility on each nav menu item by setting the AutomationProperties.Name on each container 345 | /// using the associated Label of each item. 346 | /// 347 | /// 348 | /// 349 | private void NavMenuItemContainerContentChanging(ListViewBase sender, ContainerContentChangingEventArgs args) 350 | { 351 | if (!args.InRecycleQueue && args.Item != null && args.Item is NavMenuItem) 352 | { 353 | args.ItemContainer.SetValue(AutomationProperties.NameProperty, ((NavMenuItem)args.Item).Label); 354 | } 355 | else 356 | { 357 | args.ItemContainer.ClearValue(AutomationProperties.NameProperty); 358 | } 359 | } 360 | } 361 | } 362 | 363 | -------------------------------------------------------------------------------- /TpmRcDecoder/TpmRcDecoder.Universal/ApplicationInsights.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /TpmRcDecoder/TpmRcDecoder.Universal/Assets/LargeTile.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/TpmRCDecoder/36d41b89c3c39dad31290ff691a902c5fc16735b/TpmRcDecoder/TpmRcDecoder.Universal/Assets/LargeTile.scale-100.png -------------------------------------------------------------------------------- /TpmRcDecoder/TpmRcDecoder.Universal/Assets/LargeTile.scale-125.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/TpmRCDecoder/36d41b89c3c39dad31290ff691a902c5fc16735b/TpmRcDecoder/TpmRcDecoder.Universal/Assets/LargeTile.scale-125.png -------------------------------------------------------------------------------- /TpmRcDecoder/TpmRcDecoder.Universal/Assets/LargeTile.scale-150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/TpmRCDecoder/36d41b89c3c39dad31290ff691a902c5fc16735b/TpmRcDecoder/TpmRcDecoder.Universal/Assets/LargeTile.scale-150.png -------------------------------------------------------------------------------- /TpmRcDecoder/TpmRcDecoder.Universal/Assets/LargeTile.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/TpmRCDecoder/36d41b89c3c39dad31290ff691a902c5fc16735b/TpmRcDecoder/TpmRcDecoder.Universal/Assets/LargeTile.scale-200.png -------------------------------------------------------------------------------- /TpmRcDecoder/TpmRcDecoder.Universal/Assets/LargeTile.scale-400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/TpmRCDecoder/36d41b89c3c39dad31290ff691a902c5fc16735b/TpmRcDecoder/TpmRcDecoder.Universal/Assets/LargeTile.scale-400.png -------------------------------------------------------------------------------- /TpmRcDecoder/TpmRcDecoder.Universal/Assets/LockScreenLogo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/TpmRCDecoder/36d41b89c3c39dad31290ff691a902c5fc16735b/TpmRcDecoder/TpmRcDecoder.Universal/Assets/LockScreenLogo.scale-200.png -------------------------------------------------------------------------------- /TpmRcDecoder/TpmRcDecoder.Universal/Assets/SmallTile.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/TpmRCDecoder/36d41b89c3c39dad31290ff691a902c5fc16735b/TpmRcDecoder/TpmRcDecoder.Universal/Assets/SmallTile.scale-100.png -------------------------------------------------------------------------------- /TpmRcDecoder/TpmRcDecoder.Universal/Assets/SmallTile.scale-125.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/TpmRCDecoder/36d41b89c3c39dad31290ff691a902c5fc16735b/TpmRcDecoder/TpmRcDecoder.Universal/Assets/SmallTile.scale-125.png -------------------------------------------------------------------------------- /TpmRcDecoder/TpmRcDecoder.Universal/Assets/SmallTile.scale-150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/TpmRCDecoder/36d41b89c3c39dad31290ff691a902c5fc16735b/TpmRcDecoder/TpmRcDecoder.Universal/Assets/SmallTile.scale-150.png -------------------------------------------------------------------------------- /TpmRcDecoder/TpmRcDecoder.Universal/Assets/SmallTile.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/TpmRCDecoder/36d41b89c3c39dad31290ff691a902c5fc16735b/TpmRcDecoder/TpmRcDecoder.Universal/Assets/SmallTile.scale-200.png -------------------------------------------------------------------------------- /TpmRcDecoder/TpmRcDecoder.Universal/Assets/SmallTile.scale-400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/TpmRCDecoder/36d41b89c3c39dad31290ff691a902c5fc16735b/TpmRcDecoder/TpmRcDecoder.Universal/Assets/SmallTile.scale-400.png -------------------------------------------------------------------------------- /TpmRcDecoder/TpmRcDecoder.Universal/Assets/SplashScreen.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/TpmRCDecoder/36d41b89c3c39dad31290ff691a902c5fc16735b/TpmRcDecoder/TpmRcDecoder.Universal/Assets/SplashScreen.scale-200.png -------------------------------------------------------------------------------- /TpmRcDecoder/TpmRcDecoder.Universal/Assets/Square150x150Logo.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/TpmRCDecoder/36d41b89c3c39dad31290ff691a902c5fc16735b/TpmRcDecoder/TpmRcDecoder.Universal/Assets/Square150x150Logo.scale-100.png -------------------------------------------------------------------------------- /TpmRcDecoder/TpmRcDecoder.Universal/Assets/Square150x150Logo.scale-125.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/TpmRCDecoder/36d41b89c3c39dad31290ff691a902c5fc16735b/TpmRcDecoder/TpmRcDecoder.Universal/Assets/Square150x150Logo.scale-125.png -------------------------------------------------------------------------------- /TpmRcDecoder/TpmRcDecoder.Universal/Assets/Square150x150Logo.scale-150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/TpmRCDecoder/36d41b89c3c39dad31290ff691a902c5fc16735b/TpmRcDecoder/TpmRcDecoder.Universal/Assets/Square150x150Logo.scale-150.png -------------------------------------------------------------------------------- /TpmRcDecoder/TpmRcDecoder.Universal/Assets/Square150x150Logo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/TpmRCDecoder/36d41b89c3c39dad31290ff691a902c5fc16735b/TpmRcDecoder/TpmRcDecoder.Universal/Assets/Square150x150Logo.scale-200.png -------------------------------------------------------------------------------- /TpmRcDecoder/TpmRcDecoder.Universal/Assets/Square150x150Logo.scale-400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/TpmRCDecoder/36d41b89c3c39dad31290ff691a902c5fc16735b/TpmRcDecoder/TpmRcDecoder.Universal/Assets/Square150x150Logo.scale-400.png -------------------------------------------------------------------------------- /TpmRcDecoder/TpmRcDecoder.Universal/Assets/Square44x44Logo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/TpmRCDecoder/36d41b89c3c39dad31290ff691a902c5fc16735b/TpmRcDecoder/TpmRcDecoder.Universal/Assets/Square44x44Logo.scale-200.png -------------------------------------------------------------------------------- /TpmRcDecoder/TpmRcDecoder.Universal/Assets/Square44x44Logo.targetsize-24_altform-unplated.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/TpmRCDecoder/36d41b89c3c39dad31290ff691a902c5fc16735b/TpmRcDecoder/TpmRcDecoder.Universal/Assets/Square44x44Logo.targetsize-24_altform-unplated.png -------------------------------------------------------------------------------- /TpmRcDecoder/TpmRcDecoder.Universal/Assets/Square71x71Logo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/TpmRCDecoder/36d41b89c3c39dad31290ff691a902c5fc16735b/TpmRcDecoder/TpmRcDecoder.Universal/Assets/Square71x71Logo.scale-200.png -------------------------------------------------------------------------------- /TpmRcDecoder/TpmRcDecoder.Universal/Assets/Square88x88Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/TpmRCDecoder/36d41b89c3c39dad31290ff691a902c5fc16735b/TpmRcDecoder/TpmRcDecoder.Universal/Assets/Square88x88Logo.png -------------------------------------------------------------------------------- /TpmRcDecoder/TpmRcDecoder.Universal/Assets/StoreLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/TpmRCDecoder/36d41b89c3c39dad31290ff691a902c5fc16735b/TpmRcDecoder/TpmRcDecoder.Universal/Assets/StoreLogo.png -------------------------------------------------------------------------------- /TpmRcDecoder/TpmRcDecoder.Universal/Assets/Wide310x150Logo.scale-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/TpmRCDecoder/36d41b89c3c39dad31290ff691a902c5fc16735b/TpmRcDecoder/TpmRcDecoder.Universal/Assets/Wide310x150Logo.scale-100.png -------------------------------------------------------------------------------- /TpmRcDecoder/TpmRcDecoder.Universal/Assets/Wide310x150Logo.scale-125.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/TpmRCDecoder/36d41b89c3c39dad31290ff691a902c5fc16735b/TpmRcDecoder/TpmRcDecoder.Universal/Assets/Wide310x150Logo.scale-125.png -------------------------------------------------------------------------------- /TpmRcDecoder/TpmRcDecoder.Universal/Assets/Wide310x150Logo.scale-150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/TpmRCDecoder/36d41b89c3c39dad31290ff691a902c5fc16735b/TpmRcDecoder/TpmRcDecoder.Universal/Assets/Wide310x150Logo.scale-150.png -------------------------------------------------------------------------------- /TpmRcDecoder/TpmRcDecoder.Universal/Assets/Wide310x150Logo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/TpmRCDecoder/36d41b89c3c39dad31290ff691a902c5fc16735b/TpmRcDecoder/TpmRcDecoder.Universal/Assets/Wide310x150Logo.scale-200.png -------------------------------------------------------------------------------- /TpmRcDecoder/TpmRcDecoder.Universal/Assets/Wide310x150Logo.scale-400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/TpmRCDecoder/36d41b89c3c39dad31290ff691a902c5fc16735b/TpmRcDecoder/TpmRcDecoder.Universal/Assets/Wide310x150Logo.scale-400.png -------------------------------------------------------------------------------- /TpmRcDecoder/TpmRcDecoder.Universal/BundleArtifacts/Upload/arm.txt: -------------------------------------------------------------------------------- 1 | MainPackage=C:\Users\raigner\source\repos\TpmRCDecoder\TpmRcDecoder\TpmRcDecoder.Universal\bin\ARM\Release\Upload\TpmRcDecoder_1.8.9.0_ARM.appx 2 | SymbolPackage=C:\Users\raigner\source\repos\TpmRCDecoder\TpmRcDecoder\TpmRcDecoder.Universal\bin\ARM\Release\Upload\TpmRcDecoder_1.8.9.0\TpmRcDecoder_1.8.9.0_ARM.appxsym 3 | ResourcePack=C:\Users\raigner\source\repos\TpmRCDecoder\TpmRcDecoder\TpmRcDecoder.Universal\bin\ARM\Release\Upload\TpmRcDecoder_1.8.9.0_scale-100.appx 4 | ResourcePack=C:\Users\raigner\source\repos\TpmRCDecoder\TpmRcDecoder\TpmRcDecoder.Universal\bin\ARM\Release\Upload\TpmRcDecoder_1.8.9.0_scale-125.appx 5 | ResourcePack=C:\Users\raigner\source\repos\TpmRCDecoder\TpmRcDecoder\TpmRcDecoder.Universal\bin\ARM\Release\Upload\TpmRcDecoder_1.8.9.0_scale-150.appx 6 | ResourcePack=C:\Users\raigner\source\repos\TpmRCDecoder\TpmRcDecoder\TpmRcDecoder.Universal\bin\ARM\Release\Upload\TpmRcDecoder_1.8.9.0_scale-400.appx 7 | -------------------------------------------------------------------------------- /TpmRcDecoder/TpmRcDecoder.Universal/BundleArtifacts/Upload/x64.txt: -------------------------------------------------------------------------------- 1 | MainPackage=C:\Users\raigner\source\repos\TpmRCDecoder\TpmRcDecoder\TpmRcDecoder.Universal\bin\x64\Release\Upload\TpmRcDecoder_1.8.9.0_x64.appx 2 | SymbolPackage=C:\Users\raigner\source\repos\TpmRCDecoder\TpmRcDecoder\TpmRcDecoder.Universal\bin\x64\Release\Upload\TpmRcDecoder_1.8.9.0\TpmRcDecoder_1.8.9.0_x64.appxsym 3 | -------------------------------------------------------------------------------- /TpmRcDecoder/TpmRcDecoder.Universal/BundleArtifacts/Upload/x86.txt: -------------------------------------------------------------------------------- 1 | MainPackage=C:\Users\raigner\source\repos\TpmRCDecoder\TpmRcDecoder\TpmRcDecoder.Universal\bin\x86\Release\Upload\TpmRcDecoder_1.8.9.0_x86.appx 2 | SymbolPackage=C:\Users\raigner\source\repos\TpmRCDecoder\TpmRcDecoder\TpmRcDecoder.Universal\bin\x86\Release\Upload\TpmRcDecoder_1.8.9.0\TpmRcDecoder_1.8.9.0_x86.appxsym 3 | -------------------------------------------------------------------------------- /TpmRcDecoder/TpmRcDecoder.Universal/BundleArtifacts/arm.txt: -------------------------------------------------------------------------------- 1 | MainPackage=C:\Users\raigner\source\repos\TpmRCDecoder\TpmRcDecoder\TpmRcDecoder.Universal\bin\ARM\Release\TpmRcDecoder_1.8.9.0_ARM.appx 2 | SymbolPackage=C:\Users\raigner\source\repos\TpmRCDecoder\TpmRcDecoder\TpmRcDecoder.Universal\obj\ARM\Release\Symbols\TpmRcDecoder_1.8.9.0_ARM.appxsym 3 | ResourcePack=C:\Users\raigner\source\repos\TpmRCDecoder\TpmRcDecoder\TpmRcDecoder.Universal\bin\ARM\Release\TpmRcDecoder_1.8.9.0_scale-100.appx 4 | ResourcePack=C:\Users\raigner\source\repos\TpmRCDecoder\TpmRcDecoder\TpmRcDecoder.Universal\bin\ARM\Release\TpmRcDecoder_1.8.9.0_scale-125.appx 5 | ResourcePack=C:\Users\raigner\source\repos\TpmRCDecoder\TpmRcDecoder\TpmRcDecoder.Universal\bin\ARM\Release\TpmRcDecoder_1.8.9.0_scale-150.appx 6 | ResourcePack=C:\Users\raigner\source\repos\TpmRCDecoder\TpmRcDecoder\TpmRcDecoder.Universal\bin\ARM\Release\TpmRcDecoder_1.8.9.0_scale-400.appx 7 | -------------------------------------------------------------------------------- /TpmRcDecoder/TpmRcDecoder.Universal/BundleArtifacts/x64.txt: -------------------------------------------------------------------------------- 1 | MainPackage=C:\Users\raigner\source\repos\TpmRCDecoder\TpmRcDecoder\TpmRcDecoder.Universal\bin\x64\Release\TpmRcDecoder_1.8.9.0_x64.appx 2 | SymbolPackage=C:\Users\raigner\source\repos\TpmRCDecoder\TpmRcDecoder\TpmRcDecoder.Universal\obj\x64\Release\Symbols\TpmRcDecoder_1.8.9.0_x64.appxsym 3 | -------------------------------------------------------------------------------- /TpmRcDecoder/TpmRcDecoder.Universal/BundleArtifacts/x86.txt: -------------------------------------------------------------------------------- 1 | MainPackage=C:\Users\raigner\source\repos\TpmRCDecoder\TpmRcDecoder\TpmRcDecoder.Universal\bin\x86\Release\TpmRcDecoder_1.8.9.0_x86.appx 2 | SymbolPackage=C:\Users\raigner\source\repos\TpmRCDecoder\TpmRcDecoder\TpmRcDecoder.Universal\obj\x86\Release\Symbols\TpmRcDecoder_1.8.9.0_x86.appxsym 3 | -------------------------------------------------------------------------------- /TpmRcDecoder/TpmRcDecoder.Universal/CommandCodes.xaml: -------------------------------------------------------------------------------- 1 |  10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | -------------------------------------------------------------------------------- /TpmRcDecoder/TpmRcDecoder.Universal/LandingPage.xaml: -------------------------------------------------------------------------------- 1 |  11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | TPM RC Decoder 51 | This tool allows to decode return codes from a Trusted Platform Module (TPM). 52 | Return codes from TPM 1.2 and TPM 2.0 are interpreted and a name plus short description 53 | is shown. 54 | 55 | TPM Command Codes 56 | A dictionary of TPM 1.2 and TPM 2.0 commands including a short description. 57 | 58 | TPM Manufacturer Codes 59 | A dictionary of TPM manufacturers. 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | -------------------------------------------------------------------------------- /TpmRcDecoder/TpmRcDecoder.Universal/LandingPage.xaml.cs: -------------------------------------------------------------------------------- 1 | using Windows.Storage; 2 | using Windows.UI.Xaml.Controls; 3 | 4 | // The Blank Page item template is documented at http://go.microsoft.com/fwlink/?LinkId=234238 5 | 6 | namespace TpmRcDecoder.Views 7 | { 8 | /// 9 | /// An empty page that can be used on its own or navigated to within a Frame. 10 | /// 11 | public sealed partial class LandingPage : Page 12 | { 13 | ApplicationDataContainer roamingSettings = null; 14 | const string DontShowLandingPageSetting = "DontShowLandingPage"; 15 | 16 | public LandingPage() 17 | { 18 | this.InitializeComponent(); 19 | 20 | roamingSettings = ApplicationData.Current.RoamingSettings; 21 | } 22 | 23 | private void DontShowLandingPage_Checked(object sender, Windows.UI.Xaml.RoutedEventArgs e) 24 | { 25 | roamingSettings.Values[DontShowLandingPageSetting] = DontShowLandingPage.IsChecked.ToString(); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /TpmRcDecoder/TpmRcDecoder.Universal/Manufacturers.xaml: -------------------------------------------------------------------------------- 1 |  10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | -------------------------------------------------------------------------------- /TpmRcDecoder/TpmRcDecoder.Universal/Manufacturers.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | using System.Collections.Generic; 4 | using System.Globalization; 5 | using Windows.UI.Xaml.Controls; 6 | using Windows.UI.Xaml.Input; 7 | using Windows.UI.Xaml.Navigation; 8 | 9 | // The Blank Page item template is documented at http://go.microsoft.com/fwlink/?LinkId=234238 10 | 11 | namespace TpmRcDecoder 12 | { 13 | public struct TPMManufacturerDescription 14 | { 15 | public uint ID; 16 | public string Name; 17 | public string Description; 18 | 19 | public TPMManufacturerDescription(uint id, string name, string description) 20 | { 21 | ID = id; 22 | Name = name; 23 | Description = description; 24 | } 25 | }; 26 | 27 | /// 28 | /// An empty page that can be used on its own or navigated to within a Frame. 29 | /// 30 | public sealed partial class Manufacturers : Page 31 | { 32 | private readonly NavigationHelper m_NavigationHelper; 33 | private const string m_SettingManufacturerCode = "mfMF"; 34 | private const string m_DefaultDescription = "TPM manufaturer description."; 35 | private const string m_InvalidCommandDescription = "Invalid manufacturer ID."; 36 | private static TPMManufacturerDescription[] m_Manufacturers = 37 | { 38 | new TPMManufacturerDescription( 0x414D4400, "AMD", "AMD"), 39 | new TPMManufacturerDescription( 0x41544D4C, "ATML", "Atmel"), 40 | new TPMManufacturerDescription( 0x4252434D, "BRCM", "Broadcom" ), 41 | new TPMManufacturerDescription( 0x4353434F, "CSCO", "Cisco" ), 42 | new TPMManufacturerDescription( 0x464C5953, "FLYS", "Flyslice Technologies0x46 0x4C 0x59 0x53" ), 43 | new TPMManufacturerDescription( 0x48504500, "HPE", "HPE" ), 44 | new TPMManufacturerDescription( 0x49424D00, "IBM", "IBM" ), 45 | new TPMManufacturerDescription( 0x49465800, "IFX", "Infineon" ), 46 | new TPMManufacturerDescription( 0x494E5443, "INTC", "Intel" ), 47 | new TPMManufacturerDescription( 0x4C454E00, "LEN", "Lenovo" ), 48 | new TPMManufacturerDescription( 0x4D534654, "MSFT", "Microsoft" ), 49 | new TPMManufacturerDescription( 0x4E534D20, "NSM ", "National Semiconductor" ), 50 | new TPMManufacturerDescription( 0x4E545A00, "NTZ", "NationZ" ), 51 | new TPMManufacturerDescription( 0x4E544300, "NTC", "Nuvoton" ), 52 | new TPMManufacturerDescription( 0x51434F4D, "QCOM", "Qualcomm" ), 53 | new TPMManufacturerDescription( 0x534D5343, "SMSC", "SMSC" ), 54 | new TPMManufacturerDescription( 0x53544D20, "STM", "ST Microelectronics" ), 55 | new TPMManufacturerDescription( 0x534D534E, "SMSN", "Samsung" ), 56 | new TPMManufacturerDescription( 0x534E5300, "SNS", "Sinosun" ), 57 | new TPMManufacturerDescription( 0x54584E00, "TXN", "Texas Instruments" ), 58 | new TPMManufacturerDescription( 0x57454300, "WEC", "Winbond" ), 59 | new TPMManufacturerDescription( 0x524F4343, "ROCC", "Fushou Rockchip" ), 60 | new TPMManufacturerDescription( 0x474F4F47, "GOOG", "Google" ), 61 | new TPMManufacturerDescription( 0x564D5700, "VMW", "VMWare" ), 62 | }; 63 | 64 | public class ManufacturerDescriptionComparer : IComparer 65 | { 66 | public int Compare(TPMManufacturerDescription left, TPMManufacturerDescription right) 67 | { 68 | return left.ID.CompareTo(right.ID); 69 | } 70 | } 71 | 72 | public Manufacturers() 73 | { 74 | this.InitializeComponent(); 75 | this.m_NavigationHelper = new NavigationHelper(this); 76 | this.m_NavigationHelper.LoadState += LoadState; 77 | this.m_NavigationHelper.SaveState += SaveState; 78 | 79 | Array.Sort(m_Manufacturers, new ManufacturerDescriptionComparer()); 80 | 81 | ListOfManufacturers.SelectionChanged -= ListOfManufacturers_SelectionChanged; 82 | ListOfManufacturers.Items.Clear(); 83 | foreach (TPMManufacturerDescription descr in m_Manufacturers) 84 | { 85 | ListOfManufacturers.Items.Add(descr.Name); 86 | } 87 | ListOfManufacturers.SelectionChanged += ListOfManufacturers_SelectionChanged; 88 | 89 | ManufacturerCode.Text = ""; 90 | Description.Text = m_DefaultDescription; 91 | 92 | } 93 | 94 | private void SetIndex(int index, UInt32 ManufacturerCode, string commandName, string description) 95 | { 96 | bool setNotification = ListOfManufacturers.SelectedIndex != index; 97 | if (setNotification) 98 | ListOfManufacturers.SelectionChanged -= ListOfManufacturers_SelectionChanged; 99 | ListOfManufacturers.SelectedIndex = index; 100 | Description.Text = string.Format("{0} (0x{1:x} - {1})\n\n", commandName, ManufacturerCode) + description; 101 | if (setNotification) 102 | ListOfManufacturers.SelectionChanged += ListOfManufacturers_SelectionChanged; 103 | } 104 | 105 | private void ManufacturerCode_TextChanged(object sender, TextChangedEventArgs e) 106 | { 107 | string inStr = ManufacturerCode.Text.Trim(); 108 | uint manufacturerCode = ~0u; 109 | if (inStr.StartsWith("0x", StringComparison.CurrentCultureIgnoreCase)) 110 | { 111 | try 112 | { 113 | manufacturerCode = UInt32.Parse(inStr.Substring(2).Trim(), NumberStyles.HexNumber); 114 | } 115 | catch (FormatException) 116 | { } 117 | } 118 | else 119 | { 120 | try 121 | { 122 | manufacturerCode = UInt32.Parse(inStr, NumberStyles.Integer); 123 | } 124 | catch (FormatException) 125 | { } 126 | } 127 | if (manufacturerCode == ~0u) 128 | { 129 | SetIndex(-1, 0, "", m_InvalidCommandDescription); 130 | return; 131 | } 132 | 133 | int index = 0; 134 | foreach (TPMManufacturerDescription descr in m_Manufacturers) 135 | { 136 | if (manufacturerCode == descr.ID) 137 | { 138 | SetIndex(index, descr.ID, descr.Name, descr.Description); 139 | return; 140 | } 141 | index++; 142 | } 143 | 144 | // no matching command found, set defaults 145 | SetIndex(-1, 0, "", m_InvalidCommandDescription); 146 | } 147 | 148 | private void ListOfManufacturers_SelectionChanged(object sender, SelectionChangedEventArgs e) 149 | { 150 | if (ListOfManufacturers.SelectedIndex == -1) 151 | { 152 | return; 153 | } 154 | 155 | uint manufacturerCode = ~0u; 156 | string description = ""; 157 | string commandName = ""; 158 | if (ListOfManufacturers.SelectedIndex < m_Manufacturers.Length) 159 | { 160 | manufacturerCode = m_Manufacturers[ListOfManufacturers.SelectedIndex].ID; 161 | description = m_Manufacturers[ListOfManufacturers.SelectedIndex].Description; 162 | commandName = m_Manufacturers[ListOfManufacturers.SelectedIndex].Name; 163 | } 164 | 165 | ManufacturerCode.TextChanged -= ManufacturerCode_TextChanged; 166 | ManufacturerCode.Text = string.Format("0x{0:x}", manufacturerCode); 167 | Description.Text = string.Format("{0} (0x{1:x} - {1})\n\n", commandName, manufacturerCode) + description; 168 | ManufacturerCode.TextChanged += ManufacturerCode_TextChanged; 169 | } 170 | 171 | #region Save and Restore state 172 | 173 | /// 174 | /// Populates the page with content passed during navigation. Any saved state is also 175 | /// provided when recreating a page from a prior session. 176 | /// 177 | /// 178 | /// The source of the event; typically . 179 | /// 180 | /// Event data that provides both the navigation parameter passed to 181 | /// when this page was initially requested and 182 | /// a dictionary of state preserved by this page during an earlier 183 | /// session. The state will be null the first time a page is visited. 184 | private void LoadState(object sender, LoadStateEventArgs e) 185 | { 186 | if (SuspensionManager.SessionState.ContainsKey(m_SettingManufacturerCode)) 187 | { 188 | ManufacturerCode.Text = (string)SuspensionManager.SessionState[m_SettingManufacturerCode]; 189 | // ListOfManufacturers is automatically set by ManufacturerCode's OnChanged method 190 | // Description is automatically set by ManufacturerCode's OnChanged method 191 | } 192 | } 193 | 194 | /// 195 | /// Preserves state associated with this page in case the application is suspended or the 196 | /// page is discarded from the navigation cache. Values must conform to the serialization 197 | /// requirements of . 198 | /// 199 | /// The source of the event; typically . 200 | /// Event data that provides an empty dictionary to be populated with 201 | /// serializable state. 202 | private void SaveState(object sender, SaveStateEventArgs e) 203 | { 204 | SuspensionManager.SessionState[m_SettingManufacturerCode] = ManufacturerCode.Text; 205 | } 206 | 207 | #endregion 208 | 209 | #region NavigationHelper registration 210 | 211 | /// 212 | /// The methods provided in this section are simply used to allow 213 | /// NavigationHelper to respond to the page's navigation methods. 214 | /// 215 | /// Page specific logic should be placed in event handlers for the 216 | /// 217 | /// and . 218 | /// The navigation parameter is available in the LoadState method 219 | /// in addition to page state preserved during an earlier session. 220 | /// 221 | /// 222 | /// Provides data for navigation methods and event 223 | /// handlers that cannot cancel the navigation request. 224 | /// 225 | protected override void OnNavigatedTo(NavigationEventArgs e) 226 | { 227 | this.m_NavigationHelper.OnNavigatedTo(e); 228 | } 229 | 230 | protected override void OnNavigatedFrom(NavigationEventArgs e) 231 | { 232 | this.m_NavigationHelper.OnNavigatedFrom(e); 233 | } 234 | 235 | #endregion 236 | } 237 | } 238 | -------------------------------------------------------------------------------- /TpmRcDecoder/TpmRcDecoder.Universal/NavMenuItem.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Windows.UI.Xaml.Controls; 3 | 4 | namespace TpmRcDecoder 5 | { 6 | /// 7 | /// Data to represent an item in the nav menu. 8 | /// 9 | public class NavMenuItem 10 | { 11 | public string Label { get; set; } 12 | public Symbol Symbol { get; set; } 13 | public char SymbolAsChar 14 | { 15 | get 16 | { 17 | return (char)this.Symbol; 18 | } 19 | } 20 | 21 | public Type DestPage { get; set; } 22 | public object Arguments { get; set; } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /TpmRcDecoder/TpmRcDecoder.Universal/NavMenuListView.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Windows.System; 3 | using Windows.UI.Core; 4 | using Windows.UI.Xaml; 5 | using Windows.UI.Xaml.Controls; 6 | using Windows.UI.Xaml.Input; 7 | using Windows.UI.Xaml.Media; 8 | using Windows.UI.Xaml.Media.Animation; 9 | 10 | namespace TpmRcDecoder.Controls 11 | { 12 | /// 13 | /// A specialized ListView to represent the items in the navigation menu. 14 | /// 15 | /// 16 | /// This class handles the following: 17 | /// 1. Sizes the panel that hosts the items so they fit in the hosting pane. Otherwise, the keyboard 18 | /// may appear cut off on one side b/c the Pane clips instead of affecting layout. 19 | /// 2. Provides a single selection experience where keyboard focus can move without changing selection. 20 | /// Both the 'Space' and 'Enter' keys will trigger selection. The up/down arrow keys can move 21 | /// keyboard focus without triggering selection. This is different than the default behavior when 22 | /// SelectionMode == Single. The default behavior for a ListView in single selection requires using 23 | /// the Ctrl + arrow key to move keyboard focus without triggering selection. Users won't expect 24 | /// this type of keyboarding model on the nav menu. 25 | /// 26 | public class NavMenuListView : ListView 27 | { 28 | private SplitView splitViewHost; 29 | 30 | public NavMenuListView() 31 | { 32 | this.SelectionMode = ListViewSelectionMode.Single; 33 | this.IsItemClickEnabled = true; 34 | this.ItemClick += ItemClickedHandler; 35 | 36 | // Locate the hosting SplitView control 37 | this.Loaded += (s, a) => 38 | { 39 | var parent = VisualTreeHelper.GetParent(this); 40 | while (parent != null && !(parent is SplitView)) 41 | { 42 | parent = VisualTreeHelper.GetParent(parent); 43 | } 44 | 45 | if (parent != null) 46 | { 47 | this.splitViewHost = parent as SplitView; 48 | 49 | splitViewHost.RegisterPropertyChangedCallback(SplitView.IsPaneOpenProperty, (sender, args) => 50 | { 51 | this.OnPaneToggled(); 52 | }); 53 | 54 | // Call once to ensure we're in the correct state 55 | this.OnPaneToggled(); 56 | } 57 | }; 58 | } 59 | 60 | protected override void OnApplyTemplate() 61 | { 62 | base.OnApplyTemplate(); 63 | 64 | // Remove the entrance animation on the item containers. 65 | for (int i = 0; i < this.ItemContainerTransitions.Count; i++) 66 | { 67 | if (this.ItemContainerTransitions[i] is EntranceThemeTransition) 68 | { 69 | this.ItemContainerTransitions.RemoveAt(i); 70 | } 71 | } 72 | } 73 | 74 | /// 75 | /// Mark the as selected and ensures everything else is not. 76 | /// If the is null then everything is unselected. 77 | /// 78 | /// 79 | public void SetSelectedItem(ListViewItem item) 80 | { 81 | int index = -1; 82 | if (item != null) 83 | { 84 | index = this.IndexFromContainer(item); 85 | } 86 | 87 | for (int i = 0; i < this.Items.Count; i++) 88 | { 89 | var lvi = (ListViewItem)this.ContainerFromIndex(i); 90 | if (i != index) 91 | { 92 | lvi.IsSelected = false; 93 | } 94 | else if (i == index) 95 | { 96 | lvi.IsSelected = true; 97 | } 98 | } 99 | } 100 | 101 | /// 102 | /// Occurs when an item has been selected 103 | /// 104 | public event EventHandler ItemInvoked; 105 | 106 | /// 107 | /// Custom keyboarding logic to enable movement via the arrow keys without triggering selection 108 | /// until a 'Space' or 'Enter' key is pressed. 109 | /// 110 | /// 111 | protected override void OnKeyDown(KeyRoutedEventArgs e) 112 | { 113 | var focusedItem = FocusManager.GetFocusedElement(); 114 | 115 | switch (e.Key) 116 | { 117 | case VirtualKey.Up: 118 | this.TryMoveFocus(FocusNavigationDirection.Up); 119 | e.Handled = true; 120 | break; 121 | 122 | case VirtualKey.Down: 123 | this.TryMoveFocus(FocusNavigationDirection.Down); 124 | e.Handled = true; 125 | break; 126 | 127 | case VirtualKey.Tab: 128 | var shiftKeyState = CoreWindow.GetForCurrentThread().GetKeyState(VirtualKey.Shift); 129 | var shiftKeyDown = (shiftKeyState & CoreVirtualKeyStates.Down) == CoreVirtualKeyStates.Down; 130 | 131 | // If we're on the header item then this will be null and we'll still get the default behavior. 132 | if (focusedItem is ListViewItem) 133 | { 134 | var currentItem = (ListViewItem)focusedItem; 135 | bool onlastitem = currentItem != null && this.IndexFromContainer(currentItem) == this.Items.Count - 1; 136 | bool onfirstitem = currentItem != null && this.IndexFromContainer(currentItem) == 0; 137 | 138 | if (!shiftKeyDown) 139 | { 140 | if (onlastitem) 141 | { 142 | this.TryMoveFocus(FocusNavigationDirection.Next); 143 | } 144 | else 145 | { 146 | this.TryMoveFocus(FocusNavigationDirection.Down); 147 | } 148 | } 149 | else // Shift + Tab 150 | { 151 | if (onfirstitem) 152 | { 153 | this.TryMoveFocus(FocusNavigationDirection.Previous); 154 | } 155 | else 156 | { 157 | this.TryMoveFocus(FocusNavigationDirection.Up); 158 | } 159 | } 160 | } 161 | else if (focusedItem is Control) 162 | { 163 | if (!shiftKeyDown) 164 | { 165 | this.TryMoveFocus(FocusNavigationDirection.Down); 166 | } 167 | else // Shift + Tab 168 | { 169 | this.TryMoveFocus(FocusNavigationDirection.Up); 170 | } 171 | } 172 | 173 | e.Handled = true; 174 | break; 175 | 176 | case VirtualKey.Space: 177 | case VirtualKey.Enter: 178 | // Fire our event using the item with current keyboard focus 179 | this.InvokeItem(focusedItem); 180 | e.Handled = true; 181 | break; 182 | 183 | default: 184 | base.OnKeyDown(e); 185 | break; 186 | } 187 | } 188 | 189 | /// 190 | /// This method is a work-around until the bug in FocusManager.TryMoveFocus is fixed. 191 | /// 192 | /// 193 | private void TryMoveFocus(FocusNavigationDirection direction) 194 | { 195 | if (direction == FocusNavigationDirection.Next || direction == FocusNavigationDirection.Previous) 196 | { 197 | FocusManager.TryMoveFocus(direction); 198 | } 199 | else 200 | { 201 | var control = FocusManager.FindNextFocusableElement(direction) as Control; 202 | if (control != null) 203 | { 204 | control.Focus(FocusState.Programmatic); 205 | } 206 | } 207 | } 208 | 209 | private void ItemClickedHandler(object sender, ItemClickEventArgs e) 210 | { 211 | // Triggered when the item is selected using something other than a keyboard 212 | var item = this.ContainerFromItem(e.ClickedItem); 213 | this.InvokeItem(item); 214 | } 215 | 216 | private void InvokeItem(object focusedItem) 217 | { 218 | this.SetSelectedItem(focusedItem as ListViewItem); 219 | this.ItemInvoked(this, focusedItem as ListViewItem); 220 | 221 | if (this.splitViewHost.IsPaneOpen && ( 222 | this.splitViewHost.DisplayMode == SplitViewDisplayMode.CompactOverlay || 223 | this.splitViewHost.DisplayMode == SplitViewDisplayMode.Overlay)) 224 | { 225 | this.splitViewHost.IsPaneOpen = false; 226 | if (focusedItem is ListViewItem) 227 | { 228 | ((ListViewItem)focusedItem).Focus(FocusState.Programmatic); 229 | } 230 | } 231 | } 232 | 233 | /// 234 | /// Re-size the ListView's Panel when the SplitView is compact so the items 235 | /// will fit within the visible space and correctly display a keyboard focus rect. 236 | /// 237 | private void OnPaneToggled() 238 | { 239 | if (this.splitViewHost.IsPaneOpen) 240 | { 241 | this.ItemsPanelRoot.ClearValue(FrameworkElement.WidthProperty); 242 | this.ItemsPanelRoot.ClearValue(FrameworkElement.HorizontalAlignmentProperty); 243 | } 244 | else if (this.splitViewHost.DisplayMode == SplitViewDisplayMode.CompactInline || 245 | this.splitViewHost.DisplayMode == SplitViewDisplayMode.CompactOverlay) 246 | { 247 | this.ItemsPanelRoot.SetValue(FrameworkElement.WidthProperty, this.splitViewHost.CompactPaneLength); 248 | this.ItemsPanelRoot.SetValue(FrameworkElement.HorizontalAlignmentProperty, HorizontalAlignment.Left); 249 | } 250 | } 251 | } 252 | } 253 | 254 | -------------------------------------------------------------------------------- /TpmRcDecoder/TpmRcDecoder.Universal/NavigationHelper.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using Windows.System; 4 | using Windows.UI.Core; 5 | using Windows.UI.Xaml; 6 | using Windows.UI.Xaml.Controls; 7 | using Windows.UI.Xaml.Navigation; 8 | 9 | namespace TpmRcDecoder 10 | { 11 | /// 12 | /// NavigationHelper aids in navigation between pages. It manages 13 | /// the backstack and integrates SuspensionManager to handle process 14 | /// lifetime management and state management when navigating between pages. 15 | /// 16 | /// 17 | /// To make use of NavigationHelper, follow these two steps or 18 | /// start with a BasicPage or any other Page item template other than BlankPage. 19 | /// 20 | /// 1) Create an instance of the NavigationHelper somewhere such as in the 21 | /// constructor for the page and register a callback for the LoadState and 22 | /// SaveState events. 23 | /// 24 | /// public MyPage() 25 | /// { 26 | /// this.InitializeComponent(); 27 | /// this.m_NavigationHelper = new NavigationHelper(this); 28 | /// this.m_NavigationHelper.LoadState += navigationHelper_LoadState; 29 | /// this.m_NavigationHelper.SaveState += navigationHelper_SaveState; 30 | /// } 31 | /// 32 | /// private void navigationHelper_LoadState(object sender, LoadStateEventArgs e) 33 | /// { } 34 | /// private void navigationHelper_SaveState(object sender, LoadStateEventArgs e) 35 | /// { } 36 | /// 37 | /// 38 | /// 2) Register the page to call into the NavigationManager whenever the page participates 39 | /// in navigation by overriding the 40 | /// and events. 41 | /// 42 | /// protected override void OnNavigatedTo(NavigationEventArgs e) 43 | /// { 44 | /// m_NavigationHelper.OnNavigatedTo(e); 45 | /// } 46 | /// 47 | /// protected override void OnNavigatedFrom(NavigationEventArgs e) 48 | /// { 49 | /// m_NavigationHelper.OnNavigatedFrom(e); 50 | /// } 51 | /// 52 | /// 53 | [Windows.Foundation.Metadata.WebHostHidden] 54 | public class NavigationHelper : DependencyObject 55 | { 56 | private Page Page { get; set; } 57 | private Frame Frame { get { return this.Page.Frame; } } 58 | 59 | /// 60 | /// Initializes a new instance of the class. 61 | /// 62 | /// A reference to the current page used for navigation. 63 | /// This reference allows for frame manipulation. 64 | public NavigationHelper(Page page) 65 | { 66 | this.Page = page; 67 | } 68 | 69 | #region Process lifetime management 70 | 71 | private String _pageKey; 72 | 73 | /// 74 | /// Handle this event to populate the page using content passed 75 | /// during navigation as well as any state that was saved by 76 | /// the SaveState event handler. 77 | /// 78 | public event LoadStateEventHandler LoadState; 79 | /// 80 | /// Handle this event to save state that can be used by 81 | /// the LoadState event handler. Save the state in case 82 | /// the application is suspended or the page is discarded 83 | /// from the navigation cache. 84 | /// 85 | public event SaveStateEventHandler SaveState; 86 | 87 | /// 88 | /// Invoked when this page is about to be displayed in a Frame. 89 | /// This method calls , where all page specific 90 | /// navigation and process lifetime management logic should be placed. 91 | /// 92 | /// Event data that describes how this page was reached. The Parameter 93 | /// property provides the group to be displayed. 94 | public void OnNavigatedTo(NavigationEventArgs e) 95 | { 96 | var frameState = SuspensionManager.SessionStateForFrame(this.Frame); 97 | this._pageKey = "Page-" + this.Frame.BackStackDepth; 98 | 99 | if (e.NavigationMode == NavigationMode.New) 100 | { 101 | // Clear existing state for forward navigation when adding a new page to the 102 | // navigation stack 103 | var nextPageKey = this._pageKey; 104 | int nextPageIndex = this.Frame.BackStackDepth; 105 | while (frameState.Remove(nextPageKey)) 106 | { 107 | nextPageIndex++; 108 | nextPageKey = "Page-" + nextPageIndex; 109 | } 110 | 111 | // Pass the navigation parameter to the new page 112 | if (this.LoadState != null) 113 | { 114 | this.LoadState(this, new LoadStateEventArgs(e.Parameter, null)); 115 | } 116 | } 117 | else 118 | { 119 | // Pass the navigation parameter and preserved page state to the page, using 120 | // the same strategy for loading suspended state and recreating pages discarded 121 | // from cache 122 | if (this.LoadState != null) 123 | { 124 | this.LoadState(this, new LoadStateEventArgs(e.Parameter, (Dictionary)frameState[this._pageKey])); 125 | } 126 | } 127 | } 128 | 129 | /// 130 | /// Invoked when this page will no longer be displayed in a Frame. 131 | /// This method calls , where all page specific 132 | /// navigation and process lifetime management logic should be placed. 133 | /// 134 | /// Event data that describes how this page was reached. The Parameter 135 | /// property provides the group to be displayed. 136 | public void OnNavigatedFrom(NavigationEventArgs e) 137 | { 138 | var frameState = SuspensionManager.SessionStateForFrame(this.Frame); 139 | var pageState = new Dictionary(); 140 | if (this.SaveState != null) 141 | { 142 | this.SaveState(this, new SaveStateEventArgs(pageState)); 143 | } 144 | frameState[_pageKey] = pageState; 145 | } 146 | 147 | #endregion 148 | } 149 | 150 | /// 151 | /// RootFrameNavigationHelper registers for standard mouse and keyboard 152 | /// shortcuts used to go back and forward. There should be only one 153 | /// RootFrameNavigationHelper per view, and it should be associated with the 154 | /// root frame. 155 | /// 156 | /// 157 | /// To make use of RootFrameNavigationHelper, create an instance of the 158 | /// RootNavigationHelper such as in the constructor of your root page. 159 | /// 160 | /// public MyRootPage() 161 | /// { 162 | /// this.InitializeComponent(); 163 | /// this.rootNavigationHelper = new RootNavigationHelper(MyFrame); 164 | /// } 165 | /// 166 | /// 167 | [Windows.Foundation.Metadata.WebHostHidden] 168 | public class RootFrameNavigationHelper 169 | { 170 | private Frame Frame { get; set; } 171 | SystemNavigationManager systemNavigationManager; 172 | 173 | /// 174 | /// Initializes a new instance of the class. 175 | /// 176 | /// A reference to the top-level frame. 177 | /// This reference allows for frame manipulation and to register navigation handlers. 178 | public RootFrameNavigationHelper(Frame rootFrame) 179 | { 180 | this.Frame = rootFrame; 181 | 182 | // Handle keyboard and mouse navigation requests 183 | this.systemNavigationManager = SystemNavigationManager.GetForCurrentView(); 184 | systemNavigationManager.BackRequested += SystemNavigationManager_BackRequested; 185 | UpdateBackButton(); 186 | 187 | // Listen to the window directly so we will respond to hotkeys regardless 188 | // of which element has focus. 189 | Window.Current.CoreWindow.Dispatcher.AcceleratorKeyActivated += 190 | CoreDispatcher_AcceleratorKeyActivated; 191 | Window.Current.CoreWindow.PointerPressed += 192 | this.CoreWindow_PointerPressed; 193 | 194 | // Update the Back button whenever a navigation occurs. 195 | this.Frame.Navigated += (s, e) => UpdateBackButton(); 196 | } 197 | 198 | private bool TryGoBack() 199 | { 200 | bool navigated = false; 201 | if (this.Frame.CanGoBack) 202 | { 203 | this.Frame.GoBack(); 204 | navigated = true; 205 | } 206 | return navigated; 207 | } 208 | 209 | private bool TryGoForward() 210 | { 211 | bool navigated = false; 212 | if (this.Frame.CanGoForward) 213 | { 214 | this.Frame.GoForward(); 215 | navigated = true; 216 | } 217 | return navigated; 218 | } 219 | 220 | private void SystemNavigationManager_BackRequested(object sender, BackRequestedEventArgs e) 221 | { 222 | if (!e.Handled) 223 | { 224 | e.Handled = TryGoBack(); 225 | } 226 | } 227 | 228 | private void UpdateBackButton() 229 | { 230 | systemNavigationManager.AppViewBackButtonVisibility = 231 | this.Frame.CanGoBack ? AppViewBackButtonVisibility.Visible : AppViewBackButtonVisibility.Collapsed; 232 | } 233 | 234 | /// 235 | /// Invoked on every keystroke, including system keys such as Alt key combinations. 236 | /// Used to detect keyboard navigation between pages even when the page itself 237 | /// doesn't have focus. 238 | /// 239 | /// Instance that triggered the event. 240 | /// Event data describing the conditions that led to the event. 241 | private void CoreDispatcher_AcceleratorKeyActivated(CoreDispatcher sender, 242 | AcceleratorKeyEventArgs e) 243 | { 244 | var virtualKey = e.VirtualKey; 245 | 246 | // Only investigate further when Left, Right, or the dedicated Previous or Next keys 247 | // are pressed 248 | if ((e.EventType == CoreAcceleratorKeyEventType.SystemKeyDown || 249 | e.EventType == CoreAcceleratorKeyEventType.KeyDown) && 250 | (virtualKey == VirtualKey.Left || virtualKey == VirtualKey.Right || 251 | (int)virtualKey == 166 || (int)virtualKey == 167)) 252 | { 253 | var coreWindow = Window.Current.CoreWindow; 254 | var downState = CoreVirtualKeyStates.Down; 255 | bool menuKey = (coreWindow.GetKeyState(VirtualKey.Menu) & downState) == downState; 256 | bool controlKey = (coreWindow.GetKeyState(VirtualKey.Control) & downState) == downState; 257 | bool shiftKey = (coreWindow.GetKeyState(VirtualKey.Shift) & downState) == downState; 258 | bool noModifiers = !menuKey && !controlKey && !shiftKey; 259 | bool onlyAlt = menuKey && !controlKey && !shiftKey; 260 | 261 | if (((int)virtualKey == 166 && noModifiers) || 262 | (virtualKey == VirtualKey.Left && onlyAlt)) 263 | { 264 | // When the previous key or Alt+Left are pressed navigate back 265 | e.Handled = TryGoBack(); 266 | } 267 | else if (((int)virtualKey == 167 && noModifiers) || 268 | (virtualKey == VirtualKey.Right && onlyAlt)) 269 | { 270 | // When the next key or Alt+Right are pressed navigate forward 271 | e.Handled = TryGoForward(); 272 | } 273 | } 274 | } 275 | 276 | /// 277 | /// Invoked on every mouse click, touch screen tap, or equivalent interaction. 278 | /// Used to detect browser-style next and previous mouse button clicks 279 | /// to navigate between pages. 280 | /// 281 | /// Instance that triggered the event. 282 | /// Event data describing the conditions that led to the event. 283 | private void CoreWindow_PointerPressed(CoreWindow sender, 284 | PointerEventArgs e) 285 | { 286 | var properties = e.CurrentPoint.Properties; 287 | 288 | // Ignore button chords with the left, right, and middle buttons 289 | if (properties.IsLeftButtonPressed || properties.IsRightButtonPressed || 290 | properties.IsMiddleButtonPressed) 291 | return; 292 | 293 | // If back or foward are pressed (but not both) navigate appropriately 294 | bool backPressed = properties.IsXButton1Pressed; 295 | bool forwardPressed = properties.IsXButton2Pressed; 296 | if (backPressed ^ forwardPressed) 297 | { 298 | e.Handled = true; 299 | if (backPressed) this.TryGoBack(); 300 | if (forwardPressed) this.TryGoForward(); 301 | } 302 | } 303 | } 304 | 305 | /// 306 | /// Represents the method that will handle the event 307 | /// 308 | public delegate void LoadStateEventHandler(object sender, LoadStateEventArgs e); 309 | /// 310 | /// Represents the method that will handle the event 311 | /// 312 | public delegate void SaveStateEventHandler(object sender, SaveStateEventArgs e); 313 | 314 | /// 315 | /// Class used to hold the event data required when a page attempts to load state. 316 | /// 317 | public class LoadStateEventArgs : EventArgs 318 | { 319 | /// 320 | /// The parameter value passed to 321 | /// when this page was initially requested. 322 | /// 323 | public Object NavigationParameter { get; private set; } 324 | /// 325 | /// A dictionary of state preserved by this page during an earlier 326 | /// session. This will be null the first time a page is visited. 327 | /// 328 | public Dictionary PageState { get; private set; } 329 | 330 | /// 331 | /// Initializes a new instance of the class. 332 | /// 333 | /// 334 | /// The parameter value passed to 335 | /// when this page was initially requested. 336 | /// 337 | /// 338 | /// A dictionary of state preserved by this page during an earlier 339 | /// session. This will be null the first time a page is visited. 340 | /// 341 | public LoadStateEventArgs(Object navigationParameter, Dictionary pageState) 342 | : base() 343 | { 344 | this.NavigationParameter = navigationParameter; 345 | this.PageState = pageState; 346 | } 347 | } 348 | /// 349 | /// Class used to hold the event data required when a page attempts to save state. 350 | /// 351 | public class SaveStateEventArgs : EventArgs 352 | { 353 | /// 354 | /// An empty dictionary to be populated with serializable state. 355 | /// 356 | public Dictionary PageState { get; private set; } 357 | 358 | /// 359 | /// Initializes a new instance of the class. 360 | /// 361 | /// An empty dictionary to be populated with serializable state. 362 | public SaveStateEventArgs(Dictionary pageState) 363 | : base() 364 | { 365 | this.PageState = pageState; 366 | } 367 | } 368 | } -------------------------------------------------------------------------------- /TpmRcDecoder/TpmRcDecoder.Universal/Package.StoreAssociation.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | CN=F0305663-AD67-4176-BA71-C858A3680A99 4 | Ronald Aigner 5 | http://www.w3.org/2001/04/xmlenc#sha256 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | 238 | 239 | 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 | 250 | 251 | 252 | 253 | 254 | 255 | 256 | 257 | 258 | 259 | 260 | 261 | 262 | 263 | 264 | 265 | 266 | 267 | 268 | 269 | 270 | 271 | 272 | 273 | 274 | 275 | 276 | 277 | 278 | 279 | 280 | 281 | 282 | 283 | 284 | 285 | 286 | 287 | 288 | 289 | 290 | 291 | 292 | 293 | 294 | 295 | 296 | 297 | 298 | 299 | 300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308 | 309 | 310 | 311 | 312 | 313 | 314 | 315 | 316 | 317 | 318 | 319 | 320 | 321 | 322 | 323 | 324 | 325 | 326 | 327 | 328 | 329 | 330 | 331 | 332 | 333 | 334 | 335 | 336 | 337 | 338 | 339 | 340 | 341 | 342 | 343 | 344 | 345 | 346 | 347 | 348 | 349 | 350 | 351 | 352 | 353 | 354 | 355 | 356 | 357 | 358 | 359 | 360 | 361 | 15288RonaldAigner.TPMReturnCodeDecoder 362 | 363 | TPM Return Code Decoder 364 | 365 | 366 | 367 | 15288RonaldAigner.HashCalculator2 368 | 369 | 370 | -------------------------------------------------------------------------------- /TpmRcDecoder/TpmRcDecoder.Universal/Package.appxmanifest: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | TPM Return Code Decoder 7 | Ronald Aigner 8 | Assets\StoreLogo.png 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /TpmRcDecoder/TpmRcDecoder.Universal/PageHeader.xaml: -------------------------------------------------------------------------------- 1 |  16 | 17 | 18 | 19 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /TpmRcDecoder/TpmRcDecoder.Universal/PageHeader.xaml.cs: -------------------------------------------------------------------------------- 1 | using Windows.Foundation; 2 | using Windows.UI.Xaml; 3 | using Windows.UI.Xaml.Controls; 4 | 5 | // The User Control item template is documented at http://go.microsoft.com/fwlink/?LinkId=234236 6 | 7 | namespace TpmRcDecoder.Controls 8 | { 9 | public sealed partial class PageHeader : UserControl 10 | { 11 | public PageHeader() 12 | { 13 | this.InitializeComponent(); 14 | 15 | this.Loaded += (s, a) => 16 | { 17 | AppShell.Current.TogglePaneButtonRectChanged += Current_TogglePaneButtonSizeChanged; 18 | this.titleBar.Margin = new Thickness(AppShell.Current.TogglePaneButtonRect.Right, 0, 0, 0); 19 | }; 20 | } 21 | 22 | private void Current_TogglePaneButtonSizeChanged(AppShell sender, Rect e) 23 | { 24 | this.titleBar.Margin = new Thickness(e.Right, 0, 0, 0); 25 | } 26 | 27 | public UIElement HeaderContent 28 | { 29 | get { return (UIElement)GetValue(HeaderContentProperty); } 30 | set { SetValue(HeaderContentProperty, value); } 31 | } 32 | 33 | // Using a DependencyProperty as the backing store for HeaderContent. This enables animation, styling, binding, etc... 34 | public static readonly DependencyProperty HeaderContentProperty = 35 | DependencyProperty.Register("HeaderContent", typeof(UIElement), typeof(PageHeader), new PropertyMetadata(DependencyProperty.UnsetValue)); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /TpmRcDecoder/TpmRcDecoder.Universal/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("TpmRcDecoder")] 9 | [assembly: AssemblyDescription("TPM Return Code Decoder")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("Microsoft Corp.")] 12 | [assembly: AssemblyProduct("TpmRcDecoder")] 13 | [assembly: AssemblyCopyright("Copyright © 2020")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Version information for an assembly consists of the following four values: 18 | // 19 | // Major Version 20 | // Minor Version 21 | // Build Number 22 | // Revision 23 | // 24 | // You can specify all the values or you can default the Build and Revision Numbers 25 | // by using the '*' as shown below: 26 | // [assembly: AssemblyVersion("1.0.*")] 27 | [assembly: AssemblyVersion("1.0.0.0")] 28 | [assembly: AssemblyFileVersion("1.0.0.0")] 29 | [assembly: ComVisible(false)] -------------------------------------------------------------------------------- /TpmRcDecoder/TpmRcDecoder.Universal/Properties/Default.rd.xml: -------------------------------------------------------------------------------- 1 | 17 | 18 | 19 | 20 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /TpmRcDecoder/TpmRcDecoder.Universal/RcDecoder.xaml: -------------------------------------------------------------------------------- 1 |  11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | -------------------------------------------------------------------------------- /TpmRcDecoder/TpmRcDecoder.Universal/RcDecoder.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Globalization; 3 | using Windows.UI.Xaml; 4 | using Windows.UI.Xaml.Controls; 5 | using Windows.UI.Xaml.Input; 6 | using Windows.UI.Xaml.Navigation; 7 | 8 | // The Blank Page item template is documented at http://go.microsoft.com/fwlink/?LinkId=402352&clcid=0x409 9 | 10 | namespace TpmRcDecoder 11 | { 12 | /// 13 | /// An empty page that can be used on its own or navigated to within a Frame. 14 | /// 15 | public sealed partial class RcDecoder : Page 16 | { 17 | private readonly NavigationHelper m_NavigationHelper; 18 | private const string m_SettingReturnCode = "rcRC"; 19 | private const string m_InvalidNumberFormat = "Could not parse return code. Please use either decimal or hexadecimal format.\n" 20 | + "For instance: \"143\" or \"0x8f\"\n"; 21 | 22 | public RcDecoder() 23 | { 24 | this.InitializeComponent(); 25 | this.m_NavigationHelper = new NavigationHelper(this); 26 | this.m_NavigationHelper.LoadState += LoadState; 27 | this.m_NavigationHelper.SaveState += SaveState; 28 | } 29 | 30 | private void GenerateOutput() 31 | { 32 | string inStr = Input.Text.Trim(); 33 | uint input = ~0u; 34 | if (inStr.StartsWith("0x", StringComparison.CurrentCultureIgnoreCase)) 35 | { 36 | try 37 | { 38 | input = UInt32.Parse(inStr.Substring(2).Trim(), NumberStyles.HexNumber); 39 | } 40 | catch (FormatException) 41 | { } 42 | } 43 | else 44 | { 45 | try 46 | { 47 | input = UInt32.Parse(inStr, NumberStyles.Integer); 48 | } 49 | catch (FormatException) 50 | { } 51 | } 52 | if (input == ~0u) 53 | { 54 | Output.Text = m_InvalidNumberFormat; 55 | return; 56 | } 57 | 58 | Decoder decoder = new Decoder(); 59 | Output.Text = decoder.Decode(string.Format("{0:x}", input)); 60 | } 61 | 62 | private void MainPage_KeyDown(object sender, KeyRoutedEventArgs e) 63 | { 64 | switch (e.Key) 65 | { 66 | case Windows.System.VirtualKey.Enter: 67 | Input_TextChanged(sender, null); 68 | break; 69 | } 70 | } 71 | 72 | private void Input_TextChanged(object sender, TextChangedEventArgs e) 73 | { 74 | GenerateOutput(); 75 | } 76 | 77 | #region Save and Restore state 78 | 79 | /// 80 | /// Populates the page with content passed during navigation. Any saved state is also 81 | /// provided when recreating a page from a prior session. 82 | /// 83 | /// 84 | /// The source of the event; typically . 85 | /// 86 | /// Event data that provides both the navigation parameter passed to 87 | /// when this page was initially requested and 88 | /// a dictionary of state preserved by this page during an earlier 89 | /// session. The state will be null the first time a page is visited. 90 | private void LoadState(object sender, LoadStateEventArgs e) 91 | { 92 | if (SuspensionManager.SessionState.ContainsKey(m_SettingReturnCode)) 93 | { 94 | Input.Text = (string)SuspensionManager.SessionState[m_SettingReturnCode]; 95 | GenerateOutput(); 96 | } 97 | } 98 | 99 | /// 100 | /// Preserves state associated with this page in case the application is suspended or the 101 | /// page is discarded from the navigation cache. Values must conform to the serialization 102 | /// requirements of . 103 | /// 104 | /// The source of the event; typically . 105 | /// Event data that provides an empty dictionary to be populated with 106 | /// serializable state. 107 | private void SaveState(object sender, SaveStateEventArgs e) 108 | { 109 | SuspensionManager.SessionState[m_SettingReturnCode] = Input.Text; 110 | } 111 | 112 | #endregion 113 | 114 | #region NavigationHelper registration 115 | 116 | /// 117 | /// The methods provided in this section are simply used to allow 118 | /// NavigationHelper to respond to the page's navigation methods. 119 | /// 120 | /// Page specific logic should be placed in event handlers for the 121 | /// 122 | /// and . 123 | /// The navigation parameter is available in the LoadState method 124 | /// in addition to page state preserved during an earlier session. 125 | /// 126 | /// 127 | /// Provides data for navigation methods and event 128 | /// handlers that cannot cancel the navigation request. 129 | /// 130 | protected override void OnNavigatedTo(NavigationEventArgs e) 131 | { 132 | this.m_NavigationHelper.OnNavigatedTo(e); 133 | 134 | string input = e.Parameter as string; 135 | if (!string.IsNullOrEmpty(input)) 136 | { 137 | Input.Text = input; 138 | 139 | Decoder decoder = new Decoder(); 140 | Output.Text = decoder.Decode(input); 141 | } 142 | } 143 | 144 | protected override void OnNavigatedFrom(NavigationEventArgs e) 145 | { 146 | this.m_NavigationHelper.OnNavigatedFrom(e); 147 | } 148 | 149 | #endregion 150 | 151 | } 152 | } 153 | -------------------------------------------------------------------------------- /TpmRcDecoder/TpmRcDecoder.Universal/Settings.xaml: -------------------------------------------------------------------------------- 1 |  10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | -------------------------------------------------------------------------------- /TpmRcDecoder/TpmRcDecoder.Universal/Settings.xaml.cs: -------------------------------------------------------------------------------- 1 | using Windows.Storage; 2 | using Windows.UI.Xaml; 3 | using Windows.UI.Xaml.Controls; 4 | 5 | // The Blank Page item template is documented at http://go.microsoft.com/fwlink/?LinkId=234238 6 | 7 | namespace TpmRcDecoder.Views 8 | { 9 | /// 10 | /// An empty page that can be used on its own or navigated to within a Frame. 11 | /// 12 | public sealed partial class Settings : Page 13 | { 14 | ApplicationDataContainer roamingSettings = null; 15 | const string DontShowLandingPageSetting = "DontShowLandingPage"; 16 | 17 | public Settings() 18 | { 19 | this.InitializeComponent(); 20 | 21 | roamingSettings = ApplicationData.Current.RoamingSettings; 22 | 23 | if (roamingSettings.Values[DontShowLandingPageSetting] != null && 24 | roamingSettings.Values[DontShowLandingPageSetting].Equals(true.ToString())) 25 | { 26 | DontShowLandingPage.IsChecked = true; 27 | } 28 | else 29 | { 30 | DontShowLandingPage.IsChecked = false; 31 | } 32 | } 33 | 34 | private void DontShowLandingPage_Checked(object sender, RoutedEventArgs e) 35 | { 36 | roamingSettings.Values[DontShowLandingPageSetting] = DontShowLandingPage.IsChecked.ToString(); 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /TpmRcDecoder/TpmRcDecoder.Universal/SuspensionManager.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Runtime.Serialization; 5 | using System.Threading.Tasks; 6 | using Windows.Storage; 7 | using Windows.Storage.Streams; 8 | using Windows.UI.Xaml; 9 | using Windows.UI.Xaml.Controls; 10 | 11 | namespace TpmRcDecoder 12 | { 13 | /// 14 | /// SuspensionManager captures global session state to simplify process lifetime management 15 | /// for an application. Note that session state will be automatically cleared under a variety 16 | /// of conditions and should only be used to store information that would be convenient to 17 | /// carry across sessions, but that should be discarded when an application crashes or is 18 | /// upgraded. 19 | /// 20 | internal sealed class SuspensionManager 21 | { 22 | private static Dictionary _sessionState = new Dictionary(); 23 | private static List _knownTypes = new List(); 24 | private const string sessionStateFilename = "_sessionState.xml"; 25 | 26 | /// 27 | /// Provides access to global session state for the current session. This state is 28 | /// serialized by and restored by 29 | /// , so values must be serializable by 30 | /// and should be as compact as possible. Strings 31 | /// and other self-contained data types are strongly recommended. 32 | /// 33 | public static Dictionary SessionState 34 | { 35 | get { return _sessionState; } 36 | } 37 | 38 | /// 39 | /// List of custom types provided to the when 40 | /// reading and writing session state. Initially empty, additional types may be 41 | /// added to customize the serialization process. 42 | /// 43 | public static List KnownTypes 44 | { 45 | get { return _knownTypes; } 46 | } 47 | 48 | /// 49 | /// Save the current . Any instances 50 | /// registered with will also preserve their current 51 | /// navigation stack, which in turn gives their active an opportunity 52 | /// to save its state. 53 | /// 54 | /// An asynchronous task that reflects when session state has been saved. 55 | public static async Task SaveAsync() 56 | { 57 | try 58 | { 59 | // Save the navigation state for all registered frames 60 | foreach (var weakFrameReference in _registeredFrames) 61 | { 62 | Frame frame; 63 | if (weakFrameReference.TryGetTarget(out frame)) 64 | { 65 | SaveFrameNavigationState(frame); 66 | } 67 | } 68 | 69 | // Serialize the session state synchronously to avoid asynchronous access to shared 70 | // state 71 | MemoryStream sessionData = new MemoryStream(); 72 | DataContractSerializer serializer = new DataContractSerializer(typeof(Dictionary), _knownTypes); 73 | serializer.WriteObject(sessionData, _sessionState); 74 | 75 | // Get an output stream for the SessionState file and write the state asynchronously 76 | StorageFile file = await ApplicationData.Current.LocalFolder.CreateFileAsync(sessionStateFilename, CreationCollisionOption.ReplaceExisting); 77 | using (Stream fileStream = await file.OpenStreamForWriteAsync()) 78 | { 79 | sessionData.Seek(0, SeekOrigin.Begin); 80 | await sessionData.CopyToAsync(fileStream); 81 | } 82 | } 83 | catch (Exception e) 84 | { 85 | throw new SuspensionManagerException(e); 86 | } 87 | } 88 | 89 | /// 90 | /// Restores previously saved . Any instances 91 | /// registered with will also restore their prior navigation 92 | /// state, which in turn gives their active an opportunity restore its 93 | /// state. 94 | /// 95 | /// An optional key that identifies the type of session. 96 | /// This can be used to distinguish between multiple application launch scenarios. 97 | /// An asynchronous task that reflects when session state has been read. The 98 | /// content of should not be relied upon until this task 99 | /// completes. 100 | public static async Task RestoreAsync(String sessionBaseKey = null) 101 | { 102 | _sessionState = new Dictionary(); 103 | 104 | try 105 | { 106 | // Get the input stream for the SessionState file 107 | StorageFile file = await ApplicationData.Current.LocalFolder.GetFileAsync(sessionStateFilename); 108 | using (IInputStream inStream = await file.OpenSequentialReadAsync()) 109 | { 110 | // Deserialize the Session State 111 | DataContractSerializer serializer = new DataContractSerializer(typeof(Dictionary), _knownTypes); 112 | _sessionState = (Dictionary)serializer.ReadObject(inStream.AsStreamForRead()); 113 | } 114 | 115 | // Restore any registered frames to their saved state 116 | foreach (var weakFrameReference in _registeredFrames) 117 | { 118 | Frame frame; 119 | if (weakFrameReference.TryGetTarget(out frame) && (string)frame.GetValue(FrameSessionBaseKeyProperty) == sessionBaseKey) 120 | { 121 | frame.ClearValue(FrameSessionStateProperty); 122 | RestoreFrameNavigationState(frame); 123 | } 124 | } 125 | } 126 | catch (Exception e) 127 | { 128 | throw new SuspensionManagerException(e); 129 | } 130 | } 131 | 132 | private static DependencyProperty FrameSessionStateKeyProperty = 133 | DependencyProperty.RegisterAttached("_FrameSessionStateKey", typeof(String), typeof(SuspensionManager), null); 134 | private static DependencyProperty FrameSessionBaseKeyProperty = 135 | DependencyProperty.RegisterAttached("_FrameSessionBaseKeyParams", typeof(String), typeof(SuspensionManager), null); 136 | private static DependencyProperty FrameSessionStateProperty = 137 | DependencyProperty.RegisterAttached("_FrameSessionState", typeof(Dictionary), typeof(SuspensionManager), null); 138 | private static List> _registeredFrames = new List>(); 139 | 140 | /// 141 | /// Registers a instance to allow its navigation history to be saved to 142 | /// and restored from . Frames should be registered once 143 | /// immediately after creation if they will participate in session state management. Upon 144 | /// registration if state has already been restored for the specified key 145 | /// the navigation history will immediately be restored. Subsequent invocations of 146 | /// will also restore navigation history. 147 | /// 148 | /// An instance whose navigation history should be managed by 149 | /// 150 | /// A unique key into used to 151 | /// store navigation-related information. 152 | /// An optional key that identifies the type of session. 153 | /// This can be used to distinguish between multiple application launch scenarios. 154 | public static void RegisterFrame(Frame frame, String sessionStateKey, String sessionBaseKey = null) 155 | { 156 | if (frame.GetValue(FrameSessionStateKeyProperty) != null) 157 | { 158 | throw new InvalidOperationException("Frames can only be registered to one session state key"); 159 | } 160 | 161 | if (frame.GetValue(FrameSessionStateProperty) != null) 162 | { 163 | throw new InvalidOperationException("Frames must be either be registered before accessing frame session state, or not registered at all"); 164 | } 165 | 166 | if (!string.IsNullOrEmpty(sessionBaseKey)) 167 | { 168 | frame.SetValue(FrameSessionBaseKeyProperty, sessionBaseKey); 169 | sessionStateKey = sessionBaseKey + "_" + sessionStateKey; 170 | } 171 | 172 | // Use a dependency property to associate the session key with a frame, and keep a list of frames whose 173 | // navigation state should be managed 174 | frame.SetValue(FrameSessionStateKeyProperty, sessionStateKey); 175 | _registeredFrames.Add(new WeakReference(frame)); 176 | 177 | // Check to see if navigation state can be restored 178 | RestoreFrameNavigationState(frame); 179 | } 180 | 181 | /// 182 | /// Disassociates a previously registered by 183 | /// from . Any navigation state previously captured will be 184 | /// removed. 185 | /// 186 | /// An instance whose navigation history should no longer be 187 | /// managed. 188 | public static void UnregisterFrame(Frame frame) 189 | { 190 | // Remove session state and remove the frame from the list of frames whose navigation 191 | // state will be saved (along with any weak references that are no longer reachable) 192 | SessionState.Remove((String)frame.GetValue(FrameSessionStateKeyProperty)); 193 | _registeredFrames.RemoveAll((weakFrameReference) => 194 | { 195 | Frame testFrame; 196 | return !weakFrameReference.TryGetTarget(out testFrame) || testFrame == frame; 197 | }); 198 | } 199 | 200 | /// 201 | /// Provides storage for session state associated with the specified . 202 | /// Frames that have been previously registered with have 203 | /// their session state saved and restored automatically as a part of the global 204 | /// . Frames that are not registered have transient state 205 | /// that can still be useful when restoring pages that have been discarded from the 206 | /// navigation cache. 207 | /// 208 | /// Apps may choose to rely on to manage 209 | /// page-specific state instead of working with frame session state directly. 210 | /// The instance for which session state is desired. 211 | /// A collection of state subject to the same serialization mechanism as 212 | /// . 213 | public static Dictionary SessionStateForFrame(Frame frame) 214 | { 215 | var frameState = (Dictionary)frame.GetValue(FrameSessionStateProperty); 216 | 217 | if (frameState == null) 218 | { 219 | var frameSessionKey = (String)frame.GetValue(FrameSessionStateKeyProperty); 220 | if (frameSessionKey != null) 221 | { 222 | // Registered frames reflect the corresponding session state 223 | if (!_sessionState.ContainsKey(frameSessionKey)) 224 | { 225 | _sessionState[frameSessionKey] = new Dictionary(); 226 | } 227 | frameState = (Dictionary)_sessionState[frameSessionKey]; 228 | } 229 | else 230 | { 231 | // Frames that aren't registered have transient state 232 | frameState = new Dictionary(); 233 | } 234 | frame.SetValue(FrameSessionStateProperty, frameState); 235 | } 236 | return frameState; 237 | } 238 | 239 | private static void RestoreFrameNavigationState(Frame frame) 240 | { 241 | var frameState = SessionStateForFrame(frame); 242 | if (frameState.ContainsKey("Navigation")) 243 | { 244 | frame.SetNavigationState((String)frameState["Navigation"]); 245 | } 246 | } 247 | 248 | private static void SaveFrameNavigationState(Frame frame) 249 | { 250 | var frameState = SessionStateForFrame(frame); 251 | frameState["Navigation"] = frame.GetNavigationState(); 252 | } 253 | } 254 | public class SuspensionManagerException : Exception 255 | { 256 | public SuspensionManagerException() 257 | { 258 | } 259 | 260 | public SuspensionManagerException(Exception e) 261 | : base("SuspensionManager failed", e) 262 | { 263 | 264 | } 265 | } 266 | } 267 | -------------------------------------------------------------------------------- /TpmRcDecoder/TpmRcDecoder.Universal/TpmRcDecoder.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | x86 7 | {6BA11D1B-9AAB-4FA8-9612-C3E5B941DC18} 8 | AppContainerExe 9 | Properties 10 | TpmRcDecoder.Universal 11 | TpmRcDecoder.Universal 12 | en-US 13 | UAP 14 | 10.0.19041.0 15 | 10.0.15063.0 16 | 14 17 | 512 18 | {A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 19 | 20 | 21 | True 22 | Always 23 | x86|x64|arm 24 | 41A41BA5073A55E873D7F7150E718211BFF51409 25 | 760c48098bf84f1e98760be5bf0b9fd0 26 | win10;win10-arm64;win10-arm64-aot;win10-arm;win10-arm-aot;win10-x86;win10-x86-aot;win10-x64;win10-x64-aot 27 | False 28 | 0 29 | OnApplicationRun 30 | True 31 | SHA256 32 | True 33 | 0 34 | 35 | 36 | true 37 | bin\x86\Debug\ 38 | DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP 39 | ;2008 40 | full 41 | x86 42 | false 43 | prompt 44 | true 45 | 46 | 47 | bin\x86\Release\ 48 | TRACE;NETFX_CORE;WINDOWS_UWP 49 | true 50 | ;2008 51 | pdbonly 52 | x86 53 | false 54 | prompt 55 | true 56 | true 57 | 58 | 59 | true 60 | bin\ARM\Debug\ 61 | DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP 62 | ;2008 63 | full 64 | ARM 65 | false 66 | prompt 67 | true 68 | 69 | 70 | bin\ARM\Release\ 71 | TRACE;NETFX_CORE;WINDOWS_UWP 72 | true 73 | ;2008 74 | pdbonly 75 | ARM 76 | false 77 | prompt 78 | true 79 | true 80 | 81 | 82 | true 83 | bin\x64\Debug\ 84 | DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP 85 | ;2008 86 | full 87 | x64 88 | false 89 | prompt 90 | true 91 | 92 | 93 | bin\x64\Release\ 94 | TRACE;NETFX_CORE;WINDOWS_UWP 95 | true 96 | ;2008 97 | pdbonly 98 | x64 99 | false 100 | prompt 101 | true 102 | true 103 | 104 | 105 | true 106 | bin\Debug\ 107 | DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP;CODE_ANALYSIS 108 | ;2008 109 | true 110 | full 111 | AnyCPU 112 | false 113 | prompt 114 | MinimumRecommendedRules.ruleset 115 | true 116 | 117 | 118 | bin\Release\ 119 | TRACE;NETFX_CORE;WINDOWS_UWP;CODE_ANALYSIS 120 | true 121 | ;2008 122 | true 123 | pdbonly 124 | AnyCPU 125 | false 126 | prompt 127 | MinimumRecommendedRules.ruleset 128 | true 129 | 130 | 131 | 132 | 133 | PreserveNewest 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | PreserveNewest 157 | Designer 158 | 159 | 160 | 161 | 162 | App.xaml 163 | 164 | 165 | AppShell.xaml 166 | 167 | 168 | CommandCodes.xaml 169 | 170 | 171 | 172 | LandingPage.xaml 173 | 174 | 175 | Manufacturers.xaml 176 | 177 | 178 | RcDecoder.xaml 179 | 180 | 181 | 182 | 183 | 184 | PageHeader.xaml 185 | 186 | 187 | 188 | Settings.xaml 189 | 190 | 191 | 192 | 193 | 194 | Designer 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | MSBuild:Compile 214 | Designer 215 | 216 | 217 | MSBuild:Compile 218 | Designer 219 | 220 | 221 | Designer 222 | MSBuild:Compile 223 | 224 | 225 | MSBuild:Compile 226 | Designer 227 | 228 | 229 | MSBuild:Compile 230 | Designer 231 | 232 | 233 | MSBuild:Compile 234 | Designer 235 | 236 | 237 | Designer 238 | MSBuild:Compile 239 | 240 | 241 | MSBuild:Compile 242 | Designer 243 | 244 | 245 | 246 | 247 | 1.0.0 248 | 249 | 250 | 1.0.0 251 | 252 | 253 | 1.0.0 254 | 255 | 256 | 5.0.0 257 | 258 | 259 | 260 | 14.0 261 | 262 | 263 | 270 | -------------------------------------------------------------------------------- /TpmRcDecoder/TpmRcDecoder.Universal/VoiceCommands.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | TPM error 5 | decode error 6 | 7 | 8 | decode TPM error code 9 | decode [TPM] return code {errorCodeSearch} 10 | decode error [code] {errorCodeSearch} 11 | decode {builtin:AppName} code {errorCodeSearch} 12 | Decoding return code {errorCodeSearch} 13 | 14 | 15 | 16 | 17 | 18 | 128 19 | 80290128 20 | 101 21 | 22 | 23 | 24 | Number 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /TpmRcDecoder/TpmRcDecoder.Universal/_pkginfo.txt: -------------------------------------------------------------------------------- 1 | C:\Users\raigner\Source\Repos\TpmRCDecoder\TpmRcDecoder\TpmRcDecoder.Universal\bin\ARM\Release\Upload\TpmRcDecoder_1.7.5.0\TpmRcDecoder_1.7.5.0_x86_x64_arm.appxbundle 2 | -------------------------------------------------------------------------------- /TpmRcDecoder/TpmRcDecoder.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.30406.217 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TpmRcDecoder", "TpmRcDecoder.Universal\TpmRcDecoder.csproj", "{6BA11D1B-9AAB-4FA8-9612-C3E5B941DC18}" 7 | EndProject 8 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{54472369-9578-4468-B0E9-57E92AC737A1}" 9 | ProjectSection(SolutionItems) = preProject 10 | ..\LICENSE.txt = ..\LICENSE.txt 11 | ..\README.md = ..\README.md 12 | EndProjectSection 13 | EndProject 14 | Global 15 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 16 | Debug|Any CPU = Debug|Any CPU 17 | Debug|ARM = Debug|ARM 18 | Debug|x64 = Debug|x64 19 | Debug|x86 = Debug|x86 20 | Release|Any CPU = Release|Any CPU 21 | Release|ARM = Release|ARM 22 | Release|x64 = Release|x64 23 | Release|x86 = Release|x86 24 | EndGlobalSection 25 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 26 | {6BA11D1B-9AAB-4FA8-9612-C3E5B941DC18}.Debug|Any CPU.ActiveCfg = Debug|x64 27 | {6BA11D1B-9AAB-4FA8-9612-C3E5B941DC18}.Debug|Any CPU.Build.0 = Debug|x64 28 | {6BA11D1B-9AAB-4FA8-9612-C3E5B941DC18}.Debug|Any CPU.Deploy.0 = Debug|x64 29 | {6BA11D1B-9AAB-4FA8-9612-C3E5B941DC18}.Debug|ARM.ActiveCfg = Debug|ARM 30 | {6BA11D1B-9AAB-4FA8-9612-C3E5B941DC18}.Debug|ARM.Build.0 = Debug|ARM 31 | {6BA11D1B-9AAB-4FA8-9612-C3E5B941DC18}.Debug|ARM.Deploy.0 = Debug|ARM 32 | {6BA11D1B-9AAB-4FA8-9612-C3E5B941DC18}.Debug|x64.ActiveCfg = Debug|x64 33 | {6BA11D1B-9AAB-4FA8-9612-C3E5B941DC18}.Debug|x64.Build.0 = Debug|x64 34 | {6BA11D1B-9AAB-4FA8-9612-C3E5B941DC18}.Debug|x64.Deploy.0 = Debug|x64 35 | {6BA11D1B-9AAB-4FA8-9612-C3E5B941DC18}.Debug|x86.ActiveCfg = Debug|x86 36 | {6BA11D1B-9AAB-4FA8-9612-C3E5B941DC18}.Debug|x86.Build.0 = Debug|x86 37 | {6BA11D1B-9AAB-4FA8-9612-C3E5B941DC18}.Debug|x86.Deploy.0 = Debug|x86 38 | {6BA11D1B-9AAB-4FA8-9612-C3E5B941DC18}.Release|Any CPU.ActiveCfg = Release|x64 39 | {6BA11D1B-9AAB-4FA8-9612-C3E5B941DC18}.Release|Any CPU.Build.0 = Release|x64 40 | {6BA11D1B-9AAB-4FA8-9612-C3E5B941DC18}.Release|Any CPU.Deploy.0 = Release|x64 41 | {6BA11D1B-9AAB-4FA8-9612-C3E5B941DC18}.Release|ARM.ActiveCfg = Release|ARM 42 | {6BA11D1B-9AAB-4FA8-9612-C3E5B941DC18}.Release|ARM.Build.0 = Release|ARM 43 | {6BA11D1B-9AAB-4FA8-9612-C3E5B941DC18}.Release|ARM.Deploy.0 = Release|ARM 44 | {6BA11D1B-9AAB-4FA8-9612-C3E5B941DC18}.Release|x64.ActiveCfg = Release|x64 45 | {6BA11D1B-9AAB-4FA8-9612-C3E5B941DC18}.Release|x64.Build.0 = Release|x64 46 | {6BA11D1B-9AAB-4FA8-9612-C3E5B941DC18}.Release|x64.Deploy.0 = Release|x64 47 | {6BA11D1B-9AAB-4FA8-9612-C3E5B941DC18}.Release|x86.ActiveCfg = Release|x86 48 | {6BA11D1B-9AAB-4FA8-9612-C3E5B941DC18}.Release|x86.Build.0 = Release|x86 49 | {6BA11D1B-9AAB-4FA8-9612-C3E5B941DC18}.Release|x86.Deploy.0 = Release|x86 50 | EndGlobalSection 51 | GlobalSection(SolutionProperties) = preSolution 52 | HideSolutionNode = FALSE 53 | EndGlobalSection 54 | GlobalSection(ExtensibilityGlobals) = postSolution 55 | SolutionGuid = {B8D3D616-3729-4F47-A4E1-30AF5217397F} 56 | EndGlobalSection 57 | EndGlobal 58 | --------------------------------------------------------------------------------