Skip to content

Commit

Permalink
up
Browse files Browse the repository at this point in the history
升级版本到A21
  • Loading branch information
Coloryr committed Oct 19, 2023
1 parent 8cf4a6d commit 1b13685
Show file tree
Hide file tree
Showing 13 changed files with 14 additions and 26 deletions.
1 change: 0 additions & 1 deletion src/ColorMC.Core/CoreMain.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
using ColorMC.Core.Helpers;
using ColorMC.Core.LaunchPath;
using ColorMC.Core.Net;
using ColorMC.Core.Net.Apis;
using ColorMC.Core.Objs;
using ColorMC.Core.Objs.Login;
using ColorMC.Core.Utils;
Expand Down
1 change: 0 additions & 1 deletion src/ColorMC.Core/Game/GameLaunch.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
using ColorMC.Core.Utils;
using Newtonsoft.Json.Linq;
using System.Diagnostics;
using System.Runtime.InteropServices;
using System.Text;

namespace ColorMC.Core.Game;
Expand Down
5 changes: 1 addition & 4 deletions src/ColorMC.Core/Objs/CountObj.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
using System;
using System.Collections.Generic;

namespace ColorMC.Core.Objs;
namespace ColorMC.Core.Objs;

/// <summary>
/// 游戏统计储存
Expand Down
3 changes: 0 additions & 3 deletions src/ColorMC.Gui/UI/Animations/SelfPageSlideSide.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,8 @@
using Avalonia.Animation.Easings;
using Avalonia.Media;
using Avalonia.Styling;
using Avalonia.VisualTree;
using System;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;

namespace ColorMC.Gui.UI.Animations;

Expand Down
2 changes: 1 addition & 1 deletion src/ColorMC.Gui/UI/Controls/Custom/CustomControl.axaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public async Task<bool> Closing()
if (_obj == null)
return false;

var model = (_ui.DataContext as CustomControlPanelModel);
var model = (_ui?.DataContext as CustomControlPanelModel);
if (model == null)
{
return false;
Expand Down
2 changes: 1 addition & 1 deletion src/ColorMC.Gui/UI/Controls/Guide/GuideControl.axaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ private void GuideControl_PointerWheelChanged(object? sender, PointerWheelEventA
{
model.Next();
}
else if(e.Delta.Y > 0)
else if (e.Delta.Y > 0)
{
model.Last();
}
Expand Down
7 changes: 1 addition & 6 deletions src/ColorMC.Gui/UI/Controls/Setting/SettingControl.axaml.cs
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
using Avalonia;
using Avalonia.Controls;
using Avalonia.Input;
using Avalonia.Media;
using Avalonia.Threading;
using ColorMC.Gui.Objs;
using ColorMC.Gui.UI.Model;
using ColorMC.Gui.UI.Model.Setting;
using ColorMC.Gui.UI.Windows;
using System.ComponentModel;
using System.Threading;
using System.Threading.Tasks;

namespace ColorMC.Gui.UI.Controls.Setting;

Expand Down Expand Up @@ -111,8 +108,6 @@ public void SetBaseModel(BaseModel model)
_tab7.DataContext = new SettingTab7Model();
}

private double x;

private void Amodel_PropertyChanged(object? sender, PropertyChangedEventArgs e)
{
if (e.PropertyName == "NowView")
Expand Down Expand Up @@ -156,7 +151,7 @@ private void Amodel_PropertyChanged(object? sender, PropertyChangedEventArgs e)
_cancel1.Cancel();
_cancel1.Dispose();
_cancel1 = new();

StackPanel1.IsVisible = true;
Dispatcher.UIThread.Post(() =>
{
Expand Down
4 changes: 2 additions & 2 deletions src/ColorMC.Gui/UI/Model/Add/AddGame/AddGameTab3Model.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ await Task.Run(() =>
else
{
CanInput = false;
Files = null;
_fileModel = null;
Files = null!;
_fileModel = null!;
Model.Show(string.Format(App.GetLanguage("AddGameWindow.Tab1.Error2"), SelectPath));
}
}
Expand Down
1 change: 0 additions & 1 deletion src/ColorMC.Gui/UI/Model/Count/CountModel.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using ColorMC.Core.Objs;
using ColorMC.Core.Utils;
using ColorMC.Gui.UIBinding;
using CommunityToolkit.Mvvm.ComponentModel;
using System;
Expand Down
2 changes: 1 addition & 1 deletion src/ColorMC.Gui/UI/Model/Custom/CustomControlPanelModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,6 @@ public void MotdLoad()

protected override void Close()
{
_game = null!;

}
}
1 change: 0 additions & 1 deletion src/ColorMC.Gui/UI/Model/Setting/SettingTab2Model.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
using ColorMC.Core.Utils;
using ColorMC.Gui.Objs;
using ColorMC.Gui.UIBinding;
using ColorMC.Gui.Utils;
using ColorMC.Gui.Utils.LaunchSetting;
using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input;
Expand Down
3 changes: 3 additions & 0 deletions src/ColorMC.Gui/UIBinding/BaseBinding.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.Versioning;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
Expand Down Expand Up @@ -777,6 +778,7 @@ public static void OpenPhoneSetting()

public static void CreateLaunch(GameSettingObj obj)
{
#pragma warning disable CA1416 // 验证平台兼容性
if (SystemInfo.Os == OsType.Windows)
{
try
Expand All @@ -797,6 +799,7 @@ public static void CreateLaunch(GameSettingObj obj)
Logs.Error(App.GetLanguage("Gui.Error33"), e);
}
}
#pragma warning restore CA1416 // 验证平台兼容性
}

public static void SetLaunch(string uuid)
Expand Down
8 changes: 4 additions & 4 deletions src/ColorMC.Launcher/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ public static class Program

public static readonly string[] BaseSha1 = new[]
{
"e2bcd57e0f3b388b7609cda0f72229f602e9dd85",
"55552eae44ef6200c654c1924a62b958f994039f",
"e07de19e051864ee6e5bb594f485030502dd1d64",
"55db36fdf906430c4b21850b5ef72e9aa6724772"
"221b744e73927b8ccb49e52e638d9b7fa2750483",
"cfb642e5175f1b646812f65b55c6670218e3d7ea",
"53f36dc75f49c1ed2072393e76a74ded7ea15194",
"4e02166b1c2aa11fe34a26b8f00586c2ae292879"
};
/// <summary>
/// 加载路径
Expand Down

0 comments on commit 1b13685

Please sign in to comment.