├── .gitattributes ├── .github ├── dependabot.yml └── workflows │ └── codeql.yml ├── .gitignore ├── .gitmodules ├── CppProperties.json ├── ISSUE_TEMPLATE.md ├── LICENSE.md ├── README.md ├── SidebarDiagnostics.sln ├── SidebarDiagnostics ├── App.config ├── App.xaml ├── App.xaml.cs ├── ChangeLog.json ├── ChangeLog.xaml ├── ChangeLog.xaml.cs ├── ChangeLogModel.cs ├── Commands.cs ├── Constants.cs ├── Converters.cs ├── Dummy.xaml ├── Dummy.xaml.cs ├── FlatStyle.xaml ├── FlatStyle.xaml.cs ├── Graph.xaml ├── Graph.xaml.cs ├── GraphModel.cs ├── Monitoring.cs ├── Properties │ ├── AssemblyInfo.cs │ ├── Resources.Designer.cs │ ├── Resources.ar.Designer.cs │ ├── Resources.ar.resx │ ├── Resources.da.Designer.cs │ ├── Resources.da.resx │ ├── Resources.de-CH.Designer.cs │ ├── Resources.de-CH.resx │ ├── Resources.de.Designer.cs │ ├── Resources.de.resx │ ├── Resources.es.Designer.cs │ ├── Resources.es.resx │ ├── Resources.fi.Designer.cs │ ├── Resources.fi.resx │ ├── Resources.fr.Designer.cs │ ├── Resources.fr.resx │ ├── Resources.it.Designer.cs │ ├── Resources.it.resx │ ├── Resources.ja.Designer.cs │ ├── Resources.ja.resx │ ├── Resources.nl.Designer.cs │ ├── Resources.nl.resx │ ├── Resources.resx │ ├── Resources.ru.Designer.cs │ ├── Resources.ru.resx │ ├── Resources.tr.resx │ ├── Resources.zh.Designer.cs │ ├── Resources.zh.resx │ └── app.manifest ├── Settings.cs ├── Settings.ico ├── Settings.xaml ├── Settings.xaml.cs ├── SettingsModel.cs ├── Setup.xaml ├── Setup.xaml.cs ├── Sidebar.ico ├── Sidebar.xaml ├── Sidebar.xaml.cs ├── SidebarDiagnostics.csproj ├── SidebarModel.cs ├── Update.xaml ├── Update.xaml.cs ├── UpdateModel.cs ├── Utilities.cs ├── Windows.cs └── packages.config ├── resharper.svg └── sidebar.ico /.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 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | # To get started with Dependabot version updates, you'll need to specify which 2 | # package ecosystems to update and where the package manifests are located. 3 | # Please see the documentation for all configuration options: 4 | # https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file 5 | 6 | version: 2 7 | updates: 8 | - package-ecosystem: "nuget" 9 | directory: "/" 10 | target-branch: "main" 11 | schedule: 12 | interval: "daily" 13 | - package-ecosystem: "github-actions" 14 | directory: "/" 15 | target-branch: "main" 16 | schedule: 17 | interval: "daily" 18 | -------------------------------------------------------------------------------- /.github/workflows/codeql.yml: -------------------------------------------------------------------------------- 1 | # For most projects, this workflow file will not need changing; you simply need 2 | # to commit it to your repository. 3 | # 4 | # You may wish to alter this file to override the set of languages analyzed, 5 | # or to provide custom queries or build logic. 6 | # 7 | # ******** NOTE ******** 8 | # We have attempted to detect the languages in your repository. Please check 9 | # the `language` matrix defined below to confirm you have the correct set of 10 | # supported CodeQL languages. 11 | # 12 | name: "CodeQL Advanced" 13 | 14 | on: 15 | push: 16 | branches: [ "master" ] 17 | pull_request: 18 | branches: [ "master" ] 19 | schedule: 20 | - cron: '19 20 * * 5' 21 | 22 | jobs: 23 | analyze: 24 | name: Analyze (${{ matrix.language }}) 25 | # Runner size impacts CodeQL analysis time. To learn more, please see: 26 | # - https://gh.io/recommended-hardware-resources-for-running-codeql 27 | # - https://gh.io/supported-runners-and-hardware-resources 28 | # - https://gh.io/using-larger-runners (GitHub.com only) 29 | # Consider using larger runners or machines with greater resources for possible analysis time improvements. 30 | runs-on: ${{ matrix.language == 'swift' && 'macos-latest' || matrix.language == 'csharp' && 'windows-latest' || 'ubuntu-latest' }} 31 | permissions: 32 | # required for all workflows 33 | security-events: write 34 | 35 | # required to fetch internal or private CodeQL packs 36 | packages: read 37 | 38 | # only required for workflows in private repositories 39 | actions: read 40 | contents: read 41 | 42 | strategy: 43 | fail-fast: false 44 | matrix: 45 | include: 46 | - language: csharp 47 | build-mode: autobuild 48 | # CodeQL supports the following values keywords for 'language': 'actions', 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift' 49 | # Use `c-cpp` to analyze code written in C, C++ or both 50 | # Use 'java-kotlin' to analyze code written in Java, Kotlin or both 51 | # Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both 52 | # To learn more about changing the languages that are analyzed or customizing the build mode for your analysis, 53 | # see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning. 54 | # If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how 55 | # your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages 56 | steps: 57 | - name: Checkout repository 58 | uses: actions/checkout@v4 59 | with: 60 | submodules: recursive 61 | 62 | # Add any setup steps before running the `github/codeql-action/init` action. 63 | # This includes steps like installing compilers or runtimes (`actions/setup-node` 64 | # or others). This is typically only required for manual builds. 65 | # - name: Setup runtime (example) 66 | # uses: actions/setup-example@v1 67 | 68 | # Initializes the CodeQL tools for scanning. 69 | - name: Initialize CodeQL 70 | uses: github/codeql-action/init@v3 71 | with: 72 | languages: csharp 73 | build-mode: autobuild 74 | # If you wish to specify custom queries, you can do so here or in a config file. 75 | # By default, queries listed here will override any specified in a config file. 76 | # Prefix the list here with "+" to use these queries and those in the config file. 77 | 78 | # For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs 79 | # queries: security-extended,security-and-quality 80 | 81 | # If the analyze step fails for one of the languages you are analyzing with 82 | # "We were unable to automatically build your code", modify the matrix above 83 | # to set the build mode to "manual" for that language. Then modify this step 84 | # to build your code. 85 | # ℹ️ Command-line programs to run using the OS shell. 86 | # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun 87 | - if: matrix.build-mode == 'manual' 88 | shell: bash 89 | run: | 90 | echo 'If you are using a "manual" build mode for one or more of the' \ 91 | 'languages you are analyzing, replace this with the commands to build' \ 92 | 'your code, for example:' 93 | echo ' make bootstrap' 94 | echo ' make release' 95 | exit 1 96 | 97 | - name: Perform CodeQL Analysis 98 | uses: github/codeql-action/analyze@v3 99 | with: 100 | category: "/language:${{matrix.language}}" 101 | -------------------------------------------------------------------------------- /.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 | *.userosscache 8 | *.sln.docstates 9 | 10 | # User-specific files (MonoDevelop/Xamarin Studio) 11 | *.userprefs 12 | 13 | # Build results 14 | [Dd]ebug/ 15 | [Dd]ebugPublic/ 16 | [Rr]elease/ 17 | [Rr]eleases/ 18 | x64/ 19 | x86/ 20 | build/ 21 | bld/ 22 | [Bb]in/ 23 | [Oo]bj/ 24 | 25 | # Visual Studio 2015 cache/options directory 26 | .vs/ 27 | 28 | # MSTest test Results 29 | [Tt]est[Rr]esult*/ 30 | [Bb]uild[Ll]og.* 31 | 32 | # NUNIT 33 | *.VisualState.xml 34 | TestResult.xml 35 | 36 | # Build Results of an ATL Project 37 | [Dd]ebugPS/ 38 | [Rr]eleasePS/ 39 | dlldata.c 40 | 41 | # DNX 42 | project.lock.json 43 | artifacts/ 44 | 45 | *_i.c 46 | *_p.c 47 | *_i.h 48 | *.ilk 49 | *.meta 50 | *.obj 51 | *.pch 52 | *.pdb 53 | *.pgc 54 | *.pgd 55 | *.rsp 56 | *.sbr 57 | *.tlb 58 | *.tli 59 | *.tlh 60 | *.tmp 61 | *.tmp_proj 62 | *.log 63 | *.vspscc 64 | *.vssscc 65 | .builds 66 | *.pidb 67 | *.svclog 68 | *.scc 69 | 70 | # Chutzpah Test files 71 | _Chutzpah* 72 | 73 | # Visual C++ cache files 74 | ipch/ 75 | *.aps 76 | *.ncb 77 | *.opensdf 78 | *.sdf 79 | *.cachefile 80 | 81 | # Visual Studio profiler 82 | *.psess 83 | *.vsp 84 | *.vspx 85 | 86 | # TFS 2012 Local Workspace 87 | $tf/ 88 | 89 | # Guidance Automation Toolkit 90 | *.gpState 91 | 92 | # ReSharper is a .NET coding add-in 93 | _ReSharper*/ 94 | *.[Rr]e[Ss]harper 95 | *.DotSettings.user 96 | 97 | # JustCode is a .NET coding add-in 98 | .JustCode 99 | 100 | # TeamCity is a build add-in 101 | _TeamCity* 102 | 103 | # DotCover is a Code Coverage Tool 104 | *.dotCover 105 | 106 | # NCrunch 107 | _NCrunch_* 108 | .*crunch*.local.xml 109 | 110 | # MightyMoose 111 | *.mm.* 112 | AutoTest.Net/ 113 | 114 | # Web workbench (sass) 115 | .sass-cache/ 116 | 117 | # Installshield output folder 118 | [Ee]xpress/ 119 | 120 | # DocProject is a documentation generator add-in 121 | DocProject/buildhelp/ 122 | DocProject/Help/*.HxT 123 | DocProject/Help/*.HxC 124 | DocProject/Help/*.hhc 125 | DocProject/Help/*.hhk 126 | DocProject/Help/*.hhp 127 | DocProject/Help/Html2 128 | DocProject/Help/html 129 | 130 | # Click-Once directory 131 | publish/ 132 | 133 | # Publish Web Output 134 | *.[Pp]ublish.xml 135 | *.azurePubxml 136 | ## TODO: Comment the next line if you want to checkin your 137 | ## web deploy settings but do note that will include unencrypted 138 | ## passwords 139 | #*.pubxml 140 | 141 | *.publishproj 142 | 143 | # NuGet Packages 144 | *.nupkg 145 | # The packages folder can be ignored because of Package Restore 146 | **/packages/* 147 | # except build/, which is used as an MSBuild target. 148 | !**/packages/build/ 149 | # Uncomment if necessary however generally it will be regenerated when needed 150 | #!**/packages/repositories.config 151 | 152 | # Windows Azure Build Output 153 | csx/ 154 | *.build.csdef 155 | 156 | # Windows Store app package directory 157 | AppPackages/ 158 | 159 | # Visual Studio cache files 160 | # files ending in .cache can be ignored 161 | *.[Cc]ache 162 | # but keep track of directories ending in .cache 163 | !*.[Cc]ache/ 164 | 165 | # Others 166 | ClientBin/ 167 | [Ss]tyle[Cc]op.* 168 | ~$* 169 | *~ 170 | *.dbmdl 171 | *.dbproj.schemaview 172 | *.pfx 173 | *.publishsettings 174 | node_modules/ 175 | orleans.codegen.cs 176 | 177 | # RIA/Silverlight projects 178 | Generated_Code/ 179 | 180 | # Backup & report files from converting an old project file 181 | # to a newer Visual Studio version. Backup files are not needed, 182 | # because we have git ;-) 183 | _UpgradeReport_Files/ 184 | Backup*/ 185 | UpgradeLog*.XML 186 | UpgradeLog*.htm 187 | 188 | # SQL Server files 189 | *.mdf 190 | *.ldf 191 | 192 | # Business Intelligence projects 193 | *.rdl.data 194 | *.bim.layout 195 | *.bim_*.settings 196 | 197 | # Microsoft Fakes 198 | FakesAssemblies/ 199 | 200 | # Node.js Tools for Visual Studio 201 | .ntvs_analysis.dat 202 | 203 | # Visual Studio 6 build log 204 | *.plg 205 | 206 | # Visual Studio 6 workspace options file 207 | *.opt 208 | 209 | # LightSwitch generated files 210 | GeneratedArtifacts/ 211 | _Pvt_Extensions/ 212 | ModelManifest.xml 213 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "LibreHardwareMonitor"] 2 | path = LibreHardwareMonitor 3 | url = https://github.com/LibreHardwareMonitor/LibreHardwareMonitor.git 4 | -------------------------------------------------------------------------------- /CppProperties.json: -------------------------------------------------------------------------------- 1 | { 2 | "configurations": [ 3 | { 4 | "inheritEnvironments": [ 5 | "msvc_x64" 6 | ], 7 | "name": "x64-Release", 8 | "includePath": [ 9 | "${env.INCLUDE}", 10 | "${workspaceRoot}\\**" 11 | ], 12 | "defines": [ 13 | "WIN32", 14 | "NDEBUG", 15 | "UNICODE", 16 | "_UNICODE" 17 | ], 18 | "intelliSenseMode": "windows-msvc-x64" 19 | } 20 | ] 21 | } -------------------------------------------------------------------------------- /ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | **1. Is this a feature request?** 2 | 3 | *If yes then sorry but this project is not taking feature requests at this time.* 4 | 5 | **2. Your Operating System** 6 | 7 | **3. App Version** 8 | 9 | **4. Any Relevant Settings** 10 | 11 | **5. Steps to Reproduce** 12 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

