cleanup<*>: run vs code cleanup to format codestyle and remove unused references

This commit is contained in:
leo 2021-08-05 15:54:00 +08:00
parent 37559b60d4
commit 2cf7192ec4
41 changed files with 77 additions and 89 deletions

View file

@ -1,6 +1,5 @@
using System; using System;
using System.IO; using System.IO;
using System.Threading.Tasks;
using System.Windows; using System.Windows;
namespace SourceGit { namespace SourceGit {

View file

@ -45,7 +45,7 @@ namespace SourceGit.Commands {
var when = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc).AddSeconds(timestamp).ToLocalTime().ToString("yyyy-MM-dd HH:mm:ss"); var when = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc).AddSeconds(timestamp).ToLocalTime().ToString("yyyy-MM-dd HH:mm:ss");
var blameLine = new Models.BlameLine() { var blameLine = new Models.BlameLine() {
LineNumber = $"{data.Lines.Count+1}", LineNumber = $"{data.Lines.Count + 1}",
CommitSHA = commit, CommitSHA = commit,
Author = author, Author = author,
Time = when, Time = when,

View file

@ -174,6 +174,6 @@ namespace SourceGit.Commands {
/// 调用Exec时的读取函数 /// 调用Exec时的读取函数
/// </summary> /// </summary>
/// <param name="line"></param> /// <param name="line"></param>
public virtual void OnReadline(string line) {} public virtual void OnReadline(string line) { }
} }
} }

View file

@ -4,7 +4,7 @@ namespace SourceGit.Commands {
/// </summary> /// </summary>
public class Config : Command { public class Config : Command {
public Config() {} public Config() { }
public Config(string repo) { public Config(string repo) {
Cwd = repo; Cwd = repo;

View file

@ -1,10 +1,7 @@
using System; using System;
using System.Collections.Generic;
using System.Linq;
using System.Net; using System.Net;
using System.Text;
using System.Threading.Tasks;
using System.Reflection; using System.Reflection;
using System.Text;
using System.Text.Json; using System.Text.Json;
using System.Text.Json.Serialization; using System.Text.Json.Serialization;
@ -54,7 +51,7 @@ namespace SourceGit.Models {
} }
req.GetResponse(); req.GetResponse();
} catch {} } catch { }
} }
} }
} }

View file

@ -43,7 +43,7 @@ namespace SourceGit.Models {
} }
} }
public Line() {} public Line() { }
public Line(LineMode mode, string content, string oldLine, string newLine) { public Line(LineMode mode, string content, string oldLine, string newLine) {
Mode = mode; Mode = mode;

View file

@ -2,10 +2,10 @@ using System;
using System.Net; using System.Net;
using System.Reflection; using System.Reflection;
using System.Text; using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using System.Text.Json; using System.Text.Json;
using System.Text.Json.Serialization; using System.Text.Json.Serialization;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
namespace SourceGit.Models { namespace SourceGit.Models {

View file

@ -1,6 +1,5 @@
using System.Windows; using System.Windows;
using System.Windows.Controls; using System.Windows.Controls;
using System.Windows.Media;
namespace SourceGit.Views.Controls { namespace SourceGit.Views.Controls {

View file

@ -1,8 +1,3 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows; using System.Windows;
using System.Windows.Controls; using System.Windows.Controls;
using System.Windows.Media; using System.Windows.Media;

View file

@ -76,7 +76,7 @@ namespace SourceGit.Views.Controls {
FlowDirection.LeftToRight, FlowDirection.LeftToRight,
new Typeface(new FontFamily("Microsoft YaHei UI"), FontStyles.Normal, FontWeights.Normal, FontStretches.Normal), new Typeface(new FontFamily("Microsoft YaHei UI"), FontStyles.Normal, FontWeights.Normal, FontStretches.Normal),
icon.Width * 0.8, icon.Width * 0.8,
new SolidColorBrush(Color.FromRgb(241,241,241)), new SolidColorBrush(Color.FromRgb(241, 241, 241)),
VisualTreeHelper.GetDpi(icon).PixelsPerDip); VisualTreeHelper.GetDpi(icon).PixelsPerDip);
icon.InvalidateVisual(); icon.InvalidateVisual();

View file

@ -1,7 +1,7 @@
using System.Windows; using System.Windows;
using System.Windows.Media;
using System.Windows.Controls; using System.Windows.Controls;
using System.Windows.Documents; using System.Windows.Documents;
using System.Windows.Media;
namespace SourceGit.Views.Controls { namespace SourceGit.Views.Controls {
/// <summary> /// <summary>

View file

@ -1,6 +1,4 @@
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.IO;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace SourceGit.Views.Popups { namespace SourceGit.Views.Popups {