From e409e2683433ceae2387ab8a2046a3fe3bf759e8 Mon Sep 17 00:00:00 2001 From: Aaron-P Date: Thu, 24 Aug 2023 15:58:13 -0500 Subject: [PATCH] Init. --- .editorconfig | 164 ++++++++ .gitattributes | 63 +++ .gitignore | 368 ++++++++++++++++++ KeePassStringFieldsPasswordFont.sln | 33 ++ .../KeePassStringFieldsPasswordFont.csproj | 139 +++++++ .../KeePassStringFieldsPasswordFont.xml | 30 ++ .../KeePassStringFieldsPasswordFontExt.cs | 76 ++++ .../Properties/AssemblyInfo.cs | 50 +++ .../packages.config | 12 + KeePassStringFieldsPasswordFont/stylecop.json | 15 + LICENSE.md | 25 ++ README.md | 1 + version.txt | 3 + 13 files changed, 979 insertions(+) create mode 100644 .editorconfig create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 KeePassStringFieldsPasswordFont.sln create mode 100644 KeePassStringFieldsPasswordFont/KeePassStringFieldsPasswordFont.csproj create mode 100644 KeePassStringFieldsPasswordFont/KeePassStringFieldsPasswordFont.xml create mode 100644 KeePassStringFieldsPasswordFont/KeePassStringFieldsPasswordFontExt.cs create mode 100644 KeePassStringFieldsPasswordFont/Properties/AssemblyInfo.cs create mode 100644 KeePassStringFieldsPasswordFont/packages.config create mode 100644 KeePassStringFieldsPasswordFont/stylecop.json create mode 100644 LICENSE.md create mode 100644 README.md create mode 100644 version.txt diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..54da871 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,164 @@ + +[*.{cs,vb}] +#### Naming styles #### + +# Naming rules + +dotnet_naming_rule.interface_should_be_begins_with_i.severity = suggestion +dotnet_naming_rule.interface_should_be_begins_with_i.symbols = interface +dotnet_naming_rule.interface_should_be_begins_with_i.style = begins_with_i + +dotnet_naming_rule.types_should_be_pascal_case.severity = suggestion +dotnet_naming_rule.types_should_be_pascal_case.symbols = types +dotnet_naming_rule.types_should_be_pascal_case.style = pascal_case + +dotnet_naming_rule.non_field_members_should_be_pascal_case.severity = suggestion +dotnet_naming_rule.non_field_members_should_be_pascal_case.symbols = non_field_members +dotnet_naming_rule.non_field_members_should_be_pascal_case.style = pascal_case + +# Symbol specifications + +dotnet_naming_symbols.interface.applicable_kinds = interface +dotnet_naming_symbols.interface.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected +dotnet_naming_symbols.interface.required_modifiers = + +dotnet_naming_symbols.types.applicable_kinds = class, struct, interface, enum +dotnet_naming_symbols.types.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected +dotnet_naming_symbols.types.required_modifiers = + +dotnet_naming_symbols.non_field_members.applicable_kinds = property, event, method +dotnet_naming_symbols.non_field_members.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected +dotnet_naming_symbols.non_field_members.required_modifiers = + +# Naming styles + +dotnet_naming_style.begins_with_i.required_prefix = I +dotnet_naming_style.begins_with_i.required_suffix = +dotnet_naming_style.begins_with_i.word_separator = +dotnet_naming_style.begins_with_i.capitalization = pascal_case + +dotnet_naming_style.pascal_case.required_prefix = +dotnet_naming_style.pascal_case.required_suffix = +dotnet_naming_style.pascal_case.word_separator = +dotnet_naming_style.pascal_case.capitalization = pascal_case + +dotnet_naming_style.pascal_case.required_prefix = +dotnet_naming_style.pascal_case.required_suffix = +dotnet_naming_style.pascal_case.word_separator = +dotnet_naming_style.pascal_case.capitalization = pascal_case +dotnet_style_operator_placement_when_wrapping = beginning_of_line +tab_width = 4 +indent_size = 4 +end_of_line = crlf +dotnet_style_coalesce_expression = true:suggestion +dotnet_style_null_propagation = true:suggestion +dotnet_style_prefer_is_null_check_over_reference_equality_method = true:suggestion +dotnet_style_prefer_auto_properties = true:silent +dotnet_style_object_initializer = true:suggestion +dotnet_style_collection_initializer = true:suggestion +dotnet_style_prefer_simplified_boolean_expressions = true:suggestion +dotnet_style_prefer_conditional_expression_over_assignment = true:silent +dotnet_style_prefer_conditional_expression_over_return = true:silent +dotnet_style_explicit_tuple_names = true:suggestion +dotnet_style_prefer_inferred_tuple_names = true:suggestion +dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion +dotnet_style_prefer_compound_assignment = true:suggestion +dotnet_style_prefer_simplified_interpolation = true:suggestion +dotnet_style_namespace_match_folder = true:suggestion +dotnet_style_readonly_field = true:suggestion +dotnet_style_predefined_type_for_locals_parameters_members = true:silent +dotnet_style_predefined_type_for_member_access = true:silent +dotnet_style_require_accessibility_modifiers = for_non_interface_members:silent +dotnet_style_allow_multiple_blank_lines_experimental = true:silent +dotnet_style_allow_statement_immediately_after_block_experimental = true:silent +dotnet_code_quality_unused_parameters = all:suggestion +dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:silent +dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:silent +dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:silent +dotnet_style_parentheses_in_other_operators = never_if_unnecessary:silent +dotnet_style_qualification_for_field = false:silent +dotnet_style_qualification_for_property = false:silent +dotnet_style_qualification_for_method = false:silent +dotnet_style_qualification_for_event = false:silent +dotnet_diagnostic.CA5350.severity = warning +dotnet_diagnostic.CA5351.severity = error +dotnet_diagnostic.CA5359.severity = warning +dotnet_diagnostic.CA5360.severity = warning +dotnet_diagnostic.CA5363.severity = warning +dotnet_diagnostic.CA5364.severity = warning +dotnet_diagnostic.CA5397.severity = warning +dotnet_diagnostic.CA1708.severity = suggestion +dotnet_diagnostic.CA5373.severity = warning +dotnet_diagnostic.CA5379.severity = warning +dotnet_diagnostic.CA5384.severity = error +dotnet_diagnostic.CA5385.severity = warning +dotnet_diagnostic.CA3147.severity = warning +dotnet_diagnostic.CA3076.severity = warning +dotnet_diagnostic.CA3061.severity = warning +dotnet_diagnostic.CA3075.severity = warning +dotnet_diagnostic.CA3077.severity = warning +dotnet_diagnostic.CA5365.severity = warning +dotnet_diagnostic.CA5366.severity = warning +dotnet_diagnostic.CA5368.severity = warning +dotnet_diagnostic.CA5369.severity = warning +dotnet_diagnostic.CA5370.severity = warning +dotnet_diagnostic.CA5371.severity = warning +dotnet_diagnostic.CA5372.severity = warning +dotnet_diagnostic.CA5374.severity = warning + +[*.cs] +csharp_indent_labels = one_less_than_current +csharp_using_directive_placement = outside_namespace:silent +csharp_prefer_simple_using_statement = true:suggestion +csharp_prefer_braces = false:silent +csharp_style_namespace_declarations = block_scoped:silent +csharp_style_prefer_method_group_conversion = true:silent +csharp_style_prefer_top_level_statements = true:silent +csharp_style_prefer_primary_constructors = true:suggestion +csharp_style_expression_bodied_methods = when_on_single_line:silent +csharp_style_expression_bodied_constructors = false:silent +csharp_style_expression_bodied_operators = false:silent +csharp_style_expression_bodied_properties = true:silent +csharp_style_expression_bodied_indexers = true:silent +csharp_style_expression_bodied_accessors = true:silent +csharp_style_expression_bodied_lambdas = true:silent +csharp_style_expression_bodied_local_functions = false:silent +csharp_space_around_binary_operators = before_and_after +csharp_style_throw_expression = true:suggestion +csharp_prefer_simple_default_expression = true:suggestion +csharp_style_prefer_null_check_over_type_check = true:suggestion +csharp_style_prefer_index_operator = true:suggestion +csharp_style_prefer_local_over_anonymous_function = true:suggestion +csharp_style_prefer_range_operator = true:suggestion +csharp_style_implicit_object_creation_when_type_is_apparent = true:suggestion +csharp_style_prefer_tuple_swap = true:suggestion +csharp_style_prefer_utf8_string_literals = true:suggestion +csharp_style_deconstructed_variable_declaration = true:suggestion +csharp_style_inlined_variable_declaration = true:suggestion +csharp_style_unused_value_expression_statement_preference = discard_variable:silent +csharp_style_unused_value_assignment_preference = discard_variable:suggestion +csharp_prefer_static_local_function = true:suggestion +csharp_style_prefer_readonly_struct = true:suggestion +csharp_style_prefer_readonly_struct_member = true:suggestion +csharp_style_allow_embedded_statements_on_same_line_experimental = true:silent +csharp_style_allow_blank_lines_between_consecutive_braces_experimental = true:silent +csharp_style_allow_blank_line_after_colon_in_constructor_initializer_experimental = true:silent +csharp_style_allow_blank_line_after_token_in_conditional_expression_experimental = true:silent +csharp_style_allow_blank_line_after_token_in_arrow_expression_clause_experimental = true:silent +csharp_style_conditional_delegate_call = true:suggestion +csharp_style_prefer_switch_expression = true:suggestion +csharp_style_prefer_pattern_matching = true:silent +csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion +csharp_style_pattern_matching_over_as_with_null_check = true:suggestion +csharp_style_prefer_not_pattern = true:suggestion +csharp_style_prefer_extended_property_pattern = true:suggestion +csharp_style_var_for_built_in_types = false:silent +csharp_style_var_when_type_is_apparent = false:silent +csharp_style_var_elsewhere = false:silent +dotnet_diagnostic.SA1503.severity = silent +dotnet_diagnostic.SA1208.severity = silent +dotnet_diagnostic.SA1101.severity = silent +dotnet_diagnostic.CA1001.severity = silent +dotnet_diagnostic.RCS1010.severity = suggestion +dotnet_diagnostic.RCS1177.severity = suggestion +dotnet_diagnostic.RCS1176.severity = suggestion \ No newline at end of file diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..1ff0c42 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,63 @@ +############################################################################### +# Set default behavior to automatically normalize line endings. +############################################################################### +* text=auto + +############################################################################### +# Set default behavior for command prompt diff. +# +# This is need for earlier builds of msysgit that does not have it on by +# default for csharp files. +# Note: This is only used by command line +############################################################################### +#*.cs diff=csharp + +############################################################################### +# Set the merge driver for project and solution files +# +# Merging from the command prompt will add diff markers to the files if there +# are conflicts (Merging from VS is not affected by the settings below, in VS +# the diff markers are never inserted). Diff markers may cause the following +# file extensions to fail to load in VS. An alternative would be to treat +# these files as binary and thus will always conflict and require user +# intervention with every merge. To do so, just uncomment the entries below +############################################################################### +#*.sln merge=binary +#*.csproj merge=binary +#*.vbproj merge=binary +#*.vcxproj merge=binary +#*.vcproj merge=binary +#*.dbproj merge=binary +#*.fsproj merge=binary +#*.lsproj merge=binary +#*.wixproj merge=binary +#*.modelproj merge=binary +#*.sqlproj merge=binary +#*.wwaproj merge=binary + +############################################################################### +# behavior for image files +# +# image files are treated as binary by default. +############################################################################### +#*.jpg binary +#*.png binary +#*.gif binary + +############################################################################### +# diff behavior for common document formats +# +# Convert binary document formats to text before diffing them. This feature +# is only available from the command line. Turn it on by uncommenting the +# entries below. +############################################################################### +#*.doc diff=astextplain +#*.DOC diff=astextplain +#*.docx diff=astextplain +#*.DOCX diff=astextplain +#*.dot diff=astextplain +#*.DOT diff=astextplain +#*.pdf diff=astextplain +#*.PDF diff=astextplain +#*.rtf diff=astextplain +#*.RTF diff=astextplain diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1f9bc19 --- /dev/null +++ b/.gitignore @@ -0,0 +1,368 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore + +# User-specific files +*.rsuser +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Mono auto generated files +mono_crash.* + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +[Ww][Ii][Nn]32/ +[Aa][Rr][Mm]/ +[Aa][Rr][Mm]64/ +bld/ +[Bb]in/ +[Oo]bj/ +[Oo]ut/ +[Ll]og/ +[Ll]ogs/ + +# Visual Studio 2015/2017 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# Visual Studio 2017 auto generated files +Generated\ Files/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUnit +*.VisualState.xml +TestResult.xml +nunit-*.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ + +# ASP.NET Scaffolding +ScaffoldingReadMe.txt + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_h.h +*.ilk +*.meta +*.obj +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*_wpftmp.csproj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Coverlet is a free, cross platform Code Coverage Tool +coverage*.json +coverage*.xml +coverage*.info + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# NuGet Symbol Packages +*.snupkg +# The packages folder can be ignored because of Package Restore +**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx +*.appxbundle +*.appxupload + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!?*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser +*- [Bb]ackup.rdl +*- [Bb]ackup ([0-9]).rdl +*- [Bb]ackup ([0-9][0-9]).rdl + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# CodeRush personal settings +.cr/personal + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +.mfractor/ + +# Local History for Visual Studio +.localhistory/ + +# BeatPulse healthcheck temp database +healthchecksdb + +# Backup folder for Package Reference Convert tool in Visual Studio 2017 +MigrationBackup/ + +# Ionide (cross platform F# VS Code tools) working folder +.ionide/ + +# Fody - auto-generated XML schema +FodyWeavers.xsd + +#Project Specific +*/apackages/ +dist/* +KeePass-2.54/* diff --git a/KeePassStringFieldsPasswordFont.sln b/KeePassStringFieldsPasswordFont.sln new file mode 100644 index 0000000..426914b --- /dev/null +++ b/KeePassStringFieldsPasswordFont.sln @@ -0,0 +1,33 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.7.34009.444 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "KeePassStringFieldsPasswordFont", "KeePassStringFieldsPasswordFont\KeePassStringFieldsPasswordFont.csproj", "{DB82E00E-6A30-47CC-981C-393B7D093170}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{794169FA-47FB-4178-AA83-75ED273F538B}" + ProjectSection(SolutionItems) = preProject + .editorconfig = .editorconfig + .gitattributes = .gitattributes + .gitignore = .gitignore + version.txt = version.txt + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {DB82E00E-6A30-47CC-981C-393B7D093170}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DB82E00E-6A30-47CC-981C-393B7D093170}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DB82E00E-6A30-47CC-981C-393B7D093170}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DB82E00E-6A30-47CC-981C-393B7D093170}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {399C53CC-2720-4BCD-9DF0-30DBF0BEB402} + EndGlobalSection +EndGlobal diff --git a/KeePassStringFieldsPasswordFont/KeePassStringFieldsPasswordFont.csproj b/KeePassStringFieldsPasswordFont/KeePassStringFieldsPasswordFont.csproj new file mode 100644 index 0000000..09ad352 --- /dev/null +++ b/KeePassStringFieldsPasswordFont/KeePassStringFieldsPasswordFont.csproj @@ -0,0 +1,139 @@ + + + + + + + 5 + + + + + Debug + AnyCPU + {DB82E00E-6A30-47CC-981C-393B7D093170} + Library + Properties + KeePassStringFieldsPasswordFont + KeePassStringFieldsPasswordFont + v4.7.2 + 512 + true + + + + true + embedded + false + bin\Debug\ + DEBUG;TRACE + none + 4 + false + KeePassStringFieldsPasswordFont.xml + true + AllRules.ruleset + false + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + false + + + + ..\KeePass-2.54\KeePass.exe + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + del "$(SolutionDir)dist\$(TargetFileName)" +copy /Y "$(TargetPath)" "$(SolutionDir)dist" + +del "$(SolutionDir)dist\$(ProjectName).plgx" +rmdir "$(SolutionDir)dist\$(ProjectName)" /S /Q +robocopy "$(SolutionDir)$(ProjectName)" "$(SolutionDir)dist\$(ProjectName)" /E +rmdir "$(SolutionDir)dist\$(ProjectName)\bin" /S /Q +rmdir "$(SolutionDir)dist\$(ProjectName)\obj" /S /Q +"$(SolutionDir)KeePass-2.54\KeePass.exe" --plgx-create "$(SolutionDir)dist\$(ProjectName)" +rmdir "$(SolutionDir)dist\$(ProjectName)" /S /Q + + + + + This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + + + + + + + [assembly: System.Reflection.AssemblyInformationalVersion("$(SourceRevisionId)")] + + + + + + + + \ No newline at end of file diff --git a/KeePassStringFieldsPasswordFont/KeePassStringFieldsPasswordFont.xml b/KeePassStringFieldsPasswordFont/KeePassStringFieldsPasswordFont.xml new file mode 100644 index 0000000..7dab36b --- /dev/null +++ b/KeePassStringFieldsPasswordFont/KeePassStringFieldsPasswordFont.xml @@ -0,0 +1,30 @@ + + + + KeePassStringFieldsPasswordFont + + + + + The main KeePass plugin class. + + + + + Gets the url to check for the latest plugin version information. + + + + + Initializes the KeePass plugin. + + An object. + if initialization was successful; otherwise, . + + + + Terminates the KeePass plugin. + + + + diff --git a/KeePassStringFieldsPasswordFont/KeePassStringFieldsPasswordFontExt.cs b/KeePassStringFieldsPasswordFont/KeePassStringFieldsPasswordFontExt.cs new file mode 100644 index 0000000..ca8d9f3 --- /dev/null +++ b/KeePassStringFieldsPasswordFont/KeePassStringFieldsPasswordFontExt.cs @@ -0,0 +1,76 @@ +// +// Copyright (c) 2023 Aaron Papp. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for details. +// + +using KeePass.Forms; +using KeePass.Plugins; +using KeePass.UI; +using System; +using System.Linq; + +namespace KeePassStringFieldsPasswordFont +{ + /// + /// The main KeePass plugin class. + /// + public class KeePassStringFieldsPasswordFontExt : Plugin + { +#pragma warning disable S1075 // URIs should not be hardcoded + private static readonly Uri UpdateUri = new Uri("https://raw.githubusercontent.com/Aaron-P/KeePassStringFieldsPasswordFont/master/version.txt", UriKind.Absolute); +#pragma warning restore S1075 // URIs should not be hardcoded + + private IPluginHost host; + + /// + /// Gets the url to check for the latest plugin version information. + /// + public override string UpdateUrl + { + get + { + return UpdateUri.AbsoluteUri; + } + } + + /// + /// Initializes the KeePass plugin. + /// + /// An object. + /// if initialization was successful; otherwise, . + public override bool Initialize(IPluginHost host) + { + if (host == null) + return false; + + this.host = host; + GlobalWindowManager.WindowAdded += GlobalWindowManager_WindowAdded; + return true; + } + + /// + /// Terminates the KeePass plugin. + /// + public override void Terminate() + { + if (host == null) + return; + + GlobalWindowManager.WindowAdded -= GlobalWindowManager_WindowAdded; + host = null; + } + + private void GlobalWindowManager_WindowAdded(object sender, GwmWindowEventArgs e) + { + if (!(e.Form is EditStringForm)) + return; + + // this.m_rtbValue.Name = "m_rtbValue" on .\KeePass-2.54-Source\KeePass\Forms\EditStringForm.Designer.cs#L88 + var control = e.Form.Controls.Find("m_rtbValue", true).SingleOrDefault(); + if (control == null) + return; + + FontUtil.AssignDefaultMono(control, true); + } + } +} diff --git a/KeePassStringFieldsPasswordFont/Properties/AssemblyInfo.cs b/KeePassStringFieldsPasswordFont/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..c428d70 --- /dev/null +++ b/KeePassStringFieldsPasswordFont/Properties/AssemblyInfo.cs @@ -0,0 +1,50 @@ +// +// Copyright (c) 2023 Aaron Papp. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for details. +// + +using System; +using System.Reflection; +using System.Resources; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("KeePassStringFieldsPasswordFont")] +[assembly: AssemblyDescription("Use the password font in the KeePass 'string fields' text box.")] +[assembly: AssemblyCompany("Aaron Papp")] +[assembly: AssemblyProduct("KeePass Plugin")] +[assembly: AssemblyCopyright("Copyright © Aaron Papp 2023")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// I'm not a fan of this but I don't know if we can use dynamically generated classes in the .plgx version. +#if DEBUG +[assembly: AssemblyConfiguration("Debug")] +#else +[assembly: AssemblyConfiguration("Release")] +#endif + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] +[assembly: CLSCompliant(false)] +[assembly: NeutralResourcesLanguage("en-US")] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("db82e00e-6a30-47cc-981c-393b7d093170")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/KeePassStringFieldsPasswordFont/packages.config b/KeePassStringFieldsPasswordFont/packages.config new file mode 100644 index 0000000..d867f06 --- /dev/null +++ b/KeePassStringFieldsPasswordFont/packages.config @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/KeePassStringFieldsPasswordFont/stylecop.json b/KeePassStringFieldsPasswordFont/stylecop.json new file mode 100644 index 0000000..bb826cf --- /dev/null +++ b/KeePassStringFieldsPasswordFont/stylecop.json @@ -0,0 +1,15 @@ +{ + "$schema": "https://raw.githubusercontent.com/DotNetAnalyzers/StyleCopAnalyzers/master/StyleCop.Analyzers/StyleCop.Analyzers/Settings/stylecop.schema.json", + "settings": { + "documentationRules": { + "companyName": "Aaron Papp", + "copyrightText": "Copyright (c) {licenseYears} {companyName}. All rights reserved.\nLicensed under the MIT license. See LICENSE file in the project root for details.", + "variables": { + "licenseYears": "2023" + } + }, + "orderingRules": { + "usingDirectivesPlacement": "preserve" + } + } +} diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 0000000..33f29a9 --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,25 @@ +The MIT License (MIT) +===================== + +Copyright © 2023 Aaron Papp + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated 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. diff --git a/README.md b/README.md new file mode 100644 index 0000000..7c30cbc --- /dev/null +++ b/README.md @@ -0,0 +1 @@ +A simple KeePass plugin to use the configured password font in the KeePass 'string fields' text box. diff --git a/version.txt b/version.txt new file mode 100644 index 0000000..619f679 --- /dev/null +++ b/version.txt @@ -0,0 +1,3 @@ +: +KeePassStringFieldsPasswordFont:1.0.0 +: \ No newline at end of file