17 using namespace System;
18 using namespace System::ComponentModel;
19 using namespace System::Collections;
20 using namespace System::Windows::Forms;
21 using namespace System::Data;
22 using namespace System::Drawing;
37 public ref class Form1 :
public System::Windows::Forms::Form
45 InitializeComponent();
50 currentDirectory =
"c:\\";
67 void AddTree(
TreeObject *to, System::Windows::Forms::TreeNode^ tn);
107 void UpdateInPortList();
112 void UpdateAttachList();
127 void UpdatePortList();
137 void SetPortParamEx(std::string m_low,
int m_col, std::string m_len, std::string m_sn,
bool m_state);
138 private: System::String^ currentDirectory;
140 System::Windows::Forms::TreeNode^ m_node;
141 private: System::Windows::Forms::ComboBox^ InPortcomboBox;
142 private: System::Windows::Forms::ComboBox^ AttachcomboBox;
147 private: System::Windows::Forms::Label^ InPortlabel;
148 private: System::Windows::Forms::Label^ Portlabel;
149 private: System::Windows::Forms::Button^ Attachbutton;
150 private: System::Windows::Forms::Button^ Detachbutton;
151 private: System::Windows::Forms::CheckBox^ LowcheckBox;
152 private: System::Windows::Forms::ComboBox^ PortListcomboBox;
173 private: System::Windows::Forms::Button^ Resetbutton;
174 private: System::Windows::Forms::Button^ AllResetbutton;
177 private: System::Windows::Forms::Button^ Addbutton;
179 private: System::Windows::Forms::Button^ Deletebutton;
181 private: System::Windows::Forms::Button^ NamingServerbutton;
183 private: System::Windows::Forms::Button^ Closebutton;
185 private: System::Windows::Forms::Button^ Loadbutton;
186 private: System::Windows::Forms::TextBox^ ColtextBox;
187 private: System::Windows::Forms::TextBox^ InfotextBox;
191 private: System::Windows::Forms::TextBox^ NamingServertextBox;
192 private: System::Windows::Forms::TextBox^ LentextBox;
195 private: System::Windows::Forms::TextBox^ LawtextBox;
196 private: System::Windows::Forms::ComboBox^ SheetcomboBox;
199 private: System::Windows::Forms::TreeView^ RTCtreeView;
201 private: System::Windows::Forms::OpenFileDialog^ openFileDialog1;
202 private: System::Windows::Forms::Label^ Collabel;
204 private: System::Windows::Forms::Label^ Sheetlabel;
206 private: System::Windows::Forms::Label^ Lawlabel;
209 private: System::Windows::Forms::Label^ ManeServerlabel;
217 System::ComponentModel::Container ^components;
219 #pragma region Windows Form Designer generated code
224 void InitializeComponent(
void)
226 this->Resetbutton = (
gcnew System::Windows::Forms::Button());
227 this->AllResetbutton = (
gcnew System::Windows::Forms::Button());
228 this->Addbutton = (
gcnew System::Windows::Forms::Button());
229 this->Deletebutton = (
gcnew System::Windows::Forms::Button());
230 this->NamingServerbutton = (
gcnew System::Windows::Forms::Button());
231 this->Closebutton = (
gcnew System::Windows::Forms::Button());
232 this->Loadbutton = (
gcnew System::Windows::Forms::Button());
233 this->ColtextBox = (
gcnew System::Windows::Forms::TextBox());
234 this->InfotextBox = (
gcnew System::Windows::Forms::TextBox());
235 this->NamingServertextBox = (
gcnew System::Windows::Forms::TextBox());
236 this->LentextBox = (
gcnew System::Windows::Forms::TextBox());
237 this->LawtextBox = (
gcnew System::Windows::Forms::TextBox());
238 this->SheetcomboBox = (
gcnew System::Windows::Forms::ComboBox());
239 this->RTCtreeView = (
gcnew System::Windows::Forms::TreeView());
240 this->openFileDialog1 = (
gcnew System::Windows::Forms::OpenFileDialog());
241 this->Collabel = (
gcnew System::Windows::Forms::Label());
242 this->Sheetlabel = (
gcnew System::Windows::Forms::Label());
243 this->Lawlabel = (
gcnew System::Windows::Forms::Label());
244 this->ManeServerlabel = (
gcnew System::Windows::Forms::Label());
245 this->InPortcomboBox = (
gcnew System::Windows::Forms::ComboBox());
246 this->AttachcomboBox = (
gcnew System::Windows::Forms::ComboBox());
247 this->InPortlabel = (
gcnew System::Windows::Forms::Label());
248 this->Portlabel = (
gcnew System::Windows::Forms::Label());
249 this->Attachbutton = (
gcnew System::Windows::Forms::Button());
250 this->Detachbutton = (
gcnew System::Windows::Forms::Button());
251 this->LowcheckBox = (
gcnew System::Windows::Forms::CheckBox());
252 this->PortListcomboBox = (
gcnew System::Windows::Forms::ComboBox());
253 this->SuspendLayout();
257 this->Resetbutton->Location = System::Drawing::Point(273, 211);
258 this->Resetbutton->Name = L
"Resetbutton";
259 this->Resetbutton->Size = System::Drawing::Size(138, 23);
260 this->Resetbutton->TabIndex = 0;
261 this->Resetbutton->Text = L
"列番号初期化";
262 this->Resetbutton->UseVisualStyleBackColor =
true;
263 this->Resetbutton->Click +=
gcnew System::EventHandler(
this, &Form1::Resetbutton_Click);
267 this->AllResetbutton->Location = System::Drawing::Point(273, 240);
268 this->AllResetbutton->Name = L
"AllResetbutton";
269 this->AllResetbutton->Size = System::Drawing::Size(138, 23);
270 this->AllResetbutton->TabIndex = 1;
271 this->AllResetbutton->Text = L
"全ての列番号を初期化";
272 this->AllResetbutton->UseVisualStyleBackColor =
true;
273 this->AllResetbutton->Click +=
gcnew System::EventHandler(
this, &Form1::AllResetbutton_Click);
277 this->Addbutton->Location = System::Drawing::Point(21, 298);
278 this->Addbutton->Name = L
"Addbutton";
279 this->Addbutton->Size = System::Drawing::Size(97, 23);
280 this->Addbutton->TabIndex = 2;
281 this->Addbutton->Text = L
"作成";
282 this->Addbutton->UseVisualStyleBackColor =
true;
283 this->Addbutton->Click +=
gcnew System::EventHandler(
this, &Form1::Addbutton_Click);
287 this->Deletebutton->Location = System::Drawing::Point(124, 298);
288 this->Deletebutton->Name = L
"Deletebutton";
289 this->Deletebutton->Size = System::Drawing::Size(102, 23);
290 this->Deletebutton->TabIndex = 3;
291 this->Deletebutton->Text = L
"削除";
292 this->Deletebutton->UseVisualStyleBackColor =
true;
293 this->Deletebutton->Click +=
gcnew System::EventHandler(
this, &Form1::Deletebutton_Click);
297 this->NamingServerbutton->Location = System::Drawing::Point(273, 182);
298 this->NamingServerbutton->Name = L
"NamingServerbutton";
299 this->NamingServerbutton->Size = System::Drawing::Size(138, 23);
300 this->NamingServerbutton->TabIndex = 4;
301 this->NamingServerbutton->Text = L
"ツリー表示";
302 this->NamingServerbutton->UseVisualStyleBackColor =
true;
303 this->NamingServerbutton->Click +=
gcnew System::EventHandler(
this, &Form1::NamingServerbutton_Click);
307 this->Closebutton->Location = System::Drawing::Point(273, 298);
308 this->Closebutton->Name = L
"Closebutton";
309 this->Closebutton->Size = System::Drawing::Size(138, 23);
310 this->Closebutton->TabIndex = 5;
311 this->Closebutton->Text = L
"閉じる";
312 this->Closebutton->UseVisualStyleBackColor =
true;
313 this->Closebutton->Click +=
gcnew System::EventHandler(
this, &Form1::Closebutton_Click);
317 this->Loadbutton->Location = System::Drawing::Point(273, 269);
318 this->Loadbutton->Name = L
"Loadbutton";
319 this->Loadbutton->Size = System::Drawing::Size(138, 23);
320 this->Loadbutton->TabIndex = 6;
321 this->Loadbutton->Text = L
"ファイル読み込み";
322 this->Loadbutton->UseVisualStyleBackColor =
true;
323 this->Loadbutton->Click +=
gcnew System::EventHandler(
this, &Form1::Loadbutton_Click);
327 this->ColtextBox->Location = System::Drawing::Point(273, 45);
328 this->ColtextBox->Name = L
"ColtextBox";
329 this->ColtextBox->Size = System::Drawing::Size(138, 19);
330 this->ColtextBox->TabIndex = 7;
331 this->ColtextBox->TextChanged +=
gcnew System::EventHandler(
this, &Form1::ColtextBox_TextChanged);
335 this->InfotextBox->Location = System::Drawing::Point(273, 7);
336 this->InfotextBox->Name = L
"InfotextBox";
337 this->InfotextBox->Size = System::Drawing::Size(138, 19);
338 this->InfotextBox->TabIndex = 8;
339 this->InfotextBox->TextChanged +=
gcnew System::EventHandler(
this, &Form1::InfotextBox_TextChanged);
343 this->NamingServertextBox->Location = System::Drawing::Point(273, 156);
344 this->NamingServertextBox->Name = L
"NamingServertextBox";
345 this->NamingServertextBox->Size = System::Drawing::Size(138, 19);
346 this->NamingServertextBox->TabIndex = 9;
347 this->NamingServertextBox->TextChanged +=
gcnew System::EventHandler(
this, &Form1::NamingServertextBox_TextChanged);
351 this->LentextBox->Location = System::Drawing::Point(352, 81);
352 this->LentextBox->Name = L
"LentextBox";
353 this->LentextBox->Size = System::Drawing::Size(59, 19);
354 this->LentextBox->TabIndex = 10;
358 this->LawtextBox->Location = System::Drawing::Point(273, 81);
359 this->LawtextBox->Name = L
"LawtextBox";
360 this->LawtextBox->Size = System::Drawing::Size(64, 19);
361 this->LawtextBox->TabIndex = 11;
362 this->LawtextBox->TextChanged +=
gcnew System::EventHandler(
this, &Form1::LawtextBox_TextChanged);
366 this->SheetcomboBox->FormattingEnabled =
true;
367 this->SheetcomboBox->Location = System::Drawing::Point(273, 118);
368 this->SheetcomboBox->Name = L
"SheetcomboBox";
369 this->SheetcomboBox->Size = System::Drawing::Size(138, 20);
370 this->SheetcomboBox->TabIndex = 12;
371 this->SheetcomboBox->SelectedIndexChanged +=
gcnew System::EventHandler(
this, &Form1::SheetcomboBox_SelectedIndexChanged);
375 this->RTCtreeView->Location = System::Drawing::Point(12, 3);
376 this->RTCtreeView->Name = L
"RTCtreeView";
377 this->RTCtreeView->Size = System::Drawing::Size(255, 260);
378 this->RTCtreeView->TabIndex = 13;
379 this->RTCtreeView->AfterSelect +=
gcnew System::Windows::Forms::TreeViewEventHandler(
this, &Form1::RTCtreeView_AfterSelect);
383 this->openFileDialog1->FileName = L
"openFileDialog1";
387 this->Collabel->AutoSize =
true;
388 this->Collabel->Location = System::Drawing::Point(319, 67);
389 this->Collabel->Name = L
"Collabel";
390 this->Collabel->Size = System::Drawing::Size(41, 12);
391 this->Collabel->TabIndex = 14;
392 this->Collabel->Text = L
"行番号";
396 this->Sheetlabel->AutoSize =
true;
397 this->Sheetlabel->Location = System::Drawing::Point(319, 103);
398 this->Sheetlabel->Name = L
"Sheetlabel";
399 this->Sheetlabel->Size = System::Drawing::Size(45, 12);
400 this->Sheetlabel->TabIndex = 15;
401 this->Sheetlabel->Text = L
"シート名";
405 this->Lawlabel->AutoSize =
true;
406 this->Lawlabel->Location = System::Drawing::Point(319, 30);
407 this->Lawlabel->Name = L
"Lawlabel";
408 this->Lawlabel->Size = System::Drawing::Size(41, 12);
409 this->Lawlabel->TabIndex = 16;
410 this->Lawlabel->Text = L
"列番号";
411 this->Lawlabel->Click +=
gcnew System::EventHandler(
this, &Form1::Lawlabel_Click);
415 this->ManeServerlabel->AutoSize =
true;
416 this->ManeServerlabel->Location = System::Drawing::Point(281, 141);
417 this->ManeServerlabel->Name = L
"ManeServerlabel";
418 this->ManeServerlabel->Size = System::Drawing::Size(121, 12);
419 this->ManeServerlabel->TabIndex = 17;
420 this->ManeServerlabel->Text = L
"ネームサーバーのアドレス";
424 this->InPortcomboBox->FormattingEnabled =
true;
425 this->InPortcomboBox->Location = System::Drawing::Point(446, 24);
426 this->InPortcomboBox->Name = L
"InPortcomboBox";
427 this->InPortcomboBox->Size = System::Drawing::Size(121, 20);
428 this->InPortcomboBox->TabIndex = 18;
429 this->InPortcomboBox->SelectedIndexChanged +=
gcnew System::EventHandler(
this, &Form1::comboBox1_SelectedIndexChanged);
433 this->AttachcomboBox->FormattingEnabled =
true;
434 this->AttachcomboBox->Location = System::Drawing::Point(446, 67);
435 this->AttachcomboBox->Name = L
"AttachcomboBox";
436 this->AttachcomboBox->Size = System::Drawing::Size(121, 20);
437 this->AttachcomboBox->TabIndex = 19;
438 this->AttachcomboBox->SelectedIndexChanged +=
gcnew System::EventHandler(
this, &Form1::comboBox2_SelectedIndexChanged);
442 this->InPortlabel->AutoSize =
true;
443 this->InPortlabel->Location = System::Drawing::Point(478, 8);
444 this->InPortlabel->Name = L
"InPortlabel";
445 this->InPortlabel->Size = System::Drawing::Size(51, 12);
446 this->InPortlabel->TabIndex = 20;
447 this->InPortlabel->Text = L
"インポート";
451 this->Portlabel->AutoSize =
true;
452 this->Portlabel->Location = System::Drawing::Point(460, 52);
453 this->Portlabel->Name = L
"Portlabel";
454 this->Portlabel->Size = System::Drawing::Size(99, 12);
455 this->Portlabel->TabIndex = 21;
456 this->Portlabel->Text = L
"関連付けしたInPort";
460 this->Attachbutton->Location = System::Drawing::Point(459, 103);
461 this->Attachbutton->Name = L
"Attachbutton";
462 this->Attachbutton->Size = System::Drawing::Size(96, 23);
463 this->Attachbutton->TabIndex = 22;
464 this->Attachbutton->Text = L
"関連付け";
465 this->Attachbutton->UseVisualStyleBackColor =
true;
466 this->Attachbutton->Click +=
gcnew System::EventHandler(
this, &Form1::Attachbutton_Click);
470 this->Detachbutton->Location = System::Drawing::Point(461, 133);
471 this->Detachbutton->Name = L
"Detachbutton";
472 this->Detachbutton->Size = System::Drawing::Size(94, 23);
473 this->Detachbutton->TabIndex = 23;
474 this->Detachbutton->Text = L
"関連付け解除";
475 this->Detachbutton->UseVisualStyleBackColor =
true;
476 this->Detachbutton->Click +=
gcnew System::EventHandler(
this, &Form1::Detachbutton_Click);
480 this->LowcheckBox->AutoSize =
true;
481 this->LowcheckBox->Location = System::Drawing::Point(453, 182);
482 this->LowcheckBox->Name = L
"LowcheckBox";
483 this->LowcheckBox->Size = System::Drawing::Size(106, 16);
484 this->LowcheckBox->TabIndex = 24;
485 this->LowcheckBox->Text = L
"列を移動させるか";
486 this->LowcheckBox->UseVisualStyleBackColor =
true;
487 this->LowcheckBox->CheckedChanged +=
gcnew System::EventHandler(
this, &Form1::LowcheckBox_CheckedChanged);
491 this->PortListcomboBox->FormattingEnabled =
true;
492 this->PortListcomboBox->Location = System::Drawing::Point(12, 269);
493 this->PortListcomboBox->Name = L
"PortListcomboBox";
494 this->PortListcomboBox->Size = System::Drawing::Size(255, 20);
495 this->PortListcomboBox->TabIndex = 25;
496 this->PortListcomboBox->SelectedIndexChanged +=
gcnew System::EventHandler(
this, &Form1::PortListcomboBox_SelectedIndexChanged);
500 this->AutoScaleDimensions = System::Drawing::SizeF(6, 12);
501 this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
502 this->ClientSize = System::Drawing::Size(591, 333);
503 this->Controls->Add(this->PortListcomboBox);
504 this->Controls->Add(this->LowcheckBox);
505 this->Controls->Add(this->Detachbutton);
506 this->Controls->Add(this->Attachbutton);
507 this->Controls->Add(this->Portlabel);
508 this->Controls->Add(this->InPortlabel);
509 this->Controls->Add(this->AttachcomboBox);
510 this->Controls->Add(this->InPortcomboBox);
511 this->Controls->Add(this->ManeServerlabel);
512 this->Controls->Add(this->Lawlabel);
513 this->Controls->Add(this->Sheetlabel);
514 this->Controls->Add(this->Collabel);
515 this->Controls->Add(this->RTCtreeView);
516 this->Controls->Add(this->SheetcomboBox);
517 this->Controls->Add(this->LawtextBox);
518 this->Controls->Add(this->LentextBox);
519 this->Controls->Add(this->NamingServertextBox);
520 this->Controls->Add(this->InfotextBox);
521 this->Controls->Add(this->ColtextBox);
522 this->Controls->Add(this->Loadbutton);
523 this->Controls->Add(this->Closebutton);
524 this->Controls->Add(this->NamingServerbutton);
525 this->Controls->Add(this->Deletebutton);
526 this->Controls->Add(this->Addbutton);
527 this->Controls->Add(this->AllResetbutton);
528 this->Controls->Add(this->Resetbutton);
529 this->Name = L
"Form1";
530 this->Text = L
"ExcelRTC";
531 this->Load +=
gcnew System::EventHandler(
this, &Form1::Form1_Load);
532 this->ResumeLayout(
false);
533 this->PerformLayout();
537 private: System::Void NamingServerbutton_Click(System::Object^ sender, System::EventArgs^ e) {
540 private: System::Void AllResetbutton_Click(System::Object^ sender, System::EventArgs^ e) {
543 private: System::Void Loadbutton_Click(System::Object^ sender, System::EventArgs^ e) {
546 private: System::Void Deletebutton_Click(System::Object^ sender, System::EventArgs^ e) {
549 private: System::Void Addbutton_Click(System::Object^ sender, System::EventArgs^ e) {
552 private: System::Void Closebutton_Click(System::Object^ sender, System::EventArgs^ e) {
555 private: System::Void Resetbutton_Click(System::Object^ sender, System::EventArgs^ e) {
558 private: System::Void InfotextBox_TextChanged(System::Object^ sender, System::EventArgs^ e) {
560 private: System::Void Lawlabel_Click(System::Object^ sender, System::EventArgs^ e) {
562 private: System::Void ColtextBox_TextChanged(System::Object^ sender, System::EventArgs^ e) {
564 private: System::Void SheetcomboBox_SelectedIndexChanged(System::Object^ sender, System::EventArgs^ e) {
566 private: System::Void NamingServertextBox_TextChanged(System::Object^ sender, System::EventArgs^ e) {
568 private: System::Void LawtextBox_TextChanged(System::Object^ sender, System::EventArgs^ e) {
570 private: System::Void RTCtreeView_AfterSelect(System::Object^ sender, System::Windows::Forms::TreeViewEventArgs^ e) {
572 PortListcomboBox->Text =
"";
574 private: System::Void Form1_Load(System::Object^ sender, System::EventArgs^ e) {
576 private: System::Void comboBox1_SelectedIndexChanged(System::Object^ sender, System::EventArgs^ e) {
578 private: System::Void comboBox2_SelectedIndexChanged(System::Object^ sender, System::EventArgs^ e) {
580 private: System::Void Attachbutton_Click(System::Object^ sender, System::EventArgs^ e) {
583 private: System::Void Detachbutton_Click(System::Object^ sender, System::EventArgs^ e) {
586 private: System::Void LowcheckBox_CheckedChanged(System::Object^ sender, System::EventArgs^ e) {
589 private: System::Void PortListcomboBox_SelectedIndexChanged(System::Object^ sender, System::EventArgs^ e) {