From 5236543d3d2d0340dd5541cb305bb7f85d4b1002 Mon Sep 17 00:00:00 2001 From: zzyyyl Date: Mon, 24 Oct 2022 15:32:23 +0800 Subject: [PATCH] style: fix c# build warnings --- src/MeoAsstGui/Helper/AsstProxy.cs | 1 + .../Helper/MaaHotKeys/IMaaHotKeyActionHandler.cs | 15 ++++++++++++++- .../Helper/MaaHotKeys/IMaaHotKeyManager.cs | 15 ++++++++++++++- src/MeoAsstGui/Helper/MaaHotKeys/MaaHotKey.cs | 15 ++++++++++++++- .../Helper/MaaHotKeys/MaaHotKeyAction.cs | 15 ++++++++++++++- .../Helper/MaaHotKeys/MaaHotKeyActionHandler.cs | 15 ++++++++++++++- .../Helper/MaaHotKeys/MaaHotKeyManager.cs | 15 ++++++++++++++- .../UserControl/HotKeyEditorUserControl.xaml.cs | 15 ++++++++++++++- .../ViewModels/VersionUpdateViewModel.cs | 1 + 9 files changed, 100 insertions(+), 7 deletions(-) diff --git a/src/MeoAsstGui/Helper/AsstProxy.cs b/src/MeoAsstGui/Helper/AsstProxy.cs index 4d51b1975e..1550f83c9a 100644 --- a/src/MeoAsstGui/Helper/AsstProxy.cs +++ b/src/MeoAsstGui/Helper/AsstProxy.cs @@ -732,6 +732,7 @@ namespace MeoAsstGui { all_drops += $" (+{addQuantity})"; } + all_drops += "\n"; } diff --git a/src/MeoAsstGui/Helper/MaaHotKeys/IMaaHotKeyActionHandler.cs b/src/MeoAsstGui/Helper/MaaHotKeys/IMaaHotKeyActionHandler.cs index 1d412a9a52..63e578fc61 100644 --- a/src/MeoAsstGui/Helper/MaaHotKeys/IMaaHotKeyActionHandler.cs +++ b/src/MeoAsstGui/Helper/MaaHotKeys/IMaaHotKeyActionHandler.cs @@ -1,4 +1,17 @@ -namespace MeoAsstGui.MaaHotKeys +// +// MeoAsstGui - A part of the MeoAssistantArknights project +// Copyright (C) 2021 MistEO and Contributors +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY +// + +namespace MeoAsstGui.MaaHotKeys { public interface IMaaHotKeyActionHandler { diff --git a/src/MeoAsstGui/Helper/MaaHotKeys/IMaaHotKeyManager.cs b/src/MeoAsstGui/Helper/MaaHotKeys/IMaaHotKeyManager.cs index 78abde3f16..221e5bb910 100644 --- a/src/MeoAsstGui/Helper/MaaHotKeys/IMaaHotKeyManager.cs +++ b/src/MeoAsstGui/Helper/MaaHotKeys/IMaaHotKeyManager.cs @@ -1,4 +1,17 @@ -using GlobalHotKey; +// +// MeoAsstGui - A part of the MeoAssistantArknights project +// Copyright (C) 2021 MistEO and Contributors +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY +// + +using GlobalHotKey; namespace MeoAsstGui.MaaHotKeys { diff --git a/src/MeoAsstGui/Helper/MaaHotKeys/MaaHotKey.cs b/src/MeoAsstGui/Helper/MaaHotKeys/MaaHotKey.cs index 8bb8fdca5d..72e46ade1a 100644 --- a/src/MeoAsstGui/Helper/MaaHotKeys/MaaHotKey.cs +++ b/src/MeoAsstGui/Helper/MaaHotKeys/MaaHotKey.cs @@ -1,4 +1,17 @@ -using System.Text; +// +// MeoAsstGui - A part of the MeoAssistantArknights project +// Copyright (C) 2021 MistEO and Contributors +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY +// + +using System.Text; using System.Windows.Input; using GlobalHotKey; diff --git a/src/MeoAsstGui/Helper/MaaHotKeys/MaaHotKeyAction.cs b/src/MeoAsstGui/Helper/MaaHotKeys/MaaHotKeyAction.cs index 6cb00ee5bc..4b8459cf25 100644 --- a/src/MeoAsstGui/Helper/MaaHotKeys/MaaHotKeyAction.cs +++ b/src/MeoAsstGui/Helper/MaaHotKeys/MaaHotKeyAction.cs @@ -1,4 +1,17 @@ -using System; +// +// MeoAsstGui - A part of the MeoAssistantArknights project +// Copyright (C) 2021 MistEO and Contributors +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY +// + +using System; namespace MeoAsstGui.MaaHotKeys { diff --git a/src/MeoAsstGui/Helper/MaaHotKeys/MaaHotKeyActionHandler.cs b/src/MeoAsstGui/Helper/MaaHotKeys/MaaHotKeyActionHandler.cs index 2152658bf4..e518b1640b 100644 --- a/src/MeoAsstGui/Helper/MaaHotKeys/MaaHotKeyActionHandler.cs +++ b/src/MeoAsstGui/Helper/MaaHotKeys/MaaHotKeyActionHandler.cs @@ -1,4 +1,17 @@ -using System; +// +// MeoAsstGui - A part of the MeoAssistantArknights project +// Copyright (C) 2021 MistEO and Contributors +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY +// + +using System; using System.Windows; using StyletIoC; diff --git a/src/MeoAsstGui/Helper/MaaHotKeys/MaaHotKeyManager.cs b/src/MeoAsstGui/Helper/MaaHotKeys/MaaHotKeyManager.cs index abe67fc533..1383e89b5a 100644 --- a/src/MeoAsstGui/Helper/MaaHotKeys/MaaHotKeyManager.cs +++ b/src/MeoAsstGui/Helper/MaaHotKeys/MaaHotKeyManager.cs @@ -1,4 +1,17 @@ -using System; +// +// MeoAsstGui - A part of the MeoAssistantArknights project +// Copyright (C) 2021 MistEO and Contributors +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY +// + +using System; using System.Collections.Generic; using System.Linq; using System.Windows.Input; diff --git a/src/MeoAsstGui/UserControl/HotKeyEditorUserControl.xaml.cs b/src/MeoAsstGui/UserControl/HotKeyEditorUserControl.xaml.cs index 77aa097729..df267a7912 100644 --- a/src/MeoAsstGui/UserControl/HotKeyEditorUserControl.xaml.cs +++ b/src/MeoAsstGui/UserControl/HotKeyEditorUserControl.xaml.cs @@ -1,4 +1,17 @@ -using System.Windows; +// +// MeoAsstGui - A part of the MeoAssistantArknights project +// Copyright (C) 2021 MistEO and Contributors +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY +// + +using System.Windows; using System.Windows.Controls; using System.Windows.Input; using MeoAsstGui.MaaHotKeys; diff --git a/src/MeoAsstGui/ViewModels/VersionUpdateViewModel.cs b/src/MeoAsstGui/ViewModels/VersionUpdateViewModel.cs index 5de5b66b46..0be826cd0e 100644 --- a/src/MeoAsstGui/ViewModels/VersionUpdateViewModel.cs +++ b/src/MeoAsstGui/ViewModels/VersionUpdateViewModel.cs @@ -672,6 +672,7 @@ namespace MeoAsstGui fileStream.Write(byteArray, 0, byteArraySize); byteArraySize = responseStream.Read(byteArray, 0, byteArray.Length); } + success = true; } catch (Exception info)