Skip to content

Commit

Permalink
clean
Browse files Browse the repository at this point in the history
  • Loading branch information
Coloryr committed Oct 7, 2024
1 parent 71ceca1 commit 364669d
Show file tree
Hide file tree
Showing 20 changed files with 26 additions and 64 deletions.
12 changes: 7 additions & 5 deletions src/ColorMC.Core/CoreMain.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ namespace ColorMC.Core;
public static class ColorMCCore
{
public const string TopVersion = "A31";
public const string DateVersion = "20241006";
public const string DateVersion = "20241007";

/// <summary>
/// 版本号
Expand Down Expand Up @@ -149,8 +149,9 @@ public static class ColorMCCore
/// <summary>
/// 手机端启动
/// </summary>
public static Func<LoginObj, GameSettingObj, JavaInfo, List<string>,
Dictionary<string, string>, IGameHandel> PhoneGameLaunch { internal get; set; }
public static Func<LoginObj, GameSettingObj, JavaInfo, List<string>,
Dictionary<string, string>, IGameHandel> PhoneGameLaunch
{ internal get; set; }
/// <summary>
/// 手机端Jvm安装
/// </summary>
Expand All @@ -170,8 +171,9 @@ public static class ColorMCCore
/// <summary>
/// 手机端Jvm运行
/// </summary>
public static Func<GameSettingObj, JavaInfo, string, List<string>,
Dictionary<string, string>, Process> PhoneJvmRun { internal get; set; }
public static Func<GameSettingObj, JavaInfo, string, List<string>,
Dictionary<string, string>, Process> PhoneJvmRun
{ internal get; set; }
/// <summary>
/// 手机端打开网页
/// </summary>
Expand Down
2 changes: 1 addition & 1 deletion src/ColorMC.Core/Net/CoreHttpClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public static void Init()

_dnsClients.Clear();

IDnsClient? dnsClient=null;
IDnsClient? dnsClient = null;
WebProxy? proxy = null;

//代理
Expand Down
1 change: 0 additions & 1 deletion src/ColorMC.Core/Net/Login/AuthlibInjector.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using ColorMC.Core.Objs;
using ColorMC.Core.Objs.Login;
using ColorMC.Core.Utils;

namespace ColorMC.Core.Net.Login;

Expand Down
1 change: 0 additions & 1 deletion src/ColorMC.Core/Net/Login/LittleSkin.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using ColorMC.Core.Helpers;
using ColorMC.Core.Objs;
using ColorMC.Core.Objs.Login;
using ColorMC.Core.Utils;

namespace ColorMC.Core.Net.Login;

Expand Down
7 changes: 1 addition & 6 deletions src/ColorMC.Core/Net/SelfDnsClient.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading.Tasks;
using System.Net;
using Ae.Dns.Client;
using Ae.Dns.Protocol;

Expand Down
2 changes: 1 addition & 1 deletion src/ColorMC.Core/Objs/ConfigObj.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public record HttpObj
}

