Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
1,145 additions
and
226 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,16 @@ | ||
|
||
### 5.0 | ||
|
||
- changelog added to repo | ||
- if no file is open message is shown | ||
- file can be opened from menu: Open File... | ||
- exclude setting added to hide defined parameters | ||
- file can be saved from menu: Save File... | ||
- exclude setting added to hide defined parameters | ||
- encoding presentation can be disabled | ||
- compact summary can be disabled | ||
- file types for setup can be customized | ||
- column width can be customized | ||
- new settings dialog with proper UI controls and greatly improved usability | ||
- some dialogs use task dialog instead of msg box | ||
- about dialog added | ||
- settings directory can either be AppData, Portable or Custom |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
MIT License | ||
|
||
Copyright (c) 2002-2017 stax76 | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and ssociated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1"> | ||
|
||
<assemblyIdentity version="1.0.0.0" name="MyApplication.app"/> | ||
|
||
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2"> | ||
<security> | ||
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3"> | ||
<requestedExecutionLevel level="asInvoker" uiAccess="false" /> | ||
</requestedPrivileges> | ||
</security> | ||
</trustInfo> | ||
|
||
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1"> | ||
<application> | ||
<!-- Windows 10 --> | ||
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" /> | ||
</application> | ||
</compatibility> | ||
|
||
<dependency> | ||
<dependentAssembly> | ||
<assemblyIdentity | ||
type="win32" | ||
name="Microsoft.Windows.Common-Controls" | ||
version="6.0.0.0" | ||
processorArchitecture="*" | ||
publicKeyToken="6595b64144ccf1df" | ||
language="*" | ||
/> | ||
</dependentAssembly> | ||
</dependency> | ||
</assembly> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
using System.Reflection; | ||
using System.Linq; | ||
|
||
class AppHelp | ||
{ | ||
public static string ProductName { get; } = (Assembly.GetEntryAssembly()?.GetCustomAttributes( | ||
typeof(AssemblyProductAttribute)).First() as AssemblyProductAttribute)?.Product ?? ""; | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
using Microsoft.Win32; | ||
using System; | ||
|
||
public class RegistryHelp | ||
{ | ||
public static string ApplicationKey { get; } = @"HKCU\Software\" + AppHelp.ProductName; | ||
|
||
public static void SetValue(string path, string? name, object value) | ||
{ | ||
using (RegistryKey? regKey = GetRootKey(path).CreateSubKey(path.Substring(5), RegistryKeyPermissionCheck.ReadWriteSubTree)) | ||
regKey?.SetValue(name, value); | ||
} | ||
|
||
public static string GetString(string path, string? name, string defaultValue = "") | ||
{ | ||
object? value = GetValue(path, name, defaultValue); | ||
return value is string ? (string)value : defaultValue ; | ||
} | ||
|
||
public static bool GetBool(string path, string? name, bool defaultValue = false) | ||
{ | ||
object? val = GetValue(path, name, defaultValue); | ||
return val is bool ? (bool)val : defaultValue; | ||
} | ||
|
||
public static int GetInt(string path, string? name, int defaultValue = 0) | ||
{ | ||
object? val = GetValue(path, name, defaultValue); | ||
return val is int ? (int)val : defaultValue; | ||
} | ||
|
||
public static object? GetValue(string path, string? name, object? defaultValue = null) | ||
{ | ||
using (RegistryKey? regKey = GetRootKey(path).OpenSubKey(path.Substring(5))) | ||
return regKey == null ? defaultValue : regKey.GetValue(name, defaultValue); | ||
} | ||
|
||
public static void RemoveKey(string path) | ||
{ | ||
GetRootKey(path).DeleteSubKeyTree(path.Substring(5), false); | ||
} | ||
|
||
public static void RemoveValue(string path, string name) | ||
{ | ||
using (RegistryKey? regKey = GetRootKey(path).OpenSubKey(path.Substring(5), true)) | ||
regKey?.DeleteValue(name, false); | ||
} | ||
|
||
static RegistryKey GetRootKey(string path) | ||
{ | ||
switch (path.Substring(0, 4)) | ||
{ | ||
case "HKLM": return Registry.LocalMachine; | ||
case "HKCU": return Registry.CurrentUser; | ||
case "HKCR": return Registry.ClassesRoot; | ||
default: throw new Exception("unknown reg root"); | ||
} | ||
} | ||
} |
Oops, something went wrong.