From f490e4d389351df65d853f3aacc3c7b8e5a054c4 Mon Sep 17 00:00:00 2001
From: TCL <1620508360@qq.com>
Date: Wed, 23 Nov 2022 14:38:33 +0800
Subject: [PATCH] chore: format cs with dotnet format
---
installer/Installer/AssemblyInfo.cs | 2 +-
installer/Installer/Model.cs | 21 ++++++++----
installer/Installer/ViewModel.cs | 52 ++++++++++++++++-------------
launcher/Launcher/AssemblyInfo.cs | 2 +-
4 files changed, 45 insertions(+), 32 deletions(-)
diff --git a/installer/Installer/AssemblyInfo.cs b/installer/Installer/AssemblyInfo.cs
index 87c30a8..746c6a3 100644
--- a/installer/Installer/AssemblyInfo.cs
+++ b/installer/Installer/AssemblyInfo.cs
@@ -1,6 +1,6 @@
using System.Windows;
-[assembly:ThemeInfo(
+[assembly: ThemeInfo(
ResourceDictionaryLocation.None, // where theme specific resource dictionaries are located
//(used if a resource is not found in the page,
// or application resource dictionaries)
diff --git a/installer/Installer/Model.cs b/installer/Installer/Model.cs
index 03ffad1..3982b69 100644
--- a/installer/Installer/Model.cs
+++ b/installer/Installer/Model.cs
@@ -26,15 +26,21 @@ namespace starter.viewmodel.settings
///
/// Route of files
///
- public string Route {
- get; set; }
+ public string Route
+ {
+ get; set;
+ }
///
/// if the route was set or is under editing
///
- public bool HaveRoute {
- get; set; }
- public bool EditingRoute {
- get; set; }
+ public bool HaveRoute
+ {
+ get; set;
+ }
+ public bool EditingRoute
+ {
+ get; set;
+ }
///
/// downloader function
///
@@ -144,7 +150,8 @@ namespace Downloader
GetObjectRequest request = new GetObjectRequest(bucket, key, localDir, localFileName);
Dictionary test = request.GetRequestHeaders();
- request.SetCosProgressCallback(delegate(long completed, long total) {
+ request.SetCosProgressCallback(delegate (long completed, long total)
+ {
Console.WriteLine(String.Format("progress = {0:##.##}%", completed * 100.0 / total));
});
// 执行请求
diff --git a/installer/Installer/ViewModel.cs b/installer/Installer/ViewModel.cs
index 291dbac..12c9842 100644
--- a/installer/Installer/ViewModel.cs
+++ b/installer/Installer/ViewModel.cs
@@ -22,10 +22,12 @@ namespace starter.viewmodel.settings
public string Route
{
- get {
+ get
+ {
return obj.Route;
}
- set {
+ set
+ {
obj.Route = value;
this.RaisePropertyChanged("Route");
}
@@ -33,10 +35,12 @@ namespace starter.viewmodel.settings
public bool CanEditRoute // if the user can still edit install route
{
- get {
+ get
+ {
return !obj.HaveRoute;
}
- set {
+ set
+ {
obj.HaveRoute = !value;
obj.EditingRoute = value;
this.RaisePropertyChanged("CanEditRoute");
@@ -46,7 +50,8 @@ namespace starter.viewmodel.settings
private BaseCommand clickBrowseCommand;
public BaseCommand ClickBrowseCommand
{
- get {
+ get
+ {
if (clickBrowseCommand == null)
{
clickBrowseCommand = new BaseCommand(new Action