Compare commits
20
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a55ef1f27e | ||
|
|
46fce20771 | ||
|
|
d28f421ea3 | ||
|
|
5aeefebc47 | ||
|
|
ca956f207b | ||
|
|
ad212e7416 | ||
|
|
8c63b93d09 | ||
|
|
6ba4854bd8 | ||
|
|
2be5b86b17 | ||
|
|
a75a2d8926 | ||
|
|
f97621c37b | ||
|
|
d76d148c67 | ||
|
|
3c1a931f26 | ||
|
|
7a246bb61b | ||
|
|
3c6f648e4e | ||
|
|
f372f99d95 | ||
|
|
84d2435b83 | ||
|
|
e64c6878c1 | ||
|
|
a29fcfe9a6 | ||
|
|
4b9145054b |
@@ -1,63 +0,0 @@
|
|||||||
###############################################################################
|
|
||||||
# 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
|
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
name: Deploy to Gitea Releases
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
deploy-to-gitea-releases:
|
||||||
|
runs-on: ubuntu-latest-x86-64
|
||||||
|
|
||||||
|
container:
|
||||||
|
image: ghcr.io/catthehacker/ubuntu:dotnet-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: Publish Application
|
||||||
|
run: dotnet publish WorkIndicator.csproj -r win-x86 -c Release -o publish
|
||||||
|
|
||||||
|
- name: Create Velopack Release
|
||||||
|
run: |
|
||||||
|
export PATH="$PATH:/root/.dotnet/tools"
|
||||||
|
dotnet tool install -g vpk
|
||||||
|
vpk [win] download gitea --channel win-x86 --repoUrl https://gitea.kaczorzoo.net/ckaczor/WorkIndicator
|
||||||
|
vpk [win] pack --channel win-x86 -u WorkIndicator -v ${{ steps.version.outputs.version }} -p publish --packTitle "Work Indicator" --shortcuts StartMenuRoot --framework net10.0-x86-desktop
|
||||||
|
vpk [win] upload gitea --channel win-x86 --repoUrl https://gitea.kaczorzoo.net/ckaczor/WorkIndicator --publish --releaseName "${{ steps.version.outputs.version }}" --token ${{ secrets.VPK_TOKEN }}
|
||||||
+278
-37
@@ -1,34 +1,84 @@
|
|||||||
## Ignore Visual Studio temporary files, build results, and
|
## Ignore Visual Studio temporary files, build results, and
|
||||||
## files generated by popular Visual Studio add-ons.
|
## files generated by popular Visual Studio add-ons.
|
||||||
|
##
|
||||||
|
## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore
|
||||||
|
|
||||||
# User-specific files
|
# User-specific files
|
||||||
|
*.rsuser
|
||||||
*.suo
|
*.suo
|
||||||
*.user
|
*.user
|
||||||
|
*.userosscache
|
||||||
*.sln.docstates
|
*.sln.docstates
|
||||||
|
|
||||||
# Build results
|
# User-specific files (MonoDevelop/Xamarin Studio)
|
||||||
|
*.userprefs
|
||||||
|
|
||||||
|
# Mono auto generated files
|
||||||
|
mono_crash.*
|
||||||
|
|
||||||
|
# Build results
|
||||||
[Dd]ebug/
|
[Dd]ebug/
|
||||||
|
[Dd]ebugPublic/
|
||||||
[Rr]elease/
|
[Rr]elease/
|
||||||
|
[Rr]eleases/
|
||||||
x64/
|
x64/
|
||||||
build/
|
x86/
|
||||||
|
[Ww][Ii][Nn]32/
|
||||||
|
[Aa][Rr][Mm]/
|
||||||
|
[Aa][Rr][Mm]64/
|
||||||
|
bld/
|
||||||
[Bb]in/
|
[Bb]in/
|
||||||
[Oo]bj/
|
[Oo]bj/
|
||||||
|
[Ll]og/
|
||||||
|
[Ll]ogs/
|
||||||
|
|
||||||
# Enable "build/" folder in the NuGet Packages folder since NuGet packages use it for MSBuild targets
|
# Visual Studio 2015/2017 cache/options directory
|
||||||
!packages/*/build/
|
.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
|
# MSTest test Results
|
||||||
[Tt]est[Rr]esult*/
|
[Tt]est[Rr]esult*/
|
||||||
[Bb]uild[Ll]og.*
|
[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
|
*_i.c
|
||||||
*_p.c
|
*_p.c
|
||||||
|
*_h.h
|
||||||
*.ilk
|
*.ilk
|
||||||
*.meta
|
*.meta
|
||||||
*.obj
|
*.obj
|
||||||
|
*.iobj
|
||||||
*.pch
|
*.pch
|
||||||
*.pdb
|
*.pdb
|
||||||
|
*.ipdb
|
||||||
*.pgc
|
*.pgc
|
||||||
*.pgd
|
*.pgd
|
||||||
*.rsp
|
*.rsp
|
||||||
@@ -38,26 +88,41 @@ build/
|
|||||||
*.tlh
|
*.tlh
|
||||||
*.tmp
|
*.tmp
|
||||||
*.tmp_proj
|
*.tmp_proj
|
||||||
|
*_wpftmp.csproj
|
||||||
*.log
|
*.log
|
||||||
|
*.tlog
|
||||||
*.vspscc
|
*.vspscc
|
||||||
*.vssscc
|
*.vssscc
|
||||||
.builds
|
.builds
|
||||||
*.pidb
|
*.pidb
|
||||||
*.log
|
*.svclog
|
||||||
*.scc
|
*.scc
|
||||||
|
|
||||||
|
# Chutzpah Test files
|
||||||
|
_Chutzpah*
|
||||||
|
|
||||||
# Visual C++ cache files
|
# Visual C++ cache files
|
||||||
ipch/
|
ipch/
|
||||||
*.aps
|
*.aps
|
||||||
*.ncb
|
*.ncb
|
||||||
|
*.opendb
|
||||||
*.opensdf
|
*.opensdf
|
||||||
*.sdf
|
*.sdf
|
||||||
*.cachefile
|
*.cachefile
|
||||||
|
*.VC.db
|
||||||
|
*.VC.VC.opendb
|
||||||
|
|
||||||
# Visual Studio profiler
|
# Visual Studio profiler
|
||||||
*.psess
|
*.psess
|
||||||
*.vsp
|
*.vsp
|
||||||
*.vspx
|
*.vspx
|
||||||
|
*.sap
|
||||||
|
|
||||||
|
# Visual Studio Trace Files
|
||||||
|
*.e2e
|
||||||
|
|
||||||
|
# TFS 2012 Local Workspace
|
||||||
|
$tf/
|
||||||
|
|
||||||
# Guidance Automation Toolkit
|
# Guidance Automation Toolkit
|
||||||
*.gpState
|
*.gpState
|
||||||
@@ -65,6 +130,7 @@ ipch/
|
|||||||
# ReSharper is a .NET coding add-in
|
# ReSharper is a .NET coding add-in
|
||||||
_ReSharper*/
|
_ReSharper*/
|
||||||
*.[Rr]e[Ss]harper
|
*.[Rr]e[Ss]harper
|
||||||
|
*.DotSettings.user
|
||||||
|
|
||||||
# TeamCity is a build add-in
|
# TeamCity is a build add-in
|
||||||
_TeamCity*
|
_TeamCity*
|
||||||
@@ -72,9 +138,30 @@ _TeamCity*
|
|||||||
# DotCover is a Code Coverage Tool
|
# DotCover is a Code Coverage Tool
|
||||||
*.dotCover
|
*.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
|
||||||
*.ncrunch*
|
_NCrunch_*
|
||||||
.*crunch*.local.xml
|
.*crunch*.local.xml
|
||||||
|
nCrunchTemp_*
|
||||||
|
|
||||||
|
# MightyMoose
|
||||||
|
*.mm.*
|
||||||
|
AutoTest.Net/
|
||||||
|
|
||||||
|
# Web workbench (sass)
|
||||||
|
.sass-cache/
|
||||||
|
|
||||||
# Installshield output folder
|
# Installshield output folder
|
||||||
[Ee]xpress/
|
[Ee]xpress/
|
||||||
@@ -93,65 +180,219 @@ DocProject/Help/html
|
|||||||
publish/
|
publish/
|
||||||
|
|
||||||
# Publish Web Output
|
# Publish Web Output
|
||||||
*.Publish.xml
|
*.[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
|
||||||
|
|
||||||
# NuGet Packages Directory
|
# Microsoft Azure Web App publish settings. Comment the next line if you want to
|
||||||
packages/
|
# checkin your Azure Web App publish settings, but sensitive information contained
|
||||||
|
# in these scripts will be unencrypted
|
||||||
|
PublishScripts/
|
||||||
|
|
||||||
# Windows Azure Build Output
|
# NuGet Packages
|
||||||
csx
|
*.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
|
*.build.csdef
|
||||||
|
|
||||||
# Windows Store app package directory
|
# Microsoft Azure Emulator
|
||||||
|
ecf/
|
||||||
|
rcf/
|
||||||
|
|
||||||
|
# Windows Store app package directories and files
|
||||||
AppPackages/
|
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
|
# Others
|
||||||
sql/
|
|
||||||
*.Cache
|
|
||||||
ClientBin/
|
ClientBin/
|
||||||
[Ss]tyle[Cc]op.*
|
|
||||||
~$*
|
~$*
|
||||||
*~
|
*~
|
||||||
*.dbmdl
|
*.dbmdl
|
||||||
*.[Pp]ublish.xml
|
*.dbproj.schemaview
|
||||||
|
*.jfm
|
||||||
*.pfx
|
*.pfx
|
||||||
*.publishsettings
|
*.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
|
# RIA/Silverlight projects
|
||||||
Generated_Code/
|
Generated_Code/
|
||||||
|
|
||||||
# Backup & report files from converting an old project file to a newer
|
# Backup & report files from converting an old project file
|
||||||
# Visual Studio version. Backup files are not needed, because we have git ;-)
|
# to a newer Visual Studio version. Backup files are not needed,
|
||||||
|
# because we have git ;-)
|
||||||
_UpgradeReport_Files/
|
_UpgradeReport_Files/
|
||||||
Backup*/
|
Backup*/
|
||||||
UpgradeLog*.XML
|
UpgradeLog*.XML
|
||||||
UpgradeLog*.htm
|
UpgradeLog*.htm
|
||||||
|
ServiceFabricBackup/
|
||||||
|
*.rptproj.bak
|
||||||
|
|
||||||
# SQL Server files
|
# SQL Server files
|
||||||
App_Data/*.mdf
|
*.mdf
|
||||||
App_Data/*.ldf
|
*.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
|
||||||
|
|
||||||
#LightSwitch generated files
|
# Microsoft Fakes
|
||||||
GeneratedArtifacts/
|
FakesAssemblies/
|
||||||
_Pvt_Extensions/
|
|
||||||
ModelManifest.xml
|
|
||||||
|
|
||||||
# =========================
|
# GhostDoc plugin setting file
|
||||||
# Windows detritus
|
*.GhostDoc.xml
|
||||||
# =========================
|
|
||||||
|
|
||||||
# Windows image file caches
|
# Node.js Tools for Visual Studio
|
||||||
Thumbs.db
|
.ntvs_analysis.dat
|
||||||
ehthumbs.db
|
node_modules/
|
||||||
|
|
||||||
# Folder config file
|
# Visual Studio 6 build log
|
||||||
Desktop.ini
|
*.plg
|
||||||
|
|
||||||
# Recycle Bin used on file shares
|
# Visual Studio 6 workspace options file
|
||||||
$RECYCLE.BIN/
|
*.opt
|
||||||
|
|
||||||
# Mac desktop service store files
|
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
|
||||||
.DS_Store
|
*.vbw
|
||||||
|
|
||||||
.vs/
|
# 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
|
||||||
|
|||||||
@@ -1,6 +0,0 @@
|
|||||||
[submodule "Common"]
|
|
||||||
path = Common
|
|
||||||
url = https://github.com/ckaczor/Common.git
|
|
||||||
[submodule "Common.Wpf"]
|
|
||||||
path = Common.Wpf
|
|
||||||
url = https://github.com/ckaczor/Common.Wpf.git
|
|
||||||
+27
@@ -0,0 +1,27 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<configuration>
|
||||||
|
<configSections>
|
||||||
|
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
|
||||||
|
<section name="WorkIndicator.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
|
||||||
|
</sectionGroup>
|
||||||
|
</configSections>
|
||||||
|
<startup>
|
||||||
|
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
|
||||||
|
</startup>
|
||||||
|
<userSettings>
|
||||||
|
<WorkIndicator.Properties.Settings>
|
||||||
|
<setting name="WindowSettings" serializeAs="String">
|
||||||
|
<value />
|
||||||
|
</setting>
|
||||||
|
<setting name="AutoStart" serializeAs="String">
|
||||||
|
<value>True</value>
|
||||||
|
</setting>
|
||||||
|
<setting name="CheckVersionAtStartup" serializeAs="String">
|
||||||
|
<value>True</value>
|
||||||
|
</setting>
|
||||||
|
<setting name="DefaultStatus" serializeAs="String">
|
||||||
|
<value>Working</value>
|
||||||
|
</setting>
|
||||||
|
</WorkIndicator.Properties.Settings>
|
||||||
|
</userSettings>
|
||||||
|
</configuration>
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
<Application x:Class="WorkIndicator.App"
|
<Application x:Class="WorkIndicator.App"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
ShutdownMode="OnExplicitShutdown">
|
ShutdownMode="OnExplicitShutdown">
|
||||||
<Application.Resources>
|
<Application.Resources>
|
||||||
|
|
||||||
</Application.Resources>
|
</Application.Resources>
|
||||||
</Application>
|
</Application>
|
||||||
+20
-105
@@ -1,114 +1,29 @@
|
|||||||
using Common.Helpers;
|
using ChrisKaczor.Wpf.Application;
|
||||||
using Common.IO;
|
using System.Diagnostics;
|
||||||
using Common.Wpf.Extensions;
|
|
||||||
using Squirrel;
|
|
||||||
using System;
|
|
||||||
using System.Reflection;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
using System.Windows.Threading;
|
|
||||||
using Settings = WorkIndicator.Properties.Settings;
|
using Settings = WorkIndicator.Properties.Settings;
|
||||||
|
|
||||||
namespace WorkIndicator
|
namespace WorkIndicator;
|
||||||
|
|
||||||
|
public partial class App
|
||||||
{
|
{
|
||||||
public partial class App
|
protected override void OnStartup(StartupEventArgs e)
|
||||||
{
|
{
|
||||||
private IDisposable _isolationHandle;
|
base.OnStartup(e);
|
||||||
|
|
||||||
public static string UpdateUrl = "https://github.com/ckaczor/WorkIndicator";
|
Current.SetStartWithWindows(!Debugger.IsAttached && Settings.Default.AutoStart);
|
||||||
|
|
||||||
private Dispatcher _dispatcher;
|
NotificationIcon.Initialize();
|
||||||
private InterprocessMessageListener _commandLineListener;
|
|
||||||
|
|
||||||
[STAThread]
|
LightController.Initialize();
|
||||||
public static void Main(string[] args)
|
|
||||||
{
|
|
||||||
SquirrelAwareApp.HandleEvents(onAppUpdate: version => Common.Settings.Extensions.RestoreSettings());
|
|
||||||
|
|
||||||
var application = new App();
|
|
||||||
application.InitializeComponent();
|
|
||||||
application.Run();
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override void OnStartup(StartupEventArgs e)
|
|
||||||
{
|
|
||||||
base.OnStartup(e);
|
|
||||||
|
|
||||||
_dispatcher = Dispatcher.CurrentDispatcher;
|
|
||||||
|
|
||||||
// Create an isolation handle to see if we are already running
|
|
||||||
_isolationHandle = ApplicationIsolation.GetIsolationHandle();
|
|
||||||
|
|
||||||
// If there is another copy then pass it the command line and exit
|
|
||||||
if (_isolationHandle == null)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
InterprocessMessageSender.SendMessage(Environment.CommandLine);
|
|
||||||
}
|
|
||||||
catch { }
|
|
||||||
|
|
||||||
Shutdown();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Initialize the command line listener
|
|
||||||
_commandLineListener = new InterprocessMessageListener(Assembly.GetEntryAssembly().GetName().Name);
|
|
||||||
_commandLineListener.MessageReceived += HandleCommandLine;
|
|
||||||
|
|
||||||
// Initialize the tray icon
|
|
||||||
TrayIcon.Initialize();
|
|
||||||
|
|
||||||
Task.Factory.StartNew(CheckUpdate).ContinueWith(task => StartApplication(task.Result.Result));
|
|
||||||
}
|
|
||||||
|
|
||||||
private void StartApplication(bool updateRequired)
|
|
||||||
{
|
|
||||||
if (updateRequired)
|
|
||||||
return;
|
|
||||||
|
|
||||||
Task.Factory.StartNew(() =>
|
|
||||||
{
|
|
||||||
// Set automatic start into the registry
|
|
||||||
Current.SetStartWithWindows(Settings.Default.StartWithWindows);
|
|
||||||
|
|
||||||
// Initialize the light controller
|
|
||||||
LightController.Initialize();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
private void HandleCommandLine(object sender, InterprocessMessageListener.InterprocessMessageEventArgs e)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
private async Task<bool> CheckUpdate()
|
|
||||||
{
|
|
||||||
return await UpdateCheck.CheckUpdate(HandleUpdateStatus);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void HandleUpdateStatus(UpdateCheck.UpdateStatus status, string message)
|
|
||||||
{
|
|
||||||
if (status != UpdateCheck.UpdateStatus.Installing)
|
|
||||||
return;
|
|
||||||
|
|
||||||
_dispatcher.Invoke(() => TrayIcon.ShowUpdateMessage(message));
|
|
||||||
|
|
||||||
TrayIcon.Dispose();
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override void OnExit(ExitEventArgs e)
|
|
||||||
{
|
|
||||||
// Get rid of the light controller
|
|
||||||
LightController.Dispose();
|
|
||||||
|
|
||||||
// Get rid of the tray icon
|
|
||||||
TrayIcon.Dispose();
|
|
||||||
|
|
||||||
// Get rid of the isolation handle
|
|
||||||
_isolationHandle?.Dispose();
|
|
||||||
|
|
||||||
base.OnExit(e);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
protected override void OnExit(ExitEventArgs e)
|
||||||
|
{
|
||||||
|
LightController.Dispose();
|
||||||
|
|
||||||
|
NotificationIcon.Dispose();
|
||||||
|
|
||||||
|
base.OnExit(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,88 @@
|
|||||||
|
using NAudio.CoreAudioApi;
|
||||||
|
using NAudio.CoreAudioApi.Interfaces;
|
||||||
|
using Serilog;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
|
namespace WorkIndicator.Audio;
|
||||||
|
|
||||||
|
internal class AudioDevice
|
||||||
|
{
|
||||||
|
private readonly ILogger _logger;
|
||||||
|
|
||||||
|
public delegate void AudioSessionsChangedDelegate();
|
||||||
|
|
||||||
|
public event AudioSessionsChangedDelegate AudioSessionsChanged;
|
||||||
|
|
||||||
|
public bool IsMuted { get; private set; }
|
||||||
|
|
||||||
|
public string FriendlyName { get; }
|
||||||
|
|
||||||
|
public Dictionary<string, AudioSession> Sessions { get; } = new();
|
||||||
|
|
||||||
|
public AudioDevice(MMDevice device)
|
||||||
|
{
|
||||||
|
_logger = Log.ForContext<AudioDevice>();
|
||||||
|
|
||||||
|
FriendlyName = device.DeviceFriendlyName;
|
||||||
|
IsMuted = device.AudioEndpointVolume.Mute;
|
||||||
|
|
||||||
|
_logger.Information("AudioDevice: {name} {muted}", FriendlyName, IsMuted);
|
||||||
|
|
||||||
|
device.AudioEndpointVolume.OnVolumeNotification += AudioEndpointVolume_OnVolumeNotification;
|
||||||
|
device.AudioSessionManager.OnSessionCreated += AudioSessionManager_OnSessionCreated;
|
||||||
|
|
||||||
|
device.AudioSessionManager.RefreshSessions();
|
||||||
|
var sessions = device.AudioSessionManager.Sessions;
|
||||||
|
|
||||||
|
for (var i = 0; i < sessions.Count; i++)
|
||||||
|
{
|
||||||
|
SetupSession(sessions[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void AudioEndpointVolume_OnVolumeNotification(AudioVolumeNotificationData data)
|
||||||
|
{
|
||||||
|
_logger.Information("AudioEndpointVolume_OnVolumeNotification: {name} {muted}", FriendlyName, data.Muted);
|
||||||
|
|
||||||
|
IsMuted = data.Muted;
|
||||||
|
|
||||||
|
AudioSessionsChanged?.Invoke();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void AudioSessionManager_OnSessionCreated(object sender, IAudioSessionControl newSession)
|
||||||
|
{
|
||||||
|
var session = new AudioSessionControl(newSession);
|
||||||
|
|
||||||
|
_logger.Information("OnSessionCreated: {name}", session.GetSessionIdentifier);
|
||||||
|
|
||||||
|
SetupSession(session);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void SetupSession(AudioSessionControl session)
|
||||||
|
{
|
||||||
|
_logger.Information("SetupSession: {name}", session.GetSessionIdentifier);
|
||||||
|
|
||||||
|
var audioSession = new AudioSession(session, FriendlyName);
|
||||||
|
|
||||||
|
Sessions[session.GetSessionIdentifier] = audioSession;
|
||||||
|
|
||||||
|
audioSession.AudioSessionChanged += AudioSession_AudioSessionChanged;
|
||||||
|
|
||||||
|
AudioSessionsChanged?.Invoke();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void AudioSession_AudioSessionChanged(string id, AudioSessionState state)
|
||||||
|
{
|
||||||
|
_logger.Information("AudioSessionChanged: {id} {state}", id, state);
|
||||||
|
|
||||||
|
AudioSessionsChanged?.Invoke();
|
||||||
|
|
||||||
|
if (state == AudioSessionState.AudioSessionStateExpired)
|
||||||
|
{
|
||||||
|
Sessions.Remove(id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public int ActiveSessionCount => Sessions.Values.Count(s => s.State == AudioSessionState.AudioSessionStateActive);
|
||||||
|
}
|
||||||
@@ -0,0 +1,70 @@
|
|||||||
|
using NAudio.CoreAudioApi;
|
||||||
|
using NAudio.CoreAudioApi.Interfaces;
|
||||||
|
using Serilog;
|
||||||
|
using System;
|
||||||
|
|
||||||
|
namespace WorkIndicator.Audio;
|
||||||
|
|
||||||
|
internal class AudioSession : IAudioSessionEventsHandler
|
||||||
|
{
|
||||||
|
private readonly ILogger _logger;
|
||||||
|
private readonly AudioSessionControl _audioSessionControl;
|
||||||
|
|
||||||
|
public string Id { get; }
|
||||||
|
public string FriendlyName { get; }
|
||||||
|
|
||||||
|
public delegate void AudioSessionChangedDelegate(string id, AudioSessionState state);
|
||||||
|
|
||||||
|
public event AudioSessionChangedDelegate AudioSessionChanged;
|
||||||
|
|
||||||
|
public AudioSession(AudioSessionControl audioSessionControl, string friendlyName)
|
||||||
|
{
|
||||||
|
_logger = Log.ForContext<AudioSession>();
|
||||||
|
|
||||||
|
_audioSessionControl = audioSessionControl;
|
||||||
|
|
||||||
|
Id = audioSessionControl.GetSessionIdentifier;
|
||||||
|
FriendlyName = friendlyName;
|
||||||
|
|
||||||
|
audioSessionControl.RegisterEventClient(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
public AudioSessionState State => _audioSessionControl.State;
|
||||||
|
|
||||||
|
void IAudioSessionEventsHandler.OnVolumeChanged(float volume, bool isMuted)
|
||||||
|
{
|
||||||
|
_logger.Information("OnVolumeChanged: {name} {volume} {isMuted}", FriendlyName, volume, isMuted);
|
||||||
|
}
|
||||||
|
|
||||||
|
void IAudioSessionEventsHandler.OnDisplayNameChanged(string displayName)
|
||||||
|
{
|
||||||
|
_logger.Information("OnDisplayNameChanged: {name}", displayName);
|
||||||
|
}
|
||||||
|
|
||||||
|
void IAudioSessionEventsHandler.OnIconPathChanged(string iconPath)
|
||||||
|
{
|
||||||
|
_logger.Information("OnIconPathChanged: {path}", iconPath);
|
||||||
|
}
|
||||||
|
|
||||||
|
void IAudioSessionEventsHandler.OnChannelVolumeChanged(uint channelCount, IntPtr newVolumes, uint channelIndex)
|
||||||
|
{
|
||||||
|
_logger.Information("OnChannelVolumeChanged: {channelCount} {newVolumes} {channelIndex}", channelCount, newVolumes, channelIndex);
|
||||||
|
}
|
||||||
|
|
||||||
|
void IAudioSessionEventsHandler.OnGroupingParamChanged(ref Guid groupingId)
|
||||||
|
{
|
||||||
|
_logger.Information("OnGroupingParamChanged: {groupingId}", groupingId);
|
||||||
|
}
|
||||||
|
|
||||||
|
void IAudioSessionEventsHandler.OnStateChanged(AudioSessionState state)
|
||||||
|
{
|
||||||
|
_logger.Information("OnStateChanged: {state}", state);
|
||||||
|
|
||||||
|
AudioSessionChanged?.Invoke(Id, state);
|
||||||
|
}
|
||||||
|
|
||||||
|
void IAudioSessionEventsHandler.OnSessionDisconnected(AudioSessionDisconnectReason disconnectReason)
|
||||||
|
{
|
||||||
|
_logger.Information("OnSessionDisconnected: {disconnectReason}", disconnectReason);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,140 @@
|
|||||||
|
using NAudio.CoreAudioApi;
|
||||||
|
using NAudio.CoreAudioApi.Interfaces;
|
||||||
|
using Serilog;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
namespace WorkIndicator.Audio;
|
||||||
|
|
||||||
|
internal enum MicrophoneStatus
|
||||||
|
{
|
||||||
|
NotUsed,
|
||||||
|
UsedMuted,
|
||||||
|
UsedNotMuted
|
||||||
|
}
|
||||||
|
|
||||||
|
internal class AudioWatcher : IMMNotificationClient
|
||||||
|
{
|
||||||
|
private readonly ILogger _logger = Log.ForContext<AudioWatcher>();
|
||||||
|
private readonly MMDeviceEnumerator _deviceEnumerator = new();
|
||||||
|
private readonly Dictionary<string, AudioDevice> _inputDevices = new();
|
||||||
|
|
||||||
|
public delegate void MicrophoneStatusChangedDelegate(MicrophoneStatus microphoneStatus);
|
||||||
|
|
||||||
|
public event MicrophoneStatusChangedDelegate MicrophoneStatusChanged;
|
||||||
|
|
||||||
|
public void Start()
|
||||||
|
{
|
||||||
|
_logger.Information("Start");
|
||||||
|
|
||||||
|
_deviceEnumerator.RegisterEndpointNotificationCallback(this);
|
||||||
|
|
||||||
|
_logger.Information("Getting capture devices");
|
||||||
|
|
||||||
|
var captureDevices = _deviceEnumerator.EnumerateAudioEndPoints(DataFlow.Capture, DeviceState.Active);
|
||||||
|
|
||||||
|
foreach (var captureDevice in captureDevices)
|
||||||
|
{
|
||||||
|
_logger.Information("Capture device: {name}", captureDevice.DeviceFriendlyName);
|
||||||
|
|
||||||
|
HandleAddedDevice(captureDevice);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void LogState()
|
||||||
|
{
|
||||||
|
_logger.Information("---");
|
||||||
|
|
||||||
|
foreach (var inputDevicePair in _inputDevices)
|
||||||
|
{
|
||||||
|
_logger.Information("Device: {name} {muted}", inputDevicePair.Value.FriendlyName, inputDevicePair.Value.IsMuted);
|
||||||
|
|
||||||
|
foreach (var sessionPair in inputDevicePair.Value.Sessions)
|
||||||
|
{
|
||||||
|
var session = sessionPair.Value;
|
||||||
|
|
||||||
|
_logger.Information("Session: {id} {friendlyName} {state}", session.Id, session.FriendlyName, session.State);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
_logger.Information("---");
|
||||||
|
}
|
||||||
|
|
||||||
|
private void HandleAddedDevice(MMDevice captureDevice)
|
||||||
|
{
|
||||||
|
_logger.Information("Device added: {name}", captureDevice.DeviceFriendlyName);
|
||||||
|
|
||||||
|
var audioDevice = new AudioDevice(captureDevice);
|
||||||
|
audioDevice.AudioSessionsChanged += AudioDevice_AudioSessionsChanged;
|
||||||
|
|
||||||
|
_inputDevices[captureDevice.ID] = audioDevice;
|
||||||
|
|
||||||
|
MicrophoneStatusChanged?.Invoke(GetMicrophoneStatus());
|
||||||
|
}
|
||||||
|
|
||||||
|
private void AudioDevice_AudioSessionsChanged()
|
||||||
|
{
|
||||||
|
MicrophoneStatusChanged?.Invoke(GetMicrophoneStatus());
|
||||||
|
}
|
||||||
|
|
||||||
|
private void HandleRemovedDevice(string deviceId)
|
||||||
|
{
|
||||||
|
_logger.Information("Device removed: {id}", deviceId);
|
||||||
|
|
||||||
|
_inputDevices.Remove(deviceId);
|
||||||
|
|
||||||
|
MicrophoneStatusChanged?.Invoke(GetMicrophoneStatus());
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Stop()
|
||||||
|
{
|
||||||
|
_logger.Information("Stop");
|
||||||
|
|
||||||
|
_deviceEnumerator.UnregisterEndpointNotificationCallback(this);
|
||||||
|
_deviceEnumerator.Dispose();
|
||||||
|
}
|
||||||
|
|
||||||
|
public MicrophoneStatus GetMicrophoneStatus()
|
||||||
|
{
|
||||||
|
foreach (var inputDevice in _inputDevices.Values)
|
||||||
|
{
|
||||||
|
if (inputDevice.ActiveSessionCount > 0)
|
||||||
|
return inputDevice.IsMuted ? MicrophoneStatus.UsedMuted : MicrophoneStatus.UsedNotMuted;
|
||||||
|
}
|
||||||
|
|
||||||
|
return MicrophoneStatus.NotUsed;
|
||||||
|
}
|
||||||
|
|
||||||
|
void IMMNotificationClient.OnDeviceStateChanged(string deviceId, DeviceState newState)
|
||||||
|
{
|
||||||
|
_logger.Information("OnDeviceStateChanged: {deviceId} {newState}", deviceId, newState);
|
||||||
|
}
|
||||||
|
|
||||||
|
void IMMNotificationClient.OnDeviceAdded(string deviceId)
|
||||||
|
{
|
||||||
|
_logger.Information("OnDeviceAdded: {deviceId}", deviceId);
|
||||||
|
|
||||||
|
var device = _deviceEnumerator.GetDevice(deviceId);
|
||||||
|
|
||||||
|
if (device.DataFlow is DataFlow.Capture or DataFlow.All)
|
||||||
|
{
|
||||||
|
HandleAddedDevice(device);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void IMMNotificationClient.OnDeviceRemoved(string deviceId)
|
||||||
|
{
|
||||||
|
_logger.Information("OnDeviceRemoved: {deviceId}", deviceId);
|
||||||
|
|
||||||
|
HandleRemovedDevice(deviceId);
|
||||||
|
}
|
||||||
|
|
||||||
|
void IMMNotificationClient.OnDefaultDeviceChanged(DataFlow flow, Role role, string defaultDeviceId)
|
||||||
|
{
|
||||||
|
_logger.Information("OnDefaultDeviceChanged: {defaultDeviceId} {flow} {role}", defaultDeviceId, flow, role);
|
||||||
|
}
|
||||||
|
|
||||||
|
void IMMNotificationClient.OnPropertyValueChanged(string pwstrDeviceId, PropertyKey key)
|
||||||
|
{
|
||||||
|
_logger.Debug("OnPropertyValueChanged: {deviceId} {propertyId}", pwstrDeviceId, key.propertyId);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,91 +0,0 @@
|
|||||||
using CSCore.CoreAudioAPI;
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Threading;
|
|
||||||
|
|
||||||
namespace WorkIndicator
|
|
||||||
{
|
|
||||||
public static class AudioWatcher
|
|
||||||
{
|
|
||||||
public delegate void MicrophoneInUseChangedDelegate(bool microphoneInUse);
|
|
||||||
|
|
||||||
private static ManualResetEvent _manualResetEvent;
|
|
||||||
|
|
||||||
private static readonly Dictionary<string, int> ActiveSessions = new Dictionary<string, int>();
|
|
||||||
|
|
||||||
public static event MicrophoneInUseChangedDelegate MicrophoneInUseChanged;
|
|
||||||
|
|
||||||
public static void Start()
|
|
||||||
{
|
|
||||||
_manualResetEvent = new ManualResetEvent(false);
|
|
||||||
|
|
||||||
var thread = new Thread(delegate ()
|
|
||||||
{
|
|
||||||
var deviceEnumerator = new MMDeviceEnumerator();
|
|
||||||
|
|
||||||
foreach (var device in deviceEnumerator.EnumAudioEndpoints(DataFlow.Capture, DeviceState.Active))
|
|
||||||
{
|
|
||||||
var sessionManager = AudioSessionManager2.FromMMDevice(device);
|
|
||||||
|
|
||||||
var sessionEnumerator = sessionManager.GetSessionEnumerator();
|
|
||||||
|
|
||||||
sessionManager.SessionCreated += (sessionSender, sessionCreatedEventArgs) => HandleDeviceSession(device, sessionCreatedEventArgs.NewSession);
|
|
||||||
|
|
||||||
foreach (var audioSessionControl in sessionEnumerator)
|
|
||||||
{
|
|
||||||
HandleDeviceSession(device, audioSessionControl);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
_manualResetEvent.WaitOne();
|
|
||||||
});
|
|
||||||
|
|
||||||
thread.SetApartmentState(ApartmentState.MTA);
|
|
||||||
thread.Start();
|
|
||||||
}
|
|
||||||
|
|
||||||
private static void HandleDeviceSession(MMDevice device, AudioSessionControl audioSessionControl)
|
|
||||||
{
|
|
||||||
var deviceId = device.DeviceID + audioSessionControl.GroupingParam;
|
|
||||||
|
|
||||||
if (!ActiveSessions.ContainsKey(deviceId))
|
|
||||||
ActiveSessions[deviceId] = 0;
|
|
||||||
|
|
||||||
HandleAudioStateChanged(deviceId, audioSessionControl.SessionState);
|
|
||||||
|
|
||||||
audioSessionControl.StateChanged += (sender, sessionStateChangedEventArgs) =>
|
|
||||||
HandleAudioStateChanged(deviceId, sessionStateChangedEventArgs.NewState);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void Stop()
|
|
||||||
{
|
|
||||||
_manualResetEvent?.Set();
|
|
||||||
}
|
|
||||||
|
|
||||||
private static void HandleAudioStateChanged(string deviceId, AudioSessionState newState)
|
|
||||||
{
|
|
||||||
switch (newState)
|
|
||||||
{
|
|
||||||
case AudioSessionState.AudioSessionStateActive:
|
|
||||||
ActiveSessions[deviceId]++;
|
|
||||||
break;
|
|
||||||
case AudioSessionState.AudioSessionStateInactive:
|
|
||||||
if (ActiveSessions[deviceId] > 0)
|
|
||||||
ActiveSessions[deviceId]--;
|
|
||||||
break;
|
|
||||||
case AudioSessionState.AudioSessionStateExpired:
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
throw new ArgumentOutOfRangeException();
|
|
||||||
}
|
|
||||||
|
|
||||||
MicrophoneInUseChanged?.Invoke(MicrophoneInUse());
|
|
||||||
}
|
|
||||||
|
|
||||||
public static bool MicrophoneInUse()
|
|
||||||
{
|
|
||||||
return ActiveSessions.Any(a => a.Value > 0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
-1
Submodule Common deleted from 81856b2700
-1
Submodule Common.Wpf deleted from 8a82786166
@@ -4,7 +4,7 @@ using System.Windows.Forms;
|
|||||||
|
|
||||||
namespace WorkIndicator.Delcom
|
namespace WorkIndicator.Delcom
|
||||||
{
|
{
|
||||||
sealed internal partial class DeviceManagement
|
internal sealed partial class DeviceManagement
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Compares two device path names. Used to find out if the device name
|
/// Compares two device path names. Used to find out if the device name
|
||||||
|
|||||||
@@ -1,11 +1,13 @@
|
|||||||
using Common.Extensions;
|
using System;
|
||||||
using System;
|
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
|
using Serilog;
|
||||||
|
|
||||||
namespace WorkIndicator.Delcom
|
namespace WorkIndicator.Delcom
|
||||||
{
|
{
|
||||||
public class StoplightIndicator : IDisposable
|
public class StoplightIndicator : IDisposable
|
||||||
{
|
{
|
||||||
|
private readonly ILogger _logger;
|
||||||
|
|
||||||
public enum Light
|
public enum Light
|
||||||
{
|
{
|
||||||
Green,
|
Green,
|
||||||
@@ -20,29 +22,26 @@ namespace WorkIndicator.Delcom
|
|||||||
Blink
|
Blink
|
||||||
}
|
}
|
||||||
|
|
||||||
private readonly Delcom _delcom;
|
|
||||||
|
|
||||||
private LightState _green = LightState.Off;
|
private LightState _green = LightState.Off;
|
||||||
private LightState _yellow = LightState.Off;
|
private LightState _yellow = LightState.Off;
|
||||||
private LightState _red = LightState.Off;
|
private LightState _red = LightState.Off;
|
||||||
|
|
||||||
public StoplightIndicator()
|
public StoplightIndicator()
|
||||||
{
|
{
|
||||||
_delcom = new Delcom();
|
_logger = Log.ForContext<StoplightIndicator>();
|
||||||
_delcom.Open();
|
|
||||||
|
Device = new Delcom();
|
||||||
|
Device.Open();
|
||||||
|
|
||||||
SetLights(_red, _yellow, _green);
|
SetLights(_red, _yellow, _green);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Dispose()
|
public void Dispose()
|
||||||
{
|
{
|
||||||
_delcom.Close();
|
Device.Close();
|
||||||
}
|
}
|
||||||
|
|
||||||
public Delcom Device
|
public Delcom Device { get; }
|
||||||
{
|
|
||||||
get { return _delcom; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public void GetLights(out LightState red, out LightState yellow, out LightState green)
|
public void GetLights(out LightState red, out LightState yellow, out LightState green)
|
||||||
{
|
{
|
||||||
@@ -65,7 +64,7 @@ namespace WorkIndicator.Delcom
|
|||||||
return _green;
|
return _green;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
throw new ArgumentOutOfRangeException("light");
|
throw new ArgumentOutOfRangeException(nameof(light));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -80,13 +79,13 @@ namespace WorkIndicator.Delcom
|
|||||||
_yellow = yellow;
|
_yellow = yellow;
|
||||||
_green = green;
|
_green = green;
|
||||||
|
|
||||||
Debug.WriteLine($"Red: {_red}, Yellow: {_yellow}, Green: {_green}");
|
_logger.Information("Red: {red}, Yellow: {yellow}, Green: {green}", _red, _yellow, _green);
|
||||||
|
|
||||||
port1 = port1.SetBitValue((int) Light.Green, green == LightState.Off);
|
port1 = port1.SetBitValue((int) Light.Green, green == LightState.Off);
|
||||||
port1 = port1.SetBitValue((int) Light.Yellow, yellow == LightState.Off);
|
port1 = port1.SetBitValue((int) Light.Yellow, yellow == LightState.Off);
|
||||||
port1 = port1.SetBitValue((int) Light.Red, red == LightState.Off);
|
port1 = port1.SetBitValue((int) Light.Red, red == LightState.Off);
|
||||||
|
|
||||||
_delcom.WritePorts(0, port1);
|
Device.WritePorts(0, port1);
|
||||||
|
|
||||||
var blinkEnable = 0;
|
var blinkEnable = 0;
|
||||||
var blinkDisable = 0;
|
var blinkDisable = 0;
|
||||||
@@ -106,7 +105,7 @@ namespace WorkIndicator.Delcom
|
|||||||
else
|
else
|
||||||
blinkDisable = blinkDisable.SetBitValue((int) Light.Green, true);
|
blinkDisable = blinkDisable.SetBitValue((int) Light.Green, true);
|
||||||
|
|
||||||
_delcom.WriteBlink(blinkDisable, blinkEnable);
|
Device.WriteBlink(blinkDisable, blinkEnable);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetLight(Light light, LightState state)
|
public void SetLight(Light light, LightState state)
|
||||||
@@ -130,7 +129,7 @@ namespace WorkIndicator.Delcom
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
throw new ArgumentOutOfRangeException("light");
|
throw new ArgumentOutOfRangeException(nameof(light));
|
||||||
}
|
}
|
||||||
|
|
||||||
SetLights(red, yellow, green);
|
SetLights(red, yellow, green);
|
||||||
|
|||||||
@@ -0,0 +1,17 @@
|
|||||||
|
namespace WorkIndicator;
|
||||||
|
|
||||||
|
public static class Extensions
|
||||||
|
{
|
||||||
|
extension(int i)
|
||||||
|
{
|
||||||
|
public int SetBitValue(int bit, bool value)
|
||||||
|
{
|
||||||
|
if (value)
|
||||||
|
i |= 1 << bit;
|
||||||
|
else
|
||||||
|
i &= ~(1 << bit);
|
||||||
|
|
||||||
|
return i;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
MIT License
|
MIT License
|
||||||
|
|
||||||
Copyright (c) 2018 Chris Kaczor
|
Copyright (c) 2026 Chris Kaczor
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|||||||
+55
-24
@@ -1,4 +1,5 @@
|
|||||||
using System;
|
using System;
|
||||||
|
using WorkIndicator.Audio;
|
||||||
using WorkIndicator.Delcom;
|
using WorkIndicator.Delcom;
|
||||||
|
|
||||||
namespace WorkIndicator
|
namespace WorkIndicator
|
||||||
@@ -14,22 +15,43 @@ namespace WorkIndicator
|
|||||||
|
|
||||||
public static class LightController
|
public static class LightController
|
||||||
{
|
{
|
||||||
|
private static readonly AudioWatcher AudioWatcher = new();
|
||||||
private static StoplightIndicator _stoplightIndicator;
|
private static StoplightIndicator _stoplightIndicator;
|
||||||
|
private static UsbService _usbService;
|
||||||
private static bool _initialized;
|
private static bool _initialized;
|
||||||
private static Status _status = Status.Auto;
|
private static Status _status = Status.Auto;
|
||||||
|
|
||||||
public static void Initialize()
|
public static void Initialize()
|
||||||
{
|
{
|
||||||
|
_usbService = new UsbService();
|
||||||
|
_usbService.DevicesChanged += DevicesChanged;
|
||||||
|
|
||||||
_stoplightIndicator = new StoplightIndicator();
|
_stoplightIndicator = new StoplightIndicator();
|
||||||
_stoplightIndicator.SetLight(StoplightIndicator.Light.Yellow, StoplightIndicator.LightState.On);
|
_stoplightIndicator.SetLight(StoplightIndicator.Light.Yellow, StoplightIndicator.LightState.On);
|
||||||
|
|
||||||
AudioWatcher.MicrophoneInUseChanged += AudioWatcher_MicrophoneInUseChanged;
|
Properties.Settings.Default.PropertyChanged += HandleSettingChange;
|
||||||
|
|
||||||
|
AudioWatcher.MicrophoneStatusChanged += AudioWatcher_MicrophoneStatusChanged;
|
||||||
AudioWatcher.Start();
|
AudioWatcher.Start();
|
||||||
|
|
||||||
_initialized = true;
|
_initialized = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void AudioWatcher_MicrophoneInUseChanged(bool microphoneInUse)
|
private static void HandleSettingChange(object sender, System.ComponentModel.PropertyChangedEventArgs e)
|
||||||
|
{
|
||||||
|
if (e.PropertyName == nameof(Properties.Settings.Default.DefaultStatus))
|
||||||
|
UpdateLights();
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void DevicesChanged()
|
||||||
|
{
|
||||||
|
_stoplightIndicator?.Dispose();
|
||||||
|
_stoplightIndicator = new StoplightIndicator();
|
||||||
|
|
||||||
|
UpdateLights();
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void AudioWatcher_MicrophoneStatusChanged(MicrophoneStatus microphoneStatus)
|
||||||
{
|
{
|
||||||
UpdateLights();
|
UpdateLights();
|
||||||
}
|
}
|
||||||
@@ -44,6 +66,8 @@ namespace WorkIndicator
|
|||||||
_stoplightIndicator.SetLights(StoplightIndicator.LightState.Off, StoplightIndicator.LightState.Off, StoplightIndicator.LightState.Off);
|
_stoplightIndicator.SetLights(StoplightIndicator.LightState.Off, StoplightIndicator.LightState.Off, StoplightIndicator.LightState.Off);
|
||||||
_stoplightIndicator.Dispose();
|
_stoplightIndicator.Dispose();
|
||||||
|
|
||||||
|
_usbService.Dispose();
|
||||||
|
|
||||||
_initialized = false;
|
_initialized = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -63,39 +87,46 @@ namespace WorkIndicator
|
|||||||
var yellow = StoplightIndicator.LightState.Off;
|
var yellow = StoplightIndicator.LightState.Off;
|
||||||
var green = StoplightIndicator.LightState.Off;
|
var green = StoplightIndicator.LightState.Off;
|
||||||
|
|
||||||
if (_status == Status.Auto)
|
var status = _status;
|
||||||
|
|
||||||
|
if (status == Status.Auto)
|
||||||
{
|
{
|
||||||
if (AudioWatcher.MicrophoneInUse())
|
var microphoneStatus = AudioWatcher.GetMicrophoneStatus();
|
||||||
|
|
||||||
|
if (microphoneStatus != MicrophoneStatus.NotUsed)
|
||||||
{
|
{
|
||||||
red = StoplightIndicator.LightState.On;
|
status = microphoneStatus == MicrophoneStatus.UsedMuted ? Status.OnPhone : Status.Talking;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
yellow = StoplightIndicator.LightState.On;
|
status = (Status) Enum.Parse(typeof(Status), Properties.Settings.Default.DefaultStatus);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
|
switch (status)
|
||||||
{
|
{
|
||||||
switch (_status)
|
case Status.Free:
|
||||||
{
|
green = StoplightIndicator.LightState.On;
|
||||||
case Status.Free:
|
break;
|
||||||
green = StoplightIndicator.LightState.On;
|
case Status.Working:
|
||||||
break;
|
yellow = StoplightIndicator.LightState.On;
|
||||||
case Status.Working:
|
break;
|
||||||
yellow = StoplightIndicator.LightState.On;
|
case Status.OnPhone:
|
||||||
break;
|
red = StoplightIndicator.LightState.On;
|
||||||
case Status.OnPhone:
|
break;
|
||||||
red = StoplightIndicator.LightState.On;
|
case Status.Talking:
|
||||||
break;
|
red = StoplightIndicator.LightState.Blink;
|
||||||
case Status.Talking:
|
break;
|
||||||
red = StoplightIndicator.LightState.Blink;
|
default:
|
||||||
break;
|
throw new ArgumentOutOfRangeException();
|
||||||
default:
|
|
||||||
throw new ArgumentOutOfRangeException();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_stoplightIndicator.SetLights(red, yellow, green);
|
_stoplightIndicator.SetLights(red, yellow, green);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void LogAudioState()
|
||||||
|
{
|
||||||
|
AudioWatcher.LogState();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,114 @@
|
|||||||
|
using ChrisKaczor.Wpf.Windows;
|
||||||
|
using H.NotifyIcon;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Windows;
|
||||||
|
using System.Windows.Controls;
|
||||||
|
using WorkIndicator.Audio;
|
||||||
|
using WorkIndicator.Properties;
|
||||||
|
using WorkIndicator.SettingsWindow;
|
||||||
|
|
||||||
|
namespace WorkIndicator;
|
||||||
|
|
||||||
|
internal static class NotificationIcon
|
||||||
|
{
|
||||||
|
private static TaskbarIcon _notificationIcon;
|
||||||
|
private static readonly Dictionary<Status, MenuItem> StatusMenuItems = new();
|
||||||
|
|
||||||
|
public static void Initialize()
|
||||||
|
{
|
||||||
|
// Create the notification icon
|
||||||
|
_notificationIcon = new TaskbarIcon { Icon = Resources.ApplicationIcon };
|
||||||
|
_notificationIcon.TrayMouseDoubleClick += _notificationIcon_TrayMouseDoubleClick;
|
||||||
|
|
||||||
|
// Set up the menu
|
||||||
|
var contextMenu = new ContextMenu();
|
||||||
|
contextMenu.Opened += HandleContextMenuOpening;
|
||||||
|
|
||||||
|
AddStatusMenuItem(contextMenu, Resources.StatusAuto, Status.Auto);
|
||||||
|
AddStatusMenuItem(contextMenu, Resources.StatusFree, Status.Free);
|
||||||
|
AddStatusMenuItem(contextMenu, Resources.StatusWorking, Status.Working);
|
||||||
|
AddStatusMenuItem(contextMenu, Resources.StatusOnPhone, Status.OnPhone);
|
||||||
|
AddStatusMenuItem(contextMenu, Resources.StatusTalking, Status.Talking);
|
||||||
|
|
||||||
|
contextMenu.Items.Add(new Separator());
|
||||||
|
|
||||||
|
var menuItem = new MenuItem
|
||||||
|
{
|
||||||
|
Header = Resources.NotificationIconContextMenuSettings
|
||||||
|
};
|
||||||
|
menuItem.Click += ShowSettings;
|
||||||
|
contextMenu.Items.Add(menuItem);
|
||||||
|
|
||||||
|
contextMenu.Items.Add(new Separator());
|
||||||
|
|
||||||
|
menuItem = new MenuItem
|
||||||
|
{
|
||||||
|
Header = Resources.NotificationIconContextMenuExit
|
||||||
|
};
|
||||||
|
menuItem.Click += HandleContextMenuExitClick;
|
||||||
|
contextMenu.Items.Add(menuItem);
|
||||||
|
|
||||||
|
// Set the menu into the icon
|
||||||
|
_notificationIcon.ContextMenu = contextMenu;
|
||||||
|
|
||||||
|
// Show the icon
|
||||||
|
_notificationIcon.ForceCreate(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void _notificationIcon_TrayMouseDoubleClick(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
LightController.LogAudioState();
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void ShowSettings(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
var categoryPanels = new List<CategoryPanelBase>
|
||||||
|
{
|
||||||
|
new GeneralSettingsPanel(),
|
||||||
|
new UpdateSettingsPanel(),
|
||||||
|
new AboutSettingsPanel()
|
||||||
|
};
|
||||||
|
|
||||||
|
var settingsWindow = new CategoryWindow(categoryPanels, Resources.SettingsTitle, Resources.CloseButtonText);
|
||||||
|
|
||||||
|
settingsWindow.ShowDialog();
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void HandleContextMenuOpening(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
foreach (var menuItem in StatusMenuItems)
|
||||||
|
{
|
||||||
|
menuItem.Value.IsChecked = menuItem.Key == LightController.Status;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void HandleContextMenuExitClick(object sender, System.EventArgs e)
|
||||||
|
{
|
||||||
|
Application.Current.Shutdown();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void Dispose()
|
||||||
|
{
|
||||||
|
// Get rid of the icon
|
||||||
|
_notificationIcon?.Dispose();
|
||||||
|
_notificationIcon = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void ShowBalloonTip(string text, H.NotifyIcon.Core.NotificationIcon icon)
|
||||||
|
{
|
||||||
|
_notificationIcon.ShowNotification(Resources.ApplicationName, text, icon);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void AddStatusMenuItem(ContextMenu contextMenu, string text, Status status)
|
||||||
|
{
|
||||||
|
var menuItem = new MenuItem
|
||||||
|
{
|
||||||
|
Header = text,
|
||||||
|
IsCheckable = true,
|
||||||
|
IsChecked = status == LightController.Status
|
||||||
|
};
|
||||||
|
menuItem.Click += (_, _) => LightController.Status = status;
|
||||||
|
contextMenu.Items.Add(menuItem);
|
||||||
|
StatusMenuItems[status] = menuItem;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<configuration>
|
|
||||||
<config>
|
|
||||||
<add key="globalPackagesFolder" value=".\packages" />
|
|
||||||
</config>
|
|
||||||
</configuration>
|
|
||||||
@@ -1,46 +0,0 @@
|
|||||||
<windows:CategoryPanel x:Class="WorkIndicator.Options.AboutOptionsPanel"
|
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
||||||
xmlns:windows="clr-namespace:Common.Wpf.Windows;assembly=Common.Wpf"
|
|
||||||
xmlns:properties="clr-namespace:WorkIndicator.Properties"
|
|
||||||
mc:Ignorable="d"
|
|
||||||
d:DesignHeight="300"
|
|
||||||
d:DesignWidth="300">
|
|
||||||
<Grid>
|
|
||||||
<Grid.RowDefinitions>
|
|
||||||
<RowDefinition Height="Auto"></RowDefinition>
|
|
||||||
<RowDefinition Height="Auto"></RowDefinition>
|
|
||||||
<RowDefinition Height="Auto"></RowDefinition>
|
|
||||||
<RowDefinition Height="Auto"></RowDefinition>
|
|
||||||
<RowDefinition Height="*"></RowDefinition>
|
|
||||||
</Grid.RowDefinitions>
|
|
||||||
<TextBlock Text="[Application Name]"
|
|
||||||
Name="ApplicationNameLabel"
|
|
||||||
VerticalAlignment="Top"
|
|
||||||
FontWeight="Bold"
|
|
||||||
Grid.Row="0" />
|
|
||||||
<TextBlock Text="[Application Version]"
|
|
||||||
Margin="0,6,0,0"
|
|
||||||
Name="VersionLabel"
|
|
||||||
VerticalAlignment="Top"
|
|
||||||
Grid.Row="1" />
|
|
||||||
<TextBlock Text="[Company]"
|
|
||||||
Margin="0,6,0,0"
|
|
||||||
Name="CompanyLabel"
|
|
||||||
VerticalAlignment="Top"
|
|
||||||
Grid.Row="2" />
|
|
||||||
<StackPanel Grid.Row="3"
|
|
||||||
Grid.Column="0"
|
|
||||||
Margin="0,20,0,0"
|
|
||||||
Orientation="Horizontal">
|
|
||||||
<Button Content="{x:Static properties:Resources.CheckUpdate}"
|
|
||||||
HorizontalAlignment="Left"
|
|
||||||
Padding="6,2"
|
|
||||||
Click="HandleCheckForUpdateButtonClick"
|
|
||||||
VerticalContentAlignment="Center" />
|
|
||||||
<Label Name="UpdateMessage" Content="" VerticalContentAlignment="Center" Padding="6,0" />
|
|
||||||
</StackPanel>
|
|
||||||
</Grid>
|
|
||||||
</windows:CategoryPanel>
|
|
||||||
@@ -1,42 +0,0 @@
|
|||||||
using Common.Update;
|
|
||||||
using System.Reflection;
|
|
||||||
using System.Windows;
|
|
||||||
|
|
||||||
namespace WorkIndicator.Options
|
|
||||||
{
|
|
||||||
public partial class AboutOptionsPanel
|
|
||||||
{
|
|
||||||
public AboutOptionsPanel()
|
|
||||||
{
|
|
||||||
InitializeComponent();
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void LoadPanel(object data)
|
|
||||||
{
|
|
||||||
base.LoadPanel(data);
|
|
||||||
|
|
||||||
ApplicationNameLabel.Text = Properties.Resources.ApplicationName;
|
|
||||||
|
|
||||||
var version = UpdateCheck.LocalVersion.ToString();
|
|
||||||
VersionLabel.Text = string.Format(Properties.Resources.About_Version, version);
|
|
||||||
|
|
||||||
CompanyLabel.Text = ((AssemblyCompanyAttribute)Assembly.GetEntryAssembly().GetCustomAttributes(typeof(AssemblyCompanyAttribute), false)[0]).Company;
|
|
||||||
}
|
|
||||||
|
|
||||||
public override bool ValidatePanel()
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void SavePanel()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public override string CategoryName => Properties.Resources.OptionCategory_About;
|
|
||||||
|
|
||||||
private async void HandleCheckForUpdateButtonClick(object sender, RoutedEventArgs e)
|
|
||||||
{
|
|
||||||
await UpdateCheck.CheckUpdate((status, message) => UpdateMessage.Content = message);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
<windows:CategoryPanel x:Class="WorkIndicator.Options.GeneralOptionsPanel"
|
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
||||||
xmlns:windows="clr-namespace:Common.Wpf.Windows;assembly=Common.Wpf"
|
|
||||||
xmlns:properties="clr-namespace:WorkIndicator.Properties"
|
|
||||||
mc:Ignorable="d"
|
|
||||||
d:DesignHeight="300"
|
|
||||||
d:DesignWidth="300">
|
|
||||||
<Grid>
|
|
||||||
<Grid.ColumnDefinitions>
|
|
||||||
<ColumnDefinition Width="Auto" />
|
|
||||||
<ColumnDefinition Width="*" />
|
|
||||||
</Grid.ColumnDefinitions>
|
|
||||||
<CheckBox Content="{x:Static properties:Resources.StartWithWindows}"
|
|
||||||
Name="StartWithWindows"
|
|
||||||
VerticalAlignment="Top"
|
|
||||||
VerticalContentAlignment="Center"
|
|
||||||
Grid.ColumnSpan="2" />
|
|
||||||
</Grid>
|
|
||||||
</windows:CategoryPanel>
|
|
||||||
@@ -1,39 +0,0 @@
|
|||||||
using Common.Wpf.Extensions;
|
|
||||||
using System.Windows;
|
|
||||||
|
|
||||||
namespace WorkIndicator.Options
|
|
||||||
{
|
|
||||||
public partial class GeneralOptionsPanel
|
|
||||||
{
|
|
||||||
public GeneralOptionsPanel()
|
|
||||||
{
|
|
||||||
InitializeComponent();
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void LoadPanel(object data)
|
|
||||||
{
|
|
||||||
base.LoadPanel(data);
|
|
||||||
|
|
||||||
var settings = Properties.Settings.Default;
|
|
||||||
|
|
||||||
StartWithWindows.IsChecked = settings.StartWithWindows;
|
|
||||||
}
|
|
||||||
|
|
||||||
public override bool ValidatePanel()
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void SavePanel()
|
|
||||||
{
|
|
||||||
var settings = Properties.Settings.Default;
|
|
||||||
|
|
||||||
if (StartWithWindows.IsChecked.HasValue && settings.StartWithWindows != StartWithWindows.IsChecked.Value)
|
|
||||||
settings.StartWithWindows = StartWithWindows.IsChecked.Value;
|
|
||||||
|
|
||||||
Application.Current.SetStartWithWindows(settings.StartWithWindows);
|
|
||||||
}
|
|
||||||
|
|
||||||
public override string CategoryName => Properties.Resources.OptionCategory_General;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
+31
@@ -0,0 +1,31 @@
|
|||||||
|
using Microsoft.Extensions.Logging;
|
||||||
|
using Serilog;
|
||||||
|
using System;
|
||||||
|
using Velopack;
|
||||||
|
|
||||||
|
namespace WorkIndicator;
|
||||||
|
|
||||||
|
internal static class Program
|
||||||
|
{
|
||||||
|
[STAThread]
|
||||||
|
public static void Main(string[] args)
|
||||||
|
{
|
||||||
|
Log.Logger = new LoggerConfiguration()
|
||||||
|
.WriteTo.File("log.txt")
|
||||||
|
.WriteTo.Debug(outputTemplate: "{Timestamp:u} [{Level}] ({SourceContext}) {Message}{NewLine}{Exception}")
|
||||||
|
.CreateLogger();
|
||||||
|
|
||||||
|
Log.Logger.Information("");
|
||||||
|
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");
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,21 +1,59 @@
|
|||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
|
using System.Resources;
|
||||||
|
using System.Runtime.CompilerServices;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
using System.Runtime.Versioning;
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
|
|
||||||
|
// 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("WorkIndicator")]
|
[assembly: AssemblyTitle("WorkIndicator")]
|
||||||
[assembly: AssemblyDescription("")]
|
[assembly: AssemblyDescription("")]
|
||||||
[assembly: AssemblyConfiguration("")]
|
[assembly: AssemblyConfiguration("")]
|
||||||
[assembly: AssemblyCompany("Chris Kaczor")]
|
[assembly: AssemblyCompany("")]
|
||||||
[assembly: AssemblyProduct("WorkIndicator")]
|
[assembly: AssemblyProduct("WorkIndicator")]
|
||||||
[assembly: AssemblyCopyright("Copyright © Chris Kaczor 2012")]
|
[assembly: AssemblyCopyright("Copyright © 2014")]
|
||||||
[assembly: AssemblyTrademark("")]
|
[assembly: AssemblyTrademark("")]
|
||||||
[assembly: AssemblyCulture("")]
|
[assembly: AssemblyCulture("")]
|
||||||
|
|
||||||
|
[assembly: SupportedOSPlatform("windows7.0")]
|
||||||
|
[assembly: NeutralResourcesLanguage("en-US")]
|
||||||
|
|
||||||
|
// 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: ComVisible(false)]
|
||||||
|
|
||||||
[assembly: ThemeInfo(ResourceDictionaryLocation.None, ResourceDictionaryLocation.SourceAssembly)]
|
//In order to begin building localizable applications, set
|
||||||
|
//<UICulture>CultureYouAreCodingWith</UICulture> in your .csproj file
|
||||||
|
//inside a <PropertyGroup>. For example, if you are using US english
|
||||||
|
//in your source files, set the <UICulture> to en-US. Then uncomment
|
||||||
|
//the NeutralResourceLanguage attribute below. Update the "en-US" in
|
||||||
|
//the line below to match the UICulture setting in the project file.
|
||||||
|
|
||||||
|
//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
|
||||||
|
|
||||||
|
|
||||||
|
[assembly: ThemeInfo(
|
||||||
|
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
|
||||||
|
//(used if a resource is not found in the page,
|
||||||
|
// or application resource dictionaries)
|
||||||
|
ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
|
||||||
|
//(used if a resource is not found in the page,
|
||||||
|
// app, or any theme specific resource dictionaries)
|
||||||
|
)]
|
||||||
|
|
||||||
|
|
||||||
|
// 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: AssemblyVersion("1.0.0.0")]
|
||||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||||
|
|
||||||
[assembly: AssemblyMetadata("SquirrelAwareVersion", "1")]
|
|
||||||
Generated
+111
-216
@@ -19,7 +19,7 @@ namespace WorkIndicator.Properties {
|
|||||||
// class via a tool like ResGen or Visual Studio.
|
// class via a tool like ResGen or Visual Studio.
|
||||||
// To add or remove a member, edit your .ResX file then rerun ResGen
|
// To add or remove a member, edit your .ResX file then rerun ResGen
|
||||||
// with the /str option, or rebuild your VS project.
|
// with the /str option, or rebuild your VS project.
|
||||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "18.0.0.0")]
|
||||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||||
public class Resources {
|
public class Resources {
|
||||||
@@ -60,33 +60,6 @@ namespace WorkIndicator.Properties {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Looks up a localized string similar to Version: {0}.
|
|
||||||
/// </summary>
|
|
||||||
public static string About_Version {
|
|
||||||
get {
|
|
||||||
return ResourceManager.GetString("About_Version", resourceCulture);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Looks up a localized string similar to Add.
|
|
||||||
/// </summary>
|
|
||||||
public static string AddWindowPattern {
|
|
||||||
get {
|
|
||||||
return ResourceManager.GetString("AddWindowPattern", resourceCulture);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Looks up a localized string similar to Add Window Pattern.
|
|
||||||
/// </summary>
|
|
||||||
public static string AddWindowPattern_ToolTip {
|
|
||||||
get {
|
|
||||||
return ResourceManager.GetString("AddWindowPattern_ToolTip", resourceCulture);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized resource of type System.Drawing.Icon similar to (Icon).
|
/// Looks up a localized resource of type System.Drawing.Icon similar to (Icon).
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -107,11 +80,11 @@ namespace WorkIndicator.Properties {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to Auto.
|
/// Looks up a localized string similar to Free.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static string Auto {
|
public static string B {
|
||||||
get {
|
get {
|
||||||
return ResourceManager.GetString("Auto", resourceCulture);
|
return ResourceManager.GetString("B", resourceCulture);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -143,47 +116,38 @@ namespace WorkIndicator.Properties {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to Enabled.
|
/// Looks up a localized string similar to Check _Now.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static string ColumnHeader_Enabled {
|
public static string checkVersionNowButton {
|
||||||
get {
|
get {
|
||||||
return ResourceManager.GetString("ColumnHeader_Enabled", resourceCulture);
|
return ResourceManager.GetString("checkVersionNowButton", resourceCulture);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to Name.
|
/// Looks up a localized string similar to _Check for a new version on startup.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static string ColumnHeader_Name {
|
public static string checkVersionOnStartupCheckBox {
|
||||||
get {
|
get {
|
||||||
return ResourceManager.GetString("ColumnHeader_Name", resourceCulture);
|
return ResourceManager.GetString("checkVersionOnStartupCheckBox", resourceCulture);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to Pattern.
|
/// Looks up a localized string similar to Close.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static string ColumnHeader_Pattern {
|
public static string CloseButtonText {
|
||||||
get {
|
get {
|
||||||
return ResourceManager.GetString("ColumnHeader_Pattern", resourceCulture);
|
return ResourceManager.GetString("CloseButtonText", resourceCulture);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to Delete.
|
/// Looks up a localized string similar to Default status:.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static string DeleteWindowPattern {
|
public static string DefaultStatusLabel {
|
||||||
get {
|
get {
|
||||||
return ResourceManager.GetString("DeleteWindowPattern", resourceCulture);
|
return ResourceManager.GetString("DefaultStatusLabel", resourceCulture);
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Looks up a localized string similar to Delete Window Pattern.
|
|
||||||
/// </summary>
|
|
||||||
public static string DeleteWindowPattern_ToolTip {
|
|
||||||
get {
|
|
||||||
return ResourceManager.GetString("DeleteWindowPattern_ToolTip", resourceCulture);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -196,33 +160,6 @@ namespace WorkIndicator.Properties {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Looks up a localized string similar to Edit.
|
|
||||||
/// </summary>
|
|
||||||
public static string EditWindowPattern {
|
|
||||||
get {
|
|
||||||
return ResourceManager.GetString("EditWindowPattern", resourceCulture);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Looks up a localized string similar to Edit Window Pattern.
|
|
||||||
/// </summary>
|
|
||||||
public static string EditWindowPattern_ToolTip {
|
|
||||||
get {
|
|
||||||
return ResourceManager.GetString("EditWindowPattern_ToolTip", resourceCulture);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Looks up a localized string similar to Free.
|
|
||||||
/// </summary>
|
|
||||||
public static string Free {
|
|
||||||
get {
|
|
||||||
return ResourceManager.GetString("Free", resourceCulture);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to Installing update....
|
/// Looks up a localized string similar to Installing update....
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -242,11 +179,20 @@ namespace WorkIndicator.Properties {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to No update found.
|
/// Looks up a localized string similar to Exit.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static string NoUpdate {
|
public static string NotificationIconContextMenuExit {
|
||||||
get {
|
get {
|
||||||
return ResourceManager.GetString("NoUpdate", resourceCulture);
|
return ResourceManager.GetString("NotificationIconContextMenuExit", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to Settings....
|
||||||
|
/// </summary>
|
||||||
|
public static string NotificationIconContextMenuSettings {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("NotificationIconContextMenuSettings", resourceCulture);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -259,184 +205,133 @@ namespace WorkIndicator.Properties {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Looks up a localized string similar to On Phone.
|
|
||||||
/// </summary>
|
|
||||||
public static string OnPhone {
|
|
||||||
get {
|
|
||||||
return ResourceManager.GetString("OnPhone", resourceCulture);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to About.
|
/// Looks up a localized string similar to About.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static string OptionCategory_About {
|
public static string optionCategoryAbout {
|
||||||
get {
|
get {
|
||||||
return ResourceManager.GetString("OptionCategory_About", resourceCulture);
|
return ResourceManager.GetString("optionCategoryAbout", resourceCulture);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to General.
|
/// Looks up a localized string similar to General.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static string OptionCategory_General {
|
public static string optionCategoryGeneral {
|
||||||
get {
|
get {
|
||||||
return ResourceManager.GetString("OptionCategory_General", resourceCulture);
|
return ResourceManager.GetString("optionCategoryGeneral", resourceCulture);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to Window Patterns.
|
/// Looks up a localized string similar to Update.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static string OptionCategory_WindowPatterns {
|
public static string optionCategoryUpdate {
|
||||||
get {
|
get {
|
||||||
return ResourceManager.GetString("OptionCategory_WindowPatterns", resourceCulture);
|
return ResourceManager.GetString("optionCategoryUpdate", resourceCulture);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to Cancel.
|
/// Looks up a localized string similar to Settings.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static string OptionsWindow_CancelButton {
|
public static string SettingsTitle {
|
||||||
get {
|
get {
|
||||||
return ResourceManager.GetString("OptionsWindow_CancelButton", resourceCulture);
|
return ResourceManager.GetString("SettingsTitle", resourceCulture);
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Looks up a localized resource of type System.Drawing.Icon similar to (Icon).
|
|
||||||
/// </summary>
|
|
||||||
public static System.Drawing.Icon OptionsWindow_Icon {
|
|
||||||
get {
|
|
||||||
object obj = ResourceManager.GetObject("OptionsWindow_Icon", resourceCulture);
|
|
||||||
return ((System.Drawing.Icon)(obj));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Looks up a localized string similar to OK.
|
|
||||||
/// </summary>
|
|
||||||
public static string OptionsWindow_OkayButton {
|
|
||||||
get {
|
|
||||||
return ResourceManager.GetString("OptionsWindow_OkayButton", resourceCulture);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Looks up a localized string similar to Options.
|
|
||||||
/// </summary>
|
|
||||||
public static string OptionsWindow_Title {
|
|
||||||
get {
|
|
||||||
return ResourceManager.GetString("OptionsWindow_Title", resourceCulture);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Looks up a localized string similar to Restarting application....
|
|
||||||
/// </summary>
|
|
||||||
public static string RestartingAfterUpdate {
|
|
||||||
get {
|
|
||||||
return ResourceManager.GetString("RestartingAfterUpdate", resourceCulture);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to _Start when Windows starts.
|
/// Looks up a localized string similar to _Start when Windows starts.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static string StartWithWindows {
|
public static string startWithWindowsCheckBox {
|
||||||
get {
|
get {
|
||||||
return ResourceManager.GetString("StartWithWindows", resourceCulture);
|
return ResourceManager.GetString("startWithWindowsCheckBox", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to Auto.
|
||||||
|
/// </summary>
|
||||||
|
public static string StatusAuto {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("StatusAuto", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to Free.
|
||||||
|
/// </summary>
|
||||||
|
public static string StatusFree {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("StatusFree", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to On Phone.
|
||||||
|
/// </summary>
|
||||||
|
public static string StatusOnPhone {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("StatusOnPhone", resourceCulture);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to Talking.
|
/// Looks up a localized string similar to Talking.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static string Talking {
|
public static string StatusTalking {
|
||||||
get {
|
get {
|
||||||
return ResourceManager.GetString("Talking", resourceCulture);
|
return ResourceManager.GetString("StatusTalking", resourceCulture);
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Looks up a localized string similar to Exit.
|
|
||||||
/// </summary>
|
|
||||||
public static string TrayIconContextMenuExit {
|
|
||||||
get {
|
|
||||||
return ResourceManager.GetString("TrayIconContextMenuExit", resourceCulture);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Looks up a localized string similar to Options....
|
|
||||||
/// </summary>
|
|
||||||
public static string TrayIconContextMenuSettings {
|
|
||||||
get {
|
|
||||||
return ResourceManager.GetString("TrayIconContextMenuSettings", resourceCulture);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Looks up a localized string similar to Updating application....
|
|
||||||
/// </summary>
|
|
||||||
public static string Updating {
|
|
||||||
get {
|
|
||||||
return ResourceManager.GetString("Updating", resourceCulture);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Looks up a localized string similar to _Enabled:.
|
|
||||||
/// </summary>
|
|
||||||
public static string WindowPatternEnabledLabel {
|
|
||||||
get {
|
|
||||||
return ResourceManager.GetString("WindowPatternEnabledLabel", resourceCulture);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Looks up a localized string similar to _Name:.
|
|
||||||
/// </summary>
|
|
||||||
public static string WindowPatternNameLabel {
|
|
||||||
get {
|
|
||||||
return ResourceManager.GetString("WindowPatternNameLabel", resourceCulture);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Looks up a localized string similar to _Pattern:.
|
|
||||||
/// </summary>
|
|
||||||
public static string WindowPatternPatternLabel {
|
|
||||||
get {
|
|
||||||
return ResourceManager.GetString("WindowPatternPatternLabel", resourceCulture);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Looks up a localized string similar to Add Window Pattern.
|
|
||||||
/// </summary>
|
|
||||||
public static string WindowPatternWindowAdd {
|
|
||||||
get {
|
|
||||||
return ResourceManager.GetString("WindowPatternWindowAdd", resourceCulture);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Looks up a localized string similar to Edit Window Pattern.
|
|
||||||
/// </summary>
|
|
||||||
public static string WindowPatternWindowEdit {
|
|
||||||
get {
|
|
||||||
return ResourceManager.GetString("WindowPatternWindowEdit", resourceCulture);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to Working.
|
/// Looks up a localized string similar to Working.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static string Working {
|
public static string StatusWorking {
|
||||||
get {
|
get {
|
||||||
return ResourceManager.GetString("Working", resourceCulture);
|
return ResourceManager.GetString("StatusWorking", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to You are already running the most recent version.
|
||||||
|
///
|
||||||
|
///No updates are available at this time..
|
||||||
|
/// </summary>
|
||||||
|
public static string UpdateCheckCurrent {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("UpdateCheckCurrent", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to Version {0} is now available.
|
||||||
|
///
|
||||||
|
///Would you like to download and install it now?.
|
||||||
|
/// </summary>
|
||||||
|
public static string UpdateCheckNewVersion {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("UpdateCheckNewVersion", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to {0} Update.
|
||||||
|
/// </summary>
|
||||||
|
public static string UpdateCheckTitle {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("UpdateCheckTitle", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to Version {0}.
|
||||||
|
/// </summary>
|
||||||
|
public static string Version {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("Version", resourceCulture);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+64
-96
@@ -117,108 +117,58 @@
|
|||||||
<resheader name="writer">
|
<resheader name="writer">
|
||||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
</resheader>
|
</resheader>
|
||||||
<data name="About_Version" xml:space="preserve">
|
|
||||||
<value>Version: {0}</value>
|
|
||||||
</data>
|
|
||||||
<data name="AddWindowPattern" xml:space="preserve">
|
|
||||||
<value>Add</value>
|
|
||||||
</data>
|
|
||||||
<data name="AddWindowPattern_ToolTip" xml:space="preserve">
|
|
||||||
<value>Add Window Pattern</value>
|
|
||||||
</data>
|
|
||||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||||
<data name="ApplicationIcon" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="ApplicationIcon" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>..\Resources\ApplicationIcon.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
<value>..\Resources\Application.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="ApplicationName" xml:space="preserve">
|
<data name="ApplicationName" xml:space="preserve">
|
||||||
<value>Work Indicator</value>
|
<value>Work Indicator</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="Auto" xml:space="preserve">
|
<data name="optionCategoryAbout" xml:space="preserve">
|
||||||
<value>Auto</value>
|
|
||||||
</data>
|
|
||||||
<data name="CancelButton" xml:space="preserve">
|
|
||||||
<value>Cancel</value>
|
|
||||||
</data>
|
|
||||||
<data name="ColumnHeader_Enabled" xml:space="preserve">
|
|
||||||
<value>Enabled</value>
|
|
||||||
</data>
|
|
||||||
<data name="ColumnHeader_Name" xml:space="preserve">
|
|
||||||
<value>Name</value>
|
|
||||||
</data>
|
|
||||||
<data name="ColumnHeader_Pattern" xml:space="preserve">
|
|
||||||
<value>Pattern</value>
|
|
||||||
</data>
|
|
||||||
<data name="DeleteWindowPattern" xml:space="preserve">
|
|
||||||
<value>Delete</value>
|
|
||||||
</data>
|
|
||||||
<data name="DeleteWindowPattern_ToolTip" xml:space="preserve">
|
|
||||||
<value>Delete Window Pattern</value>
|
|
||||||
</data>
|
|
||||||
<data name="EditWindowPattern" xml:space="preserve">
|
|
||||||
<value>Edit</value>
|
|
||||||
</data>
|
|
||||||
<data name="EditWindowPattern_ToolTip" xml:space="preserve">
|
|
||||||
<value>Edit Window Pattern</value>
|
|
||||||
</data>
|
|
||||||
<data name="Free" xml:space="preserve">
|
|
||||||
<value>Free</value>
|
|
||||||
</data>
|
|
||||||
<data name="OkayButton" xml:space="preserve">
|
|
||||||
<value>OK</value>
|
|
||||||
</data>
|
|
||||||
<data name="OnPhone" xml:space="preserve">
|
|
||||||
<value>On Phone</value>
|
|
||||||
</data>
|
|
||||||
<data name="OptionCategory_About" xml:space="preserve">
|
|
||||||
<value>About</value>
|
<value>About</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="OptionCategory_General" xml:space="preserve">
|
<data name="CheckUpdate" xml:space="preserve">
|
||||||
<value>General</value>
|
<value>_Check for Update</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="OptionCategory_WindowPatterns" xml:space="preserve">
|
<data name="startWithWindowsCheckBox" xml:space="preserve">
|
||||||
<value>Window Patterns</value>
|
|
||||||
</data>
|
|
||||||
<data name="OptionsWindow_CancelButton" xml:space="preserve">
|
|
||||||
<value>Cancel</value>
|
|
||||||
</data>
|
|
||||||
<data name="OptionsWindow_Icon" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
|
||||||
<value>..\Resources\ApplicationIcon.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
|
||||||
</data>
|
|
||||||
<data name="OptionsWindow_OkayButton" xml:space="preserve">
|
|
||||||
<value>OK</value>
|
|
||||||
</data>
|
|
||||||
<data name="OptionsWindow_Title" xml:space="preserve">
|
|
||||||
<value>Options</value>
|
|
||||||
</data>
|
|
||||||
<data name="StartWithWindows" xml:space="preserve">
|
|
||||||
<value>_Start when Windows starts</value>
|
<value>_Start when Windows starts</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="Talking" xml:space="preserve">
|
<data name="optionCategoryGeneral" xml:space="preserve">
|
||||||
<value>Talking</value>
|
<value>General</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="TrayIconContextMenuExit" xml:space="preserve">
|
<data name="SettingsTitle" xml:space="preserve">
|
||||||
<value>Exit</value>
|
<value>Settings</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="TrayIconContextMenuSettings" xml:space="preserve">
|
<data name="CloseButtonText" xml:space="preserve">
|
||||||
<value>Options...</value>
|
<value>Close</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="WindowPatternEnabledLabel" xml:space="preserve">
|
<data name="Version" xml:space="preserve">
|
||||||
<value>_Enabled:</value>
|
<value>Version {0}</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="WindowPatternNameLabel" xml:space="preserve">
|
<data name="optionCategoryUpdate" xml:space="preserve">
|
||||||
<value>_Name:</value>
|
<value>Update</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="WindowPatternPatternLabel" xml:space="preserve">
|
<data name="checkVersionOnStartupCheckBox" xml:space="preserve">
|
||||||
<value>_Pattern:</value>
|
<value>_Check for a new version on startup</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="WindowPatternWindowAdd" xml:space="preserve">
|
<data name="checkVersionNowButton" xml:space="preserve">
|
||||||
<value>Add Window Pattern</value>
|
<value>Check _Now</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="WindowPatternWindowEdit" xml:space="preserve">
|
<data name="UpdateCheckTitle" xml:space="preserve">
|
||||||
<value>Edit Window Pattern</value>
|
<value>{0} Update</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="Working" xml:space="preserve">
|
<data name="UpdateCheckCurrent" xml:space="preserve">
|
||||||
<value>Working</value>
|
<value>You are already running the most recent version.
|
||||||
|
|
||||||
|
No updates are available at this time.</value>
|
||||||
|
</data>
|
||||||
|
<data name="UpdateCheckNewVersion" xml:space="preserve">
|
||||||
|
<value>Version {0} is now available.
|
||||||
|
|
||||||
|
Would you like to download and install it now?</value>
|
||||||
|
</data>
|
||||||
|
<data name="Loading" xml:space="preserve">
|
||||||
|
<value>Loading...</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="CheckingForUpdate" xml:space="preserve">
|
<data name="CheckingForUpdate" xml:space="preserve">
|
||||||
<value>Checking for update...</value>
|
<value>Checking for update...</value>
|
||||||
@@ -226,22 +176,40 @@
|
|||||||
<data name="DownloadingUpdate" xml:space="preserve">
|
<data name="DownloadingUpdate" xml:space="preserve">
|
||||||
<value>Downloading update...</value>
|
<value>Downloading update...</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="NoUpdate" xml:space="preserve">
|
|
||||||
<value>No update found</value>
|
|
||||||
</data>
|
|
||||||
<data name="Updating" xml:space="preserve">
|
|
||||||
<value>Updating application...</value>
|
|
||||||
</data>
|
|
||||||
<data name="RestartingAfterUpdate" xml:space="preserve">
|
|
||||||
<value>Restarting application...</value>
|
|
||||||
</data>
|
|
||||||
<data name="InstallingUpdate" xml:space="preserve">
|
<data name="InstallingUpdate" xml:space="preserve">
|
||||||
<value>Installing update...</value>
|
<value>Installing update...</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="Loading" xml:space="preserve">
|
<data name="OkayButton" xml:space="preserve">
|
||||||
<value>Loading...</value>
|
<value>OK</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="CheckUpdate" xml:space="preserve">
|
<data name="CancelButton" xml:space="preserve">
|
||||||
<value>_Check for Update</value>
|
<value>Cancel</value>
|
||||||
|
</data>
|
||||||
|
<data name="NotificationIconContextMenuExit" xml:space="preserve">
|
||||||
|
<value>Exit</value>
|
||||||
|
</data>
|
||||||
|
<data name="B" xml:space="preserve">
|
||||||
|
<value>Free</value>
|
||||||
|
</data>
|
||||||
|
<data name="StatusWorking" xml:space="preserve">
|
||||||
|
<value>Working</value>
|
||||||
|
</data>
|
||||||
|
<data name="StatusOnPhone" xml:space="preserve">
|
||||||
|
<value>On Phone</value>
|
||||||
|
</data>
|
||||||
|
<data name="StatusTalking" xml:space="preserve">
|
||||||
|
<value>Talking</value>
|
||||||
|
</data>
|
||||||
|
<data name="NotificationIconContextMenuSettings" xml:space="preserve">
|
||||||
|
<value>Settings...</value>
|
||||||
|
</data>
|
||||||
|
<data name="StatusFree" xml:space="preserve">
|
||||||
|
<value>Free</value>
|
||||||
|
</data>
|
||||||
|
<data name="StatusAuto" xml:space="preserve">
|
||||||
|
<value>Auto</value>
|
||||||
|
</data>
|
||||||
|
<data name="DefaultStatusLabel" xml:space="preserve">
|
||||||
|
<value>Default status:</value>
|
||||||
</data>
|
</data>
|
||||||
</root>
|
</root>
|
||||||
Generated
+33
-27
@@ -12,7 +12,7 @@ namespace WorkIndicator.Properties {
|
|||||||
|
|
||||||
|
|
||||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.5.0.0")]
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "18.9.0.0")]
|
||||||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
|
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
|
||||||
|
|
||||||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||||
@@ -25,43 +25,49 @@ namespace WorkIndicator.Properties {
|
|||||||
|
|
||||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||||
[global::System.Configuration.DefaultSettingValueAttribute("True")]
|
[global::System.Configuration.DefaultSettingValueAttribute("")]
|
||||||
public bool StartWithWindows {
|
public string WindowSettings {
|
||||||
get {
|
get {
|
||||||
return ((bool)(this["StartWithWindows"]));
|
return ((string)(this["WindowSettings"]));
|
||||||
}
|
}
|
||||||
set {
|
set {
|
||||||
this["StartWithWindows"] = value;
|
this["WindowSettings"] = value;
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
[global::System.Configuration.ApplicationScopedSettingAttribute()]
|
|
||||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
||||||
[global::System.Configuration.DefaultSettingValueAttribute("00:00:10")]
|
|
||||||
public global::System.TimeSpan RetryInterval {
|
|
||||||
get {
|
|
||||||
return ((global::System.TimeSpan)(this["RetryInterval"]));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
[global::System.Configuration.ApplicationScopedSettingAttribute()]
|
|
||||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
||||||
[global::System.Configuration.DefaultSettingValueAttribute("00:00:00.5000000")]
|
|
||||||
public global::System.TimeSpan UpdateInterval {
|
|
||||||
get {
|
|
||||||
return ((global::System.TimeSpan)(this["UpdateInterval"]));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||||
[global::System.Configuration.DefaultSettingValueAttribute("")]
|
[global::System.Configuration.DefaultSettingValueAttribute("True")]
|
||||||
public string WindowPatterns {
|
public bool AutoStart {
|
||||||
get {
|
get {
|
||||||
return ((string)(this["WindowPatterns"]));
|
return ((bool)(this["AutoStart"]));
|
||||||
}
|
}
|
||||||
set {
|
set {
|
||||||
this["WindowPatterns"] = value;
|
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("Working")]
|
||||||
|
public string DefaultStatus {
|
||||||
|
get {
|
||||||
|
return ((string)(this["DefaultStatus"]));
|
||||||
|
}
|
||||||
|
set {
|
||||||
|
this["DefaultStatus"] = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,17 +2,17 @@
|
|||||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="WorkIndicator.Properties" GeneratedClassName="Settings">
|
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="WorkIndicator.Properties" GeneratedClassName="Settings">
|
||||||
<Profiles />
|
<Profiles />
|
||||||
<Settings>
|
<Settings>
|
||||||
<Setting Name="StartWithWindows" Type="System.Boolean" Scope="User">
|
<Setting Name="WindowSettings" Type="System.String" Scope="User">
|
||||||
|
<Value Profile="(Default)" />
|
||||||
|
</Setting>
|
||||||
|
<Setting Name="AutoStart" Type="System.Boolean" Scope="User">
|
||||||
<Value Profile="(Default)">True</Value>
|
<Value Profile="(Default)">True</Value>
|
||||||
</Setting>
|
</Setting>
|
||||||
<Setting Name="RetryInterval" Type="System.TimeSpan" Scope="Application">
|
<Setting Name="CheckVersionAtStartup" Type="System.Boolean" Scope="User">
|
||||||
<Value Profile="(Default)">00:00:10</Value>
|
<Value Profile="(Default)">True</Value>
|
||||||
</Setting>
|
</Setting>
|
||||||
<Setting Name="UpdateInterval" Type="System.TimeSpan" Scope="Application">
|
<Setting Name="DefaultStatus" Type="System.String" Scope="User">
|
||||||
<Value Profile="(Default)">00:00:00.5000000</Value>
|
<Value Profile="(Default)">Working</Value>
|
||||||
</Setting>
|
|
||||||
<Setting Name="WindowPatterns" Type="System.String" Scope="User">
|
|
||||||
<Value Profile="(Default)" />
|
|
||||||
</Setting>
|
</Setting>
|
||||||
</Settings>
|
</Settings>
|
||||||
</SettingsFile>
|
</SettingsFile>
|
||||||
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
@@ -0,0 +1,21 @@
|
|||||||
|
<windows:CategoryPanelBase x:Class="WorkIndicator.SettingsWindow.AboutSettingsPanel"
|
||||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
|
xmlns:properties="clr-namespace:WorkIndicator.Properties"
|
||||||
|
xmlns:WorkIndicator="clr-namespace:WorkIndicator"
|
||||||
|
xmlns:windows="clr-namespace:ChrisKaczor.Wpf.Windows;assembly=ChrisKaczor.Wpf.Windows.CategoryWindow"
|
||||||
|
mc:Ignorable="d"
|
||||||
|
d:DesignHeight="150"
|
||||||
|
d:DesignWidth="300">
|
||||||
|
<Grid>
|
||||||
|
<StackPanel windows:Spacing.Vertical="10">
|
||||||
|
<TextBlock Text="{x:Static properties:Resources.ApplicationName}"
|
||||||
|
FontWeight="Bold" />
|
||||||
|
<TextBlock Text="{Binding Source={x:Static WorkIndicator:UpdateCheck.LocalVersion}, StringFormat={x:Static properties:Resources.Version}}"
|
||||||
|
Name="VersionLabel" />
|
||||||
|
<TextBlock Text="Chris Kaczor" />
|
||||||
|
</StackPanel>
|
||||||
|
</Grid>
|
||||||
|
</windows:CategoryPanelBase>
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
namespace WorkIndicator.SettingsWindow
|
||||||
|
{
|
||||||
|
public partial class AboutSettingsPanel
|
||||||
|
{
|
||||||
|
public AboutSettingsPanel()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
|
||||||
|
public override string CategoryName => Properties.Resources.optionCategoryAbout;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
<windows:CategoryPanelBase x:Class="WorkIndicator.SettingsWindow.GeneralSettingsPanel"
|
||||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
|
xmlns:properties="clr-namespace:WorkIndicator.Properties"
|
||||||
|
xmlns:windows="clr-namespace:ChrisKaczor.Wpf.Windows;assembly=ChrisKaczor.Wpf.Windows.CategoryWindow"
|
||||||
|
xmlns:mah="http://metro.mahapps.com/winfx/xaml/controls"
|
||||||
|
xmlns:workIndicator="clr-namespace:WorkIndicator"
|
||||||
|
mc:Ignorable="d"
|
||||||
|
d:DesignHeight="300"
|
||||||
|
d:DesignWidth="300">
|
||||||
|
<StackPanel windows:Spacing.Vertical="10">
|
||||||
|
<CheckBox Content="{x:Static properties:Resources.startWithWindowsCheckBox}"
|
||||||
|
IsChecked="{Binding Source={x:Static properties:Settings.Default}, Path=AutoStart}"
|
||||||
|
Click="OnSaveSettings" />
|
||||||
|
<ComboBox
|
||||||
|
mah:TextBoxHelper.UseFloatingWatermark="True"
|
||||||
|
mah:TextBoxHelper.Watermark="{x:Static properties:Resources.DefaultStatusLabel}"
|
||||||
|
SelectedValue="{Binding Source={x:Static properties:Settings.Default}, Path=DefaultStatus}"
|
||||||
|
SelectedValuePath="Tag"
|
||||||
|
SelectionChanged="OnSaveSettings">
|
||||||
|
<ComboBoxItem Content="{x:Static properties:Resources.StatusFree}"
|
||||||
|
Tag="{x:Static workIndicator:Status.Free}" />
|
||||||
|
<ComboBoxItem Content="{x:Static properties:Resources.StatusWorking}"
|
||||||
|
Tag="{x:Static workIndicator:Status.Working}" />
|
||||||
|
<ComboBoxItem Content="{x:Static properties:Resources.StatusOnPhone}"
|
||||||
|
Tag="{x:Static workIndicator:Status.OnPhone}" />
|
||||||
|
<ComboBoxItem Content="{x:Static properties:Resources.StatusTalking}"
|
||||||
|
Tag="{x:Static workIndicator:Status.Talking}" />
|
||||||
|
</ComboBox>
|
||||||
|
</StackPanel>
|
||||||
|
</windows:CategoryPanelBase>
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
using ChrisKaczor.Wpf.Application;
|
||||||
|
using System.Windows;
|
||||||
|
using WorkIndicator.Properties;
|
||||||
|
|
||||||
|
namespace WorkIndicator.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);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
<windows:CategoryPanelBase x:Class="WorkIndicator.SettingsWindow.UpdateSettingsPanel"
|
||||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
|
xmlns:properties="clr-namespace:WorkIndicator.Properties"
|
||||||
|
xmlns:windows="clr-namespace:ChrisKaczor.Wpf.Windows;assembly=ChrisKaczor.Wpf.Windows.CategoryWindow"
|
||||||
|
xmlns:WorkIndicator="clr-namespace:WorkIndicator"
|
||||||
|
mc:Ignorable="d"
|
||||||
|
d:DesignHeight="150"
|
||||||
|
d:DesignWidth="250">
|
||||||
|
<StackPanel windows:Spacing.Vertical="10">
|
||||||
|
<CheckBox Content="{x:Static properties:Resources.checkVersionOnStartupCheckBox}"
|
||||||
|
Name="CheckVersionOnStartupCheckBox"
|
||||||
|
IsChecked="{Binding Source={x:Static properties:Settings.Default}, Path=CheckVersionAtStartup}"
|
||||||
|
Click="OnSaveSettings" />
|
||||||
|
<Button Content="{x:Static properties:Resources.checkVersionNowButton}"
|
||||||
|
IsEnabled="{Binding Source={x:Static WorkIndicator:UpdateCheck.IsInstalled}}"
|
||||||
|
HorizontalAlignment="Left"
|
||||||
|
Click="HandleCheckVersionNowButtonClick" />
|
||||||
|
</StackPanel>
|
||||||
|
</windows:CategoryPanelBase>
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
using System.Windows;
|
||||||
|
using System.Windows.Input;
|
||||||
|
using WorkIndicator.Properties;
|
||||||
|
|
||||||
|
namespace WorkIndicator.SettingsWindow;
|
||||||
|
|
||||||
|
public partial class UpdateSettingsPanel
|
||||||
|
{
|
||||||
|
public UpdateSettingsPanel()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
|
||||||
|
public override string CategoryName => Properties.Resources.optionCategoryUpdate;
|
||||||
|
|
||||||
|
private async void HandleCheckVersionNowButtonClick(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
var cursor = Cursor;
|
||||||
|
|
||||||
|
Cursor = Cursors.Wait;
|
||||||
|
|
||||||
|
await UpdateCheck.DisplayUpdateInformation(true);
|
||||||
|
|
||||||
|
Cursor = cursor;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void OnSaveSettings(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
SaveSettings();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void SaveSettings()
|
||||||
|
{
|
||||||
|
if (!HasLoaded) return;
|
||||||
|
|
||||||
|
Settings.Default.Save();
|
||||||
|
}
|
||||||
|
}
|
||||||
-143
@@ -1,143 +0,0 @@
|
|||||||
using Common.Wpf.Windows;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Windows.Forms;
|
|
||||||
using WorkIndicator.Options;
|
|
||||||
using WorkIndicator.Properties;
|
|
||||||
|
|
||||||
using Application = System.Windows.Application;
|
|
||||||
|
|
||||||
namespace WorkIndicator
|
|
||||||
{
|
|
||||||
internal static class TrayIcon
|
|
||||||
{
|
|
||||||
private static NotifyIcon _trayIcon;
|
|
||||||
|
|
||||||
private static bool _initialized;
|
|
||||||
|
|
||||||
private static CategoryWindow _optionsWindow;
|
|
||||||
|
|
||||||
public static void Initialize()
|
|
||||||
{
|
|
||||||
// Create the tray icon
|
|
||||||
_trayIcon = new NotifyIcon { Icon = Resources.ApplicationIcon, Text = Resources.ApplicationName };
|
|
||||||
|
|
||||||
// Setup the menu
|
|
||||||
var contextMenuStrip = new ContextMenuStrip();
|
|
||||||
contextMenuStrip.Opening += HandleContextMenuStripOpening;
|
|
||||||
|
|
||||||
// Add the menu items
|
|
||||||
var menuItem = new ToolStripMenuItem(Resources.Auto, null, HandleStatusMenuClick) { Tag = Status.Auto };
|
|
||||||
contextMenuStrip.Items.Add(menuItem);
|
|
||||||
|
|
||||||
// --
|
|
||||||
|
|
||||||
menuItem = new ToolStripMenuItem(Resources.Free, null, HandleStatusMenuClick) { Tag = Status.Free };
|
|
||||||
contextMenuStrip.Items.Add(menuItem);
|
|
||||||
|
|
||||||
// --
|
|
||||||
|
|
||||||
menuItem = new ToolStripMenuItem(Resources.Working, null, HandleStatusMenuClick) { Tag = Status.Working };
|
|
||||||
contextMenuStrip.Items.Add(menuItem);
|
|
||||||
|
|
||||||
// --
|
|
||||||
|
|
||||||
menuItem = new ToolStripMenuItem(Resources.OnPhone, null, HandleStatusMenuClick) { Tag = Status.OnPhone };
|
|
||||||
contextMenuStrip.Items.Add(menuItem);
|
|
||||||
|
|
||||||
// --
|
|
||||||
|
|
||||||
menuItem = new ToolStripMenuItem(Resources.Talking, null, HandleStatusMenuClick) { Tag = Status.Talking };
|
|
||||||
contextMenuStrip.Items.Add(menuItem);
|
|
||||||
|
|
||||||
// --
|
|
||||||
|
|
||||||
contextMenuStrip.Items.Add("-");
|
|
||||||
contextMenuStrip.Items.Add(Resources.TrayIconContextMenuSettings, null, HandleContextMenuSettingsClick);
|
|
||||||
|
|
||||||
// --
|
|
||||||
|
|
||||||
contextMenuStrip.Items.Add("-");
|
|
||||||
contextMenuStrip.Items.Add(Resources.TrayIconContextMenuExit, null, HandleContextMenuExitClick);
|
|
||||||
|
|
||||||
// Set the menu into the icon
|
|
||||||
_trayIcon.ContextMenuStrip = contextMenuStrip;
|
|
||||||
|
|
||||||
// Show the icon
|
|
||||||
_trayIcon.Visible = true;
|
|
||||||
|
|
||||||
_initialized = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void ShowUpdateMessage(string text)
|
|
||||||
{
|
|
||||||
_trayIcon.ShowBalloonTip(200, Resources.ApplicationName, text, ToolTipIcon.None);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void HandleContextMenuStripOpening(object sender, System.ComponentModel.CancelEventArgs e)
|
|
||||||
{
|
|
||||||
foreach (ToolStripItem menuItem in _trayIcon.ContextMenuStrip.Items)
|
|
||||||
{
|
|
||||||
if (menuItem.Tag == null)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
var status = (Status)menuItem.Tag;
|
|
||||||
|
|
||||||
((ToolStripMenuItem)menuItem).Checked = (LightController.Status == status);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private static void HandleStatusMenuClick(object sender, System.EventArgs e)
|
|
||||||
{
|
|
||||||
var menuItem = (ToolStripMenuItem)sender;
|
|
||||||
|
|
||||||
var status = (Status)menuItem.Tag;
|
|
||||||
|
|
||||||
LightController.Status = status;
|
|
||||||
}
|
|
||||||
|
|
||||||
private static void HandleContextMenuSettingsClick(object sender, System.EventArgs e)
|
|
||||||
{
|
|
||||||
ShowSettings();
|
|
||||||
}
|
|
||||||
|
|
||||||
private static void HandleContextMenuExitClick(object sender, System.EventArgs e)
|
|
||||||
{
|
|
||||||
// Shutdown the application
|
|
||||||
Application.Current.Shutdown();
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void Dispose()
|
|
||||||
{
|
|
||||||
if (!_initialized)
|
|
||||||
return;
|
|
||||||
|
|
||||||
// Get rid of the icon
|
|
||||||
_trayIcon.Visible = false;
|
|
||||||
_trayIcon.Dispose();
|
|
||||||
|
|
||||||
_initialized = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
private static void ShowSettings()
|
|
||||||
{
|
|
||||||
var panels = new List<CategoryPanel>
|
|
||||||
{
|
|
||||||
new GeneralOptionsPanel(),
|
|
||||||
new AboutOptionsPanel()
|
|
||||||
};
|
|
||||||
|
|
||||||
if (_optionsWindow == null)
|
|
||||||
{
|
|
||||||
_optionsWindow = new CategoryWindow(null, panels, Resources.ResourceManager, "OptionsWindow");
|
|
||||||
_optionsWindow.Closed += (o, args) => { _optionsWindow = null; };
|
|
||||||
}
|
|
||||||
|
|
||||||
var dialogResult = _optionsWindow.ShowDialog();
|
|
||||||
|
|
||||||
if (dialogResult.HasValue && dialogResult.Value)
|
|
||||||
{
|
|
||||||
Settings.Default.Save();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
+39
-60
@@ -1,71 +1,50 @@
|
|||||||
using Squirrel;
|
using NuGet.Versioning;
|
||||||
using System;
|
using Serilog;
|
||||||
using System.Linq;
|
|
||||||
using System.Net;
|
|
||||||
using System.Reflection;
|
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows;
|
||||||
|
using Velopack;
|
||||||
|
using Velopack.Sources;
|
||||||
|
|
||||||
namespace WorkIndicator
|
namespace WorkIndicator;
|
||||||
|
|
||||||
|
internal static class UpdateCheck
|
||||||
{
|
{
|
||||||
public static class UpdateCheck
|
private static UpdateManager _updateManager;
|
||||||
|
|
||||||
|
public static UpdateManager UpdateManager => _updateManager ??= new UpdateManager(new GiteaSource("https://gitea.kaczorzoo.net/ckaczor/WorkIndicator", null, false));
|
||||||
|
|
||||||
|
public static string LocalVersion => (UpdateManager.CurrentVersion ?? new SemanticVersion(0, 0, 0)).ToString();
|
||||||
|
|
||||||
|
public static bool IsInstalled => UpdateManager.IsInstalled;
|
||||||
|
|
||||||
|
public static async Task DisplayUpdateInformation(bool showIfCurrent)
|
||||||
{
|
{
|
||||||
public enum UpdateStatus
|
var newVersion = IsInstalled ? await UpdateManager.CheckForUpdatesAsync() : null;
|
||||||
|
|
||||||
|
if (newVersion != null)
|
||||||
{
|
{
|
||||||
Checking,
|
var updateCheckTitle = string.Format(Properties.Resources.UpdateCheckTitle, Properties.Resources.ApplicationName);
|
||||||
None,
|
|
||||||
Downloading,
|
var updateCheckMessage = string.Format(Properties.Resources.UpdateCheckNewVersion, newVersion.TargetFullRelease.Version);
|
||||||
Installing,
|
|
||||||
Restarting
|
if (MessageBox.Show(updateCheckMessage, updateCheckTitle, MessageBoxButton.YesNo, MessageBoxImage.Question) != MessageBoxResult.Yes)
|
||||||
|
return;
|
||||||
|
|
||||||
|
Log.Logger.Information("Downloading update");
|
||||||
|
|
||||||
|
await UpdateManager.DownloadUpdatesAsync(newVersion);
|
||||||
|
|
||||||
|
Log.Logger.Information("Installing update");
|
||||||
|
|
||||||
|
UpdateManager.ApplyUpdatesAndRestart(newVersion);
|
||||||
}
|
}
|
||||||
|
else if (showIfCurrent)
|
||||||
public delegate void UpdateStatusDelegate(UpdateStatus updateStatus, string message);
|
|
||||||
|
|
||||||
public static Version LocalVersion => Assembly.GetEntryAssembly().GetName().Version;
|
|
||||||
|
|
||||||
public static async Task<bool> CheckUpdate(UpdateStatusDelegate onUpdateStatus)
|
|
||||||
{
|
{
|
||||||
try
|
var updateCheckTitle = string.Format(Properties.Resources.UpdateCheckTitle, Properties.Resources.ApplicationName);
|
||||||
{
|
|
||||||
onUpdateStatus.Invoke(UpdateStatus.Checking, Properties.Resources.CheckingForUpdate);
|
|
||||||
|
|
||||||
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
|
var updateCheckMessage = string.Format(Properties.Resources.UpdateCheckCurrent, Properties.Resources.ApplicationName);
|
||||||
|
|
||||||
using (var updateManager = await UpdateManager.GitHubUpdateManager(App.UpdateUrl))
|
MessageBox.Show(updateCheckMessage, updateCheckTitle, MessageBoxButton.OK, MessageBoxImage.Information);
|
||||||
{
|
|
||||||
var updates = await updateManager.CheckForUpdate();
|
|
||||||
|
|
||||||
var lastVersion = updates?.ReleasesToApply?.OrderBy(releaseEntry => releaseEntry.Version).LastOrDefault();
|
|
||||||
|
|
||||||
if (lastVersion == null)
|
|
||||||
{
|
|
||||||
onUpdateStatus.Invoke(UpdateStatus.None, Properties.Resources.NoUpdate);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
onUpdateStatus.Invoke(UpdateStatus.Downloading, Properties.Resources.DownloadingUpdate);
|
|
||||||
|
|
||||||
Common.Settings.Extensions.BackupSettings();
|
|
||||||
|
|
||||||
await updateManager.DownloadReleases(new[] { lastVersion });
|
|
||||||
|
|
||||||
onUpdateStatus.Invoke(UpdateStatus.Installing, Properties.Resources.InstallingUpdate);
|
|
||||||
|
|
||||||
await updateManager.ApplyReleases(updates);
|
|
||||||
await updateManager.UpdateApp();
|
|
||||||
}
|
|
||||||
|
|
||||||
onUpdateStatus.Invoke(UpdateStatus.Restarting, Properties.Resources.RestartingAfterUpdate);
|
|
||||||
|
|
||||||
UpdateManager.RestartApp();
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
catch (Exception exception)
|
|
||||||
{
|
|
||||||
Console.WriteLine(exception);
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,50 @@
|
|||||||
|
using System;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
namespace WorkIndicator;
|
||||||
|
|
||||||
|
internal class UsbService : NativeWindow, IDisposable
|
||||||
|
{
|
||||||
|
public event Action DevicesChanged;
|
||||||
|
|
||||||
|
private const int WmDeviceChange = 0x0219;
|
||||||
|
private const int DbtDeviceArrival = 0x8000;
|
||||||
|
private const int DbtDeviceRemoveComplete = 0x8004;
|
||||||
|
private const int DbtDevNodesChanged = 0x0007;
|
||||||
|
|
||||||
|
private bool _isDisposed;
|
||||||
|
|
||||||
|
internal UsbService()
|
||||||
|
{
|
||||||
|
base.CreateHandle(new CreateParams());
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void WndProc(ref Message msg)
|
||||||
|
{
|
||||||
|
base.WndProc(ref msg);
|
||||||
|
|
||||||
|
if (msg.Msg != WmDeviceChange)
|
||||||
|
return;
|
||||||
|
|
||||||
|
switch (msg.WParam.ToInt32())
|
||||||
|
{
|
||||||
|
case DbtDevNodesChanged:
|
||||||
|
case DbtDeviceArrival:
|
||||||
|
case DbtDeviceRemoveComplete:
|
||||||
|
DevicesChanged?.Invoke();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Dispose()
|
||||||
|
{
|
||||||
|
if (_isDisposed)
|
||||||
|
return;
|
||||||
|
|
||||||
|
base.DestroyHandle();
|
||||||
|
|
||||||
|
_isDisposed = true;
|
||||||
|
|
||||||
|
GC.SuppressFinalize(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
+60
-258
@@ -1,259 +1,61 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<PropertyGroup>
|
||||||
<PropertyGroup>
|
<TargetFramework>net10.0-windows7.0</TargetFramework>
|
||||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
<OutputType>WinExe</OutputType>
|
||||||
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
|
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
|
||||||
<ProductVersion>8.0.30703</ProductVersion>
|
<UseWPF>true</UseWPF>
|
||||||
<SchemaVersion>2.0</SchemaVersion>
|
<ImportWindowsDesktopTargets>true</ImportWindowsDesktopTargets>
|
||||||
<ProjectGuid>{A888FD0E-4A0E-4CAA-BC4D-C17D4AFA5715}</ProjectGuid>
|
<StartupObject>WorkIndicator.Program</StartupObject>
|
||||||
<OutputType>WinExe</OutputType>
|
<ApplicationIcon>Resources\Application.ico</ApplicationIcon>
|
||||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
<UseWindowsForms>true</UseWindowsForms>
|
||||||
<RootNamespace>WorkIndicator</RootNamespace>
|
<Platforms>x86</Platforms>
|
||||||
<AssemblyName>WorkIndicator</AssemblyName>
|
<EnableWindowsTargeting>true</EnableWindowsTargeting>
|
||||||
<TargetFrameworkVersion>v4.5.1</TargetFrameworkVersion>
|
</PropertyGroup>
|
||||||
<TargetFrameworkProfile>
|
<ItemGroup>
|
||||||
</TargetFrameworkProfile>
|
<AppDesigner Include="Properties\" />
|
||||||
<FileAlignment>512</FileAlignment>
|
</ItemGroup>
|
||||||
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
<ItemGroup>
|
||||||
<WarningLevel>4</WarningLevel>
|
<Resource Include="Resources\Application.ico" />
|
||||||
<SccProjectName>SAK</SccProjectName>
|
</ItemGroup>
|
||||||
<SccLocalPath>SAK</SccLocalPath>
|
<ItemGroup>
|
||||||
<SccAuxPath>SAK</SccAuxPath>
|
<PackageReference Include="ChrisKaczor.Wpf.Application.StartWithWindows" Version="1.0.5" />
|
||||||
<SccProvider>SAK</SccProvider>
|
<PackageReference Include="ChrisKaczor.Wpf.Controls.Link" Version="1.0.4" />
|
||||||
<PublishUrl>publish\</PublishUrl>
|
<PackageReference Include="ChrisKaczor.Wpf.Validation" Version="1.0.4" />
|
||||||
<Install>true</Install>
|
<PackageReference Include="ChrisKaczor.Wpf.Windows.CategoryWindow" Version="1.0.2" />
|
||||||
<InstallFrom>Disk</InstallFrom>
|
<PackageReference Include="H.NotifyIcon.Wpf" Version="2.4.1" />
|
||||||
<UpdateEnabled>false</UpdateEnabled>
|
<PackageReference Include="NAudio.Wasapi" Version="2.3.0" />
|
||||||
<UpdateMode>Foreground</UpdateMode>
|
<PackageReference Include="Serilog" Version="4.0.2" />
|
||||||
<UpdateInterval>7</UpdateInterval>
|
<PackageReference Include="Serilog.Extensions.Logging" Version="8.0.0" />
|
||||||
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
|
<PackageReference Include="Serilog.Sinks.Console" Version="6.0.0" />
|
||||||
<UpdatePeriodically>false</UpdatePeriodically>
|
<PackageReference Include="Serilog.Sinks.Debug" Version="3.0.0" />
|
||||||
<UpdateRequired>false</UpdateRequired>
|
<PackageReference Include="Serilog.Sinks.File" Version="6.0.0" />
|
||||||
<MapFileExtensions>true</MapFileExtensions>
|
<PackageReference Include="Velopack" Version="0.0.626" />
|
||||||
<ApplicationRevision>0</ApplicationRevision>
|
</ItemGroup>
|
||||||
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
|
<ItemGroup>
|
||||||
<IsWebBootstrapper>false</IsWebBootstrapper>
|
<Compile Update="Properties\Resources.Designer.cs">
|
||||||
<UseApplicationTrust>false</UseApplicationTrust>
|
<DesignTime>True</DesignTime>
|
||||||
<BootstrapperEnabled>true</BootstrapperEnabled>
|
<AutoGen>True</AutoGen>
|
||||||
</PropertyGroup>
|
<DependentUpon>Resources.resx</DependentUpon>
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
|
</Compile>
|
||||||
<PlatformTarget>x86</PlatformTarget>
|
<Compile Update="Properties\Settings.Designer.cs">
|
||||||
<DebugSymbols>true</DebugSymbols>
|
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||||
<DebugType>full</DebugType>
|
<AutoGen>True</AutoGen>
|
||||||
<Optimize>false</Optimize>
|
<DependentUpon>Settings.settings</DependentUpon>
|
||||||
<OutputPath>bin\Debug\</OutputPath>
|
</Compile>
|
||||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
</ItemGroup>
|
||||||
<ErrorReport>prompt</ErrorReport>
|
<ItemGroup>
|
||||||
<WarningLevel>4</WarningLevel>
|
<None Update="Properties\Settings.settings">
|
||||||
<Prefer32Bit>false</Prefer32Bit>
|
<Generator>SettingsSingleFileGenerator</Generator>
|
||||||
</PropertyGroup>
|
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
|
</None>
|
||||||
<PlatformTarget>x86</PlatformTarget>
|
</ItemGroup>
|
||||||
<DebugType>pdbonly</DebugType>
|
<ItemGroup>
|
||||||
<Optimize>true</Optimize>
|
<None Include=".gitea\workflows\main.yml" />
|
||||||
<OutputPath>bin\Release\</OutputPath>
|
</ItemGroup>
|
||||||
<DefineConstants>TRACE</DefineConstants>
|
<ItemGroup>
|
||||||
<ErrorReport>prompt</ErrorReport>
|
<EmbeddedResource Update="Properties\Resources.resx">
|
||||||
<WarningLevel>4</WarningLevel>
|
<Generator>PublicResXFileCodeGenerator</Generator>
|
||||||
<Prefer32Bit>false</Prefer32Bit>
|
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||||
</PropertyGroup>
|
</EmbeddedResource>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
|
</ItemGroup>
|
||||||
<DebugSymbols>true</DebugSymbols>
|
|
||||||
<OutputPath>bin\Debug\</OutputPath>
|
|
||||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
|
||||||
<DebugType>full</DebugType>
|
|
||||||
<PlatformTarget>x86</PlatformTarget>
|
|
||||||
<CodeAnalysisLogFile>bin\Debug\WorkIndicator.exe.CodeAnalysisLog.xml</CodeAnalysisLogFile>
|
|
||||||
<CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
|
|
||||||
<CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
|
|
||||||
<ErrorReport>prompt</ErrorReport>
|
|
||||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
|
||||||
<CodeAnalysisRuleSetDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets</CodeAnalysisRuleSetDirectories>
|
|
||||||
<CodeAnalysisIgnoreBuiltInRuleSets>true</CodeAnalysisIgnoreBuiltInRuleSets>
|
|
||||||
<CodeAnalysisRuleDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
|
|
||||||
<CodeAnalysisIgnoreBuiltInRules>true</CodeAnalysisIgnoreBuiltInRules>
|
|
||||||
<Prefer32Bit>false</Prefer32Bit>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|AnyCPU'">
|
|
||||||
<OutputPath>bin\Release\</OutputPath>
|
|
||||||
<DefineConstants>TRACE</DefineConstants>
|
|
||||||
<Optimize>true</Optimize>
|
|
||||||
<DebugType>pdbonly</DebugType>
|
|
||||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
|
||||||
<CodeAnalysisLogFile>bin\Release\WorkIndicator.exe.CodeAnalysisLog.xml</CodeAnalysisLogFile>
|
|
||||||
<CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
|
|
||||||
<CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
|
|
||||||
<ErrorReport>prompt</ErrorReport>
|
|
||||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
|
||||||
<CodeAnalysisRuleSetDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets</CodeAnalysisRuleSetDirectories>
|
|
||||||
<CodeAnalysisRuleDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
|
|
||||||
<CodeAnalysisIgnoreBuiltInRules>true</CodeAnalysisIgnoreBuiltInRules>
|
|
||||||
<CodeAnalysisFailOnMissingRules>false</CodeAnalysisFailOnMissingRules>
|
|
||||||
<Prefer32Bit>false</Prefer32Bit>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
|
|
||||||
<DebugSymbols>true</DebugSymbols>
|
|
||||||
<OutputPath>bin\x64\Debug\</OutputPath>
|
|
||||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
|
||||||
<DebugType>full</DebugType>
|
|
||||||
<PlatformTarget>x64</PlatformTarget>
|
|
||||||
<CodeAnalysisLogFile>bin\Debug\WorkIndicator.exe.CodeAnalysisLog.xml</CodeAnalysisLogFile>
|
|
||||||
<CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
|
|
||||||
<CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
|
|
||||||
<ErrorReport>prompt</ErrorReport>
|
|
||||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
|
||||||
<CodeAnalysisRuleSetDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets</CodeAnalysisRuleSetDirectories>
|
|
||||||
<CodeAnalysisRuleDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
|
|
||||||
<Prefer32Bit>false</Prefer32Bit>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
|
|
||||||
<OutputPath>bin\x64\Release\</OutputPath>
|
|
||||||
<DefineConstants>TRACE</DefineConstants>
|
|
||||||
<Optimize>true</Optimize>
|
|
||||||
<DebugType>pdbonly</DebugType>
|
|
||||||
<PlatformTarget>x64</PlatformTarget>
|
|
||||||
<CodeAnalysisLogFile>bin\Release\WorkIndicator.exe.CodeAnalysisLog.xml</CodeAnalysisLogFile>
|
|
||||||
<CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
|
|
||||||
<CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
|
|
||||||
<ErrorReport>prompt</ErrorReport>
|
|
||||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
|
||||||
<CodeAnalysisRuleSetDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets</CodeAnalysisRuleSetDirectories>
|
|
||||||
<CodeAnalysisIgnoreBuiltInRuleSets>false</CodeAnalysisIgnoreBuiltInRuleSets>
|
|
||||||
<CodeAnalysisRuleDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
|
|
||||||
<Prefer32Bit>false</Prefer32Bit>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup>
|
|
||||||
<ApplicationIcon>Resources\ApplicationIcon.ico</ApplicationIcon>
|
|
||||||
</PropertyGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<Reference Include="System" />
|
|
||||||
<Reference Include="System.Data" />
|
|
||||||
<Reference Include="System.Drawing" />
|
|
||||||
<Reference Include="System.Windows.Forms" />
|
|
||||||
<Reference Include="System.Xml" />
|
|
||||||
<Reference Include="Microsoft.CSharp" />
|
|
||||||
<Reference Include="System.Core" />
|
|
||||||
<Reference Include="System.Xml.Linq" />
|
|
||||||
<Reference Include="System.Data.DataSetExtensions" />
|
|
||||||
<Reference Include="System.Xaml">
|
|
||||||
<RequiredTargetFramework>4.0</RequiredTargetFramework>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="WindowsBase" />
|
|
||||||
<Reference Include="PresentationCore" />
|
|
||||||
<Reference Include="PresentationFramework" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<Compile Include="UpdateCheck.cs" />
|
|
||||||
<Page Include="App.xaml">
|
|
||||||
<Generator>MSBuild:Compile</Generator>
|
|
||||||
<SubType>Designer</SubType>
|
|
||||||
</Page>
|
|
||||||
<Compile Include="AudioWatcher.cs" />
|
|
||||||
<Compile Include="LightController.cs" />
|
|
||||||
<Compile Include="Delcom\StoplightIndicator.cs" />
|
|
||||||
<Compile Include="App.xaml.cs">
|
|
||||||
<DependentUpon>App.xaml</DependentUpon>
|
|
||||||
<SubType>Code</SubType>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="Delcom\Delcom.cs" />
|
|
||||||
<Compile Include="Delcom\DeviceManagement.cs" />
|
|
||||||
<Compile Include="Delcom\DeviceManagementDeclarations.cs" />
|
|
||||||
<Compile Include="Delcom\FileIODeclarations.cs" />
|
|
||||||
<Compile Include="Delcom\HID.cs" />
|
|
||||||
<Compile Include="Delcom\HIDDeclarations.cs" />
|
|
||||||
<Compile Include="Options\AboutOptionsPanel.xaml.cs">
|
|
||||||
<DependentUpon>AboutOptionsPanel.xaml</DependentUpon>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="Options\GeneralOptionsPanel.xaml.cs">
|
|
||||||
<DependentUpon>GeneralOptionsPanel.xaml</DependentUpon>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="TrayIcon.cs" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<Compile Include="Properties\AssemblyInfo.cs">
|
|
||||||
<SubType>Code</SubType>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="Properties\Resources.Designer.cs">
|
|
||||||
<AutoGen>True</AutoGen>
|
|
||||||
<DesignTime>True</DesignTime>
|
|
||||||
<DependentUpon>Resources.resx</DependentUpon>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="Properties\Settings.Designer.cs">
|
|
||||||
<AutoGen>True</AutoGen>
|
|
||||||
<DependentUpon>Settings.settings</DependentUpon>
|
|
||||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
|
||||||
</Compile>
|
|
||||||
<EmbeddedResource Include="Properties\Resources.resx">
|
|
||||||
<Generator>PublicResXFileCodeGenerator</Generator>
|
|
||||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
|
||||||
<SubType>Designer</SubType>
|
|
||||||
</EmbeddedResource>
|
|
||||||
<None Include="app.config" />
|
|
||||||
<None Include="appveyor.yml" />
|
|
||||||
<None Include="LICENSE.md" />
|
|
||||||
<None Include="NuGet.config" />
|
|
||||||
<None Include="Properties\Settings.settings">
|
|
||||||
<Generator>SettingsSingleFileGenerator</Generator>
|
|
||||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
|
||||||
</None>
|
|
||||||
<AppDesigner Include="Properties\" />
|
|
||||||
<None Include="README.md" />
|
|
||||||
<None Include="WorkIndicator.nuspec" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<Resource Include="Resources\ApplicationIcon.ico" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<Content Include=".gitignore" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<ProjectReference Include="Common.Wpf\Common.Native\Common.Native.csproj">
|
|
||||||
<Project>{ed1c07a1-54f5-4796-8b06-2a0bb1960d84}</Project>
|
|
||||||
<Name>Common.Native</Name>
|
|
||||||
</ProjectReference>
|
|
||||||
<ProjectReference Include="Common.Wpf\Common.Wpf.csproj">
|
|
||||||
<Project>{0074c983-550e-4094-9e8c-f566fb669297}</Project>
|
|
||||||
<Name>Common.Wpf</Name>
|
|
||||||
</ProjectReference>
|
|
||||||
<ProjectReference Include="Common\Common.csproj">
|
|
||||||
<Project>{17864d82-457d-4a0a-bc10-1d07f2b3a5d6}</Project>
|
|
||||||
<Name>Common</Name>
|
|
||||||
</ProjectReference>
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<Page Include="Options\AboutOptionsPanel.xaml">
|
|
||||||
<Generator>MSBuild:Compile</Generator>
|
|
||||||
<SubType>Designer</SubType>
|
|
||||||
</Page>
|
|
||||||
<Page Include="Options\GeneralOptionsPanel.xaml">
|
|
||||||
<Generator>MSBuild:Compile</Generator>
|
|
||||||
<SubType>Designer</SubType>
|
|
||||||
</Page>
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<PackageReference Include="CSCore">
|
|
||||||
<Version>1.2.1.2</Version>
|
|
||||||
</PackageReference>
|
|
||||||
<PackageReference Include="Newtonsoft.Json">
|
|
||||||
<Version>13.0.1</Version>
|
|
||||||
</PackageReference>
|
|
||||||
<PackageReference Include="squirrel.windows">
|
|
||||||
<Version>2.0.1</Version>
|
|
||||||
</PackageReference>
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
|
|
||||||
<Visible>False</Visible>
|
|
||||||
<ProductName>.NET Framework 3.5 SP1</ProductName>
|
|
||||||
<Install>false</Install>
|
|
||||||
</BootstrapperPackage>
|
|
||||||
</ItemGroup>
|
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
|
||||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
|
||||||
Other similar extension points exist, see Microsoft.Common.targets.
|
|
||||||
<Target Name="BeforeBuild">
|
|
||||||
</Target>
|
|
||||||
<Target Name="AfterBuild">
|
|
||||||
</Target>
|
|
||||||
-->
|
|
||||||
</Project>
|
</Project>
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
|
|
||||||
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=Delcom/@EntryIndexedValue">False</s:Boolean></wpf:ResourceDictionary>
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
<?xml version="1.0"?>
|
|
||||||
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
|
|
||||||
<metadata>
|
|
||||||
<id>WorkIndicator</id>
|
|
||||||
<title>Work Indicator</title>
|
|
||||||
<version>$version$</version>
|
|
||||||
<authors>Chris Kaczor</authors>
|
|
||||||
<description>Controls a Delcom Green/Yellow/Red Indicator to show work status (free, working, on phone, talking) either manually or automatically.</description>
|
|
||||||
<projectUrl>https://github.com/ckaczor/WorkIndicator</projectUrl>
|
|
||||||
<license type="expression">MIT</license>
|
|
||||||
<tags></tags>
|
|
||||||
<dependencies>
|
|
||||||
<group targetFramework=".NETFramework4.5" />
|
|
||||||
</dependencies>
|
|
||||||
</metadata>
|
|
||||||
<files>
|
|
||||||
<file src="bin\$configuration$\**\*" target="lib\net45" exclude="*.pdb;*.nupkg;*.vshost.*" />
|
|
||||||
</files>
|
|
||||||
</package>
|
|
||||||
+10
-60
@@ -1,79 +1,29 @@
|
|||||||
|
|
||||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
# Visual Studio 15
|
# Visual Studio Version 18
|
||||||
VisualStudioVersion = 15.0.27130.2027
|
VisualStudioVersion = 18.9.12023.133
|
||||||
MinimumVisualStudioVersion = 10.0.40219.1
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WorkIndicator", "WorkIndicator.csproj", "{A888FD0E-4A0E-4CAA-BC4D-C17D4AFA5715}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WorkIndicator", "WorkIndicator.csproj", "{B4A9FB98-C873-487F-AC4B-9B4356491DE3}"
|
||||||
EndProject
|
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Common", "Common\Common.csproj", "{17864D82-457D-4A0A-BC10-1D07F2B3A5D6}"
|
|
||||||
EndProject
|
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Common.Wpf", "Common.Wpf\Common.Wpf.csproj", "{0074C983-550E-4094-9E8C-F566FB669297}"
|
|
||||||
EndProject
|
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Common.Native", "Common.Wpf\Common.Native\Common.Native.csproj", "{ED1C07A1-54F5-4796-8B06-2A0BB1960D84}"
|
|
||||||
EndProject
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
Debug|Any CPU = Debug|Any CPU
|
Debug|Any CPU = Debug|Any CPU
|
||||||
Debug|x64 = Debug|x64
|
|
||||||
Debug|x86 = Debug|x86
|
Debug|x86 = Debug|x86
|
||||||
Release|Any CPU = Release|Any CPU
|
Release|Any CPU = Release|Any CPU
|
||||||
Release|x64 = Release|x64
|
|
||||||
Release|x86 = Release|x86
|
Release|x86 = Release|x86
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
{A888FD0E-4A0E-4CAA-BC4D-C17D4AFA5715}.Debug|Any CPU.ActiveCfg = Debug|x86
|
{B4A9FB98-C873-487F-AC4B-9B4356491DE3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{A888FD0E-4A0E-4CAA-BC4D-C17D4AFA5715}.Debug|Any CPU.Build.0 = Debug|x86
|
{B4A9FB98-C873-487F-AC4B-9B4356491DE3}.Debug|x86.ActiveCfg = Debug|x86
|
||||||
{A888FD0E-4A0E-4CAA-BC4D-C17D4AFA5715}.Debug|x64.ActiveCfg = Debug|x64
|
{B4A9FB98-C873-487F-AC4B-9B4356491DE3}.Debug|x86.Build.0 = Debug|x86
|
||||||
{A888FD0E-4A0E-4CAA-BC4D-C17D4AFA5715}.Debug|x64.Build.0 = Debug|x64
|
{B4A9FB98-C873-487F-AC4B-9B4356491DE3}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{A888FD0E-4A0E-4CAA-BC4D-C17D4AFA5715}.Debug|x86.ActiveCfg = Debug|x86
|
{B4A9FB98-C873-487F-AC4B-9B4356491DE3}.Release|x86.ActiveCfg = Release|x86
|
||||||
{A888FD0E-4A0E-4CAA-BC4D-C17D4AFA5715}.Debug|x86.Build.0 = Debug|x86
|
{B4A9FB98-C873-487F-AC4B-9B4356491DE3}.Release|x86.Build.0 = Release|x86
|
||||||
{A888FD0E-4A0E-4CAA-BC4D-C17D4AFA5715}.Release|Any CPU.ActiveCfg = Release|x86
|
|
||||||
{A888FD0E-4A0E-4CAA-BC4D-C17D4AFA5715}.Release|Any CPU.Build.0 = Release|x86
|
|
||||||
{A888FD0E-4A0E-4CAA-BC4D-C17D4AFA5715}.Release|x64.ActiveCfg = Release|x64
|
|
||||||
{A888FD0E-4A0E-4CAA-BC4D-C17D4AFA5715}.Release|x64.Build.0 = Release|x64
|
|
||||||
{A888FD0E-4A0E-4CAA-BC4D-C17D4AFA5715}.Release|x86.ActiveCfg = Release|x86
|
|
||||||
{A888FD0E-4A0E-4CAA-BC4D-C17D4AFA5715}.Release|x86.Build.0 = Release|x86
|
|
||||||
{17864D82-457D-4A0A-BC10-1D07F2B3A5D6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{17864D82-457D-4A0A-BC10-1D07F2B3A5D6}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{17864D82-457D-4A0A-BC10-1D07F2B3A5D6}.Debug|x64.ActiveCfg = Debug|x64
|
|
||||||
{17864D82-457D-4A0A-BC10-1D07F2B3A5D6}.Debug|x64.Build.0 = Debug|x64
|
|
||||||
{17864D82-457D-4A0A-BC10-1D07F2B3A5D6}.Debug|x86.ActiveCfg = Debug|x86
|
|
||||||
{17864D82-457D-4A0A-BC10-1D07F2B3A5D6}.Debug|x86.Build.0 = Debug|x86
|
|
||||||
{17864D82-457D-4A0A-BC10-1D07F2B3A5D6}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{17864D82-457D-4A0A-BC10-1D07F2B3A5D6}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
{17864D82-457D-4A0A-BC10-1D07F2B3A5D6}.Release|x64.ActiveCfg = Release|x64
|
|
||||||
{17864D82-457D-4A0A-BC10-1D07F2B3A5D6}.Release|x64.Build.0 = Release|x64
|
|
||||||
{17864D82-457D-4A0A-BC10-1D07F2B3A5D6}.Release|x86.ActiveCfg = Release|x86
|
|
||||||
{17864D82-457D-4A0A-BC10-1D07F2B3A5D6}.Release|x86.Build.0 = Release|x86
|
|
||||||
{0074C983-550E-4094-9E8C-F566FB669297}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{0074C983-550E-4094-9E8C-F566FB669297}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{0074C983-550E-4094-9E8C-F566FB669297}.Debug|x64.ActiveCfg = Debug|x64
|
|
||||||
{0074C983-550E-4094-9E8C-F566FB669297}.Debug|x64.Build.0 = Debug|x64
|
|
||||||
{0074C983-550E-4094-9E8C-F566FB669297}.Debug|x86.ActiveCfg = Debug|x86
|
|
||||||
{0074C983-550E-4094-9E8C-F566FB669297}.Debug|x86.Build.0 = Debug|x86
|
|
||||||
{0074C983-550E-4094-9E8C-F566FB669297}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{0074C983-550E-4094-9E8C-F566FB669297}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
{0074C983-550E-4094-9E8C-F566FB669297}.Release|x64.ActiveCfg = Release|x64
|
|
||||||
{0074C983-550E-4094-9E8C-F566FB669297}.Release|x64.Build.0 = Release|x64
|
|
||||||
{0074C983-550E-4094-9E8C-F566FB669297}.Release|x86.ActiveCfg = Release|x86
|
|
||||||
{0074C983-550E-4094-9E8C-F566FB669297}.Release|x86.Build.0 = Release|x86
|
|
||||||
{ED1C07A1-54F5-4796-8B06-2A0BB1960D84}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{ED1C07A1-54F5-4796-8B06-2A0BB1960D84}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{ED1C07A1-54F5-4796-8B06-2A0BB1960D84}.Debug|x64.ActiveCfg = Debug|x64
|
|
||||||
{ED1C07A1-54F5-4796-8B06-2A0BB1960D84}.Debug|x64.Build.0 = Debug|x64
|
|
||||||
{ED1C07A1-54F5-4796-8B06-2A0BB1960D84}.Debug|x86.ActiveCfg = Debug|x86
|
|
||||||
{ED1C07A1-54F5-4796-8B06-2A0BB1960D84}.Debug|x86.Build.0 = Debug|x86
|
|
||||||
{ED1C07A1-54F5-4796-8B06-2A0BB1960D84}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{ED1C07A1-54F5-4796-8B06-2A0BB1960D84}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
{ED1C07A1-54F5-4796-8B06-2A0BB1960D84}.Release|x64.ActiveCfg = Release|x64
|
|
||||||
{ED1C07A1-54F5-4796-8B06-2A0BB1960D84}.Release|x64.Build.0 = Release|x64
|
|
||||||
{ED1C07A1-54F5-4796-8B06-2A0BB1960D84}.Release|x86.ActiveCfg = Release|x86
|
|
||||||
{ED1C07A1-54F5-4796-8B06-2A0BB1960D84}.Release|x86.Build.0 = Release|x86
|
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||||
SolutionGuid = {43D76B6A-4DD4-40CF-BE03-763A12DCFA72}
|
SolutionGuid = {0F74AA40-5495-496E-8131-A5FEFFFA9097}
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
EndGlobal
|
EndGlobal
|
||||||
|
|||||||
@@ -1,2 +1,3 @@
|
|||||||
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
|
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
|
||||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Delcom/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>
|
<s:Boolean x:Key="/Default/UserDictionary/Words/=Delcom/@EntryIndexedValue">True</s:Boolean>
|
||||||
|
<s:Boolean x:Key="/Default/UserDictionary/Words/=Kaczor/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>
|
||||||
+16
-20
@@ -1,31 +1,27 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
<configuration>
|
<configuration>
|
||||||
<configSections>
|
<configSections>
|
||||||
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
|
||||||
<section name="WorkIndicator.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false"/>
|
<section name="WorkIndicator.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
|
||||||
</sectionGroup>
|
|
||||||
<sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
|
||||||
<section name="WorkIndicator.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false"/>
|
|
||||||
</sectionGroup>
|
</sectionGroup>
|
||||||
</configSections>
|
</configSections>
|
||||||
|
<startup>
|
||||||
|
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
|
||||||
|
</startup>
|
||||||
<userSettings>
|
<userSettings>
|
||||||
<WorkIndicator.Properties.Settings>
|
<WorkIndicator.Properties.Settings>
|
||||||
<setting name="StartWithWindows" serializeAs="String">
|
<setting name="WindowSettings" serializeAs="String">
|
||||||
|
<value />
|
||||||
|
</setting>
|
||||||
|
<setting name="AutoStart" serializeAs="String">
|
||||||
<value>True</value>
|
<value>True</value>
|
||||||
</setting>
|
</setting>
|
||||||
<setting name="WindowPatterns" serializeAs="String">
|
<setting name="CheckVersionAtStartup" serializeAs="String">
|
||||||
<value />
|
<value>True</value>
|
||||||
|
</setting>
|
||||||
|
<setting name="DefaultStatus" serializeAs="String">
|
||||||
|
<value>Working</value>
|
||||||
</setting>
|
</setting>
|
||||||
</WorkIndicator.Properties.Settings>
|
</WorkIndicator.Properties.Settings>
|
||||||
</userSettings>
|
</userSettings>
|
||||||
<applicationSettings>
|
</configuration>
|
||||||
<WorkIndicator.Properties.Settings>
|
|
||||||
<setting name="RetryInterval" serializeAs="String">
|
|
||||||
<value>00:00:10</value>
|
|
||||||
</setting>
|
|
||||||
<setting name="UpdateInterval" serializeAs="String">
|
|
||||||
<value>00:00:00.5000000</value>
|
|
||||||
</setting>
|
|
||||||
</WorkIndicator.Properties.Settings>
|
|
||||||
</applicationSettings>
|
|
||||||
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.1"/></startup></configuration>
|
|
||||||
@@ -1,31 +0,0 @@
|
|||||||
version: 1.0.{build}
|
|
||||||
pull_requests:
|
|
||||||
do_not_increment_build_number: true
|
|
||||||
skip_tags: true
|
|
||||||
image: Visual Studio 2017
|
|
||||||
configuration: Release
|
|
||||||
assembly_info:
|
|
||||||
patch: true
|
|
||||||
file: 'Properties\AssemblyInfo.cs'
|
|
||||||
assembly_version: '{version}'
|
|
||||||
assembly_file_version: '{version}'
|
|
||||||
build:
|
|
||||||
project: WorkIndicator.sln
|
|
||||||
verbosity: minimal
|
|
||||||
after_build:
|
|
||||||
- ps: >-
|
|
||||||
nuget pack WorkIndicator.nuspec -Version $env:APPVEYOR_BUILD_VERSION -Properties Configuration=Release -OutputDirectory bin\Release\
|
|
||||||
|
|
||||||
$squirrel = ".\packages\squirrel.windows\*\tools\Squirrel.exe"
|
|
||||||
|
|
||||||
.$squirrel -releasify ".\bin\$env:CONFIGURATION\WorkIndicator.$env:APPVEYOR_BUILD_VERSION.nupkg" | Write-Output
|
|
||||||
artifacts:
|
|
||||||
- path: Releases\*
|
|
||||||
name: Releases
|
|
||||||
deploy:
|
|
||||||
- provider: Environment
|
|
||||||
name: GitHub
|
|
||||||
install:
|
|
||||||
- cmd: git submodule update --init --recursive
|
|
||||||
before_build:
|
|
||||||
- cmd: nuget restore
|
|
||||||
Reference in New Issue
Block a user