Compare commits
2 Commits
21906c49f4
...
fcd47415f5
Author | SHA1 | Date | |
---|---|---|---|
fcd47415f5 | |||
b3a9d0a2ac |
|
@ -23,7 +23,7 @@ namespace LibW4M.Data.Highscores
|
|||
int highscoresLen = decompressedCollective[highscoreStart];
|
||||
for (int i = 0; i < highscoresLen; i++)
|
||||
{
|
||||
HighscoreData highscoreData = new HighscoreData(fileBelongs, fileBelongs.xomFile.GetContainerById(decompressedCollective[highscoreStart + i + 1]));
|
||||
HighscoreData highscoreData = new HighscoreData(fileBelongs, fileBelongs.LookupContainerById(decompressedCollective[highscoreStart + i + 1]));
|
||||
collectiveEntries.Add(highscoreData);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -33,7 +33,6 @@ namespace LibW4M.Data
|
|||
}
|
||||
public SaveDataCollective(W4SaveFile fileBelongs, XomContainer mainContainer) : base(fileBelongs, mainContainer)
|
||||
{
|
||||
this.fileBelongs.collectives.Add(this);
|
||||
}
|
||||
|
||||
public virtual void Delete(SaveDataEntry store)
|
||||
|
|
|
@ -95,8 +95,8 @@ namespace LibW4M.Data.Schemes
|
|||
public int HealthInCrates;
|
||||
|
||||
public Stockpiling Stockpiling;
|
||||
public SuddenDeath SuddenDeath; // TODO: make this an enum too
|
||||
public WaterSpeed WaterSpeed; // TODO: make this an enum too
|
||||
public SuddenDeath SuddenDeath;
|
||||
public WaterSpeed WaterSpeed;
|
||||
|
||||
public int DisplayTime;
|
||||
public int LandTime;
|
||||
|
@ -126,63 +126,63 @@ namespace LibW4M.Data.Schemes
|
|||
|
||||
// Read WeaponSettingsData
|
||||
|
||||
this.Airstrike = new WeaponSettingsData(fileBelongs, fileBelongs.xomFile.GetContainerById(reader.ReadCompressedInt()));
|
||||
this.BananaBomb = new WeaponSettingsData(fileBelongs, fileBelongs.xomFile.GetContainerById(reader.ReadCompressedInt()));
|
||||
this.BaseballBat = new WeaponSettingsData(fileBelongs, fileBelongs.xomFile.GetContainerById(reader.ReadCompressedInt()));
|
||||
this.Bazooka = new WeaponSettingsData(fileBelongs, fileBelongs.xomFile.GetContainerById(reader.ReadCompressedInt()));
|
||||
this.ClusterGrenade = new WeaponSettingsData(fileBelongs, fileBelongs.xomFile.GetContainerById(reader.ReadCompressedInt()));
|
||||
this.ConcreteDonkey = new WeaponSettingsData(fileBelongs, fileBelongs.xomFile.GetContainerById(reader.ReadCompressedInt()));
|
||||
this.CrateShower = new WeaponSettingsData(fileBelongs, fileBelongs.xomFile.GetContainerById(reader.ReadCompressedInt()));
|
||||
this.CrateSpy = new WeaponSettingsData(fileBelongs, fileBelongs.xomFile.GetContainerById(reader.ReadCompressedInt()));
|
||||
this.DoubleDamage = new WeaponSettingsData(fileBelongs, fileBelongs.xomFile.GetContainerById(reader.ReadCompressedInt()));
|
||||
this.Dynamite = new WeaponSettingsData(fileBelongs, fileBelongs.xomFile.GetContainerById(reader.ReadCompressedInt()));
|
||||
this.FirePunch = new WeaponSettingsData(fileBelongs, fileBelongs.xomFile.GetContainerById(reader.ReadCompressedInt()));
|
||||
this.GasCanister = new WeaponSettingsData(fileBelongs, fileBelongs.xomFile.GetContainerById(reader.ReadCompressedInt()));
|
||||
this.Girder = new WeaponSettingsData(fileBelongs, fileBelongs.xomFile.GetContainerById(reader.ReadCompressedInt()));
|
||||
this.Grenade = new WeaponSettingsData(fileBelongs, fileBelongs.xomFile.GetContainerById(reader.ReadCompressedInt()));
|
||||
this.HolyHandGrenade = new WeaponSettingsData(fileBelongs, fileBelongs.xomFile.GetContainerById(reader.ReadCompressedInt()));
|
||||
this.HomingMissile = new WeaponSettingsData(fileBelongs, fileBelongs.xomFile.GetContainerById(reader.ReadCompressedInt()));
|
||||
this.Jetpack = new WeaponSettingsData(fileBelongs, fileBelongs.xomFile.GetContainerById(reader.ReadCompressedInt()));
|
||||
this.Landmine = new WeaponSettingsData(fileBelongs, fileBelongs.xomFile.GetContainerById(reader.ReadCompressedInt()));
|
||||
this.NinjaRope = new WeaponSettingsData(fileBelongs, fileBelongs.xomFile.GetContainerById(reader.ReadCompressedInt()));
|
||||
this.OldWoman = new WeaponSettingsData(fileBelongs, fileBelongs.xomFile.GetContainerById(reader.ReadCompressedInt()));
|
||||
this.Parachute = new WeaponSettingsData(fileBelongs, fileBelongs.xomFile.GetContainerById(reader.ReadCompressedInt()));
|
||||
this.Prod = new WeaponSettingsData(fileBelongs, fileBelongs.xomFile.GetContainerById(reader.ReadCompressedInt()));
|
||||
this.SelectWorm = new WeaponSettingsData(fileBelongs, fileBelongs.xomFile.GetContainerById(reader.ReadCompressedInt()));
|
||||
this.Sheep = new WeaponSettingsData(fileBelongs, fileBelongs.xomFile.GetContainerById(reader.ReadCompressedInt()));
|
||||
this.Shotgun = new WeaponSettingsData(fileBelongs, fileBelongs.xomFile.GetContainerById(reader.ReadCompressedInt()));
|
||||
this.SkipGo = new WeaponSettingsData(fileBelongs, fileBelongs.xomFile.GetContainerById(reader.ReadCompressedInt()));
|
||||
this.SuperSheep = new WeaponSettingsData(fileBelongs, fileBelongs.xomFile.GetContainerById(reader.ReadCompressedInt()));
|
||||
this.Redbull = new WeaponSettingsData(fileBelongs, fileBelongs.xomFile.GetContainerById(reader.ReadCompressedInt()));
|
||||
this.Flood = new WeaponSettingsData(fileBelongs, fileBelongs.xomFile.GetContainerById(reader.ReadCompressedInt()));
|
||||
this.Armour = new WeaponSettingsData(fileBelongs, fileBelongs.xomFile.GetContainerById(reader.ReadCompressedInt()));
|
||||
this.WeaponFactoryWeapon = new WeaponSettingsData(fileBelongs, fileBelongs.xomFile.GetContainerById(reader.ReadCompressedInt()));
|
||||
this.AlienAbduction = new WeaponSettingsData(fileBelongs, fileBelongs.xomFile.GetContainerById(reader.ReadCompressedInt()));
|
||||
this.Fatkins = new WeaponSettingsData(fileBelongs, fileBelongs.xomFile.GetContainerById(reader.ReadCompressedInt()));
|
||||
this.Scouser = new WeaponSettingsData(fileBelongs, fileBelongs.xomFile.GetContainerById(reader.ReadCompressedInt()));
|
||||
this.NoMoreNails = new WeaponSettingsData(fileBelongs, fileBelongs.xomFile.GetContainerById(reader.ReadCompressedInt()));
|
||||
this.PoisonArrow = new WeaponSettingsData(fileBelongs, fileBelongs.xomFile.GetContainerById(reader.ReadCompressedInt()));
|
||||
this.SentryGun = new WeaponSettingsData(fileBelongs, fileBelongs.xomFile.GetContainerById(reader.ReadCompressedInt()));
|
||||
this.SniperRifle = new WeaponSettingsData(fileBelongs, fileBelongs.xomFile.GetContainerById(reader.ReadCompressedInt()));
|
||||
this.SuperAirstrike = new WeaponSettingsData(fileBelongs, fileBelongs.xomFile.GetContainerById(reader.ReadCompressedInt()));
|
||||
this.BubbleTrouble = new WeaponSettingsData(fileBelongs, fileBelongs.xomFile.GetContainerById(reader.ReadCompressedInt()));
|
||||
this.Starburst = new WeaponSettingsData(fileBelongs, fileBelongs.xomFile.GetContainerById(reader.ReadCompressedInt()));
|
||||
this.Surrender = new WeaponSettingsData(fileBelongs, fileBelongs.xomFile.GetContainerById(reader.ReadCompressedInt()));
|
||||
this.MineLayerMystery = new WeaponSettingsData(fileBelongs, fileBelongs.xomFile.GetContainerById(reader.ReadCompressedInt()));
|
||||
this.MineTripletMystery = new WeaponSettingsData(fileBelongs, fileBelongs.xomFile.GetContainerById(reader.ReadCompressedInt()));
|
||||
this.BarrelTripletMystery = new WeaponSettingsData(fileBelongs, fileBelongs.xomFile.GetContainerById(reader.ReadCompressedInt()));
|
||||
this.FloodMystery = new WeaponSettingsData(fileBelongs, fileBelongs.xomFile.GetContainerById(reader.ReadCompressedInt()));
|
||||
this.DisarmMystery = new WeaponSettingsData(fileBelongs, fileBelongs.xomFile.GetContainerById(reader.ReadCompressedInt()));
|
||||
this.TeleportMystery = new WeaponSettingsData(fileBelongs, fileBelongs.xomFile.GetContainerById(reader.ReadCompressedInt()));
|
||||
this.QuickWalkMystery = new WeaponSettingsData(fileBelongs, fileBelongs.xomFile.GetContainerById(reader.ReadCompressedInt()));
|
||||
this.LowGravityMystery = new WeaponSettingsData(fileBelongs, fileBelongs.xomFile.GetContainerById(reader.ReadCompressedInt()));
|
||||
this.DoubleTurnTimeMystery = new WeaponSettingsData(fileBelongs, fileBelongs.xomFile.GetContainerById(reader.ReadCompressedInt()));
|
||||
this.HealthMystery = new WeaponSettingsData(fileBelongs, fileBelongs.xomFile.GetContainerById(reader.ReadCompressedInt()));
|
||||
this.DamageMystery = new WeaponSettingsData(fileBelongs, fileBelongs.xomFile.GetContainerById(reader.ReadCompressedInt()));
|
||||
this.SuperHealthMystery = new WeaponSettingsData(fileBelongs, fileBelongs.xomFile.GetContainerById(reader.ReadCompressedInt()));
|
||||
this.SpecialWeaponMystery = new WeaponSettingsData(fileBelongs, fileBelongs.xomFile.GetContainerById(reader.ReadCompressedInt()));
|
||||
this.BadPoisonMystery = new WeaponSettingsData(fileBelongs, fileBelongs.xomFile.GetContainerById(reader.ReadCompressedInt()));
|
||||
this.GoodPoisonMystery = new WeaponSettingsData(fileBelongs, fileBelongs.xomFile.GetContainerById(reader.ReadCompressedInt()));
|
||||
this.Airstrike = new WeaponSettingsData(fileBelongs, fileBelongs.LookupContainerById(reader.ReadCompressedInt()));
|
||||
this.BananaBomb = new WeaponSettingsData(fileBelongs, fileBelongs.LookupContainerById(reader.ReadCompressedInt()));
|
||||
this.BaseballBat = new WeaponSettingsData(fileBelongs, fileBelongs.LookupContainerById(reader.ReadCompressedInt()));
|
||||
this.Bazooka = new WeaponSettingsData(fileBelongs, fileBelongs.LookupContainerById(reader.ReadCompressedInt()));
|
||||
this.ClusterGrenade = new WeaponSettingsData(fileBelongs, fileBelongs.LookupContainerById(reader.ReadCompressedInt()));
|
||||
this.ConcreteDonkey = new WeaponSettingsData(fileBelongs, fileBelongs.LookupContainerById(reader.ReadCompressedInt()));
|
||||
this.CrateShower = new WeaponSettingsData(fileBelongs, fileBelongs.LookupContainerById(reader.ReadCompressedInt()));
|
||||
this.CrateSpy = new WeaponSettingsData(fileBelongs, fileBelongs.LookupContainerById(reader.ReadCompressedInt()));
|
||||
this.DoubleDamage = new WeaponSettingsData(fileBelongs, fileBelongs.LookupContainerById(reader.ReadCompressedInt()));
|
||||
this.Dynamite = new WeaponSettingsData(fileBelongs, fileBelongs.LookupContainerById(reader.ReadCompressedInt()));
|
||||
this.FirePunch = new WeaponSettingsData(fileBelongs, fileBelongs.LookupContainerById(reader.ReadCompressedInt()));
|
||||
this.GasCanister = new WeaponSettingsData(fileBelongs, fileBelongs.LookupContainerById(reader.ReadCompressedInt()));
|
||||
this.Girder = new WeaponSettingsData(fileBelongs, fileBelongs.LookupContainerById(reader.ReadCompressedInt()));
|
||||
this.Grenade = new WeaponSettingsData(fileBelongs, fileBelongs.LookupContainerById(reader.ReadCompressedInt()));
|
||||
this.HolyHandGrenade = new WeaponSettingsData(fileBelongs, fileBelongs.LookupContainerById(reader.ReadCompressedInt()));
|
||||
this.HomingMissile = new WeaponSettingsData(fileBelongs, fileBelongs.LookupContainerById(reader.ReadCompressedInt()));
|
||||
this.Jetpack = new WeaponSettingsData(fileBelongs, fileBelongs.LookupContainerById(reader.ReadCompressedInt()));
|
||||
this.Landmine = new WeaponSettingsData(fileBelongs, fileBelongs.LookupContainerById(reader.ReadCompressedInt()));
|
||||
this.NinjaRope = new WeaponSettingsData(fileBelongs, fileBelongs.LookupContainerById(reader.ReadCompressedInt()));
|
||||
this.OldWoman = new WeaponSettingsData(fileBelongs, fileBelongs.LookupContainerById(reader.ReadCompressedInt()));
|
||||
this.Parachute = new WeaponSettingsData(fileBelongs, fileBelongs.LookupContainerById(reader.ReadCompressedInt()));
|
||||
this.Prod = new WeaponSettingsData(fileBelongs, fileBelongs.LookupContainerById(reader.ReadCompressedInt()));
|
||||
this.SelectWorm = new WeaponSettingsData(fileBelongs, fileBelongs.LookupContainerById(reader.ReadCompressedInt()));
|
||||
this.Sheep = new WeaponSettingsData(fileBelongs, fileBelongs.LookupContainerById(reader.ReadCompressedInt()));
|
||||
this.Shotgun = new WeaponSettingsData(fileBelongs, fileBelongs.LookupContainerById(reader.ReadCompressedInt()));
|
||||
this.SkipGo = new WeaponSettingsData(fileBelongs, fileBelongs.LookupContainerById(reader.ReadCompressedInt()));
|
||||
this.SuperSheep = new WeaponSettingsData(fileBelongs, fileBelongs.LookupContainerById(reader.ReadCompressedInt()));
|
||||
this.Redbull = new WeaponSettingsData(fileBelongs, fileBelongs.LookupContainerById(reader.ReadCompressedInt()));
|
||||
this.Flood = new WeaponSettingsData(fileBelongs, fileBelongs.LookupContainerById(reader.ReadCompressedInt()));
|
||||
this.Armour = new WeaponSettingsData(fileBelongs, fileBelongs.LookupContainerById(reader.ReadCompressedInt()));
|
||||
this.WeaponFactoryWeapon = new WeaponSettingsData(fileBelongs, fileBelongs.LookupContainerById(reader.ReadCompressedInt()));
|
||||
this.AlienAbduction = new WeaponSettingsData(fileBelongs, fileBelongs.LookupContainerById(reader.ReadCompressedInt()));
|
||||
this.Fatkins = new WeaponSettingsData(fileBelongs, fileBelongs.LookupContainerById(reader.ReadCompressedInt()));
|
||||
this.Scouser = new WeaponSettingsData(fileBelongs, fileBelongs.LookupContainerById(reader.ReadCompressedInt()));
|
||||
this.NoMoreNails = new WeaponSettingsData(fileBelongs, fileBelongs.LookupContainerById(reader.ReadCompressedInt()));
|
||||
this.PoisonArrow = new WeaponSettingsData(fileBelongs, fileBelongs.LookupContainerById(reader.ReadCompressedInt()));
|
||||
this.SentryGun = new WeaponSettingsData(fileBelongs, fileBelongs.LookupContainerById(reader.ReadCompressedInt()));
|
||||
this.SniperRifle = new WeaponSettingsData(fileBelongs, fileBelongs.LookupContainerById(reader.ReadCompressedInt()));
|
||||
this.SuperAirstrike = new WeaponSettingsData(fileBelongs, fileBelongs.LookupContainerById(reader.ReadCompressedInt()));
|
||||
this.BubbleTrouble = new WeaponSettingsData(fileBelongs, fileBelongs.LookupContainerById(reader.ReadCompressedInt()));
|
||||
this.Starburst = new WeaponSettingsData(fileBelongs, fileBelongs.LookupContainerById(reader.ReadCompressedInt()));
|
||||
this.Surrender = new WeaponSettingsData(fileBelongs, fileBelongs.LookupContainerById(reader.ReadCompressedInt()));
|
||||
this.MineLayerMystery = new WeaponSettingsData(fileBelongs, fileBelongs.LookupContainerById(reader.ReadCompressedInt()));
|
||||
this.MineTripletMystery = new WeaponSettingsData(fileBelongs, fileBelongs.LookupContainerById(reader.ReadCompressedInt()));
|
||||
this.BarrelTripletMystery = new WeaponSettingsData(fileBelongs, fileBelongs.LookupContainerById(reader.ReadCompressedInt()));
|
||||
this.FloodMystery = new WeaponSettingsData(fileBelongs, fileBelongs.LookupContainerById(reader.ReadCompressedInt()));
|
||||
this.DisarmMystery = new WeaponSettingsData(fileBelongs, fileBelongs.LookupContainerById(reader.ReadCompressedInt()));
|
||||
this.TeleportMystery = new WeaponSettingsData(fileBelongs, fileBelongs.LookupContainerById(reader.ReadCompressedInt()));
|
||||
this.QuickWalkMystery = new WeaponSettingsData(fileBelongs, fileBelongs.LookupContainerById(reader.ReadCompressedInt()));
|
||||
this.LowGravityMystery = new WeaponSettingsData(fileBelongs, fileBelongs.LookupContainerById(reader.ReadCompressedInt()));
|
||||
this.DoubleTurnTimeMystery = new WeaponSettingsData(fileBelongs, fileBelongs.LookupContainerById(reader.ReadCompressedInt()));
|
||||
this.HealthMystery = new WeaponSettingsData(fileBelongs, fileBelongs.LookupContainerById(reader.ReadCompressedInt()));
|
||||
this.DamageMystery = new WeaponSettingsData(fileBelongs, fileBelongs.LookupContainerById(reader.ReadCompressedInt()));
|
||||
this.SuperHealthMystery = new WeaponSettingsData(fileBelongs, fileBelongs.LookupContainerById(reader.ReadCompressedInt()));
|
||||
this.SpecialWeaponMystery = new WeaponSettingsData(fileBelongs, fileBelongs.LookupContainerById(reader.ReadCompressedInt()));
|
||||
this.BadPoisonMystery = new WeaponSettingsData(fileBelongs, fileBelongs.LookupContainerById(reader.ReadCompressedInt()));
|
||||
this.GoodPoisonMystery = new WeaponSettingsData(fileBelongs, fileBelongs.LookupContainerById(reader.ReadCompressedInt()));
|
||||
|
||||
this.ArtileryMode = reader.ReadInt32();
|
||||
this.TeleportIn = reader.ReadInt32();
|
||||
|
|
|
@ -19,7 +19,7 @@ namespace LibW4M.Data.Schemes
|
|||
int[] collective = mainContainer.Decompress();
|
||||
for (int i = 0; i < collective[0]; i++)
|
||||
{
|
||||
SchemeData scheme = new SchemeData(this.fileBelongs, this.fileBelongs.xomFile.GetContainerById(collective[i + 1]));
|
||||
SchemeData scheme = new SchemeData(this.fileBelongs, this.fileBelongs.LookupContainerById(collective[i + 1]));
|
||||
base.collectiveEntries.Add(scheme);
|
||||
}
|
||||
}
|
||||
|
|
86
LibW4M/Data/Stats/StatsCollective.cs
Normal file
86
LibW4M/Data/Stats/StatsCollective.cs
Normal file
|
@ -0,0 +1,86 @@
|
|||
using LibW4M.Data.Teams;
|
||||
using LibXom.Data;
|
||||
using LibXom.Streams;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace LibW4M.Data.Stats
|
||||
{
|
||||
public class StatsCollective : SaveDataCollective
|
||||
{
|
||||
private List<StatsContainerData> teamStats = new List<StatsContainerData>();
|
||||
private List<XomString> teamNames = new List<XomString>();
|
||||
public StatsCollective(W4SaveFile fileBelongs, XomContainer mainContainer) : base(fileBelongs, mainContainer)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Load()
|
||||
{
|
||||
int[] decompressedCollective = mainContainer.Decompress();
|
||||
int numStats = decompressedCollective[0];
|
||||
for (int i = 0; i < numStats; i++)
|
||||
{
|
||||
StatsContainerData stat = new StatsContainerData(this.fileBelongs, this.fileBelongs.LookupContainerById(decompressedCollective[i + 1]));
|
||||
this.collectiveEntries.Add(stat);
|
||||
}
|
||||
|
||||
int teamStatsStart = (1 + numStats) + 1;
|
||||
int numTeamStats = decompressedCollective[(1 + numStats)];
|
||||
for (int i = 0; i < numTeamStats; i++)
|
||||
{
|
||||
StatsContainerData teamStat = new StatsContainerData(this.fileBelongs, this.fileBelongs.LookupContainerById(decompressedCollective[i + (teamStatsStart)]));
|
||||
this.teamStats.Add(teamStat);
|
||||
}
|
||||
|
||||
int teamNamesStart = ((((1 + numStats) + 1) + numTeamStats) + 1);
|
||||
int numTeamNames = decompressedCollective[(((1 + numStats) + 1) + numTeamStats)];
|
||||
for (int i = 0; i < numTeamNames; i++)
|
||||
{
|
||||
this.teamNames.Add(this.fileBelongs.LookupStringFromId(decompressedCollective[i + (teamNamesStart)]));
|
||||
}
|
||||
}
|
||||
|
||||
public override void Save()
|
||||
{
|
||||
int numStats = this.collectiveEntries.Count;
|
||||
int numTeamStats = this.teamStats.Count;
|
||||
int numTeamNames = this.teamNames.Count;
|
||||
|
||||
|
||||
// Save regular stats
|
||||
int statsStart = 1;
|
||||
int[] collective = new int[(numStats + 1) + (numTeamStats + 1) + (numTeamNames + 1)];
|
||||
collective[statsStart - 1] = numStats;
|
||||
|
||||
for(int i = 0; i < numStats; i++)
|
||||
{
|
||||
this.collectiveEntries[i].Save();
|
||||
collective[statsStart + i] = this.collectiveEntries[i].containerId;
|
||||
}
|
||||
|
||||
// Save team stats
|
||||
int teamStatsStart = (1 + numStats) + 1;
|
||||
collective[teamStatsStart-1] = numTeamStats;
|
||||
|
||||
for (int i = 0; i < numTeamStats; i++)
|
||||
{
|
||||
this.teamStats[i].Save();
|
||||
|
||||
collective[teamStatsStart + i] = this.teamStats[i].containerId;
|
||||
}
|
||||
|
||||
// Save team names
|
||||
int teamNamesStart = ((1 + numStats) + (1 + numTeamStats) + 1);
|
||||
collective[teamNamesStart - 1] = numTeamNames;
|
||||
for (int i = 0; i < numTeamStats; i++)
|
||||
{
|
||||
collective[teamNamesStart + i] = this.teamNames[i].Id;
|
||||
}
|
||||
|
||||
mainContainer.CompressAndUpdate(collective);
|
||||
}
|
||||
}
|
||||
}
|
46
LibW4M/Data/Stats/StatsContainerData.cs
Normal file
46
LibW4M/Data/Stats/StatsContainerData.cs
Normal file
|
@ -0,0 +1,46 @@
|
|||
using LibXom.Data;
|
||||
using LibXom.Streams;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace LibW4M.Data.Stats
|
||||
{
|
||||
public class StatsContainerData : SaveDataEntry
|
||||
{
|
||||
int[] Values;
|
||||
public StatsContainerData(W4SaveFile fileBelongs, XomContainer mainContainer) : base(fileBelongs, mainContainer)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Load()
|
||||
{
|
||||
using (XomStreamReader reader = new XomStreamReader(new MemoryStream(this.mainContainer.GetData())))
|
||||
{
|
||||
reader.Skip(3);
|
||||
|
||||
Values = reader.ReadInt32Array();
|
||||
}
|
||||
}
|
||||
|
||||
public override void Save()
|
||||
{
|
||||
using (MemoryStream ms = new MemoryStream())
|
||||
{
|
||||
using (XomStreamWriter writer = new XomStreamWriter(ms))
|
||||
{
|
||||
writer.Skip(3);
|
||||
|
||||
writer.WriteInt32Array(Values);
|
||||
|
||||
ms.Seek(0x00, SeekOrigin.Begin);
|
||||
mainContainer.SetData(ms.ToArray());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
|
@ -20,6 +20,34 @@ namespace LibW4M.Data.Teams
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
private int weaponContainerId;
|
||||
private int clusterContainerId;
|
||||
|
||||
|
||||
public WeaponData SecretWeapon
|
||||
{
|
||||
get
|
||||
{
|
||||
return fileBelongs.findWeaponWithContainerId(weaponContainerId);
|
||||
}
|
||||
set
|
||||
{
|
||||
weaponContainerId = value.containerId;
|
||||
}
|
||||
}
|
||||
public WeaponData SecretWeaponCluster
|
||||
{
|
||||
get
|
||||
{
|
||||
return fileBelongs.findWeaponWithContainerId(clusterContainerId);
|
||||
}
|
||||
set
|
||||
{
|
||||
clusterContainerId = value.containerId;
|
||||
}
|
||||
}
|
||||
|
||||
public XomString Name;
|
||||
public XomString[] Worms;
|
||||
public int TutorialsDone;
|
||||
|
@ -33,8 +61,6 @@ namespace LibW4M.Data.Teams
|
|||
public bool AllTutorialsDone;
|
||||
public bool AllMissionsDone;
|
||||
public XomString Player;
|
||||
public WeaponData SecretWeapon;
|
||||
public WeaponData SecretWeaponCluster;
|
||||
public XomString CustomWeapon;
|
||||
public XomString Hat;
|
||||
public XomString Gloves;
|
||||
|
@ -66,8 +92,9 @@ namespace LibW4M.Data.Teams
|
|||
this.AllMissionsDone = reader.ReadBool();
|
||||
this.Player = fileBelongs.LookupStringFromId(reader.ReadCompressedInt());
|
||||
|
||||
this.SecretWeapon = fileBelongs.findWeaponWithContainerId(reader.ReadCompressedInt());
|
||||
this.SecretWeaponCluster = fileBelongs.findWeaponWithContainerId(reader.ReadCompressedInt());
|
||||
this.weaponContainerId = reader.ReadCompressedInt();
|
||||
this.clusterContainerId = reader.ReadCompressedInt();
|
||||
|
||||
this.CustomWeapon = fileBelongs.LookupStringFromId(reader.ReadCompressedInt());
|
||||
|
||||
this.Hat = fileBelongs.LookupStringFromId(reader.ReadCompressedInt());
|
||||
|
@ -90,6 +117,7 @@ namespace LibW4M.Data.Teams
|
|||
using (XomStreamWriter writer = new XomStreamWriter(ms))
|
||||
{
|
||||
writer.Skip(3);
|
||||
|
||||
writer.WriteCompressedInt(this.Name.Id);
|
||||
writer.WriteCompressedIntArray(this.fileBelongs.XomStringArrayToIntArray(this.Worms));
|
||||
writer.WriteInt32(this.TutorialsDone);
|
||||
|
|
|
@ -20,7 +20,7 @@ namespace LibW4M.Data.Teams
|
|||
int numTeams = decompressedCollective[0];
|
||||
for (int i = 0; i < numTeams; i++)
|
||||
{
|
||||
TeamData team = new TeamData(this.fileBelongs, this.fileBelongs.xomFile.GetContainerById(decompressedCollective[i + 1]));
|
||||
TeamData team = new TeamData(this.fileBelongs, this.fileBelongs.LookupContainerById(decompressedCollective[i + 1]));
|
||||
this.collectiveEntries.Add(team);
|
||||
}
|
||||
}
|
||||
|
|
71
LibW4M/Data/WXFE/UnlockableItem/UnlockableItemData.cs
Normal file
71
LibW4M/Data/WXFE/UnlockableItem/UnlockableItemData.cs
Normal file
|
@ -0,0 +1,71 @@
|
|||
using LibW4M.Data.WeaponFactory;
|
||||
using LibXom.Data;
|
||||
using LibXom.Streams;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace LibW4M.Data.WXFE.UnlockableItem
|
||||
{
|
||||
public class UnlockableItemData : SaveDataEntry
|
||||
{
|
||||
public int Type;
|
||||
public int State;
|
||||
public XomString DescriptionName;
|
||||
public int Value;
|
||||
public XomString[] UnlockRequirements;
|
||||
public bool UnlockRequirementsMet;
|
||||
|
||||
internal string? nameOverride;
|
||||
|
||||
public UnlockableItemData(W4SaveFile fileBelongs, XomContainer mainContainer) : base(fileBelongs, mainContainer)
|
||||
{
|
||||
}
|
||||
public override string FriendlyName
|
||||
{
|
||||
get
|
||||
{
|
||||
if (this.nameOverride is not null) return nameOverride;
|
||||
return this.DescriptionName.Value;
|
||||
}
|
||||
}
|
||||
|
||||
public override void Load()
|
||||
{
|
||||
using (XomStreamReader reader = new XomStreamReader(new MemoryStream(this.mainContainer.GetData())))
|
||||
{
|
||||
reader.Skip(3);
|
||||
|
||||
this.Type = reader.ReadInt32();
|
||||
this.State = reader.ReadInt32();
|
||||
this.DescriptionName = this.fileBelongs.LookupStringFromId(reader.ReadCompressedInt());
|
||||
this.Value = reader.ReadInt32();
|
||||
this.UnlockRequirements = fileBelongs.IntArrayToXomStringArray(reader.ReadCompressedIntArray());
|
||||
this.UnlockRequirementsMet = reader.ReadBool();
|
||||
}
|
||||
}
|
||||
|
||||
public override void Save()
|
||||
{
|
||||
using (MemoryStream ms = new MemoryStream())
|
||||
{
|
||||
using (XomStreamWriter writer = new XomStreamWriter(ms))
|
||||
{
|
||||
writer.Skip(3);
|
||||
|
||||
writer.WriteInt32(this.Type);
|
||||
writer.WriteInt32(this.State);
|
||||
writer.WriteCompressedInt(this.DescriptionName.Id);
|
||||
writer.WriteInt32(this.Value);
|
||||
writer.WriteCompressedIntArray(this.fileBelongs.XomStringArrayToIntArray(this.UnlockRequirements));
|
||||
writer.WriteBool(this.UnlockRequirementsMet);
|
||||
|
||||
ms.Seek(0x00, SeekOrigin.Begin);
|
||||
mainContainer.SetData(ms.ToArray());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -28,8 +28,8 @@ namespace LibW4M.Data.WeaponFactory
|
|||
{
|
||||
int[] weaponStore = this.mainContainer.Decompress();
|
||||
this.StockWeapon = (weaponStore[0] == 1);
|
||||
this.weaponContainer = this.fileBelongs.xomFile.GetContainerById(weaponStore[1]);
|
||||
this.clusterContainer = this.fileBelongs.xomFile.GetContainerById(weaponStore[2]);
|
||||
this.weaponContainer = this.fileBelongs.LookupContainerById(weaponStore[1]);
|
||||
this.clusterContainer = this.fileBelongs.LookupContainerById(weaponStore[2]);
|
||||
|
||||
this.Weapon = new WeaponData(this.fileBelongs, this.weaponContainer);
|
||||
this.Cluster = new WeaponData(this.fileBelongs, this.clusterContainer);
|
||||
|
|
|
@ -19,7 +19,7 @@ namespace LibW4M.Data.WeaponFactory
|
|||
int[] collective = mainContainer.Decompress();
|
||||
for (int i = 0; i < collective[0]; i++)
|
||||
{
|
||||
WeaponStore store = new WeaponStore(this.fileBelongs, this.fileBelongs.xomFile.GetContainerById(collective[i + 1]));
|
||||
WeaponStore store = new WeaponStore(this.fileBelongs, this.fileBelongs.LookupContainerById(collective[i + 1]));
|
||||
base.collectiveEntries.Add(store);
|
||||
}
|
||||
}
|
||||
|
|
56
LibW4M/Data/X/ContainerResourceDetail.cs
Normal file
56
LibW4M/Data/X/ContainerResourceDetail.cs
Normal file
|
@ -0,0 +1,56 @@
|
|||
using LibXom.Data;
|
||||
using LibXom.Streams;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace LibW4M.Data.X
|
||||
{
|
||||
public class ContainerResourceDetail : SaveDataEntry
|
||||
{
|
||||
public XomContainer Value;
|
||||
public XomString Name;
|
||||
public int Flags;
|
||||
public ContainerResourceDetail(W4SaveFile fileBelongs, XomContainer mainContainer) : base(fileBelongs, mainContainer)
|
||||
{
|
||||
}
|
||||
public override string FriendlyName
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Name.Value;
|
||||
}
|
||||
}
|
||||
|
||||
public override void Load()
|
||||
{
|
||||
using (XomStreamReader reader = new XomStreamReader(new MemoryStream(this.mainContainer.GetData())))
|
||||
{
|
||||
reader.Skip(3);
|
||||
this.Value = this.fileBelongs.LookupContainerById(reader.ReadCompressedInt());
|
||||
this.Name = this.fileBelongs.LookupStringFromId(reader.ReadCompressedInt());
|
||||
this.Flags = reader.ReadInt32();
|
||||
}
|
||||
}
|
||||
|
||||
public override void Save()
|
||||
{
|
||||
using (MemoryStream ms = new MemoryStream())
|
||||
{
|
||||
using (XomStreamWriter writer = new XomStreamWriter(ms))
|
||||
{
|
||||
writer.Skip(3);
|
||||
|
||||
writer.WriteCompressedInt(this.Value.Id);
|
||||
writer.WriteCompressedInt(this.Name.Id);
|
||||
writer.WriteInt32(this.Flags);
|
||||
|
||||
ms.Seek(0x00, SeekOrigin.Begin);
|
||||
mainContainer.SetData(ms.ToArray());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
111
LibW4M/Data/X/DataBank.cs
Normal file
111
LibW4M/Data/X/DataBank.cs
Normal file
|
@ -0,0 +1,111 @@
|
|||
using LibW4M.Data.Highscores;
|
||||
using LibW4M.Data.Schemes;
|
||||
using LibW4M.Data.Teams;
|
||||
using LibW4M.Data.WeaponFactory;
|
||||
using LibXom.Data;
|
||||
using LibXom.Streams;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Reflection.PortableExecutable;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace LibW4M.Data.X
|
||||
{
|
||||
public class DataBank : SaveDataEntry
|
||||
{
|
||||
public int Section;
|
||||
public IntResourceDetail[] IntResourceDetails;
|
||||
public UIntResourceDetail[] UIntResourceDetails;
|
||||
public StringResourceDetail[] StringResourceDetails;
|
||||
public FloatResourceDetail[] FloatResourceDetails;
|
||||
public VectorResourceDetail[] VectorResourceDetails;
|
||||
public ContainerResourceDetail[] ContainerResourceDetails;
|
||||
|
||||
public DataBank(W4SaveFile fileBelongs, XomContainer mainContainer) : base(fileBelongs, mainContainer)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Load()
|
||||
{
|
||||
using (XomStreamReader reader = new XomStreamReader(new MemoryStream(this.mainContainer.GetData())))
|
||||
{
|
||||
reader.Skip(3);
|
||||
this.Section = reader.ReadCompressedInt();
|
||||
|
||||
int[] intResourceCtnrs = reader.ReadCompressedIntArray();
|
||||
IntResourceDetails = new IntResourceDetail[intResourceCtnrs.Length];
|
||||
|
||||
for (int i = 0; i < IntResourceDetails.Length; i++)
|
||||
IntResourceDetails[i] = new IntResourceDetail(fileBelongs, fileBelongs.LookupContainerById(intResourceCtnrs[i]));
|
||||
|
||||
int[] uintResourceCtnrs = reader.ReadCompressedIntArray();
|
||||
UIntResourceDetails = new UIntResourceDetail[uintResourceCtnrs.Length];
|
||||
|
||||
for (int i = 0; i < UIntResourceDetails.Length; i++)
|
||||
UIntResourceDetails[i] = new UIntResourceDetail(fileBelongs, fileBelongs.LookupContainerById(uintResourceCtnrs[i]));
|
||||
|
||||
int[] stringResourceCtnrs = reader.ReadCompressedIntArray();
|
||||
StringResourceDetails = new StringResourceDetail[stringResourceCtnrs.Length];
|
||||
|
||||
for (int i = 0; i < StringResourceDetails.Length; i++)
|
||||
StringResourceDetails[i] = new StringResourceDetail(fileBelongs, fileBelongs.LookupContainerById(stringResourceCtnrs[i]));
|
||||
|
||||
int[] floatResourceCtnrs = reader.ReadCompressedIntArray();
|
||||
FloatResourceDetails = new FloatResourceDetail[floatResourceCtnrs.Length];
|
||||
|
||||
for (int i = 0; i < FloatResourceDetails.Length; i++)
|
||||
FloatResourceDetails[i] = new FloatResourceDetail(fileBelongs, fileBelongs.LookupContainerById(floatResourceCtnrs[i]));
|
||||
|
||||
int[] vectorResourceCtnrs = reader.ReadCompressedIntArray();
|
||||
VectorResourceDetails = new VectorResourceDetail[vectorResourceCtnrs.Length];
|
||||
|
||||
for (int i = 0; i < VectorResourceDetails.Length; i++)
|
||||
VectorResourceDetails[i] = new VectorResourceDetail(fileBelongs, fileBelongs.LookupContainerById(vectorResourceCtnrs[i]));
|
||||
|
||||
int[] containerResourceCtnrs = reader.ReadCompressedIntArray();
|
||||
ContainerResourceDetails = new ContainerResourceDetail[containerResourceCtnrs.Length];
|
||||
|
||||
for (int i = 0; i < ContainerResourceDetails.Length; i++)
|
||||
ContainerResourceDetails[i] = new ContainerResourceDetail(fileBelongs, fileBelongs.LookupContainerById(containerResourceCtnrs[i]));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public void writeResourceDetail(XomStreamWriter writer, SaveDataEntry[] resourceDetails)
|
||||
{
|
||||
int[] inArr = new int[resourceDetails.Length];
|
||||
|
||||
for(int i = 0; i < resourceDetails.Length; i++)
|
||||
{
|
||||
resourceDetails[i].Save();
|
||||
inArr[i] = resourceDetails[i].containerId;
|
||||
}
|
||||
|
||||
writer.WriteCompressedIntArray(inArr);
|
||||
}
|
||||
public override void Save()
|
||||
{
|
||||
using (MemoryStream ms = new MemoryStream())
|
||||
{
|
||||
using (XomStreamWriter writer = new XomStreamWriter(ms))
|
||||
{
|
||||
writer.Skip(3);
|
||||
|
||||
writer.WriteCompressedInt(this.Section);
|
||||
|
||||
writeResourceDetail(writer, IntResourceDetails);
|
||||
writeResourceDetail(writer, UIntResourceDetails);
|
||||
writeResourceDetail(writer, StringResourceDetails);
|
||||
writeResourceDetail(writer, FloatResourceDetails);
|
||||
writeResourceDetail(writer, VectorResourceDetails);
|
||||
writeResourceDetail(writer, ContainerResourceDetails);
|
||||
|
||||
ms.Seek(0x00, SeekOrigin.Begin);
|
||||
mainContainer.SetData(ms.ToArray());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
47
LibW4M/Data/X/FloatResourceDetail.cs
Normal file
47
LibW4M/Data/X/FloatResourceDetail.cs
Normal file
|
@ -0,0 +1,47 @@
|
|||
using LibXom.Data;
|
||||
using LibXom.Streams;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace LibW4M.Data.X
|
||||
{
|
||||
public class FloatResourceDetail : ResourceDetail<float>
|
||||
{
|
||||
|
||||
public FloatResourceDetail(W4SaveFile fileBelongs, XomContainer mainContainer) : base(fileBelongs, mainContainer)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Load()
|
||||
{
|
||||
using (XomStreamReader reader = new XomStreamReader(new MemoryStream(this.mainContainer.GetData())))
|
||||
{
|
||||
reader.Skip(3);
|
||||
this.Value = reader.ReadFloat();
|
||||
this.Name = this.fileBelongs.LookupStringFromId(reader.ReadCompressedInt());
|
||||
this.Flags = reader.ReadInt32();
|
||||
}
|
||||
}
|
||||
|
||||
public override void Save()
|
||||
{
|
||||
using (MemoryStream ms = new MemoryStream())
|
||||
{
|
||||
using (XomStreamWriter writer = new XomStreamWriter(ms))
|
||||
{
|
||||
writer.Skip(3);
|
||||
|
||||
writer.WriteFloat(this.Value);
|
||||
writer.WriteCompressedInt(this.Name.Id);
|
||||
writer.WriteInt32(this.Flags);
|
||||
|
||||
ms.Seek(0x00, SeekOrigin.Begin);
|
||||
mainContainer.SetData(ms.ToArray());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
46
LibW4M/Data/X/IntResourceDetail.cs
Normal file
46
LibW4M/Data/X/IntResourceDetail.cs
Normal file
|
@ -0,0 +1,46 @@
|
|||
using LibXom.Data;
|
||||
using LibXom.Streams;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace LibW4M.Data.X
|
||||
{
|
||||
public class IntResourceDetail : ResourceDetail<Int32>
|
||||
{
|
||||
public IntResourceDetail(W4SaveFile fileBelongs, XomContainer mainContainer) : base(fileBelongs, mainContainer)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Load()
|
||||
{
|
||||
using (XomStreamReader reader = new XomStreamReader(new MemoryStream(this.mainContainer.GetData())))
|
||||
{
|
||||
reader.Skip(3);
|
||||
this.Value = reader.ReadInt32();
|
||||
this.Name = this.fileBelongs.LookupStringFromId(reader.ReadCompressedInt());
|
||||
this.Flags = reader.ReadInt32();
|
||||
}
|
||||
}
|
||||
|
||||
public override void Save()
|
||||
{
|
||||
using (MemoryStream ms = new MemoryStream())
|
||||
{
|
||||
using (XomStreamWriter writer = new XomStreamWriter(ms))
|
||||
{
|
||||
writer.Skip(3);
|
||||
|
||||
writer.WriteInt32(this.Value);
|
||||
writer.WriteCompressedInt(this.Name.Id);
|
||||
writer.WriteInt32(this.Flags);
|
||||
|
||||
ms.Seek(0x00, SeekOrigin.Begin);
|
||||
mainContainer.SetData(ms.ToArray());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
30
LibW4M/Data/X/ResourceDetail.cs
Normal file
30
LibW4M/Data/X/ResourceDetail.cs
Normal file
|
@ -0,0 +1,30 @@
|
|||
using LibXom.Data;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace LibW4M.Data.X
|
||||
{
|
||||
public abstract class ResourceDetail<T> : SaveDataEntry
|
||||
{
|
||||
public T Value;
|
||||
public XomString Name;
|
||||
public int Flags;
|
||||
public override string FriendlyName
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Name.Value;
|
||||
}
|
||||
}
|
||||
|
||||
public ResourceDetail(W4SaveFile fileBelongs, XomContainer mainContainer) : base(fileBelongs, mainContainer)
|
||||
{
|
||||
}
|
||||
public abstract override void Load();
|
||||
public abstract override void Save();
|
||||
|
||||
}
|
||||
}
|
47
LibW4M/Data/X/StringResourceDetail.cs
Normal file
47
LibW4M/Data/X/StringResourceDetail.cs
Normal file
|
@ -0,0 +1,47 @@
|
|||
using LibXom.Data;
|
||||
using LibXom.Streams;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace LibW4M.Data.X
|
||||
{
|
||||
public class StringResourceDetail : ResourceDetail<XomString>
|
||||
{
|
||||
|
||||
public StringResourceDetail(W4SaveFile fileBelongs, XomContainer mainContainer) : base(fileBelongs, mainContainer)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Load()
|
||||
{
|
||||
using (XomStreamReader reader = new XomStreamReader(new MemoryStream(this.mainContainer.GetData())))
|
||||
{
|
||||
reader.Skip(3);
|
||||
this.Value = this.fileBelongs.LookupStringFromId(reader.ReadCompressedInt());
|
||||
this.Name = this.fileBelongs.LookupStringFromId(reader.ReadCompressedInt());
|
||||
this.Flags = reader.ReadInt32();
|
||||
}
|
||||
}
|
||||
|
||||
public override void Save()
|
||||
{
|
||||
using (MemoryStream ms = new MemoryStream())
|
||||
{
|
||||
using (XomStreamWriter writer = new XomStreamWriter(ms))
|
||||
{
|
||||
writer.Skip(3);
|
||||
|
||||
writer.WriteCompressedInt(this.Value.Id);
|
||||
writer.WriteCompressedInt(this.Name.Id);
|
||||
writer.WriteInt32(this.Flags);
|
||||
|
||||
ms.Seek(0x00, SeekOrigin.Begin);
|
||||
mainContainer.SetData(ms.ToArray());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
47
LibW4M/Data/X/UIntResourceDetail.cs
Normal file
47
LibW4M/Data/X/UIntResourceDetail.cs
Normal file
|
@ -0,0 +1,47 @@
|
|||
using LibXom.Data;
|
||||
using LibXom.Streams;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace LibW4M.Data.X
|
||||
{
|
||||
public class UIntResourceDetail : ResourceDetail<UInt32>
|
||||
{
|
||||
|
||||
public UIntResourceDetail(W4SaveFile fileBelongs, XomContainer mainContainer) : base(fileBelongs, mainContainer)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Load()
|
||||
{
|
||||
using (XomStreamReader reader = new XomStreamReader(new MemoryStream(this.mainContainer.GetData())))
|
||||
{
|
||||
reader.Skip(3);
|
||||
this.Value = reader.ReadUInt32();
|
||||
this.Name = this.fileBelongs.LookupStringFromId(reader.ReadCompressedInt());
|
||||
this.Flags = reader.ReadInt32();
|
||||
}
|
||||
}
|
||||
|
||||
public override void Save()
|
||||
{
|
||||
using (MemoryStream ms = new MemoryStream())
|
||||
{
|
||||
using (XomStreamWriter writer = new XomStreamWriter(ms))
|
||||
{
|
||||
writer.Skip(3);
|
||||
|
||||
writer.WriteUInt32(this.Value);
|
||||
writer.WriteCompressedInt(this.Name.Id);
|
||||
writer.WriteInt32(this.Flags);
|
||||
|
||||
ms.Seek(0x00, SeekOrigin.Begin);
|
||||
mainContainer.SetData(ms.ToArray());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
49
LibW4M/Data/X/VectorResourceDetail.cs
Normal file
49
LibW4M/Data/X/VectorResourceDetail.cs
Normal file
|
@ -0,0 +1,49 @@
|
|||
using LibXom.Data;
|
||||
using LibXom.Streams;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace LibW4M.Data.X
|
||||
{
|
||||
public class VectorResourceDetail : ResourceDetail<XomVector>
|
||||
{
|
||||
public VectorResourceDetail(W4SaveFile fileBelongs, XomContainer mainContainer) : base(fileBelongs, mainContainer)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Load()
|
||||
{
|
||||
using (XomStreamReader reader = new XomStreamReader(new MemoryStream(this.mainContainer.GetData())))
|
||||
{
|
||||
reader.Skip(3);
|
||||
this.Value = new XomVector(reader.ReadFloat(), reader.ReadFloat(), reader.ReadFloat());
|
||||
this.Name = this.fileBelongs.LookupStringFromId(reader.ReadCompressedInt());
|
||||
this.Flags = reader.ReadInt32();
|
||||
}
|
||||
}
|
||||
|
||||
public override void Save()
|
||||
{
|
||||
using (MemoryStream ms = new MemoryStream())
|
||||
{
|
||||
using (XomStreamWriter writer = new XomStreamWriter(ms))
|
||||
{
|
||||
writer.Skip(3);
|
||||
|
||||
writer.WriteFloat(this.Value.X);
|
||||
writer.WriteFloat(this.Value.Y);
|
||||
writer.WriteFloat(this.Value.Z);
|
||||
|
||||
writer.WriteCompressedInt(this.Name.Id);
|
||||
writer.WriteInt32(this.Flags);
|
||||
|
||||
ms.Seek(0x00, SeekOrigin.Begin);
|
||||
mainContainer.SetData(ms.ToArray());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -4,6 +4,7 @@
|
|||
<TargetFramework>net7.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
6
LibW4M/LibW4M.csproj.user
Normal file
6
LibW4M/LibW4M.csproj.user
Normal file
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<_LastSelectedProfileId>C:\Users\Li\Documents\git\Worms4Editor\LibW4M\Properties\PublishProfiles\FolderProfile.pubxml</_LastSelectedProfileId>
|
||||
</PropertyGroup>
|
||||
</Project>
|
19
LibW4M/Properties/PublishProfiles/FolderProfile.pubxml
Normal file
19
LibW4M/Properties/PublishProfiles/FolderProfile.pubxml
Normal file
|
@ -0,0 +1,19 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
https://go.microsoft.com/fwlink/?LinkID=208121.
|
||||
-->
|
||||
<Project>
|
||||
<PropertyGroup>
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Any CPU</Platform>
|
||||
<PublishDir>bin\Release\net7.0\publish\win-x86\</PublishDir>
|
||||
<PublishProtocol>FileSystem</PublishProtocol>
|
||||
<_TargetId>Folder</_TargetId>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<RuntimeIdentifier>win-x86</RuntimeIdentifier>
|
||||
<SelfContained>true</SelfContained>
|
||||
<PublishSingleFile>true</PublishSingleFile>
|
||||
<PublishReadyToRun>true</PublishReadyToRun>
|
||||
<PublishTrimmed>false</PublishTrimmed>
|
||||
</PropertyGroup>
|
||||
</Project>
|
10
LibW4M/Properties/PublishProfiles/FolderProfile.pubxml.user
Normal file
10
LibW4M/Properties/PublishProfiles/FolderProfile.pubxml.user
Normal file
|
@ -0,0 +1,10 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
https://go.microsoft.com/fwlink/?LinkID=208121.
|
||||
-->
|
||||
<Project>
|
||||
<PropertyGroup>
|
||||
<History>False|2023-02-18T17:31:12.6646298Z;</History>
|
||||
<LastFailureDetails />
|
||||
</PropertyGroup>
|
||||
</Project>
|
|
@ -1,71 +1,174 @@
|
|||
using LibW4M.Data;
|
||||
using LibW4M.Data.Highscores;
|
||||
using LibW4M.Data.Schemes;
|
||||
using LibW4M.Data.Stats;
|
||||
using LibW4M.Data.Teams;
|
||||
using LibW4M.Data.WeaponFactory;
|
||||
using LibW4M.Data.WXFE;
|
||||
using LibW4M.Data.WXFE.UnlockableItem;
|
||||
using LibW4M.Data.X;
|
||||
using LibXom;
|
||||
using LibXom.Blocks;
|
||||
using LibXom.Data;
|
||||
using LibXom.Exceptions;
|
||||
using LibXom.Streams;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Xml.XPath;
|
||||
|
||||
namespace LibW4M
|
||||
{
|
||||
public class W4SaveFile
|
||||
{
|
||||
internal List<SaveDataEntry> collectives = new List<SaveDataEntry>();
|
||||
private WeaponsCollective weaponFactoryCollective;
|
||||
private TeamsCollective teamDataColective;
|
||||
private SchemesCollective schemesCollective;
|
||||
private HighscoreCollective highscoreCollective;
|
||||
public WeaponsCollective WeaponFactoryCollective
|
||||
public const int PS2_MAX_SZ = 0x20000;
|
||||
|
||||
private List<UnlockableItemData> unlockableItems;
|
||||
private XomFile xomFile;
|
||||
|
||||
public DataBank XDataBank;
|
||||
|
||||
|
||||
public WeaponsCollective WeaponFactoryCollective;
|
||||
public TeamsCollective TeamDataColective;
|
||||
public SchemesCollective SchemesCollective;
|
||||
public HighscoreCollective HighscoreCollective;
|
||||
public StatsCollective StatsCollective;
|
||||
|
||||
|
||||
public UnlockableItemData[] UnlockableItems
|
||||
{
|
||||
get
|
||||
{
|
||||
return weaponFactoryCollective;
|
||||
}
|
||||
}
|
||||
public TeamsCollective TeamDataColective
|
||||
{
|
||||
get
|
||||
{
|
||||
return teamDataColective;
|
||||
}
|
||||
}
|
||||
public HighscoreCollective HighscoreDataCollective
|
||||
{
|
||||
get
|
||||
{
|
||||
return highscoreCollective;
|
||||
return unlockableItems.ToArray();
|
||||
}
|
||||
}
|
||||
|
||||
public SchemesCollective SchemeCollective
|
||||
{
|
||||
get
|
||||
{
|
||||
return schemesCollective;
|
||||
}
|
||||
}
|
||||
|
||||
internal XomFile xomFile;
|
||||
|
||||
internal WeaponData findWeaponWithContainerId(int containerId)
|
||||
{
|
||||
foreach(WeaponStore store in WeaponFactoryCollective)
|
||||
if(WeaponFactoryCollective is not null)
|
||||
{
|
||||
if (store.Weapon.containerId == containerId) return store.Weapon;
|
||||
if (store.Cluster.containerId == containerId) return store.Cluster;
|
||||
for (int i = 0; i < WeaponFactoryCollective.Length; i++)
|
||||
{
|
||||
WeaponStore weaponStore = (WeaponStore)WeaponFactoryCollective[i];
|
||||
if (weaponStore.Weapon.containerId == containerId) return weaponStore.Weapon;
|
||||
if (weaponStore.Cluster.containerId == containerId) return weaponStore.Cluster;
|
||||
}
|
||||
}
|
||||
|
||||
return new WeaponData(this, xomFile.GetContainerById(containerId));
|
||||
return new WeaponData(this, LookupContainerById(containerId));
|
||||
}
|
||||
|
||||
public void Load()
|
||||
{
|
||||
unlockableItems = new List<UnlockableItemData>();
|
||||
XDataBank = new DataBank(this, this.xomFile.GetTypeByName("XDataBank").Containers.First());
|
||||
|
||||
foreach(ContainerResourceDetail containerResourceDetail in XDataBank.ContainerResourceDetails)
|
||||
{
|
||||
switch (containerResourceDetail.Name.Value)
|
||||
{
|
||||
case "DATA.Weapons":
|
||||
WeaponFactoryCollective = new WeaponsCollective(this, containerResourceDetail.Value);
|
||||
break;
|
||||
case "DATA.TeamBarracks":
|
||||
TeamDataColective = new TeamsCollective(this, containerResourceDetail.Value);
|
||||
HighscoreCollective = new HighscoreCollective(this, containerResourceDetail.Value);
|
||||
break;
|
||||
case "DATA.Schemes":
|
||||
SchemesCollective = new SchemesCollective(this, containerResourceDetail.Value);
|
||||
break;
|
||||
case "PersistStats":
|
||||
StatsCollective = new StatsCollective(this, containerResourceDetail.Value);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
||||
// stupid hack; the only other option is manually hardcoding every unlockable item in the game
|
||||
// but this way atleast allows for it to be more generic incase for some reason not all (or more) are present.
|
||||
|
||||
// Team17, why isnt there a collective for this?
|
||||
if (containerResourceDetail.Value.Type.Name.Equals("WXFE_UnlockableItem", StringComparison.InvariantCultureIgnoreCase))
|
||||
{
|
||||
UnlockableItemData itemData = new UnlockableItemData(this, containerResourceDetail.Value);
|
||||
itemData.nameOverride = containerResourceDetail.Name.Value;
|
||||
|
||||
unlockableItems.Add(itemData);
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.Error.WriteLine("Unknown container resource: " + containerResourceDetail.Value);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void saveData()
|
||||
{
|
||||
XDataBank.Save();
|
||||
|
||||
WeaponFactoryCollective.Save();
|
||||
TeamDataColective.Save();
|
||||
HighscoreCollective.Save();
|
||||
SchemesCollective.Save();
|
||||
StatsCollective.Save();
|
||||
|
||||
foreach (UnlockableItemData unlockableItem in UnlockableItems)
|
||||
unlockableItem.Save();
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void SavePS2(string newXom)
|
||||
{
|
||||
// Remove all stats ...
|
||||
foreach(StatsContainerData stat in StatsCollective.ToArray())
|
||||
StatsCollective.Delete(stat);
|
||||
|
||||
// Save changes
|
||||
saveData();
|
||||
|
||||
using(FileStream fs = File.OpenWrite(newXom))
|
||||
{
|
||||
using (MemoryStream ms = new MemoryStream())
|
||||
{
|
||||
using (XomStreamReader reader = new XomStreamReader(ms))
|
||||
{
|
||||
using (XomStreamWriter writer = new XomStreamWriter(ms))
|
||||
{
|
||||
XomWriter.WriteXom(xomFile, ms);
|
||||
|
||||
// Set size to ps2 save size.
|
||||
|
||||
ms.SetLength(PS2_MAX_SZ);
|
||||
ms.Seek(0, SeekOrigin.Begin);
|
||||
|
||||
// Calculate checksum
|
||||
|
||||
Int64 chk = 0;
|
||||
|
||||
for (int i = 0; i < (PS2_MAX_SZ - 4); i += 4)
|
||||
{
|
||||
int c = reader.ReadInt32();
|
||||
chk = (chk + c) & UInt32.MaxValue;
|
||||
}
|
||||
|
||||
writer.WriteUInt32(Convert.ToUInt32(chk));
|
||||
|
||||
|
||||
ms.Seek(0, SeekOrigin.Begin);
|
||||
ms.CopyTo(fs);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
public void Save(string newXom)
|
||||
{
|
||||
foreach(SaveDataEntry entry in collectives)
|
||||
{
|
||||
entry.Save();
|
||||
}
|
||||
saveData();
|
||||
|
||||
XomWriter.WriteXom(xomFile, newXom);
|
||||
}
|
||||
|
@ -118,12 +221,19 @@ namespace LibW4M
|
|||
for (int i = 0; i < ids.Length; i++) ids[i] = strs[i].Id;
|
||||
return ids;
|
||||
}
|
||||
|
||||
public XomString[] IntArrayToXomStringArray(int[] stringIds)
|
||||
{
|
||||
XomString[] strings = new XomString[stringIds.Length];
|
||||
for (int i = 0; i < strings.Length; i++) strings[i] = this.LookupStringFromId(stringIds[i]);
|
||||
return strings;
|
||||
}
|
||||
|
||||
public XomContainer LookupContainerById(int id)
|
||||
{
|
||||
return xomFile.GetContainerById(id);
|
||||
}
|
||||
|
||||
public XomString LookupStringFromId(int id)
|
||||
{
|
||||
return xomFile.GetStringById(id);
|
||||
|
@ -132,18 +242,13 @@ namespace LibW4M
|
|||
{
|
||||
return xomFile.AddOrGetString(value);
|
||||
}
|
||||
|
||||
public W4SaveFile(XomFile w4Save)
|
||||
{
|
||||
this.xomFile = w4Save;
|
||||
// Read Weapon Factory
|
||||
weaponFactoryCollective = new WeaponsCollective(this, this.xomFile.GetTypeByName("WeaponFactoryCollective").Containers.First());
|
||||
|
||||
// Abtract away teamdata storing both highscores and teams.
|
||||
teamDataColective = new TeamsCollective(this, this.xomFile.GetTypeByName("TeamDataColective").Containers.First());
|
||||
highscoreCollective = new HighscoreCollective(this, this.xomFile.GetTypeByName("TeamDataColective").Containers.First());
|
||||
Load();
|
||||
|
||||
// Read Schemes / Game Styles
|
||||
schemesCollective = new SchemesCollective(this, this.xomFile.GetTypeByName("SchemeColective").Containers.First());
|
||||
}
|
||||
}
|
||||
}
|
22
LibXom/Data/XomVector.cs
Normal file
22
LibXom/Data/XomVector.cs
Normal file
|
@ -0,0 +1,22 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace LibXom.Data
|
||||
{
|
||||
public class XomVector
|
||||
{
|
||||
public float X;
|
||||
public float Y;
|
||||
public float Z;
|
||||
|
||||
public XomVector(float x, float y, float z)
|
||||
{
|
||||
X = x;
|
||||
Y = y;
|
||||
Z = z;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -85,6 +85,10 @@ namespace LibXom.Streams
|
|||
{
|
||||
return BitConverter.ToSingle(ReadBytes(0x4));
|
||||
}
|
||||
public uint ReadUInt32()
|
||||
{
|
||||
return BitConverter.ToUInt32(ReadBytes(0x4));
|
||||
}
|
||||
public int ReadInt32()
|
||||
{
|
||||
return BitConverter.ToInt32(ReadBytes(0x4));
|
||||
|
|
|
@ -87,6 +87,13 @@ namespace LibXom.Streams
|
|||
byte[] buffer = BitConverter.GetBytes(value);
|
||||
WriteBytes(buffer);
|
||||
}
|
||||
|
||||
public void WriteUInt32(uint value)
|
||||
{
|
||||
byte[] buffer = BitConverter.GetBytes((uint)value);
|
||||
WriteBytes(buffer);
|
||||
}
|
||||
|
||||
public void WriteInt32(int value)
|
||||
{
|
||||
byte[] buffer = BitConverter.GetBytes((int)value);
|
||||
|
|
|
@ -46,6 +46,11 @@ namespace LibXom
|
|||
return new CtnrBlock(buffer.ToArray());
|
||||
}
|
||||
}
|
||||
|
||||
// remove last 2 for EOF
|
||||
buffer.RemoveAt(buffer.Count-1);
|
||||
buffer.RemoveAt(buffer.Count-1);
|
||||
|
||||
return new CtnrBlock(buffer.ToArray());
|
||||
}
|
||||
|
||||
|
|
|
@ -75,19 +75,34 @@ namespace LibXom
|
|||
if (block is CtnrBlock) writeCtnr(block as CtnrBlock);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
public static void WriteXom(XomFile xfile, Stream output)
|
||||
{
|
||||
XomWriter writer = new XomWriter(output, xfile);
|
||||
writer.writeBlocks(xfile.generateBlocks());
|
||||
|
||||
output.WriteByte(0);
|
||||
output.WriteByte(0);
|
||||
}
|
||||
public static byte[] WriteXom(XomFile xfile)
|
||||
{
|
||||
using (MemoryStream ms = new MemoryStream())
|
||||
{
|
||||
WriteXom(xfile, ms);
|
||||
|
||||
ms.Seek(0, SeekOrigin.Begin);
|
||||
return ms.ToArray();
|
||||
}
|
||||
}
|
||||
public static void WriteXom(XomFile xfile, string filename)
|
||||
{
|
||||
using(FileStream fs = File.OpenWrite(filename))
|
||||
{
|
||||
using (MemoryStream ms = new MemoryStream())
|
||||
{
|
||||
XomWriter writer = new XomWriter(ms, xfile);
|
||||
writer.writeBlocks(writer.xomFile.generateBlocks());
|
||||
ms.Seek(0, SeekOrigin.Begin);
|
||||
ms.CopyTo(fs);
|
||||
}
|
||||
byte[] xData = WriteXom(xfile);
|
||||
fs.Write(xData, 0, xData.Length);
|
||||
}
|
||||
}
|
||||
internal XomWriter(Stream xomStream, XomFile xomFile)
|
||||
|
|
|
@ -15,6 +15,7 @@ namespace W4Gui.Components
|
|||
{
|
||||
this.SelectedIndexChanged += selectedIndexChanged;
|
||||
}
|
||||
private int totalUntitled = 0;
|
||||
private int lastSelected = -1;
|
||||
public int LastSelected
|
||||
{
|
||||
|
@ -89,10 +90,33 @@ namespace W4Gui.Components
|
|||
this.Items.RemoveAt(idx);
|
||||
}
|
||||
|
||||
private string processName(string name)
|
||||
{
|
||||
if(name == "")
|
||||
{
|
||||
totalUntitled++;
|
||||
return "Untitled " + totalUntitled.ToString();
|
||||
}
|
||||
return name;
|
||||
}
|
||||
|
||||
public void UpdateName(int idx, string name)
|
||||
{
|
||||
if(name != "")
|
||||
this.Items[idx] = name;
|
||||
}
|
||||
|
||||
public void LoadArray(SaveDataEntry[] arr)
|
||||
{
|
||||
unselectWithoutSaveTrigger();
|
||||
this.Items.Clear();
|
||||
for (int i = 0; i < arr.Length; i++)
|
||||
{
|
||||
string name = arr[i].FriendlyName;
|
||||
this.Items.Add(processName(name));
|
||||
}
|
||||
}
|
||||
|
||||
public void LoadCollective(SaveDataCollective collective)
|
||||
{
|
||||
unselectWithoutSaveTrigger();
|
||||
|
@ -100,7 +124,7 @@ namespace W4Gui.Components
|
|||
for (int i = 0; i < collective.Length; i++)
|
||||
{
|
||||
string name = collective[i].FriendlyName;
|
||||
this.Items.Add(name);
|
||||
this.Items.Add(processName(name));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
31
W4Gui/Components/SchemePanel.Designer.cs
generated
31
W4Gui/Components/SchemePanel.Designer.cs
generated
|
@ -256,7 +256,7 @@
|
|||
this.generalTab.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
|
||||
this.generalTab.Controls.Add(this.tblGeneral);
|
||||
this.generalTab.Controls.Add(this.tblPermanatToggle);
|
||||
this.generalTab.Location = new System.Drawing.Point(4, 24);
|
||||
this.generalTab.Location = new System.Drawing.Point(0, 24);
|
||||
this.generalTab.Name = "generalTab";
|
||||
this.generalTab.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.generalTab.Size = new System.Drawing.Size(699, 387);
|
||||
|
@ -716,14 +716,17 @@
|
|||
//
|
||||
// crateTab
|
||||
//
|
||||
this.crateTab.AutoScroll = true;
|
||||
this.crateTab.BackColor = System.Drawing.Color.Transparent;
|
||||
this.crateTab.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
|
||||
this.crateTab.Controls.Add(this.tblCrate);
|
||||
this.crateTab.Location = new System.Drawing.Point(4, 24);
|
||||
this.crateTab.Location = new System.Drawing.Point(2, 24);
|
||||
this.crateTab.Name = "crateTab";
|
||||
this.crateTab.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.crateTab.Size = new System.Drawing.Size(699, 387);
|
||||
this.crateTab.TabIndex = 1;
|
||||
this.crateTab.TabIndex = 2;
|
||||
this.crateTab.Text = "Crates";
|
||||
this.crateTab.UseVisualStyleBackColor = true;
|
||||
|
||||
//
|
||||
// tblCrate
|
||||
//
|
||||
|
@ -864,15 +867,17 @@
|
|||
//
|
||||
// mapTab
|
||||
//
|
||||
this.mapTab.AutoScroll = true;
|
||||
this.mapTab.BackColor = System.Drawing.Color.Transparent;
|
||||
this.mapTab.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
|
||||
this.mapTab.Controls.Add(this.tblMineFactoryTelepadToggles);
|
||||
this.mapTab.Controls.Add(this.tblMap);
|
||||
this.mapTab.Location = new System.Drawing.Point(4, 24);
|
||||
this.mapTab.Controls.Add(this.tblMineFactoryTelepadToggles);
|
||||
this.mapTab.Location = new System.Drawing.Point(3, 24);
|
||||
this.mapTab.Name = "mapTab";
|
||||
this.mapTab.Size = new System.Drawing.Size(192, 72);
|
||||
this.mapTab.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.mapTab.Size = new System.Drawing.Size(699, 387);
|
||||
this.mapTab.TabIndex = 2;
|
||||
this.mapTab.Text = "Map";
|
||||
this.mapTab.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// tblMineFactoryTelepadToggles
|
||||
//
|
||||
|
@ -1081,7 +1086,7 @@
|
|||
this.weapTypeTabControl.Controls.Add(this.utilityTab);
|
||||
this.weapTypeTabControl.Controls.Add(this.mysteryTab);
|
||||
this.weapTypeTabControl.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.weapTypeTabControl.Location = new System.Drawing.Point(\, 0);
|
||||
this.weapTypeTabControl.Location = new System.Drawing.Point(3, 3);
|
||||
this.weapTypeTabControl.Name = "weapTypeTabControl";
|
||||
this.weapTypeTabControl.SelectedIndex = 0;
|
||||
this.weapTypeTabControl.Size = new System.Drawing.Size(188, 68);
|
||||
|
@ -1844,7 +1849,7 @@
|
|||
this.tblWeapUtil.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||
this.tblWeapUtil.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||
this.tblWeapUtil.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||
this.tblWeapUtil.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
|
||||
this.tblWeapUtil.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||
this.tblWeapUtil.Size = new System.Drawing.Size(153, 1341);
|
||||
this.tblWeapUtil.TabIndex = 1;
|
||||
//
|
||||
|
@ -2115,10 +2120,12 @@
|
|||
this.mysteryTab.Controls.Add(this.tblWeapMystery);
|
||||
this.mysteryTab.Location = new System.Drawing.Point(4, 24);
|
||||
this.mysteryTab.Name = "mysteryTab";
|
||||
this.mysteryTab.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.mysteryTab.Size = new System.Drawing.Size(180, 40);
|
||||
this.mysteryTab.TabIndex = 2;
|
||||
this.mysteryTab.TabIndex = 1;
|
||||
this.mysteryTab.Text = "Mystery";
|
||||
this.mysteryTab.UseVisualStyleBackColor = true;
|
||||
|
||||
//
|
||||
// tblWeapMystery
|
||||
//
|
||||
|
@ -2177,7 +2184,7 @@
|
|||
this.tblWeapMystery.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||
this.tblWeapMystery.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||
this.tblWeapMystery.Size = new System.Drawing.Size(159, 1547);
|
||||
this.tblWeapMystery.TabIndex = 2;
|
||||
this.tblWeapMystery.TabIndex = 1;
|
||||
//
|
||||
// selBadPoisonMystery
|
||||
//
|
||||
|
|
26
W4Gui/Components/UIntUpDown.cs
Normal file
26
W4Gui/Components/UIntUpDown.cs
Normal file
|
@ -0,0 +1,26 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Media;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace W4Gui.Components
|
||||
{
|
||||
public class UIntUpDown : GenericUpDown<uint>
|
||||
{
|
||||
internal override string formatText(uint val)
|
||||
{
|
||||
string fmt = val.ToString();
|
||||
return fmt;
|
||||
}
|
||||
|
||||
internal override uint parseValue(string val)
|
||||
{
|
||||
uint uval = 0;
|
||||
uint.TryParse(val, out uval);
|
||||
return uval;
|
||||
}
|
||||
}
|
||||
}
|
272
W4Gui/Components/UnlockableItemsPanel.Designer.cs
generated
Normal file
272
W4Gui/Components/UnlockableItemsPanel.Designer.cs
generated
Normal file
|
@ -0,0 +1,272 @@
|
|||
namespace W4Gui.Components
|
||||
{
|
||||
partial class UnlockableItemsPanel
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Component Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.schemeTabControl = new System.Windows.Forms.TabControl();
|
||||
this.generalTab = new System.Windows.Forms.TabPage();
|
||||
this.tblUnlockableItemDetails = new System.Windows.Forms.TableLayoutPanel();
|
||||
this.lblType = new System.Windows.Forms.Label();
|
||||
this.lblState = new System.Windows.Forms.Label();
|
||||
this.lblDescriptionName = new System.Windows.Forms.Label();
|
||||
this.lblUnlockRequirements = new System.Windows.Forms.Label();
|
||||
this.selType = new W4Gui.Components.IntUpDown();
|
||||
this.selState = new W4Gui.Components.IntUpDown();
|
||||
this.selDescriptionName = new System.Windows.Forms.TextBox();
|
||||
this.selUnlockRequirements = new W4Gui.Components.ListAddUpdateDel();
|
||||
this.lblDescription = new System.Windows.Forms.Label();
|
||||
this.selValue = new W4Gui.Components.IntUpDown();
|
||||
this.tblUnlockRequirementsMet = new System.Windows.Forms.TableLayoutPanel();
|
||||
this.selUnlockRequirementsMet = new System.Windows.Forms.CheckBox();
|
||||
this.schemeTabControl.SuspendLayout();
|
||||
this.generalTab.SuspendLayout();
|
||||
this.tblUnlockableItemDetails.SuspendLayout();
|
||||
this.tblUnlockRequirementsMet.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// schemeTabControl
|
||||
//
|
||||
this.schemeTabControl.Controls.Add(this.generalTab);
|
||||
this.schemeTabControl.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.schemeTabControl.HotTrack = true;
|
||||
this.schemeTabControl.Location = new System.Drawing.Point(0, 0);
|
||||
this.schemeTabControl.Name = "schemeTabControl";
|
||||
this.schemeTabControl.SelectedIndex = 0;
|
||||
this.schemeTabControl.Size = new System.Drawing.Size(817, 469);
|
||||
this.schemeTabControl.TabIndex = 1;
|
||||
//
|
||||
// generalTab
|
||||
//
|
||||
this.generalTab.AutoScroll = true;
|
||||
this.generalTab.BackColor = System.Drawing.Color.Transparent;
|
||||
this.generalTab.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
|
||||
this.generalTab.Controls.Add(this.tblUnlockRequirementsMet);
|
||||
this.generalTab.Controls.Add(this.tblUnlockableItemDetails);
|
||||
this.generalTab.Location = new System.Drawing.Point(4, 24);
|
||||
this.generalTab.Name = "generalTab";
|
||||
this.generalTab.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.generalTab.Size = new System.Drawing.Size(809, 441);
|
||||
this.generalTab.TabIndex = 0;
|
||||
this.generalTab.Text = "General";
|
||||
//
|
||||
// tblUnlockableItemDetails
|
||||
//
|
||||
this.tblUnlockableItemDetails.AutoSize = true;
|
||||
this.tblUnlockableItemDetails.CellBorderStyle = System.Windows.Forms.TableLayoutPanelCellBorderStyle.Inset;
|
||||
this.tblUnlockableItemDetails.ColumnCount = 2;
|
||||
this.tblUnlockableItemDetails.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
|
||||
this.tblUnlockableItemDetails.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
|
||||
this.tblUnlockableItemDetails.Controls.Add(this.lblDescription, 0, 2);
|
||||
this.tblUnlockableItemDetails.Controls.Add(this.lblUnlockRequirements, 0, 4);
|
||||
this.tblUnlockableItemDetails.Controls.Add(this.lblDescriptionName, 0, 3);
|
||||
this.tblUnlockableItemDetails.Controls.Add(this.lblState, 0, 1);
|
||||
this.tblUnlockableItemDetails.Controls.Add(this.lblType, 0, 0);
|
||||
this.tblUnlockableItemDetails.Controls.Add(this.selType, 1, 0);
|
||||
this.tblUnlockableItemDetails.Controls.Add(this.selState, 1, 1);
|
||||
this.tblUnlockableItemDetails.Controls.Add(this.selDescriptionName, 1, 2);
|
||||
this.tblUnlockableItemDetails.Controls.Add(this.selUnlockRequirements, 1, 4);
|
||||
this.tblUnlockableItemDetails.Controls.Add(this.selValue, 1, 3);
|
||||
this.tblUnlockableItemDetails.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.tblUnlockableItemDetails.Location = new System.Drawing.Point(3, 3);
|
||||
this.tblUnlockableItemDetails.Name = "tblUnlockableItemDetails";
|
||||
this.tblUnlockableItemDetails.RowCount = 5;
|
||||
this.tblUnlockableItemDetails.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||
this.tblUnlockableItemDetails.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||
this.tblUnlockableItemDetails.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||
this.tblUnlockableItemDetails.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||
this.tblUnlockableItemDetails.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
|
||||
this.tblUnlockableItemDetails.Size = new System.Drawing.Size(782, 435);
|
||||
this.tblUnlockableItemDetails.TabIndex = 0;
|
||||
//
|
||||
// lblType
|
||||
//
|
||||
this.lblType.AutoSize = true;
|
||||
this.lblType.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.lblType.Location = new System.Drawing.Point(5, 2);
|
||||
this.lblType.Name = "lblType";
|
||||
this.lblType.Size = new System.Drawing.Size(123, 29);
|
||||
this.lblType.TabIndex = 0;
|
||||
this.lblType.Text = "Type:";
|
||||
this.lblType.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// lblState
|
||||
//
|
||||
this.lblState.AutoSize = true;
|
||||
this.lblState.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.lblState.Location = new System.Drawing.Point(5, 33);
|
||||
this.lblState.Name = "lblState";
|
||||
this.lblState.Size = new System.Drawing.Size(123, 29);
|
||||
this.lblState.TabIndex = 1;
|
||||
this.lblState.Text = "State:";
|
||||
this.lblState.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// lblDescriptionName
|
||||
//
|
||||
this.lblDescriptionName.AutoSize = true;
|
||||
this.lblDescriptionName.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.lblDescriptionName.Location = new System.Drawing.Point(5, 95);
|
||||
this.lblDescriptionName.Name = "lblDescriptionName";
|
||||
this.lblDescriptionName.Size = new System.Drawing.Size(123, 29);
|
||||
this.lblDescriptionName.TabIndex = 2;
|
||||
this.lblDescriptionName.Text = "Value:";
|
||||
this.lblDescriptionName.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// lblUnlockRequirements
|
||||
//
|
||||
this.lblUnlockRequirements.AutoSize = true;
|
||||
this.lblUnlockRequirements.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.lblUnlockRequirements.Location = new System.Drawing.Point(5, 126);
|
||||
this.lblUnlockRequirements.Name = "lblUnlockRequirements";
|
||||
this.lblUnlockRequirements.Size = new System.Drawing.Size(123, 307);
|
||||
this.lblUnlockRequirements.TabIndex = 3;
|
||||
this.lblUnlockRequirements.Text = "Unlock Requirements:";
|
||||
this.lblUnlockRequirements.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// selType
|
||||
//
|
||||
this.selType.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.selType.Location = new System.Drawing.Point(136, 5);
|
||||
this.selType.Name = "selType";
|
||||
this.selType.Size = new System.Drawing.Size(641, 23);
|
||||
this.selType.TabIndex = 4;
|
||||
this.selType.Text = "0";
|
||||
this.selType.Value = 0;
|
||||
//
|
||||
// selState
|
||||
//
|
||||
this.selState.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.selState.Location = new System.Drawing.Point(136, 36);
|
||||
this.selState.Name = "selState";
|
||||
this.selState.Size = new System.Drawing.Size(641, 23);
|
||||
this.selState.TabIndex = 5;
|
||||
this.selState.Text = "0";
|
||||
this.selState.Value = 0;
|
||||
//
|
||||
// selDescriptionName
|
||||
//
|
||||
this.selDescriptionName.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.selDescriptionName.Location = new System.Drawing.Point(136, 67);
|
||||
this.selDescriptionName.Name = "selDescriptionName";
|
||||
this.selDescriptionName.PlaceholderText = "Unlock Item Description/Name";
|
||||
this.selDescriptionName.Size = new System.Drawing.Size(641, 23);
|
||||
this.selDescriptionName.TabIndex = 6;
|
||||
//
|
||||
// selUnlockRequirements
|
||||
//
|
||||
this.selUnlockRequirements.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.selUnlockRequirements.Location = new System.Drawing.Point(136, 129);
|
||||
this.selUnlockRequirements.Name = "selUnlockRequirements";
|
||||
this.selUnlockRequirements.Size = new System.Drawing.Size(641, 301);
|
||||
this.selUnlockRequirements.TabIndex = 7;
|
||||
//
|
||||
// lblDescription
|
||||
//
|
||||
this.lblDescription.AutoSize = true;
|
||||
this.lblDescription.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.lblDescription.Location = new System.Drawing.Point(5, 64);
|
||||
this.lblDescription.Name = "lblDescription";
|
||||
this.lblDescription.Size = new System.Drawing.Size(123, 29);
|
||||
this.lblDescription.TabIndex = 8;
|
||||
this.lblDescription.Text = "Description/Name:";
|
||||
this.lblDescription.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// selValue
|
||||
//
|
||||
this.selValue.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.selValue.Location = new System.Drawing.Point(136, 98);
|
||||
this.selValue.Name = "selValue";
|
||||
this.selValue.Size = new System.Drawing.Size(641, 23);
|
||||
this.selValue.TabIndex = 9;
|
||||
this.selValue.Text = "0";
|
||||
this.selValue.Value = 0;
|
||||
//
|
||||
// tblUnlockRequirementsMet
|
||||
//
|
||||
this.tblUnlockRequirementsMet.CellBorderStyle = System.Windows.Forms.TableLayoutPanelCellBorderStyle.Inset;
|
||||
this.tblUnlockRequirementsMet.ColumnCount = 1;
|
||||
this.tblUnlockRequirementsMet.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
|
||||
this.tblUnlockRequirementsMet.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F));
|
||||
this.tblUnlockRequirementsMet.Controls.Add(this.selUnlockRequirementsMet, 0, 0);
|
||||
this.tblUnlockRequirementsMet.Dock = System.Windows.Forms.DockStyle.Bottom;
|
||||
this.tblUnlockRequirementsMet.Location = new System.Drawing.Point(3, 435);
|
||||
this.tblUnlockRequirementsMet.Name = "tblUnlockRequirementsMet";
|
||||
this.tblUnlockRequirementsMet.RowCount = 1;
|
||||
this.tblUnlockRequirementsMet.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
|
||||
this.tblUnlockRequirementsMet.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
|
||||
this.tblUnlockRequirementsMet.Size = new System.Drawing.Size(782, 26);
|
||||
this.tblUnlockRequirementsMet.TabIndex = 1;
|
||||
//
|
||||
// selUnlockRequirementsMet
|
||||
//
|
||||
this.selUnlockRequirementsMet.AutoSize = true;
|
||||
this.selUnlockRequirementsMet.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.selUnlockRequirementsMet.Location = new System.Drawing.Point(5, 5);
|
||||
this.selUnlockRequirementsMet.Name = "selUnlockRequirementsMet";
|
||||
this.selUnlockRequirementsMet.Size = new System.Drawing.Size(772, 16);
|
||||
this.selUnlockRequirementsMet.TabIndex = 0;
|
||||
this.selUnlockRequirementsMet.Text = "Unlock Requirements Met";
|
||||
this.selUnlockRequirementsMet.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// UnlockableItemsPanel
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = System.Drawing.Color.LightGray;
|
||||
this.Controls.Add(this.schemeTabControl);
|
||||
this.Name = "UnlockableItemsPanel";
|
||||
this.Size = new System.Drawing.Size(817, 469);
|
||||
this.schemeTabControl.ResumeLayout(false);
|
||||
this.generalTab.ResumeLayout(false);
|
||||
this.generalTab.PerformLayout();
|
||||
this.tblUnlockableItemDetails.ResumeLayout(false);
|
||||
this.tblUnlockableItemDetails.PerformLayout();
|
||||
this.tblUnlockRequirementsMet.ResumeLayout(false);
|
||||
this.tblUnlockRequirementsMet.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private TabControl schemeTabControl;
|
||||
private TabPage generalTab;
|
||||
private TableLayoutPanel tblUnlockableItemDetails;
|
||||
private Label lblType;
|
||||
private TableLayoutPanel tblUnlockRequirementsMet;
|
||||
private CheckBox selUnlockRequirementsMet;
|
||||
private Label lblDescription;
|
||||
private Label lblUnlockRequirements;
|
||||
private Label lblDescriptionName;
|
||||
private Label lblState;
|
||||
private IntUpDown selType;
|
||||
private IntUpDown selState;
|
||||
private TextBox selDescriptionName;
|
||||
private ListAddUpdateDel selUnlockRequirements;
|
||||
private IntUpDown selValue;
|
||||
}
|
||||
}
|
47
W4Gui/Components/UnlockableItemsPanel.cs
Normal file
47
W4Gui/Components/UnlockableItemsPanel.cs
Normal file
|
@ -0,0 +1,47 @@
|
|||
using LibW4M.Data.Highscores;
|
||||
using LibW4M.Data.Schemes;
|
||||
using LibW4M.Data.Teams;
|
||||
using LibW4M.Data.WeaponFactory;
|
||||
using LibW4M.Data.WXFE.UnlockableItem;
|
||||
using W4Gui.Dialogs;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using System.Windows.Forms.VisualStyles;
|
||||
|
||||
namespace W4Gui.Components
|
||||
{
|
||||
public partial class UnlockableItemsPanel : UserControl
|
||||
{
|
||||
public UnlockableItemsPanel()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public void LoadUnlockableItem(UnlockableItemData unlockableItem)
|
||||
{
|
||||
this.selType.Value = unlockableItem.Type;
|
||||
this.selState.Value = unlockableItem.State;
|
||||
this.selDescriptionName.Text = unlockableItem.DescriptionName.Value;
|
||||
this.selValue.Value = unlockableItem.Value;
|
||||
this.selUnlockRequirements.LoadData(DataManager.SaveFile.XomStringArrayToStringArray(unlockableItem.UnlockRequirements));
|
||||
this.selUnlockRequirementsMet.Checked = unlockableItem.UnlockRequirementsMet;
|
||||
}
|
||||
|
||||
public void SaveUnlockableItem(ref UnlockableItemData unlockableItem)
|
||||
{
|
||||
unlockableItem.Type = this.selType.Value;
|
||||
unlockableItem.State = this.selState.Value;
|
||||
unlockableItem.DescriptionName = DataManager.SaveFile.LookupString(this.selDescriptionName.Text);
|
||||
unlockableItem.Value = this.selValue.Value;
|
||||
unlockableItem.UnlockRequirements = DataManager.SaveFile.StringArrayToXomStringArray(this.selUnlockRequirements.Items);
|
||||
unlockableItem.UnlockRequirementsMet = this.selUnlockRequirementsMet.Checked;
|
||||
}
|
||||
}
|
||||
}
|
60
W4Gui/Components/UnlockableItemsPanel.resx
Normal file
60
W4Gui/Components/UnlockableItemsPanel.resx
Normal file
|
@ -0,0 +1,60 @@
|
|||
<root>
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
182
W4Gui/Components/VariablePanel/FloatVariablePanel.Designer.cs
generated
Normal file
182
W4Gui/Components/VariablePanel/FloatVariablePanel.Designer.cs
generated
Normal file
|
@ -0,0 +1,182 @@
|
|||
namespace W4Gui.Components.VariablePanel
|
||||
{
|
||||
partial class FloatVariablePanel
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Component Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.variableTabControl = new System.Windows.Forms.TabControl();
|
||||
this.generalTab = new System.Windows.Forms.TabPage();
|
||||
this.tblGeneral = new System.Windows.Forms.TableLayoutPanel();
|
||||
this.lblVarFlags = new System.Windows.Forms.Label();
|
||||
this.lblVarName = new System.Windows.Forms.Label();
|
||||
this.selName = new System.Windows.Forms.TextBox();
|
||||
this.selFlags = new W4Gui.Components.IntUpDown();
|
||||
this.lbVarlValue = new System.Windows.Forms.Label();
|
||||
this.selValue = new W4Gui.Components.FloatUpDown();
|
||||
this.variableTabControl.SuspendLayout();
|
||||
this.generalTab.SuspendLayout();
|
||||
this.tblGeneral.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// variableTabControl
|
||||
//
|
||||
this.variableTabControl.Controls.Add(this.generalTab);
|
||||
this.variableTabControl.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.variableTabControl.HotTrack = true;
|
||||
this.variableTabControl.Location = new System.Drawing.Point(0, 0);
|
||||
this.variableTabControl.Name = "variableTabControl";
|
||||
this.variableTabControl.SelectedIndex = 0;
|
||||
this.variableTabControl.Size = new System.Drawing.Size(707, 419);
|
||||
this.variableTabControl.TabIndex = 1;
|
||||
//
|
||||
// generalTab
|
||||
//
|
||||
this.generalTab.BackColor = System.Drawing.Color.Transparent;
|
||||
this.generalTab.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
|
||||
this.generalTab.Controls.Add(this.tblGeneral);
|
||||
this.generalTab.Location = new System.Drawing.Point(4, 24);
|
||||
this.generalTab.Name = "generalTab";
|
||||
this.generalTab.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.generalTab.Size = new System.Drawing.Size(699, 391);
|
||||
this.generalTab.TabIndex = 0;
|
||||
this.generalTab.Text = "General";
|
||||
//
|
||||
// tblGeneral
|
||||
//
|
||||
this.tblGeneral.AutoSize = true;
|
||||
this.tblGeneral.CellBorderStyle = System.Windows.Forms.TableLayoutPanelCellBorderStyle.Inset;
|
||||
this.tblGeneral.ColumnCount = 2;
|
||||
this.tblGeneral.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
|
||||
this.tblGeneral.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
|
||||
this.tblGeneral.Controls.Add(this.selValue, 0, 0);
|
||||
this.tblGeneral.Controls.Add(this.lbVarlValue, 0, 0);
|
||||
this.tblGeneral.Controls.Add(this.lblVarFlags, 0, 2);
|
||||
this.tblGeneral.Controls.Add(this.lblVarName, 0, 1);
|
||||
this.tblGeneral.Controls.Add(this.selName, 1, 1);
|
||||
this.tblGeneral.Controls.Add(this.selFlags, 1, 2);
|
||||
this.tblGeneral.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.tblGeneral.Location = new System.Drawing.Point(3, 3);
|
||||
this.tblGeneral.Name = "tblGeneral";
|
||||
this.tblGeneral.RowCount = 3;
|
||||
this.tblGeneral.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||
this.tblGeneral.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||
this.tblGeneral.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||
this.tblGeneral.Size = new System.Drawing.Size(689, 95);
|
||||
this.tblGeneral.TabIndex = 0;
|
||||
//
|
||||
// lblVarFlags
|
||||
//
|
||||
this.lblVarFlags.AutoSize = true;
|
||||
this.lblVarFlags.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.lblVarFlags.Location = new System.Drawing.Point(5, 64);
|
||||
this.lblVarFlags.Name = "lblVarFlags";
|
||||
this.lblVarFlags.Size = new System.Drawing.Size(42, 29);
|
||||
this.lblVarFlags.TabIndex = 17;
|
||||
this.lblVarFlags.Text = "Flags:";
|
||||
this.lblVarFlags.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// lblVarName
|
||||
//
|
||||
this.lblVarName.AutoSize = true;
|
||||
this.lblVarName.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.lblVarName.Location = new System.Drawing.Point(5, 33);
|
||||
this.lblVarName.Name = "lblVarName";
|
||||
this.lblVarName.Size = new System.Drawing.Size(42, 29);
|
||||
this.lblVarName.TabIndex = 0;
|
||||
this.lblVarName.Text = "Name:";
|
||||
this.lblVarName.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// selName
|
||||
//
|
||||
this.selName.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.selName.Location = new System.Drawing.Point(55, 36);
|
||||
this.selName.Name = "selName";
|
||||
this.selName.PlaceholderText = "Variable Name";
|
||||
this.selName.Size = new System.Drawing.Size(629, 23);
|
||||
this.selName.TabIndex = 1;
|
||||
//
|
||||
// selFlags
|
||||
//
|
||||
this.selFlags.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.selFlags.Location = new System.Drawing.Point(55, 67);
|
||||
this.selFlags.Name = "selFlags";
|
||||
this.selFlags.Size = new System.Drawing.Size(629, 23);
|
||||
this.selFlags.TabIndex = 18;
|
||||
this.selFlags.Text = "0";
|
||||
this.selFlags.Value = 0;
|
||||
//
|
||||
// lbVarlValue
|
||||
//
|
||||
this.lbVarlValue.AutoSize = true;
|
||||
this.lbVarlValue.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.lbVarlValue.Location = new System.Drawing.Point(5, 2);
|
||||
this.lbVarlValue.Name = "lbVarlValue";
|
||||
this.lbVarlValue.Size = new System.Drawing.Size(42, 29);
|
||||
this.lbVarlValue.TabIndex = 19;
|
||||
this.lbVarlValue.Text = "Value:";
|
||||
this.lbVarlValue.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// selValue
|
||||
//
|
||||
this.selValue.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.selValue.Location = new System.Drawing.Point(55, 5);
|
||||
this.selValue.Name = "selValue";
|
||||
this.selValue.Size = new System.Drawing.Size(629, 23);
|
||||
this.selValue.TabIndex = 20;
|
||||
this.selValue.Text = "0";
|
||||
this.selValue.Value = 0;
|
||||
//
|
||||
// IntVariablePanel
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = System.Drawing.Color.LightGray;
|
||||
this.Controls.Add(this.variableTabControl);
|
||||
this.Name = "FloatVariablePanel";
|
||||
this.Size = new System.Drawing.Size(707, 419);
|
||||
this.variableTabControl.ResumeLayout(false);
|
||||
this.generalTab.ResumeLayout(false);
|
||||
this.generalTab.PerformLayout();
|
||||
this.tblGeneral.ResumeLayout(false);
|
||||
this.tblGeneral.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private TabControl variableTabControl;
|
||||
private TabPage generalTab;
|
||||
private TableLayoutPanel tblGeneral;
|
||||
private Label lblVarName;
|
||||
private TextBox selName;
|
||||
private Label lblVarFlags;
|
||||
private IntUpDown selFlags;
|
||||
private FloatUpDown selValue;
|
||||
private Label lbVarlValue;
|
||||
}
|
||||
}
|
42
W4Gui/Components/VariablePanel/FloatVariablePanel.cs
Normal file
42
W4Gui/Components/VariablePanel/FloatVariablePanel.cs
Normal file
|
@ -0,0 +1,42 @@
|
|||
using LibW4M.Data.X;
|
||||
using LibW4M.Data.Teams;
|
||||
using LibW4M.Data.WeaponFactory;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using W4Gui.Dialogs;
|
||||
using W4Gui.Tabs;
|
||||
using LibW4M.Data.Highscores;
|
||||
|
||||
namespace W4Gui.Components.VariablePanel
|
||||
{
|
||||
public partial class FloatVariablePanel : UserControl
|
||||
{
|
||||
public FloatVariablePanel()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public void SaveResourceData(ref FloatResourceDetail resource)
|
||||
{
|
||||
// Load general
|
||||
resource.Value = selValue.Value;
|
||||
resource.Name = DataManager.SaveFile.LookupString(selName.Text);
|
||||
resource.Flags = selFlags.Value;
|
||||
}
|
||||
|
||||
public void LoadResourceData(FloatResourceDetail resource)
|
||||
{
|
||||
// Load general
|
||||
this.selValue.Value = resource.Value;
|
||||
this.selName.Text = resource.Name.Value;
|
||||
this.selFlags.Value = resource.Flags;
|
||||
}
|
||||
}
|
||||
}
|
60
W4Gui/Components/VariablePanel/FloatVariablePanel.resx
Normal file
60
W4Gui/Components/VariablePanel/FloatVariablePanel.resx
Normal file
|
@ -0,0 +1,60 @@
|
|||
<root>
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
182
W4Gui/Components/VariablePanel/IntVariablePanel.Designer.cs
generated
Normal file
182
W4Gui/Components/VariablePanel/IntVariablePanel.Designer.cs
generated
Normal file
|
@ -0,0 +1,182 @@
|
|||
namespace W4Gui.Components.VariablePanel
|
||||
{
|
||||
partial class IntVariablePanel
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Component Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.variableTabControl = new System.Windows.Forms.TabControl();
|
||||
this.generalTab = new System.Windows.Forms.TabPage();
|
||||
this.tblGeneral = new System.Windows.Forms.TableLayoutPanel();
|
||||
this.lblVarFlags = new System.Windows.Forms.Label();
|
||||
this.lblVarName = new System.Windows.Forms.Label();
|
||||
this.selName = new System.Windows.Forms.TextBox();
|
||||
this.selFlags = new W4Gui.Components.IntUpDown();
|
||||
this.lbVarlValue = new System.Windows.Forms.Label();
|
||||
this.selValue = new W4Gui.Components.IntUpDown();
|
||||
this.variableTabControl.SuspendLayout();
|
||||
this.generalTab.SuspendLayout();
|
||||
this.tblGeneral.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// variableTabControl
|
||||
//
|
||||
this.variableTabControl.Controls.Add(this.generalTab);
|
||||
this.variableTabControl.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.variableTabControl.HotTrack = true;
|
||||
this.variableTabControl.Location = new System.Drawing.Point(0, 0);
|
||||
this.variableTabControl.Name = "variableTabControl";
|
||||
this.variableTabControl.SelectedIndex = 0;
|
||||
this.variableTabControl.Size = new System.Drawing.Size(707, 419);
|
||||
this.variableTabControl.TabIndex = 1;
|
||||
//
|
||||
// generalTab
|
||||
//
|
||||
this.generalTab.BackColor = System.Drawing.Color.Transparent;
|
||||
this.generalTab.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
|
||||
this.generalTab.Controls.Add(this.tblGeneral);
|
||||
this.generalTab.Location = new System.Drawing.Point(4, 24);
|
||||
this.generalTab.Name = "generalTab";
|
||||
this.generalTab.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.generalTab.Size = new System.Drawing.Size(699, 391);
|
||||
this.generalTab.TabIndex = 0;
|
||||
this.generalTab.Text = "General";
|
||||
//
|
||||
// tblGeneral
|
||||
//
|
||||
this.tblGeneral.AutoSize = true;
|
||||
this.tblGeneral.CellBorderStyle = System.Windows.Forms.TableLayoutPanelCellBorderStyle.Inset;
|
||||
this.tblGeneral.ColumnCount = 2;
|
||||
this.tblGeneral.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
|
||||
this.tblGeneral.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
|
||||
this.tblGeneral.Controls.Add(this.selValue, 0, 0);
|
||||
this.tblGeneral.Controls.Add(this.lbVarlValue, 0, 0);
|
||||
this.tblGeneral.Controls.Add(this.lblVarFlags, 0, 2);
|
||||
this.tblGeneral.Controls.Add(this.lblVarName, 0, 1);
|
||||
this.tblGeneral.Controls.Add(this.selName, 1, 1);
|
||||
this.tblGeneral.Controls.Add(this.selFlags, 1, 2);
|
||||
this.tblGeneral.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.tblGeneral.Location = new System.Drawing.Point(3, 3);
|
||||
this.tblGeneral.Name = "tblGeneral";
|
||||
this.tblGeneral.RowCount = 3;
|
||||
this.tblGeneral.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||
this.tblGeneral.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||
this.tblGeneral.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||
this.tblGeneral.Size = new System.Drawing.Size(689, 95);
|
||||
this.tblGeneral.TabIndex = 0;
|
||||
//
|
||||
// lblVarFlags
|
||||
//
|
||||
this.lblVarFlags.AutoSize = true;
|
||||
this.lblVarFlags.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.lblVarFlags.Location = new System.Drawing.Point(5, 64);
|
||||
this.lblVarFlags.Name = "lblVarFlags";
|
||||
this.lblVarFlags.Size = new System.Drawing.Size(42, 29);
|
||||
this.lblVarFlags.TabIndex = 17;
|
||||
this.lblVarFlags.Text = "Flags:";
|
||||
this.lblVarFlags.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// lblVarName
|
||||
//
|
||||
this.lblVarName.AutoSize = true;
|
||||
this.lblVarName.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.lblVarName.Location = new System.Drawing.Point(5, 33);
|
||||
this.lblVarName.Name = "lblVarName";
|
||||
this.lblVarName.Size = new System.Drawing.Size(42, 29);
|
||||
this.lblVarName.TabIndex = 0;
|
||||
this.lblVarName.Text = "Name:";
|
||||
this.lblVarName.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// selName
|
||||
//
|
||||
this.selName.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.selName.Location = new System.Drawing.Point(55, 36);
|
||||
this.selName.Name = "selName";
|
||||
this.selName.PlaceholderText = "Variable Name";
|
||||
this.selName.Size = new System.Drawing.Size(629, 23);
|
||||
this.selName.TabIndex = 1;
|
||||
//
|
||||
// selFlags
|
||||
//
|
||||
this.selFlags.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.selFlags.Location = new System.Drawing.Point(55, 67);
|
||||
this.selFlags.Name = "selFlags";
|
||||
this.selFlags.Size = new System.Drawing.Size(629, 23);
|
||||
this.selFlags.TabIndex = 18;
|
||||
this.selFlags.Text = "0";
|
||||
this.selFlags.Value = 0;
|
||||
//
|
||||
// lbVarlValue
|
||||
//
|
||||
this.lbVarlValue.AutoSize = true;
|
||||
this.lbVarlValue.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.lbVarlValue.Location = new System.Drawing.Point(5, 2);
|
||||
this.lbVarlValue.Name = "lbVarlValue";
|
||||
this.lbVarlValue.Size = new System.Drawing.Size(42, 29);
|
||||
this.lbVarlValue.TabIndex = 19;
|
||||
this.lbVarlValue.Text = "Value:";
|
||||
this.lbVarlValue.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// selValue
|
||||
//
|
||||
this.selValue.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.selValue.Location = new System.Drawing.Point(55, 5);
|
||||
this.selValue.Name = "selValue";
|
||||
this.selValue.Size = new System.Drawing.Size(629, 23);
|
||||
this.selValue.TabIndex = 20;
|
||||
this.selValue.Text = "0";
|
||||
this.selValue.Value = 0;
|
||||
//
|
||||
// IntVariablePanel
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = System.Drawing.Color.LightGray;
|
||||
this.Controls.Add(this.variableTabControl);
|
||||
this.Name = "IntVariablePanel";
|
||||
this.Size = new System.Drawing.Size(707, 419);
|
||||
this.variableTabControl.ResumeLayout(false);
|
||||
this.generalTab.ResumeLayout(false);
|
||||
this.generalTab.PerformLayout();
|
||||
this.tblGeneral.ResumeLayout(false);
|
||||
this.tblGeneral.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private TabControl variableTabControl;
|
||||
private TabPage generalTab;
|
||||
private TableLayoutPanel tblGeneral;
|
||||
private Label lblVarName;
|
||||
private TextBox selName;
|
||||
private Label lblVarFlags;
|
||||
private IntUpDown selFlags;
|
||||
private IntUpDown selValue;
|
||||
private Label lbVarlValue;
|
||||
}
|
||||
}
|
42
W4Gui/Components/VariablePanel/IntVariablePanel.cs
Normal file
42
W4Gui/Components/VariablePanel/IntVariablePanel.cs
Normal file
|
@ -0,0 +1,42 @@
|
|||
using LibW4M.Data.X;
|
||||
using LibW4M.Data.Teams;
|
||||
using LibW4M.Data.WeaponFactory;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using W4Gui.Dialogs;
|
||||
using W4Gui.Tabs;
|
||||
using LibW4M.Data.Highscores;
|
||||
|
||||
namespace W4Gui.Components.VariablePanel
|
||||
{
|
||||
public partial class IntVariablePanel : UserControl
|
||||
{
|
||||
public IntVariablePanel()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public void SaveResourceData(ref IntResourceDetail resource)
|
||||
{
|
||||
// Load general
|
||||
resource.Value = selValue.Value;
|
||||
resource.Name = DataManager.SaveFile.LookupString(selName.Text);
|
||||
resource.Flags = selFlags.Value;
|
||||
}
|
||||
|
||||
public void LoadResourceData(IntResourceDetail resource)
|
||||
{
|
||||
// Load general
|
||||
this.selValue.Value = resource.Value;
|
||||
this.selName.Text = resource.Name.Value;
|
||||
this.selFlags.Value = resource.Flags;
|
||||
}
|
||||
}
|
||||
}
|
60
W4Gui/Components/VariablePanel/IntVariablePanel.resx
Normal file
60
W4Gui/Components/VariablePanel/IntVariablePanel.resx
Normal file
|
@ -0,0 +1,60 @@
|
|||
<root>
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
181
W4Gui/Components/VariablePanel/StringVariablePanel.Designer.cs
generated
Normal file
181
W4Gui/Components/VariablePanel/StringVariablePanel.Designer.cs
generated
Normal file
|
@ -0,0 +1,181 @@
|
|||
namespace W4Gui.Components.VariablePanel
|
||||
{
|
||||
partial class StringVariablePanel
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Component Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.variableTabControl = new System.Windows.Forms.TabControl();
|
||||
this.generalTab = new System.Windows.Forms.TabPage();
|
||||
this.tblGeneral = new System.Windows.Forms.TableLayoutPanel();
|
||||
this.lblVarFlags = new System.Windows.Forms.Label();
|
||||
this.lblVarName = new System.Windows.Forms.Label();
|
||||
this.selName = new System.Windows.Forms.TextBox();
|
||||
this.selFlags = new W4Gui.Components.IntUpDown();
|
||||
this.lbVarlValue = new System.Windows.Forms.Label();
|
||||
this.selValue = new System.Windows.Forms.TextBox();
|
||||
this.variableTabControl.SuspendLayout();
|
||||
this.generalTab.SuspendLayout();
|
||||
this.tblGeneral.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// variableTabControl
|
||||
//
|
||||
this.variableTabControl.Controls.Add(this.generalTab);
|
||||
this.variableTabControl.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.variableTabControl.HotTrack = true;
|
||||
this.variableTabControl.Location = new System.Drawing.Point(0, 0);
|
||||
this.variableTabControl.Name = "variableTabControl";
|
||||
this.variableTabControl.SelectedIndex = 0;
|
||||
this.variableTabControl.Size = new System.Drawing.Size(707, 419);
|
||||
this.variableTabControl.TabIndex = 1;
|
||||
//
|
||||
// generalTab
|
||||
//
|
||||
this.generalTab.BackColor = System.Drawing.Color.Transparent;
|
||||
this.generalTab.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
|
||||
this.generalTab.Controls.Add(this.tblGeneral);
|
||||
this.generalTab.Location = new System.Drawing.Point(4, 24);
|
||||
this.generalTab.Name = "generalTab";
|
||||
this.generalTab.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.generalTab.Size = new System.Drawing.Size(699, 391);
|
||||
this.generalTab.TabIndex = 0;
|
||||
this.generalTab.Text = "General";
|
||||
//
|
||||
// tblGeneral
|
||||
//
|
||||
this.tblGeneral.AutoSize = true;
|
||||
this.tblGeneral.CellBorderStyle = System.Windows.Forms.TableLayoutPanelCellBorderStyle.Inset;
|
||||
this.tblGeneral.ColumnCount = 2;
|
||||
this.tblGeneral.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
|
||||
this.tblGeneral.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
|
||||
this.tblGeneral.Controls.Add(this.selValue, 0, 0);
|
||||
this.tblGeneral.Controls.Add(this.lbVarlValue, 0, 0);
|
||||
this.tblGeneral.Controls.Add(this.lblVarFlags, 0, 2);
|
||||
this.tblGeneral.Controls.Add(this.lblVarName, 0, 1);
|
||||
this.tblGeneral.Controls.Add(this.selName, 1, 1);
|
||||
this.tblGeneral.Controls.Add(this.selFlags, 1, 2);
|
||||
this.tblGeneral.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.tblGeneral.Location = new System.Drawing.Point(3, 3);
|
||||
this.tblGeneral.Name = "tblGeneral";
|
||||
this.tblGeneral.RowCount = 3;
|
||||
this.tblGeneral.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||
this.tblGeneral.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||
this.tblGeneral.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||
this.tblGeneral.Size = new System.Drawing.Size(689, 95);
|
||||
this.tblGeneral.TabIndex = 0;
|
||||
//
|
||||
// lblVarFlags
|
||||
//
|
||||
this.lblVarFlags.AutoSize = true;
|
||||
this.lblVarFlags.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.lblVarFlags.Location = new System.Drawing.Point(5, 64);
|
||||
this.lblVarFlags.Name = "lblVarFlags";
|
||||
this.lblVarFlags.Size = new System.Drawing.Size(42, 29);
|
||||
this.lblVarFlags.TabIndex = 17;
|
||||
this.lblVarFlags.Text = "Flags:";
|
||||
this.lblVarFlags.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// lblVarName
|
||||
//
|
||||
this.lblVarName.AutoSize = true;
|
||||
this.lblVarName.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.lblVarName.Location = new System.Drawing.Point(5, 33);
|
||||
this.lblVarName.Name = "lblVarName";
|
||||
this.lblVarName.Size = new System.Drawing.Size(42, 29);
|
||||
this.lblVarName.TabIndex = 0;
|
||||
this.lblVarName.Text = "Name:";
|
||||
this.lblVarName.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// selName
|
||||
//
|
||||
this.selName.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.selName.Location = new System.Drawing.Point(55, 36);
|
||||
this.selName.Name = "selName";
|
||||
this.selName.PlaceholderText = "Variable Name";
|
||||
this.selName.Size = new System.Drawing.Size(629, 23);
|
||||
this.selName.TabIndex = 1;
|
||||
//
|
||||
// selFlags
|
||||
//
|
||||
this.selFlags.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.selFlags.Location = new System.Drawing.Point(55, 67);
|
||||
this.selFlags.Name = "selFlags";
|
||||
this.selFlags.Size = new System.Drawing.Size(629, 23);
|
||||
this.selFlags.TabIndex = 18;
|
||||
this.selFlags.Text = "0";
|
||||
this.selFlags.Value = 0;
|
||||
//
|
||||
// lbVarlValue
|
||||
//
|
||||
this.lbVarlValue.AutoSize = true;
|
||||
this.lbVarlValue.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.lbVarlValue.Location = new System.Drawing.Point(5, 2);
|
||||
this.lbVarlValue.Name = "lbVarlValue";
|
||||
this.lbVarlValue.Size = new System.Drawing.Size(42, 29);
|
||||
this.lbVarlValue.TabIndex = 19;
|
||||
this.lbVarlValue.Text = "Value:";
|
||||
this.lbVarlValue.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// selValue
|
||||
//
|
||||
this.selValue.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.selValue.Location = new System.Drawing.Point(55, 5);
|
||||
this.selValue.Name = "selValue";
|
||||
this.selValue.Size = new System.Drawing.Size(629, 23);
|
||||
this.selValue.TabIndex = 20;
|
||||
this.selValue.PlaceholderText = "String value";
|
||||
//
|
||||
// StringVariablePanel
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = System.Drawing.Color.LightGray;
|
||||
this.Controls.Add(this.variableTabControl);
|
||||
this.Name = "StringVariablePanel";
|
||||
this.Size = new System.Drawing.Size(707, 419);
|
||||
this.variableTabControl.ResumeLayout(false);
|
||||
this.generalTab.ResumeLayout(false);
|
||||
this.generalTab.PerformLayout();
|
||||
this.tblGeneral.ResumeLayout(false);
|
||||
this.tblGeneral.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private TabControl variableTabControl;
|
||||
private TabPage generalTab;
|
||||
private TableLayoutPanel tblGeneral;
|
||||
private Label lblVarName;
|
||||
private TextBox selName;
|
||||
private Label lblVarFlags;
|
||||
private IntUpDown selFlags;
|
||||
private TextBox selValue;
|
||||
private Label lbVarlValue;
|
||||
}
|
||||
}
|
42
W4Gui/Components/VariablePanel/StringVariablePanel.cs
Normal file
42
W4Gui/Components/VariablePanel/StringVariablePanel.cs
Normal file
|
@ -0,0 +1,42 @@
|
|||
using LibW4M.Data.X;
|
||||
using LibW4M.Data.Teams;
|
||||
using LibW4M.Data.WeaponFactory;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using W4Gui.Dialogs;
|
||||
using W4Gui.Tabs;
|
||||
using LibW4M.Data.Highscores;
|
||||
|
||||
namespace W4Gui.Components.VariablePanel
|
||||
{
|
||||
public partial class StringVariablePanel : UserControl
|
||||
{
|
||||
public StringVariablePanel()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public void SaveResourceData(ref StringResourceDetail resource)
|
||||
{
|
||||
// Load general
|
||||
resource.Value = DataManager.SaveFile.LookupString(selValue.Text);
|
||||
resource.Name = DataManager.SaveFile.LookupString(selName.Text);
|
||||
resource.Flags = selFlags.Value;
|
||||
}
|
||||
|
||||
public void LoadResourceData(StringResourceDetail resource)
|
||||
{
|
||||
// Load general
|
||||
this.selValue.Text = resource.Value.Value;
|
||||
this.selName.Text = resource.Name.Value;
|
||||
this.selFlags.Value = resource.Flags;
|
||||
}
|
||||
}
|
||||
}
|
60
W4Gui/Components/VariablePanel/StringVariablePanel.resx
Normal file
60
W4Gui/Components/VariablePanel/StringVariablePanel.resx
Normal file
|
@ -0,0 +1,60 @@
|
|||
<root>
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
182
W4Gui/Components/VariablePanel/UIntVariablePanel.Designer.cs
generated
Normal file
182
W4Gui/Components/VariablePanel/UIntVariablePanel.Designer.cs
generated
Normal file
|
@ -0,0 +1,182 @@
|
|||
namespace W4Gui.Components.VariablePanel
|
||||
{
|
||||
partial class UIntVariablePanel
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Component Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.variableTabControl = new System.Windows.Forms.TabControl();
|
||||
this.generalTab = new System.Windows.Forms.TabPage();
|
||||
this.tblGeneral = new System.Windows.Forms.TableLayoutPanel();
|
||||
this.lblVarFlags = new System.Windows.Forms.Label();
|
||||
this.lblVarName = new System.Windows.Forms.Label();
|
||||
this.selName = new System.Windows.Forms.TextBox();
|
||||
this.selFlags = new W4Gui.Components.IntUpDown();
|
||||
this.lbVarlValue = new System.Windows.Forms.Label();
|
||||
this.selValue = new W4Gui.Components.UIntUpDown();
|
||||
this.variableTabControl.SuspendLayout();
|
||||
this.generalTab.SuspendLayout();
|
||||
this.tblGeneral.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// variableTabControl
|
||||
//
|
||||
this.variableTabControl.Controls.Add(this.generalTab);
|
||||
this.variableTabControl.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.variableTabControl.HotTrack = true;
|
||||
this.variableTabControl.Location = new System.Drawing.Point(0, 0);
|
||||
this.variableTabControl.Name = "variableTabControl";
|
||||
this.variableTabControl.SelectedIndex = 0;
|
||||
this.variableTabControl.Size = new System.Drawing.Size(707, 419);
|
||||
this.variableTabControl.TabIndex = 1;
|
||||
//
|
||||
// generalTab
|
||||
//
|
||||
this.generalTab.BackColor = System.Drawing.Color.Transparent;
|
||||
this.generalTab.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
|
||||
this.generalTab.Controls.Add(this.tblGeneral);
|
||||
this.generalTab.Location = new System.Drawing.Point(4, 24);
|
||||
this.generalTab.Name = "generalTab";
|
||||
this.generalTab.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.generalTab.Size = new System.Drawing.Size(699, 391);
|
||||
this.generalTab.TabIndex = 0;
|
||||
this.generalTab.Text = "General";
|
||||
//
|
||||
// tblGeneral
|
||||
//
|
||||
this.tblGeneral.AutoSize = true;
|
||||
this.tblGeneral.CellBorderStyle = System.Windows.Forms.TableLayoutPanelCellBorderStyle.Inset;
|
||||
this.tblGeneral.ColumnCount = 2;
|
||||
this.tblGeneral.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
|
||||
this.tblGeneral.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
|
||||
this.tblGeneral.Controls.Add(this.selValue, 0, 0);
|
||||
this.tblGeneral.Controls.Add(this.lbVarlValue, 0, 0);
|
||||
this.tblGeneral.Controls.Add(this.lblVarFlags, 0, 2);
|
||||
this.tblGeneral.Controls.Add(this.lblVarName, 0, 1);
|
||||
this.tblGeneral.Controls.Add(this.selName, 1, 1);
|
||||
this.tblGeneral.Controls.Add(this.selFlags, 1, 2);
|
||||
this.tblGeneral.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.tblGeneral.Location = new System.Drawing.Point(3, 3);
|
||||
this.tblGeneral.Name = "tblGeneral";
|
||||
this.tblGeneral.RowCount = 3;
|
||||
this.tblGeneral.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||
this.tblGeneral.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||
this.tblGeneral.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||
this.tblGeneral.Size = new System.Drawing.Size(689, 95);
|
||||
this.tblGeneral.TabIndex = 0;
|
||||
//
|
||||
// lblVarFlags
|
||||
//
|
||||
this.lblVarFlags.AutoSize = true;
|
||||
this.lblVarFlags.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.lblVarFlags.Location = new System.Drawing.Point(5, 64);
|
||||
this.lblVarFlags.Name = "lblVarFlags";
|
||||
this.lblVarFlags.Size = new System.Drawing.Size(42, 29);
|
||||
this.lblVarFlags.TabIndex = 17;
|
||||
this.lblVarFlags.Text = "Flags:";
|
||||
this.lblVarFlags.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// lblVarName
|
||||
//
|
||||
this.lblVarName.AutoSize = true;
|
||||
this.lblVarName.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.lblVarName.Location = new System.Drawing.Point(5, 33);
|
||||
this.lblVarName.Name = "lblVarName";
|
||||
this.lblVarName.Size = new System.Drawing.Size(42, 29);
|
||||
this.lblVarName.TabIndex = 0;
|
||||
this.lblVarName.Text = "Name:";
|
||||
this.lblVarName.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// selName
|
||||
//
|
||||
this.selName.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.selName.Location = new System.Drawing.Point(55, 36);
|
||||
this.selName.Name = "selName";
|
||||
this.selName.PlaceholderText = "Variable Name";
|
||||
this.selName.Size = new System.Drawing.Size(629, 23);
|
||||
this.selName.TabIndex = 1;
|
||||
//
|
||||
// selFlags
|
||||
//
|
||||
this.selFlags.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.selFlags.Location = new System.Drawing.Point(55, 67);
|
||||
this.selFlags.Name = "selFlags";
|
||||
this.selFlags.Size = new System.Drawing.Size(629, 23);
|
||||
this.selFlags.TabIndex = 18;
|
||||
this.selFlags.Text = "0";
|
||||
this.selFlags.Value = 0;
|
||||
//
|
||||
// lbVarlValue
|
||||
//
|
||||
this.lbVarlValue.AutoSize = true;
|
||||
this.lbVarlValue.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.lbVarlValue.Location = new System.Drawing.Point(5, 2);
|
||||
this.lbVarlValue.Name = "lbVarlValue";
|
||||
this.lbVarlValue.Size = new System.Drawing.Size(42, 29);
|
||||
this.lbVarlValue.TabIndex = 19;
|
||||
this.lbVarlValue.Text = "Value:";
|
||||
this.lbVarlValue.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// selValue
|
||||
//
|
||||
this.selValue.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.selValue.Location = new System.Drawing.Point(55, 5);
|
||||
this.selValue.Name = "selValue";
|
||||
this.selValue.Size = new System.Drawing.Size(629, 23);
|
||||
this.selValue.TabIndex = 20;
|
||||
this.selValue.Text = "0";
|
||||
this.selValue.Value = 0;
|
||||
//
|
||||
// IntVariablePanel
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = System.Drawing.Color.LightGray;
|
||||
this.Controls.Add(this.variableTabControl);
|
||||
this.Name = "UIntVariablePanel";
|
||||
this.Size = new System.Drawing.Size(707, 419);
|
||||
this.variableTabControl.ResumeLayout(false);
|
||||
this.generalTab.ResumeLayout(false);
|
||||
this.generalTab.PerformLayout();
|
||||
this.tblGeneral.ResumeLayout(false);
|
||||
this.tblGeneral.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private TabControl variableTabControl;
|
||||
private TabPage generalTab;
|
||||
private TableLayoutPanel tblGeneral;
|
||||
private Label lblVarName;
|
||||
private TextBox selName;
|
||||
private Label lblVarFlags;
|
||||
private IntUpDown selFlags;
|
||||
private UIntUpDown selValue;
|
||||
private Label lbVarlValue;
|
||||
}
|
||||
}
|
42
W4Gui/Components/VariablePanel/UIntVariablePanel.cs
Normal file
42
W4Gui/Components/VariablePanel/UIntVariablePanel.cs
Normal file
|
@ -0,0 +1,42 @@
|
|||
using LibW4M.Data.X;
|
||||
using LibW4M.Data.Teams;
|
||||
using LibW4M.Data.WeaponFactory;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using W4Gui.Dialogs;
|
||||
using W4Gui.Tabs;
|
||||
using LibW4M.Data.Highscores;
|
||||
|
||||
namespace W4Gui.Components.VariablePanel
|
||||
{
|
||||
public partial class UIntVariablePanel : UserControl
|
||||
{
|
||||
public UIntVariablePanel()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public void SaveResourceData(ref UIntResourceDetail resource)
|
||||
{
|
||||
// Load general
|
||||
resource.Value = selValue.Value;
|
||||
resource.Name = DataManager.SaveFile.LookupString(selName.Text);
|
||||
resource.Flags = selFlags.Value;
|
||||
}
|
||||
|
||||
public void LoadResourceData(UIntResourceDetail resource)
|
||||
{
|
||||
// Load general
|
||||
this.selValue.Value = resource.Value;
|
||||
this.selName.Text = resource.Name.Value;
|
||||
this.selFlags.Value = resource.Flags;
|
||||
}
|
||||
}
|
||||
}
|
60
W4Gui/Components/VariablePanel/UIntVariablePanel.resx
Normal file
60
W4Gui/Components/VariablePanel/UIntVariablePanel.resx
Normal file
|
@ -0,0 +1,60 @@
|
|||
<root>
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
181
W4Gui/Components/VariablePanel/VectorVariablePanel.Designer.cs
generated
Normal file
181
W4Gui/Components/VariablePanel/VectorVariablePanel.Designer.cs
generated
Normal file
|
@ -0,0 +1,181 @@
|
|||
namespace W4Gui.Components.VariablePanel
|
||||
{
|
||||
partial class VectorVariablePanel
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Component Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.variableTabControl = new System.Windows.Forms.TabControl();
|
||||
this.generalTab = new System.Windows.Forms.TabPage();
|
||||
this.tblGeneral = new System.Windows.Forms.TableLayoutPanel();
|
||||
this.lblVarFlags = new System.Windows.Forms.Label();
|
||||
this.lblVarName = new System.Windows.Forms.Label();
|
||||
this.selName = new System.Windows.Forms.TextBox();
|
||||
this.selFlags = new W4Gui.Components.IntUpDown();
|
||||
this.lbVarlValue = new System.Windows.Forms.Label();
|
||||
this.selValue = new W4Gui.Components.VectorSelect();
|
||||
this.variableTabControl.SuspendLayout();
|
||||
this.generalTab.SuspendLayout();
|
||||
this.tblGeneral.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// variableTabControl
|
||||
//
|
||||
this.variableTabControl.Controls.Add(this.generalTab);
|
||||
this.variableTabControl.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.variableTabControl.HotTrack = true;
|
||||
this.variableTabControl.Location = new System.Drawing.Point(0, 0);
|
||||
this.variableTabControl.Name = "variableTabControl";
|
||||
this.variableTabControl.SelectedIndex = 0;
|
||||
this.variableTabControl.Size = new System.Drawing.Size(707, 419);
|
||||
this.variableTabControl.TabIndex = 1;
|
||||
//
|
||||
// generalTab
|
||||
//
|
||||
this.generalTab.BackColor = System.Drawing.Color.Transparent;
|
||||
this.generalTab.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
|
||||
this.generalTab.Controls.Add(this.tblGeneral);
|
||||
this.generalTab.Location = new System.Drawing.Point(4, 24);
|
||||
this.generalTab.Name = "generalTab";
|
||||
this.generalTab.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.generalTab.Size = new System.Drawing.Size(699, 391);
|
||||
this.generalTab.TabIndex = 0;
|
||||
this.generalTab.Text = "General";
|
||||
//
|
||||
// tblGeneral
|
||||
//
|
||||
this.tblGeneral.AutoSize = true;
|
||||
this.tblGeneral.CellBorderStyle = System.Windows.Forms.TableLayoutPanelCellBorderStyle.Inset;
|
||||
this.tblGeneral.ColumnCount = 2;
|
||||
this.tblGeneral.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
|
||||
this.tblGeneral.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
|
||||
this.tblGeneral.Controls.Add(this.selValue, 0, 0);
|
||||
this.tblGeneral.Controls.Add(this.lbVarlValue, 0, 0);
|
||||
this.tblGeneral.Controls.Add(this.lblVarFlags, 0, 2);
|
||||
this.tblGeneral.Controls.Add(this.lblVarName, 0, 1);
|
||||
this.tblGeneral.Controls.Add(this.selName, 1, 1);
|
||||
this.tblGeneral.Controls.Add(this.selFlags, 1, 2);
|
||||
this.tblGeneral.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.tblGeneral.Location = new System.Drawing.Point(3, 3);
|
||||
this.tblGeneral.Name = "tblGeneral";
|
||||
this.tblGeneral.RowCount = 3;
|
||||
this.tblGeneral.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||
this.tblGeneral.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||
this.tblGeneral.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||
this.tblGeneral.Size = new System.Drawing.Size(689, 95);
|
||||
this.tblGeneral.TabIndex = 0;
|
||||
//
|
||||
// lblVarFlags
|
||||
//
|
||||
this.lblVarFlags.AutoSize = true;
|
||||
this.lblVarFlags.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.lblVarFlags.Location = new System.Drawing.Point(5, 64);
|
||||
this.lblVarFlags.Name = "lblVarFlags";
|
||||
this.lblVarFlags.Size = new System.Drawing.Size(42, 29);
|
||||
this.lblVarFlags.TabIndex = 17;
|
||||
this.lblVarFlags.Text = "Flags:";
|
||||
this.lblVarFlags.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// lblVarName
|
||||
//
|
||||
this.lblVarName.AutoSize = true;
|
||||
this.lblVarName.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.lblVarName.Location = new System.Drawing.Point(5, 33);
|
||||
this.lblVarName.Name = "lblVarName";
|
||||
this.lblVarName.Size = new System.Drawing.Size(42, 29);
|
||||
this.lblVarName.TabIndex = 0;
|
||||
this.lblVarName.Text = "Name:";
|
||||
this.lblVarName.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// selName
|
||||
//
|
||||
this.selName.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.selName.Location = new System.Drawing.Point(55, 36);
|
||||
this.selName.Name = "selName";
|
||||
this.selName.PlaceholderText = "Variable Name";
|
||||
this.selName.Size = new System.Drawing.Size(629, 23);
|
||||
this.selName.TabIndex = 1;
|
||||
//
|
||||
// selFlags
|
||||
//
|
||||
this.selFlags.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.selFlags.Location = new System.Drawing.Point(55, 67);
|
||||
this.selFlags.Name = "selFlags";
|
||||
this.selFlags.Size = new System.Drawing.Size(629, 23);
|
||||
this.selFlags.TabIndex = 18;
|
||||
this.selFlags.Text = "0";
|
||||
this.selFlags.Value = 0;
|
||||
//
|
||||
// lbVarlValue
|
||||
//
|
||||
this.lbVarlValue.AutoSize = true;
|
||||
this.lbVarlValue.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.lbVarlValue.Location = new System.Drawing.Point(5, 2);
|
||||
this.lbVarlValue.Name = "lbVarlValue";
|
||||
this.lbVarlValue.Size = new System.Drawing.Size(42, 29);
|
||||
this.lbVarlValue.TabIndex = 19;
|
||||
this.lbVarlValue.Text = "Value:";
|
||||
this.lbVarlValue.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// selValue
|
||||
//
|
||||
this.selValue.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.selValue.Location = new System.Drawing.Point(55, 5);
|
||||
this.selValue.Name = "selValue";
|
||||
this.selValue.Size = new System.Drawing.Size(629, 23);
|
||||
this.selValue.TabIndex = 20;
|
||||
this.selValue.Value = new LibXom.Data.XomVector(0, 0, 0);
|
||||
//
|
||||
// IntVariablePanel
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = System.Drawing.Color.LightGray;
|
||||
this.Controls.Add(this.variableTabControl);
|
||||
this.Name = "VectorVariablePanel";
|
||||
this.Size = new System.Drawing.Size(707, 419);
|
||||
this.variableTabControl.ResumeLayout(false);
|
||||
this.generalTab.ResumeLayout(false);
|
||||
this.generalTab.PerformLayout();
|
||||
this.tblGeneral.ResumeLayout(false);
|
||||
this.tblGeneral.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private TabControl variableTabControl;
|
||||
private TabPage generalTab;
|
||||
private TableLayoutPanel tblGeneral;
|
||||
private Label lblVarName;
|
||||
private TextBox selName;
|
||||
private Label lblVarFlags;
|
||||
private IntUpDown selFlags;
|
||||
private VectorSelect selValue;
|
||||
private Label lbVarlValue;
|
||||
}
|
||||
}
|
42
W4Gui/Components/VariablePanel/VectorVariablePanel.cs
Normal file
42
W4Gui/Components/VariablePanel/VectorVariablePanel.cs
Normal file
|
@ -0,0 +1,42 @@
|
|||
using LibW4M.Data.X;
|
||||
using LibW4M.Data.Teams;
|
||||
using LibW4M.Data.WeaponFactory;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using W4Gui.Dialogs;
|
||||
using W4Gui.Tabs;
|
||||
using LibW4M.Data.Highscores;
|
||||
|
||||
namespace W4Gui.Components.VariablePanel
|
||||
{
|
||||
public partial class VectorVariablePanel : UserControl
|
||||
{
|
||||
public VectorVariablePanel()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public void SaveResourceData(ref VectorResourceDetail resource)
|
||||
{
|
||||
// Load general
|
||||
resource.Value = selValue.Value;
|
||||
resource.Name = DataManager.SaveFile.LookupString(selName.Text);
|
||||
resource.Flags = selFlags.Value;
|
||||
}
|
||||
|
||||
public void LoadResourceData(VectorResourceDetail resource)
|
||||
{
|
||||
// Load general
|
||||
this.selValue.Value = resource.Value;
|
||||
this.selName.Text = resource.Name.Value;
|
||||
this.selFlags.Value = resource.Flags;
|
||||
}
|
||||
}
|
||||
}
|
60
W4Gui/Components/VariablePanel/VectorVariablePanel.resx
Normal file
60
W4Gui/Components/VariablePanel/VectorVariablePanel.resx
Normal file
|
@ -0,0 +1,60 @@
|
|||
<root>
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
154
W4Gui/Components/VectorSelect.Designer.cs
generated
Normal file
154
W4Gui/Components/VectorSelect.Designer.cs
generated
Normal file
|
@ -0,0 +1,154 @@
|
|||
namespace W4Gui.Components
|
||||
{
|
||||
partial class VectorSelect
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Component Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.tblVector = new System.Windows.Forms.TableLayoutPanel();
|
||||
this.selX = new W4Gui.Components.FloatUpDown();
|
||||
this.selY = new W4Gui.Components.FloatUpDown();
|
||||
this.selZ = new W4Gui.Components.FloatUpDown();
|
||||
this.lblX = new System.Windows.Forms.Label();
|
||||
this.lblY = new System.Windows.Forms.Label();
|
||||
this.lblZ = new System.Windows.Forms.Label();
|
||||
this.tblVector.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// tblVector
|
||||
//
|
||||
this.tblVector.AutoSize = true;
|
||||
this.tblVector.CellBorderStyle = System.Windows.Forms.TableLayoutPanelCellBorderStyle.Inset;
|
||||
this.tblVector.ColumnCount = 6;
|
||||
this.tblVector.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
|
||||
this.tblVector.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33.33333F));
|
||||
this.tblVector.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
|
||||
this.tblVector.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33.33333F));
|
||||
this.tblVector.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
|
||||
this.tblVector.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33.33333F));
|
||||
this.tblVector.Controls.Add(this.lblZ, 4, 0);
|
||||
this.tblVector.Controls.Add(this.lblY, 2, 0);
|
||||
this.tblVector.Controls.Add(this.selX, 1, 0);
|
||||
this.tblVector.Controls.Add(this.selY, 3, 0);
|
||||
this.tblVector.Controls.Add(this.selZ, 5, 0);
|
||||
this.tblVector.Controls.Add(this.lblX, 0, 0);
|
||||
this.tblVector.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.tblVector.Location = new System.Drawing.Point(0, 0);
|
||||
this.tblVector.Name = "tblVector";
|
||||
this.tblVector.RowCount = 1;
|
||||
this.tblVector.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
|
||||
this.tblVector.Size = new System.Drawing.Size(870, 33);
|
||||
this.tblVector.TabIndex = 0;
|
||||
//
|
||||
// selX
|
||||
//
|
||||
this.selX.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.selX.Location = new System.Drawing.Point(27, 5);
|
||||
this.selX.Name = "selX";
|
||||
this.selX.Size = new System.Drawing.Size(259, 23);
|
||||
this.selX.TabIndex = 0;
|
||||
this.selX.Text = "0.0";
|
||||
this.selX.Value = 0F;
|
||||
//
|
||||
// selY
|
||||
//
|
||||
this.selY.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.selY.Location = new System.Drawing.Point(316, 5);
|
||||
this.selY.Name = "selY";
|
||||
this.selY.Size = new System.Drawing.Size(259, 23);
|
||||
this.selY.TabIndex = 1;
|
||||
this.selY.Text = "0.0";
|
||||
this.selY.Value = 0F;
|
||||
//
|
||||
// selZ
|
||||
//
|
||||
this.selZ.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.selZ.Location = new System.Drawing.Point(605, 5);
|
||||
this.selZ.Name = "selZ";
|
||||
this.selZ.Size = new System.Drawing.Size(260, 23);
|
||||
this.selZ.TabIndex = 2;
|
||||
this.selZ.Text = "0.0";
|
||||
this.selZ.Value = 0F;
|
||||
//
|
||||
// lblX
|
||||
//
|
||||
this.lblX.AutoSize = true;
|
||||
this.lblX.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.lblX.Location = new System.Drawing.Point(5, 2);
|
||||
this.lblX.Name = "lblX";
|
||||
this.lblX.Size = new System.Drawing.Size(14, 29);
|
||||
this.lblX.TabIndex = 3;
|
||||
this.lblX.Text = "X";
|
||||
this.lblX.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// lblY
|
||||
//
|
||||
this.lblY.AutoSize = true;
|
||||
this.lblY.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.lblY.Location = new System.Drawing.Point(294, 2);
|
||||
this.lblY.Name = "lblY";
|
||||
this.lblY.Size = new System.Drawing.Size(14, 29);
|
||||
this.lblY.TabIndex = 4;
|
||||
this.lblY.Text = "Y";
|
||||
this.lblY.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// lblZ
|
||||
//
|
||||
this.lblZ.AutoSize = true;
|
||||
this.lblZ.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.lblZ.Location = new System.Drawing.Point(583, 2);
|
||||
this.lblZ.Name = "lblZ";
|
||||
this.lblZ.Size = new System.Drawing.Size(14, 29);
|
||||
this.lblZ.TabIndex = 5;
|
||||
this.lblZ.Text = "Z";
|
||||
this.lblZ.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// VectorSelect
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.AutoSize = true;
|
||||
this.Controls.Add(this.tblVector);
|
||||
this.Name = "VectorSelect";
|
||||
this.Size = new System.Drawing.Size(870, 34);
|
||||
this.tblVector.ResumeLayout(false);
|
||||
this.tblVector.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private TableLayoutPanel tblVector;
|
||||
private Label lblZ;
|
||||
private Label lblY;
|
||||
private FloatUpDown selX;
|
||||
private FloatUpDown selY;
|
||||
private FloatUpDown selZ;
|
||||
private Label lblX;
|
||||
}
|
||||
}
|
35
W4Gui/Components/VectorSelect.cs
Normal file
35
W4Gui/Components/VectorSelect.cs
Normal file
|
@ -0,0 +1,35 @@
|
|||
using LibW4M.Data.X;
|
||||
using LibXom.Data;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace W4Gui.Components
|
||||
{
|
||||
public partial class VectorSelect : UserControl
|
||||
{
|
||||
public XomVector Value
|
||||
{
|
||||
get
|
||||
{
|
||||
return new XomVector(selX.Value, selY.Value, selZ.Value);
|
||||
}
|
||||
set
|
||||
{
|
||||
selX.Value = value.X;
|
||||
selY.Value = value.Y;
|
||||
selZ.Value = value.Z;
|
||||
}
|
||||
}
|
||||
public VectorSelect()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
60
W4Gui/Components/VectorSelect.resx
Normal file
60
W4Gui/Components/VectorSelect.resx
Normal file
|
@ -0,0 +1,60 @@
|
|||
<root>
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
1
W4Gui/Components/WeaponsPanel.Designer.cs
generated
1
W4Gui/Components/WeaponsPanel.Designer.cs
generated
|
@ -300,6 +300,7 @@
|
|||
this.powerTab.Controls.Add(this.powerTable);
|
||||
this.powerTab.Location = new System.Drawing.Point(4, 24);
|
||||
this.powerTab.Name = "powerTab";
|
||||
this.powerTab.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.powerTab.Size = new System.Drawing.Size(645, 400);
|
||||
this.powerTab.TabIndex = 2;
|
||||
this.powerTab.Text = "Power";
|
||||
|
|
|
@ -15,17 +15,25 @@ namespace W4Gui
|
|||
public static void SaveAll()
|
||||
{
|
||||
foreach(TabEntry control in SaveComponents)
|
||||
{
|
||||
try
|
||||
{
|
||||
control.SaveFromControl();
|
||||
}
|
||||
catch { };
|
||||
}
|
||||
}
|
||||
|
||||
public static void LoadAll()
|
||||
{
|
||||
foreach (TabEntry control in SaveComponents)
|
||||
{
|
||||
try
|
||||
{
|
||||
control.LoadIntoControl();
|
||||
}
|
||||
catch { };
|
||||
}
|
||||
}
|
||||
|
||||
public static List<TabEntry> SaveComponents = new List<TabEntry>();
|
||||
|
|
107
W4Gui/Main.Designer.cs
generated
107
W4Gui/Main.Designer.cs
generated
|
@ -1,4 +1,5 @@
|
|||
using W4Gui.Tabs;
|
||||
using W4Gui.Tabs.VariablesTab;
|
||||
|
||||
namespace W4Gui
|
||||
{
|
||||
|
@ -44,17 +45,24 @@ namespace W4Gui
|
|||
this.teamTab = new System.Windows.Forms.TabPage();
|
||||
this.teamsPage = new W4Gui.Tabs.TeamsTab();
|
||||
this.schemeTab = new System.Windows.Forms.TabPage();
|
||||
this.schemesPage = new W4Gui.Tabs.SchemeTab();
|
||||
this.highscoreTab = new System.Windows.Forms.TabPage();
|
||||
this.highscoresPage = new W4Gui.Tabs.HighscoresTab();
|
||||
this.unlockItemsTab = new System.Windows.Forms.TabPage();
|
||||
this.unlockableItemsPanel = new W4Gui.Tabs.UnlockableItemsTab();
|
||||
this.inputTab = new System.Windows.Forms.TabPage();
|
||||
this.persistStatsTab = new System.Windows.Forms.TabPage();
|
||||
this.awardsTab = new System.Windows.Forms.TabPage();
|
||||
this.variablesTab = new System.Windows.Forms.TabPage();
|
||||
this.schemesPage = new W4Gui.Tabs.SchemeTab();
|
||||
this.variablesPage = new W4Gui.Tabs.VariablesTab.VariablesTabs();
|
||||
this.mainMenuStrip.SuspendLayout();
|
||||
this.mainTabControl.SuspendLayout();
|
||||
this.weaponTab.SuspendLayout();
|
||||
this.teamTab.SuspendLayout();
|
||||
this.schemeTab.SuspendLayout();
|
||||
this.highscoreTab.SuspendLayout();
|
||||
this.unlockItemsTab.SuspendLayout();
|
||||
this.variablesTab.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// mainMenuStrip
|
||||
|
@ -66,7 +74,7 @@ namespace W4Gui
|
|||
this.mainMenuStrip.Location = new System.Drawing.Point(0, 0);
|
||||
this.mainMenuStrip.Name = "mainMenuStrip";
|
||||
this.mainMenuStrip.RenderMode = System.Windows.Forms.ToolStripRenderMode.Professional;
|
||||
this.mainMenuStrip.Size = new System.Drawing.Size(876, 24);
|
||||
this.mainMenuStrip.Size = new System.Drawing.Size(913, 24);
|
||||
this.mainMenuStrip.TabIndex = 0;
|
||||
this.mainMenuStrip.Text = "Menu Strip";
|
||||
//
|
||||
|
@ -110,6 +118,7 @@ namespace W4Gui
|
|||
this.convertToPS2ToolStripMenuItem.Name = "convertToPS2ToolStripMenuItem";
|
||||
this.convertToPS2ToolStripMenuItem.Size = new System.Drawing.Size(211, 22);
|
||||
this.convertToPS2ToolStripMenuItem.Text = "Convert to PS2";
|
||||
this.convertToPS2ToolStripMenuItem.Click += new System.EventHandler(this.convertToPS2ToolStripMenuItem_Click);
|
||||
//
|
||||
// convertToXboxToolStripMenuItem
|
||||
//
|
||||
|
@ -130,7 +139,10 @@ namespace W4Gui
|
|||
this.mainTabControl.Controls.Add(this.teamTab);
|
||||
this.mainTabControl.Controls.Add(this.schemeTab);
|
||||
this.mainTabControl.Controls.Add(this.highscoreTab);
|
||||
this.mainTabControl.Controls.Add(this.unlockItemsTab);
|
||||
this.mainTabControl.Controls.Add(this.inputTab);
|
||||
this.mainTabControl.Controls.Add(this.persistStatsTab);
|
||||
this.mainTabControl.Controls.Add(this.awardsTab);
|
||||
this.mainTabControl.Controls.Add(this.variablesTab);
|
||||
this.mainTabControl.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.mainTabControl.Enabled = false;
|
||||
|
@ -138,8 +150,9 @@ namespace W4Gui
|
|||
this.mainTabControl.Location = new System.Drawing.Point(0, 24);
|
||||
this.mainTabControl.Name = "mainTabControl";
|
||||
this.mainTabControl.SelectedIndex = 0;
|
||||
this.mainTabControl.Size = new System.Drawing.Size(876, 537);
|
||||
this.mainTabControl.Size = new System.Drawing.Size(913, 537);
|
||||
this.mainTabControl.TabIndex = 1;
|
||||
this.mainTabControl.SelectedIndexChanged += new System.EventHandler(this.mainTabControl_SelectedIndexChanged);
|
||||
//
|
||||
// weaponTab
|
||||
//
|
||||
|
@ -148,7 +161,7 @@ namespace W4Gui
|
|||
this.weaponTab.Location = new System.Drawing.Point(4, 24);
|
||||
this.weaponTab.Name = "weaponTab";
|
||||
this.weaponTab.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.weaponTab.Size = new System.Drawing.Size(868, 509);
|
||||
this.weaponTab.Size = new System.Drawing.Size(905, 509);
|
||||
this.weaponTab.TabIndex = 0;
|
||||
this.weaponTab.Text = "Weapons";
|
||||
this.weaponTab.UseVisualStyleBackColor = true;
|
||||
|
@ -158,7 +171,7 @@ namespace W4Gui
|
|||
this.weaponPage.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.weaponPage.Location = new System.Drawing.Point(3, 3);
|
||||
this.weaponPage.Name = "weaponPage";
|
||||
this.weaponPage.Size = new System.Drawing.Size(858, 499);
|
||||
this.weaponPage.Size = new System.Drawing.Size(895, 499);
|
||||
this.weaponPage.TabIndex = 0;
|
||||
//
|
||||
// teamTab
|
||||
|
@ -168,7 +181,7 @@ namespace W4Gui
|
|||
this.teamTab.Location = new System.Drawing.Point(4, 24);
|
||||
this.teamTab.Name = "teamTab";
|
||||
this.teamTab.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.teamTab.Size = new System.Drawing.Size(868, 509);
|
||||
this.teamTab.Size = new System.Drawing.Size(192, 72);
|
||||
this.teamTab.TabIndex = 1;
|
||||
this.teamTab.Text = "Teams";
|
||||
this.teamTab.UseVisualStyleBackColor = true;
|
||||
|
@ -178,7 +191,7 @@ namespace W4Gui
|
|||
this.teamsPage.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.teamsPage.Location = new System.Drawing.Point(3, 3);
|
||||
this.teamsPage.Name = "teamsPage";
|
||||
this.teamsPage.Size = new System.Drawing.Size(858, 499);
|
||||
this.teamsPage.Size = new System.Drawing.Size(182, 62);
|
||||
this.teamsPage.TabIndex = 0;
|
||||
//
|
||||
// schemeTab
|
||||
|
@ -187,17 +200,27 @@ namespace W4Gui
|
|||
this.schemeTab.Controls.Add(this.schemesPage);
|
||||
this.schemeTab.Location = new System.Drawing.Point(4, 24);
|
||||
this.schemeTab.Name = "schemeTab";
|
||||
this.schemeTab.Size = new System.Drawing.Size(868, 509);
|
||||
this.schemeTab.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.schemeTab.Size = new System.Drawing.Size(192, 72);
|
||||
this.schemeTab.TabIndex = 3;
|
||||
this.schemeTab.Text = "Schemes";
|
||||
this.schemeTab.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// schemesPage
|
||||
//
|
||||
this.schemesPage.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.schemesPage.Location = new System.Drawing.Point(3, 3);
|
||||
this.schemesPage.Name = "schemesPage";
|
||||
this.schemesPage.Size = new System.Drawing.Size(182, 62);
|
||||
this.schemesPage.TabIndex = 0;
|
||||
//
|
||||
// highscoreTab
|
||||
//
|
||||
this.highscoreTab.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
|
||||
this.highscoreTab.Controls.Add(this.highscoresPage);
|
||||
this.highscoreTab.Location = new System.Drawing.Point(4, 24);
|
||||
this.highscoreTab.Name = "highscoreTab";
|
||||
this.highscoreTab.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.highscoreTab.Size = new System.Drawing.Size(192, 72);
|
||||
this.highscoreTab.TabIndex = 2;
|
||||
this.highscoreTab.Text = "Highscores";
|
||||
|
@ -208,9 +231,29 @@ namespace W4Gui
|
|||
this.highscoresPage.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.highscoresPage.Location = new System.Drawing.Point(3, 3);
|
||||
this.highscoresPage.Name = "highscoresPage";
|
||||
this.highscoresPage.Size = new System.Drawing.Size(858, 499);
|
||||
this.highscoresPage.Size = new System.Drawing.Size(182, 62);
|
||||
this.highscoresPage.TabIndex = 0;
|
||||
//
|
||||
// unlockItemsTab
|
||||
//
|
||||
this.unlockItemsTab.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
|
||||
this.unlockItemsTab.Controls.Add(this.unlockableItemsPanel);
|
||||
this.unlockItemsTab.Location = new System.Drawing.Point(4, 24);
|
||||
this.unlockItemsTab.Name = "unlockItemsTab";
|
||||
this.unlockItemsTab.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.unlockItemsTab.Size = new System.Drawing.Size(192, 72);
|
||||
this.unlockItemsTab.TabIndex = 6;
|
||||
this.unlockItemsTab.Text = "Unlockable Items";
|
||||
this.unlockItemsTab.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// unlockableItemsPanel
|
||||
//
|
||||
this.unlockableItemsPanel.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.unlockableItemsPanel.Location = new System.Drawing.Point(3, 3);
|
||||
this.unlockableItemsPanel.Name = "unlockableItemsPanel";
|
||||
this.unlockableItemsPanel.Size = new System.Drawing.Size(182, 62);
|
||||
this.unlockableItemsPanel.TabIndex = 0;
|
||||
//
|
||||
// inputTab
|
||||
//
|
||||
this.inputTab.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
|
||||
|
@ -221,30 +264,55 @@ namespace W4Gui
|
|||
this.inputTab.Text = "Input Settings";
|
||||
this.inputTab.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// persistStatsTab
|
||||
//
|
||||
this.persistStatsTab.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
|
||||
this.persistStatsTab.Location = new System.Drawing.Point(4, 24);
|
||||
this.persistStatsTab.Name = "persistStatsTab";
|
||||
this.persistStatsTab.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.persistStatsTab.Size = new System.Drawing.Size(192, 72);
|
||||
this.persistStatsTab.TabIndex = 7;
|
||||
this.persistStatsTab.Text = "Persistant Statistics";
|
||||
this.persistStatsTab.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// awardsTab
|
||||
//
|
||||
this.awardsTab.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
|
||||
this.awardsTab.Location = new System.Drawing.Point(4, 24);
|
||||
this.awardsTab.Name = "awardsTab";
|
||||
this.awardsTab.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.awardsTab.Size = new System.Drawing.Size(192, 72);
|
||||
this.awardsTab.TabIndex = 8;
|
||||
this.awardsTab.Text = "Awards";
|
||||
this.awardsTab.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// variablesTab
|
||||
//
|
||||
this.variablesTab.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
|
||||
this.variablesTab.Controls.Add(this.variablesPage);
|
||||
this.variablesTab.Location = new System.Drawing.Point(4, 24);
|
||||
this.variablesTab.Name = "variablesTab";
|
||||
this.variablesTab.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.variablesTab.Size = new System.Drawing.Size(192, 72);
|
||||
this.variablesTab.TabIndex = 5;
|
||||
this.variablesTab.Text = "Variables";
|
||||
this.variablesTab.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// schemePage
|
||||
// variablesPage
|
||||
//
|
||||
this.schemesPage.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.schemesPage.Location = new System.Drawing.Point(3, 3);
|
||||
this.schemesPage.Name = "schemePage";
|
||||
this.schemesPage.Size = new System.Drawing.Size(858, 499);
|
||||
this.schemesPage.TabIndex = 0;
|
||||
this.variablesPage.BackColor = System.Drawing.SystemColors.Control;
|
||||
this.variablesPage.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.variablesPage.Location = new System.Drawing.Point(3, 3);
|
||||
this.variablesPage.Name = "variablesPage";
|
||||
this.variablesPage.Size = new System.Drawing.Size(182, 62);
|
||||
this.variablesPage.TabIndex = 0;
|
||||
//
|
||||
// Main
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = System.Drawing.Color.LightGray;
|
||||
this.ClientSize = new System.Drawing.Size(876, 561);
|
||||
this.ClientSize = new System.Drawing.Size(913, 561);
|
||||
this.Controls.Add(this.mainTabControl);
|
||||
this.Controls.Add(this.mainMenuStrip);
|
||||
this.DoubleBuffered = true;
|
||||
|
@ -259,6 +327,8 @@ namespace W4Gui
|
|||
this.teamTab.ResumeLayout(false);
|
||||
this.schemeTab.ResumeLayout(false);
|
||||
this.highscoreTab.ResumeLayout(false);
|
||||
this.unlockItemsTab.ResumeLayout(false);
|
||||
this.variablesTab.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
|
@ -285,5 +355,10 @@ namespace W4Gui
|
|||
private TabPage variablesTab;
|
||||
private HighscoresTab highscoresPage;
|
||||
private SchemeTab schemesPage;
|
||||
private TabPage unlockItemsTab;
|
||||
private VariablesTabs variablesPage;
|
||||
private UnlockableItemsTab unlockableItemsPanel;
|
||||
private TabPage persistStatsTab;
|
||||
private TabPage awardsTab;
|
||||
}
|
||||
}
|
|
@ -11,11 +11,13 @@ using System.Linq;
|
|||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using W4Gui.Tabs;
|
||||
|
||||
namespace W4Gui
|
||||
{
|
||||
public partial class Main : Form
|
||||
{
|
||||
private static int lastTabIndex = -1;
|
||||
private const string defaultTitle = "Worms 4: Mayhem! (Save Editor)";
|
||||
public Main()
|
||||
{
|
||||
|
@ -77,5 +79,57 @@ namespace W4Gui
|
|||
this.mainTabControl.Enabled = true;
|
||||
}
|
||||
}
|
||||
|
||||
private void mainTabControl_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (lastTabIndex >= 0)
|
||||
{
|
||||
foreach (Control ctrl in this.mainTabControl.TabPages[lastTabIndex].Controls)
|
||||
{
|
||||
try
|
||||
{
|
||||
TabEntry? tab = ctrl as TabEntry;
|
||||
if (tab is TabEntry)
|
||||
tab.SaveFromControl();
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (this.mainTabControl.SelectedIndex >= 0)
|
||||
{
|
||||
foreach (Control ctrl in this.mainTabControl.TabPages[this.mainTabControl.SelectedIndex].Controls)
|
||||
{
|
||||
try
|
||||
{
|
||||
TabEntry? tab = ctrl as TabEntry;
|
||||
if (tab is TabEntry)
|
||||
tab.LoadIntoControl();
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
lastTabIndex = this.mainTabControl.SelectedIndex;
|
||||
}
|
||||
|
||||
private void convertToPS2ToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
SaveFileDialog fd = new SaveFileDialog();
|
||||
fd.Filter = "Worms 4: Mayhem PlayStation 2 Save File|*";
|
||||
fd.Title = "Save Worms 4 PlayStation 2 Save File";
|
||||
fd.FileName = "BESLES-53096W4MA";
|
||||
if (fd.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
this.mainTabControl.Enabled = false;
|
||||
|
||||
DataManager.SaveAll();
|
||||
DataManager.SaveFile.SavePS2(fd.FileName);
|
||||
|
||||
this.mainTabControl.Enabled = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
|
|||
-->
|
||||
<Project>
|
||||
<PropertyGroup>
|
||||
<History>True|2023-01-19T07:41:26.7371208Z;True|2023-01-14T20:06:35.5919106-08:00;True|2023-01-13T16:57:56.0824690-08:00;True|2023-01-11T01:22:28.8737310-08:00;True|2023-01-11T01:16:55.3469226-08:00;</History>
|
||||
<History>True|2023-02-20T10:18:32.2496478Z;True|2023-02-19T06:40:54.2502643+13:00;False|2023-02-16T17:57:46.9563146+13:00;True|2023-01-19T20:41:26.7371208+13:00;True|2023-01-15T17:06:35.5919106+13:00;True|2023-01-14T13:57:56.0824690+13:00;True|2023-01-11T22:22:28.8737310+13:00;True|2023-01-11T22:16:55.3469226+13:00;</History>
|
||||
<LastFailureDetails />
|
||||
</PropertyGroup>
|
||||
</Project>
|
2
W4Gui/Tabs/HighscoresTab.Designer.cs
generated
2
W4Gui/Tabs/HighscoresTab.Designer.cs
generated
|
@ -41,7 +41,7 @@
|
|||
//
|
||||
this.highscoresSplitContainer.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
|
||||
this.highscoresSplitContainer.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.highscoresSplitContainer.Location = new System.Drawing.Point(0, 0);
|
||||
this.highscoresSplitContainer.Location = new System.Drawing.Point(3, 3);
|
||||
this.highscoresSplitContainer.Name = "highscoresSplitContainer";
|
||||
//
|
||||
// highscoresSplitContainer.Panel1
|
||||
|
|
|
@ -30,20 +30,20 @@ namespace W4Gui.Tabs
|
|||
|
||||
public override void LoadIntoControl()
|
||||
{
|
||||
this.highscoresList.List.LoadCollective(DataManager.SaveFile.HighscoreDataCollective);
|
||||
this.highscoresList.List.LoadCollective(DataManager.SaveFile.HighscoreCollective);
|
||||
highscoresPanel.Enabled = false;
|
||||
}
|
||||
|
||||
private void highscoresList_Unselected(object? sender, EventArgs e)
|
||||
{
|
||||
HighscoreData highscoreData = DataManager.SaveFile.HighscoreDataCollective[highscoresList.List.LastSelected] as HighscoreData;
|
||||
HighscoreData highscoreData = DataManager.SaveFile.HighscoreCollective[highscoresList.List.LastSelected] as HighscoreData;
|
||||
highscoresPanel.SaveHighscoreData(ref highscoreData);
|
||||
highscoresList.List.UpdateName(highscoresList.List.LastSelected, highscoreData.FriendlyName);
|
||||
}
|
||||
|
||||
private void highscoresList_Selected(object? sender, EventArgs e)
|
||||
{
|
||||
HighscoreData highscoreData = DataManager.SaveFile.HighscoreDataCollective[highscoresList.List.CurrentlySelected] as HighscoreData;
|
||||
HighscoreData highscoreData = DataManager.SaveFile.HighscoreCollective[highscoresList.List.CurrentlySelected] as HighscoreData;
|
||||
highscoresPanel.LoadHighscoreData(highscoreData);
|
||||
highscoresPanel.Enabled = true;
|
||||
}
|
||||
|
|
12
W4Gui/Tabs/SchemeTab.Designer.cs
generated
12
W4Gui/Tabs/SchemeTab.Designer.cs
generated
|
@ -37,18 +37,18 @@
|
|||
this.schemesSplitContainer.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// teamsSplitContainer
|
||||
// schemesSplitContainer
|
||||
//
|
||||
this.schemesSplitContainer.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
|
||||
this.schemesSplitContainer.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.schemesSplitContainer.Location = new System.Drawing.Point(0, 0);
|
||||
this.schemesSplitContainer.Location = new System.Drawing.Point(3, 3);
|
||||
this.schemesSplitContainer.Name = "schemesSplitContainer";
|
||||
//
|
||||
// teamsSplitContainer.Panel1
|
||||
// schemesSplitContainer.Panel1
|
||||
//
|
||||
this.schemesSplitContainer.Panel1.Controls.Add(this.schemesList);
|
||||
//
|
||||
// teamsSplitContainer.Panel2
|
||||
// schemesSplitContainer.Panel2
|
||||
//
|
||||
this.schemesSplitContainer.Panel2.Controls.Add(this.schemesPanel);
|
||||
this.schemesSplitContainer.Size = new System.Drawing.Size(797, 464);
|
||||
|
@ -70,13 +70,15 @@
|
|||
this.schemesPanel.BackColor = System.Drawing.Color.LightGray;
|
||||
this.schemesPanel.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.schemesPanel.Enabled = false;
|
||||
this.schemesPanel.Location = new System.Drawing.Point(0, 0);
|
||||
this.schemesPanel.Location = new System.Drawing.Point(3, 3);
|
||||
this.schemesPanel.Name = "schemesPanel";
|
||||
this.schemesPanel.Size = new System.Drawing.Size(524, 460);
|
||||
this.schemesPanel.TabIndex = 0;
|
||||
//
|
||||
// SchemeTab
|
||||
//
|
||||
|
||||
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.schemesSplitContainer);
|
||||
|
|
|
@ -30,20 +30,20 @@ namespace W4Gui.Tabs
|
|||
|
||||
public override void LoadIntoControl()
|
||||
{
|
||||
this.schemesList.List.LoadCollective(DataManager.SaveFile.SchemeCollective);
|
||||
this.schemesList.List.LoadCollective(DataManager.SaveFile.SchemesCollective);
|
||||
schemesPanel.Enabled = false;
|
||||
}
|
||||
|
||||
private void schemesList_Unselected(object? sender, EventArgs e)
|
||||
{
|
||||
SchemeData scheme = DataManager.SaveFile.SchemeCollective[schemesList.List.LastSelected] as SchemeData;
|
||||
SchemeData scheme = DataManager.SaveFile.SchemesCollective[schemesList.List.LastSelected] as SchemeData;
|
||||
schemesPanel.SaveSchemeData(ref scheme);
|
||||
schemesList.List.UpdateName(schemesList.List.LastSelected, scheme.Name.Value);
|
||||
}
|
||||
|
||||
private void schemesList_Selected(object? sender, EventArgs e)
|
||||
{
|
||||
SchemeData scheme = DataManager.SaveFile.SchemeCollective[schemesList.List.CurrentlySelected] as SchemeData;
|
||||
SchemeData scheme = DataManager.SaveFile.SchemesCollective[schemesList.List.CurrentlySelected] as SchemeData;
|
||||
schemesPanel.LoadSchemeData(scheme);
|
||||
schemesPanel.Enabled = true;
|
||||
}
|
||||
|
|
|
@ -15,5 +15,6 @@ namespace W4Gui.Tabs
|
|||
{
|
||||
DataManager.SaveComponents.Add(this);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
98
W4Gui/Tabs/UnlockableItemsTab.Designer.cs
generated
Normal file
98
W4Gui/Tabs/UnlockableItemsTab.Designer.cs
generated
Normal file
|
@ -0,0 +1,98 @@
|
|||
namespace W4Gui.Tabs
|
||||
{
|
||||
partial class UnlockableItemsTab
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Component Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.unlockableItemsSplitContainer = new System.Windows.Forms.SplitContainer();
|
||||
this.unlockableItemsPanel = new W4Gui.Components.UnlockableItemsPanel();
|
||||
this.unlockableItemsList = new W4Gui.Components.CollectiveListAddDelete();
|
||||
((System.ComponentModel.ISupportInitialize)(this.unlockableItemsSplitContainer)).BeginInit();
|
||||
this.unlockableItemsSplitContainer.Panel1.SuspendLayout();
|
||||
this.unlockableItemsSplitContainer.Panel2.SuspendLayout();
|
||||
this.unlockableItemsSplitContainer.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// unlockableItemsSplitContainer
|
||||
//
|
||||
this.unlockableItemsSplitContainer.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
|
||||
this.unlockableItemsSplitContainer.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.unlockableItemsSplitContainer.Location = new System.Drawing.Point(0, 0);
|
||||
this.unlockableItemsSplitContainer.Name = "unlockableItemsSplitContainer";
|
||||
//
|
||||
// unlockableItemsSplitContainer.Panel1
|
||||
//
|
||||
this.unlockableItemsSplitContainer.Panel1.Controls.Add(this.unlockableItemsList);
|
||||
//
|
||||
// unlockableItemsSplitContainer.Panel2
|
||||
//
|
||||
this.unlockableItemsSplitContainer.Panel2.Controls.Add(this.unlockableItemsPanel);
|
||||
this.unlockableItemsSplitContainer.Size = new System.Drawing.Size(797, 464);
|
||||
this.unlockableItemsSplitContainer.SplitterDistance = 265;
|
||||
this.unlockableItemsSplitContainer.TabIndex = 0;
|
||||
//
|
||||
// unlockableItemsPanel
|
||||
//
|
||||
this.unlockableItemsPanel.BackColor = System.Drawing.Color.LightGray;
|
||||
this.unlockableItemsPanel.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.unlockableItemsPanel.Location = new System.Drawing.Point(0, 0);
|
||||
this.unlockableItemsPanel.Name = "unlockableItemsPanel";
|
||||
this.unlockableItemsPanel.Size = new System.Drawing.Size(524, 460);
|
||||
this.unlockableItemsPanel.TabIndex = 0;
|
||||
//
|
||||
// unlockableItemsList
|
||||
//
|
||||
this.unlockableItemsList.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.unlockableItemsList.Location = new System.Drawing.Point(3, 3);
|
||||
this.unlockableItemsList.Name = "teamsList";
|
||||
this.unlockableItemsList.Size = new System.Drawing.Size(261, 460);
|
||||
this.unlockableItemsList.TabIndex = 0;
|
||||
this.unlockableItemsList.NewButton += new System.EventHandler<System.EventArgs>(this.unlockableItemsList_NewButton);
|
||||
this.unlockableItemsList.DeleteButton += new System.EventHandler<System.EventArgs>(this.unlockableItemsList_DeleteButton);
|
||||
//
|
||||
// UnlockableItemsTab
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.unlockableItemsSplitContainer);
|
||||
this.Name = "UnlockableItemsTab";
|
||||
this.Size = new System.Drawing.Size(797, 464);
|
||||
this.unlockableItemsSplitContainer.Panel1.ResumeLayout(false);
|
||||
this.unlockableItemsSplitContainer.Panel2.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.unlockableItemsSplitContainer)).EndInit();
|
||||
this.unlockableItemsSplitContainer.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private SplitContainer unlockableItemsSplitContainer;
|
||||
private Components.UnlockableItemsPanel unlockableItemsPanel;
|
||||
private Components.CollectiveListAddDelete unlockableItemsList;
|
||||
}
|
||||
}
|
63
W4Gui/Tabs/UnlockableItemsTab.cs
Normal file
63
W4Gui/Tabs/UnlockableItemsTab.cs
Normal file
|
@ -0,0 +1,63 @@
|
|||
using LibW4M.Data.Highscores;
|
||||
using LibW4M.Data.Teams;
|
||||
using LibW4M.Data.WXFE.UnlockableItem;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace W4Gui.Tabs
|
||||
{
|
||||
public partial class UnlockableItemsTab : TabEntry
|
||||
{
|
||||
public UnlockableItemsTab()
|
||||
{
|
||||
InitializeComponent();
|
||||
this.unlockableItemsList.List.Selected += unlockableItemsList_Selected;
|
||||
this.unlockableItemsList.List.Unselected += unlockableItemsList_Unselected;
|
||||
|
||||
}
|
||||
|
||||
public override void SaveFromControl()
|
||||
{
|
||||
if (this.unlockableItemsList.List.IsItemSelected)
|
||||
unlockableItemsList_Unselected(null, null);
|
||||
}
|
||||
|
||||
public override void LoadIntoControl()
|
||||
{
|
||||
this.unlockableItemsList.List.LoadArray(DataManager.SaveFile.UnlockableItems);
|
||||
unlockableItemsPanel.Enabled = false;
|
||||
}
|
||||
|
||||
private void unlockableItemsList_Unselected(object? sender, EventArgs? e)
|
||||
{
|
||||
UnlockableItemData itemData = DataManager.SaveFile.UnlockableItems[unlockableItemsList.List.LastSelected] as UnlockableItemData;
|
||||
unlockableItemsPanel.SaveUnlockableItem(ref itemData);
|
||||
unlockableItemsList.List.UpdateName(unlockableItemsList.List.LastSelected, itemData.FriendlyName);
|
||||
}
|
||||
|
||||
private void unlockableItemsList_Selected(object? sender, EventArgs? e)
|
||||
{
|
||||
UnlockableItemData itemData = DataManager.SaveFile.UnlockableItems[unlockableItemsList.List.CurrentlySelected] as UnlockableItemData;
|
||||
unlockableItemsPanel.LoadUnlockableItem(itemData);
|
||||
unlockableItemsPanel.Enabled = true;
|
||||
}
|
||||
|
||||
private void unlockableItemsList_NewButton(object sender, EventArgs e)
|
||||
{
|
||||
throw new NotImplementedException("Adding new unlockableItems from here not implemented yet ;)");
|
||||
}
|
||||
|
||||
private void unlockableItemsList_DeleteButton(object sender, EventArgs e)
|
||||
{
|
||||
throw new NotImplementedException("Removing unlockableItems from here not implemented yet ;)");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
60
W4Gui/Tabs/UnlockableItemsTab.resx
Normal file
60
W4Gui/Tabs/UnlockableItemsTab.resx
Normal file
|
@ -0,0 +1,60 @@
|
|||
<root>
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
98
W4Gui/Tabs/VariablesTab/FloatVariablesTab.Designer.cs
generated
Normal file
98
W4Gui/Tabs/VariablesTab/FloatVariablesTab.Designer.cs
generated
Normal file
|
@ -0,0 +1,98 @@
|
|||
namespace W4Gui.Tabs.VariablesTab
|
||||
{
|
||||
partial class FloatVariablesTab
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Component Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.variablesSplitContainer = new System.Windows.Forms.SplitContainer();
|
||||
this.variablesList = new W4Gui.Components.CollectiveListAddDelete();
|
||||
this.variablePanel = new W4Gui.Components.VariablePanel.FloatVariablePanel();
|
||||
((System.ComponentModel.ISupportInitialize)(this.variablesSplitContainer)).BeginInit();
|
||||
this.variablesSplitContainer.Panel1.SuspendLayout();
|
||||
this.variablesSplitContainer.Panel2.SuspendLayout();
|
||||
this.variablesSplitContainer.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// variablesSplitContainer
|
||||
//
|
||||
this.variablesSplitContainer.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
|
||||
this.variablesSplitContainer.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.variablesSplitContainer.Location = new System.Drawing.Point(0, 0);
|
||||
this.variablesSplitContainer.Name = "variablesSplitContainer";
|
||||
//
|
||||
// variablesSplitContainer.Panel1
|
||||
//
|
||||
this.variablesSplitContainer.Panel1.Controls.Add(this.variablesList);
|
||||
//
|
||||
// variablesSplitContainer.Panel2
|
||||
//
|
||||
this.variablesSplitContainer.Panel2.Controls.Add(this.variablePanel);
|
||||
this.variablesSplitContainer.Size = new System.Drawing.Size(797, 464);
|
||||
this.variablesSplitContainer.SplitterDistance = 265;
|
||||
this.variablesSplitContainer.TabIndex = 0;
|
||||
//
|
||||
// variablesList
|
||||
//
|
||||
this.variablesList.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.variablesList.Location = new System.Drawing.Point(0, 0);
|
||||
this.variablesList.Name = "variablesList";
|
||||
this.variablesList.Size = new System.Drawing.Size(261, 460);
|
||||
this.variablesList.TabIndex = 0;
|
||||
this.variablesList.NewButton += new System.EventHandler<System.EventArgs>(this.variablesList_NewButton);
|
||||
this.variablesList.DeleteButton += new System.EventHandler<System.EventArgs>(this.variablesList_DelButton);
|
||||
//
|
||||
// intVariablePanel
|
||||
//
|
||||
this.variablePanel.BackColor = System.Drawing.Color.LightGray;
|
||||
this.variablePanel.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.variablePanel.Location = new System.Drawing.Point(0, 0);
|
||||
this.variablePanel.Name = "variablePanel";
|
||||
this.variablePanel.Size = new System.Drawing.Size(524, 460);
|
||||
this.variablePanel.TabIndex = 0;
|
||||
//
|
||||
// IntVariablesTab
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.variablesSplitContainer);
|
||||
this.Name = "FloatVariablesTab";
|
||||
this.Size = new System.Drawing.Size(797, 464);
|
||||
this.variablesSplitContainer.Panel1.ResumeLayout(false);
|
||||
this.variablesSplitContainer.Panel2.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.variablesSplitContainer)).EndInit();
|
||||
this.variablesSplitContainer.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private SplitContainer variablesSplitContainer;
|
||||
private Components.CollectiveListAddDelete variablesList;
|
||||
private Components.VariablePanel.FloatVariablePanel variablePanel;
|
||||
}
|
||||
}
|
64
W4Gui/Tabs/VariablesTab/FloatVariablesTab.cs
Normal file
64
W4Gui/Tabs/VariablesTab/FloatVariablesTab.cs
Normal file
|
@ -0,0 +1,64 @@
|
|||
using LibW4M.Data.Highscores;
|
||||
using LibW4M.Data.Teams;
|
||||
using LibW4M.Data.X;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace W4Gui.Tabs.VariablesTab
|
||||
{
|
||||
public partial class FloatVariablesTab : TabEntry
|
||||
{
|
||||
public FloatVariablesTab()
|
||||
{
|
||||
InitializeComponent();
|
||||
this.variablesList.List.Selected += variablesList_Selected;
|
||||
this.variablesList.List.Unselected += variablesList_Unselected;
|
||||
|
||||
}
|
||||
|
||||
public override void SaveFromControl()
|
||||
{
|
||||
if (this.variablesList.List.IsItemSelected)
|
||||
variablesList_Unselected(null, null);
|
||||
}
|
||||
|
||||
public override void LoadIntoControl()
|
||||
{
|
||||
this.variablesList.List.LoadArray(DataManager.SaveFile.XDataBank.FloatResourceDetails);
|
||||
variablePanel.Enabled = false;
|
||||
}
|
||||
|
||||
private void variablesList_Unselected(object? sender, EventArgs? e)
|
||||
{
|
||||
FloatResourceDetail variableData = DataManager.SaveFile.XDataBank.FloatResourceDetails[variablesList.List.LastSelected] as FloatResourceDetail;
|
||||
variablePanel.SaveResourceData(ref variableData);
|
||||
variablesList.List.UpdateName(variablesList.List.LastSelected, variableData.FriendlyName);
|
||||
}
|
||||
|
||||
private void variablesList_Selected(object? sender, EventArgs? e)
|
||||
{
|
||||
FloatResourceDetail variableData = DataManager.SaveFile.XDataBank.FloatResourceDetails[variablesList.List.CurrentlySelected] as FloatResourceDetail;
|
||||
variablePanel.LoadResourceData(variableData);
|
||||
variablePanel.Enabled = true;
|
||||
}
|
||||
|
||||
|
||||
private void variablesList_NewButton(object sender, EventArgs e)
|
||||
{
|
||||
throw new NotImplementedException("Adding new variables from here not implemented yet ;)");
|
||||
}
|
||||
|
||||
private void variablesList_DelButton(object sender, EventArgs e)
|
||||
{
|
||||
throw new NotImplementedException("Removing variables from here not implemented yet ;)");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
60
W4Gui/Tabs/VariablesTab/FloatVariablesTab.resx
Normal file
60
W4Gui/Tabs/VariablesTab/FloatVariablesTab.resx
Normal file
|
@ -0,0 +1,60 @@
|
|||
<root>
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
98
W4Gui/Tabs/VariablesTab/IntVariablesTab.Designer.cs
generated
Normal file
98
W4Gui/Tabs/VariablesTab/IntVariablesTab.Designer.cs
generated
Normal file
|
@ -0,0 +1,98 @@
|
|||
namespace W4Gui.Tabs.VariablesTab
|
||||
{
|
||||
partial class IntVariablesTab
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Component Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.variablesSplitContainer = new System.Windows.Forms.SplitContainer();
|
||||
this.variablesList = new W4Gui.Components.CollectiveListAddDelete();
|
||||
this.variablePanel = new W4Gui.Components.VariablePanel.IntVariablePanel();
|
||||
((System.ComponentModel.ISupportInitialize)(this.variablesSplitContainer)).BeginInit();
|
||||
this.variablesSplitContainer.Panel1.SuspendLayout();
|
||||
this.variablesSplitContainer.Panel2.SuspendLayout();
|
||||
this.variablesSplitContainer.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// variablesSplitContainer
|
||||
//
|
||||
this.variablesSplitContainer.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
|
||||
this.variablesSplitContainer.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.variablesSplitContainer.Location = new System.Drawing.Point(0, 0);
|
||||
this.variablesSplitContainer.Name = "variablesSplitContainer";
|
||||
//
|
||||
// variablesSplitContainer.Panel1
|
||||
//
|
||||
this.variablesSplitContainer.Panel1.Controls.Add(this.variablesList);
|
||||
//
|
||||
// variablesSplitContainer.Panel2
|
||||
//
|
||||
this.variablesSplitContainer.Panel2.Controls.Add(this.variablePanel);
|
||||
this.variablesSplitContainer.Size = new System.Drawing.Size(797, 464);
|
||||
this.variablesSplitContainer.SplitterDistance = 265;
|
||||
this.variablesSplitContainer.TabIndex = 0;
|
||||
//
|
||||
// variablesList
|
||||
//
|
||||
this.variablesList.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.variablesList.Location = new System.Drawing.Point(0, 0);
|
||||
this.variablesList.Name = "variablesList";
|
||||
this.variablesList.Size = new System.Drawing.Size(261, 460);
|
||||
this.variablesList.TabIndex = 0;
|
||||
this.variablesList.NewButton += new System.EventHandler<System.EventArgs>(this.variablesList_NewButton);
|
||||
this.variablesList.DeleteButton += new System.EventHandler<System.EventArgs>(this.variablesList_DelButton);
|
||||
//
|
||||
// intVariablePanel
|
||||
//
|
||||
this.variablePanel.BackColor = System.Drawing.Color.LightGray;
|
||||
this.variablePanel.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.variablePanel.Location = new System.Drawing.Point(0, 0);
|
||||
this.variablePanel.Name = "variablePanel";
|
||||
this.variablePanel.Size = new System.Drawing.Size(524, 460);
|
||||
this.variablePanel.TabIndex = 0;
|
||||
//
|
||||
// IntVariablesTab
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.variablesSplitContainer);
|
||||
this.Name = "IntVariablesTab";
|
||||
this.Size = new System.Drawing.Size(797, 464);
|
||||
this.variablesSplitContainer.Panel1.ResumeLayout(false);
|
||||
this.variablesSplitContainer.Panel2.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.variablesSplitContainer)).EndInit();
|
||||
this.variablesSplitContainer.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private SplitContainer variablesSplitContainer;
|
||||
private Components.CollectiveListAddDelete variablesList;
|
||||
private Components.VariablePanel.IntVariablePanel variablePanel;
|
||||
}
|
||||
}
|
63
W4Gui/Tabs/VariablesTab/IntVariablesTab.cs
Normal file
63
W4Gui/Tabs/VariablesTab/IntVariablesTab.cs
Normal file
|
@ -0,0 +1,63 @@
|
|||
using LibW4M.Data.Highscores;
|
||||
using LibW4M.Data.Teams;
|
||||
using LibW4M.Data.X;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace W4Gui.Tabs.VariablesTab
|
||||
{
|
||||
public partial class IntVariablesTab : TabEntry
|
||||
{
|
||||
public IntVariablesTab()
|
||||
{
|
||||
InitializeComponent();
|
||||
this.variablesList.List.Selected += variablesList_Selected;
|
||||
this.variablesList.List.Unselected += variablesList_Unselected;
|
||||
|
||||
}
|
||||
|
||||
public override void SaveFromControl()
|
||||
{
|
||||
if (this.variablesList.List.IsItemSelected)
|
||||
variablesList_Unselected(null, null);
|
||||
}
|
||||
|
||||
public override void LoadIntoControl()
|
||||
{
|
||||
this.variablesList.List.LoadArray(DataManager.SaveFile.XDataBank.IntResourceDetails);
|
||||
variablePanel.Enabled = false;
|
||||
}
|
||||
|
||||
private void variablesList_Unselected(object? sender, EventArgs? e)
|
||||
{
|
||||
IntResourceDetail variableData = DataManager.SaveFile.XDataBank.IntResourceDetails[variablesList.List.LastSelected] as IntResourceDetail;
|
||||
variablePanel.SaveResourceData(ref variableData);
|
||||
variablesList.List.UpdateName(variablesList.List.LastSelected, variableData.FriendlyName);
|
||||
}
|
||||
|
||||
private void variablesList_Selected(object? sender, EventArgs? e)
|
||||
{
|
||||
IntResourceDetail variableData = DataManager.SaveFile.XDataBank.IntResourceDetails[variablesList.List.CurrentlySelected] as IntResourceDetail;
|
||||
variablePanel.LoadResourceData(variableData);
|
||||
variablePanel.Enabled = true;
|
||||
}
|
||||
|
||||
private void variablesList_NewButton(object sender, EventArgs e)
|
||||
{
|
||||
throw new NotImplementedException("Adding new variables from here not implemented yet ;)");
|
||||
}
|
||||
|
||||
private void variablesList_DelButton(object sender, EventArgs e)
|
||||
{
|
||||
throw new NotImplementedException("Removing variables from here not implemented yet ;)");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
60
W4Gui/Tabs/VariablesTab/IntVariablesTab.resx
Normal file
60
W4Gui/Tabs/VariablesTab/IntVariablesTab.resx
Normal file
|
@ -0,0 +1,60 @@
|
|||
<root>
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
98
W4Gui/Tabs/VariablesTab/StringVariablesTab.Designer.cs
generated
Normal file
98
W4Gui/Tabs/VariablesTab/StringVariablesTab.Designer.cs
generated
Normal file
|
@ -0,0 +1,98 @@
|
|||
namespace W4Gui.Tabs.VariablesTab
|
||||
{
|
||||
partial class StringVariablesTab
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Component Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.variablesSplitContainer = new System.Windows.Forms.SplitContainer();
|
||||
this.variablesList = new W4Gui.Components.CollectiveListAddDelete();
|
||||
this.variablePanel = new W4Gui.Components.VariablePanel.StringVariablePanel();
|
||||
((System.ComponentModel.ISupportInitialize)(this.variablesSplitContainer)).BeginInit();
|
||||
this.variablesSplitContainer.Panel1.SuspendLayout();
|
||||
this.variablesSplitContainer.Panel2.SuspendLayout();
|
||||
this.variablesSplitContainer.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// variablesSplitContainer
|
||||
//
|
||||
this.variablesSplitContainer.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
|
||||
this.variablesSplitContainer.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.variablesSplitContainer.Location = new System.Drawing.Point(0, 0);
|
||||
this.variablesSplitContainer.Name = "variablesSplitContainer";
|
||||
//
|
||||
// variablesSplitContainer.Panel1
|
||||
//
|
||||
this.variablesSplitContainer.Panel1.Controls.Add(this.variablesList);
|
||||
//
|
||||
// variablesSplitContainer.Panel2
|
||||
//
|
||||
this.variablesSplitContainer.Panel2.Controls.Add(this.variablePanel);
|
||||
this.variablesSplitContainer.Size = new System.Drawing.Size(797, 464);
|
||||
this.variablesSplitContainer.SplitterDistance = 265;
|
||||
this.variablesSplitContainer.TabIndex = 0;
|
||||
//
|
||||
// variablesList
|
||||
//
|
||||
this.variablesList.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.variablesList.Location = new System.Drawing.Point(0, 0);
|
||||
this.variablesList.Name = "variablesList";
|
||||
this.variablesList.Size = new System.Drawing.Size(261, 460);
|
||||
this.variablesList.TabIndex = 0;
|
||||
this.variablesList.NewButton += new System.EventHandler<System.EventArgs>(this.variablesList_NewButton);
|
||||
this.variablesList.DeleteButton += new System.EventHandler<System.EventArgs>(this.variablesList_DelButton);
|
||||
//
|
||||
// intVariablePanel
|
||||
//
|
||||
this.variablePanel.BackColor = System.Drawing.Color.LightGray;
|
||||
this.variablePanel.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.variablePanel.Location = new System.Drawing.Point(0, 0);
|
||||
this.variablePanel.Name = "variablePanel";
|
||||
this.variablePanel.Size = new System.Drawing.Size(524, 460);
|
||||
this.variablePanel.TabIndex = 0;
|
||||
//
|
||||
// IntVariablesTab
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.variablesSplitContainer);
|
||||
this.Name = "StringVariablesTab";
|
||||
this.Size = new System.Drawing.Size(797, 464);
|
||||
this.variablesSplitContainer.Panel1.ResumeLayout(false);
|
||||
this.variablesSplitContainer.Panel2.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.variablesSplitContainer)).EndInit();
|
||||
this.variablesSplitContainer.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private SplitContainer variablesSplitContainer;
|
||||
private Components.CollectiveListAddDelete variablesList;
|
||||
private Components.VariablePanel.StringVariablePanel variablePanel;
|
||||
}
|
||||
}
|
64
W4Gui/Tabs/VariablesTab/StringVariablesTab.cs
Normal file
64
W4Gui/Tabs/VariablesTab/StringVariablesTab.cs
Normal file
|
@ -0,0 +1,64 @@
|
|||
using LibW4M.Data.Highscores;
|
||||
using LibW4M.Data.Teams;
|
||||
using LibW4M.Data.X;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace W4Gui.Tabs.VariablesTab
|
||||
{
|
||||
public partial class StringVariablesTab : TabEntry
|
||||
{
|
||||
public StringVariablesTab()
|
||||
{
|
||||
InitializeComponent();
|
||||
this.variablesList.List.Selected += variablesList_Selected;
|
||||
this.variablesList.List.Unselected += variablesList_Unselected;
|
||||
|
||||
}
|
||||
|
||||
public override void SaveFromControl()
|
||||
{
|
||||
if (this.variablesList.List.IsItemSelected)
|
||||
variablesList_Unselected(null, null);
|
||||
}
|
||||
|
||||
public override void LoadIntoControl()
|
||||
{
|
||||
this.variablesList.List.LoadArray(DataManager.SaveFile.XDataBank.StringResourceDetails);
|
||||
variablePanel.Enabled = false;
|
||||
}
|
||||
|
||||
private void variablesList_Unselected(object? sender, EventArgs? e)
|
||||
{
|
||||
StringResourceDetail variableData = DataManager.SaveFile.XDataBank.StringResourceDetails[variablesList.List.LastSelected] as StringResourceDetail;
|
||||
variablePanel.SaveResourceData(ref variableData);
|
||||
variablesList.List.UpdateName(variablesList.List.LastSelected, variableData.FriendlyName);
|
||||
}
|
||||
|
||||
private void variablesList_Selected(object? sender, EventArgs? e)
|
||||
{
|
||||
StringResourceDetail variableData = DataManager.SaveFile.XDataBank.StringResourceDetails[variablesList.List.CurrentlySelected] as StringResourceDetail;
|
||||
variablePanel.LoadResourceData(variableData);
|
||||
variablePanel.Enabled = true;
|
||||
}
|
||||
|
||||
|
||||
private void variablesList_NewButton(object sender, EventArgs e)
|
||||
{
|
||||
throw new NotImplementedException("Adding new variables from here not implemented yet ;)");
|
||||
}
|
||||
|
||||
private void variablesList_DelButton(object sender, EventArgs e)
|
||||
{
|
||||
throw new NotImplementedException("Removing variables from here not implemented yet ;)");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
60
W4Gui/Tabs/VariablesTab/StringVariablesTab.resx
Normal file
60
W4Gui/Tabs/VariablesTab/StringVariablesTab.resx
Normal file
|
@ -0,0 +1,60 @@
|
|||
<root>
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
98
W4Gui/Tabs/VariablesTab/UIntVariablesTab.Designer.cs
generated
Normal file
98
W4Gui/Tabs/VariablesTab/UIntVariablesTab.Designer.cs
generated
Normal file
|
@ -0,0 +1,98 @@
|
|||
namespace W4Gui.Tabs.VariablesTab
|
||||
{
|
||||
partial class UIntVariablesTab
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Component Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.variablesSplitContainer = new System.Windows.Forms.SplitContainer();
|
||||
this.variablesList = new W4Gui.Components.CollectiveListAddDelete();
|
||||
this.variablePanel = new W4Gui.Components.VariablePanel.UIntVariablePanel();
|
||||
((System.ComponentModel.ISupportInitialize)(this.variablesSplitContainer)).BeginInit();
|
||||
this.variablesSplitContainer.Panel1.SuspendLayout();
|
||||
this.variablesSplitContainer.Panel2.SuspendLayout();
|
||||
this.variablesSplitContainer.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// variablesSplitContainer
|
||||
//
|
||||
this.variablesSplitContainer.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
|
||||
this.variablesSplitContainer.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.variablesSplitContainer.Location = new System.Drawing.Point(0, 0);
|
||||
this.variablesSplitContainer.Name = "variablesSplitContainer";
|
||||
//
|
||||
// variablesSplitContainer.Panel1
|
||||
//
|
||||
this.variablesSplitContainer.Panel1.Controls.Add(this.variablesList);
|
||||
//
|
||||
// variablesSplitContainer.Panel2
|
||||
//
|
||||
this.variablesSplitContainer.Panel2.Controls.Add(this.variablePanel);
|
||||
this.variablesSplitContainer.Size = new System.Drawing.Size(797, 464);
|
||||
this.variablesSplitContainer.SplitterDistance = 265;
|
||||
this.variablesSplitContainer.TabIndex = 0;
|
||||
//
|
||||
// variablesList
|
||||
//
|
||||
this.variablesList.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.variablesList.Location = new System.Drawing.Point(0, 0);
|
||||
this.variablesList.Name = "variablesList";
|
||||
this.variablesList.Size = new System.Drawing.Size(261, 460);
|
||||
this.variablesList.TabIndex = 0;
|
||||
this.variablesList.NewButton += new System.EventHandler<System.EventArgs>(this.variablesList_NewButton);
|
||||
this.variablesList.DeleteButton += new System.EventHandler<System.EventArgs>(this.variablesList_DelButton);
|
||||
//
|
||||
// intVariablePanel
|
||||
//
|
||||
this.variablePanel.BackColor = System.Drawing.Color.LightGray;
|
||||
this.variablePanel.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.variablePanel.Location = new System.Drawing.Point(0, 0);
|
||||
this.variablePanel.Name = "variablePanel";
|
||||
this.variablePanel.Size = new System.Drawing.Size(524, 460);
|
||||
this.variablePanel.TabIndex = 0;
|
||||
//
|
||||
// IntVariablesTab
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.variablesSplitContainer);
|
||||
this.Name = "UIntVariablesTab";
|
||||
this.Size = new System.Drawing.Size(797, 464);
|
||||
this.variablesSplitContainer.Panel1.ResumeLayout(false);
|
||||
this.variablesSplitContainer.Panel2.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.variablesSplitContainer)).EndInit();
|
||||
this.variablesSplitContainer.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private SplitContainer variablesSplitContainer;
|
||||
private Components.CollectiveListAddDelete variablesList;
|
||||
private Components.VariablePanel.UIntVariablePanel variablePanel;
|
||||
}
|
||||
}
|
64
W4Gui/Tabs/VariablesTab/UIntVariablesTab.cs
Normal file
64
W4Gui/Tabs/VariablesTab/UIntVariablesTab.cs
Normal file
|
@ -0,0 +1,64 @@
|
|||
using LibW4M.Data.Highscores;
|
||||
using LibW4M.Data.Teams;
|
||||
using LibW4M.Data.X;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace W4Gui.Tabs.VariablesTab
|
||||
{
|
||||
public partial class UIntVariablesTab : TabEntry
|
||||
{
|
||||
public UIntVariablesTab()
|
||||
{
|
||||
InitializeComponent();
|
||||
this.variablesList.List.Selected += variablesList_Selected;
|
||||
this.variablesList.List.Unselected += variablesList_Unselected;
|
||||
|
||||
}
|
||||
|
||||
public override void SaveFromControl()
|
||||
{
|
||||
if (this.variablesList.List.IsItemSelected)
|
||||
variablesList_Unselected(null, null);
|
||||
}
|
||||
|
||||
public override void LoadIntoControl()
|
||||
{
|
||||
this.variablesList.List.LoadArray(DataManager.SaveFile.XDataBank.UIntResourceDetails);
|
||||
variablePanel.Enabled = false;
|
||||
}
|
||||
|
||||
private void variablesList_Unselected(object? sender, EventArgs? e)
|
||||
{
|
||||
UIntResourceDetail variableData = DataManager.SaveFile.XDataBank.UIntResourceDetails[variablesList.List.LastSelected] as UIntResourceDetail;
|
||||
variablePanel.SaveResourceData(ref variableData);
|
||||
variablesList.List.UpdateName(variablesList.List.LastSelected, variableData.FriendlyName);
|
||||
}
|
||||
|
||||
private void variablesList_Selected(object? sender, EventArgs? e)
|
||||
{
|
||||
UIntResourceDetail variableData = DataManager.SaveFile.XDataBank.UIntResourceDetails[variablesList.List.CurrentlySelected] as UIntResourceDetail;
|
||||
variablePanel.LoadResourceData(variableData);
|
||||
variablePanel.Enabled = true;
|
||||
}
|
||||
|
||||
|
||||
private void variablesList_NewButton(object sender, EventArgs e)
|
||||
{
|
||||
throw new NotImplementedException("Adding new variables from here not implemented yet ;)");
|
||||
}
|
||||
|
||||
private void variablesList_DelButton(object sender, EventArgs e)
|
||||
{
|
||||
throw new NotImplementedException("Removing variables from here not implemented yet ;)");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
60
W4Gui/Tabs/VariablesTab/UIntVariablesTab.resx
Normal file
60
W4Gui/Tabs/VariablesTab/UIntVariablesTab.resx
Normal file
|
@ -0,0 +1,60 @@
|
|||
<root>
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
197
W4Gui/Tabs/VariablesTab/VariablesTabs.Designer.cs
generated
Normal file
197
W4Gui/Tabs/VariablesTab/VariablesTabs.Designer.cs
generated
Normal file
|
@ -0,0 +1,197 @@
|
|||
namespace W4Gui.Tabs.VariablesTab
|
||||
{
|
||||
partial class VariablesTabs
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Component Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.varTypeTabControl = new System.Windows.Forms.TabControl();
|
||||
this.intVariablesTab = new System.Windows.Forms.TabPage();
|
||||
this.intVarsPanel = new W4Gui.Tabs.VariablesTab.IntVariablesTab();
|
||||
this.uIntVariablesTab = new System.Windows.Forms.TabPage();
|
||||
this.uintVarsPanel = new W4Gui.Tabs.VariablesTab.UIntVariablesTab();
|
||||
this.floatVariablesTab = new System.Windows.Forms.TabPage();
|
||||
this.floatVarsPanel = new W4Gui.Tabs.VariablesTab.FloatVariablesTab();
|
||||
this.stringVariablesTab = new System.Windows.Forms.TabPage();
|
||||
this.stringVarsPanel = new W4Gui.Tabs.VariablesTab.StringVariablesTab();
|
||||
this.vectorVariablesTab = new System.Windows.Forms.TabPage();
|
||||
this.vectorVarsPanel = new W4Gui.Tabs.VariablesTab.VectorVariablesTab();
|
||||
this.varTypeTabControl.SuspendLayout();
|
||||
this.intVariablesTab.SuspendLayout();
|
||||
this.uIntVariablesTab.SuspendLayout();
|
||||
this.floatVariablesTab.SuspendLayout();
|
||||
this.stringVariablesTab.SuspendLayout();
|
||||
this.vectorVariablesTab.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// varTypeTabControl
|
||||
//
|
||||
this.varTypeTabControl.Controls.Add(this.intVariablesTab);
|
||||
this.varTypeTabControl.Controls.Add(this.uIntVariablesTab);
|
||||
this.varTypeTabControl.Controls.Add(this.floatVariablesTab);
|
||||
this.varTypeTabControl.Controls.Add(this.stringVariablesTab);
|
||||
this.varTypeTabControl.Controls.Add(this.vectorVariablesTab);
|
||||
this.varTypeTabControl.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.varTypeTabControl.HotTrack = true;
|
||||
this.varTypeTabControl.Location = new System.Drawing.Point(0, 0);
|
||||
this.varTypeTabControl.Name = "varTypeTabControl";
|
||||
this.varTypeTabControl.SelectedIndex = 0;
|
||||
this.varTypeTabControl.Size = new System.Drawing.Size(885, 502);
|
||||
this.varTypeTabControl.TabIndex = 0;
|
||||
//
|
||||
// intVariablesTab
|
||||
//
|
||||
this.intVariablesTab.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
|
||||
this.intVariablesTab.Controls.Add(this.intVarsPanel);
|
||||
this.intVariablesTab.Location = new System.Drawing.Point(4, 24);
|
||||
this.intVariablesTab.Name = "intVariablesTab";
|
||||
this.intVariablesTab.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.intVariablesTab.Size = new System.Drawing.Size(877, 474);
|
||||
this.intVariablesTab.TabIndex = 1;
|
||||
this.intVariablesTab.Text = "Int32";
|
||||
this.intVariablesTab.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// intVarsPanel
|
||||
//
|
||||
this.intVarsPanel.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.intVarsPanel.Location = new System.Drawing.Point(3, 3);
|
||||
this.intVarsPanel.Name = "intVarsPanel";
|
||||
this.intVarsPanel.Size = new System.Drawing.Size(867, 464);
|
||||
this.intVarsPanel.TabIndex = 0;
|
||||
//
|
||||
// uIntVariablesTab
|
||||
//
|
||||
this.uIntVariablesTab.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
|
||||
this.uIntVariablesTab.Controls.Add(this.uintVarsPanel);
|
||||
this.uIntVariablesTab.Location = new System.Drawing.Point(4, 24);
|
||||
this.uIntVariablesTab.Name = "uIntVariablesTab";
|
||||
this.uIntVariablesTab.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.uIntVariablesTab.Size = new System.Drawing.Size(877, 474);
|
||||
this.uIntVariablesTab.TabIndex = 2;
|
||||
this.uIntVariablesTab.Text = "UInt32";
|
||||
this.uIntVariablesTab.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// uintVarsPanel
|
||||
//
|
||||
this.uintVarsPanel.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.uintVarsPanel.Location = new System.Drawing.Point(3, 3);
|
||||
this.uintVarsPanel.Name = "uintVarsPanel";
|
||||
this.uintVarsPanel.Size = new System.Drawing.Size(867, 464);
|
||||
this.uintVarsPanel.TabIndex = 0;
|
||||
//
|
||||
// floatVariablesTab
|
||||
//
|
||||
this.floatVariablesTab.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
|
||||
this.floatVariablesTab.Controls.Add(this.floatVarsPanel);
|
||||
this.floatVariablesTab.Location = new System.Drawing.Point(4, 24);
|
||||
this.floatVariablesTab.Name = "floatVariablesTab";
|
||||
this.floatVariablesTab.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.floatVariablesTab.Size = new System.Drawing.Size(877, 474);
|
||||
this.floatVariablesTab.TabIndex = 3;
|
||||
this.floatVariablesTab.Text = "Float";
|
||||
this.floatVariablesTab.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// floatVarsPanel
|
||||
//
|
||||
this.floatVarsPanel.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.floatVarsPanel.Location = new System.Drawing.Point(3, 3);
|
||||
this.floatVarsPanel.Name = "floatVarsPanel";
|
||||
this.floatVarsPanel.Size = new System.Drawing.Size(867, 464);
|
||||
this.floatVarsPanel.TabIndex = 0;
|
||||
//
|
||||
// stringVariablesTab
|
||||
//
|
||||
this.stringVariablesTab.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
|
||||
this.stringVariablesTab.Controls.Add(this.stringVarsPanel);
|
||||
this.stringVariablesTab.Location = new System.Drawing.Point(4, 24);
|
||||
this.stringVariablesTab.Name = "stringVariablesTab";
|
||||
this.stringVariablesTab.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.stringVariablesTab.Size = new System.Drawing.Size(877, 474);
|
||||
this.stringVariablesTab.TabIndex = 4;
|
||||
this.stringVariablesTab.Text = "String";
|
||||
this.stringVariablesTab.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// stringVarsPanel
|
||||
//
|
||||
this.stringVarsPanel.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.stringVarsPanel.Location = new System.Drawing.Point(3, 3);
|
||||
this.stringVarsPanel.Name = "stringVarsPanel";
|
||||
this.stringVarsPanel.Size = new System.Drawing.Size(867, 464);
|
||||
this.stringVarsPanel.TabIndex = 0;
|
||||
//
|
||||
// vectorVariablesTab
|
||||
//
|
||||
this.vectorVariablesTab.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
|
||||
this.vectorVariablesTab.Controls.Add(this.vectorVarsPanel);
|
||||
this.vectorVariablesTab.Location = new System.Drawing.Point(4, 24);
|
||||
this.vectorVariablesTab.Name = "vectorVariablesTab";
|
||||
this.vectorVariablesTab.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.vectorVariablesTab.Size = new System.Drawing.Size(877, 474);
|
||||
this.vectorVariablesTab.TabIndex = 5;
|
||||
this.vectorVariablesTab.Text = "Vector";
|
||||
this.vectorVariablesTab.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// vectorVarsPanel
|
||||
//
|
||||
this.vectorVarsPanel.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.vectorVarsPanel.Location = new System.Drawing.Point(3, 3);
|
||||
this.vectorVarsPanel.Name = "vectorVarsPanel";
|
||||
this.vectorVarsPanel.Size = new System.Drawing.Size(867, 464);
|
||||
this.vectorVarsPanel.TabIndex = 0;
|
||||
//
|
||||
// VariablesTabs
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = System.Drawing.SystemColors.Control;
|
||||
this.Controls.Add(this.varTypeTabControl);
|
||||
this.Name = "VariablesTabs";
|
||||
this.Size = new System.Drawing.Size(885, 502);
|
||||
this.varTypeTabControl.ResumeLayout(false);
|
||||
this.intVariablesTab.ResumeLayout(false);
|
||||
this.uIntVariablesTab.ResumeLayout(false);
|
||||
this.floatVariablesTab.ResumeLayout(false);
|
||||
this.stringVariablesTab.ResumeLayout(false);
|
||||
this.vectorVariablesTab.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private TabControl varTypeTabControl;
|
||||
private TabPage intVariablesTab;
|
||||
private IntVariablesTab intVarsPanel;
|
||||
private TabPage uIntVariablesTab;
|
||||
private TabPage floatVariablesTab;
|
||||
private TabPage stringVariablesTab;
|
||||
private TabPage vectorVariablesTab;
|
||||
private UIntVariablesTab uintVarsPanel;
|
||||
private FloatVariablesTab floatVarsPanel;
|
||||
private StringVariablesTab stringVarsPanel;
|
||||
private VectorVariablesTab vectorVarsPanel;
|
||||
}
|
||||
}
|
20
W4Gui/Tabs/VariablesTab/VariablesTabs.cs
Normal file
20
W4Gui/Tabs/VariablesTab/VariablesTabs.cs
Normal file
|
@ -0,0 +1,20 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace W4Gui.Tabs.VariablesTab
|
||||
{
|
||||
public partial class VariablesTabs : UserControl
|
||||
{
|
||||
public VariablesTabs()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
60
W4Gui/Tabs/VariablesTab/VariablesTabs.resx
Normal file
60
W4Gui/Tabs/VariablesTab/VariablesTabs.resx
Normal file
|
@ -0,0 +1,60 @@
|
|||
<root>
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
98
W4Gui/Tabs/VariablesTab/VectorVariablesTab.Designer.cs
generated
Normal file
98
W4Gui/Tabs/VariablesTab/VectorVariablesTab.Designer.cs
generated
Normal file
|
@ -0,0 +1,98 @@
|
|||
namespace W4Gui.Tabs.VariablesTab
|
||||
{
|
||||
partial class VectorVariablesTab
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Component Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.variablesSplitContainer = new System.Windows.Forms.SplitContainer();
|
||||
this.variablesList = new W4Gui.Components.CollectiveListAddDelete();
|
||||
this.variablePanel = new W4Gui.Components.VariablePanel.VectorVariablePanel();
|
||||
((System.ComponentModel.ISupportInitialize)(this.variablesSplitContainer)).BeginInit();
|
||||
this.variablesSplitContainer.Panel1.SuspendLayout();
|
||||
this.variablesSplitContainer.Panel2.SuspendLayout();
|
||||
this.variablesSplitContainer.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// variablesSplitContainer
|
||||
//
|
||||
this.variablesSplitContainer.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
|
||||
this.variablesSplitContainer.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.variablesSplitContainer.Location = new System.Drawing.Point(0, 0);
|
||||
this.variablesSplitContainer.Name = "variablesSplitContainer";
|
||||
//
|
||||
// variablesSplitContainer.Panel1
|
||||
//
|
||||
this.variablesSplitContainer.Panel1.Controls.Add(this.variablesList);
|
||||
//
|
||||
// variablesSplitContainer.Panel2
|
||||
//
|
||||
this.variablesSplitContainer.Panel2.Controls.Add(this.variablePanel);
|
||||
this.variablesSplitContainer.Size = new System.Drawing.Size(797, 464);
|
||||
this.variablesSplitContainer.SplitterDistance = 265;
|
||||
this.variablesSplitContainer.TabIndex = 0;
|
||||
//
|
||||
// variablesList
|
||||
//
|
||||
this.variablesList.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.variablesList.Location = new System.Drawing.Point(0, 0);
|
||||
this.variablesList.Name = "variablesList";
|
||||
this.variablesList.Size = new System.Drawing.Size(261, 460);
|
||||
this.variablesList.TabIndex = 0;
|
||||
this.variablesList.NewButton += new System.EventHandler<System.EventArgs>(this.variablesList_NewButton);
|
||||
this.variablesList.DeleteButton += new System.EventHandler<System.EventArgs>(this.variablesList_DelButton);
|
||||
//
|
||||
// intVariablePanel
|
||||
//
|
||||
this.variablePanel.BackColor = System.Drawing.Color.LightGray;
|
||||
this.variablePanel.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.variablePanel.Location = new System.Drawing.Point(0, 0);
|
||||
this.variablePanel.Name = "variablePanel";
|
||||
this.variablePanel.Size = new System.Drawing.Size(524, 460);
|
||||
this.variablePanel.TabIndex = 0;
|
||||
//
|
||||
// IntVariablesTab
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.variablesSplitContainer);
|
||||
this.Name = "VectorVariablesTab";
|
||||
this.Size = new System.Drawing.Size(797, 464);
|
||||
this.variablesSplitContainer.Panel1.ResumeLayout(false);
|
||||
this.variablesSplitContainer.Panel2.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.variablesSplitContainer)).EndInit();
|
||||
this.variablesSplitContainer.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private SplitContainer variablesSplitContainer;
|
||||
private Components.CollectiveListAddDelete variablesList;
|
||||
private Components.VariablePanel.VectorVariablePanel variablePanel;
|
||||
}
|
||||
}
|
64
W4Gui/Tabs/VariablesTab/VectorVariablesTab.cs
Normal file
64
W4Gui/Tabs/VariablesTab/VectorVariablesTab.cs
Normal file
|
@ -0,0 +1,64 @@
|
|||
using LibW4M.Data.Highscores;
|
||||
using LibW4M.Data.Teams;
|
||||
using LibW4M.Data.X;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace W4Gui.Tabs.VariablesTab
|
||||
{
|
||||
public partial class VectorVariablesTab : TabEntry
|
||||
{
|
||||
public VectorVariablesTab()
|
||||
{
|
||||
InitializeComponent();
|
||||
this.variablesList.List.Selected += variablesList_Selected;
|
||||
this.variablesList.List.Unselected += variablesList_Unselected;
|
||||
|
||||
}
|
||||
|
||||
public override void SaveFromControl()
|
||||
{
|
||||
if (this.variablesList.List.IsItemSelected)
|
||||
variablesList_Unselected(null, null);
|
||||
}
|
||||
|
||||
public override void LoadIntoControl()
|
||||
{
|
||||
this.variablesList.List.LoadArray(DataManager.SaveFile.XDataBank.VectorResourceDetails);
|
||||
variablePanel.Enabled = false;
|
||||
}
|
||||
|
||||
private void variablesList_Unselected(object? sender, EventArgs? e)
|
||||
{
|
||||
VectorResourceDetail variableData = DataManager.SaveFile.XDataBank.VectorResourceDetails[variablesList.List.LastSelected] as VectorResourceDetail;
|
||||
variablePanel.SaveResourceData(ref variableData);
|
||||
variablesList.List.UpdateName(variablesList.List.LastSelected, variableData.FriendlyName);
|
||||
}
|
||||
|
||||
private void variablesList_Selected(object? sender, EventArgs? e)
|
||||
{
|
||||
VectorResourceDetail variableData = DataManager.SaveFile.XDataBank.VectorResourceDetails[variablesList.List.CurrentlySelected] as VectorResourceDetail;
|
||||
variablePanel.LoadResourceData(variableData);
|
||||
variablePanel.Enabled = true;
|
||||
}
|
||||
|
||||
|
||||
private void variablesList_NewButton(object sender, EventArgs e)
|
||||
{
|
||||
throw new NotImplementedException("Adding new variables from here not implemented yet ;)");
|
||||
}
|
||||
|
||||
private void variablesList_DelButton(object sender, EventArgs e)
|
||||
{
|
||||
throw new NotImplementedException("Removing variables from here not implemented yet ;)");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
60
W4Gui/Tabs/VariablesTab/VectorVariablesTab.resx
Normal file
60
W4Gui/Tabs/VariablesTab/VectorVariablesTab.resx
Normal file
|
@ -0,0 +1,60 @@
|
|||
<root>
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
|
@ -9,6 +9,23 @@
|
|||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Update="Components\UnlockableItemsPanel.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Update="Components\VariablePanel\VectorVariablePanel.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Update="Components\VariablePanel\FloatVariablePanel.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Update="Components\VariablePanel\StringVariablePanel.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Update="Components\VariablePanel\UIntVariablePanel.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Update="Components\VariablePanel\IntVariablePanel.cs" />
|
||||
<Compile Update="Components\UIntUpDown.cs" />
|
||||
<Compile Update="Components\SchemePanel.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
|
@ -18,7 +35,21 @@
|
|||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Update="Tabs\UnlockableItemsTab.cs" />
|
||||
<Compile Update="Tabs\IntVariablesTab.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Update="Tabs\SchemeTab.cs" />
|
||||
<Compile Update="Tabs\VariablesTab\VectorVariablesTab.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Update="Tabs\VariablesTab\StringVariablesTab.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Update="Tabs\VariablesTab\FloatVariablesTab.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Update="Tabs\VariablesTab\UIntVariablesTab.cs" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
@ -34,6 +34,15 @@
|
|||
<Compile Update="Components\TeamsPanel.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Update="Components\UIntUpDown.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Update="Components\VariablePanel\IntVariablePanel.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Update="Components\VectorSelect.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Update="Dialogs\CollectiveSelectionDialog.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
|
@ -58,6 +67,18 @@
|
|||
<Compile Update="Tabs\TeamsTab.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Update="Tabs\UnlockableItemsTab.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Update="Tabs\VariablesTab\IntVariablesTab.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Update="Tabs\VariablesTab\UIntVariablesTab.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Update="Tabs\VariablesTab\VariablesTabs.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Update="Tabs\WeaponsTab.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
|
|
Loading…
Reference in New Issue
Block a user