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

Subversion Repositories thor

[/] [thor/] [trunk/] [software/] [emuThor/] [source/] [frmBreakpoints.h] - Blame information for rev 32

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 32 robfinch
#pragma once
2
#include <cstdlib>
3
 
4
extern unsigned __int64 ibreakpoints[10];
5
extern unsigned __int64 dbreakpoints[10];
6
extern bool ib_active[10];
7
extern bool db_active[10];
8
 
9
namespace emuThor {
10
 
11
        using namespace System;
12
        using namespace System::ComponentModel;
13
        using namespace System::Collections;
14
        using namespace System::Windows::Forms;
15
        using namespace System::Data;
16
        using namespace System::Drawing;
17
        using namespace System::Runtime::InteropServices;
18
        using namespace System::Threading;
19
 
20
        /// <summary>
21
        /// Summary for frmBreakpoints
22
        /// </summary>
23
        public ref class frmBreakpoints : public System::Windows::Forms::Form
24
        {
25
        public:
26
                frmBreakpoints(Mutex^ m)
27
                {
28
                        mut = m;
29
                        InitializeComponent();
30
                        //
31
                        //TODO: Add the constructor code here
32
                        //
33
                        char buf[100];
34
                        mut->WaitOne();
35
                        checkBox1->Checked = ib_active[0];
36
                        checkBox2->Checked = ib_active[1];
37
                        checkBox3->Checked = ib_active[2];
38
                        checkBox4->Checked = ib_active[3];
39
                        checkBox6->Checked = ib_active[4];
40
                        sprintf(buf,"%016I64X", ibreakpoints[0]);
41
                        textBox1->Text = gcnew String(buf);
42
                        sprintf(buf,"%016I64X", ibreakpoints[1]);
43
                        textBox2->Text = gcnew String(buf);
44
                        sprintf(buf,"%016I64X", ibreakpoints[2]);
45
                        textBox3->Text = gcnew String(buf);
46
                        sprintf(buf,"%016I64X", ibreakpoints[3]);
47
                        textBox4->Text = gcnew String(buf);
48
                        sprintf(buf,"%016I64X", ibreakpoints[4]);
49
                        textBox5->Text = gcnew String(buf);
50
                        mut->ReleaseMutex();
51
                }
52
 
53
        protected:
54
                /// <summary>
55
                /// Clean up any resources being used.
56
                /// </summary>
57
                ~frmBreakpoints()
58
                {
59
                        if (components)
60
                        {
61
                                delete components;
62
                        }
63
                }
64
        private: System::Windows::Forms::Label^  label1;
65
        protected:
66
        private: System::Windows::Forms::TextBox^  textBox1;
67
        private: System::Windows::Forms::TextBox^  textBox2;
68
        private: System::Windows::Forms::TextBox^  textBox3;
69
        private: System::Windows::Forms::TextBox^  textBox4;
70
        private: System::Windows::Forms::TextBox^  textBox5;
71
        private: System::Windows::Forms::TextBox^  textBox6;
72
        private: System::Windows::Forms::TextBox^  textBox7;
73
        private: System::Windows::Forms::TextBox^  textBox8;
74
        private: System::Windows::Forms::TextBox^  textBox9;
75
        private: System::Windows::Forms::TextBox^  textBox10;
76
        private: System::Windows::Forms::Label^  label2;
77
        public: Mutex^ mut;
78
 
79
 
80
 
81
 
82
 
83
 
84
 
85
 
86
 
87
 
88
 
89
 
90
 
91
 
92
 
93
 
94
 
95
 
96
 
97
 
98
 
99
 
100
 
101
 
102
        private: System::Windows::Forms::Button^  button25;
103
        private: System::Windows::Forms::Button^  button26;
104
        private: System::Windows::Forms::CheckBox^  checkBox1;
105
        private: System::Windows::Forms::CheckBox^  checkBox2;
106
        private: System::Windows::Forms::CheckBox^  checkBox3;
107
        private: System::Windows::Forms::CheckBox^  checkBox4;
108
        private: System::Windows::Forms::CheckBox^  checkBox5;
109
        private: System::Windows::Forms::CheckBox^  checkBox6;
110
        private: System::Windows::Forms::CheckBox^  checkBox7;
111
        private: System::Windows::Forms::CheckBox^  checkBox8;
112
        private: System::Windows::Forms::CheckBox^  checkBox9;
113
        private: System::Windows::Forms::CheckBox^  checkBox10;
114
        private: System::Windows::Forms::Label^  label3;
115
 
116
        private:
117
                /// <summary>
118
                /// Required designer variable.
119
                /// </summary>
120
                System::ComponentModel::Container ^components;
121
 
122
#pragma region Windows Form Designer generated code
123
                /// <summary>
124
                /// Required method for Designer support - do not modify
125
                /// the contents of this method with the code editor.
126
                /// </summary>
127
                void InitializeComponent(void)
128
                {
129
                        this->label1 = (gcnew System::Windows::Forms::Label());
130
                        this->textBox1 = (gcnew System::Windows::Forms::TextBox());
131
                        this->textBox2 = (gcnew System::Windows::Forms::TextBox());
132
                        this->textBox3 = (gcnew System::Windows::Forms::TextBox());
133
                        this->textBox4 = (gcnew System::Windows::Forms::TextBox());
134
                        this->textBox5 = (gcnew System::Windows::Forms::TextBox());
135
                        this->textBox6 = (gcnew System::Windows::Forms::TextBox());
136
                        this->textBox7 = (gcnew System::Windows::Forms::TextBox());
137
                        this->textBox8 = (gcnew System::Windows::Forms::TextBox());
138
                        this->textBox9 = (gcnew System::Windows::Forms::TextBox());
139
                        this->textBox10 = (gcnew System::Windows::Forms::TextBox());
140
                        this->label2 = (gcnew System::Windows::Forms::Label());
141
                        this->button25 = (gcnew System::Windows::Forms::Button());
142
                        this->button26 = (gcnew System::Windows::Forms::Button());
143
                        this->checkBox1 = (gcnew System::Windows::Forms::CheckBox());
144
                        this->checkBox2 = (gcnew System::Windows::Forms::CheckBox());
145
                        this->checkBox3 = (gcnew System::Windows::Forms::CheckBox());
146
                        this->checkBox4 = (gcnew System::Windows::Forms::CheckBox());
147
                        this->checkBox5 = (gcnew System::Windows::Forms::CheckBox());
148
                        this->checkBox6 = (gcnew System::Windows::Forms::CheckBox());
149
                        this->checkBox7 = (gcnew System::Windows::Forms::CheckBox());
150
                        this->checkBox8 = (gcnew System::Windows::Forms::CheckBox());
151
                        this->checkBox9 = (gcnew System::Windows::Forms::CheckBox());
152
                        this->checkBox10 = (gcnew System::Windows::Forms::CheckBox());
153
                        this->label3 = (gcnew System::Windows::Forms::Label());
154
                        this->SuspendLayout();
155
                        // 
156
                        // label1
157
                        // 
158
                        this->label1->AutoSize = true;
159
                        this->label1->Location = System::Drawing::Point(54, 29);
160
                        this->label1->Name = L"label1";
161
                        this->label1->Size = System::Drawing::Size(56, 13);
162
                        this->label1->TabIndex = 0;
163
                        this->label1->Text = L"Instruction";
164
                        // 
165
                        // textBox1
166
                        // 
167
                        this->textBox1->Location = System::Drawing::Point(57, 56);
168
                        this->textBox1->Name = L"textBox1";
169
                        this->textBox1->Size = System::Drawing::Size(120, 20);
170
                        this->textBox1->TabIndex = 1;
171
                        // 
172
                        // textBox2
173
                        // 
174
                        this->textBox2->Location = System::Drawing::Point(57, 82);
175
                        this->textBox2->Name = L"textBox2";
176
                        this->textBox2->Size = System::Drawing::Size(120, 20);
177
                        this->textBox2->TabIndex = 2;
178
                        // 
179
                        // textBox3
180
                        // 
181
                        this->textBox3->Location = System::Drawing::Point(57, 108);
182
                        this->textBox3->Name = L"textBox3";
183
                        this->textBox3->Size = System::Drawing::Size(120, 20);
184
                        this->textBox3->TabIndex = 3;
185
                        // 
186
                        // textBox4
187
                        // 
188
                        this->textBox4->Location = System::Drawing::Point(57, 134);
189
                        this->textBox4->Name = L"textBox4";
190
                        this->textBox4->Size = System::Drawing::Size(120, 20);
191
                        this->textBox4->TabIndex = 4;
192
                        // 
193
                        // textBox5
194
                        // 
195
                        this->textBox5->Location = System::Drawing::Point(57, 160);
196
                        this->textBox5->Name = L"textBox5";
197
                        this->textBox5->Size = System::Drawing::Size(120, 20);
198
                        this->textBox5->TabIndex = 5;
199
                        // 
200
                        // textBox6
201
                        // 
202
                        this->textBox6->Enabled = false;
203
                        this->textBox6->Location = System::Drawing::Point(244, 160);
204
                        this->textBox6->Name = L"textBox6";
205
                        this->textBox6->Size = System::Drawing::Size(125, 20);
206
                        this->textBox6->TabIndex = 11;
207
                        // 
208
                        // textBox7
209
                        // 
210
                        this->textBox7->Enabled = false;
211
                        this->textBox7->Location = System::Drawing::Point(244, 134);
212
                        this->textBox7->Name = L"textBox7";
213
                        this->textBox7->Size = System::Drawing::Size(125, 20);
214
                        this->textBox7->TabIndex = 10;
215
                        // 
216
                        // textBox8
217
                        // 
218
                        this->textBox8->Enabled = false;
219
                        this->textBox8->Location = System::Drawing::Point(244, 108);
220
                        this->textBox8->Name = L"textBox8";
221
                        this->textBox8->Size = System::Drawing::Size(125, 20);
222
                        this->textBox8->TabIndex = 9;
223
                        // 
224
                        // textBox9
225
                        // 
226
                        this->textBox9->Enabled = false;
227
                        this->textBox9->Location = System::Drawing::Point(244, 82);
228
                        this->textBox9->Name = L"textBox9";
229
                        this->textBox9->Size = System::Drawing::Size(125, 20);
230
                        this->textBox9->TabIndex = 8;
231
                        // 
232
                        // textBox10
233
                        // 
234
                        this->textBox10->Enabled = false;
235
                        this->textBox10->Location = System::Drawing::Point(244, 56);
236
                        this->textBox10->Name = L"textBox10";
237
                        this->textBox10->Size = System::Drawing::Size(125, 20);
238
                        this->textBox10->TabIndex = 7;
239
                        // 
240
                        // label2
241
                        // 
242
                        this->label2->AutoSize = true;
243
                        this->label2->Enabled = false;
244
                        this->label2->Location = System::Drawing::Point(241, 29);
245
                        this->label2->Name = L"label2";
246
                        this->label2->Size = System::Drawing::Size(30, 13);
247
                        this->label2->TabIndex = 6;
248
                        this->label2->Text = L"Data";
249
                        // 
250
                        // button25
251
                        // 
252
                        this->button25->DialogResult = System::Windows::Forms::DialogResult::OK;
253
                        this->button25->Location = System::Drawing::Point(294, 205);
254
                        this->button25->Name = L"button25";
255
                        this->button25->Size = System::Drawing::Size(75, 23);
256
                        this->button25->TabIndex = 35;
257
                        this->button25->Text = L"OK";
258
                        this->button25->UseVisualStyleBackColor = true;
259
                        this->button25->Click += gcnew System::EventHandler(this, &frmBreakpoints::button25_Click);
260
                        // 
261
                        // button26
262
                        // 
263
                        this->button26->DialogResult = System::Windows::Forms::DialogResult::Cancel;
264
                        this->button26->Location = System::Drawing::Point(181, 205);
265
                        this->button26->Name = L"button26";
266
                        this->button26->Size = System::Drawing::Size(75, 23);
267
                        this->button26->TabIndex = 36;
268
                        this->button26->Text = L"Cancel";
269
                        this->button26->UseVisualStyleBackColor = true;
270
                        // 
271
                        // checkBox1
272
                        // 
273
                        this->checkBox1->AutoSize = true;
274
                        this->checkBox1->Location = System::Drawing::Point(21, 56);
275
                        this->checkBox1->Name = L"checkBox1";
276
                        this->checkBox1->Size = System::Drawing::Size(15, 14);
277
                        this->checkBox1->TabIndex = 37;
278
                        this->checkBox1->UseVisualStyleBackColor = true;
279
                        this->checkBox1->CheckedChanged += gcnew System::EventHandler(this, &frmBreakpoints::checkBox1_CheckedChanged);
280
                        // 
281
                        // checkBox2
282
                        // 
283
                        this->checkBox2->AutoSize = true;
284
                        this->checkBox2->Location = System::Drawing::Point(21, 82);
285
                        this->checkBox2->Name = L"checkBox2";
286
                        this->checkBox2->Size = System::Drawing::Size(15, 14);
287
                        this->checkBox2->TabIndex = 38;
288
                        this->checkBox2->UseVisualStyleBackColor = true;
289
                        // 
290
                        // checkBox3
291
                        // 
292
                        this->checkBox3->AutoSize = true;
293
                        this->checkBox3->Location = System::Drawing::Point(21, 108);
294
                        this->checkBox3->Name = L"checkBox3";
295
                        this->checkBox3->Size = System::Drawing::Size(15, 14);
296
                        this->checkBox3->TabIndex = 39;
297
                        this->checkBox3->UseVisualStyleBackColor = true;
298
                        // 
299
                        // checkBox4
300
                        // 
301
                        this->checkBox4->AutoSize = true;
302
                        this->checkBox4->Location = System::Drawing::Point(21, 134);
303
                        this->checkBox4->Name = L"checkBox4";
304
                        this->checkBox4->Size = System::Drawing::Size(15, 14);
305
                        this->checkBox4->TabIndex = 40;
306
                        this->checkBox4->UseVisualStyleBackColor = true;
307
                        // 
308
                        // checkBox5
309
                        // 
310
                        this->checkBox5->AutoSize = true;
311
                        this->checkBox5->Enabled = false;
312
                        this->checkBox5->Location = System::Drawing::Point(210, 82);
313
                        this->checkBox5->Name = L"checkBox5";
314
                        this->checkBox5->Size = System::Drawing::Size(15, 14);
315
                        this->checkBox5->TabIndex = 41;
316
                        this->checkBox5->UseVisualStyleBackColor = true;
317
                        // 
318
                        // checkBox6
319
                        // 
320
                        this->checkBox6->AutoSize = true;
321
                        this->checkBox6->Location = System::Drawing::Point(21, 160);
322
                        this->checkBox6->Name = L"checkBox6";
323
                        this->checkBox6->Size = System::Drawing::Size(15, 14);
324
                        this->checkBox6->TabIndex = 41;
325
                        this->checkBox6->UseVisualStyleBackColor = true;
326
                        // 
327
                        // checkBox7
328
                        // 
329
                        this->checkBox7->AutoSize = true;
330
                        this->checkBox7->Enabled = false;
331
                        this->checkBox7->Location = System::Drawing::Point(210, 56);
332
                        this->checkBox7->Name = L"checkBox7";
333
                        this->checkBox7->Size = System::Drawing::Size(15, 14);
334
                        this->checkBox7->TabIndex = 42;
335
                        this->checkBox7->UseVisualStyleBackColor = true;
336
                        // 
337
                        // checkBox8
338
                        // 
339
                        this->checkBox8->AutoSize = true;
340
                        this->checkBox8->Enabled = false;
341
                        this->checkBox8->Location = System::Drawing::Point(210, 108);
342
                        this->checkBox8->Name = L"checkBox8";
343
                        this->checkBox8->Size = System::Drawing::Size(15, 14);
344
                        this->checkBox8->TabIndex = 43;
345
                        this->checkBox8->UseVisualStyleBackColor = true;
346
                        // 
347
                        // checkBox9
348
                        // 
349
                        this->checkBox9->AutoSize = true;
350
                        this->checkBox9->Enabled = false;
351
                        this->checkBox9->Location = System::Drawing::Point(210, 134);
352
                        this->checkBox9->Name = L"checkBox9";
353
                        this->checkBox9->Size = System::Drawing::Size(15, 14);
354
                        this->checkBox9->TabIndex = 44;
355
                        this->checkBox9->UseVisualStyleBackColor = true;
356
                        // 
357
                        // checkBox10
358
                        // 
359
                        this->checkBox10->AutoSize = true;
360
                        this->checkBox10->Enabled = false;
361
                        this->checkBox10->Location = System::Drawing::Point(210, 160);
362
                        this->checkBox10->Name = L"checkBox10";
363
                        this->checkBox10->Size = System::Drawing::Size(15, 14);
364
                        this->checkBox10->TabIndex = 45;
365
                        this->checkBox10->UseVisualStyleBackColor = true;
366
                        // 
367
                        // label3
368
                        // 
369
                        this->label3->AutoSize = true;
370
                        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)),
371
                                static_cast<System::Int32>(static_cast<System::Byte>(0)));
