From eb4e4201c7aa6b8e70947411588a192546b1a4a6 Mon Sep 17 00:00:00 2001 From: WeeXnes Date: Tue, 22 Apr 2025 02:08:08 +0200 Subject: [PATCH] Added Renaming --- PS2_Manager/Core/Game.cs | 9 +++++++++ PS2_Manager/EditGame.axaml | 6 ++++-- PS2_Manager/EditGame.axaml.cs | 14 ++++++++++++-- PS2_Manager/MainWindow.axaml.cs | 2 ++ 4 files changed, 27 insertions(+), 4 deletions(-) diff --git a/PS2_Manager/Core/Game.cs b/PS2_Manager/Core/Game.cs index a7fdefe..3fece8f 100644 --- a/PS2_Manager/Core/Game.cs +++ b/PS2_Manager/Core/Game.cs @@ -44,6 +44,15 @@ public class Game } } + public void ChangeName(string newName) + { + this.Name = newName; + string targetDirectory = settings.library_path.GetValue(); + string newFileName = $"{this.GameID}.{this.Name}.iso"; + string destPath = Path.Combine(Path.Combine(targetDirectory, "DVD"), newFileName); + File.Move(this.GamePath, destPath); + } + public string GetGameTitle() { string url = $"http://localhost:3000/search/{this.GameID}"; diff --git a/PS2_Manager/EditGame.axaml b/PS2_Manager/EditGame.axaml index 0337cb3..11f81e5 100644 --- a/PS2_Manager/EditGame.axaml +++ b/PS2_Manager/EditGame.axaml @@ -21,8 +21,10 @@ -