Skip to content

Commit 09b1186

Browse files
committed
Merge branch 'dev-2.3' into 18-gauge_scaling
2 parents 15cde37 + a93c6f5 commit 09b1186

File tree

83 files changed

+21386
-307135
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

83 files changed

+21386
-307135
lines changed
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
name: Bug report [advanced]
3+
about: Please consider using the Discussions if you're experiencing a problem.
4+
title: ''
5+
labels: bug
6+
assignees: gbakeman
7+
8+
---
9+
10+
**Please make sure to fill out this form completely, and attach your program logs (set to Debug setting). You can delete this line.**
11+
12+
- [ ] Searched to see if this issue exists
13+
- [ ] Completed below form
14+
- [ ] Attached debug log file
15+
- [ ] Copy output in File -> UPS Variable
16+
17+
**WinNUT Version: **
18+
**Windows OS Version: **
19+
20+
**Describe the bug**
21+
A clear and concise description of what the bug is.
22+
23+
**To Reproduce**
24+
Steps to reproduce the behavior:
25+
1. Go to '...'
26+
2. Click on '....'
27+
3. Scroll down to '....'
28+
4. See error
29+
30+
**Expected behavior**
31+
A clear and concise description of what you expected to happen.
32+
33+
**Screenshots**
34+
If applicable, add screenshots to help explain your problem.
35+
36+
**Additional context**
37+
Add any other context about the problem here.

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: Experiencing an issue?
4+
url: https://github.com/nutdotnet/WinNUT-Client/discussions/categories/q-a
5+
about: Go here to see and create Discussions.

.github/workflows/build-validate.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ defaults:
77
on:
88
workflow_dispatch:
99
pull_request:
10-
branches: [ main, Dev-2.2 ] # Build for dev primarily, probably don't need main...?
10+
branches: [ main, dev-* ] # Build for dev primarily, probably don't need main...?
1111
paths:
1212
- '**.vb'
1313
- '**.vbproj'

.gitignore

Lines changed: 37 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
## Ignore Visual Studio temporary files, build results, and
22
## files generated by popular Visual Studio add-ons.
33
##
4-
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
4+
## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore
55

66
# User-specific files
77
*.rsuser
8-
.suo
98
*.suo
109
*.user
1110
*.userosscache
@@ -22,6 +21,7 @@ mono_crash.*
2221
[Dd]ebugPublic/
2322
[Rr]elease/
2423
[Rr]eleases/
24+
PreRelease/
2525
x64/
2626
x86/
2727
[Ww][Ii][Nn]32/
@@ -91,6 +91,7 @@ StyleCopReport.xml
9191
*.tmp_proj
9292
*_wpftmp.csproj
9393
*.log
94+
*.tlog
9495
*.vspscc
9596
*.vssscc
9697
.builds
@@ -294,6 +295,17 @@ node_modules/
294295
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
295296
*.vbw
296297

298+
# Visual Studio 6 auto-generated project file (contains which files were open etc.)
299+
*.vbp
300+
301+
# Visual Studio 6 workspace and project file (working project files containing files to include in project)
302+
*.dsw
303+
*.dsp
304+
305+
# Visual Studio 6 technical files
306+
*.ncb
307+
*.aps
308+
297309
# Visual Studio LightSwitch build output
298310
**/*.HTMLClient/GeneratedArtifacts
299311
**/*.DesktopClient/GeneratedArtifacts
@@ -350,6 +362,9 @@ ASALocalRun/
350362
# Local History for Visual Studio
351363
.localhistory/
352364

365+
# Visual Studio History (VSHistory) files
366+
.vshistory/
367+
353368
# BeatPulse healthcheck temp database
354369
healthchecksdb
355370

@@ -361,6 +376,24 @@ MigrationBackup/
361376

