From de3f6c2e98a4dd67abb3714565ce2e40c9a2d1cf Mon Sep 17 00:00:00 2001 From: Chris Kaczor Date: Fri, 27 Feb 2026 12:17:48 -0500 Subject: [PATCH] Add template project --- FloatingStatusWindow.sln | 18 +- Template/.github/workflows/main.yml | 36 ++ Template/.gitignore | 398 ++++++++++++++++++ Template/App.config | 27 ++ Template/App.xaml | 7 + Template/App.xaml.cs | 38 ++ Template/Data.cs | 21 + Template/DataErrorDictionary.cs | 42 ++ Template/ItemEntry.cs | 58 +++ Template/Program.cs | 27 ++ Template/Properties/Resources.Designer.cs | 374 ++++++++++++++++ Template/Properties/Resources.resx | 227 ++++++++++ Template/Properties/Settings.Designer.cs | 74 ++++ Template/Properties/Settings.settings | 18 + Template/README.md | 1 + Template/Resources/Application.ico | Bin 0 -> 10134 bytes .../SettingsWindow/AboutSettingsPanel.xaml | 21 + .../SettingsWindow/AboutSettingsPanel.xaml.cs | 12 + .../SettingsWindow/GeneralSettingsPanel.xaml | 16 + .../GeneralSettingsPanel.xaml.cs | 36 ++ Template/SettingsWindow/ItemWindow.xaml | 78 ++++ Template/SettingsWindow/ItemWindow.xaml.cs | 41 ++ .../SettingsWindow/ItemsSettingsPanel.xaml | 90 ++++ .../SettingsWindow/ItemsSettingsPanel.xaml.cs | 112 +++++ .../SettingsWindow/UpdateSettingsPanel.xaml | 22 + .../UpdateSettingsPanel.xaml.cs | 38 ++ Template/Template.csproj | 57 +++ Template/UpdateCheck.cs | 50 +++ Template/WindowSource.cs | 173 ++++++++ 29 files changed, 2110 insertions(+), 2 deletions(-) create mode 100644 Template/.github/workflows/main.yml create mode 100644 Template/.gitignore create mode 100644 Template/App.config create mode 100644 Template/App.xaml create mode 100644 Template/App.xaml.cs create mode 100644 Template/Data.cs create mode 100644 Template/DataErrorDictionary.cs create mode 100644 Template/ItemEntry.cs create mode 100644 Template/Program.cs create mode 100644 Template/Properties/Resources.Designer.cs create mode 100644 Template/Properties/Resources.resx create mode 100644 Template/Properties/Settings.Designer.cs create mode 100644 Template/Properties/Settings.settings create mode 100644 Template/README.md create mode 100644 Template/Resources/Application.ico create mode 100644 Template/SettingsWindow/AboutSettingsPanel.xaml create mode 100644 Template/SettingsWindow/AboutSettingsPanel.xaml.cs create mode 100644 Template/SettingsWindow/GeneralSettingsPanel.xaml create mode 100644 Template/SettingsWindow/GeneralSettingsPanel.xaml.cs create mode 100644 Template/SettingsWindow/ItemWindow.xaml create mode 100644 Template/SettingsWindow/ItemWindow.xaml.cs create mode 100644 Template/SettingsWindow/ItemsSettingsPanel.xaml create mode 100644 Template/SettingsWindow/ItemsSettingsPanel.xaml.cs create mode 100644 Template/SettingsWindow/UpdateSettingsPanel.xaml create mode 100644 Template/SettingsWindow/UpdateSettingsPanel.xaml.cs create mode 100644 Template/Template.csproj create mode 100644 Template/UpdateCheck.cs create mode 100644 Template/WindowSource.cs diff --git a/FloatingStatusWindow.sln b/FloatingStatusWindow.sln index 14f3e6f..f5ffbf0 100644 --- a/FloatingStatusWindow.sln +++ b/FloatingStatusWindow.sln @@ -1,6 +1,6 @@ Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 17 -VisualStudioVersion = 17.5.33530.505 +# Visual Studio Version 18 +VisualStudioVersion = 18.4.11519.219 insiders MinimumVisualStudioVersion = 10.0.40219.1 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FloatingStatusWindow", "Library\FloatingStatusWindow.csproj", "{F023A16C-2F13-4A87-A8B7-22C43C4A58A4}" EndProject @@ -13,6 +13,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution", "Solution", "{C4 README.md = README.md EndProjectSection EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Template", "Template\Template.csproj", "{1F53FF5D-F943-1098-0F7F-B890BC359E46}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -39,6 +41,18 @@ Global {0C541788-8FFD-47B6-8E6B-653A884CFA55}.Release|Any CPU.Build.0 = Release|Any CPU {0C541788-8FFD-47B6-8E6B-653A884CFA55}.Release|x64.ActiveCfg = Release|Any CPU {0C541788-8FFD-47B6-8E6B-653A884CFA55}.Release|x86.ActiveCfg = Release|Any CPU + {1F53FF5D-F943-1098-0F7F-B890BC359E46}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1F53FF5D-F943-1098-0F7F-B890BC359E46}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1F53FF5D-F943-1098-0F7F-B890BC359E46}.Debug|x64.ActiveCfg = Debug|Any CPU + {1F53FF5D-F943-1098-0F7F-B890BC359E46}.Debug|x64.Build.0 = Debug|Any CPU + {1F53FF5D-F943-1098-0F7F-B890BC359E46}.Debug|x86.ActiveCfg = Debug|Any CPU + {1F53FF5D-F943-1098-0F7F-B890BC359E46}.Debug|x86.Build.0 = Debug|Any CPU + {1F53FF5D-F943-1098-0F7F-B890BC359E46}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1F53FF5D-F943-1098-0F7F-B890BC359E46}.Release|Any CPU.Build.0 = Release|Any CPU + {1F53FF5D-F943-1098-0F7F-B890BC359E46}.Release|x64.ActiveCfg = Release|Any CPU + {1F53FF5D-F943-1098-0F7F-B890BC359E46}.Release|x64.Build.0 = Release|Any CPU + {1F53FF5D-F943-1098-0F7F-B890BC359E46}.Release|x86.ActiveCfg = Release|Any CPU + {1F53FF5D-F943-1098-0F7F-B890BC359E46}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/Template/.github/workflows/main.yml b/Template/.github/workflows/main.yml new file mode 100644 index 0000000..515f367 --- /dev/null +++ b/Template/.github/workflows/main.yml @@ -0,0 +1,36 @@ +name: Deploy to GitHub Releases + +on: + push: + branches: + - main + + workflow_dispatch: + +jobs: + deploy-to-github-releases: + runs-on: windows-latest + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + + - name: Get next version + uses: reecetech/version-increment@2024.4.3 + id: version + with: + scheme: calver + + - name: Install .NET + uses: actions/setup-dotnet@v4 + with: + dotnet-version: 10.0.x + + - name: Publish Application + run: dotnet publish Template.csproj -c Release -o publish + + - name: Create Velopack Release + run: | + dotnet tool install -g vpk + vpk download github --repoUrl https://github.com/user/Template + vpk pack -u Template -v ${{ steps.version.outputs.version }} -p publish --packTitle "Template Status Window" --shortcuts StartMenuRoot --framework net10.0-x64-desktop + vpk upload github --repoUrl https://github.com/user/Template --publish --releaseName "${{ steps.version.outputs.version }}" --tag v${{ steps.version.outputs.version }} --token ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/Template/.gitignore b/Template/.gitignore new file mode 100644 index 0000000..8a30d25 --- /dev/null +++ b/Template/.gitignore @@ -0,0 +1,398 @@ +## 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/main/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/ +[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 +*.tlog +*.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 6 auto-generated project file (contains which files were open etc.) +*.vbp + +# Visual Studio 6 workspace and project file (working project files containing files to include in project) +*.dsw +*.dsp + +# Visual Studio 6 technical files +*.ncb +*.aps + +# 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/ + +# Visual Studio History (VSHistory) files +.vshistory/ + +# 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 + +# VS Code files for those working on multiple tools +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json +*.code-workspace + +# Local History for Visual Studio Code +.history/ + +# Windows Installer files from build outputs +*.cab +*.msi +*.msix +*.msm +*.msp + +# JetBrains Rider +*.sln.iml diff --git a/Template/App.config b/Template/App.config new file mode 100644 index 0000000..80dc6e5 --- /dev/null +++ b/Template/App.config @@ -0,0 +1,27 @@ + + + + +
+ + + + + + + + + + + + True + + + True + + + [] + + + + \ No newline at end of file diff --git a/Template/App.xaml b/Template/App.xaml new file mode 100644 index 0000000..0a3a050 --- /dev/null +++ b/Template/App.xaml @@ -0,0 +1,7 @@ + + + + + diff --git a/Template/App.xaml.cs b/Template/App.xaml.cs new file mode 100644 index 0000000..c007d04 --- /dev/null +++ b/Template/App.xaml.cs @@ -0,0 +1,38 @@ +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Windows; +using ChrisKaczor.Wpf.Windows.FloatingStatusWindow; +using Template.Properties; + +namespace Template; + +public partial class App +{ + private List _windowSourceList; + + protected override void OnStartup(StartupEventArgs e) + { + base.OnStartup(e); + + StartManager.ManageAutoStart = true; + StartManager.AutoStartEnabled = !Debugger.IsAttached && Settings.Default.AutoStart; + StartManager.AutoStartChanged += (value => + { + Settings.Default.AutoStart = value; + Settings.Default.Save(); + }); + + _windowSourceList = + [ + new WindowSource() + ]; + } + + protected override void OnExit(ExitEventArgs e) + { + _windowSourceList.ForEach(ws => ws.Dispose()); + + base.OnExit(e); + } +} \ No newline at end of file diff --git a/Template/Data.cs b/Template/Data.cs new file mode 100644 index 0000000..f858271 --- /dev/null +++ b/Template/Data.cs @@ -0,0 +1,21 @@ +using System.Collections.ObjectModel; +using System.Text.Json; +using Template.Properties; + +namespace Template; + +internal static class Data +{ + internal static ObservableCollection ItemEntries { get; private set; } + + internal static void Load() + { + ItemEntries = JsonSerializer.Deserialize>(Settings.Default.Items); + } + + internal static void Save() + { + Settings.Default.Items = JsonSerializer.Serialize(ItemEntries); + Settings.Default.Save(); + } +} \ No newline at end of file diff --git a/Template/DataErrorDictionary.cs b/Template/DataErrorDictionary.cs new file mode 100644 index 0000000..91beed4 --- /dev/null +++ b/Template/DataErrorDictionary.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.ComponentModel; + +namespace Template; + +internal class DataErrorDictionary : Dictionary> +{ + public event EventHandler ErrorsChanged; + + private void OnErrorsChanged(string propertyName) + { + ErrorsChanged?.Invoke(this, new DataErrorsChangedEventArgs(propertyName)); + } + + public IEnumerable GetErrors(string propertyName) + { + return TryGetValue(propertyName, out var value) ? value : null; + } + + public void AddError(string propertyName, string error) + { + if (!ContainsKey(propertyName)) + this[propertyName] = []; + + if (this[propertyName].Contains(error)) + return; + + this[propertyName].Add(error); + OnErrorsChanged(propertyName); + } + + public void ClearErrors(string propertyName) + { + if (!ContainsKey(propertyName)) + return; + + Remove(propertyName); + OnErrorsChanged(propertyName); + } +} \ No newline at end of file diff --git a/Template/ItemEntry.cs b/Template/ItemEntry.cs new file mode 100644 index 0000000..80895c2 --- /dev/null +++ b/Template/ItemEntry.cs @@ -0,0 +1,58 @@ +using System; +using System.Collections; +using System.ComponentModel; +using System.Linq; +using System.Text.Json.Serialization; + +namespace Template; + +public class ItemEntry : INotifyDataErrorInfo +{ + private readonly DataErrorDictionary _dataErrorDictionary; + + public ItemEntry() + { + _dataErrorDictionary = new DataErrorDictionary(); + _dataErrorDictionary.ErrorsChanged += DataErrorDictionaryErrorsChanged; + } + + public string Name + { + get; + set + { + if (!ValidateName(value)) + return; + + field = value; + } + } + + [JsonIgnore] + public bool HasErrors => _dataErrorDictionary.Any(); + + + public IEnumerable GetErrors(string propertyName) + { + return _dataErrorDictionary.GetErrors(propertyName); + } + + public event EventHandler ErrorsChanged; + + private void DataErrorDictionaryErrorsChanged(object sender, DataErrorsChangedEventArgs e) + { + ErrorsChanged?.Invoke(this, new DataErrorsChangedEventArgs(e.PropertyName)); + } + + private bool ValidateName(string newValue) + { + _dataErrorDictionary.ClearErrors(nameof(Name)); + + if (!string.IsNullOrWhiteSpace(newValue)) + return true; + + _dataErrorDictionary.AddError(nameof(Name), "Name cannot be empty"); + + return false; + } +} \ No newline at end of file diff --git a/Template/Program.cs b/Template/Program.cs new file mode 100644 index 0000000..11e3438 --- /dev/null +++ b/Template/Program.cs @@ -0,0 +1,27 @@ +using System; +using Microsoft.Extensions.Logging; +using Serilog; +using Velopack; + +namespace Template; + +internal class Program +{ + [STAThread] + public static void Main(string[] args) + { + Log.Logger = new LoggerConfiguration().WriteTo.File("log.txt").CreateLogger(); + + Log.Logger.Information("Start"); + + var loggerFactory = new LoggerFactory().AddSerilog(Log.Logger); + + VelopackApp.Build().Run(loggerFactory.CreateLogger("Install")); + + var app = new App(); + app.InitializeComponent(); + app.Run(); + + Log.Logger.Information("End"); + } +} \ No newline at end of file diff --git a/Template/Properties/Resources.Designer.cs b/Template/Properties/Resources.Designer.cs new file mode 100644 index 0000000..6db8a91 --- /dev/null +++ b/Template/Properties/Resources.Designer.cs @@ -0,0 +1,374 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Template.Properties { + using System; + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "18.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + public class Resources { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + public static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Template.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + public static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Looks up a localized string similar to Add. + /// + public static string AddItemLink { + get { + return ResourceManager.GetString("AddItemLink", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Add Item. + /// + public static string AddItemToolTip { + get { + return ResourceManager.GetString("AddItemToolTip", resourceCulture); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Icon similar to (Icon). + /// + public static System.Drawing.Icon ApplicationIcon { + get { + object obj = ResourceManager.GetObject("ApplicationIcon", resourceCulture); + return ((System.Drawing.Icon)(obj)); + } + } + + /// + /// Looks up a localized string similar to Template Status Window. + /// + public static string ApplicationName { + get { + return ResourceManager.GetString("ApplicationName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cancel. + /// + public static string CancelButton { + get { + return ResourceManager.GetString("CancelButton", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Checking for update.... + /// + public static string CheckingForUpdate { + get { + return ResourceManager.GetString("CheckingForUpdate", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to _Check for Update. + /// + public static string CheckUpdate { + get { + return ResourceManager.GetString("CheckUpdate", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Check _Now. + /// + public static string checkVersionNowButton { + get { + return ResourceManager.GetString("checkVersionNowButton", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to _Check for a new version on startup. + /// + public static string checkVersionOnStartupCheckBox { + get { + return ResourceManager.GetString("checkVersionOnStartupCheckBox", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Close. + /// + public static string CloseButtonText { + get { + return ResourceManager.GetString("CloseButtonText", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to delete the selected items?. + /// + public static string ConfirmDeleteItemss { + get { + return ResourceManager.GetString("ConfirmDeleteItemss", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Confirm Delete. + /// + public static string ConfirmDeleteTitle { + get { + return ResourceManager.GetString("ConfirmDeleteTitle", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Delete. + /// + public static string DeleteItemLink { + get { + return ResourceManager.GetString("DeleteItemLink", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Delete Item. + /// + public static string DeleteItemToolTip { + get { + return ResourceManager.GetString("DeleteItemToolTip", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Downloading update.... + /// + public static string DownloadingUpdate { + get { + return ResourceManager.GetString("DownloadingUpdate", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Edit. + /// + public static string EditItemLink { + get { + return ResourceManager.GetString("EditItemLink", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Edit Item. + /// + public static string EditItemToolTip { + get { + return ResourceManager.GetString("EditItemToolTip", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Installing update.... + /// + public static string InstallingUpdate { + get { + return ResourceManager.GetString("InstallingUpdate", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Item. + /// + public static string ItemColumnHeader { + get { + return ResourceManager.GetString("ItemColumnHeader", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Add Item. + /// + public static string ItemWindowAdd { + get { + return ResourceManager.GetString("ItemWindowAdd", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Edit Item. + /// + public static string ItemWindowEdit { + get { + return ResourceManager.GetString("ItemWindowEdit", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Loading.... + /// + public static string Loading { + get { + return ResourceManager.GetString("Loading", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Name. + /// + public static string NameColumnHeader { + get { + return ResourceManager.GetString("NameColumnHeader", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to OK. + /// + public static string OkayButton { + get { + return ResourceManager.GetString("OkayButton", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to About. + /// + public static string optionCategoryAbout { + get { + return ResourceManager.GetString("optionCategoryAbout", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to General. + /// + public static string optionCategoryGeneral { + get { + return ResourceManager.GetString("optionCategoryGeneral", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Items. + /// + public static string optionCategoryItems { + get { + return ResourceManager.GetString("optionCategoryItems", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Update. + /// + public static string optionCategoryUpdate { + get { + return ResourceManager.GetString("optionCategoryUpdate", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Settings. + /// + public static string SettingsTitle { + get { + return ResourceManager.GetString("SettingsTitle", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to _Start when Windows starts. + /// + public static string startWithWindowsCheckBox { + get { + return ResourceManager.GetString("startWithWindowsCheckBox", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to You are already running the most recent version. + /// + ///No updates are available at this time.. + /// + public static string UpdateCheckCurrent { + get { + return ResourceManager.GetString("UpdateCheckCurrent", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Version {0} is now available. + /// + ///Would you like to download and install it now?. + /// + public static string UpdateCheckNewVersion { + get { + return ResourceManager.GetString("UpdateCheckNewVersion", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} Update. + /// + public static string UpdateCheckTitle { + get { + return ResourceManager.GetString("UpdateCheckTitle", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Version {0}. + /// + public static string Version { + get { + return ResourceManager.GetString("Version", resourceCulture); + } + } + } +} diff --git a/Template/Properties/Resources.resx b/Template/Properties/Resources.resx new file mode 100644 index 0000000..c795a66 --- /dev/null +++ b/Template/Properties/Resources.resx @@ -0,0 +1,227 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + ..\Resources\Application.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + Template Status Window + + + About + + + _Check for Update + + + _Start when Windows starts + + + General + + + Settings + + + Close + + + Version {0} + + + Update + + + _Check for a new version on startup + + + Check _Now + + + {0} Update + + + You are already running the most recent version. + +No updates are available at this time. + + + Version {0} is now available. + +Would you like to download and install it now? + + + Loading... + + + Checking for update... + + + Downloading update... + + + Installing update... + + + Items + + + Name + + + Item + + + Add + + + Edit + + + Delete + + + Add Item + + + Edit Item + + + Delete Item + + + Confirm Delete + + + Are you sure you want to delete the selected items? + + + Add Item + + + Edit Item + + + OK + + + Cancel + + \ No newline at end of file diff --git a/Template/Properties/Settings.Designer.cs b/Template/Properties/Settings.Designer.cs new file mode 100644 index 0000000..c619066 --- /dev/null +++ b/Template/Properties/Settings.Designer.cs @@ -0,0 +1,74 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Template.Properties { + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "18.4.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { + + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); + + public static Settings Default { + get { + return defaultInstance; + } + } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("")] + public string WindowSettings { + get { + return ((string)(this["WindowSettings"])); + } + set { + this["WindowSettings"] = value; + } + } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("True")] + public bool AutoStart { + get { + return ((bool)(this["AutoStart"])); + } + set { + this["AutoStart"] = value; + } + } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("True")] + public bool CheckVersionAtStartup { + get { + return ((bool)(this["CheckVersionAtStartup"])); + } + set { + this["CheckVersionAtStartup"] = value; + } + } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("[]")] + public string Items { + get { + return ((string)(this["Items"])); + } + set { + this["Items"] = value; + } + } + } +} diff --git a/Template/Properties/Settings.settings b/Template/Properties/Settings.settings new file mode 100644 index 0000000..9c0ca86 --- /dev/null +++ b/Template/Properties/Settings.settings @@ -0,0 +1,18 @@ + + + + + + + + + True + + + True + + + [] + + + \ No newline at end of file diff --git a/Template/README.md b/Template/README.md new file mode 100644 index 0000000..630b323 --- /dev/null +++ b/Template/README.md @@ -0,0 +1 @@ +# Template \ No newline at end of file diff --git a/Template/Resources/Application.ico b/Template/Resources/Application.ico new file mode 100644 index 0000000000000000000000000000000000000000..498c8b8f846377d1c626b65bdcc4c7610244d986 GIT binary patch literal 10134 zcmeHNzi%T&6n^VCSv#Da=!%rY5{kGADBR~17wImDD&>Wf&^4S)LrfJ*poDIf@=zoS zuDFV;@2V7B9sUCvKy)!A7jLAKhVPr*XOGwGtbgo@1N`FInK$pp_vX!bJv$o_PnM)s zTSZ-zKMEqBiOA||#NY8m?kx!90(nWEmPEcRQXcUS7e(H!sJtdm(SLYb#B$$S_$oI|(>U^5pImM>0{Vx3J=pK=UF_6j z|3RZ=x@%$V5Bl|ku)AkWPrnqJux*01Sl=|ZgXR~Pn|m71+U;-G*8bX!@Zo=BgTbml zM8bIC-{QkRIzn_cG=3(aFZaVvD{OpIugCE<&8rVh{i4y>R(*`sT-NIcaXcXtaO9Va z%_sabIh|$@a=08Xlk@8RNGvuxiyIq}HS)c0bM41s&PPPn8W$VgcvEZFfVF-tvJU(e zgp_Alhrdmf0~7@8nNSwY>we6J>wFcZhNA1djdnVbt1Kd zxtc<_87ZYm(bZF^R()@X{A#stJ|soQpuCcx$>n_vx*E3kyju&Nw{XkzAWW4nS4ySI z@@RRHj*F0w@V`jG;z)U!;!34F(%vgnDg_KP3QuiWE{-V#-mFBQCk@9<@+yZYr4)qDDuae25d zGX}-8%Gfgu@)6sMw`iq^Unw=|`92TUEJm9T(sRnp0G@U4qx^zmaw_NW)6N8j0`xx4 z2{SGB%ou=e$BnZ9gL8sh3Vp?6I?u|1jy*4I^`m|##mCu)nWg+!@O2znbuw3~KWqNg z56+_u&aHaul5O^>ocL+&yzp@@X4eDuqlSfe>`TLRW6292=XFEtk$o<{I|tgI7e3Ak zhw#~_I4*YHTI0%V{Pc&j(;g1nilO+*=RJP)%Nl311M6O8E~eYg zbNq^xR%_n1R-IY#)!(G`96$OE&m;euOLq?3K5eJf|0F)n4|M;Lc>t<$>KNRyX0_GE ztzB&R{{BtwKU`e4C&gxLd5wP>?7Z-&#ZJRd<}{0+1v|#K`)~Tm!b-|##g6g$?9=XPha%8iE@Bq_ + + + + + + + + \ No newline at end of file diff --git a/Template/SettingsWindow/AboutSettingsPanel.xaml.cs b/Template/SettingsWindow/AboutSettingsPanel.xaml.cs new file mode 100644 index 0000000..55446cf --- /dev/null +++ b/Template/SettingsWindow/AboutSettingsPanel.xaml.cs @@ -0,0 +1,12 @@ +namespace Template.SettingsWindow +{ + public partial class AboutSettingsPanel + { + public AboutSettingsPanel() + { + InitializeComponent(); + } + + public override string CategoryName => Properties.Resources.optionCategoryAbout; + } +} \ No newline at end of file diff --git a/Template/SettingsWindow/GeneralSettingsPanel.xaml b/Template/SettingsWindow/GeneralSettingsPanel.xaml new file mode 100644 index 0000000..a0aa607 --- /dev/null +++ b/Template/SettingsWindow/GeneralSettingsPanel.xaml @@ -0,0 +1,16 @@ + + + + + \ No newline at end of file diff --git a/Template/SettingsWindow/GeneralSettingsPanel.xaml.cs b/Template/SettingsWindow/GeneralSettingsPanel.xaml.cs new file mode 100644 index 0000000..afb9f26 --- /dev/null +++ b/Template/SettingsWindow/GeneralSettingsPanel.xaml.cs @@ -0,0 +1,36 @@ +using System.Windows; +using ChrisKaczor.Wpf.Application; +using Template.Properties; + +namespace Template.SettingsWindow; + +public partial class GeneralSettingsPanel +{ + public GeneralSettingsPanel() + { + InitializeComponent(); + } + + public override string CategoryName => Properties.Resources.optionCategoryGeneral; + + public override void LoadPanel(Window parentWindow) + { + base.LoadPanel(parentWindow); + + MarkLoaded(); + } + + private void OnSaveSettings(object sender, RoutedEventArgs e) + { + SaveSettings(); + } + + private void SaveSettings() + { + if (!HasLoaded) return; + + Settings.Default.Save(); + + Application.Current.SetStartWithWindows(Settings.Default.AutoStart); + } +} \ No newline at end of file diff --git a/Template/SettingsWindow/ItemWindow.xaml b/Template/SettingsWindow/ItemWindow.xaml new file mode 100644 index 0000000..1e8dd90 --- /dev/null +++ b/Template/SettingsWindow/ItemWindow.xaml @@ -0,0 +1,78 @@ + + + + + + + + + + + + + + + + + + + + + + + + +