372
                        this->label3->Location = System::Drawing::Point(241, 9);
373
                        this->label3->Name = L"label3";
374
                        this->label3->Size = System::Drawing::Size(158, 13);
375
                        this->label3->TabIndex = 46;
376
                        this->label3->Text = L"Data Breakpoints don\'t work yet";
377
                        // 
378
                        // frmBreakpoints
379
                        // 
380
                        this->AutoScaleDimensions = System::Drawing::SizeF(6, 13);
381
                        this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
382
                        this->ClientSize = System::Drawing::Size(403, 249);
383
                        this->Controls->Add(this->label3);
384
                        this->Controls->Add(this->checkBox10);
385
                        this->Controls->Add(this->checkBox9);
386
                        this->Controls->Add(this->checkBox8);
387
                        this->Controls->Add(this->checkBox7);
388
                        this->Controls->Add(this->checkBox6);
389
                        this->Controls->Add(this->checkBox5);
390
                        this->Controls->Add(this->checkBox4);
391
                        this->Controls->Add(this->checkBox3);
392
                        this->Controls->Add(this->checkBox2);
393
                        this->Controls->Add(this->checkBox1);
394
                        this->Controls->Add(this->button26);
395
                        this->Controls->Add(this->button25);
396
                        this->Controls->Add(this->textBox6);
