/
FormEditor.cs
140 lines (127 loc) · 5.36 KB
/
FormEditor.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
// Decompiled with JetBrains decompiler
// Type: SC4Tool.FormEditor
// Assembly: SC4Tool, Version=2.2.7.0, Culture=neutral, PublicKeyToken=null
// MVID: 69A50BC4-87A5-4C5E-BEFC-08274BC6D498
// Assembly location: C:\Program Files (x86)\SC4 Utilities\SC4Tool\SC4Tool.exe
using Microsoft.VisualBasic.CompilerServices;
using sr_SC4Lib;
using System;
using System.ComponentModel;
using System.Diagnostics;
using System.Drawing;
using System.Resources;
using System.Runtime.CompilerServices;
using System.Windows.Forms;
namespace SC4Tool
{
public class FormEditor : Form
{
[AccessedThroughProperty("ImageList1")]
private ImageList _ImageList1;
[AccessedThroughProperty("Sr_NewValueEditor1")]
private sr_NewValueEditor _Sr_NewValueEditor1;
private IContainer components;
public FormEditor()
{
this.Load += new EventHandler(this.FormEditor_Load);
this.Closed += new EventHandler(this.FormEditor_Closed);
this.InitializeComponent();
}
protected override void Dispose(bool disposing)
{
if (disposing && this.components != null)
this.components.Dispose();
base.Dispose(disposing);
ClassThisProg.frmEditor = (FormEditor) null;
}
internal virtual ImageList ImageList1
{
get => this._ImageList1;
[MethodImpl(MethodImplOptions.Synchronized)] set
{
if (this._ImageList1 == null)
;
this._ImageList1 = value;
if (this._ImageList1 == null)
;
}
}
internal virtual sr_NewValueEditor Sr_NewValueEditor1
{
get => this._Sr_NewValueEditor1;
[MethodImpl(MethodImplOptions.Synchronized)] set
{
if (this._Sr_NewValueEditor1 != null)
{
this._Sr_NewValueEditor1.EndRead -= new sr_NewValueEditor.EndReadEventHandler(this.Sr_NewValueEditor1_EndRead);
this._Sr_NewValueEditor1.StartRead -= new sr_NewValueEditor.StartReadEventHandler(this.Sr_NewValueEditor1_StartRead);
this._Sr_NewValueEditor1.ExitWork -= new sr_NewValueEditor.ExitWorkEventHandler(this.Sr_NewValueEditor1_ExitWork);
}
this._Sr_NewValueEditor1 = value;
if (this._Sr_NewValueEditor1 == null)
return;
this._Sr_NewValueEditor1.EndRead += new sr_NewValueEditor.EndReadEventHandler(this.Sr_NewValueEditor1_EndRead);
this._Sr_NewValueEditor1.StartRead += new sr_NewValueEditor.StartReadEventHandler(this.Sr_NewValueEditor1_StartRead);
this._Sr_NewValueEditor1.ExitWork += new sr_NewValueEditor.ExitWorkEventHandler(this.Sr_NewValueEditor1_ExitWork);
}
}
[DebuggerStepThrough]
private void InitializeComponent()
{
this.components = (IContainer) new System.ComponentModel.Container();
ResourceManager resourceManager = new ResourceManager(typeof (FormEditor));
this.ImageList1 = new ImageList(this.components);
this.Sr_NewValueEditor1 = new sr_NewValueEditor();
this.SuspendLayout();
ImageList imageList1 = this.ImageList1;
Size size1 = new Size(16, 16);
Size size2 = size1;
imageList1.ImageSize = size2;
this.ImageList1.ImageStream = (ImageListStreamer) resourceManager.GetObject("ImageList1.ImageStream");
this.ImageList1.TransparentColor = Color.Transparent;
this.Sr_NewValueEditor1.Dock = DockStyle.Fill;
this.Sr_NewValueEditor1.Location = new Point(0, 0);
this.Sr_NewValueEditor1.Name = "Sr_NewValueEditor1";
this.Sr_NewValueEditor1.PropXMLReader = (sr_PropertyXMLReader) null;
sr_NewValueEditor srNewValueEditor1 = this.Sr_NewValueEditor1;
size1 = new Size(782, 563);
Size size3 = size1;
srNewValueEditor1.Size = size3;
this.Sr_NewValueEditor1.TabIndex = 0;
size1 = new Size(6, 14);
this.AutoScaleBaseSize = size1;
size1 = new Size(782, 563);
this.ClientSize = size1;
this.Controls.Add((Control) this.Sr_NewValueEditor1);
this.Font = new Font("Arial", 9f, FontStyle.Regular, GraphicsUnit.Point, (byte) 0);
this.Name = nameof (FormEditor);
this.StartPosition = FormStartPosition.CenterScreen;
this.Text = nameof (FormEditor);
this.ResumeLayout(false);
}
public object SetzeTexte()
{
this.Text = StringType.FromObject(ClassThisProg.DefReader.LanguageArray[502]);
this.Sr_NewValueEditor1.LanguageArray = ClassThisProg.DefReader.LanguageArray;
object obj;
return obj;
}
private void FormEditor_Load(object sender, EventArgs e)
{
sr_Userinterface.AendereFarben((Form) this, ClassThisProg.DefReader.FarbSchema);
this.SetzeTexte();
this.Sr_NewValueEditor1.PropXMLReader = ClassThisProg.DefReader.PropXMLReader;
this.Sr_NewValueEditor1.CreateBackup = ClassThisProg.DefReader.CreateBackup;
this.Sr_NewValueEditor1.isBSCUser = ClassThisProg.DefReader.isBSCUser;
}
private void FormEditor_Closed(object sender, EventArgs e)
{
if (this.Sr_NewValueEditor1.hasChanges)
this.Sr_NewValueEditor1.AskForSaving();
ClassThisProg.frmEditor = (FormEditor) null;
}
private void Sr_NewValueEditor1_ExitWork() => this.Dispose();
private void Sr_NewValueEditor1_StartRead() => this.Cursor = Cursors.WaitCursor;
private void Sr_NewValueEditor1_EndRead() => this.Cursor = Cursors.Default;
}
}