Skip to content

Commit

Permalink
up ????
Browse files Browse the repository at this point in the history
  • Loading branch information
Coloryr committed Aug 17, 2024
1 parent da4a09a commit 1bd3879
Show file tree
Hide file tree
Showing 10 changed files with 28 additions and 28 deletions.
8 changes: 4 additions & 4 deletions src/ColorMC.Gui/UI/Flyouts/GameEditFlyout2.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,23 +22,23 @@ public GameEditFlyout2(Control con, WorldModel model)
}),
(App.Lang("GameEditWindow.Flyouts.Text11"), CheckHelpers.IsGameVersion120(_model.World.Game.Version), ()=>
{
_model.Top.LaunchWorld(_model);
_model.TopModel.LaunchWorld(_model);
}),
(App.Lang("GameEditWindow.Flyouts.Text7"), true, ()=>
{
_model.Top.Export(_model);
_model.TopModel.Export(_model);
}),
(App.Lang("GameEditWindow.Flyouts.Text10"), true, ()=>
{
WindowManager.ShowConfigEdit(_model.World);
}),
(App.Lang("GameEditWindow.Flyouts.Text9"), !_model.World.Broken, ()=>
{
_model.Top.BackupWorld(_model);
_model.TopModel.BackupWorld(_model);
}),
(App.Lang("GameEditWindow.Flyouts.Text8"), !_model.World.Broken, ()=>
{
_model.Top.DeleteWorld(_model);
_model.TopModel.DeleteWorld(_model);
})
], con);
}
Expand Down
2 changes: 1 addition & 1 deletion src/ColorMC.Gui/UI/Flyouts/GameEditFlyout3.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public class GameEditFlyout3

public GameEditFlyout3(Control con, ResourcePackModel model)
{
_top = model.Top;
_top = model.TopModel;
_obj = model.Pack;

_ = new FlyoutsControl(
Expand Down
2 changes: 1 addition & 1 deletion src/ColorMC.Gui/UI/Flyouts/GameEditFlyout4.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public GameEditFlyout4(Control con, ScreenshotModel model)
}),
(App.Lang("GameEditWindow.Tab9.Text1"), true, ()=>
{
_model.Top.DeleteScreenshot(_model);
_model.TopModel.DeleteScreenshot(_model);
})
], con);
}
Expand Down
8 changes: 4 additions & 4 deletions src/ColorMC.Gui/UI/Model/Items/NetFrpCloudServerModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,18 @@ public partial class NetFrpCloudServerModel : SelectItemModel
public string Max { get; set; }

[JsonIgnore]
public NetFrpModel Top;
public NetFrpModel TopModel;

[RelayCommand]
public void Join()
{
Top.Join(this);
TopModel.Join(this);
}