397
                        this->Controls->Add(this->textBox7);
398
                        this->Controls->Add(this->textBox8);
399
                        this->Controls->Add(this->textBox9);
400
                        this->Controls->Add(this->textBox10);
401
                        this->Controls->Add(this->label2);
402
                        this->Controls->Add(this->textBox5);
403
                        this->Controls->Add(this->textBox4);
404
                        this->Controls->Add(this->textBox3);
405
                        this->Controls->Add(this->textBox2);
406
                        this->Controls->Add(this->textBox1);
407
                        this->Controls->Add(this->label1);
408
                        this->FormBorderStyle = System::Windows::Forms::FormBorderStyle::FixedSingle;
409
                        this->MaximizeBox = false;
410
                        this->Name = L"frmBreakpoints";
411
                        this->Text = L"emuThor - Breakpoints";
412
                        this->ResumeLayout(false);
413
                        this->PerformLayout();
414
 
415
                }
416
#pragma endregion
417
        private: System::Void button13_Click(System::Object^  sender, System::EventArgs^  e) {
418
                         }
419
private: System::Void button6_Click(System::Object^  sender, System::EventArgs^  e) {
420
                 }
421
private: System::Void checkBox1_CheckedChanged(System::Object^  sender, System::EventArgs^  e) {
422
                 }
