Compatibility with Legends ZA

This commit is contained in:
Manu
2025-10-27 17:26:14 +01:00
parent e872275c99
commit 81cf6514f8
11 changed files with 451 additions and 178 deletions

View File

@@ -62,6 +62,7 @@ partial class MainWindow
ToolsToolStripMenu = new ToolStripMenuItem();
MenuItemMGDB = new ToolStripMenuItem();
toolTipRedemptionMethod = new ToolTip(components);
BtnZA = new Button();
GrpBCAT.SuspendLayout();
GrpContent.SuspendLayout();
ContextMenuStripWC.SuspendLayout();
@@ -76,7 +77,7 @@ partial class MainWindow
BtnLGPE.FlatStyle = FlatStyle.Flat;
BtnLGPE.Location = new Point(5, 37);
BtnLGPE.Name = "BtnLGPE";
BtnLGPE.Size = new Size(136, 60);
BtnLGPE.Size = new Size(111, 60);
BtnLGPE.TabIndex = 0;
BtnLGPE.TabStop = false;
BtnLGPE.Text = "LGPE";
@@ -89,9 +90,9 @@ partial class MainWindow
BtnSWSH.AccessibleName = "";
BtnSWSH.Cursor = Cursors.Hand;
BtnSWSH.FlatStyle = FlatStyle.Flat;
BtnSWSH.Location = new Point(147, 37);
BtnSWSH.Location = new Point(122, 37);
BtnSWSH.Name = "BtnSWSH";
BtnSWSH.Size = new Size(136, 60);
BtnSWSH.Size = new Size(111, 60);
BtnSWSH.TabIndex = 1;
BtnSWSH.TabStop = false;
BtnSWSH.Text = "SWSH";
@@ -104,9 +105,9 @@ partial class MainWindow
BtnBDSP.AccessibleName = "";
BtnBDSP.Cursor = Cursors.Hand;
BtnBDSP.FlatStyle = FlatStyle.Flat;
BtnBDSP.Location = new Point(289, 37);
BtnBDSP.Location = new Point(239, 37);
BtnBDSP.Name = "BtnBDSP";
BtnBDSP.Size = new Size(136, 60);
BtnBDSP.Size = new Size(111, 60);
BtnBDSP.TabIndex = 2;
BtnBDSP.TabStop = false;
BtnBDSP.Text = "BDSP";
@@ -119,9 +120,9 @@ partial class MainWindow
BtnSCVI.AccessibleName = "";
BtnSCVI.Cursor = Cursors.Hand;
BtnSCVI.FlatStyle = FlatStyle.Flat;
BtnSCVI.Location = new Point(573, 37);
BtnSCVI.Location = new Point(473, 37);
BtnSCVI.Name = "BtnSCVI";
BtnSCVI.Size = new Size(136, 60);
BtnSCVI.Size = new Size(111, 60);
BtnSCVI.TabIndex = 3;
BtnSCVI.TabStop = false;
BtnSCVI.Text = "SCVI";
@@ -134,9 +135,9 @@ partial class MainWindow
BtnPLA.AccessibleName = "";
BtnPLA.Cursor = Cursors.Hand;
BtnPLA.FlatStyle = FlatStyle.Flat;
BtnPLA.Location = new Point(431, 37);
BtnPLA.Location = new Point(356, 37);
BtnPLA.Name = "BtnPLA";
BtnPLA.Size = new Size(136, 60);
BtnPLA.Size = new Size(111, 60);
BtnPLA.TabIndex = 4;
BtnPLA.TabStop = false;
BtnPLA.Text = "PLA";
@@ -148,7 +149,6 @@ partial class MainWindow
ListBoxWC.AllowDrop = true;
ListBoxWC.DrawMode = DrawMode.OwnerDrawFixed;
ListBoxWC.FormattingEnabled = true;
ListBoxWC.ItemHeight = 20;
ListBoxWC.Location = new Point(7, 96);
ListBoxWC.Name = "ListBoxWC";
ListBoxWC.Size = new Size(214, 304);
@@ -196,7 +196,7 @@ partial class MainWindow
GrpBCAT.Enabled = false;
GrpBCAT.Location = new Point(5, 103);
GrpBCAT.Name = "GrpBCAT";
GrpBCAT.Size = new Size(704, 409);
GrpBCAT.Size = new Size(696, 409);
GrpBCAT.TabIndex = 8;
GrpBCAT.TabStop = false;
GrpBCAT.Text = "BCAT Manager";
@@ -404,7 +404,7 @@ partial class MainWindow
MenuStrip.Items.AddRange(new ToolStripItem[] { ToolsToolStripMenu });
MenuStrip.Location = new Point(0, 0);
MenuStrip.Name = "MenuStrip";
MenuStrip.Size = new Size(715, 28);
MenuStrip.Size = new Size(709, 28);
MenuStrip.TabIndex = 9;
MenuStrip.Text = "menuStrip1";
//
@@ -432,12 +432,28 @@ partial class MainWindow
toolTipRedemptionMethod.ToolTipIcon = ToolTipIcon.Info;
toolTipRedemptionMethod.ToolTipTitle = "Redemption Date";
//
// BtnZA
//
BtnZA.AccessibleDescription = "";
BtnZA.AccessibleName = "";
BtnZA.Cursor = Cursors.Hand;
BtnZA.FlatStyle = FlatStyle.Flat;
BtnZA.Location = new Point(590, 37);
BtnZA.Name = "BtnZA";
BtnZA.Size = new Size(111, 60);
BtnZA.TabIndex = 10;
BtnZA.TabStop = false;
BtnZA.Text = "ZA";
BtnZA.UseVisualStyleBackColor = true;
BtnZA.Click += BtnZA_Click;
//
// MainWindow
//
AllowDrop = true;
AutoScaleDimensions = new SizeF(8F, 20F);
AutoScaleMode = AutoScaleMode.Font;
ClientSize = new Size(715, 518);
ClientSize = new Size(709, 518);
Controls.Add(BtnZA);
Controls.Add(MenuStrip);
Controls.Add(GrpBCAT);
Controls.Add(BtnPLA);
@@ -498,4 +514,5 @@ partial class MainWindow
private Label lblRedemptionMethod;
private ToolTip toolTipRedemptionMethod;
private ComboBox cmbRedemptionMethod;
private Button BtnZA;
}

