OpenCores
URL https://opencores.org/ocsvn/thor/thor/trunk

Subversion Repositories thor

[/] [thor/] [trunk/] [software/] [emuThor/] [source/] [frmPCHistory.h] - Blame information for rev 35

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 32 robfinch
#pragma once
2
 
3
namespace emuThor {
4
 
5
        using namespace System;
6
        using namespace System::ComponentModel;
7
        using namespace System::Collections;
8
        using namespace System::Windows::Forms;
9
        using namespace System::Data;
10
        using namespace System::Drawing;
11
        using namespace System::Threading;
12
 
13
        /// <summary>
14
        /// Summary for frmPCHistory
15
        /// </summary>
16
        public ref class frmPCHistory : public System::Windows::Forms::Form
17
        {
18
        public:
19
                frmPCHistory(Mutex^ m)
20
                {
21
                        mut = m;
22
                        InitializeComponent();
23
                        //
24
                        //TODO: Add the constructor code here
25
                        //
26 35 robfinch
                        UpdateForm();
27 32 robfinch
                }
28
                frmPCHistory(void)
29
                {
30
                        InitializeComponent();
31
                        //
32
                        //TODO: Add the constructor code here
33
                        //
34 35 robfinch
                        UpdateForm();
35 32 robfinch
                }
36
 
37
        protected:
38
                /// <summary>
39
                /// Clean up any resources being used.
40
                /// </summary>
41
                ~frmPCHistory()
42
                {
43
                        if (components)
44
                        {
45
                                delete components;
46
                        }
47
                }
48
        private: System::Windows::Forms::TextBox^  textBox1;
49
        public: Mutex^ mut;
50
        protected:
51
 
52
        private:
53
                /// <summary>
54
                /// Required designer variable.
55
                /// </summary>
56
                System::ComponentModel::Container ^components;
57
 
58
#pragma region Windows Form Designer generated code
59
                /// <summary>
60
                /// Required method for Designer support - do not modify
61
                /// the contents of this method with the code editor.
62
                /// </summary>
63
                void InitializeComponent(void)
64
                {
65
                        this->textBox1 = (gcnew System::Windows::Forms::TextBox());
66
                        this->SuspendLayout();
67
                        // 
68
                        // textBox1
69
                        // 
70 35 robfinch
                        this->textBox1->Location = System::Drawing::Point(12, 47);
71 32 robfinch
                        this->textBox1->Multiline = true;
72
                        this->textBox1->Name = L"textBox1";
73 35 robfinch
                        this->textBox1->ReadOnly = true;
74
                        this->textBox1->ScrollBars = System::Windows::Forms::ScrollBars::Vertical;
75
                        this->textBox1->Size = System::Drawing::Size(162, 379);
76 32 robfinch
                        this->textBox1->TabIndex = 0;
77
                        // 
78
                        // frmPCHistory
79
                        // 
80
                        this->AutoScaleDimensions = System::Drawing::SizeF(6, 13);
81
                        this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
82
                        this->ClientSize = System::Drawing::Size(193, 438);
83
                        this->Controls->Add(this->textBox1);
84
                        this->FormBorderStyle = System::Windows::Forms::FormBorderStyle::FixedSingle;
85
                        this->Name = L"frmPCHistory";
86
                        this->Text = L"PCHistory";
87 35 robfinch
                        this->FormClosing += gcnew System::Windows::Forms::FormClosingEventHandler(this, &frmPCHistory::frmPCHistory_FormClosing);
88 32 robfinch
                        this->ResumeLayout(false);
89
                        this->PerformLayout();
90
 
91
                }
92
#pragma endregion
93 35 robfinch
        private: System::Void frmPCHistory_FormClosing(System::Object^  sender, System::Windows::Forms::FormClosingEventArgs^  e) {
94
                         if (e->CloseReason==CloseReason::UserClosing)
95
                                 e->Cancel = true;
96
                         }
97
        public: void UpdateForm() {
98
                                char buf[4000];
99
                                int xx;
100
                                buf[0] = '\0';
101
                                for (xx = 0; xx < 40; xx++) {
102
                                        mut->WaitOne();
103
                                        sprintf(&buf[strlen(buf)], "%08I64X\r\n", system1.cpu2.pcs[xx]);
104
                                        mut->ReleaseMutex();
105
                                }
106
                                textBox1->Text = gcnew String(buf);
107
                        }
108 32 robfinch
        };
109
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.