423
private: System::Void button25_Click(System::Object^  sender, System::EventArgs^  e) {
424
                         char *str;
425
                         char buf1[20];
426
                         char buf2[20];
427
                         char *ep;
428
 
429
                         mut->WaitOne();
430
                         ib_active[0] = checkBox1->Checked;
431
                         ib_active[1] = checkBox2->Checked;
432
                         ib_active[2] = checkBox3->Checked;
433
                         ib_active[3] = checkBox4->Checked;
434
                         ib_active[4] = checkBox6->Checked;
435
                         db_active[0] = checkBox7->Checked;
436
                         db_active[1] = checkBox5->Checked;
437
                         db_active[2] = checkBox8->Checked;
438
                         db_active[3] = checkBox9->Checked;
439
                         db_active[4] = checkBox10->Checked;
440
                         str = (char*)(void*)Marshal::StringToHGlobalAnsi(this->textBox1->Text);
441
                         ibreakpoints[0] = _strtoui64(str, &ep, 16);
442
                         str = (char*)(void*)Marshal::StringToHGlobalAnsi(this->textBox2->Text);
443
                         ibreakpoints[1] = _strtoui64(str, &ep, 16);
444
                         str = (char*)(void*)Marshal::StringToHGlobalAnsi(this->textBox3->Text);
445
                         ibreakpoints[2] = _strtoui64(str, &ep, 16);
446
                         str = (char*)(void*)Marshal::StringToHGlobalAnsi(this->textBox4->Text);
447
                         ibreakpoints[3] = _strtoui64(str, &ep, 16);
448
                         str = (char*)(void*)Marshal::StringToHGlobalAnsi(this->textBox5->Text);
449
                         ibreakpoints[4] = _strtoui64(str, &ep, 16);
450
                         mut->ReleaseMutex();
451
                 }
452
};
453
}

powered by: WebSVN 2.1.0

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