public record DnsObj
{
{
public bool Enable { get; set; }
public List<string> Dns { get; set; }
public List<string> Https { get; set; }
Expand Down
2 changes: 1 addition & 1 deletion src/ColorMC.Core/Objs/Enums.cs
Original file line number Diff line number Diff line change
Expand Up @@ -408,6 +408,6 @@ public enum DownloadState
}

public enum DnsType
{
{
DnsOver, DnsOverHttps, DnsOverHttpsWithUdp
}
4 changes: 1 addition & 3 deletions src/ColorMC.Gui/Manager/GameManager.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Collections.Generic;
using ColorMC.Core;
using ColorMC.Core.Objs;
using ColorMC.Gui.Objs;
Expand Down
10 changes: 5 additions & 5 deletions src/ColorMC.Gui/Objs/Enums.cs
Original file line number Diff line number Diff line change
Expand Up @@ -143,11 +143,11 @@ public enum HeadType

public enum LogLevel : int
{
Base = 0b00000000,
None = 0b00000001,
Info = 0b00000010,
Warn = 0b00000100,
Base = 0b00000000,
None = 0b00000001,
Info = 0b00000010,
Warn = 0b00000100,
Error = 0b00001000,
Debug = 0b00010000,
All = 0b00011111,
All = 0b00011111,
}
9 changes: 1 addition & 8 deletions src/ColorMC.Gui/Objs/GameLogItemObj.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;

namespace ColorMC.Gui.Objs;
namespace ColorMC.Gui.Objs;

public record GameLogItemObj
{
Expand Down
2 changes: 1 addition & 1 deletion src/ColorMC.Gui/Objs/GuiConfigObj.cs
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ public record HeadSetting
}

public record LogColorSetting
{
{
public string Info { get; set; }
public string Warn { get; set; }
public string Error { get; set; }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,8 @@
using System.ComponentModel;
using System.IO;
using System.Linq;
using Avalonia.Controls;
using Avalonia.Input;
using Avalonia.Media;
using Avalonia.Media.Imaging;
using Avalonia.Platform;
using Avalonia.Threading;
using AvaloniaEdit.Document;
using AvaloniaEdit.Rendering;
using ColorMC.Core.Objs;
using ColorMC.Core.Objs.Minecraft;
using ColorMC.Gui.Manager;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
using Avalonia.Input;
using Avalonia.Media;
using Avalonia.Media.Imaging;
using Avalonia.Platform;
using Avalonia.Threading;
using AvaloniaEdit.Document;
using AvaloniaEdit.Rendering;
Expand Down
6 changes: 3 additions & 3 deletions src/ColorMC.Gui/UI/Controls/HeadControl.axaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
using Avalonia.Controls;
using Avalonia.Input;
using Avalonia.Interactivity;
using Avalonia.Layout;
using Avalonia.Media;
using Avalonia.Threading;
using ColorMC.Core.Objs;
using ColorMC.Core.Utils;
using ColorMC.Gui.UI.Model;
using Avalonia.Layout;
using Avalonia.Threading;
using ColorMC.Gui.Manager;
using ColorMC.Gui.Objs;
using ColorMC.Gui.UI.Model;

namespace ColorMC.Gui.UI.Controls;

Expand Down
2 changes: 0 additions & 2 deletions src/ColorMC.Gui/UI/Controls/Setting/AddDnsControl.axaml.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using Avalonia;
using Avalonia.Controls;
using Avalonia.Markup.Xaml;

namespace ColorMC.Gui.UI.Controls.Setting;

Expand Down
7 changes: 1 addition & 6 deletions src/ColorMC.Gui/UI/Model/Items/DnsItemModel.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ColorMC.Core.Objs;
using ColorMC.Core.Objs;
using ColorMC.Gui.Utils;
using CommunityToolkit.Mvvm.ComponentModel;

Expand Down
7 changes: 1 addition & 6 deletions src/ColorMC.Gui/UI/Model/Setting/AddDnsModel.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input;
using DialogHostAvalonia;

Expand Down
2 changes: 1 addition & 1 deletion src/ColorMC.Gui/UI/Model/Setting/SettingTab2Model.cs
Original file line number Diff line number Diff line change
Expand Up @@ -564,7 +564,7 @@ public void LoadUISetting()
{
MainColor = color;
}

EnableRGB = con.RGB;
IsCutsomFont = !con.FontDefault;
WindowMode = con.WindowMode;
Expand Down
1 change: 0 additions & 1 deletion src/ColorMC.Gui/UIBinding/ConfigBinding.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Avalonia.Media;
Expand Down
6 changes: 1 addition & 5 deletions src/ColorMC.Gui/Utils/GameLog.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections.Generic;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using ColorMC.Gui.Objs;

namespace ColorMC.Gui.Utils;
Expand Down

0 comments on commit 364669d

Please sign in to comment.