diff --git a/WinNUT_V2/WinNUT-Client/MultilingualResources/WinNUT-Client.zh-TW.xlf b/WinNUT_V2/WinNUT-Client/MultilingualResources/WinNUT-Client.zh-TW.xlf index 5532804..179f1ad 100644 --- a/WinNUT_V2/WinNUT-Client/MultilingualResources/WinNUT-Client.zh-TW.xlf +++ b/WinNUT_V2/WinNUT-Client/MultilingualResources/WinNUT-Client.zh-TW.xlf @@ -635,10 +635,6 @@ Ini File Moved to {0}.old Reconnection In Progress 正在重新連線 - - Try {0} of {1} - 重試第 {0} 次,共 {1} 次 - Not Connected 未連線 @@ -734,14 +730,6 @@ Cancel to Save Msi and Install Later Disconnected from Nut Host 已與 NUT 伺服器中斷連線。 - - Try Reconnect {0} / {1} - 重試連線 {0} / {1} - - - Max Retry reached. Wait for manual Reconnection - 已達最大重試次數,等待手動重新連線。 - Conditions met for launching the Extinguishing Process 啟動停機程序的條件 @@ -859,6 +847,18 @@ Please correct the error, or cancel the upgrade dialog to continue with the defa Unavailable Indicate that a variable is unavailable + + ..\Resources\RepeatHS.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + ..\Resources\RepeatHS.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\disconnect2.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + ..\Resources\disconnect2.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\internetconnection.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + ..\Resources\internetconnection.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + @@ -2562,8 +2562,8 @@ Accepted value: Numeric value from 0 to 100. UPS 變數 - 180, 22 - 180, 22 + 177, 22 + 177, 22 Exit @@ -2577,17 +2577,9 @@ Accepted value: Numeric value from 0 to 100. File 檔案 - - 133, 22 - 133, 22 - - - Reconnect - 重新連線 - - 133, 22 - 133, 22 + 180, 22 + 180, 22 Disconnect @@ -2646,8 +2638,8 @@ Accepted value: Numeric value from 0 to 100. 0, 24 - 351, 24 - 351, 24 + 231, 24 + 231, 24 0 @@ -3758,8 +3750,8 @@ Accepted value: Numeric value from 0 to 100. False - 180, 22 - 180, 22 + 177, 22 + 177, 22 Manage Old Prefs... @@ -3769,6 +3761,62 @@ Accepted value: Numeric value from 0 to 100. + + 180, 22 + 180, 22 + + + Connect + Connect + + + + + + + + + + + + + + + + + + + + + + + + + + + 177, 6 + 177, 6 + + + 180, 22 + 180, 22 + + + Persist + Persist + + + False + False + + + NoControl + NoControl + + + False + False + diff --git a/WinNUT_V2/WinNUT-Client/MultilingualResources/WinNUT-client.de-DE.xlf b/WinNUT_V2/WinNUT-Client/MultilingualResources/WinNUT-client.de-DE.xlf index d952c46..89af9d6 100644 --- a/WinNUT_V2/WinNUT-Client/MultilingualResources/WinNUT-client.de-DE.xlf +++ b/WinNUT_V2/WinNUT-Client/MultilingualResources/WinNUT-client.de-DE.xlf @@ -1764,10 +1764,6 @@ Ini File Moved to {0}.old Reconnection In Progress Wiederverbindung läuft - - Try {0} of {1} - Versuch {0} von {1} - Not Connected Nicht verbunden @@ -1808,14 +1804,6 @@ Ini File Moved to {0}.old Disconnected from Nut Host Verbindung zum NUT-Host verloren - - Try Reconnect {0} / {1} - Versuche Wiederverbindung {0} / {1} - - - Max Retry reached. Wait for manual Reconnection - Maximale Anzahl Verbindungsversuche erreicht. Auf manuelle Wiederverbindung warten. - Conditions met for launching the Extinguishing Process Voraussetzungen für den Start des Löschprozesses liegen vor @@ -1953,6 +1941,18 @@ Please correct the error, or cancel the upgrade dialog to continue with the defa Unavailable Indicate that a variable is unavailable + + ..\Resources\RepeatHS.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + ..\Resources\RepeatHS.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\disconnect2.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + ..\Resources\disconnect2.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\internetconnection.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + ..\Resources\internetconnection.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + @@ -1975,8 +1975,8 @@ Please correct the error, or cancel the upgrade dialog to continue with the defa USV-Variablen - 180, 22 - 180, 22 + 177, 22 + 177, 22 Exit @@ -1990,17 +1990,9 @@ Please correct the error, or cancel the upgrade dialog to continue with the defa File Datei - - 133, 22 - 133, 22 - - - Reconnect - Erneut verbinden - - 133, 22 - 133, 22 + 180, 22 + 180, 22 Disconnect @@ -2055,8 +2047,8 @@ Please correct the error, or cancel the upgrade dialog to continue with the defa 0, 0 - 351, 24 - 351, 24 + 231, 24 + 231, 24 0 @@ -3231,8 +3223,8 @@ Please correct the error, or cancel the upgrade dialog to continue with the defa False - 180, 22 - 180, 22 + 177, 22 + 177, 22 Manage Old Prefs... @@ -3242,6 +3234,62 @@ Please correct the error, or cancel the upgrade dialog to continue with the defa + + 180, 22 + 180, 22 + + + Connect + Connect + + + + + + + + + + + + + + + + + + + + + + + + + + + 177, 6 + 177, 6 + + + 180, 22 + 180, 22 + + + Persist + Persist + + + False + False + + + NoControl + NoControl + + + False + False + diff --git a/WinNUT_V2/WinNUT-Client/MultilingualResources/WinNUT-client.fr-FR.xlf b/WinNUT_V2/WinNUT-Client/MultilingualResources/WinNUT-client.fr-FR.xlf index 8425598..40e69d9 100644 --- a/WinNUT_V2/WinNUT-Client/MultilingualResources/WinNUT-client.fr-FR.xlf +++ b/WinNUT_V2/WinNUT-Client/MultilingualResources/WinNUT-client.fr-FR.xlf @@ -1788,10 +1788,6 @@ Fichier Ini déplacé vers {0}.old Reconnection In Progress Reconnexion en cours - - Try {0} of {1} - Essai {0} sur {1} - Not Connected Non connecté @@ -1832,14 +1828,6 @@ Fichier Ini déplacé vers {0}.old Disconnected from Nut Host Déconnectée du serveur NUT - - Try Reconnect {0} / {1} - Tentative de reconnexion {0} / {1} - - - Max Retry reached. Wait for manual Reconnection - Nombre maximale d'essai atteint. En attente de reconnexion manuelle - Conditions met for launching the Extinguishing Process Conditions atteintes pour le lancement du Processus d'Extinction @@ -1977,6 +1965,18 @@ Please correct the error, or cancel the upgrade dialog to continue with the defa Unavailable Indicate that a variable is unavailable + + ..\Resources\RepeatHS.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + ..\Resources\RepeatHS.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\disconnect2.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + ..\Resources\disconnect2.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\internetconnection.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + ..\Resources\internetconnection.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + @@ -1999,8 +1999,8 @@ Please correct the error, or cancel the upgrade dialog to continue with the defa Variable de l'UPS - 180, 22 - 180, 22 + 177, 22 + 177, 22 Exit @@ -2014,17 +2014,9 @@ Please correct the error, or cancel the upgrade dialog to continue with the defa File Fichier - - 133, 22 - 133, 22 - - - Reconnect - Re-Connecter - - 133, 22 - 133, 22 + 180, 22 + 180, 22 Disconnect @@ -2079,8 +2071,8 @@ Please correct the error, or cancel the upgrade dialog to continue with the defa 0, 0 - 351, 24 - 351, 24 + 231, 24 + 231, 24 0 @@ -3255,8 +3247,8 @@ Please correct the error, or cancel the upgrade dialog to continue with the defa False - 180, 22 - 180, 22 + 177, 22 + 177, 22 Manage Old Prefs... @@ -3266,6 +3258,62 @@ Please correct the error, or cancel the upgrade dialog to continue with the defa + + 180, 22 + 180, 22 + + + Connect + Connect + + + + + + + + + + + + + + + + + + + + + + + + + + + 177, 6 + 177, 6 + + + 180, 22 + 180, 22 + + + Persist + Persist + + + False + False + + + NoControl + NoControl + + + False + False + diff --git a/WinNUT_V2/WinNUT-Client/MultilingualResources/WinNUT-client.ru-RU.xlf b/WinNUT_V2/WinNUT-Client/MultilingualResources/WinNUT-client.ru-RU.xlf index 3b0b095..1101e46 100644 --- a/WinNUT_V2/WinNUT-Client/MultilingualResources/WinNUT-client.ru-RU.xlf +++ b/WinNUT_V2/WinNUT-Client/MultilingualResources/WinNUT-client.ru-RU.xlf @@ -636,10 +636,6 @@ Ini File Moved to {0}.old Reconnection In Progress Переподключение в процессе - - Try {0} of {1} - Попытка {0} из {1} - Not Connected Не подключено @@ -738,15 +734,6 @@ Cancel to Save Msi and Install Later Disconnected from Nut Host Отключиться от сервера NUT - - Try Reconnect {0} / {1} - Попытка переподключения {0} / {1} - - - Max Retry reached. Wait for manual Reconnection - Достигнуто макимальное количество попыток повторного подключения. -Ожидается ручное переподключение - Conditions met for launching the Extinguishing Process Достигнуты условия для запуска процесса отключения @@ -864,6 +851,18 @@ Please correct the error, or cancel the upgrade dialog to continue with the defa Unavailable Indicate that a variable is unavailable + + ..\Resources\RepeatHS.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + ..\Resources\RepeatHS.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\disconnect2.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + ..\Resources\disconnect2.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\internetconnection.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + ..\Resources\internetconnection.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + @@ -2584,8 +2583,8 @@ Accepted value: Numeric value from 0 to 100. Переменные ИБП - 180, 22 - 180, 22 + 177, 22 + 177, 22 Exit @@ -2599,17 +2598,9 @@ Accepted value: Numeric value from 0 to 100. File Файл - - 133, 22 - 133, 22 - - - Reconnect - Переподключиться - - 133, 22 - 133, 22 + 180, 22 + 180, 22 Disconnect @@ -2668,8 +2659,8 @@ Accepted value: Numeric value from 0 to 100. 0, 24 - 351, 24 - 351, 24 + 231, 24 + 231, 24 0 @@ -3780,8 +3771,8 @@ Accepted value: Numeric value from 0 to 100. False - 180, 22 - 180, 22 + 177, 22 + 177, 22 Manage Old Prefs... @@ -3791,6 +3782,62 @@ Accepted value: Numeric value from 0 to 100. + + 180, 22 + 180, 22 + + + Connect + Connect + + + + + + + + + + + + + + + + + + + + + + + + + + + 177, 6 + 177, 6 + + + 180, 22 + 180, 22 + + + Persist + Persist + + + False + False + + + NoControl + NoControl + + + False + False + diff --git a/WinNUT_V2/WinNUT-Client/MultilingualResources/WinNUT-client.uk-UA.xlf b/WinNUT_V2/WinNUT-Client/MultilingualResources/WinNUT-client.uk-UA.xlf index 4993e95..8a013d7 100644 --- a/WinNUT_V2/WinNUT-Client/MultilingualResources/WinNUT-client.uk-UA.xlf +++ b/WinNUT_V2/WinNUT-Client/MultilingualResources/WinNUT-client.uk-UA.xlf @@ -636,10 +636,6 @@ Ini File Moved to {0}.old Reconnection In Progress Перепідключення в процесі - - Try {0} of {1} - Спроба {0} из {1} - Not Connected Не підключено @@ -738,15 +734,6 @@ Cancel to Save Msi and Install Later Disconnected from Nut Host Від'єднатися від сервера NUT - - Try Reconnect {0} / {1} - Спроба перепідключення {0} / {1} - - - Max Retry reached. Wait for manual Reconnection - Досягнуто макимальної кількості спроб повторного з'єднання. -Ожидается ручное переподключение - Conditions met for launching the Extinguishing Process Досягнуто умов для запуску процесу вимкнення @@ -864,6 +851,18 @@ Please correct the error, or cancel the upgrade dialog to continue with the defa Недоступно Indicate that a variable is unavailable + + ..\Resources\RepeatHS.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + ..\Resources\RepeatHS.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\disconnect2.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + ..\Resources\disconnect2.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\internetconnection.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + ..\Resources\internetconnection.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + @@ -2584,8 +2583,8 @@ Accepted value: Numeric value from 0 to 100. Змінні ДБЖ - 180, 22 - 180, 22 + 177, 22 + 177, 22 Exit @@ -2599,17 +2598,9 @@ Accepted value: Numeric value from 0 to 100. File Файл - - 133, 22 - 133, 22 - - - Reconnect - Перепідключитись - - 133, 22 - 133, 22 + 180, 22 + 180, 22 Disconnect @@ -2668,8 +2659,8 @@ Accepted value: Numeric value from 0 to 100. 0, 24 - 351, 24 - 351, 24 + 231, 24 + 231, 24 0 @@ -3780,8 +3771,8 @@ Accepted value: Numeric value from 0 to 100. False - 180, 22 - 180, 22 + 177, 22 + 177, 22 Manage Old Prefs... @@ -3791,6 +3782,62 @@ Accepted value: Numeric value from 0 to 100. + + 180, 22 + 180, 22 + + + Connect + Connect + + + + + + + + + + + + + + + + + + + + + + + + + + + 177, 6 + 177, 6 + + + 180, 22 + 180, 22 + + + Persist + Persist + + + False + False + + + NoControl + NoControl + + + False + False + diff --git a/WinNUT_V2/WinNUT-Client/MultilingualResources/WinNUT-client.zh-CN.xlf b/WinNUT_V2/WinNUT-Client/MultilingualResources/WinNUT-client.zh-CN.xlf index d9410c0..589a413 100644 --- a/WinNUT_V2/WinNUT-Client/MultilingualResources/WinNUT-client.zh-CN.xlf +++ b/WinNUT_V2/WinNUT-Client/MultilingualResources/WinNUT-client.zh-CN.xlf @@ -625,10 +625,6 @@ Ini 文件重命名为 {0}.old Reconnection In Progress 重连中 - - Try {0} of {1} - 尝试 {1} 的 {0} - Not Connected 未连接 @@ -719,14 +715,6 @@ Cancel to Save Msi and Install Later Disconnected from Nut Host 从 Nut 主机断开了连接 - - Try Reconnect {0} / {1} - 尝试重连 {0} / {1} - - - Max Retry reached. Wait for manual Reconnection - 达到最大重试次数。等待手动重连。 - Conditions met for launching the Extinguishing Process 触发关机流程所需满足的条件 @@ -864,6 +852,18 @@ Please correct the error, or cancel the upgrade dialog to continue with the defa 参数无效 Indicate that a variable is unavailable + + ..\Resources\RepeatHS.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + ..\Resources\RepeatHS.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\disconnect2.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + ..\Resources\disconnect2.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\internetconnection.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + ..\Resources\internetconnection.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + @@ -2583,8 +2583,8 @@ Accepted value: Numeric value from 0 to 100. UPS 变量 - 180, 22 - 180, 22 + 177, 22 + 177, 22 Exit @@ -2598,17 +2598,9 @@ Accepted value: Numeric value from 0 to 100. File 文件 - - 133, 22 - 133, 22 - - - Reconnect - 重新连接 - - 133, 22 - 133, 22 + 180, 22 + 180, 22 Disconnect @@ -2667,8 +2659,8 @@ Accepted value: Numeric value from 0 to 100. 0, 24 - 351, 24 - 351, 24 + 231, 24 + 231, 24 0 @@ -3779,8 +3771,8 @@ Accepted value: Numeric value from 0 to 100. False - 180, 22 - 180, 22 + 177, 22 + 177, 22 Manage Old Prefs... @@ -3790,6 +3782,62 @@ Accepted value: Numeric value from 0 to 100. + + 180, 22 + 180, 22 + + + Connect + Connect + + + + + + + + + + + + + + + + + + + + + + + + + + + 177, 6 + 177, 6 + + + 180, 22 + 180, 22 + + + Persist + Persist + + + False + False + + + NoControl + NoControl + + + False + False + diff --git a/WinNUT_V2/WinNUT-Client/My Project/Resources.Designer.vb b/WinNUT_V2/WinNUT-Client/My Project/Resources.Designer.vb index 57b121c..dccd3b4 100644 --- a/WinNUT_V2/WinNUT-Client/My Project/Resources.Designer.vb +++ b/WinNUT_V2/WinNUT-Client/My Project/Resources.Designer.vb @@ -378,6 +378,16 @@ Namespace My.Resources End Get End Property + ''' + ''' Looks up a localized resource of type System.Drawing.Bitmap. + ''' + Public ReadOnly Property disconnect2() As System.Drawing.Bitmap + Get + Dim obj As Object = ResourceManager.GetObject("disconnect2", resourceCulture) + Return CType(obj,System.Drawing.Bitmap) + End Get + End Property + ''' ''' Looks up a localized string similar to Old ups.ini imported '''Ini File Moved to {0}.old. @@ -406,15 +416,6 @@ Namespace My.Resources End Get End Property - ''' - ''' Looks up a localized string similar to Try {0} of {1}. - ''' - Public ReadOnly Property Frm_Main_Str_04() As String - Get - Return ResourceManager.GetString("Frm_Main_Str_04", resourceCulture) - End Get - End Property - ''' ''' Looks up a localized string similar to Not Connected. ''' @@ -580,6 +581,16 @@ Namespace My.Resources End Get End Property + ''' + ''' Looks up a localized resource of type System.Drawing.Bitmap. + ''' + Public ReadOnly Property internetconnection() As System.Drawing.Bitmap + Get + Dim obj As Object = ResourceManager.GetObject("internetconnection", resourceCulture) + Return CType(obj,System.Drawing.Bitmap) + End Get + End Property + ''' ''' Looks up a localized string similar to WinNut Preferences Changed. ''' @@ -625,24 +636,6 @@ Namespace My.Resources End Get End Property - ''' - ''' Looks up a localized string similar to Try Reconnect {0} / {1}. - ''' - Public ReadOnly Property Log_Str_06() As String - Get - Return ResourceManager.GetString("Log_Str_06", resourceCulture) - End Get - End Property - - ''' - ''' Looks up a localized string similar to Max Retry reached. Wait for manual Reconnection. - ''' - Public ReadOnly Property Log_Str_07() As String - Get - Return ResourceManager.GetString("Log_Str_07", resourceCulture) - End Get - End Property - ''' ''' Looks up a localized string similar to Conditions met for launching the Extinguishing Process. ''' @@ -716,6 +709,16 @@ Namespace My.Resources End Get End Property + ''' + ''' Looks up a localized resource of type System.Drawing.Bitmap. + ''' + Public ReadOnly Property RepeatHS() As System.Drawing.Bitmap + Get + Dim obj As Object = ResourceManager.GetObject("RepeatHS", resourceCulture) + Return CType(obj,System.Drawing.Bitmap) + End Get + End Property + ''' ''' Looks up a localized string similar to Save WinNUT Registry Key. ''' diff --git a/WinNUT_V2/WinNUT-Client/My Project/Resources.de-DE.resx b/WinNUT_V2/WinNUT-Client/My Project/Resources.de-DE.resx index a8be22f..698d25b 100644 --- a/WinNUT_V2/WinNUT-Client/My Project/Resources.de-DE.resx +++ b/WinNUT_V2/WinNUT-Client/My Project/Resources.de-DE.resx @@ -42,9 +42,6 @@ Wiederverbindung läuft - - Versuch {0} von {1} - Nicht verbunden @@ -75,12 +72,6 @@ Verbindung zum NUT-Host verloren - - Versuche Wiederverbindung {0} / {1} - - - Maximale Anzahl Verbindungsversuche erreicht. Auf manuelle Wiederverbindung warten. - Voraussetzungen für den Start des Löschprozesses liegen vor @@ -117,4 +108,13 @@ ..\Resources\regedit.exe_14_100-0.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\RepeatHS.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\disconnect2.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\internetconnection.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + \ No newline at end of file diff --git a/WinNUT_V2/WinNUT-Client/My Project/Resources.fr-FR.resx b/WinNUT_V2/WinNUT-Client/My Project/Resources.fr-FR.resx index 9cbc563..ce9efe1 100644 --- a/WinNUT_V2/WinNUT-Client/My Project/Resources.fr-FR.resx +++ b/WinNUT_V2/WinNUT-Client/My Project/Resources.fr-FR.resx @@ -46,9 +46,6 @@ Fichier Ini déplacé vers {0}.old Reconnexion en cours - - Essai {0} sur {1} - Non connecté @@ -79,12 +76,6 @@ Fichier Ini déplacé vers {0}.old Déconnectée du serveur NUT - - Tentative de reconnexion {0} / {1} - - - Nombre maximale d'essai atteint. En attente de reconnexion manuelle - Conditions atteintes pour le lancement du Processus d'Extinction @@ -121,4 +112,13 @@ Fichier Ini déplacé vers {0}.old ..\Resources\regedit.exe_14_100-0.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\RepeatHS.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\disconnect2.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\internetconnection.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + \ No newline at end of file diff --git a/WinNUT_V2/WinNUT-Client/My Project/Resources.resx b/WinNUT_V2/WinNUT-Client/My Project/Resources.resx index 8786915..333f09d 100644 --- a/WinNUT_V2/WinNUT-Client/My Project/Resources.resx +++ b/WinNUT_V2/WinNUT-Client/My Project/Resources.resx @@ -215,6 +215,9 @@ Previous preferences data detected in the Registry. Notify the user that preferences data from the old system was detected in the Registry hive. + + ..\Resources\disconnect2.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + Old ups.ini imported Ini File Moved to {0}.old @@ -225,9 +228,6 @@ Ini File Moved to {0}.old Reconnection In Progress - - Try {0} of {1} - Not Connected @@ -285,6 +285,9 @@ Cancel to Save Msi and Install Later https://github.com/nutdotnet/WinNUT-Client + + ..\Resources\internetconnection.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + WinNut Preferences Changed @@ -300,12 +303,6 @@ Cancel to Save Msi and Install Later Disconnected from Nut Host - - Try Reconnect {0} / {1} - - - Max Retry reached. Wait for manual Reconnection - Conditions met for launching the Extinguishing Process @@ -332,6 +329,9 @@ Cancel to Save Msi and Install Later ..\Resources\regedit.exe_14_100-0.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\RepeatHS.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + Save WinNUT Registry Key Title of the SaveFileDialog that prompts the user to select the file and location they would like to save their WinNUT Registry preferences to. diff --git a/WinNUT_V2/WinNUT-Client/My Project/Resources.ru-RU.resx b/WinNUT_V2/WinNUT-Client/My Project/Resources.ru-RU.resx index eab5879..3dc302f 100644 --- a/WinNUT_V2/WinNUT-Client/My Project/Resources.ru-RU.resx +++ b/WinNUT_V2/WinNUT-Client/My Project/Resources.ru-RU.resx @@ -24,9 +24,6 @@ Переподключение в процессе - - Попытка {0} из {1} - Не подключено @@ -96,13 +93,6 @@ Отключиться от сервера NUT - - Попытка переподключения {0} / {1} - - - Достигнуто макимальное количество попыток повторного подключения. -Ожидается ручное переподключение - Достигнуты условия для запуска процесса отключения @@ -121,4 +111,13 @@ ..\Resources\regedit.exe_14_100-0.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\RepeatHS.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\disconnect2.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\internetconnection.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + \ No newline at end of file diff --git a/WinNUT_V2/WinNUT-Client/My Project/Resources.uk-UA.resx b/WinNUT_V2/WinNUT-Client/My Project/Resources.uk-UA.resx index 1a45d19..43d67ec 100644 --- a/WinNUT_V2/WinNUT-Client/My Project/Resources.uk-UA.resx +++ b/WinNUT_V2/WinNUT-Client/My Project/Resources.uk-UA.resx @@ -24,9 +24,6 @@ Перепідключення в процесі - - Спроба {0} из {1} - Не підключено @@ -96,13 +93,6 @@ Від'єднатися від сервера NUT - - Спроба перепідключення {0} / {1} - - - Досягнуто макимальної кількості спроб повторного з'єднання. -Ожидается ручное переподключение - Досягнуто умов для запуску процесу вимкнення @@ -180,4 +170,13 @@ Недоступно Indicate that a variable is unavailable + + ..\Resources\RepeatHS.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\disconnect2.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\internetconnection.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + \ No newline at end of file diff --git a/WinNUT_V2/WinNUT-Client/My Project/Resources.zh-CN.resx b/WinNUT_V2/WinNUT-Client/My Project/Resources.zh-CN.resx index 9969265..0a5808b 100644 --- a/WinNUT_V2/WinNUT-Client/My Project/Resources.zh-CN.resx +++ b/WinNUT_V2/WinNUT-Client/My Project/Resources.zh-CN.resx @@ -25,9 +25,6 @@ Ini 文件重命名为 {0}.old 重连中 - - 尝试 {1} 的 {0} - 未连接 @@ -91,12 +88,6 @@ Ini 文件重命名为 {0}.old 从 Nut 主机断开了连接 - - 尝试重连 {0} / {1} - - - 达到最大重试次数。等待手动重连。 - 触发关机流程所需满足的条件 @@ -177,4 +168,13 @@ Ini 文件重命名为 {0}.old 参数无效 Indicate that a variable is unavailable + + ..\Resources\RepeatHS.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\disconnect2.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\internetconnection.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + \ No newline at end of file diff --git a/WinNUT_V2/WinNUT-Client/My Project/Resources.zh-TW.resx b/WinNUT_V2/WinNUT-Client/My Project/Resources.zh-TW.resx index 6af9c08..22b28cd 100644 --- a/WinNUT_V2/WinNUT-Client/My Project/Resources.zh-TW.resx +++ b/WinNUT_V2/WinNUT-Client/My Project/Resources.zh-TW.resx @@ -24,9 +24,6 @@ 正在重新連線 - - 重試第 {0} 次,共 {1} 次 - 未連線 @@ -93,12 +90,6 @@ 已與 NUT 伺服器中斷連線。 - - 重試連線 {0} / {1} - - - 已達最大重試次數,等待手動重新連線。 - 啟動停機程序的條件 @@ -117,4 +108,13 @@ ..\Resources\regedit.exe_14_100-0.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\RepeatHS.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\disconnect2.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\internetconnection.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + \ No newline at end of file diff --git a/WinNUT_V2/WinNUT-Client/Resources/RepeatHS.png b/WinNUT_V2/WinNUT-Client/Resources/RepeatHS.png new file mode 100644 index 0000000..1b6573d Binary files /dev/null and b/WinNUT_V2/WinNUT-Client/Resources/RepeatHS.png differ diff --git a/WinNUT_V2/WinNUT-Client/Resources/disconnect2.png b/WinNUT_V2/WinNUT-Client/Resources/disconnect2.png new file mode 100644 index 0000000..4261cce Binary files /dev/null and b/WinNUT_V2/WinNUT-Client/Resources/disconnect2.png differ diff --git a/WinNUT_V2/WinNUT-Client/Resources/internetconnection.png b/WinNUT_V2/WinNUT-Client/Resources/internetconnection.png new file mode 100644 index 0000000..1ccc04b Binary files /dev/null and b/WinNUT_V2/WinNUT-Client/Resources/internetconnection.png differ diff --git a/WinNUT_V2/WinNUT-Client/WinNUT-client.vbproj b/WinNUT_V2/WinNUT-Client/WinNUT-client.vbproj index 65049f4..da9fc48 100644 --- a/WinNUT_V2/WinNUT-Client/WinNUT-client.vbproj +++ b/WinNUT_V2/WinNUT-Client/WinNUT-client.vbproj @@ -470,7 +470,15 @@ - + + + + + + + + + diff --git a/WinNUT_V2/WinNUT-Client/WinNUT.Designer.vb b/WinNUT_V2/WinNUT-Client/WinNUT.Designer.vb index 4479ca2..2e8f118 100644 --- a/WinNUT_V2/WinNUT-Client/WinNUT.Designer.vb +++ b/WinNUT_V2/WinNUT-Client/WinNUT.Designer.vb @@ -39,8 +39,10 @@ Partial Class WinNUT Me.Menu_Quit = New System.Windows.Forms.ToolStripMenuItem() Me.ManageOldPrefsToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() Me.Menu_Connection = New System.Windows.Forms.ToolStripMenuItem() - Me.Menu_Reconnect = New System.Windows.Forms.ToolStripMenuItem() + Me.Menu_Connect = New System.Windows.Forms.ToolStripMenuItem() Me.Menu_Disconnect = New System.Windows.Forms.ToolStripMenuItem() + Me.ToolStripSeparator1 = New System.Windows.Forms.ToolStripSeparator() + Me.Menu_Persist = New System.Windows.Forms.ToolStripMenuItem() Me.Menu_Settings = New System.Windows.Forms.ToolStripMenuItem() Me.Menu_Help = New System.Windows.Forms.ToolStripMenuItem() Me.Menu_About = New System.Windows.Forms.ToolStripMenuItem() @@ -151,14 +153,14 @@ Partial Class WinNUT ' 'Menu_File ' - Me.Menu_File.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.Menu_UPS_Var, Me.Menu_Quit, Me.ManageOldPrefsToolStripMenuItem}) + Me.Menu_File.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.Menu_UPS_Var, Me.ManageOldPrefsToolStripMenuItem, Me.Menu_Quit}) Me.Menu_File.Name = "Menu_File" resources.ApplyResources(Me.Menu_File, "Menu_File") ' 'Menu_UPS_Var ' - Me.Menu_UPS_Var.Name = "Menu_UPS_Var" resources.ApplyResources(Me.Menu_UPS_Var, "Menu_UPS_Var") + Me.Menu_UPS_Var.Name = "Menu_UPS_Var" ' 'Menu_Quit ' @@ -173,19 +175,34 @@ Partial Class WinNUT ' 'Menu_Connection ' - Me.Menu_Connection.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.Menu_Reconnect, Me.Menu_Disconnect}) + Me.Menu_Connection.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.Menu_Persist, Me.ToolStripSeparator1, Me.Menu_Connect, Me.Menu_Disconnect}) Me.Menu_Connection.Name = "Menu_Connection" resources.ApplyResources(Me.Menu_Connection, "Menu_Connection") ' - 'Menu_Reconnect + 'Menu_Connect ' - Me.Menu_Reconnect.Name = "Menu_Reconnect" - resources.ApplyResources(Me.Menu_Reconnect, "Menu_Reconnect") + Me.Menu_Connect.Image = Global.WinNUT_Client.My.Resources.Resources.internetconnection + Me.Menu_Connect.Name = "Menu_Connect" + resources.ApplyResources(Me.Menu_Connect, "Menu_Connect") ' 'Menu_Disconnect ' - Me.Menu_Disconnect.Name = "Menu_Disconnect" resources.ApplyResources(Me.Menu_Disconnect, "Menu_Disconnect") + Me.Menu_Disconnect.Image = Global.WinNUT_Client.My.Resources.Resources.disconnect2 + Me.Menu_Disconnect.Name = "Menu_Disconnect" + ' + 'ToolStripSeparator1 + ' + Me.ToolStripSeparator1.Name = "ToolStripSeparator1" + resources.ApplyResources(Me.ToolStripSeparator1, "ToolStripSeparator1") + ' + 'Menu_Persist + ' + Me.Menu_Persist.Checked = Global.WinNUT_Client.My.MySettings.Default.NUT_AutoReconnect + Me.Menu_Persist.CheckOnClick = True + Me.Menu_Persist.Image = Global.WinNUT_Client.My.Resources.Resources.RepeatHS + Me.Menu_Persist.Name = "Menu_Persist" + resources.ApplyResources(Me.Menu_Persist, "Menu_Persist") ' 'Menu_Settings ' @@ -448,259 +465,151 @@ Partial Class WinNUT ' 'AG_InF ' - Me.AG_InF.BaseArcColor = System.Drawing.Color.Gray Me.AG_InF.BaseArcRadius = 45 - Me.AG_InF.BaseArcStart = 135 - Me.AG_InF.BaseArcSweep = 270 Me.AG_InF.BaseArcWidth = 5 - Me.AG_InF.GradientType = WinNUT_Client.Controls.UPSVarGauge.GradientTypeEnum.RedGreen Me.AG_InF.GradientOrientation = WinNUT_Client.Controls.UPSVarGauge.GradientOrientationEnum.BottomToTop + Me.AG_InF.GradientType = WinNUT_Client.Controls.UPSVarGauge.GradientTypeEnum.RedGreen resources.ApplyResources(Me.AG_InF, "AG_InF") - Me.AG_InF.MaxValue = 100.0! - Me.AG_InF.MinValue = 0! + Me.AG_InF.MaxValue = 100 + Me.AG_InF.MinValue = 0 Me.AG_InF.Name = "AG_InF" - Me.AG_InF.NeedleColor1 = AGaugeClassic.AGaugeNeedleColor.Gray - Me.AG_InF.NeedleColor2 = System.Drawing.Color.DimGray Me.AG_InF.NeedleRadius = 32 - Me.AG_InF.NeedleType = AGaugeClassic.NeedleType.Advance - Me.AG_InF.NeedleWidth = 2 - Me.AG_InF.ScaleLinesInterColor = System.Drawing.Color.Black Me.AG_InF.ScaleLinesInterInnerRadius = 40 Me.AG_InF.ScaleLinesInterOuterRadius = 48 - Me.AG_InF.ScaleLinesInterWidth = 1 - Me.AG_InF.ScaleLinesMajorColor = System.Drawing.Color.Black Me.AG_InF.ScaleLinesMajorInnerRadius = 40 Me.AG_InF.ScaleLinesMajorOuterRadius = 48 - Me.AG_InF.ScaleLinesMajorStepValue = 50.0! - Me.AG_InF.ScaleLinesMajorWidth = 2 - Me.AG_InF.ScaleLinesMinorColor = System.Drawing.Color.Gray Me.AG_InF.ScaleLinesMinorInnerRadius = 42 Me.AG_InF.ScaleLinesMinorOuterRadius = 48 - Me.AG_InF.ScaleLinesMinorTicks = 9 - Me.AG_InF.ScaleLinesMinorWidth = 1 - Me.AG_InF.ScaleNumbersColor = System.Drawing.Color.Black Me.AG_InF.ScaleNumbersFormat = Nothing Me.AG_InF.ScaleNumbersRadius = 60 - Me.AG_InF.ScaleNumbersRotation = 0 - Me.AG_InF.ScaleNumbersStartScaleLine = 0 - Me.AG_InF.ScaleNumbersStepScaleLines = 1 Me.AG_InF.UnitValue1 = WinNUT_Client.Controls.UPSVarGauge.UnitValueEnum.Hertz Me.AG_InF.UnitValue2 = WinNUT_Client.Controls.UPSVarGauge.UnitValueEnum.None + Me.AG_InF.Value = 0! Me.AG_InF.Value1 = 0! Me.AG_InF.Value2 = 0! ' 'AG_InV ' - Me.AG_InV.BaseArcColor = System.Drawing.Color.Gray Me.AG_InV.BaseArcRadius = 45 - Me.AG_InV.BaseArcStart = 135 - Me.AG_InV.BaseArcSweep = 270 Me.AG_InV.BaseArcWidth = 5 - Me.AG_InV.GradientType = WinNUT_Client.Controls.UPSVarGauge.GradientTypeEnum.RedGreen Me.AG_InV.GradientOrientation = WinNUT_Client.Controls.UPSVarGauge.GradientOrientationEnum.BottomToTop + Me.AG_InV.GradientType = WinNUT_Client.Controls.UPSVarGauge.GradientTypeEnum.RedGreen resources.ApplyResources(Me.AG_InV, "AG_InV") - Me.AG_InV.MaxValue = 100.0! - Me.AG_InV.MinValue = 0! + Me.AG_InV.MaxValue = 100 + Me.AG_InV.MinValue = 0 Me.AG_InV.Name = "AG_InV" - Me.AG_InV.NeedleColor1 = AGaugeClassic.AGaugeNeedleColor.Gray - Me.AG_InV.NeedleColor2 = System.Drawing.Color.DimGray Me.AG_InV.NeedleRadius = 32 - Me.AG_InV.NeedleType = AGaugeClassic.NeedleType.Advance - Me.AG_InV.NeedleWidth = 2 - Me.AG_InV.ScaleLinesInterColor = System.Drawing.Color.Black Me.AG_InV.ScaleLinesInterInnerRadius = 40 Me.AG_InV.ScaleLinesInterOuterRadius = 48 - Me.AG_InV.ScaleLinesInterWidth = 1 - Me.AG_InV.ScaleLinesMajorColor = System.Drawing.Color.Black Me.AG_InV.ScaleLinesMajorInnerRadius = 40 Me.AG_InV.ScaleLinesMajorOuterRadius = 48 - Me.AG_InV.ScaleLinesMajorStepValue = 50.0! - Me.AG_InV.ScaleLinesMajorWidth = 2 - Me.AG_InV.ScaleLinesMinorColor = System.Drawing.Color.Gray Me.AG_InV.ScaleLinesMinorInnerRadius = 42 Me.AG_InV.ScaleLinesMinorOuterRadius = 48 - Me.AG_InV.ScaleLinesMinorTicks = 9 - Me.AG_InV.ScaleLinesMinorWidth = 1 - Me.AG_InV.ScaleNumbersColor = System.Drawing.Color.Black Me.AG_InV.ScaleNumbersFormat = Nothing Me.AG_InV.ScaleNumbersRadius = 60 - Me.AG_InV.ScaleNumbersRotation = 0 - Me.AG_InV.ScaleNumbersStartScaleLine = 0 - Me.AG_InV.ScaleNumbersStepScaleLines = 1 Me.AG_InV.UnitValue1 = WinNUT_Client.Controls.UPSVarGauge.UnitValueEnum.Volts Me.AG_InV.UnitValue2 = WinNUT_Client.Controls.UPSVarGauge.UnitValueEnum.None + Me.AG_InV.Value = 0! Me.AG_InV.Value1 = 0! Me.AG_InV.Value2 = 0! ' 'AG_BattV ' - Me.AG_BattV.BaseArcColor = System.Drawing.Color.Gray Me.AG_BattV.BaseArcRadius = 45 - Me.AG_BattV.BaseArcStart = 135 - Me.AG_BattV.BaseArcSweep = 270 Me.AG_BattV.BaseArcWidth = 5 - Me.AG_BattV.GradientType = WinNUT_Client.Controls.UPSVarGauge.GradientTypeEnum.RedGreen Me.AG_BattV.GradientOrientation = WinNUT_Client.Controls.UPSVarGauge.GradientOrientationEnum.BottomToTop + Me.AG_BattV.GradientType = WinNUT_Client.Controls.UPSVarGauge.GradientTypeEnum.RedGreen resources.ApplyResources(Me.AG_BattV, "AG_BattV") - Me.AG_BattV.MaxValue = 100.0! - Me.AG_BattV.MinValue = 0! + Me.AG_BattV.MaxValue = 100 + Me.AG_BattV.MinValue = 0 Me.AG_BattV.Name = "AG_BattV" - Me.AG_BattV.NeedleColor1 = AGaugeClassic.AGaugeNeedleColor.Gray - Me.AG_BattV.NeedleColor2 = System.Drawing.Color.DimGray Me.AG_BattV.NeedleRadius = 32 - Me.AG_BattV.NeedleType = AGaugeClassic.NeedleType.Advance - Me.AG_BattV.NeedleWidth = 2 - Me.AG_BattV.ScaleLinesInterColor = System.Drawing.Color.Black Me.AG_BattV.ScaleLinesInterInnerRadius = 40 Me.AG_BattV.ScaleLinesInterOuterRadius = 48 - Me.AG_BattV.ScaleLinesInterWidth = 1 - Me.AG_BattV.ScaleLinesMajorColor = System.Drawing.Color.Black Me.AG_BattV.ScaleLinesMajorInnerRadius = 40 Me.AG_BattV.ScaleLinesMajorOuterRadius = 48 - Me.AG_BattV.ScaleLinesMajorStepValue = 50.0! - Me.AG_BattV.ScaleLinesMajorWidth = 2 - Me.AG_BattV.ScaleLinesMinorColor = System.Drawing.Color.Gray Me.AG_BattV.ScaleLinesMinorInnerRadius = 42 Me.AG_BattV.ScaleLinesMinorOuterRadius = 48 - Me.AG_BattV.ScaleLinesMinorTicks = 9 - Me.AG_BattV.ScaleLinesMinorWidth = 1 - Me.AG_BattV.ScaleNumbersColor = System.Drawing.Color.Black Me.AG_BattV.ScaleNumbersFormat = Nothing Me.AG_BattV.ScaleNumbersRadius = 60 - Me.AG_BattV.ScaleNumbersRotation = 0 - Me.AG_BattV.ScaleNumbersStartScaleLine = 0 - Me.AG_BattV.ScaleNumbersStepScaleLines = 1 Me.AG_BattV.UnitValue1 = WinNUT_Client.Controls.UPSVarGauge.UnitValueEnum.Volts Me.AG_BattV.UnitValue2 = WinNUT_Client.Controls.UPSVarGauge.UnitValueEnum.None + Me.AG_BattV.Value = 0! Me.AG_BattV.Value1 = 0! Me.AG_BattV.Value2 = 0! ' 'AG_Load ' - Me.AG_Load.BaseArcColor = System.Drawing.Color.Gray Me.AG_Load.BaseArcRadius = 45 - Me.AG_Load.BaseArcStart = 135 - Me.AG_Load.BaseArcSweep = 270 Me.AG_Load.BaseArcWidth = 5 - Me.AG_Load.GradientType = WinNUT_Client.Controls.UPSVarGauge.GradientTypeEnum.RedGreen Me.AG_Load.GradientOrientation = WinNUT_Client.Controls.UPSVarGauge.GradientOrientationEnum.RightToLeft + Me.AG_Load.GradientType = WinNUT_Client.Controls.UPSVarGauge.GradientTypeEnum.RedGreen resources.ApplyResources(Me.AG_Load, "AG_Load") - Me.AG_Load.MaxValue = 100.0! - Me.AG_Load.MinValue = 0! + Me.AG_Load.MaxValue = 100 + Me.AG_Load.MinValue = 0 Me.AG_Load.Name = "AG_Load" - Me.AG_Load.NeedleColor1 = AGaugeClassic.AGaugeNeedleColor.Gray - Me.AG_Load.NeedleColor2 = System.Drawing.Color.DimGray Me.AG_Load.NeedleRadius = 32 - Me.AG_Load.NeedleType = AGaugeClassic.NeedleType.Advance - Me.AG_Load.NeedleWidth = 2 - Me.AG_Load.ScaleLinesInterColor = System.Drawing.Color.Black Me.AG_Load.ScaleLinesInterInnerRadius = 40 Me.AG_Load.ScaleLinesInterOuterRadius = 48 - Me.AG_Load.ScaleLinesInterWidth = 1 - Me.AG_Load.ScaleLinesMajorColor = System.Drawing.Color.Black Me.AG_Load.ScaleLinesMajorInnerRadius = 40 Me.AG_Load.ScaleLinesMajorOuterRadius = 48 - Me.AG_Load.ScaleLinesMajorStepValue = 50.0! - Me.AG_Load.ScaleLinesMajorWidth = 2 - Me.AG_Load.ScaleLinesMinorColor = System.Drawing.Color.Gray Me.AG_Load.ScaleLinesMinorInnerRadius = 42 Me.AG_Load.ScaleLinesMinorOuterRadius = 48 - Me.AG_Load.ScaleLinesMinorTicks = 9 - Me.AG_Load.ScaleLinesMinorWidth = 1 - Me.AG_Load.ScaleNumbersColor = System.Drawing.Color.Black Me.AG_Load.ScaleNumbersFormat = Nothing Me.AG_Load.ScaleNumbersRadius = 60 - Me.AG_Load.ScaleNumbersRotation = 0 - Me.AG_Load.ScaleNumbersStartScaleLine = 0 - Me.AG_Load.ScaleNumbersStepScaleLines = 1 Me.AG_Load.UnitValue1 = WinNUT_Client.Controls.UPSVarGauge.UnitValueEnum.Percent Me.AG_Load.UnitValue2 = WinNUT_Client.Controls.UPSVarGauge.UnitValueEnum.Watts + Me.AG_Load.Value = 0! Me.AG_Load.Value1 = 0! Me.AG_Load.Value2 = 0! ' 'AG_OutV ' - Me.AG_OutV.BaseArcColor = System.Drawing.Color.Gray Me.AG_OutV.BaseArcRadius = 45 - Me.AG_OutV.BaseArcStart = 135 - Me.AG_OutV.BaseArcSweep = 270 Me.AG_OutV.BaseArcWidth = 5 - Me.AG_OutV.GradientType = WinNUT_Client.Controls.UPSVarGauge.GradientTypeEnum.RedGreen Me.AG_OutV.GradientOrientation = WinNUT_Client.Controls.UPSVarGauge.GradientOrientationEnum.BottomToTop + Me.AG_OutV.GradientType = WinNUT_Client.Controls.UPSVarGauge.GradientTypeEnum.RedGreen resources.ApplyResources(Me.AG_OutV, "AG_OutV") - Me.AG_OutV.MaxValue = 100.0! - Me.AG_OutV.MinValue = 0! + Me.AG_OutV.MaxValue = 100 + Me.AG_OutV.MinValue = 0 Me.AG_OutV.Name = "AG_OutV" - Me.AG_OutV.NeedleColor1 = AGaugeClassic.AGaugeNeedleColor.Gray - Me.AG_OutV.NeedleColor2 = System.Drawing.Color.DimGray Me.AG_OutV.NeedleRadius = 32 - Me.AG_OutV.NeedleType = AGaugeClassic.NeedleType.Advance - Me.AG_OutV.NeedleWidth = 2 - Me.AG_OutV.ScaleLinesInterColor = System.Drawing.Color.Black Me.AG_OutV.ScaleLinesInterInnerRadius = 40 Me.AG_OutV.ScaleLinesInterOuterRadius = 48 - Me.AG_OutV.ScaleLinesInterWidth = 1 - Me.AG_OutV.ScaleLinesMajorColor = System.Drawing.Color.Black Me.AG_OutV.ScaleLinesMajorInnerRadius = 40 Me.AG_OutV.ScaleLinesMajorOuterRadius = 48 - Me.AG_OutV.ScaleLinesMajorStepValue = 50.0! - Me.AG_OutV.ScaleLinesMajorWidth = 2 - Me.AG_OutV.ScaleLinesMinorColor = System.Drawing.Color.Gray Me.AG_OutV.ScaleLinesMinorInnerRadius = 42 Me.AG_OutV.ScaleLinesMinorOuterRadius = 48 - Me.AG_OutV.ScaleLinesMinorTicks = 9 - Me.AG_OutV.ScaleLinesMinorWidth = 1 - Me.AG_OutV.ScaleNumbersColor = System.Drawing.Color.Black Me.AG_OutV.ScaleNumbersFormat = Nothing Me.AG_OutV.ScaleNumbersRadius = 60 - Me.AG_OutV.ScaleNumbersRotation = 0 - Me.AG_OutV.ScaleNumbersStartScaleLine = 0 - Me.AG_OutV.ScaleNumbersStepScaleLines = 1 Me.AG_OutV.UnitValue1 = WinNUT_Client.Controls.UPSVarGauge.UnitValueEnum.Volts Me.AG_OutV.UnitValue2 = WinNUT_Client.Controls.UPSVarGauge.UnitValueEnum.None + Me.AG_OutV.Value = 0! Me.AG_OutV.Value1 = 0! Me.AG_OutV.Value2 = 0! ' 'AG_BattCh ' - Me.AG_BattCh.BaseArcColor = System.Drawing.Color.Gray Me.AG_BattCh.BaseArcRadius = 45 - Me.AG_BattCh.BaseArcStart = 135 - Me.AG_BattCh.BaseArcSweep = 270 Me.AG_BattCh.BaseArcWidth = 5 - Me.AG_BattCh.GradientType = WinNUT_Client.Controls.UPSVarGauge.GradientTypeEnum.RedGreen Me.AG_BattCh.GradientOrientation = WinNUT_Client.Controls.UPSVarGauge.GradientOrientationEnum.LeftToRight + Me.AG_BattCh.GradientType = WinNUT_Client.Controls.UPSVarGauge.GradientTypeEnum.RedGreen resources.ApplyResources(Me.AG_BattCh, "AG_BattCh") - Me.AG_BattCh.MaxValue = 100.0! - Me.AG_BattCh.MinValue = 0! + Me.AG_BattCh.MaxValue = 100 + Me.AG_BattCh.MinValue = 0 Me.AG_BattCh.Name = "AG_BattCh" - Me.AG_BattCh.NeedleColor1 = AGaugeClassic.AGaugeNeedleColor.Gray - Me.AG_BattCh.NeedleColor2 = System.Drawing.Color.DimGray Me.AG_BattCh.NeedleRadius = 32 - Me.AG_BattCh.NeedleType = AGaugeClassic.NeedleType.Advance - Me.AG_BattCh.NeedleWidth = 2 - Me.AG_BattCh.ScaleLinesInterColor = System.Drawing.Color.Black Me.AG_BattCh.ScaleLinesInterInnerRadius = 40 Me.AG_BattCh.ScaleLinesInterOuterRadius = 48 - Me.AG_BattCh.ScaleLinesInterWidth = 1 - Me.AG_BattCh.ScaleLinesMajorColor = System.Drawing.Color.Black Me.AG_BattCh.ScaleLinesMajorInnerRadius = 40 Me.AG_BattCh.ScaleLinesMajorOuterRadius = 48 - Me.AG_BattCh.ScaleLinesMajorStepValue = 50.0! - Me.AG_BattCh.ScaleLinesMajorWidth = 2 - Me.AG_BattCh.ScaleLinesMinorColor = System.Drawing.Color.Gray Me.AG_BattCh.ScaleLinesMinorInnerRadius = 42 Me.AG_BattCh.ScaleLinesMinorOuterRadius = 48 - Me.AG_BattCh.ScaleLinesMinorTicks = 9 - Me.AG_BattCh.ScaleLinesMinorWidth = 1 - Me.AG_BattCh.ScaleNumbersColor = System.Drawing.Color.Black Me.AG_BattCh.ScaleNumbersFormat = Nothing Me.AG_BattCh.ScaleNumbersRadius = 60 - Me.AG_BattCh.ScaleNumbersRotation = 0 - Me.AG_BattCh.ScaleNumbersStartScaleLine = 0 - Me.AG_BattCh.ScaleNumbersStepScaleLines = 1 Me.AG_BattCh.UnitValue1 = WinNUT_Client.Controls.UPSVarGauge.UnitValueEnum.Percent Me.AG_BattCh.UnitValue2 = WinNUT_Client.Controls.UPSVarGauge.UnitValueEnum.None + Me.AG_BattCh.Value = 0! Me.AG_BattCh.Value1 = 0! Me.AG_BattCh.Value2 = 0! ' @@ -756,7 +665,7 @@ Partial Class WinNUT Friend WithEvents Menu_About As ToolStripMenuItem Friend WithEvents Menu_Help_Sep1 As ToolStripSeparator Friend WithEvents Menu_Update As ToolStripMenuItem - Friend WithEvents Menu_Reconnect As ToolStripMenuItem + Friend WithEvents Menu_Connect As ToolStripMenuItem Friend WithEvents Menu_Disconnect As ToolStripMenuItem Friend WithEvents ContextMenu_Systray As ContextMenuStrip Friend WithEvents Menu_Sys_Settings As ToolStripMenuItem @@ -806,4 +715,6 @@ Partial Class WinNUT Friend WithEvents CB_CurrentLog As ComboBox Friend WithEvents PBox_Battery_State As PictureBox Friend WithEvents ManageOldPrefsToolStripMenuItem As ToolStripMenuItem + Friend WithEvents ToolStripSeparator1 As ToolStripSeparator + Friend WithEvents Menu_Persist As ToolStripMenuItem End Class diff --git a/WinNUT_V2/WinNUT-Client/WinNUT.de-DE.resx b/WinNUT_V2/WinNUT-Client/WinNUT.de-DE.resx index add3238..990109b 100644 --- a/WinNUT_V2/WinNUT-Client/WinNUT.de-DE.resx +++ b/WinNUT_V2/WinNUT-Client/WinNUT.de-DE.resx @@ -21,9 +21,6 @@ Datei - - Erneut verbinden - Verbindung trennen @@ -102,4 +99,43 @@ False + + 177, 22 + + + 180, 22 + + + + + + + + + + + + + + + + + + + + + 177, 6 + + + 180, 22 + + + False + + + NoControl + + + False + \ No newline at end of file diff --git a/WinNUT_V2/WinNUT-Client/WinNUT.fr-FR.resx b/WinNUT_V2/WinNUT-Client/WinNUT.fr-FR.resx index af5263e..e29ad5c 100644 --- a/WinNUT_V2/WinNUT-Client/WinNUT.fr-FR.resx +++ b/WinNUT_V2/WinNUT-Client/WinNUT.fr-FR.resx @@ -21,9 +21,6 @@ Fichier - - Re-Connecter - Déconnecter @@ -102,4 +99,43 @@ False + + 177, 22 + + + 180, 22 + + + + + + + + + + + + + + + + + + + + + 177, 6 + + + 180, 22 + + + False + + + NoControl + + + False + \ No newline at end of file diff --git a/WinNUT_V2/WinNUT-Client/WinNUT.resx b/WinNUT_V2/WinNUT-Client/WinNUT.resx index 37ea6c8..4f951cd 100644 --- a/WinNUT_V2/WinNUT-Client/WinNUT.resx +++ b/WinNUT_V2/WinNUT-Client/WinNUT.resx @@ -124,6 +124,22 @@ 364, 17 + + 145, 110 + + + ContextMenu_Systray + + + System.Windows.Forms.ContextMenuStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + NotifyIcon1 + + + + True + 144, 22 @@ -157,22 +173,6 @@ Exit - - 145, 110 - - - ContextMenu_Systray - - - System.Windows.Forms.ContextMenuStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - NotifyIcon1 - - - - True - 248, 17 @@ -186,18 +186,15 @@ None + + False + 180, 22 UPS Variable - - 180, 22 - - - Exit - False @@ -205,29 +202,23 @@ - 180, 22 + 177, 22 Manage Old Prefs... + + 177, 22 + + + Exit + 37, 20 File - - 133, 22 - - - Reconnect - - - 133, 22 - - - Disconnect - 81, 20 @@ -240,21 +231,6 @@ Settings - - 144, 22 - - - About - - - 141, 6 - - - 144, 22 - - - Verify Update - 44, 20 @@ -268,7 +244,7 @@ 0, 24 - 351, 24 + 231, 24 0 @@ -288,41 +264,53 @@ 9 - - True - - - Left + + 180, 22 - - None + + Connect - - Microsoft Sans Serif, 8.25pt, style=Bold + + False - - NoControl + + 180, 22 - - 6, 228 + + Disconnect - - 0, 0, 0, 0 + + 177, 6 - - 164, 13 + + 180, 22 - - 164, 13 + + Persist - - 164, 13 + + 144, 22 - - 17 + + About - - MiddleCenter + + 141, 6 + + + 144, 22 + + + Verify Update + + + True + + + Left + + + None Lbl_VSerial @@ -336,33 +324,6 @@ 0 - - Microsoft Sans Serif, 8.25pt, style=Bold - - - NoControl - - - 6, 260 - - - 0, 0, 0, 0 - - - 164, 13 - - - 164, 13 - - - 164, 13 - - - 16 - - - MiddleCenter - Lbl_VFirmware @@ -375,33 +336,6 @@ 1 - - Microsoft Sans Serif, 8.25pt, style=Bold - - - NoControl - - - 6, 196 - - - 0, 0, 0, 0 - - - 164, 13 - - - 164, 13 - - - 164, 13 - - - 15 - - - MiddleCenter - Lbl_VName @@ -414,33 +348,6 @@ 2 - - Microsoft Sans Serif, 8.25pt, style=Bold - - - NoControl - - - 6, 164 - - - 0, 0, 0, 0 - - - 164, 13 - - - 164, 13 - - - 164, 13 - - - 14 - - - MiddleCenter - Lbl_VMfr @@ -453,33 +360,6 @@ 3 - - Microsoft Sans Serif, 8.25pt, style=Bold - - - NoControl - - - 6, 132 - - - 0, 0, 0, 0 - - - 164, 13 - - - 164, 13 - - - 164, 13 - - - 13 - - - MiddleCenter - Lbl_VRTime @@ -492,21 +372,6 @@ 4 - - NoControl - - - 150, 44 - - - 16, 16 - - - 16, 16 - - - 12 - Lbl_VOB @@ -519,48 +384,18 @@ 5 - - NoControl + + Lbl_VOLoad - - 150, 68 + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 16, 16 - - - 16, 16 - - - 11 - - - Lbl_VOLoad - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - GB_Status + + GB_Status 6 - - NoControl - - - 150, 92 - - - 16, 16 - - - 16, 16 - - - 10 - Lbl_VBL @@ -573,21 +408,6 @@ 7 - - NoControl - - - 150, 20 - - - 16, 16 - - - 16, 16 - - - 9 - Lbl_VOL @@ -600,30 +420,6 @@ 8 - - NoControl - - - 6, 244 - - - 0, 0, 0, 0 - - - 164, 13 - - - 164, 13 - - - 164, 13 - - - 8 - - - Firmware : - Lbl_Firmware @@ -636,30 +432,6 @@ 9 - - NoControl - - - 6, 212 - - - 0, 0, 0, 0 - - - 164, 13 - - - 164, 13 - - - 164, 13 - - - 7 - - - Serial : - Lbl_Serial @@ -672,30 +444,6 @@ 10 - - NoControl - - - 6, 180 - - - 0, 0, 0, 0 - - - 164, 13 - - - 164, 13 - - - 164, 13 - - - 6 - - - Name : - Lbl_Name @@ -708,30 +456,6 @@ 11 - - NoControl - - - 6, 148 - - - 0, 0, 0, 0 - - - 164, 13 - - - 164, 13 - - - 164, 13 - - - 5 - - - Manufacturer : - Lbl_Mfr @@ -744,30 +468,6 @@ 12 - - NoControl - - - 6, 116 - - - 0, 0, 0, 0 - - - 164, 13 - - - 164, 13 - - - 164, 13 - - - 4 - - - Remaining Time : - Lbl_RTime @@ -780,27 +480,6 @@ 13 - - NoControl - - - 6, 92 - - - 140, 13 - - - 140, 13 - - - 140, 13 - - - 3 - - - UPS Battery Low - Lbl_BL @@ -813,27 +492,6 @@ 14 - - NoControl - - - 6, 68 - - - 140, 13 - - - 140, 13 - - - 140, 13 - - - 2 - - - UPS Overload - Lbl_OLoad @@ -846,27 +504,6 @@ 15 - - NoControl - - - 6, 44 - - - 140, 13 - - - 140, 13 - - - 140, 13 - - - 1 - - - UPS On Battery - Lbl_OB @@ -879,27 +516,6 @@ 16 - - NoControl - - - 6, 20 - - - 140, 13 - - - 140, 13 - - - 140, 13 - - - 0 - - - UPS On Line - Lbl_OL @@ -939,59 +555,638 @@ 7 - - True - - - Left + + Microsoft Sans Serif, 8.25pt, style=Bold - - 6, 26 + + NoControl + + + 6, 228 + + + 0, 0, 0, 0 + + + 164, 13 + + + 164, 13 + + + 164, 13 + + + 17 + + + MiddleCenter + + + Lbl_VSerial + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + GB_Status + + + 0 + + + Microsoft Sans Serif, 8.25pt, style=Bold + + + NoControl + + + 6, 260 + + + 0, 0, 0, 0 + + + 164, 13 + + + 164, 13 + + + 164, 13 + + + 16 + + + MiddleCenter + + + Lbl_VFirmware + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + GB_Status + + + 1 + + + Microsoft Sans Serif, 8.25pt, style=Bold + + + NoControl + + + 6, 196 + + + 0, 0, 0, 0 + + + 164, 13 + + + 164, 13 + + + 164, 13 + + + 15 + + + MiddleCenter + + + Lbl_VName + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + GB_Status + + + 2 + + + Microsoft Sans Serif, 8.25pt, style=Bold + + + NoControl + + + 6, 164 + + + 0, 0, 0, 0 + + + 164, 13 + + + 164, 13 + + + 164, 13 + + + 14 + + + MiddleCenter + + + Lbl_VMfr + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + GB_Status + + + 3 + + + Microsoft Sans Serif, 8.25pt, style=Bold + + + NoControl + + + 6, 132 + + + 0, 0, 0, 0 + + + 164, 13 + + + 164, 13 + + + 164, 13 + + + 13 + + + MiddleCenter + + + Lbl_VRTime + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + GB_Status + + + 4 + + + NoControl + + + 150, 44 + + + 16, 16 + + + 16, 16 + + + 12 + + + Lbl_VOB + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + GB_Status + + + 5 + + + NoControl + + + 150, 68 + + + 16, 16 + + + 16, 16 + + + 11 + + + Lbl_VOLoad + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + GB_Status + + + 6 + + + NoControl + + + 150, 92 + + + 16, 16 + + + 16, 16 + + + 10 + + + Lbl_VBL + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + GB_Status + + + 7 + + + NoControl + + + 150, 20 + + + 16, 16 + + + 16, 16 + + + 9 + + + Lbl_VOL + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + GB_Status + + + 8 + + + NoControl + + + 6, 244 + + + 0, 0, 0, 0 + + + 164, 13 + + + 164, 13 + + + 164, 13 + + + 8 + + + Firmware : + + + Lbl_Firmware + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + GB_Status + + + 9 + + + NoControl + + + 6, 212 + + + 0, 0, 0, 0 + + + 164, 13 + + + 164, 13 + + + 164, 13 + + + 7 + + + Serial : + + + Lbl_Serial + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + GB_Status + + + 10 + + + NoControl + + + 6, 180 + + + 0, 0, 0, 0 + + + 164, 13 + + + 164, 13 + + + 164, 13 + + + 6 + + + Name : + + + Lbl_Name + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + GB_Status + + + 11 + + + NoControl + + + 6, 148 + + + 0, 0, 0, 0 + + + 164, 13 + + + 164, 13 + + + 164, 13 + + + 5 + + + Manufacturer : + + + Lbl_Mfr + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + GB_Status + + + 12 + + + NoControl + + + 6, 116 + + + 0, 0, 0, 0 + + + 164, 13 + + + 164, 13 + + + 164, 13 + + + 4 + + + Remaining Time : + + + Lbl_RTime + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + GB_Status + + + 13 + + + NoControl + + + 6, 92 + + + 140, 13 + + + 140, 13 + + + 140, 13 + + + 3 + + + UPS Battery Low + + + Lbl_BL - - 148, 130 + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + + GB_Status + + + 14 + + + NoControl + + + 6, 68 + + + 140, 13 + + + 140, 13 + + + 140, 13 + + + 2 + + + UPS Overload + + + Lbl_OLoad + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + GB_Status + + + 15 + + + NoControl + + + 6, 44 + + + 140, 13 + + + 140, 13 + + + 140, 13 + + 1 - - AG_InV + + UPS On Battery - - System.Windows.Forms.AGauge, AGauge, Version=2.1.8814.30445, Culture=neutral, PublicKeyToken=null + + Lbl_OB - - GB_InV_Dial + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 0 + + GB_Status - - True + + 16 - + NoControl - - 4, 10 + + 6, 20 - - 152, 13 + + 140, 13 - - 152, 13 + + 140, 13 - - 152, 13 + + 140, 13 - + 0 - - Input Voltage + + UPS On Line - - MiddleCenter + + Lbl_OL + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + GB_Status + + + 17 + + + True + + + Left + + + AG_InV + + + WinNUT_Client.Controls.UPSVarGauge, WinNUT-Client, Version=2.3.8972.25554, Culture=neutral, PublicKeyToken=null + + + GB_InV_Dial + + + 0 Lbl_InV_Dial @@ -1026,32 +1221,56 @@ 3 - + True - - - Left - - 6, 26 + + NoControl - - 148, 130 + + 4, 10 - - 148, 130 + + 152, 13 - - 148, 130 + + 152, 13 - + + 152, 13 + + + 0 + + + Input Voltage + + + MiddleCenter + + + Lbl_InV_Dial + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + GB_InV_Dial + + 1 + + True + + + Left + AG_OutV - System.Windows.Forms.AGauge, AGauge, Version=2.1.8814.30445, Culture=neutral, PublicKeyToken=null + WinNUT_Client.Controls.UPSVarGauge, WinNUT-Client, Version=2.3.8972.25554, Culture=neutral, PublicKeyToken=null GB_OutV_Dial @@ -1059,6 +1278,39 @@ 0 + + Lbl_OutV_Dial + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + GB_OutV_Dial + + + 1 + + + 532, 27 + + + 160, 160 + + + 4 + + + GB_OutV_Dial + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 6 + True @@ -1095,35 +1347,71 @@ GB_OutV_Dial - - 1 + + 1 + + + True + + + Left + + + PBox_Battery_State + + + System.Windows.Forms.PictureBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + GB_BattCh_Dial + + + 0 + + + Lbl_BattCh_Dial + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + GB_BattCh_Dial + + + 1 + + + AG_BattCh + + + WinNUT_Client.Controls.UPSVarGauge, WinNUT-Client, Version=2.3.8972.25554, Culture=neutral, PublicKeyToken=null + + + GB_BattCh_Dial + + + 2 - - 532, 27 + + 200, 188 - + 160, 160 - - 4 + + 3 - - GB_OutV_Dial + + GB_BattCh_Dial - + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + $this - - 6 - - - True - - - Left + + 8 NoControl @@ -1188,86 +1476,56 @@ 1 - - 6, 27 + + True + + + Left - - 148, 130 + + AG_Load - - 148, 130 + + WinNUT_Client.Controls.UPSVarGauge, WinNUT-Client, Version=2.3.8972.25554, Culture=neutral, PublicKeyToken=null - - 148, 130 + + GB_Load_Dial - - 1 + + 0 - - AG_BattCh + + Lbl_Load_Dial - - System.Windows.Forms.AGauge, AGauge, Version=2.1.8814.30445, Culture=neutral, PublicKeyToken=null + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - GB_BattCh_Dial + + GB_Load_Dial - - 2 + + 1 - - 200, 188 + + 366, 188 - + 160, 160 - - 3 + + 4 - - GB_BattCh_Dial + + GB_Load_Dial - + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + $this - - 8 - - - True - - - Left - - - 6, 26 - - - 148, 130 - - - 148, 130 - - - 148, 130 - - - 1 - - - AG_Load - - - System.Windows.Forms.AGauge, AGauge, Version=2.1.8814.30445, Culture=neutral, PublicKeyToken=null - - - GB_Load_Dial - - - 0 + + 5 True @@ -1308,125 +1566,215 @@ 1 - - 366, 188 + + True + + + Left - + + AG_BattV + + + WinNUT_Client.Controls.UPSVarGauge, WinNUT-Client, Version=2.3.8972.25554, Culture=neutral, PublicKeyToken=null + + + GB_BattV_Dial + + + 0 + + + Lbl_BattV_Dial + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + GB_BattV_Dial + + + 1 + + + 532, 188 + + 160, 160 - - 4 + + 5 - - GB_Load_Dial + + GB_BattV_Dial - + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + $this - - 5 + + 4 - + + True + + + NoControl + + + 4, 10 + + + 152, 13 + + + 152, 13 + + + 152, 13 + + + 0 + + + Battery Voltage + + + MiddleCenter + + + Lbl_BattV_Dial + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + GB_BattV_Dial + + + 1 + + True - + Left - - 6, 26 + + AG_InF - - 148, 130 + + WinNUT_Client.Controls.UPSVarGauge, WinNUT-Client, Version=2.3.8972.25554, Culture=neutral, PublicKeyToken=null - - 148, 130 + + GB_InF_Dial - - 148, 130 + + 0 - + + Lbl_InF_Dial + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + GB_InF_Dial + + 1 - - AG_BattV + + 366, 27 + + + 160, 160 + + + 5 + + + GB_InF_Dial - - System.Windows.Forms.AGauge, AGauge, Version=2.1.8814.30445, Culture=neutral, PublicKeyToken=null + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - GB_BattV_Dial + + $this - - 0 + + 2 - + True - + NoControl - + 4, 10 - + 152, 13 - + 152, 13 - + 152, 13 - + 0 - - Battery Voltage + + Frequency - + MiddleCenter - - Lbl_BattV_Dial + + Lbl_InF_Dial - + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - GB_BattV_Dial + + GB_InF_Dial - + 1 - - 532, 188 + + True + + + 12, 356 - - 160, 160 + + 680, 0 - - 5 + + 680, 0 - - GB_BattV_Dial + + 680, 21 - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 6 - - $this + + CB_CurrentLog - - 4 + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - True - - - Left + + $this + + + 1 6, 26 @@ -1443,11 +1791,14 @@ 1 + + + AG_InF - System.Windows.Forms.AGauge, AGauge, Version=2.1.8814.30445, Culture=neutral, PublicKeyToken=null + WinNUT_Client.Controls.UPSVarGauge, WinNUT-Client, Version=2.3.8972.25578, Culture=neutral, PublicKeyToken=null GB_InF_Dial @@ -1455,96 +1806,150 @@ 0 - - True + + 6, 26 - - NoControl + + 148, 130 - - 4, 10 + + 1 - - 152, 13 + + - - 152, 13 + + AG_InV - - 152, 13 + + WinNUT_Client.Controls.UPSVarGauge, WinNUT-Client, Version=2.3.8972.25578, Culture=neutral, PublicKeyToken=null - + + GB_InV_Dial + + 0 - - Frequency + + 6, 26 - - MiddleCenter + + 148, 130 - - Lbl_InF_Dial + + 148, 130 - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 148, 130 - - GB_InF_Dial + + 1 - + + + + + AG_BattV + + + WinNUT_Client.Controls.UPSVarGauge, WinNUT-Client, Version=2.3.8972.25578, Culture=neutral, PublicKeyToken=null + + + GB_BattV_Dial + + + 0 + + + 6, 26 + + + 148, 130 + + + 148, 130 + + + 148, 130 + + 1 - - 366, 27 + + - - 160, 160 + + AG_Load - - 5 + + WinNUT_Client.Controls.UPSVarGauge, WinNUT-Client, Version=2.3.8972.25578, Culture=neutral, PublicKeyToken=null - - GB_InF_Dial + + GB_Load_Dial - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 0 - - $this + + 6, 26 - - 2 + + 148, 130 - - True - - - 12, 356 + + 148, 130 - - 680, 0 + + 148, 130 - - 680, 0 + + 1 - - 680, 21 + + - - 6 + + AG_OutV - - CB_CurrentLog + + WinNUT_Client.Controls.UPSVarGauge, WinNUT-Client, Version=2.3.8972.25578, Culture=neutral, PublicKeyToken=null - - System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + GB_OutV_Dial - - $this + + 0 - + + 6, 27 + + + 148, 130 + + + 148, 130 + + + 148, 130 + + 1 + + + + + AG_BattCh + + + WinNUT_Client.Controls.UPSVarGauge, WinNUT-Client, Version=2.3.8972.25578, Culture=neutral, PublicKeyToken=null + + + GB_BattCh_Dial + + + 2 + True @@ -1557,6 +1962,9 @@ 704, 381 + + NoControl + 720, 420 @@ -1644,10 +2052,10 @@ System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - Menu_Reconnect + + Menu_Connect - + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 @@ -1656,6 +2064,18 @@ System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + ToolStripSeparator1 + + + System.Windows.Forms.ToolStripSeparator, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Menu_Persist + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + Menu_Settings diff --git a/WinNUT_V2/WinNUT-Client/WinNUT.ru-RU.resx b/WinNUT_V2/WinNUT-Client/WinNUT.ru-RU.resx index 89180d3..06c87ae 100644 --- a/WinNUT_V2/WinNUT-Client/WinNUT.ru-RU.resx +++ b/WinNUT_V2/WinNUT-Client/WinNUT.ru-RU.resx @@ -33,9 +33,6 @@ Файл - - Переподключиться - Отключиться @@ -102,4 +99,43 @@ False + + 177, 22 + + + 180, 22 + + + + + + + + + + + + + + + + + + + + + 177, 6 + + + 180, 22 + + + False + + + NoControl + + + False + \ No newline at end of file diff --git a/WinNUT_V2/WinNUT-Client/WinNUT.uk-UA.resx b/WinNUT_V2/WinNUT-Client/WinNUT.uk-UA.resx index 4beea94..ee90ec2 100644 --- a/WinNUT_V2/WinNUT-Client/WinNUT.uk-UA.resx +++ b/WinNUT_V2/WinNUT-Client/WinNUT.uk-UA.resx @@ -33,9 +33,6 @@ Файл - - Перепідключитись - Відключитись @@ -99,7 +96,46 @@ Частота + + 177, 22 + Керування старими налаштуваннями... + + 180, 22 + + + + + + + + + + + + + + + + + + + + + 177, 6 + + + 180, 22 + + + False + + + NoControl + + + False + \ No newline at end of file diff --git a/WinNUT_V2/WinNUT-Client/WinNUT.vb b/WinNUT_V2/WinNUT-Client/WinNUT.vb index 1cab472..38627ca 100644 --- a/WinNUT_V2/WinNUT-Client/WinNUT.vb +++ b/WinNUT_V2/WinNUT-Client/WinNUT.vb @@ -7,6 +7,8 @@ ' ' This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY +Imports System.ComponentModel +Imports Microsoft.Win32 Imports WinNUT_Client_Common Public Class WinNUT @@ -24,16 +26,17 @@ Public Class WinNUT End Get End Property + Private ReadOnly Property IsUPSConnected As Boolean + Get + Return UPS_Device IsNot Nothing AndAlso UPS_Device.IsConnected + End Get + End Property + #End Region - Private WithEvents LogFile As Logger = WinNUT_Globals.LogFile - 'Object for UPS management + Private WithEvents LogFile As Logger = WinNUT_Globals.LogFile Public WithEvents UPS_Device As UPS_Device - Private AutoReconnect As Boolean - Private UPS_Retry As Integer = 0 - Private UPS_MaxRetry As Integer = 30 - 'Variable used with Toast Functionnality Public WithEvents FrmBuild As Update_Gui Public ToastPopup As New ToastPopup @@ -83,7 +86,6 @@ Public Class WinNUT StrLog.Insert(AppResxStr.STR_MAIN_OLDINI_RENAMED, My.Resources.Frm_Main_Str_01) StrLog.Insert(AppResxStr.STR_MAIN_OLDINI, My.Resources.Frm_Main_Str_02) StrLog.Insert(AppResxStr.STR_MAIN_RECONNECT, My.Resources.Frm_Main_Str_03) - StrLog.Insert(AppResxStr.STR_MAIN_RETRY, My.Resources.Frm_Main_Str_04) StrLog.Insert(AppResxStr.STR_MAIN_NOTCONN, My.Resources.Frm_Main_Str_05) StrLog.Insert(AppResxStr.STR_MAIN_CONN, My.Resources.Frm_Main_Str_06) StrLog.Insert(AppResxStr.STR_MAIN_OL, My.Resources.Frm_Main_Str_07) @@ -115,8 +117,6 @@ Public Class WinNUT StrLog.Insert(AppResxStr.STR_LOG_CON_FAILED, My.Resources.Log_Str_03) StrLog.Insert(AppResxStr.STR_LOG_CON_RETRY, My.Resources.Log_Str_04) StrLog.Insert(AppResxStr.STR_LOG_LOGOFF, My.Resources.Log_Str_05) - StrLog.Insert(AppResxStr.STR_LOG_NEW_RETRY, My.Resources.Log_Str_06) - StrLog.Insert(AppResxStr.STR_LOG_STOP_RETRY, My.Resources.Log_Str_07) StrLog.Insert(AppResxStr.STR_LOG_SHUT_START, My.Resources.Log_Str_08) StrLog.Insert(AppResxStr.STR_LOG_SHUT_STOP, My.Resources.Log_Str_09) StrLog.Insert(AppResxStr.STR_LOG_NO_UPDATE, My.Resources.Log_Str_10) @@ -208,8 +208,9 @@ Public Class WinNUT HasFocus = False End If - AddHandler Microsoft.Win32.SystemEvents.PowerModeChanged, AddressOf SystemEvents_PowerModeChanged + AddHandler SystemEvents.PowerModeChanged, AddressOf SystemEvents_PowerModeChanged AddHandler RequestConnect, AddressOf UPS_Connect + AddHandler My.Settings.PropertyChanged, AddressOf SettingsPropertyChanged LogFile.LogTracing(String.Format("{0} v{1} completed initialization.", My.Application.Info.ProductName, My.Application.Info.Version), LogLvl.LOG_NOTICE, Me) @@ -300,10 +301,10 @@ Public Class WinNUT If NotifyIcon.Visible = False Then Text = FormText Else - Text = "WinNUT" + Text = ProgramName End If ElseIf sender.WindowState = FormWindowState.Maximized Or sender.WindowState = FormWindowState.Normal Then - Text = "WinNUT" + Text = ProgramName End If End Sub @@ -327,6 +328,35 @@ Public Class WinNUT End Sub #End Region + + Private Sub SettingsPropertyChanged(sender As Object, e As PropertyChangedEventArgs) + LogFile.LogTracing("SettingsPropertyChanged: " & e.PropertyName, LogLvl.LOG_DEBUG, Me) + + UpdateMainMenuState() + End Sub + + Private Sub UpdateMainMenuState() + Menu_Persist.Checked = My.Settings.NUT_AutoReconnect + + If OldParams.WinNUT_Params.RegistryKeyRoot IsNot Nothing Then + ManageOldPrefsToolStripMenuItem.Enabled = True + ManageOldPrefsToolStripMenuItem.ToolTipText = My.Resources.ManageOldPrefsToolstripMenuItem_Enabled_TooltipText + Else + ManageOldPrefsToolStripMenuItem.Enabled = False + ManageOldPrefsToolStripMenuItem.ToolTipText = My.Resources.ManageOldPrefsToolstripMenuItem_Disabled_TooltipText + End If + + If IsUPSConnected OrElse (UPS_Device IsNot Nothing AndAlso UPS_Device.IsReconnecting) Then + Menu_Connect.Enabled = False + Menu_Disconnect.Enabled = True + Menu_UPS_Var.Enabled = True + Else + Menu_Connect.Enabled = True + Menu_Disconnect.Enabled = False + Menu_UPS_Var.Enabled = False + End If + End Sub + Private Sub SystemEvents_PowerModeChanged(sender As Object, e As Microsoft.Win32.PowerModeChangedEventArgs) LogFile.LogTracing("PowerModeChangedEvent: " & [Enum].GetName(GetType(Microsoft.Win32.PowerModes), e.Mode), LogLvl.LOG_NOTICE, Me) Select Case e.Mode @@ -346,26 +376,12 @@ Public Class WinNUT End Select End Sub - ''' - ''' Updates the Manage old prefs File menu item status depending on the presence of old preferences. - ''' - Private Sub UpdateManageOldPrefsMenuItemStatus() - If OldParams.WinNUT_Params.RegistryKeyRoot IsNot Nothing Then - - ManageOldPrefsToolStripMenuItem.Enabled = True - ManageOldPrefsToolStripMenuItem.ToolTipText = My.Resources.ManageOldPrefsToolstripMenuItem_Enabled_TooltipText - Else - ManageOldPrefsToolStripMenuItem.Enabled = False - ManageOldPrefsToolStripMenuItem.ToolTipText = My.Resources.ManageOldPrefsToolstripMenuItem_Disabled_TooltipText - End If - End Sub - Private Sub RunRegPrefsUpgrade() LogFile.LogTracing("Starting Upgrade dialog.", LogLvl.LOG_NOTICE, Me) Dim upPrefsDg As New Forms.UpgradePrefsDialog() upPrefsDg.ShowDialog() - UpdateManageOldPrefsMenuItemStatus() + UpdateMainMenuState() ApplyApplicationPreferences() End Sub @@ -399,7 +415,7 @@ Public Class WinNUT Lbl_VFirmware.Text = .Firmware End With - Menu_UPS_Var.Enabled = True + UpdateMainMenuState() UpdateIcon_NotifyIcon() LogFile.LogTracing("Update Icon", LogLvl.LOG_DEBUG, Me) RaiseEvent UpdateNotifyIconStr("Connected", Nothing) @@ -413,10 +429,12 @@ Public Class WinNUT End Sub Private Sub ConnectionError(sender As UPS_Device, ex As Exception) Handles UPS_Device.ConnectionError - LogFile.LogTracing(String.Format("Something went wrong connecting to UPS {0}. IsConnected: {1}, IsLoggedIn: {2}", - sender.Name, sender.IsConnected, sender.IsLoggedIn), LogLvl.LOG_ERROR, Me, - String.Format(StrLog.Item(AppResxStr.STR_LOG_CON_FAILED), sender.Nut_Config.Host, sender.Nut_Config.Port, - ex.Message)) + If Not UPS_Device.IsReconnecting Then + LogFile.LogTracing(String.Format("Something went wrong connecting to UPS {0}. IsConnected: {1}, IsLoggedIn: {2}", + sender.Name, sender.IsConnected, sender.IsLoggedIn), LogLvl.LOG_ERROR, Me, + String.Format(StrLog.Item(AppResxStr.STR_LOG_CON_FAILED), sender.Nut_Config.Host, sender.Nut_Config.Port, + ex.Message)) + End If End Sub ''' @@ -434,21 +452,24 @@ Public Class WinNUT End Sub Private Sub UPS_Lostconnect() Handles UPS_Device.Lost_Connect - LogFile.LogTracing("Notify user of lost connection", LogLvl.LOG_ERROR, Me, - String.Format(StrLog.Item(AppResxStr.STR_MAIN_LOSTCONNECT), UPS_Device.Nut_Config.Host, UPS_Device.Nut_Config.Port)) - ' UPSDisconnect() + LogFile.LogTracing("UPS reports lost (broken) connection.", LogLvl.LOG_ERROR, Me, + String.Format(StrLog.Item(AppResxStr.STR_MAIN_LOSTCONNECT), UPS_Device.Nut_Config.Host, UPS_Device.Nut_Config.Port)) ReInitDisplayValues() - If UPS_Device.Nut_Config.AutoReconnect And UPS_Retry <= UPS_MaxRetry Then + If UPS_Device.Nut_Config.AutoReconnect Then ActualAppIconIdx = AppIconIdx.IDX_ICO_RETRY + Dim Message = String.Format(StrLog.Item(AppResxStr.STR_MAIN_RECONNECT)) + LogFile.LogTracing("UPS reports it lost connection and is retrying.", LogLvl.LOG_WARNING, Me, Message) + RaiseEvent UpdateNotifyIconStr("Retry", Message) Else + ActualAppIconIdx = AppIconIdx.IDX_ICO_OFFLINE + RaiseEvent UpdateNotifyIconStr("Lost Connect", Nothing) End If UpdateIcon_NotifyIcon() - RaiseEvent UpdateNotifyIconStr("Lost Connect", Nothing) - RaiseEvent UpdateBatteryState("Lost Connect") LogFile.LogTracing("Update Icon", LogLvl.LOG_DEBUG, Me) + RaiseEvent UpdateBatteryState("Lost Connect") End Sub ''' @@ -456,6 +477,7 @@ Public Class WinNUT ''' Private Sub UPSDisconnectedEvent() Handles UPS_Device.Disconnected ReInitDisplayValues() + UpdateMainMenuState() ActualAppIconIdx = AppIconIdx.IDX_ICO_OFFLINE LogFile.LogTracing("Update Icon", LogLvl.LOG_DEBUG, Me) UpdateIcon_NotifyIcon() @@ -500,13 +522,6 @@ Public Class WinNUT End If End Sub - Private Sub NewRetry_NotifyIcon() Handles UPS_Device.New_Retry - Dim Message As String = String.Format(StrLog.Item(AppResxStr.STR_MAIN_RETRY), UPS_Device.Retry, UPS_Device.MaxRetry) - RaiseEvent UpdateNotifyIconStr("Retry", Message) - UpdateIcon_NotifyIcon() - LogFile.LogTracing("Update Icon", LogLvl.LOG_DEBUG, Me) - End Sub - Private Sub Event_UpdateNotifyIconStr(Optional Reason As String = Nothing, Optional Message As String = Nothing) Handles Me.UpdateNotifyIconStr Dim ShowVersion As String = ShortProgramVersion Dim NotifyStr As String = ProgramName & " - " & ShowVersion & vbNewLine @@ -624,9 +639,7 @@ Public Class WinNUT End Sub Public Shared Sub Event_ChangeStatus() Handles Me.On_Battery, Me.On_Line, - UPS_Device.Lost_Connect, UPS_Device.Connected, UPS_Device.Disconnected, UPS_Device.New_Retry - ', UPS_Device.Unknown_UPS - ', UPS_Device.InvalidLogin + UPS_Device.Lost_Connect, UPS_Device.Connected, UPS_Device.Disconnected WinNUT.NotifyIcon.BalloonTipText = WinNUT.NotifyIcon.Text If WinNUT.AllowToast And WinNUT.NotifyIcon.BalloonTipText <> "" Then @@ -815,7 +828,7 @@ Public Class WinNUT End With End Sub - Private Sub Menu_Reconnect_Click(sender As Object, e As EventArgs) Handles Menu_Reconnect.Click + Private Sub Menu_Reconnect_Click(sender As Object, e As EventArgs) Handles Menu_Connect.Click LogFile.LogTracing("Force Reconnect from menu", LogLvl.LOG_DEBUG, Me) UPSDisconnect() @@ -1047,5 +1060,10 @@ Public Class WinNUT Private Sub ManageOldPrefsToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles ManageOldPrefsToolStripMenuItem.Click RunRegPrefsUpgrade() End Sub + + Private Sub Menu_Persist_CheckedChanged(sender As Object, e As EventArgs) Handles Menu_Persist.CheckedChanged + LogFile.LogTracing("Menu_Persist checked state changing to " & Menu_Persist.Checked, LogLvl.LOG_DEBUG, Me) + My.Settings.NUT_AutoReconnect = Menu_Persist.Checked + End Sub End Class diff --git a/WinNUT_V2/WinNUT-Client/WinNUT.zh-CN.resx b/WinNUT_V2/WinNUT-Client/WinNUT.zh-CN.resx index 93b9b17..47a17e3 100644 --- a/WinNUT_V2/WinNUT-Client/WinNUT.zh-CN.resx +++ b/WinNUT_V2/WinNUT-Client/WinNUT.zh-CN.resx @@ -33,9 +33,6 @@ 文件 - - 重新连接 - 断开连接 @@ -102,7 +99,46 @@ False + + 177, 22 + 管理旧设置... + + 180, 22 + + + + + + + + + + + + + + + + + + + + + 177, 6 + + + 180, 22 + + + False + + + NoControl + + + False + \ No newline at end of file diff --git a/WinNUT_V2/WinNUT-Client/WinNUT.zh-TW.resx b/WinNUT_V2/WinNUT-Client/WinNUT.zh-TW.resx index 93d5391..1c2f0da 100644 --- a/WinNUT_V2/WinNUT-Client/WinNUT.zh-TW.resx +++ b/WinNUT_V2/WinNUT-Client/WinNUT.zh-TW.resx @@ -33,9 +33,6 @@ 檔案 - - 重新連線 - 中斷連線 @@ -102,4 +99,43 @@ False + + 177, 22 + + + 180, 22 + + + + + + + + + + + + + + + + + + + + + 177, 6 + + + 180, 22 + + + False + + + NoControl + + + False + \ No newline at end of file diff --git a/WinNUT_V2/WinNUT-Client_Common/Common_Enums.vb b/WinNUT_V2/WinNUT-Client_Common/Common_Enums.vb index 648da9e..15196c3 100644 --- a/WinNUT_V2/WinNUT-Client_Common/Common_Enums.vb +++ b/WinNUT_V2/WinNUT-Client_Common/Common_Enums.vb @@ -34,7 +34,6 @@ Public Enum AppResxStr STR_MAIN_OLDINI_RENAMED STR_MAIN_OLDINI STR_MAIN_RECONNECT - STR_MAIN_RETRY STR_MAIN_NOTCONN STR_MAIN_CONN STR_MAIN_OL @@ -58,8 +57,6 @@ Public Enum AppResxStr STR_LOG_CON_FAILED STR_LOG_CON_RETRY STR_LOG_LOGOFF - STR_LOG_NEW_RETRY - STR_LOG_STOP_RETRY STR_LOG_SHUT_START STR_LOG_SHUT_STOP STR_LOG_NO_UPDATE diff --git a/WinNUT_V2/WinNUT-Client_Common/UPS_Device.vb b/WinNUT_V2/WinNUT-Client_Common/UPS_Device.vb index f428dee..88595e7 100644 --- a/WinNUT_V2/WinNUT-Client_Common/UPS_Device.vb +++ b/WinNUT_V2/WinNUT-Client_Common/UPS_Device.vb @@ -28,6 +28,13 @@ Public Class UPS_Device Return (Nut_Socket.ConnectionStatus) End Get End Property + + Public ReadOnly Property IsReconnecting As Boolean + Get + Return Reconnect_Nut.Enabled + End Get + End Property + Public ReadOnly Property IsLoggedIn As Boolean Get Return Nut_Socket.IsLoggedIn @@ -79,11 +86,10 @@ Public Class UPS_Device Public Event Connected(sender As UPS_Device) ' Notify that the connection was closed gracefully. Public Event Disconnected() - ' Notify of an unexpectedly lost connection (??) + ' Notify of an unexpectedly lost connection. Public Event Lost_Connect() ' Error encountered when trying to connect. Public Event ConnectionError(sender As UPS_Device, innerException As Exception) - Public Event New_Retry() ''' ''' Raised when the NUT server returns an error during normal communication and is deemed important for the client @@ -107,9 +113,7 @@ Public Class UPS_Device Private Freq_Fallback As Double Public Nut_Config As Nut_Parameter - Public Retry As Integer = 0 - Public MaxRetry As Integer = 30 - Private LogFile As Logger + Private ReadOnly LogFile As Logger Public Sub New(ByRef Nut_Config As Nut_Parameter, ByRef LogFile As Logger, pollInterval As Integer, defaultFrequency As Integer) Me.LogFile = LogFile @@ -147,7 +151,7 @@ Public Class UPS_Device Catch ex As Exception RaiseEvent ConnectionError(Me, ex) - If retryOnConnFailure Then + If retryOnConnFailure AndAlso IsReconnecting = False Then LogFile.LogTracing("Reconnection Process Started", LogLvl.LOG_NOTICE, Me) Reconnect_Nut.Start() End If @@ -178,7 +182,6 @@ Public Class UPS_Device Reconnect_Nut.Stop() End If - Retry = 0 Try Nut_Socket.Disconnect(forceful) Catch nutEx As NutException @@ -195,6 +198,7 @@ Public Class UPS_Device Private Sub Socket_Broken() Handles Nut_Socket.Socket_Broken LogFile.LogTracing("Socket has reported a Broken event.", LogLvl.LOG_WARNING, Me) + Update_Data.Stop() RaiseEvent Lost_Connect() If Nut_Config.AutoReconnect Then @@ -204,19 +208,11 @@ Public Class UPS_Device End Sub Private Sub AttemptReconnect(sender As Object, e As EventArgs) - Retry += 1 - If Retry <= MaxRetry Then - RaiseEvent New_Retry() - LogFile.LogTracing(String.Format("Try Reconnect {0} / {1}", Retry, MaxRetry), LogLvl.LOG_NOTICE, Me, String.Format(StrLog.Item(AppResxStr.STR_LOG_NEW_RETRY), Retry, MaxRetry)) - Connect_UPS() - If IsConnected Then - LogFile.LogTracing("Nut Host Reconnected", LogLvl.LOG_DEBUG, Me) - Reconnect_Nut.Stop() - Retry = 0 - End If - Else - LogFile.LogTracing("Max Retry reached. Stop Process Autoreconnect and wait for manual Reconnection", LogLvl.LOG_ERROR, Me, StrLog.Item(AppResxStr.STR_LOG_STOP_RETRY)) - Disconnect(True) + LogFile.LogTracing("Attempting reconnection...", LogLvl.LOG_NOTICE, Me) + Connect_UPS() + If IsConnected Then + LogFile.LogTracing("Nut Host Reconnected", LogLvl.LOG_NOTICE, Me) + Reconnect_Nut.Stop() End If End Sub @@ -429,7 +425,6 @@ Public Class UPS_Device Catch Excep As Exception LogFile.LogTracing("Something went wrong in Retrieve_UPS_Datas:", LogLvl.LOG_ERROR, Me) LogFile.LogException(Excep, Me) - Disconnect(False, True) Socket_Broken() End Try End Sub