diff --git a/MainForm.cs b/MainForm.cs index 915f3d6..c4ac8ca 100644 --- a/MainForm.cs +++ b/MainForm.cs @@ -3,9 +3,12 @@ using System.Collections.Generic; using System.ComponentModel; using System.IO; using System.Linq; +using System.Reflection; +using System.Text.Json; using System.Threading.Tasks; using System.Windows.Forms; using RokettoLaunch.Models; +using RokettoLaunch.Windows.Forms; using RyzStudio; using RyzStudio.Windows.Forms; using RyzStudio.Windows.ThemedForms; @@ -513,7 +516,22 @@ namespace RokettoLaunch this.CurrentSession.Groups = new List(); foreach (var container in flowLayoutPanel1.Controls.OfType()) { - this.CurrentSession.Groups.Add((TileGroupModel)container.Tag); + var newTag = (TileGroupModel)container.Tag; + if (newTag == null) + { + continue; + } + + newTag.Items = new List(); + + foreach (var tile in container.Controls.OfType()) + { + tile.ModelInfo.Position = container.GetCoord(tile); + + newTag.Items.Add(tile.ModelInfo); + } + + this.CurrentSession.Groups.Add(newTag); } var result = GenericResult.Create(); @@ -700,7 +718,16 @@ namespace RokettoLaunch var model = UIControl.GetTag(container); model.IsExpanded = true; - await AddTileGroups(model); + try + { + var newModel = JsonSerializer.Deserialize(JsonSerializer.Serialize(model)); + + await AddTileGroups(newModel); + } + catch (Exception) + { + return; + } _fileSessionManager.HasChanged = true; } @@ -890,11 +917,22 @@ namespace RokettoLaunch return; } + var newModel = new TileModel(); + + try + { + newModel = JsonSerializer.Deserialize(JsonSerializer.Serialize(tile.ModelInfo)); + } + catch (Exception) + { + return; + } + var newCoord = container.GetNextCoord(); var newTile = new RokettoLaunch.Windows.Forms.TilePanel(); newTile.ContextMenuStrip = tileMenu1; - newTile.LoadInfo(tile.ModelInfo); + newTile.LoadInfo(newModel); container.Add(newTile, newCoord.X, newCoord.Y); diff --git a/References/RyzStudio.8.1.2.249.nupkg b/References/RyzStudio.8.1.2.249.nupkg deleted file mode 100644 index 0778768..0000000 Binary files a/References/RyzStudio.8.1.2.249.nupkg and /dev/null differ diff --git a/References/RyzStudio.Windows.Forms.8.1.3.87.nupkg b/References/RyzStudio.Windows.Forms.8.1.3.87.nupkg deleted file mode 100644 index 460bbcb..0000000 Binary files a/References/RyzStudio.Windows.Forms.8.1.3.87.nupkg and /dev/null differ diff --git a/RokettoLaunch.csproj b/RokettoLaunch.csproj index b1f7025..f2bcf75 100644 --- a/RokettoLaunch.csproj +++ b/RokettoLaunch.csproj @@ -14,7 +14,7 @@ Ray Lam 1.0.0.0 1.0.0.0 - 0.3.4.163 + 0.3.4.164 False x64 icon-128.png @@ -79,8 +79,8 @@ - - + + diff --git a/build-installer.iss b/build-installer.iss index 94f2ada..90f83e4 100644 --- a/build-installer.iss +++ b/build-installer.iss @@ -2,7 +2,7 @@ ; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES! #define MyAppName "RokettoLaunch" -#define MyAppVersion "0.3.4.163" +#define MyAppVersion "0.3.4.164" #define MyAppPublisher "Hi, I'm Ray" #define MyAppURL "https://www.hiimray.co.uk/software-fizzy-launcher" #define MyAppExeName "rokettolaunch.exe"