Skip to content

Commit ad74c46

Browse files
committed
Try to fix xrWeatherEditor forms load error in Visual Studio.
1 parent 7c795da commit ad74c46

File tree

8 files changed

+139
-190
lines changed

8 files changed

+139
-190
lines changed

src/editors/xrWeatherEditor/window_ide.h

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ using namespace System::Collections;
66
using namespace System::Data;
77
using namespace System::Drawing;
88

9+
namespace editor
10+
{
11+
ref class window_ide;
12+
}
13+
914
namespace XRay
1015
{
1116
namespace Editor
@@ -15,11 +20,6 @@ class engine_base;
1520
} // namespace Editor
1621
} // namespace XRay
1722

18-
namespace editor
19-
{
20-
ref class window_ide;
21-
}
22-
2323
namespace WeifenLuo
2424
{
2525
namespace WinFormsUI
@@ -88,35 +88,34 @@ public ref class window_ide : public System::Windows::Forms::Form
8888
{
8989
this->EditorDock = (gcnew WeifenLuo::WinFormsUI::DockPanel());
9090
this->SuspendLayout();
91-
//
92-
// Editor
93-
//
91+
//
92+
// EditorDock
93+
//
9494
this->EditorDock->ActiveAutoHideContent = nullptr;
9595
this->EditorDock->Dock = System::Windows::Forms::DockStyle::Fill;
9696
this->EditorDock->DocumentStyle = WeifenLuo::WinFormsUI::DocumentStyles::DockingSdi;
97-
this->EditorDock->Font = (gcnew System::Drawing::Font(
98-
L"Tahoma", 11, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::World));
97+
this->EditorDock->Font = (gcnew System::Drawing::Font(L"Tahoma", 11, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::World));
9998
this->EditorDock->Location = System::Drawing::Point(0, 0);
100-
this->EditorDock->Name = L"Editor";
99+
this->EditorDock->Name = L"EditorDock";
101100
this->EditorDock->Size = System::Drawing::Size(632, 453);
102101
this->EditorDock->TabIndex = 17;
103-
//
102+
//
104103
// window_ide
105-
//
104+
//
106105
this->AutoScaleDimensions = System::Drawing::SizeF(6, 13);
107106
this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
108107
this->ClientSize = System::Drawing::Size(632, 453);
109108
this->Controls->Add(this->EditorDock);
110109
this->Name = L"window_ide";
111110
this->StartPosition = System::Windows::Forms::FormStartPosition::Manual;
112111
this->Text = L"editor";
113-
this->Deactivate += gcnew System::EventHandler(this, &window_ide::window_ide_Deactivate);
114-
this->SizeChanged += gcnew System::EventHandler(this, &window_ide::window_ide_SizeChanged);
115112
this->Activated += gcnew System::EventHandler(this, &window_ide::window_ide_Activated);
116-
this->FormClosing +=
117-
gcnew System::Windows::Forms::FormClosingEventHandler(this, &window_ide::window_ide_FormClosing);
113+
this->Deactivate += gcnew System::EventHandler(this, &window_ide::window_ide_Deactivate);
114+
this->FormClosing += gcnew System::Windows::Forms::FormClosingEventHandler(this, &window_ide::window_ide_FormClosing);
118115
this->LocationChanged += gcnew System::EventHandler(this, &window_ide::window_ide_LocationChanged);
116+
this->SizeChanged += gcnew System::EventHandler(this, &window_ide::window_ide_SizeChanged);
119117
this->ResumeLayout(false);
118+
120119
}
121120
#pragma endregion
122121
protected:

src/editors/xrWeatherEditor/window_levels.h

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -63,33 +63,27 @@ ref class window_levels : public WeifenLuo::WinFormsUI::DockContent
6363
{
6464
this->PropertyGrid = (gcnew XRay::SdkControls::PropertyGrid());
6565
this->SuspendLayout();
66-
//
67-
// PropertyGrid
68-
//
6966
this->PropertyGrid->Dock = System::Windows::Forms::DockStyle::Fill;
7067
this->PropertyGrid->Location = System::Drawing::Point(0, 0);
7168
this->PropertyGrid->Name = L"PropertyGrid";
7269
this->PropertyGrid->Size = System::Drawing::Size(292, 273);
7370
this->PropertyGrid->TabIndex = 0;
7471
this->PropertyGrid->ToolbarVisible = false;
75-
//
76-
// window_levels
77-
//
7872
this->AutoScaleDimensions = System::Drawing::SizeF(6, 13);
7973
this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
8074
this->ClientSize = System::Drawing::Size(292, 273);
8175
this->Controls->Add(this->PropertyGrid);
82-
this->DockableAreas = static_cast<WeifenLuo::WinFormsUI::DockAreas>(
83-
((((WeifenLuo::WinFormsUI::DockAreas::Float | WeifenLuo::WinFormsUI::DockAreas::DockLeft) |
84-
WeifenLuo::WinFormsUI::DockAreas::DockRight) |
85-
WeifenLuo::WinFormsUI::DockAreas::DockTop) |
86-
WeifenLuo::WinFormsUI::DockAreas::DockBottom));
76+
this->DockableAreas = static_cast<WeifenLuo::WinFormsUI::DockAreas>(((((WeifenLuo::WinFormsUI::DockAreas::Float | WeifenLuo::WinFormsUI::DockAreas::DockLeft)
77+
| WeifenLuo::WinFormsUI::DockAreas::DockRight)
78+
| WeifenLuo::WinFormsUI::DockAreas::DockTop)
79+
| WeifenLuo::WinFormsUI::DockAreas::DockBottom));
8780
this->HideOnClose = true;
8881
this->Name = L"window_levels";
8982
this->TabText = L"level weathers";
9083
this->Text = L"level weathers";
9184
this->Leave += gcnew System::EventHandler(this, &window_levels::window_levels_Leave);
9285
this->ResumeLayout(false);
86+
9387
}
9488
#pragma endregion
9589
private:

src/editors/xrWeatherEditor/window_levels.resx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,9 +112,9 @@
112112
<value>2.0</value>
113113
</resheader>
114114
<resheader name="reader">
115-
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
115+
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
116116
</resheader>
117117
<resheader name="writer">
118-
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
118+
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
119119
</resheader>
120120
</root>

src/editors/xrWeatherEditor/window_tree_values.h

Lines changed: 39 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,7 @@ ref class window_tree_values : public System::Windows::Forms::Form
103103
void InitializeComponent(void)
104104
{
105105
this->components = (gcnew System::ComponentModel::Container());
106-
System::ComponentModel::ComponentResourceManager ^ resources =
107-
(gcnew System::ComponentModel::ComponentResourceManager(window_tree_values::typeid));
106+
System::ComponentModel::ComponentResourceManager^ resources = (gcnew System::ComponentModel::ComponentResourceManager(window_tree_values::typeid));
108107
this->panel2 = (gcnew System::Windows::Forms::Panel());
109108
this->panel3 = (gcnew System::Windows::Forms::Panel());
110109
this->panel4 = (gcnew System::Windows::Forms::Panel());
@@ -124,41 +123,41 @@ ref class window_tree_values : public System::Windows::Forms::Form
124123
this->panel10->SuspendLayout();
125124
this->panel8->SuspendLayout();
126125
this->SuspendLayout();
127-
//
126+
//
128127
// panel2
129-
//
128+
//
130129
this->panel2->Dock = System::Windows::Forms::DockStyle::Left;
131130
this->panel2->Location = System::Drawing::Point(0, 0);
132131
this->panel2->Name = L"panel2";
133132
this->panel2->Size = System::Drawing::Size(10, 383);
134133
this->panel2->TabIndex = 1;
135-
//
134+
//
136135
// panel3
137-
//
136+
//
138137
this->panel3->Dock = System::Windows::Forms::DockStyle::Right;
139138
this->panel3->Location = System::Drawing::Point(489, 0);
140139
this->panel3->Name = L"panel3";
141140
this->panel3->Size = System::Drawing::Size(10, 383);
142141
this->panel3->TabIndex = 2;
143-
//
142+
//
144143
// panel4
145-
//
144+
//
146145
this->panel4->Dock = System::Windows::Forms::DockStyle::Bottom;
147146
this->panel4->Location = System::Drawing::Point(10, 373);
148147
this->panel4->Name = L"panel4";
149148
this->panel4->Size = System::Drawing::Size(479, 10);
150149
this->panel4->TabIndex = 3;
151-
//
150+
//
152151
// panel1
153-
//
152+
//
154153
this->panel1->Dock = System::Windows::Forms::DockStyle::Top;
155154
this->panel1->Location = System::Drawing::Point(10, 0);
156155
this->panel1->Name = L"panel1";
157156
this->panel1->Size = System::Drawing::Size(479, 10);
158157
this->panel1->TabIndex = 4;
159-
//
158+
//
160159
// panel5
161-
//
160+
//
162161
this->panel5->Controls->Add(this->TreeView);
163162
this->panel5->Controls->Add(this->panel7);
164163
this->panel5->Controls->Add(this->panel6);
@@ -167,9 +166,9 @@ ref class window_tree_values : public System::Windows::Forms::Form
167166
this->panel5->Name = L"panel5";
168167
this->panel5->Size = System::Drawing::Size(479, 363);
169168
this->panel5->TabIndex = 5;
170-
//
169+
//
171170
// TreeView
172-
//
171+
//
173172
this->TreeView->Dock = System::Windows::Forms::DockStyle::Fill;
174173
this->TreeView->HideSelection = false;
175174
this->TreeView->ImageIndex = 0;
@@ -179,92 +178,87 @@ ref class window_tree_values : public System::Windows::Forms::Form
179178
this->TreeView->SelectedImageIndex = 0;
180179
this->TreeView->Size = System::Drawing::Size(479, 327);
181180
this->TreeView->TabIndex = 0;
182-
this->TreeView->MouseDoubleClick +=
183-
gcnew System::Windows::Forms::MouseEventHandler(this, &window_tree_values::TreeView_MouseDoubleClick);
184-
this->TreeView->AfterCollapse +=
185-
gcnew System::Windows::Forms::TreeViewEventHandler(this, &window_tree_values::TreeView_AfterCollapse);
186-
this->TreeView->MouseClick +=
187-
gcnew System::Windows::Forms::MouseEventHandler(this, &window_tree_values::TreeView_MouseClick);
188-
this->TreeView->AfterExpand +=
189-
gcnew System::Windows::Forms::TreeViewEventHandler(this, &window_tree_values::TreeView_AfterExpand);
190-
//
181+
this->TreeView->AfterCollapse += gcnew System::Windows::Forms::TreeViewEventHandler(this, &window_tree_values::TreeView_AfterCollapse);
182+
this->TreeView->AfterExpand += gcnew System::Windows::Forms::TreeViewEventHandler(this, &window_tree_values::TreeView_AfterExpand);
183+
this->TreeView->MouseClick += gcnew System::Windows::Forms::MouseEventHandler(this, &window_tree_values::TreeView_MouseClick);
184+
this->TreeView->MouseDoubleClick += gcnew System::Windows::Forms::MouseEventHandler(this, &window_tree_values::TreeView_MouseDoubleClick);
185+
//
191186
// Images
192-
//
193-
this->Images->ImageStream =
194-
(cli::safe_cast<System::Windows::Forms::ImageListStreamer ^>(resources->GetObject(L"Images.ImageStream")));
187+
//
188+
this->Images->ImageStream = (cli::safe_cast<System::Windows::Forms::ImageListStreamer^>(resources->GetObject(L"Images.ImageStream")));
195189
this->Images->TransparentColor = System::Drawing::Color::Fuchsia;
196190
this->Images->Images->SetKeyName(0, L"filter_closed.bmp");
197191
this->Images->Images->SetKeyName(1, L"filter_opened.bmp");
198192
this->Images->Images->SetKeyName(2, L"Document.bmp");
199-
//
193+
//
200194
// panel7
201-
//
195+
//
202196
this->panel7->Dock = System::Windows::Forms::DockStyle::Bottom;
203197
this->panel7->Location = System::Drawing::Point(0, 327);
204198
this->panel7->Name = L"panel7";
205199
this->panel7->Size = System::Drawing::Size(479, 10);
206200
this->panel7->TabIndex = 1;
207-
//
201+
//
208202
// panel6
209-
//
203+
//
210204
this->panel6->Controls->Add(this->panel10);
211205
this->panel6->Controls->Add(this->panel8);
212206
this->panel6->Dock = System::Windows::Forms::DockStyle::Bottom;
213207
this->panel6->Location = System::Drawing::Point(0, 337);
214208
this->panel6->Name = L"panel6";
215209
this->panel6->Size = System::Drawing::Size(479, 26);
216210
this->panel6->TabIndex = 0;
217-
//
211+
//
218212
// panel10
219-
//
213+
//
220214
this->panel10->Controls->Add(this->TextBox);
221215
this->panel10->Dock = System::Windows::Forms::DockStyle::Fill;
222216
this->panel10->Location = System::Drawing::Point(0, 0);
223217
this->panel10->Name = L"panel10";
224218
this->panel10->Size = System::Drawing::Size(313, 26);
225219
this->panel10->TabIndex = 6;
226-
//
220+
//
227221
// TextBox
228-
//
222+
//
229223
this->TextBox->Dock = System::Windows::Forms::DockStyle::Fill;
230224
this->TextBox->Location = System::Drawing::Point(0, 0);
231225
this->TextBox->Name = L"TextBox";
232226
this->TextBox->ReadOnly = true;
233227
this->TextBox->Size = System::Drawing::Size(313, 21);
234228
this->TextBox->TabIndex = 6;
235-
//
229+
//
236230
// panel8
237-
//
231+
//
238232
this->panel8->Controls->Add(this->OK_Button);
239233
this->panel8->Controls->Add(this->Cancel_Button);
240234
this->panel8->Dock = System::Windows::Forms::DockStyle::Right;
241235
this->panel8->Location = System::Drawing::Point(313, 0);
242236
this->panel8->Name = L"panel8";
243237
this->panel8->Size = System::Drawing::Size(166, 26);
244238
this->panel8->TabIndex = 4;
245-
//
239+
//
246240
// OK_Button
247-
//
241+
//
248242
this->OK_Button->DialogResult = System::Windows::Forms::DialogResult::OK;
249243
this->OK_Button->Location = System::Drawing::Point(8, 0);
250244
this->OK_Button->Name = L"OK_Button";
251245
this->OK_Button->Size = System::Drawing::Size(75, 23);
252246
this->OK_Button->TabIndex = 3;
253247
this->OK_Button->Text = L"&OK";
254248
this->OK_Button->UseVisualStyleBackColor = true;
255-
//
249+
//
256250
// Cancel_Button
257-
//
251+
//
258252
this->Cancel_Button->DialogResult = System::Windows::Forms::DialogResult::Cancel;
259253
this->Cancel_Button->Location = System::Drawing::Point(91, 0);
260254
this->Cancel_Button->Name = L"Cancel_Button";
261255
this->Cancel_Button->Size = System::Drawing::Size(75, 23);
262256
this->Cancel_Button->TabIndex = 4;
263257
this->Cancel_Button->Text = L"&Cancel";
264258
this->Cancel_Button->UseVisualStyleBackColor = true;
265-
//
259+
//
266260
// window_tree_values
267-
//
261+
//
268262
this->AcceptButton = this->OK_Button;
269263
this->AutoScaleDimensions = System::Drawing::SizeF(6, 13);
270264
this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
@@ -275,8 +269,8 @@ ref class window_tree_values : public System::Windows::Forms::Form
275269
this->Controls->Add(this->panel4);
276270
this->Controls->Add(this->panel3);
277271
this->Controls->Add(this->panel2);
278-
this->Font = (gcnew System::Drawing::Font(L"Tahoma", 8.25F, System::Drawing::FontStyle::Regular,
279-
System::Drawing::GraphicsUnit::Point, static_cast<System::Byte>(204)));
272+
this->Font = (gcnew System::Drawing::Font(L"Tahoma", 8.25F, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,
273+
static_cast<System::Byte>(204)));
280274
this->MaximizeBox = false;
281275
this->MinimizeBox = false;
282276
this->Name = L"window_tree_values";
@@ -290,6 +284,7 @@ ref class window_tree_values : public System::Windows::Forms::Form
290284
this->panel10->PerformLayout();
291285
this->panel8->ResumeLayout(false);
292286
this->ResumeLayout(false);
287+
293288
}
294289
#pragma endregion
295290
public:

0 commit comments

Comments
 (0)