[RelayCommand]
public async Task Copy()
{
var top = Top.Model.GetTopLevel();
var top = TopModel.Model.GetTopLevel();
if (top == null)
{
return;
Expand All @@ -48,6 +48,6 @@ public async Task Copy()
[RelayCommand]
public void Test()
{
Top.Test(this);
TopModel.Test(this);
}
}
6 changes: 3 additions & 3 deletions src/ColorMC.Gui/UI/Model/Items/ResourcePackModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace ColorMC.Gui.UI.Model.Items;

public partial class ResourcePackModel : SelectItemModel
{
public readonly GameEditModel Top;
public readonly GameEditModel TopModel;
public readonly ResourcepackObj Pack;

public string Local => Path.GetFileName(Pack.Local);
Expand All @@ -21,7 +21,7 @@ public partial class ResourcePackModel : SelectItemModel

public ResourcePackModel(GameEditModel top, ResourcepackObj pack)
{
Top = top;
TopModel = top;
Pack = pack;
Pic = Pack.Icon == null ? ImageManager.GameIcon : GetImage();
}
Expand All @@ -34,7 +34,7 @@ public Bitmap GetImage()

public void Select()
{
Top.SetSelectResource(this);
TopModel.SetSelectResource(this);
}

public void Close()
Expand Down
4 changes: 2 additions & 2 deletions src/ColorMC.Gui/UI/Model/Items/ScreenshotModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ public partial class ScreenshotModel(GameEditModel top, string obj) : SelectItem
{
public string Screenshot => obj;

public GameEditModel Top => top;
public GameEditModel TopModel => top;

public string Name { get; } = Path.GetFileName(obj);

Expand All @@ -34,7 +34,7 @@ private async Task<Bitmap> GetImage()

public void Select()
{
Top.SetSelectScreenshot(this);
TopModel.SetSelectScreenshot(this);
}

public void Close()
Expand Down
18 changes: 9 additions & 9 deletions src/ColorMC.Gui/UI/Model/Items/WorldModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ namespace ColorMC.Gui.UI.Model.Items;
public partial class WorldModel : SelectItemModel
{
public readonly WorldObj World;
public readonly GameEditModel Top;
public readonly GameEditModel TopModel;

[ObservableProperty]
private bool _empty;
Expand All @@ -36,7 +36,7 @@ public partial class WorldModel : SelectItemModel

public WorldModel(GameEditModel top, WorldObj world)
{
Top = top;
TopModel = top;
World = world;
Pic = World.Icon != null ? new Bitmap(World.Icon) : ImageManager.GameIcon;
}
Expand All @@ -62,16 +62,16 @@ public async Task Load()

private async void Load1()
{
Top.Model.Progress(App.Lang("GameEditWindow.Tab5.Info16"));
TopModel.Model.Progress(App.Lang("GameEditWindow.Tab5.Info16"));
IsSelect = false;
await Load();
IsSelect = true;
Top.Model.ProgressClose();
TopModel.Model.ProgressClose();
}

public void Select()
{
Top.SetSelectWorld(this);
TopModel.SetSelectWorld(this);
}

public void DisE()
Expand Down Expand Up @@ -102,14 +102,14 @@ public async void DisE(IEnumerable<DataPackModel> pack)

public async void Delete(DataPackModel item)
{
var res = await Top.Model.ShowWait(
var res = await TopModel.Model.ShowWait(
string.Format(App.Lang("GameEditWindow.Tab5.Info15"), item.Name));
if (!res)
{
return;
}

res = await GameBinding.DeleteDataPack(item, Top.Model.ShowWait);
res = await GameBinding.DeleteDataPack(item, TopModel.Model.ShowWait);
if (res)
{
Load1();
Expand All @@ -118,14 +118,14 @@ public async void Delete(DataPackModel item)

public async void Delete(IEnumerable<DataPackModel> items)
{
var res = await Top.Model.ShowWait(
var res = await TopModel.Model.ShowWait(
string.Format(App.Lang("GameEditWindow.Tab5.Info14"), items.Count()));
if (!res)
{
return;
}

res = await GameBinding.DeleteDataPack(items, Top.Model.ShowWait);
res = await GameBinding.DeleteDataPack(items, TopModel.Model.ShowWait);
if (res)
{
Load1();
Expand Down
2 changes: 1 addition & 1 deletion src/ColorMC.Gui/UI/Model/NetFrp/NetFrpTab4Model.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public async void LoadCloud()
}
foreach (var item in list)
{
item.Top = this;
item.TopModel = this;
CloudServers.Add(item);
}

Expand Down
4 changes: 2 additions & 2 deletions src/ColorMC.Gui/UIBinding/BaseBinding.cs
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ public static async void Init1()
}

/// <summary>
/// 快捷启动索格实例
/// 快捷启动实例
/// </summary>
/// <param name="games"></param>
public static void Launch(string[] games)
Expand All @@ -195,7 +195,7 @@ public static void Launch(string[] games)
{
return;
}
Dispatcher.UIThread.Post(async () =>
Dispatcher.UIThread.Post(() =>
{
if (window?.Model is IMainTop model)
{
Expand Down
2 changes: 1 addition & 1 deletion src/ColorMC.Launcher/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public static void Main(string[] args)
{
_inputDir = $"{Environment.GetFolderPath(Environment.SpecialFolder.UserProfile)}/.ColorMC/";

string path = $"{Environment.GetFolderPath(Environment.SpecialFolder.UserProfile)}/ColorMC/";
path = $"{Environment.GetFolderPath(Environment.SpecialFolder.UserProfile)}/ColorMC/";
if (Directory.Exists(path))
{
Directory.Move(path, _inputDir);
Expand Down

0 comments on commit 1bd3879

Please sign in to comment.