URL
https://opencores.org/ocsvn/thor/thor/trunk
Subversion Repositories thor
[/] [thor/] [trunk/] [software/] [emuThor/] [source/] [frmBreakpoints.h] - Rev 55
Go to most recent revision | Compare with Previous | Blame | View Log
#pragma once #include <cstdlib> extern unsigned __int64 ibreakpoints[10]; extern unsigned __int64 dbreakpoints[10]; extern bool ib_active[10]; extern bool db_active[10]; namespace emuThor { using namespace System; using namespace System::ComponentModel; using namespace System::Collections; using namespace System::Windows::Forms; using namespace System::Data; using namespace System::Drawing; using namespace System::Runtime::InteropServices; using namespace System::Threading; /// <summary> /// Summary for frmBreakpoints /// </summary> public ref class frmBreakpoints : public System::Windows::Forms::Form { public: frmBreakpoints(Mutex^ m) { mut = m; InitializeComponent(); // //TODO: Add the constructor code here // char buf[100]; mut->WaitOne(); checkBox1->Checked = ib_active[0]; checkBox2->Checked = ib_active[1]; checkBox3->Checked = ib_active[2]; checkBox4->Checked = ib_active[3]; checkBox6->Checked = ib_active[4]; sprintf(buf,"%016I64X", ibreakpoints[0]); textBox1->Text = gcnew String(buf); sprintf(buf,"%016I64X", ibreakpoints[1]); textBox2->Text = gcnew String(buf); sprintf(buf,"%016I64X", ibreakpoints[2]); textBox3->Text = gcnew String(buf); sprintf(buf,"%016I64X", ibreakpoints[3]); textBox4->Text = gcnew String(buf); sprintf(buf,"%016I64X", ibreakpoints[4]); textBox5->Text = gcnew String(buf); mut->ReleaseMutex(); } protected: /// <summary> /// Clean up any resources being used. /// </summary> ~frmBreakpoints() { if (components) { delete components; } } private: System::Windows::Forms::Label^ label1; protected: private: System::Windows::Forms::TextBox^ textBox1; private: System::Windows::Forms::TextBox^ textBox2; private: System::Windows::Forms::TextBox^ textBox3; private: System::Windows::Forms::TextBox^ textBox4; private: System::Windows::Forms::TextBox^ textBox5; private: System::Windows::Forms::TextBox^ textBox6; private: System::Windows::Forms::TextBox^ textBox7; private: System::Windows::Forms::TextBox^ textBox8; private: System::Windows::Forms::TextBox^ textBox9; private: System::Windows::Forms::TextBox^ textBox10; private: System::Windows::Forms::Label^ label2; public: Mutex^ mut; private: System::Windows::Forms::Button^ button25; private: System::Windows::Forms::Button^ button26; private: System::Windows::Forms::CheckBox^ checkBox1; private: System::Windows::Forms::CheckBox^ checkBox2; private: System::Windows::Forms::CheckBox^ checkBox3; private: System::Windows::Forms::CheckBox^ checkBox4; private: System::Windows::Forms::CheckBox^ checkBox5; private: System::Windows::Forms::CheckBox^ checkBox6; private: System::Windows::Forms::CheckBox^ checkBox7; private: System::Windows::Forms::CheckBox^ checkBox8; private: System::Windows::Forms::CheckBox^ checkBox9; private: System::Windows::Forms::CheckBox^ checkBox10; private: System::Windows::Forms::Label^ label3; private: System::Windows::Forms::Label^ label4; private: /// <summary> /// Required designer variable. /// </summary> System::ComponentModel::Container ^components; #pragma region Windows Form Designer generated code /// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> void InitializeComponent(void) { this->label1 = (gcnew System::Windows::Forms::Label()); this->textBox1 = (gcnew System::Windows::Forms::TextBox()); this->textBox2 = (gcnew System::Windows::Forms::TextBox()); this->textBox3 = (gcnew System::Windows::Forms::TextBox()); this->textBox4 = (gcnew System::Windows::Forms::TextBox()); this->textBox5 = (gcnew System::Windows::Forms::TextBox()); this->textBox6 = (gcnew System::Windows::Forms::TextBox()); this->textBox7 = (gcnew System::Windows::Forms::TextBox()); this->textBox8 = (gcnew System::Windows::Forms::TextBox()); this->textBox9 = (gcnew System::Windows::Forms::TextBox()); this->textBox10 = (gcnew System::Windows::Forms::TextBox()); this->label2 = (gcnew System::Windows::Forms::Label()); this->button25 = (gcnew System::Windows::Forms::Button()); this->button26 = (gcnew System::Windows::Forms::Button()); this->checkBox1 = (gcnew System::Windows::Forms::CheckBox()); this->checkBox2 = (gcnew System::Windows::Forms::CheckBox()); this->checkBox3 = (gcnew System::Windows::Forms::CheckBox()); this->checkBox4 = (gcnew System::Windows::Forms::CheckBox()); this->checkBox5 = (gcnew System::Windows::Forms::CheckBox()); this->checkBox6 = (gcnew System::Windows::Forms::CheckBox()); this->checkBox7 = (gcnew System::Windows::Forms::CheckBox()); this->checkBox8 = (gcnew System::Windows::Forms::CheckBox()); this->checkBox9 = (gcnew System::Windows::Forms::CheckBox()); this->checkBox10 = (gcnew System::Windows::Forms::CheckBox()); this->label3 = (gcnew System::Windows::Forms::Label()); this->label4 = (gcnew System::Windows::Forms::Label()); this->SuspendLayout(); // // label1 // this->label1->AutoSize = true; this->label1->Location = System::Drawing::Point(53, 51); this->label1->Name = L"label1"; this->label1->Size = System::Drawing::Size(56, 13); this->label1->TabIndex = 0; this->label1->Text = L"Instruction"; // // textBox1 // this->textBox1->Location = System::Drawing::Point(56, 78); this->textBox1->Name = L"textBox1"; this->textBox1->Size = System::Drawing::Size(120, 20); this->textBox1->TabIndex = 1; // // textBox2 // this->textBox2->Location = System::Drawing::Point(56, 104); this->textBox2->Name = L"textBox2"; this->textBox2->Size = System::Drawing::Size(120, 20); this->textBox2->TabIndex = 2; // // textBox3 // this->textBox3->Location = System::Drawing::Point(56, 130); this->textBox3->Name = L"textBox3"; this->textBox3->Size = System::Drawing::Size(120, 20); this->textBox3->TabIndex = 3; // // textBox4 // this->textBox4->Location = System::Drawing::Point(56, 156); this->textBox4->Name = L"textBox4"; this->textBox4->Size = System::Drawing::Size(120, 20); this->textBox4->TabIndex = 4; // // textBox5 // this->textBox5->Location = System::Drawing::Point(56, 182); this->textBox5->Name = L"textBox5"; this->textBox5->Size = System::Drawing::Size(120, 20); this->textBox5->TabIndex = 5; // // textBox6 // this->textBox6->Enabled = false; this->textBox6->Location = System::Drawing::Point(243, 182); this->textBox6->Name = L"textBox6"; this->textBox6->Size = System::Drawing::Size(125, 20); this->textBox6->TabIndex = 11; // // textBox7 // this->textBox7->Enabled = false; this->textBox7->Location = System::Drawing::Point(243, 156); this->textBox7->Name = L"textBox7"; this->textBox7->Size = System::Drawing::Size(125, 20); this->textBox7->TabIndex = 10; // // textBox8 // this->textBox8->Enabled = false; this->textBox8->Location = System::Drawing::Point(243, 130); this->textBox8->Name = L"textBox8"; this->textBox8->Size = System::Drawing::Size(125, 20); this->textBox8->TabIndex = 9; // // textBox9 // this->textBox9->Enabled = false; this->textBox9->Location = System::Drawing::Point(243, 104); this->textBox9->Name = L"textBox9"; this->textBox9->Size = System::Drawing::Size(125, 20); this->textBox9->TabIndex = 8; // // textBox10 // this->textBox10->Enabled = false; this->textBox10->Location = System::Drawing::Point(243, 78); this->textBox10->Name = L"textBox10"; this->textBox10->Size = System::Drawing::Size(125, 20); this->textBox10->TabIndex = 7; // // label2 // this->label2->AutoSize = true; this->label2->Enabled = false; this->label2->Location = System::Drawing::Point(240, 51); this->label2->Name = L"label2"; this->label2->Size = System::Drawing::Size(30, 13); this->label2->TabIndex = 6; this->label2->Text = L"Data"; // // button25 // this->button25->DialogResult = System::Windows::Forms::DialogResult::OK; this->button25->Location = System::Drawing::Point(293, 227); this->button25->Name = L"button25"; this->button25->Size = System::Drawing::Size(75, 23); this->button25->TabIndex = 35; this->button25->Text = L"OK"; this->button25->UseVisualStyleBackColor = true; this->button25->Click += gcnew System::EventHandler(this, &frmBreakpoints::button25_Click); // // button26 // this->button26->DialogResult = System::Windows::Forms::DialogResult::Cancel; this->button26->Location = System::Drawing::Point(180, 227); this->button26->Name = L"button26"; this->button26->Size = System::Drawing::Size(75, 23); this->button26->TabIndex = 36; this->button26->Text = L"Cancel"; this->button26->UseVisualStyleBackColor = true; // // checkBox1 // this->checkBox1->AutoSize = true; this->checkBox1->Location = System::Drawing::Point(20, 78); this->checkBox1->Name = L"checkBox1"; this->checkBox1->Size = System::Drawing::Size(15, 14); this->checkBox1->TabIndex = 37; this->checkBox1->UseVisualStyleBackColor = true; this->checkBox1->CheckedChanged += gcnew System::EventHandler(this, &frmBreakpoints::checkBox1_CheckedChanged); // // checkBox2 // this->checkBox2->AutoSize = true; this->checkBox2->Location = System::Drawing::Point(20, 104); this->checkBox2->Name = L"checkBox2"; this->checkBox2->Size = System::Drawing::Size(15, 14); this->checkBox2->TabIndex = 38; this->checkBox2->UseVisualStyleBackColor = true; // // checkBox3 // this->checkBox3->AutoSize = true; this->checkBox3->Location = System::Drawing::Point(20, 130); this->checkBox3->Name = L"checkBox3"; this->checkBox3->Size = System::Drawing::Size(15, 14); this->checkBox3->TabIndex = 39; this->checkBox3->UseVisualStyleBackColor = true; // // checkBox4 // this->checkBox4->AutoSize = true; this->checkBox4->Location = System::Drawing::Point(20, 156); this->checkBox4->Name = L"checkBox4"; this->checkBox4->Size = System::Drawing::Size(15, 14); this->checkBox4->TabIndex = 40; this->checkBox4->UseVisualStyleBackColor = true; // // checkBox5 // this->checkBox5->AutoSize = true; this->checkBox5->Enabled = false; this->checkBox5->Location = System::Drawing::Point(209, 104); this->checkBox5->Name = L"checkBox5"; this->checkBox5->Size = System::Drawing::Size(15, 14); this->checkBox5->TabIndex = 41; this->checkBox5->UseVisualStyleBackColor = true; // // checkBox6 // this->checkBox6->AutoSize = true; this->checkBox6->Location = System::Drawing::Point(20, 182); this->checkBox6->Name = L"checkBox6"; this->checkBox6->Size = System::Drawing::Size(15, 14); this->checkBox6->TabIndex = 41; this->checkBox6->UseVisualStyleBackColor = true; // // checkBox7 // this->checkBox7->AutoSize = true; this->checkBox7->Enabled = false; this->checkBox7->Location = System::Drawing::Point(209, 78); this->checkBox7->Name = L"checkBox7"; this->checkBox7->Size = System::Drawing::Size(15, 14); this->checkBox7->TabIndex = 42; this->checkBox7->UseVisualStyleBackColor = true; // // checkBox8 // this->checkBox8->AutoSize = true; this->checkBox8->Enabled = false; this->checkBox8->Location = System::Drawing::Point(209, 130); this->checkBox8->Name = L"checkBox8"; this->checkBox8->Size = System::Drawing::Size(15, 14); this->checkBox8->TabIndex = 43; this->checkBox8->UseVisualStyleBackColor = true; // // checkBox9 // this->checkBox9->AutoSize = true; this->checkBox9->Enabled = false; this->checkBox9->Location = System::Drawing::Point(209, 156); this->checkBox9->Name = L"checkBox9"; this->checkBox9->Size = System::Drawing::Size(15, 14); this->checkBox9->TabIndex = 44; this->checkBox9->UseVisualStyleBackColor = true; // // checkBox10 // this->checkBox10->AutoSize = true; this->checkBox10->Enabled = false; this->checkBox10->Location = System::Drawing::Point(209, 182); this->checkBox10->Name = L"checkBox10"; this->checkBox10->Size = System::Drawing::Size(15, 14); this->checkBox10->TabIndex = 45; this->checkBox10->UseVisualStyleBackColor = true; // // label3 // this->label3->AutoSize = true; this->label3->ForeColor = System::Drawing::Color::FromArgb(static_cast<System::Int32>(static_cast<System::Byte>(255)), static_cast<System::Int32>(static_cast<System::Byte>(128)), static_cast<System::Int32>(static_cast<System::Byte>(0))); this->label3->Location = System::Drawing::Point(240, 31); this->label3->Name = L"label3"; this->label3->Size = System::Drawing::Size(158, 13); this->label3->TabIndex = 46; this->label3->Text = L"Data Breakpoints don\'t work yet"; // // label4 // this->label4->AutoSize = true; this->label4->Location = System::Drawing::Point(17, 51); this->label4->Name = L"label4"; this->label4->Size = System::Drawing::Size(20, 13); this->label4->TabIndex = 47; this->label4->Text = L"En"; // // frmBreakpoints // this->AutoScaleDimensions = System::Drawing::SizeF(6, 13); this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font; this->ClientSize = System::Drawing::Size(403, 259); this->Controls->Add(this->label4); this->Controls->Add(this->label3); this->Controls->Add(this->checkBox10); this->Controls->Add(this->checkBox9); this->Controls->Add(this->checkBox8); this->Controls->Add(this->checkBox7); this->Controls->Add(this->checkBox6); this->Controls->Add(this->checkBox5); this->Controls->Add(this->checkBox4); this->Controls->Add(this->checkBox3); this->Controls->Add(this->checkBox2); this->Controls->Add(this->checkBox1); this->Controls->Add(this->button26); this->Controls->Add(this->button25); this->Controls->Add(this->textBox6); this->Controls->Add(this->textBox7); this->Controls->Add(this->textBox8); this->Controls->Add(this->textBox9); this->Controls->Add(this->textBox10); this->Controls->Add(this->label2); this->Controls->Add(this->textBox5); this->Controls->Add(this->textBox4); this->Controls->Add(this->textBox3); this->Controls->Add(this->textBox2); this->Controls->Add(this->textBox1); this->Controls->Add(this->label1); this->FormBorderStyle = System::Windows::Forms::FormBorderStyle::FixedSingle; this->Name = L"frmBreakpoints"; this->Text = L"emuThor - Breakpoints"; this->FormClosing += gcnew System::Windows::Forms::FormClosingEventHandler(this, &frmBreakpoints::frmBreakpoints_FormClosing); this->ResumeLayout(false); this->PerformLayout(); } #pragma endregion private: System::Void button13_Click(System::Object^ sender, System::EventArgs^ e) { } private: System::Void button6_Click(System::Object^ sender, System::EventArgs^ e) { } private: System::Void checkBox1_CheckedChanged(System::Object^ sender, System::EventArgs^ e) { } private: System::Void button25_Click(System::Object^ sender, System::EventArgs^ e) { char *str; char buf1[20]; char buf2[20]; char *ep; mut->WaitOne(); ib_active[0] = checkBox1->Checked; ib_active[1] = checkBox2->Checked; ib_active[2] = checkBox3->Checked; ib_active[3] = checkBox4->Checked; ib_active[4] = checkBox6->Checked; db_active[0] = checkBox7->Checked; db_active[1] = checkBox5->Checked; db_active[2] = checkBox8->Checked; db_active[3] = checkBox9->Checked; db_active[4] = checkBox10->Checked; str = (char*)(void*)Marshal::StringToHGlobalAnsi(this->textBox1->Text); ibreakpoints[0] = _strtoui64(str, &ep, 16); str = (char*)(void*)Marshal::StringToHGlobalAnsi(this->textBox2->Text); ibreakpoints[1] = _strtoui64(str, &ep, 16); str = (char*)(void*)Marshal::StringToHGlobalAnsi(this->textBox3->Text); ibreakpoints[2] = _strtoui64(str, &ep, 16); str = (char*)(void*)Marshal::StringToHGlobalAnsi(this->textBox4->Text); ibreakpoints[3] = _strtoui64(str, &ep, 16); str = (char*)(void*)Marshal::StringToHGlobalAnsi(this->textBox5->Text); ibreakpoints[4] = _strtoui64(str, &ep, 16); mut->ReleaseMutex(); } private: System::Void frmBreakpoints_FormClosing(System::Object^ sender, System::Windows::Forms::FormClosingEventArgs^ e) { if (e->CloseReason==CloseReason::UserClosing) e->Cancel = true; } }; }
Go to most recent revision | Compare with Previous | Blame | View Log