From 6afd9a37ac91942e8a4682835cdfb46939c39f9e Mon Sep 17 00:00:00 2001 From: oldmud0 Date: Mon, 23 Nov 2015 16:14:15 -0600 Subject: [PATCH] Fix text box issue, add debug hook for setting executable path --- LilithPort/MainForm.h | 30 ++++++++++++++++-------------- LilithPort/OptionForm.h | 3 +++ 2 files changed, 19 insertions(+), 14 deletions(-) diff --git a/LilithPort/MainForm.h b/LilithPort/MainForm.h index 7d21673..23480bc 100644 --- a/LilithPort/MainForm.h +++ b/LilithPort/MainForm.h @@ -265,12 +265,12 @@ private: System::Windows::Forms::ContextMenu^ contextMenuStrip2; this->toolStripMenuItemPing = (gcnew System::Windows::Forms::MenuItem()); this->toolStripSeparator12 = (gcnew System::Windows::Forms::MenuItem()); this->toolStripMenuItemKick = (gcnew System::Windows::Forms::MenuItem()); + this->textBoxInput = (gcnew System::Windows::Forms::TextBox()); this->richTextBoxLog = (gcnew System::Windows::Forms::RichTextBox()); this->contextMenuStrip2 = (gcnew System::Windows::Forms::ContextMenu()); this->contextMenuItemCopy = (gcnew System::Windows::Forms::MenuItem()); this->toolStripSeparator6 = (gcnew System::Windows::Forms::MenuItem()); this->contxtMenuItemSaveLog = (gcnew System::Windows::Forms::MenuItem()); - this->textBoxInput = (gcnew System::Windows::Forms::TextBox()); this->openFileDialog1 = (gcnew System::Windows::Forms::OpenFileDialog()); this->toolTipMember = (gcnew System::Windows::Forms::ToolTip(this->components)); this->statusStrip1 = (gcnew System::Windows::Forms::StatusStrip()); @@ -770,16 +770,29 @@ private: System::Windows::Forms::ContextMenu^ contextMenuStrip2; this->toolStripMenuItemKick->Text = L"Kick"; this->toolStripMenuItemKick->Click += gcnew System::EventHandler(this, &MainForm::toolStripMenuItemKick_Click); // + // textBoxInput + // + this->textBoxInput->BackColor = System::Drawing::SystemColors::Window; + this->textBoxInput->Dock = System::Windows::Forms::DockStyle::Bottom; + this->textBoxInput->Location = System::Drawing::Point(0, 353); + this->textBoxInput->MaxLength = 255; + this->textBoxInput->Name = L"textBoxInput"; + this->textBoxInput->Size = System::Drawing::Size(554, 20); + this->textBoxInput->TabIndex = 0; + this->textBoxInput->KeyDown += gcnew System::Windows::Forms::KeyEventHandler(this, &MainForm::textBoxInput_KeyDown); + // // richTextBoxLog // + this->richTextBoxLog->Anchor = static_cast((((System::Windows::Forms::AnchorStyles::Top | System::Windows::Forms::AnchorStyles::Bottom) + | System::Windows::Forms::AnchorStyles::Left) + | System::Windows::Forms::AnchorStyles::Right)); this->richTextBoxLog->BackColor = System::Drawing::SystemColors::Window; this->richTextBoxLog->BorderStyle = System::Windows::Forms::BorderStyle::None; this->richTextBoxLog->ContextMenu = this->contextMenuStrip2; - this->richTextBoxLog->Dock = System::Windows::Forms::DockStyle::Fill; this->richTextBoxLog->Location = System::Drawing::Point(0, 0); this->richTextBoxLog->Name = L"richTextBoxLog"; this->richTextBoxLog->ReadOnly = true; - this->richTextBoxLog->Size = System::Drawing::Size(554, 373); + this->richTextBoxLog->Size = System::Drawing::Size(554, 353); this->richTextBoxLog->TabIndex = 0; this->richTextBoxLog->TabStop = false; this->richTextBoxLog->Text = L""; @@ -812,17 +825,6 @@ private: System::Windows::Forms::ContextMenu^ contextMenuStrip2; this->contxtMenuItemSaveLog->Text = L"&Save log"; this->contxtMenuItemSaveLog->Click += gcnew System::EventHandler(this, &MainForm::toolStripMenuItemSaveLog_Click); // - // textBoxInput - // - this->textBoxInput->BackColor = System::Drawing::SystemColors::Window; - this->textBoxInput->Dock = System::Windows::Forms::DockStyle::Bottom; - this->textBoxInput->Location = System::Drawing::Point(0, 353); - this->textBoxInput->MaxLength = 255; - this->textBoxInput->Name = L"textBoxInput"; - this->textBoxInput->Size = System::Drawing::Size(554, 20); - this->textBoxInput->TabIndex = 0; - this->textBoxInput->KeyDown += gcnew System::Windows::Forms::KeyEventHandler(this, &MainForm::textBoxInput_KeyDown); - // // openFileDialog1 // this->openFileDialog1->Filter = L"MT replay file (*.mtr)|*.mtr"; diff --git a/LilithPort/OptionForm.h b/LilithPort/OptionForm.h index 92f3ffd..472ae5b 100644 --- a/LilithPort/OptionForm.h +++ b/LilithPort/OptionForm.h @@ -2411,6 +2411,9 @@ private: System::Windows::Forms::CheckBox^ checkBoxShowResult; if(openFileDialog1->ShowDialog() == ::DialogResult::OK){ FileVersionInfo^ info = FileVersionInfo::GetVersionInfo(openFileDialog1->FileName); + if (MTINFO.DEBUG) + MessageBox::Show(info->Language + "\n" + info->FileDescription, "Debug: File version info"); + if(info->FileDescription == L"2D格闘ツクール2nd." || info->FileDescription == L"2D格闘ツクール95"){ textBoxGameExe->Text = openFileDialog1->FileName; }