View File

@@ -17,6 +17,7 @@ public partial class MainWindow : Form
private BCATManager PackageBDSP = new(Games.BDSP);
private BCATManager PackagePLA = new(Games.PLA);
private BCATManager PackageSCVI = new(Games.SCVI);
private BCATManager PackageZA = new(Games.ZA);
private List<ushort> Duplicated = new List<ushort>();
public MainWindow()
@@ -59,12 +60,14 @@ public partial class MainWindow : Form
BtnBDSP.Enabled = true;
BtnPLA.Enabled = true;
BtnSCVI.Enabled = true;
BtnZA.Enabled = true;
BtnLGPE.Font = new Font(BtnLGPE.Font.Name, BtnLGPE.Font.Size, FontStyle.Regular);
BtnSWSH.Font = new Font(BtnSWSH.Font.Name, BtnSWSH.Font.Size, FontStyle.Regular);
BtnBDSP.Font = new Font(BtnBDSP.Font.Name, BtnBDSP.Font.Size, FontStyle.Regular);
BtnPLA.Font = new Font(BtnPLA.Font.Name, BtnPLA.Font.Size, FontStyle.Regular);
BtnSCVI.Font = new Font(BtnSCVI.Font.Name, BtnSCVI.Font.Size, FontStyle.Regular);
BtnZA.Font = new Font(BtnZA.Font.Name, BtnZA.Font.Size, FontStyle.Regular);
}
private void EditFileFilter()
@@ -76,6 +79,7 @@ public partial class MainWindow : Form
Games.BDSP => "wb8 files (*.wb8)|*.wb8|All files (*.*)|*.*",
Games.PLA => "wa8 files (*.wa8)|*.wa8|All files (*.*)|*.*",
Games.SCVI => "wc9 files (*.wc9)|*.wc9|All files (*.*)|*.*",
Games.ZA => "wa9 files (*.wa9)|*.wa9|All files (*.*)|*.*",
_ => "All files (*.*)|*.*",
};
}
@@ -89,6 +93,7 @@ public partial class MainWindow : Form
Games.BDSP => BtnBDSP,
Games.PLA => BtnPLA,
Games.SCVI => BtnSCVI,
Games.ZA => BtnZA,
_ => throw new ArgumentOutOfRangeException(),
};
EditSelectedButton(btn);
@@ -112,6 +117,7 @@ public partial class MainWindow : Form
Games.BDSP => PackageBDSP.GetListNames(),
Games.PLA => PackagePLA.GetListNames(),
Games.SCVI => PackageSCVI.GetListNames(),
Games.ZA => PackageZA.GetListNames(),
_ => throw new ArgumentOutOfRangeException(),
};
@@ -144,6 +150,7 @@ public partial class MainWindow : Form
Games.BDSP => PackageBDSP,
Games.PLA => PackagePLA,
Games.SCVI => PackageSCVI,
Games.ZA => PackageZA,
_ => throw new ArgumentOutOfRangeException(),
};
}
@@ -190,6 +197,8 @@ public partial class MainWindow : Form
private void BtnSCVI_Click(object sender, EventArgs e) => ChangeGame(Games.SCVI);
private void BtnZA_Click(object sender, EventArgs e) => ChangeGame(Games.ZA);
private void BtnSave_Click(object sender, EventArgs e)
{
this.Enabled = false;

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Microsoft ResX Schema
Version 2.0
@@ -18,7 +18,7 @@
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing"">Blue</data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
@@ -48,7 +48,7 @@
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter

View File

@@ -87,9 +87,9 @@ public partial class MgdbForm : Form
var swshPath = Path.Combine(Path.Combine(genPath, "Gen 8"), "SwSh");
Directory.Delete(Path.Combine(swshPath, "Wild Area Events"), true);
var gen9Path = Path.Combine(genPath, "Gen 9");
Directory.Delete(Path.Combine(gen9Path, "Raid Events"), true);
Directory.Delete(Path.Combine(gen9Path, "Outbreak Events"), true);
var svPath = Path.Combine(genPath, "Gen 9", "SV");
Directory.Delete(Path.Combine(svPath, "Raid Events"), true);
Directory.Delete(Path.Combine(svPath, "Outbreak Events"), true);
Directory.Move(tmpMgbdPath, mgdbPath);
Directory.Delete(path, true);