362377
# Fody - auto-generated XML schema
363378
FodyWeavers.xsd
364-
*.pdb
379+
380+
# VS Code files for those working on multiple tools
381+
.vscode/*
382+
!.vscode/settings.json
383+
!.vscode/tasks.json
384+
!.vscode/launch.json
385+
!.vscode/extensions.json
386+
*.code-workspace
387+
388+
# Local History for Visual Studio Code
389+
.history/
390+
391+
# Windows Installer files from build outputs
392+
*.cab
365393
*.msi
366-
WinNUT_V2/.vs
394+
*.msix
395+
*.msm
396+
*.msp
397+
398+
# JetBrains Rider
399+
*.sln.iml

README.md

Lines changed: 35 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -1,91 +1,65 @@
1-
# WinNUT-Client
1+
WinNUT is a WinForms client for connecting to a Network UPS Tools monitoring server.
22

3-
[![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.com/donate?hosted_button_id=FAFJ3ZKMENGCU)
3+
- 📈 Monitor important values of your UPS like voltage and power consumption
4+
- 🌩️ Receive notifications for abnormal power conditions (power outage)
5+
- ❤️ Keep your hardware and data safe with configurable suspend and shutdown triggers
46

5-
## Installation
6-
To use it, please follow the following steps:
7-
1. Get the [last available Releases](https://github.com/nutdotnet/WinNUT-Client/releases)
8-
2. Install WinNUT-Client using the "WinNUT-Setup.msi" file obtained previously
9-
3. If you were using an older version of WinNUT (v1.x), copy your "ups.ini" configuration file to the WinNUT-Client installation directory (by default "C:\Program Files(x86)\WinNUT-Client ") for an automatic import of your parameters during the first launch
10-
4. Start WinNUT V2 and modify the parameters according to your needs
11-
12-
## Specific Configuration
7+
<br />
8+
<br />
139

14-
### For Synology NAS
15-
If your NUT server is hosted on a Synology NAS, be sure to provide the following connection information (default):
16-
Login: upsmon
17-
Password: secret
10+
# Future development
11+
WinNUT has gone through a long evolution with several different programming languages and maintainers. The time has come to retire this iteration of WinNUT and begin planning for the next version. See [issue #40](https://github.com/nutdotnet/WinNUT-Client/issues/40) for more information. Join in the discussions at [Coco.Nut](https://github.com/nutdotnet/Coco.Nut), and shape the future of the next iteration of WinNUT.
1812

19-
It will probably be necessary to allow the WinNUT-Client IP to communicate with the NUT server.
20-
*See issue 47 for more information, specifically [this commentary](https://github.com/gawindx/WinNUT-Client/issues/47#issuecomment-759180793).*
21-
22-
###
23-
## Contributing
24-
### Translation
25-
WinNUT-Client V2 is natively multilingual, so it is no longer necessary to select your language from the software interface.
26-
Currently, WinNUT-Client supports:
27-
- English
28-
- German
29-
- French
30-
- Simplified Chinese
31-
- Russian
13+
# Installation
14+
1. Get the [latest Release](https://github.com/nutdotnet/WinNUT-Client/releases)
15+
2. Install WinNUT using the downloaded executable
16+
3. If you were using an older version of WinNUT (v1.x), copy your "ups.ini" configuration file to the WinNUT-Client installation directory (by default "C:\Program Files(x86)\WinNUT-Client ") for an automatic import of your parameters during the first launch
17+
4. Start WinNUT and modify the settings according to your needs
3218

33-
#### To add / correct a language
19+
## Synology NAS
20+
If you are connecting to a Synology NAS with a UPS attached, there is some additional configuration that needs to be done.
3421

35-
##### Method 1 (preferred)
36-
1. [Fork](https://github.com/nutdotnet/WinNUT-Client/fork) this repository
37-
2. In the translation directory:
22+
Referring to the [Synology documentation](https://kb.synology.com/en-us/DSM/help/DSM/AdminCenter/system_hardware_ups?version=7), note that you must add your client computer's IP address to the *Permitted DiskStation Devices* window. In addition, WinNUT requires the following settings:
3823

39-
For a new translation:
40-
1. Use the new_translation.csv file to translate the texts
41-
2. Save this file in xx-XX corresponding to the language code
24+
- **Login**: upsmon
25+
- **Password**: secret
26+
- **UPS Name**: ups
4227

43-
For a correction:
44-
1. Edit the wrong language file
45-
2. Make the necessary corrections
4628

47-
3. Save it instead
48-
4. Create a pull request on this repository to take into account the translation.
29+
*See [issue 47](https://github.com/gawindx/WinNUT-Client/issues/47#issuecomment-759180793) for more information.*
4930

50-
##### Method 2
51-
1. Get the file [new_translation.csv](./Translation/new_translation.csv)
52-
2. Perform the necessary translations
53-
3. Save this file in csv format (IMPORTANT)
54-
4. Create a gist via [gist github](https://gist.github.com) and paste the contents of the previously created csv file
55-
5. Open a new issue and tell me:
56-
- the link of the gist
57-
- the language to create / correct
31+
## QNAP NAS
32+
If your NUT server is hosted on a QNAP NAS, be sure to provide the following connection information (default):
5833

59-
Your translation / correction will be added on a new version and will thus be available to the entire community.
34+
- **UPS Name**: qnapups
35+
- (Login and Password can be empty)
6036

61-
## Update WinNUT-Client
37+
Also check the "Enable network UPS master" box on the Control Panel -> External device page on the QNAP webinterface and add the IP address of the WinNUT-Client to allow the client to connect to the QNAP for UPS information.
6238

63-
Since version 1.8.0.0, WinNUT-Client includes a process for checking for updates.
64-
This process can be started automatically on startup or manually on demand (and you can choose whether you want to update from the stable or development version)
39+
# Contributing
40+
- [Translations](https://github.com/nutdotnet/WinNUT-Client/wiki/Translations)
41+
- [Code/Bug fixes](https://github.com/nutdotnet/WinNUT-Client/wiki/Development)
6542

66-
During this update, the new installation file will be automatically downloaded and you can easily update your version of WinNUT-Client.
43+
# Updates
6744

68-
This process is fully integrated and no longer requires a second executable.
45+
WinNUT has built-in update functionality. This process can be started automatically on startup or manually on demand, and you can choose whether you want to update to the stable or development version. During this process, the new files will be automatically downloaded and installed.
6946

7047
## Third Party Components / Acknowledgments
7148

72-
WinNUT-Client uses:
49+
WinNUT uses:
7350
- a modified version of AGauge initially developed by [Code-Artist](https://github.com/Code-Artist/AGauge) and under [MIT license](https://opensource.org/licenses/MIT)
7451
- Class IniReader developed by [Ludvik Jerabek](https://www.codeproject.com/Articles/21896/INI-Reader-Writer-Class-for-C-VB-NET-and-VBScript) and under [The Code Project Open License](http://www.codeproject.com/info/cpol10.aspx)
7552
- Newtonsoft.Json Library is used in this Project [Newtonsoft.json Website](https://www.newtonsoft.com/json) and under [MIT license](https://opensource.org/licenses/MIT)
7653

7754
## License
7855

7956
WinNUT-Client is a NUT windows client for monitoring your ups hooked up to your favorite linux server.
80-
Copyright (C) 2019-2021 Gawindx (Decaux Nicolas)
57+
58+
- Copyright (C) 2019-2021 Gawindx (Decaux Nicolas)
59+
- Copyright (C) 2022+ NUT Dot Net project
8160

8261
This program is free software: you can redistribute it and/or modify it under the terms of the
8362
GNU General Public License as published by the Free Software Foundation, either version 3 of the
8463
License, or any later version.
8564

86-
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY
87-
88-
## Donation
89-
If you want to support this project or reward the work done, you can do so here:
90-
91-
[![paypal](https://www.paypalobjects.com/en_US/FR/i/btn/btn_donateCC_LG.gif)](https://www.paypal.com/donate?hosted_button_id=FAFJ3ZKMENGCU)
65+
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY.

WinNUT_V2/.editorconfig

Lines changed: 45 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ root = true
66
# All files
77
[*]
88
indent_style = space
9-
file_header_template = WinNUT-Client is a NUT windows client for monitoring your ups hooked up to your favorite linux server.\nCopyright (C) 2019-2021 Gawindx (Decaux Nicolas)\n\nThis program is free software: you can redistribute it and/or modify it under the terms of the\nGNU General Public License as published by the Free Software Foundation, either version 3 of the\nLicense, or any later version.\n\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without\neven the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\nGeneral Public License for more details.\n\nYou should have received a copy of the GNU General Public License along with this program.\nIf not, see https://www.gnu.org/licenses/.\n
109
# Code files
1110
[*.{cs,csx,vb,vbx}]
1211
indent_size = 4
@@ -54,18 +53,29 @@ dotnet_naming_style.pascal_case_style.capitalization = pascal_case
5453
# Use PascalCase for constant fields
5554
dotnet_naming_rule.constant_fields_should_be_pascal_case.severity = suggestion
5655
dotnet_naming_rule.constant_fields_should_be_pascal_case.symbols = constant_fields
57-
dotnet_naming_rule.constant_fields_should_be_pascal_case.style = pascal_case_style
56+
dotnet_naming_rule.constant_fields_should_be_pascal_case.style = pascal_case_style
5857
dotnet_naming_symbols.constant_fields.applicable_kinds = field
5958
dotnet_naming_symbols.constant_fields.applicable_accessibilities = *
6059
dotnet_naming_symbols.constant_fields.required_modifiers = const
60+
dotnet_style_prefer_simplified_boolean_expressions = true:suggestion
61+
dotnet_style_prefer_compound_assignment = true:suggestion
62+
dotnet_style_prefer_simplified_interpolation = true:suggestion
63+
dotnet_style_namespace_match_folder = true:suggestion
64+
dotnet_style_operator_placement_when_wrapping = beginning_of_line
65+
tab_width = 4
66+
end_of_line = crlf
67+
dotnet_style_allow_multiple_blank_lines_experimental = true:silent
68+
dotnet_style_allow_statement_immediately_after_block_experimental = true:silent
69+
dotnet_style_prefer_collection_expression = when_types_loosely_match:suggestion
70+
dotnet_code_quality_unused_parameters = all:suggestion
6171
###############################
6272
# C# Coding Conventions #
6373
###############################
6474
[*.cs]
6575
# var preferences
66-
csharp_style_var_for_built_in_types = true:silent
67-
csharp_style_var_when_type_is_apparent = true:silent
68-
csharp_style_var_elsewhere = true:silent
76+
csharp_style_var_for_built_in_types = false:silent
77+
csharp_style_var_when_type_is_apparent = false:silent
78+
csharp_style_var_elsewhere = false:silent
6979
# Expression-bodied members
7080
csharp_style_expression_bodied_methods = false:silent
7181
csharp_style_expression_bodied_constructors = false:silent
@@ -101,7 +111,7 @@ csharp_new_line_between_query_expression_clauses = true
101111
# Indentation preferences
102112
csharp_indent_case_contents = true
103113
csharp_indent_switch_labels = true
104-
csharp_indent_labels = flush_left
114+
csharp_indent_labels = one_less_than_current
105115
# Space preferences
106116
csharp_space_after_cast = false
107117
csharp_space_after_keywords_in_control_flow_statements = true
@@ -117,6 +127,35 @@ csharp_space_between_method_call_empty_parameter_list_parentheses = false
117127
# Wrapping preferences
118128
csharp_preserve_single_line_statements = true
119129
csharp_preserve_single_line_blocks = true
130+
csharp_using_directive_placement = outside_namespace:silent
131+
csharp_prefer_simple_using_statement = true:suggestion
132+
csharp_style_namespace_declarations = block_scoped:silent
133+
csharp_style_prefer_method_group_conversion = true:silent
134+
csharp_style_prefer_top_level_statements = true:silent
135+
csharp_style_prefer_primary_constructors = true:suggestion
136+
csharp_style_expression_bodied_lambdas = true:silent
137+
csharp_style_expression_bodied_local_functions = false:silent
138+
csharp_style_prefer_null_check_over_type_check = true:suggestion
139+
csharp_style_prefer_local_over_anonymous_function = true:suggestion
140+
csharp_style_prefer_index_operator = true:suggestion
141+
csharp_style_prefer_range_operator = true:suggestion
142+
csharp_style_implicit_object_creation_when_type_is_apparent = true:suggestion
143+
csharp_style_prefer_tuple_swap = true:suggestion
144+
csharp_style_prefer_utf8_string_literals = true:suggestion
145+
csharp_style_unused_value_assignment_preference = discard_variable:suggestion
146+
csharp_style_unused_value_expression_statement_preference = discard_variable:silent
147+
csharp_prefer_static_local_function = true:suggestion
148+
csharp_style_prefer_readonly_struct = true:suggestion
149+
csharp_style_prefer_readonly_struct_member = true:suggestion
150+
csharp_style_allow_embedded_statements_on_same_line_experimental = true:silent
151+
csharp_style_allow_blank_lines_between_consecutive_braces_experimental = true:silent
152+
csharp_style_allow_blank_line_after_colon_in_constructor_initializer_experimental = true:silent
153+
csharp_style_allow_blank_line_after_token_in_conditional_expression_experimental = true:silent
154+
csharp_style_allow_blank_line_after_token_in_arrow_expression_clause_experimental = true:silent
155+
csharp_style_prefer_switch_expression = true:suggestion
156+
csharp_style_prefer_pattern_matching = true:silent
157+
csharp_style_prefer_not_pattern = true:suggestion
158+
csharp_style_prefer_extended_property_pattern = true:suggestion
120159
###############################
121160
# VB Coding Conventions #
122161
###############################

WinNUT_V2/AGauge_mod/AGauge.csproj

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,11 @@
2626
<Prefer32Bit>false</Prefer32Bit>
2727
</PropertyGroup>
2828
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
29-
<DebugType>pdbonly</DebugType>
29+
<DebugType>none</DebugType>
3030
<Optimize>true</Optimize>
3131
<OutputPath>bin\Release\</OutputPath>
32-
<DefineConstants>TRACE</DefineConstants>
32+
<DefineConstants>
33+
</DefineConstants>
3334
<ErrorReport>prompt</ErrorReport>
3435
<WarningLevel>4</WarningLevel>
3536
<Prefer32Bit>false</Prefer32Bit>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33
<PropertyGroup>
4-
<ProjectView>ShowAllFiles</ProjectView>
4+
<ProjectView>ProjectFiles</ProjectView>
55
</PropertyGroup>
66
</Project>

0 commit comments

Comments
 (0)