Sidebar Diagnostics

2 | 3 | A simple sidebar for Windows desktop that displays hardware diagnostic information. 4 | 5 | ### Download 6 | 7 | Go to the releases tab. 8 | 9 | ### Features 10 | * Monitors CPU, RAM, GPU, network, and logical drives. 11 | * Create graphs for all metrics. 12 | * Allows for lots of customization. 13 | * Allows alerts for various values. 14 | * Allows binding hotkeys. 15 | * Supports monitors of all DPI types. 16 | * Has a clock at the top. 17 | 18 | ### Important 19 | 20 | If you are changing your screen's DPI settings, view this page! 21 | 22 | ### Author Note 23 | 24 | This software will always be free on GitHub. If you really like it please consider donating. I'd appreciate it! 25 | Thanks. 26 | 27 | https://www.paypal.me/arcaderenegade 28 | 29 | ### Supported OS 30 | 31 | * Windows 10 32 | * Windows 8.1 33 | * Windows 8 34 | * Windows 7 35 | 36 | ### License 37 | 38 | GNU GENERAL PUBLIC LICENSE 39 | 40 | Please provide a link to this GitHub repository if reuploading. Thank you. 41 | 42 | ### Info 43 | 44 | Written in C# .NET WPF. 45 | 46 | Currently compiled in .NET 4.7.2. 47 | 48 | You will need to run it as administrator. 49 | 50 | Data provided by Libre Hardware Monitor. Please thank the library's contributors for their support! 51 | 52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /SidebarDiagnostics.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.29920.165 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SidebarDiagnostics", "SidebarDiagnostics\SidebarDiagnostics.csproj", "{A1174319-5065-453E-9864-9E7108419DDA}" 7 | EndProject 8 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LibreHardwareMonitorLib", "LibreHardwareMonitor\LibreHardwareMonitorLib\LibreHardwareMonitorLib.csproj", "{8C38AB06-AC1A-49A7-9683-5B4CA7FB0115}" 9 | EndProject 10 | Global 11 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 12 | Debug|Any CPU = Debug|Any CPU 13 | Release|Any CPU = Release|Any CPU 14 | EndGlobalSection 15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 16 | {A1174319-5065-453E-9864-9E7108419DDA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 17 | {A1174319-5065-453E-9864-9E7108419DDA}.Debug|Any CPU.Build.0 = Debug|Any CPU 18 | {A1174319-5065-453E-9864-9E7108419DDA}.Release|Any CPU.ActiveCfg = Release|Any CPU 19 | {A1174319-5065-453E-9864-9E7108419DDA}.Release|Any CPU.Build.0 = Release|Any CPU 20 | {8C38AB06-AC1A-49A7-9683-5B4CA7FB0115}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 21 | {8C38AB06-AC1A-49A7-9683-5B4CA7FB0115}.Debug|Any CPU.Build.0 = Debug|Any CPU 22 | {8C38AB06-AC1A-49A7-9683-5B4CA7FB0115}.Release|Any CPU.ActiveCfg = Release|Any CPU 23 | {8C38AB06-AC1A-49A7-9683-5B4CA7FB0115}.Release|Any CPU.Build.0 = Release|Any CPU 24 | EndGlobalSection 25 | GlobalSection(SolutionProperties) = preSolution 26 | HideSolutionNode = FALSE 27 | EndGlobalSection 28 | GlobalSection(ExtensibilityGlobals) = postSolution 29 | SolutionGuid = {57150843-DDB4-488E-8A35-F34859E4DE57} 30 | EndGlobalSection 31 | EndGlobal 32 | -------------------------------------------------------------------------------- /SidebarDiagnostics/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /SidebarDiagnostics/App.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Configuration; 4 | using System.Diagnostics; 5 | using System.Linq; 6 | using System.Net; 7 | using System.Threading.Tasks; 8 | using System.Reflection; 9 | using System.Windows; 10 | using System.Windows.Controls; 11 | using Squirrel; 12 | using Hardcodet.Wpf.TaskbarNotification; 13 | using SidebarDiagnostics.Monitoring; 14 | using SidebarDiagnostics.Utilities; 15 | using SidebarDiagnostics.Windows; 16 | using Xceed.Wpf.Toolkit; 17 | 18 | namespace SidebarDiagnostics 19 | { 20 | /// 21 | /// Interaction logic for App.xaml 22 | /// 23 | public partial class App : Application 24 | { 25 | protected async override void OnStartup(StartupEventArgs e) 26 | { 27 | base.OnStartup(e); 28 | 29 | // ERROR HANDLING 30 | #if !DEBUG 31 | AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(AppDomain_Error); 32 | #endif 33 | 34 | // LANGUAGE 35 | Culture.SetDefault(); 36 | Culture.SetCurrent(true); 37 | 38 | // UPDATE 39 | #if !DEBUG 40 | if (Framework.Settings.Instance.AutoUpdate) 41 | { 42 | await AppUpdate(false); 43 | } 44 | #endif 45 | 46 | // SETTINGS 47 | CheckSettings(); 48 | 49 | // VERSION 50 | Version _version = Assembly.GetExecutingAssembly().GetName().Version; 51 | string _vstring = _version.ToString(3); 52 | 53 | // TRAY ICON 54 | TrayIcon = (TaskbarIcon)FindResource("TrayIcon"); 55 | TrayIcon.ToolTipText = string.Format("{0} v{1}", Framework.Resources.AppName, _vstring); 56 | TrayIcon.TrayContextMenuOpen += TrayIcon_TrayContextMenuOpen; 57 | 58 | // START APP 59 | if (Framework.Settings.Instance.InitialSetup) 60 | { 61 | new Setup(); 62 | } 63 | else 64 | { 65 | StartApp(false); 66 | } 67 | } 68 | 69 | protected override void OnExit(ExitEventArgs e) 70 | { 71 | TrayIcon.Dispose(); 72 | 73 | base.OnExit(e); 74 | } 75 | 76 | public static void StartApp(bool openSettings) 77 | { 78 | Version _version = Assembly.GetExecutingAssembly().GetName().Version; 79 | string _vstring = _version.ToString(3); 80 | 81 | if (!string.Equals(Framework.Settings.Instance.ChangeLog, _vstring, StringComparison.OrdinalIgnoreCase)) 82 | { 83 | Framework.Settings.Instance.ChangeLog = _vstring; 84 | Framework.Settings.Instance.Save(); 85 | 86 | new ChangeLog(_version).Show(); 87 | } 88 | 89 | new Sidebar(openSettings, Framework.Settings.Instance.InitiallyHidden).Show(); 90 | 91 | RefreshIcon(); 92 | } 93 | 94 | public static void RefreshIcon() 95 | { 96 | TrayIcon.Visibility = Framework.Settings.Instance.ShowTrayIcon ? Visibility.Visible : Visibility.Collapsed; 97 | } 98 | 99 | public static void ShowPerformanceCounterError() 100 | { 101 | MessageBoxResult _result = System.Windows.MessageBox.Show(Framework.Resources.ErrorPerformanceCounter, Framework.Resources.ErrorTitle, MessageBoxButton.OKCancel, MessageBoxImage.Warning, MessageBoxResult.OK, MessageBoxOptions.DefaultDesktopOnly); 102 | 103 | if (_result == MessageBoxResult.OK) 104 | { 105 | Process.Start(ConfigurationManager.AppSettings["WikiURL"]); 106 | } 107 | } 108 | 109 | public void OpenSettings() 110 | { 111 | Settings _settings = Windows.OfType().FirstOrDefault(); 112 | 113 | if (_settings != null) 114 | { 115 | _settings.WindowState = System.Windows.WindowState.Normal; 116 | _settings.Activate(); 117 | return; 118 | } 119 | 120 | Sidebar _sidebar = Sidebar; 121 | 122 | if (_sidebar == null) 123 | { 124 | return; 125 | } 126 | 127 | new Settings(_sidebar); 128 | } 129 | 130 | public void OpenGraph() 131 | { 132 | Sidebar _sidebar = Sidebar; 133 | 134 | if (_sidebar == null || !_sidebar.Ready) 135 | { 136 | return; 137 | } 138 | 139 | new Graph(_sidebar); 140 | } 141 | 142 | private async Task AppUpdate(bool showInfo) 143 | { 144 | string _exe = await SquirrelUpdate(showInfo); 145 | 146 | if (_exe != null) 147 | { 148 | if (Framework.Settings.Instance.RunAtStartup) 149 | { 150 | Utilities.Startup.EnableStartupTask(_exe); 151 | } 152 | 153 | Process.Start(_exe); 154 | 155 | Shutdown(); 156 | } 157 | } 158 | 159 | private async Task SquirrelUpdate(bool showInfo) 160 | { 161 | try 162 | { 163 | using (UpdateManager _manager = new UpdateManager(ConfigurationManager.AppSettings["CurrentReleaseURL"])) 164 | { 165 | UpdateInfo _update = await _manager.CheckForUpdate(); 166 | 167 | if (_update.ReleasesToApply.Any()) 168 | { 169 | Version _newVersion = _update.ReleasesToApply.OrderByDescending(r => r.Version).First().Version.Version; 170 | 171 | Update _updateWindow = new Update(); 172 | _updateWindow.Show(); 173 | 174 | await _manager.UpdateApp((p) => _updateWindow.SetProgress(p)); 175 | 176 | _updateWindow.Close(); 177 | 178 | return Utilities.Paths.Exe(_newVersion); 179 | } 180 | else if (showInfo) 181 | { 182 | System.Windows.MessageBox.Show(Framework.Resources.UpdateSuccessText, Framework.Resources.AppName, MessageBoxButton.OK, MessageBoxImage.Information, MessageBoxResult.OK, MessageBoxOptions.DefaultDesktopOnly); 183 | } 184 | } 185 | } 186 | catch (WebException) 187 | { 188 | if (showInfo) 189 | { 190 | System.Windows.MessageBox.Show(Framework.Resources.UpdateErrorText, Framework.Resources.UpdateErrorTitle, MessageBoxButton.OK, MessageBoxImage.Error, MessageBoxResult.OK, MessageBoxOptions.DefaultDesktopOnly); 191 | } 192 | } 193 | catch (Exception e) 194 | { 195 | Framework.Settings.Instance.AutoUpdate = false; 196 | Framework.Settings.Instance.Save(); 197 | 198 | using (EventLog _log = new EventLog("Application")) 199 | { 200 | _log.Source = Framework.Resources.AppName; 201 | _log.WriteEntry(e.ToString(), EventLogEntryType.Error, 100, 1); 202 | } 203 | 204 | System.Windows.MessageBox.Show(Framework.Resources.UpdateErrorFatalText, Framework.Resources.UpdateErrorTitle, MessageBoxButton.OK, MessageBoxImage.Error, MessageBoxResult.OK, MessageBoxOptions.DefaultDesktopOnly); 205 | } 206 | 207 | return null; 208 | } 209 | 210 | private void CheckSettings() 211 | { 212 | if (Framework.Settings.Instance.RunAtStartup && !Utilities.Startup.StartupTaskExists()) 213 | { 214 | Utilities.Startup.EnableStartupTask(); 215 | } 216 | 217 | Framework.Settings.Instance.MonitorConfig = MonitorConfig.CheckConfig(Framework.Settings.Instance.MonitorConfig); 218 | } 219 | 220 | private void TrayIcon_TrayContextMenuOpen(object sender, RoutedEventArgs e) 221 | { 222 | Monitor _primary = Monitor.GetMonitors().GetPrimary(); 223 | 224 | TrayIcon.ContextMenu.HorizontalOffset *= _primary.InverseScaleX; 225 | TrayIcon.ContextMenu.VerticalOffset *= _primary.InverseScaleY; 226 | } 227 | 228 | private void Settings_Click(object sender, EventArgs e) 229 | { 230 | OpenSettings(); 231 | } 232 | 233 | private void Reload_Click(object sender, EventArgs e) 234 | { 235 | Sidebar _sidebar = Sidebar; 236 | 237 | if (_sidebar == null) 238 | { 239 | return; 240 | } 241 | 242 | _sidebar.Reload(); 243 | } 244 | 245 | private void Graph_Click(object sender, EventArgs e) 246 | { 247 | OpenGraph(); 248 | } 249 | 250 | private void Visibility_SubmenuOpened(object sender, EventArgs e) 251 | { 252 | Sidebar _sidebar = Sidebar; 253 | 254 | if (_sidebar == null) 255 | { 256 | return; 257 | } 258 | 259 | MenuItem _this = (MenuItem)sender; 260 | 261 | (_this.Items.GetItemAt(0) as MenuItem).IsChecked = _sidebar.Visibility == Visibility.Visible; 262 | (_this.Items.GetItemAt(1) as MenuItem).IsChecked = _sidebar.Visibility == Visibility.Hidden; 263 | } 264 | 265 | private void Show_Click(object sender, EventArgs e) 266 | { 267 | Sidebar _sidebar = Sidebar; 268 | 269 | if (_sidebar == null || _sidebar.Visibility == Visibility.Visible) 270 | { 271 | return; 272 | } 273 | 274 | _sidebar.AppBarShow(); 275 | } 276 | 277 | private void Hide_Click(object sender, EventArgs e) 278 | { 279 | Sidebar _sidebar = Sidebar; 280 | 281 | if (_sidebar == null || _sidebar.Visibility == Visibility.Hidden) 282 | { 283 | return; 284 | } 285 | 286 | _sidebar.AppBarHide(); 287 | } 288 | 289 | private void Donate_Click(object sender, RoutedEventArgs e) 290 | { 291 | Process.Start(ConfigurationManager.AppSettings["DonateURL"]); 292 | } 293 | 294 | private void GitHub_Click(object sender, RoutedEventArgs e) 295 | { 296 | Process.Start(ConfigurationManager.AppSettings["RepoURL"]); 297 | } 298 | 299 | private async void Update_Click(object sender, RoutedEventArgs e) 300 | { 301 | await AppUpdate(true); 302 | } 303 | 304 | private void Close_Click(object sender, EventArgs e) 305 | { 306 | Shutdown(); 307 | } 308 | 309 | private static void AppDomain_Error(object sender, UnhandledExceptionEventArgs e) 310 | { 311 | Exception ex = (Exception)e.ExceptionObject; 312 | 313 | System.Windows.MessageBox.Show(ex.ToString(), Framework.Resources.ErrorTitle, MessageBoxButton.OK, MessageBoxImage.Error, MessageBoxResult.OK, MessageBoxOptions.DefaultDesktopOnly); 314 | } 315 | 316 | public Sidebar Sidebar 317 | { 318 | get 319 | { 320 | return Windows.OfType().FirstOrDefault(); 321 | } 322 | } 323 | 324 | public IEnumerable Graphs 325 | { 326 | get 327 | { 328 | return Windows.OfType(); 329 | } 330 | } 331 | 332 | public new static App Current 333 | { 334 | get 335 | { 336 | return (App)Application.Current; 337 | } 338 | } 339 | 340 | public static TaskbarIcon TrayIcon { get; set; } 341 | 342 | internal static bool _reloading { get; set; } = false; 343 | } 344 | } -------------------------------------------------------------------------------- /SidebarDiagnostics/ChangeLog.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "Version": "3.6.3", 4 | "Changes": [ 5 | "Updated Libre Hardware Monitor.", 6 | "Arabic language support." 7 | ] 8 | }, 9 | { 10 | "Version": "3.6.2", 11 | "Changes": [ 12 | "Fix GPU fan metric bug.", 13 | "Fix GPU VRAM load metric bug." 14 | ] 15 | }, 16 | { 17 | "Version": "3.6.1", 18 | "Changes": [ 19 | "Updated Libre Hardware Monitor.", 20 | "Fix GPU fan metric bug." 21 | ] 22 | }, 23 | { 24 | "Version": "3.6.0", 25 | "Changes": [ 26 | "Updated Libre Hardware Monitor." 27 | ] 28 | }, 29 | { 30 | "Version": "3.5.9", 31 | "Changes": [ 32 | "Updated Libre Hardware Monitor." 33 | ] 34 | }, 35 | { 36 | "Version": "3.5.8", 37 | "Changes": [ 38 | "Updated Libre Hardware Monitor." 39 | ] 40 | }, 41 | { 42 | "Version": "3.5.7", 43 | "Changes": [ 44 | "Updated Libre Hardware Monitor.", 45 | "i18n language updates (thank you contributors)." 46 | ] 47 | }, 48 | { 49 | "Version": "3.5.6", 50 | "Changes": [ 51 | "Updated Libre Hardware Monitor.", 52 | "Russian language support.", 53 | "Italian language support.", 54 | "Fix: AMD core chiplet dies temperature (Ryzen Master)" 55 | ] 56 | }, 57 | { 58 | "Version": "3.5.5", 59 | "Changes": [ 60 | "Bug fix for Ryzen CPU clock speed.", 61 | "Bug fix for AMD Video Card VRAM." 62 | ] 63 | }, 64 | { 65 | "Version": "3.5.4", 66 | "Changes": [ 67 | "Update to latest version of Libre Hardware Monitor.", 68 | "Bug fix for Ryzen CPU temperature.", 69 | "Thanks for the PR, @hirschmann!", 70 | "Also broke the auto-updater in the last version but it should work from now on.", 71 | "Sorry if you had to re-install!" 72 | ] 73 | }, 74 | { 75 | "Version": "3.5.3", 76 | "Changes": [ 77 | "Now uses Libre Hardware Monitor instead of Open Hardware Monitor for Ryzen support." 78 | ] 79 | }, 80 | { 81 | "Version": "3.5.2", 82 | "Changes": [ 83 | "Added an option to show the computer name at the top of the sidebar.", 84 | "Enable it in the settings under the customize tab.", 85 | "Disabled by default." 86 | ] 87 | }, 88 | { 89 | "Version": "3.5.1", 90 | "Changes": [ 91 | "Fix for high DPI monitors or settings.", 92 | "Fix for sidebar floating left or right." 93 | ] 94 | }, 95 | { 96 | "Version": "3.5.0", 97 | "Changes": [ 98 | "Updated to .NET framework v4.7.1.", 99 | "Updated dependencies." 100 | ] 101 | }, 102 | { 103 | "Version": "3.4.6", 104 | "Changes": [ 105 | "Updated to the latest version of Open Hardware Monitor.", 106 | "Updated dependencies." 107 | ] 108 | }, 109 | { 110 | "Version": "3.4.5", 111 | "Changes": [ 112 | "Updated to the latest version of Open Hardware Monitor with bugfix for Kaby Lake clock speed.", 113 | "The \"UI Scale\" setting now only affects the sidebar window.", 114 | "Hardware names should now update correctly after the hardware is changed.", 115 | "Unfortunately, this fix reset your custom hardware names but you can rename them back.", 116 | "The app should now correctly run on Windows startup for laptops running on battery power.", 117 | "All isatap network interfaces should be filtered now.", 118 | "Updated dependencies." 119 | ] 120 | }, 121 | { 122 | "Version": "3.4.4", 123 | "Changes": [ 124 | "Updated to the latest version of Open Hardware Monitor with Kaby Lake support.", 125 | "Updated dependencies." 126 | ] 127 | }, 128 | { 129 | "Version": "3.4.3", 130 | "Changes": [ 131 | "ISATAP (Intra-Site Automatic Tunnel Addressing Protocol) are now filtered via Regex from Network Adapters to monitor.", 132 | "Showing or toggling the sidebar will no longer cause it to activate or gain focus.", 133 | "The \"Show in Alt + Tab\" option has been renamed \"Toolbar Mode\".", 134 | "Enabling Toolbar Mode allows the sidebar to persist between Virtual Desktops and not show up in the Alt + Tab menu.", 135 | "Want to help translate? Please visit the GitHub wiki!" 136 | ] 137 | }, 138 | { 139 | "Version": "3.4.2", 140 | "Changes": [ 141 | "Added a network metric for external IP address, disabled by default.", 142 | "Be careful when sharing your desktop to not show your public IP address.", 143 | "Removed Virtual Desktop support due to incompatibilities and errors.", 144 | "If you want the sidebar to persist between different Virtual Desktops, you can disable the \"Show in Alt + Tab\" setting instead.", 145 | "Want to help translate? Please visit the GitHub wiki!" 146 | ] 147 | }, 148 | { 149 | "Version": "3.4.1", 150 | "Changes": [ 151 | "Fixed a bug where the default hardware name stayed the same after the hardware was replaced.", 152 | "Sidebar now remains visible during Aero peek.", 153 | "Added a new hotkey for toggling \"Reserve Space\".", 154 | "Fixed a bug where changes to hotkeys would not apply immediately after saving.", 155 | "Want to help translate? Please visit the GitHub wiki!" 156 | ] 157 | }, 158 | { 159 | "Version": "3.4.0", 160 | "Changes": [ 161 | "Fixed a crash when click-through is enabled with 32 bit Windows.", 162 | "Want to help translate? Please visit the GitHub wiki!" 163 | ] 164 | }, 165 | { 166 | "Version": "3.3.9", 167 | "Changes": [ 168 | "Added a setting to enable or disable Virtual Desktop support.", 169 | "Want to help translate? Please visit the GitHub wiki!" 170 | ] 171 | }, 172 | { 173 | "Version": "3.3.8", 174 | "Changes": [ 175 | "Added a metric for Network Adapter IPV4 address. Thanks dknedlik.", 176 | "Added a setting under advanced to hide the sidebar at startup.", 177 | "Want to help translate? Please visit the GitHub wiki!" 178 | ] 179 | }, 180 | { 181 | "Version": "3.3.7", 182 | "Changes": [ 183 | "Fixed a fatal error that occurred during auto-update.", 184 | "Added a setting to enable or disable \"Alert Blink\".", 185 | "Polling is now paused when the sidebar is hidden to reduce CPU usage.", 186 | "Want to help translate? Please visit the GitHub wiki!" 187 | ] 188 | }, 189 | { 190 | "Version": "3.3.6", 191 | "Changes": [ 192 | "Metric alerts now blink to be more conspicuous.", 193 | "Fixed a bug with the font size settings.", 194 | "Want to help translate? Please visit the GitHub wiki!" 195 | ] 196 | }, 197 | { 198 | "Version": "3.3.5", 199 | "Changes": [ 200 | "Fixed network bandwidth alerts.", 201 | "Want to help translate? Please visit the GitHub wiki!" 202 | ] 203 | }, 204 | { 205 | "Version": "3.3.4", 206 | "Changes": [ 207 | "Made the \"Show Desktop\" fix for when \"Always on Top\" is disabled to be more consistent.", 208 | "Want to help translate? Please visit the GitHub wiki!" 209 | ] 210 | }, 211 | { 212 | "Version": "3.3.3", 213 | "Changes": [ 214 | "Localization updates.", 215 | "Want to help translate? Please visit the GitHub wiki!" 216 | ] 217 | }, 218 | { 219 | "Version": "3.3.2", 220 | "Changes": [ 221 | "Added an option for \"Text Align\" right or left.", 222 | "Added complete localization for French and Chinese.", 223 | "Thanks @AlexandreBT and @Vassile-D.", 224 | "Want to help translate? Please visit the GitHub wiki!" 225 | ] 226 | }, 227 | { 228 | "Version": "3.3.1", 229 | "Changes": [ 230 | "Added the option to enable or disable specific metrics.", 231 | "Fixed a bug where charts for scaling metrics like bandwidth were incorrect.", 232 | "Finished preparing all text for localization.", 233 | "The complete Excel file of all text to be translated has been uploaded to the localization thread.", 234 | "Want to help translate? Please visit the GitHub wiki!" 235 | ] 236 | }, 237 | { 238 | "Version": "3.3.0", 239 | "Changes": [ 240 | "Added graphs.", 241 | "For performance reasons, graphs only store data while they are open. No historical data.", 242 | "Fixed French being missing in the Language dropdown." 243 | ] 244 | }, 245 | { 246 | "Version": "3.2.1", 247 | "Changes": [ 248 | "Fixed a bug where the sidebar would often freeze between updates.", 249 | "Fixed a bug with reserved space in Windows 7.", 250 | "Added an option for Language." 251 | ] 252 | }, 253 | { 254 | "Version": "3.2.0", 255 | "Changes": [ 256 | "Fixed all high DPI monitor issues.", 257 | "For real this time guys.", 258 | "Removed the \"High DPI Support\" option as it is now redundant.", 259 | "Please set your horizontal and vertical offset options back to 0.", 260 | "Added initial localization for Danish, Dutch, German, and Japanese.", 261 | "Want to help localize? Please visit the GitHub wiki!" 262 | ] 263 | }, 264 | { 265 | "Version": "3.1.0", 266 | "Changes": [ 267 | "Implemented initial French localization.", 268 | "Want to help localize? Please visit the GitHub wiki!", 269 | "Added error handling for when the app fails to update.", 270 | "Added a catch for an error involving virtual desktops." 271 | ] 272 | }, 273 | { 274 | "Version": "3.0.8", 275 | "Changes": [ 276 | "Added the option to show or hide the sidebar in Alt + Tab.", 277 | "Minor consistency changes." 278 | ] 279 | }, 280 | { 281 | "Version": "3.0.7", 282 | "Changes": [ 283 | "Fixed two issues that caused higher CPU usage than necessary.", 284 | "The settings.json file is now formatted and indented to make it easier to edit manually." 285 | ] 286 | }, 287 | { 288 | "Version": "3.0.6", 289 | "Changes": [ 290 | "Fixed a fatal error for Windows 8." 291 | ] 292 | }, 293 | { 294 | "Version": "3.0.5", 295 | "Changes": [ 296 | "Fixed the default monitor settings being in the reverse order.", 297 | "The sidebar will now reposition when the work area changes if \"Reserve Space\" is disabled.", 298 | "New version of the install and update framework." 299 | ] 300 | }, 301 | { 302 | "Version": "3.0.4", 303 | "Changes": [ 304 | "Fixed a bug where the sidebar would disappear when \"Show Desktop\" occurs.", 305 | "This was a tricky one. So please let me know if it works for you or not.", 306 | "Sorting monitors is now done via drag and drop.", 307 | "Added the ability to sort hardware via drag and drop.", 308 | "This created a bug where you have to double click the checkbox to enable or disable hardware.", 309 | "Working on a fix for that." 310 | ] 311 | }, 312 | { 313 | "Version": "3.0.3", 314 | "Changes": [ 315 | "Added a \"Auto Background Color\" option.", 316 | "This will set the sidebar's background color to your Windows color settings.", 317 | "Updated the icon for drives so it doesn't look like a speaker anymore.", 318 | "Added a change log window that pops up after updating.", 319 | "Minor bug fixes." 320 | ] 321 | } 322 | ] 323 | -------------------------------------------------------------------------------- /SidebarDiagnostics/ChangeLog.xaml: -------------------------------------------------------------------------------- 1 |  20 | 21 | 22 |