mirror of
https://github.com/kwsch/pkNX.git
synced 2026-08-28 13:24:30 -05:00
Add Spawner object editor
This commit is contained in:
@@ -31,7 +31,7 @@ private void InitializeComponent()
|
||||
this.B_NoShinyLocks = new System.Windows.Forms.Button();
|
||||
this.PG_Encounters = new System.Windows.Forms.PropertyGrid();
|
||||
this.CB_Encounters = new System.Windows.Forms.ComboBox();
|
||||
this.L_EncTableName = new System.Windows.Forms.Label();
|
||||
this.L_ConfigName = new System.Windows.Forms.Label();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// B_NoShinyLocks
|
||||
@@ -66,20 +66,20 @@ private void InitializeComponent()
|
||||
this.CB_Encounters.TabIndex = 6;
|
||||
this.CB_Encounters.SelectedIndexChanged += new System.EventHandler(this.CB_Encounters_SelectedIndexChanged);
|
||||
//
|
||||
// L_EncTableName
|
||||
// L_ConfigName
|
||||
//
|
||||
this.L_EncTableName.AutoSize = true;
|
||||
this.L_EncTableName.Location = new System.Drawing.Point(3, 1);
|
||||
this.L_EncTableName.Name = "L_EncTableName";
|
||||
this.L_EncTableName.Size = new System.Drawing.Size(35, 13);
|
||||
this.L_EncTableName.TabIndex = 9;
|
||||
this.L_EncTableName.Text = "label1";
|
||||
this.L_ConfigName.AutoSize = true;
|
||||
this.L_ConfigName.Location = new System.Drawing.Point(3, 1);
|
||||
this.L_ConfigName.Name = "L_ConfigName";
|
||||
this.L_ConfigName.Size = new System.Drawing.Size(110, 13);
|
||||
this.L_ConfigName.TabIndex = 9;
|
||||
this.L_ConfigName.Text = "{Configured File Path}";
|
||||
//
|
||||
// EncounterTableEditor8a
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.L_EncTableName);
|
||||
this.Controls.Add(this.L_ConfigName);
|
||||
this.Controls.Add(this.B_NoShinyLocks);
|
||||
this.Controls.Add(this.PG_Encounters);
|
||||
this.Controls.Add(this.CB_Encounters);
|
||||
@@ -95,6 +95,6 @@ private void InitializeComponent()
|
||||
private System.Windows.Forms.Button B_NoShinyLocks;
|
||||
private System.Windows.Forms.PropertyGrid PG_Encounters;
|
||||
private System.Windows.Forms.ComboBox CB_Encounters;
|
||||
private System.Windows.Forms.Label L_EncTableName;
|
||||
private System.Windows.Forms.Label L_ConfigName;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ public void LoadTable(EncounterTable8a[] table, string path)
|
||||
}
|
||||
|
||||
Visible = true;
|
||||
L_EncTableName.Text = path;
|
||||
L_ConfigName.Text = path;
|
||||
|
||||
var items = table.Select(z => new ComboItem(z.TableName.Replace("\"", ""), z)).ToArray();
|
||||
CB_Encounters.DisplayMember = nameof(ComboItem.Text);
|
||||
|
||||
100
pkNX.WinForms/Controls/PlacementSpawnerEditor8a.Designer.cs
generated
Normal file
100
pkNX.WinForms/Controls/PlacementSpawnerEditor8a.Designer.cs
generated
Normal file
@@ -0,0 +1,100 @@
|
||||
namespace pkNX.WinForms.Controls
|
||||
{
|
||||
partial class PlacementSpawnerEditor8a
|
||||
{
|
||||
/// <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.B_MaxSpawnCountRange = new System.Windows.Forms.Button();
|
||||
this.PG_Spawner = new System.Windows.Forms.PropertyGrid();
|
||||
this.CB_Encounters = new System.Windows.Forms.ComboBox();
|
||||
this.L_ConfigName = new System.Windows.Forms.Label();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// B_MaxSpawnCountRange
|
||||
//
|
||||
this.B_MaxSpawnCountRange.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.B_MaxSpawnCountRange.Location = new System.Drawing.Point(614, 0);
|
||||
this.B_MaxSpawnCountRange.Name = "B_MaxSpawnCountRange";
|
||||
this.B_MaxSpawnCountRange.Size = new System.Drawing.Size(148, 23);
|
||||
this.B_MaxSpawnCountRange.TabIndex = 8;
|
||||
this.B_MaxSpawnCountRange.Text = "Max All Spawn Counts";
|
||||
this.B_MaxSpawnCountRange.UseVisualStyleBackColor = true;
|
||||
this.B_MaxSpawnCountRange.Click += new System.EventHandler(this.B_MaxSpawnCountRange_Click);
|
||||
//
|
||||
// PG_Spawner
|
||||
//
|
||||
this.PG_Spawner.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.PG_Spawner.Location = new System.Drawing.Point(3, 38);
|
||||
this.PG_Spawner.Name = "PG_Spawner";
|
||||
this.PG_Spawner.Size = new System.Drawing.Size(759, 548);
|
||||
this.PG_Spawner.TabIndex = 7;
|
||||
//
|
||||
// CB_Encounters
|
||||
//
|
||||
this.CB_Encounters.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend;
|
||||
this.CB_Encounters.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems;
|
||||
this.CB_Encounters.FormattingEnabled = true;
|
||||
this.CB_Encounters.Location = new System.Drawing.Point(3, 15);
|
||||
this.CB_Encounters.Name = "CB_Encounters";
|
||||
this.CB_Encounters.Size = new System.Drawing.Size(174, 21);
|
||||
this.CB_Encounters.TabIndex = 6;
|
||||
this.CB_Encounters.SelectedIndexChanged += new System.EventHandler(this.CB_Encounters_SelectedIndexChanged);
|
||||
//
|
||||
// L_ConfigName
|
||||
//
|
||||
this.L_ConfigName.AutoSize = true;
|
||||
this.L_ConfigName.Location = new System.Drawing.Point(3, 1);
|
||||
this.L_ConfigName.Name = "L_ConfigName";
|
||||
this.L_ConfigName.Size = new System.Drawing.Size(110, 13);
|
||||
this.L_ConfigName.TabIndex = 9;
|
||||
this.L_ConfigName.Text = "{Configured File Path}";
|
||||
//
|
||||
// PlacementSpawnerEditor8a
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.L_ConfigName);
|
||||
this.Controls.Add(this.B_MaxSpawnCountRange);
|
||||
this.Controls.Add(this.PG_Spawner);
|
||||
this.Controls.Add(this.CB_Encounters);
|
||||
this.Name = "PlacementSpawnerEditor8a";
|
||||
this.Size = new System.Drawing.Size(765, 589);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Button B_MaxSpawnCountRange;
|
||||
private System.Windows.Forms.PropertyGrid PG_Spawner;
|
||||
private System.Windows.Forms.ComboBox CB_Encounters;
|
||||
private System.Windows.Forms.Label L_ConfigName;
|
||||
}
|
||||
}
|
||||
62
pkNX.WinForms/Controls/PlacementSpawnerEditor8a.cs
Normal file
62
pkNX.WinForms/Controls/PlacementSpawnerEditor8a.cs
Normal file
@@ -0,0 +1,62 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Windows.Forms;
|
||||
using pkNX.Structures.FlatBuffers;
|
||||
|
||||
namespace pkNX.WinForms.Controls;
|
||||
|
||||
public partial class PlacementSpawnerEditor8a : UserControl
|
||||
{
|
||||
public PlacementSpawner8a[] Spawners = Array.Empty<PlacementSpawner8a>();
|
||||
|
||||
public PlacementSpawnerEditor8a() => InitializeComponent();
|
||||
|
||||
public void LoadTable(PlacementSpawner8a[] table, string path)
|
||||
{
|
||||
Spawners = table;
|
||||
if (table.Length == 0)
|
||||
{
|
||||
Visible = false;
|
||||
return;
|
||||
}
|
||||
|
||||
Visible = true;
|
||||
L_ConfigName.Text = path;
|
||||
|
||||
var items = table.Select(z => new ComboItem<PlacementSpawner8a>(z.NameSummary.Replace("\"", ""), z)).ToArray();
|
||||
CB_Encounters.DisplayMember = nameof(ComboItem<PlacementSpawner8a>.Text);
|
||||
CB_Encounters.ValueMember = nameof(ComboItem<PlacementSpawner8a>.Value);
|
||||
CB_Encounters.DataSource = new BindingSource(items, null);
|
||||
|
||||
CB_Encounters.SelectedIndex = 0;
|
||||
}
|
||||
|
||||
private class ComboItem<T>
|
||||
{
|
||||
public ComboItem(string text, T value)
|
||||
{
|
||||
Text = text;
|
||||
Value = value;
|
||||
}
|
||||
|
||||
public string Text { get; }
|
||||
public T Value { get; }
|
||||
}
|
||||
|
||||
private void CB_Encounters_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
PG_Spawner.SelectedObject = (PlacementSpawner8a)CB_Encounters.SelectedValue;
|
||||
}
|
||||
|
||||
private void B_MaxSpawnCountRange_Click(object sender, EventArgs e)
|
||||
{
|
||||
const int count = 8;
|
||||
foreach (var spawner in Spawners)
|
||||
{
|
||||
spawner.MinSpawnCount = spawner.MaxSpawnCount = count;
|
||||
}
|
||||
|
||||
WinFormsUtil.Alert($"Set all to have {count} entities spawned.");
|
||||
CB_Encounters_SelectedIndexChanged(sender, e);
|
||||
}
|
||||
}
|
||||
120
pkNX.WinForms/Controls/PlacementSpawnerEditor8a.resx
Normal file
120
pkNX.WinForms/Controls/PlacementSpawnerEditor8a.resx
Normal file
@@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<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>
|
||||
46
pkNX.WinForms/Subforms/AreaEditor8a.Designer.cs
generated
46
pkNX.WinForms/Subforms/AreaEditor8a.Designer.cs
generated
@@ -31,14 +31,18 @@ private void InitializeComponent()
|
||||
this.CB_Area = new System.Windows.Forms.ComboBox();
|
||||
this.TC_Editor = new System.Windows.Forms.TabControl();
|
||||
this.Tab_Encounters = new System.Windows.Forms.TabPage();
|
||||
this.Edit_Encounters = new pkNX.WinForms.Controls.EncounterTableEditor8a();
|
||||
this.Tab_Regular = new System.Windows.Forms.TabPage();
|
||||
this.Tab_Wormhole = new System.Windows.Forms.TabPage();
|
||||
this.Tab_Landmarks = new System.Windows.Forms.TabPage();
|
||||
this.Tab_Randomize = new System.Windows.Forms.TabPage();
|
||||
this.B_Save = new System.Windows.Forms.Button();
|
||||
this.Edit_Encounters = new pkNX.WinForms.Controls.EncounterTableEditor8a();
|
||||
this.Edit_RegularSpawners = new pkNX.WinForms.Controls.PlacementSpawnerEditor8a();
|
||||
this.Edit_WormholeSpawners = new pkNX.WinForms.Controls.PlacementSpawnerEditor8a();
|
||||
this.TC_Editor.SuspendLayout();
|
||||
this.Tab_Encounters.SuspendLayout();
|
||||
this.Tab_Regular.SuspendLayout();
|
||||
this.Tab_Wormhole.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// CB_Area
|
||||
@@ -70,25 +74,16 @@ private void InitializeComponent()
|
||||
this.Tab_Encounters.Controls.Add(this.Edit_Encounters);
|
||||
this.Tab_Encounters.Location = new System.Drawing.Point(4, 22);
|
||||
this.Tab_Encounters.Name = "Tab_Encounters";
|
||||
this.Tab_Encounters.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.Tab_Encounters.Size = new System.Drawing.Size(677, 455);
|
||||
this.Tab_Encounters.TabIndex = 0;
|
||||
this.Tab_Encounters.Text = "Encounters";
|
||||
this.Tab_Encounters.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// Edit_Encounters
|
||||
//
|
||||
this.Edit_Encounters.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.Edit_Encounters.Location = new System.Drawing.Point(3, 3);
|
||||
this.Edit_Encounters.Name = "Edit_Encounters";
|
||||
this.Edit_Encounters.Size = new System.Drawing.Size(671, 449);
|
||||
this.Edit_Encounters.TabIndex = 0;
|
||||
//
|
||||
// Tab_Regular
|
||||
//
|
||||
this.Tab_Regular.Controls.Add(this.Edit_RegularSpawners);
|
||||
this.Tab_Regular.Location = new System.Drawing.Point(4, 22);
|
||||
this.Tab_Regular.Name = "Tab_Regular";
|
||||
this.Tab_Regular.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.Tab_Regular.Size = new System.Drawing.Size(677, 455);
|
||||
this.Tab_Regular.TabIndex = 1;
|
||||
this.Tab_Regular.Text = "*Regular";
|
||||
@@ -96,6 +91,7 @@ private void InitializeComponent()
|
||||
//
|
||||
// Tab_Wormhole
|
||||
//
|
||||
this.Tab_Wormhole.Controls.Add(this.Edit_WormholeSpawners);
|
||||
this.Tab_Wormhole.Location = new System.Drawing.Point(4, 22);
|
||||
this.Tab_Wormhole.Name = "Tab_Wormhole";
|
||||
this.Tab_Wormhole.Size = new System.Drawing.Size(677, 455);
|
||||
@@ -132,6 +128,30 @@ private void InitializeComponent()
|
||||
this.B_Save.UseVisualStyleBackColor = true;
|
||||
this.B_Save.Click += new System.EventHandler(this.B_Save_Click);
|
||||
//
|
||||
// Edit_Encounters
|
||||
//
|
||||
this.Edit_Encounters.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.Edit_Encounters.Location = new System.Drawing.Point(0, 0);
|
||||
this.Edit_Encounters.Name = "Edit_Encounters";
|
||||
this.Edit_Encounters.Size = new System.Drawing.Size(677, 455);
|
||||
this.Edit_Encounters.TabIndex = 0;
|
||||
//
|
||||
// Edit_RegularSpawners
|
||||
//
|
||||
this.Edit_RegularSpawners.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.Edit_RegularSpawners.Location = new System.Drawing.Point(0, 0);
|
||||
this.Edit_RegularSpawners.Name = "Edit_RegularSpawners";
|
||||
this.Edit_RegularSpawners.Size = new System.Drawing.Size(677, 455);
|
||||
this.Edit_RegularSpawners.TabIndex = 1;
|
||||
//
|
||||
// Edit_WormholeSpawners
|
||||
//
|
||||
this.Edit_WormholeSpawners.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.Edit_WormholeSpawners.Location = new System.Drawing.Point(0, 0);
|
||||
this.Edit_WormholeSpawners.Name = "Edit_WormholeSpawners";
|
||||
this.Edit_WormholeSpawners.Size = new System.Drawing.Size(677, 455);
|
||||
this.Edit_WormholeSpawners.TabIndex = 2;
|
||||
//
|
||||
// AreaEditor8a
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
@@ -145,6 +165,8 @@ private void InitializeComponent()
|
||||
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.AreaEditor8a_FormClosing);
|
||||
this.TC_Editor.ResumeLayout(false);
|
||||
this.Tab_Encounters.ResumeLayout(false);
|
||||
this.Tab_Regular.ResumeLayout(false);
|
||||
this.Tab_Wormhole.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
@@ -159,5 +181,7 @@ private void InitializeComponent()
|
||||
private Controls.EncounterTableEditor8a Edit_Encounters;
|
||||
private System.Windows.Forms.TabPage Tab_Randomize;
|
||||
private System.Windows.Forms.Button B_Save;
|
||||
private Controls.PlacementSpawnerEditor8a Edit_RegularSpawners;
|
||||
private Controls.PlacementSpawnerEditor8a Edit_WormholeSpawners;
|
||||
}
|
||||
}
|
||||
@@ -63,6 +63,8 @@ private void LoadArea()
|
||||
{
|
||||
Debug.WriteLine($"Loading Area {AreaIndex}");
|
||||
Edit_Encounters.LoadTable(Area.Encounters, Area.Settings.Encounters);
|
||||
Edit_RegularSpawners.LoadTable(Area.Spawners, Area.Settings.Spawners);
|
||||
Edit_WormholeSpawners.LoadTable(Area.Wormholes, Area.Settings.WormholeSpawners);
|
||||
}
|
||||
|
||||
private void SaveArea()
|
||||
|
||||
120
pkNX.WinForms/Subforms/AreaEditor8a.resx
Normal file
120
pkNX.WinForms/Subforms/AreaEditor8a.resx
Normal file
@@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<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>
|
||||
Reference in New Issue
Block a user