Fixed setting array values in the debug editor.

Some code corrections.
This commit is contained in:
NovaRain
2019-04-06 08:24:49 +08:00
parent 563fdddc7e
commit ae7245579e
10 changed files with 29 additions and 16 deletions
-1
View File
@@ -23,7 +23,6 @@
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent() {
this.components = new System.ComponentModel.Container();
this.dataGridView1 = new System.Windows.Forms.DataGridView();
this.Column0 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+6
View File
@@ -231,6 +231,9 @@ namespace FalloutClient {
BinaryReader br = new BinaryReader(new MemoryStream(buf));
for (int j = 0; j < strings.Length; j++) {
switch (types[j]) {
case DataType.None:
br.BaseStream.Position += 4;
break;
case DataType.Int:
strings[j] = br.ReadInt32().ToString();
break;
@@ -250,6 +253,9 @@ namespace FalloutClient {
BinaryWriter bw = new BinaryWriter(ms);
for (int j = 0; j < strings.Length; j++) {
switch (types[j]) {
case DataType.None:
bw.BaseStream.Position += 4;
break;
case DataType.Int:
bw.Write(int.Parse(strings[j]));
break;
+1 -1
View File
@@ -111,7 +111,7 @@
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.SizableToolWindow;
this.MinimumSize = new System.Drawing.Size(300, 200);
this.Name = "EditorWindow";
this.Text = "Editor Values";
this.Text = "Edit Values";
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit();
this.ResumeLayout(false);