#pragma once
|
#pragma once
|
|
|
namespace emuThor {
|
namespace emuThor {
|
|
|
using namespace System;
|
using namespace System;
|
using namespace System::ComponentModel;
|
using namespace System::ComponentModel;
|
using namespace System::Collections;
|
using namespace System::Collections;
|
using namespace System::Windows::Forms;
|
using namespace System::Windows::Forms;
|
using namespace System::Data;
|
using namespace System::Data;
|
using namespace System::Drawing;
|
using namespace System::Drawing;
|
using namespace System::Threading;
|
using namespace System::Threading;
|
|
|
/// <summary>
|
/// <summary>
|
/// Summary for frmPCHistory
|
/// Summary for frmPCHistory
|
/// </summary>
|
/// </summary>
|
public ref class frmPCHistory : public System::Windows::Forms::Form
|
public ref class frmPCHistory : public System::Windows::Forms::Form
|
{
|
{
|
public:
|
public:
|
frmPCHistory(Mutex^ m)
|
frmPCHistory(Mutex^ m)
|
{
|
{
|
mut = m;
|
mut = m;
|
InitializeComponent();
|
InitializeComponent();
|
//
|
//
|
//TODO: Add the constructor code here
|
//TODO: Add the constructor code here
|
//
|
//
|
char buf[4000];
|
UpdateForm();
|
int xx;
|
|
buf[0] = '\0';
|
|
for (xx = 0; xx < 40; xx++) {
|
|
mut->WaitOne();
|
|
sprintf(&buf[strlen(buf)], "%08I64X\r\n", system1.cpu2.pcs[xx]);
|
|
mut->ReleaseMutex();
|
|
}
|
|
textBox1->Text = gcnew String(buf);
|
|
}
|
}
|
frmPCHistory(void)
|
frmPCHistory(void)
|
{
|
{
|
InitializeComponent();
|
InitializeComponent();
|
//
|
//
|
//TODO: Add the constructor code here
|
//TODO: Add the constructor code here
|
//
|
//
|
char buf[4000];
|
UpdateForm();
|
int xx;
|
|
buf[0] = '\0';
|
|
for (xx = 0; xx < 40; xx++) {
|
|
mut->WaitOne();
|
|
sprintf(&buf[strlen(buf)], "%08I64X\r\n", system1.cpu2.pcs[xx]);
|
|
mut->ReleaseMutex();
|
|
}
|
|
textBox1->Text = gcnew String(buf);
|
|
}
|
}
|
|
|
protected:
|
protected:
|
/// <summary>
|
/// <summary>
|
/// Clean up any resources being used.
|
/// Clean up any resources being used.
|
/// </summary>
|
/// </summary>
|
~frmPCHistory()
|
~frmPCHistory()
|
{
|
{
|
if (components)
|
if (components)
|
{
|
{
|
delete components;
|
delete components;
|
}
|
}
|
}
|
}
|
private: System::Windows::Forms::TextBox^ textBox1;
|
private: System::Windows::Forms::TextBox^ textBox1;
|
public: Mutex^ mut;
|
public: Mutex^ mut;
|
protected:
|
protected:
|
|
|
private:
|
private:
|
/// <summary>
|
/// <summary>
|
/// Required designer variable.
|
/// Required designer variable.
|
/// </summary>
|
/// </summary>
|
System::ComponentModel::Container ^components;
|
System::ComponentModel::Container ^components;
|
|
|
#pragma region Windows Form Designer generated code
|
#pragma region Windows Form Designer generated code
|
/// <summary>
|
/// <summary>
|
/// Required method for Designer support - do not modify
|
/// Required method for Designer support - do not modify
|
/// the contents of this method with the code editor.
|
/// the contents of this method with the code editor.
|
/// </summary>
|
/// </summary>
|
void InitializeComponent(void)
|
void InitializeComponent(void)
|
{
|
{
|
this->textBox1 = (gcnew System::Windows::Forms::TextBox());
|
this->textBox1 = (gcnew System::Windows::Forms::TextBox());
|
this->SuspendLayout();
|
this->SuspendLayout();
|
//
|
//
|
// textBox1
|
// textBox1
|
//
|
//
|
this->textBox1->Location = System::Drawing::Point(12, 22);
|
this->textBox1->Location = System::Drawing::Point(12, 47);
|
this->textBox1->Multiline = true;
|
this->textBox1->Multiline = true;
|
this->textBox1->Name = L"textBox1";
|
this->textBox1->Name = L"textBox1";
|
this->textBox1->Size = System::Drawing::Size(162, 385);
|
this->textBox1->ReadOnly = true;
|
|
this->textBox1->ScrollBars = System::Windows::Forms::ScrollBars::Vertical;
|
|
this->textBox1->Size = System::Drawing::Size(162, 379);
|
this->textBox1->TabIndex = 0;
|
this->textBox1->TabIndex = 0;
|
//
|
//
|
// frmPCHistory
|
// frmPCHistory
|
//
|
//
|
this->AutoScaleDimensions = System::Drawing::SizeF(6, 13);
|
this->AutoScaleDimensions = System::Drawing::SizeF(6, 13);
|
this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
|
this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
|
this->ClientSize = System::Drawing::Size(193, 438);
|
this->ClientSize = System::Drawing::Size(193, 438);
|
this->Controls->Add(this->textBox1);
|
this->Controls->Add(this->textBox1);
|
this->FormBorderStyle = System::Windows::Forms::FormBorderStyle::FixedSingle;
|
this->FormBorderStyle = System::Windows::Forms::FormBorderStyle::FixedSingle;
|
this->Name = L"frmPCHistory";
|
this->Name = L"frmPCHistory";
|
this->Text = L"PCHistory";
|
this->Text = L"PCHistory";
|
|
this->FormClosing += gcnew System::Windows::Forms::FormClosingEventHandler(this, &frmPCHistory::frmPCHistory_FormClosing);
|
this->ResumeLayout(false);
|
this->ResumeLayout(false);
|
this->PerformLayout();
|
this->PerformLayout();
|
|
|
}
|
}
|
#pragma endregion
|
#pragma endregion
|
|
private: System::Void frmPCHistory_FormClosing(System::Object^ sender, System::Windows::Forms::FormClosingEventArgs^ e) {
|
|
if (e->CloseReason==CloseReason::UserClosing)
|
|
e->Cancel = true;
|
|
}
|
|
public: void UpdateForm() {
|
|
char buf[4000];
|
|
int xx;
|
|
buf[0] = '\0';
|
|
for (xx = 0; xx < 40; xx++) {
|
|
mut->WaitOne();
|
|
sprintf(&buf[strlen(buf)], "%08I64X\r\n", system1.cpu2.pcs[xx]);
|
|
mut->ReleaseMutex();
|
|
}
|
|
textBox1->Text = gcnew String(buf);
|
|
}
|
};
|
};
|
}
|
}
|
|
|