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

Subversion Repositories thor

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

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 35 robfinch
        private: System::Windows::Forms::Label^  label4;
116 32 robfinch
 
117
        private:
118
                /// <summary>
119
                /// Required designer variable.
120
                /// </summary>
121
                System::ComponentModel::Container ^components;
122
 
123
#pragma region Windows Form Designer generated code
124
                /// <summary>
125
                /// Required method for Designer support - do not modify
126
                /// the contents of this method with the code editor.
127
                /// </summary>
128
                void InitializeComponent(void)
129
                {
130
                        this->label1 = (gcnew System::Windows::Forms::Label());
131
                        this->textBox1 = (gcnew System::Windows::Forms::TextBox());
132
                        this->textBox2 = (gcnew System::Windows::Forms::TextBox());
133
                        this->textBox3 = (gcnew System::Windows::Forms::TextBox());
134
                        this->textBox4 = (gcnew System::Windows::Forms::TextBox());
135
                        this->textBox5 = (gcnew System::Windows::Forms::TextBox());
136
                        this->textBox6 = (gcnew System::Windows::Forms::TextBox());
137
                        this->textBox7 = (gcnew System::Windows::Forms::TextBox());
138
                        this->textBox8 = (gcnew System::Windows::Forms::TextBox());
139
                        this->textBox9 = (gcnew System::Windows::Forms::TextBox());
140
                        this->textBox10 = (gcnew System::Windows::Forms::TextBox());
141
                        this->label2 = (gcnew System::Windows::Forms::Label());
142
                        this->button25 = (gcnew System::Windows::Forms::Button());
143
                        this->button26 = (gcnew System::Windows::Forms::Button());
144
                        this->checkBox1 = (gcnew System::Windows::Forms::CheckBox());
145
                        this->checkBox2 = (gcnew System::Windows::Forms::CheckBox());
146
                        this->checkBox3 = (gcnew System::Windows::Forms::CheckBox());
147
                        this->checkBox4 = (gcnew System::Windows::Forms::CheckBox());
148
                        this->checkBox5 = (gcnew System::Windows::Forms::CheckBox());
149
                        this->checkBox6 = (gcnew System::Windows::Forms::CheckBox());
150
                        this->checkBox7 = (gcnew System::Windows::Forms::CheckBox());
151
                        this->checkBox8 = (gcnew System::Windows::Forms::CheckBox());
152
                        this->checkBox9 = (gcnew System::Windows::Forms::CheckBox());
153
                        this->checkBox10 = (gcnew System::Windows::Forms::CheckBox());
154
                        this->label3 = (gcnew System::Windows::Forms::Label());
155 35 robfinch
                        this->label4 = (gcnew System::Windows::Forms::Label());
156 32 robfinch
                        this->SuspendLayout();
157
                        // 
158
                        // label1
159
                        // 
160
                        this->label1->AutoSize = true;
161 35 robfinch
                        this->label1->Location = System::Drawing::Point(53, 51);
162 32 robfinch
                        this->label1->Name = L"label1";
163
                        this->label1->Size = System::Drawing::Size(56, 13);
164
                        this->label1->TabIndex = 0;
165
                        this->label1->Text = L"Instruction";
166
                        // 
167
                        // textBox1
168
                        // 
169 35 robfinch
                        this->textBox1->Location = System::Drawing::Point(56, 78);
170 32 robfinch
                        this->textBox1->Name = L"textBox1";
171
                        this->textBox1->Size = System::Drawing::Size(120, 20);
172
                        this->textBox1->TabIndex = 1;
173
                        // 
174
                        // textBox2
175
                        // 
176 35 robfinch
                        this->textBox2->Location = System::Drawing::Point(56, 104);
177 32 robfinch
                        this->textBox2->Name = L"textBox2";
178
                        this->textBox2->Size = System::Drawing::Size(120, 20);
179
                        this->textBox2->TabIndex = 2;
180
                        // 
181
                        // textBox3
182
                        // 
183 35 robfinch
                        this->textBox3->Location = System::Drawing::Point(56, 130);
184 32 robfinch
                        this->textBox3->Name = L"textBox3";
185
                        this->textBox3->Size = System::Drawing::Size(120, 20);
186
                        this->textBox3->TabIndex = 3;
187
                        // 
188
                        // textBox4
189
                        // 
190 35 robfinch
                        this->textBox4->Location = System::Drawing::Point(56, 156);
191 32 robfinch
                        this->textBox4->Name = L"textBox4";
192
                        this->textBox4->Size = System::Drawing::Size(120, 20);
193
                        this->textBox4->TabIndex = 4;
194
                        // 
195
                        // textBox5
196
                        // 
197 35 robfinch
                        this->textBox5->Location = System::Drawing::Point(56, 182);
198 32 robfinch
                        this->textBox5->Name = L"textBox5";
199
                        this->textBox5->Size = System::Drawing::Size(120, 20);
200
                        this->textBox5->TabIndex = 5;
201
                        // 
202
                        // textBox6
203
                        // 
204
                        this->textBox6->Enabled = false;
205 35 robfinch
                        this->textBox6->Location = System::Drawing::Point(243, 182);
206 32 robfinch
                        this->textBox6->Name = L"textBox6";
207
                        this->textBox6->Size = System::Drawing::Size(125, 20);
208
                        this->textBox6->TabIndex = 11;
209
                        // 
210
                        // textBox7
211
                        // 
212
                        this->textBox7->Enabled = false;
213 35 robfinch
                        this->textBox7->Location = System::Drawing::Point(243, 156);
214 32 robfinch
                        this->textBox7->Name = L"textBox7";
215
                        this->textBox7->Size = System::Drawing::Size(125, 20);
216
                        this->textBox7->TabIndex = 10;
217
                        // 
218
                        // textBox8
219
                        // 
220
                        this->textBox8->Enabled = false;
221 35 robfinch
                        this->textBox8->Location = System::Drawing::Point(243, 130);
222 32 robfinch
                        this->textBox8->Name = L"textBox8";
223
                        this->textBox8->Size = System::Drawing::Size(125, 20);
224
                        this->textBox8->TabIndex = 9;
225
                        // 
226
                        // textBox9
227
                        // 
228
                        this->textBox9->Enabled = false;
229 35 robfinch
                        this->textBox9->Location = System::Drawing::Point(243, 104);
230 32 robfinch
                        this->textBox9->Name = L"textBox9";
231
                        this->textBox9->Size = System::Drawing::Size(125, 20);
232
                        this->textBox9->TabIndex = 8;
233
                        // 
234
                        // textBox10
235
                        // 
236
                        this->textBox10->Enabled = false;
237 35 robfinch
                        this->textBox10->Location = System::Drawing::Point(243, 78);
238 32 robfinch
                        this->textBox10->Name = L"textBox10";
239
                        this->textBox10->Size = System::Drawing::Size(125, 20);
240
                        this->textBox10->TabIndex = 7;
241
                        // 
242
                        // label2
243
                        // 
244
                        this->label2->AutoSize = true;
245
                        this->label2->Enabled = false;
246 35 robfinch
                        this->label2->Location = System::Drawing::Point(240, 51);
247 32 robfinch
                        this->label2->Name = L"label2";
248
                        this->label2->Size = System::Drawing::Size(30, 13);
249
                        this->label2->TabIndex = 6;
250
                        this->label2->Text = L"Data";
251
                        // 
252
                        // button25
253
                        // 
254
                        this->button25->DialogResult = System::Windows::Forms::DialogResult::OK;
255 35 robfinch
                        this->button25->Location = System::Drawing::Point(293, 227);
256 32 robfinch
                        this->button25->Name = L"button25";
257
                        this->button25->Size = System::Drawing::Size(75, 23);
258
                        this->button25->TabIndex = 35;
259
                        this->button25->Text = L"OK";
260
                        this->button25->UseVisualStyleBackColor = true;
261
                        this->button25->Click += gcnew System::EventHandler(this, &frmBreakpoints::button25_Click);
262
                        // 
263
                        // button26
264
                        // 
265
                        this->button26->DialogResult = System::Windows::Forms::DialogResult::Cancel;
266 35 robfinch
                        this->button26->Location = System::Drawing::Point(180, 227);
267 32 robfinch
                        this->button26->Name = L"button26";
268
                        this->button26->Size = System::Drawing::Size(75, 23);
269
                        this->button26->TabIndex = 36;
270
                        this->button26->Text = L"Cancel";
271
                        this->button26->UseVisualStyleBackColor = true;
272
                        // 
273
                        // checkBox1
274
                        // 
275
                        this->checkBox1->AutoSize = true;
276 35 robfinch
                        this->checkBox1->Location = System::Drawing::Point(20, 78);
277 32 robfinch
                        this->checkBox1->Name = L"checkBox1";
278
                        this->checkBox1->Size = System::Drawing::Size(15, 14);
279
                        this->checkBox1->TabIndex = 37;
280
                        this->checkBox1->UseVisualStyleBackColor = true;
281
                        this->checkBox1->CheckedChanged += gcnew System::EventHandler(this, &frmBreakpoints::checkBox1_CheckedChanged);
282
                        // 
283
                        // checkBox2
284
                        // 
285
                        this->checkBox2->AutoSize = true;
286 35 robfinch
                        this->checkBox2->Location = System::Drawing::Point(20, 104);
287 32 robfinch
                        this->checkBox2->Name = L"checkBox2";
288
                        this->checkBox2->Size = System::Drawing::Size(15, 14);
289
                        this->checkBox2->TabIndex = 38;
290
                        this->checkBox2->UseVisualStyleBackColor = true;
291
                        // 
292
                        // checkBox3
293
                        // 
294
                        this->checkBox3->AutoSize = true;
295 35 robfinch
                        this->checkBox3->Location = System::Drawing::Point(20, 130);
296 32 robfinch
                        this->checkBox3->Name = L"checkBox3";
297
                        this->checkBox3->Size = System::Drawing::Size(15, 14);
298
                        this->checkBox3->TabIndex = 39;
299
                        this->checkBox3->UseVisualStyleBackColor = true;
300
                        // 
301
                        // checkBox4
302
                        // 
303
                        this->checkBox4->AutoSize = true;
304 35 robfinch
                        this->checkBox4->Location = System::Drawing::Point(20, 156);
305 32 robfinch
                        this->checkBox4->Name = L"checkBox4";
306
                        this->checkBox4->Size = System::Drawing::Size(15, 14);
307
                        this->checkBox4->TabIndex = 40;
308
                        this->checkBox4->UseVisualStyleBackColor = true;
309
                        // 
310
                        // checkBox5
311
                        // 
312
                        this->checkBox5->AutoSize = true;
313
                        this->checkBox5->Enabled = false;
314 35 robfinch
                        this->checkBox5->Location = System::Drawing::Point(209, 104);
315 32 robfinch
                        this->checkBox5->Name = L"checkBox5";
316
                        this->checkBox5->Size = System::Drawing::Size(15, 14);
317
                        this->checkBox5->TabIndex = 41;
318
                        this->checkBox5->UseVisualStyleBackColor = true;
319
                        // 
320
                        // checkBox6
321
                        // 
322
                        this->checkBox6->AutoSize = true;
323 35 robfinch
                        this->checkBox6->Location = System::Drawing::Point(20, 182);
324 32 robfinch
                        this->checkBox6->Name = L"checkBox6";
325
                        this->checkBox6->Size = System::Drawing::Size(15, 14);
326
                        this->checkBox6->TabIndex = 41;
327
                        this->checkBox6->UseVisualStyleBackColor = true;
328
                        // 
329
                        // checkBox7
330
                        // 
331
                        this->checkBox7->AutoSize = true;
332
                        this->checkBox7->Enabled = false;
333 35 robfinch
                        this->checkBox7->Location = System::Drawing::Point(209, 78);
334 32 robfinch
                        this->checkBox7->Name = L"checkBox7";
335
                        this->checkBox7->Size = System::Drawing::Size(15, 14);
336
                        this->checkBox7->TabIndex = 42;
337
                        this->checkBox7->UseVisualStyleBackColor = true;
338
                        // 
339
                        // checkBox8
340
                        // 
341
                        this->checkBox8->AutoSize = true;
342
                        this->checkBox8->Enabled = false;
343 35 robfinch
                        this->checkBox8->Location = System::Drawing::Point(209, 130);
344 32 robfinch
                        this->checkBox8->Name = L"checkBox8";
345
                        this->checkBox8->Size = System::Drawing::Size(15, 14);
346
                        this->checkBox8->TabIndex = 43;
347
                        this->checkBox8->UseVisualStyleBackColor = true;
348
                        // 
349
                        // checkBox9
350
                        // 
351
                        this->checkBox9->AutoSize = true;
352
                        this->checkBox9->Enabled = false;
353 35 robfinch
                        this->checkBox9->Location = System::Drawing::Point(209, 156);
354 32 robfinch
                        this->checkBox9->Name = L"checkBox9";
355
                        this->checkBox9->Size = System::Drawing::Size(15, 14);
356
                        this->checkBox9->TabIndex = 44;
357
                        this->checkBox9->UseVisualStyleBackColor = true;
358
                        // 
359
                        // checkBox10
360
                        // 
361
                        this->checkBox10->AutoSize = true;
362
                        this->checkBox10->Enabled = false;
363 35 robfinch
                        this->checkBox10->Location = System::Drawing::Point(209, 182);
364 32 robfinch
                        this->checkBox10->Name = L"checkBox10";
365
                        this->checkBox10->Size = System::Drawing::Size(15, 14);
366
                        this->checkBox10->TabIndex = 45;
367
                        this->checkBox10->UseVisualStyleBackColor = true;
368
                        // 
369
                        // label3
370
                        // 
371
                        this->label3->AutoSize = true;
372
                        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)),
373
                                static_cast<System::Int32>(static_cast<System::Byte>(0)));
374 35 robfinch
                        this->label3->Location = System::Drawing::Point(240, 31);
375 32 robfinch
                        this->label3->Name = L"label3";
376
                        this->label3->Size = System::Drawing::Size(158, 13);
377
                        this->label3->TabIndex = 46;
378
                        this->label3->Text = L"Data Breakpoints don\'t work yet";
379
                        // 
380 35 robfinch
                        // label4
381
                        // 
382
                        this->label4->AutoSize = true;
383
                        this->label4->Location = System::Drawing::Point(17, 51);
384
                        this->label4->Name = L"label4";
385
                        this->label4->Size = System::Drawing::Size(20, 13);
386
                        this->label4->TabIndex = 47;
387
                        this->label4->Text = L"En";
388
                        // 
389 32 robfinch
                        // frmBreakpoints
390
                        // 
391
                        this->AutoScaleDimensions = System::Drawing::SizeF(6, 13);
392
                        this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
393 35 robfinch
                        this->ClientSize = System::Drawing::Size(403, 259);
394
                        this->Controls->Add(this->label4);
395 32 robfinch
                        this->Controls->Add(this->label3);
396
                        this->Controls->Add(this->checkBox10);
397
                        this->Controls->Add(this->checkBox9);
398
                        this->Controls->Add(this->checkBox8);
399
                        this->Controls->Add(this->checkBox7);
400
                        this->Controls->Add(this->checkBox6);
401
                        this->Controls->Add(this->checkBox5);
402
                        this->Controls->Add(this->checkBox4);
403
                        this->Controls->Add(this->checkBox3);
404
                        this->Controls->Add(this->checkBox2);
405
                        this->Controls->Add(this->checkBox1);
406
                        this->Controls->Add(this->button26);
407
                        this->Controls->Add(this->button25);
408
                        this->Controls->Add(this->textBox6);
409
                        this->Controls->Add(this->textBox7);
410
                        this->Controls->Add(this->textBox8);
411
                        this->Controls->Add(this->textBox9);
412
                        this->Controls->Add(this->textBox10);
413
                        this->Controls->Add(this->label2);
414
                        this->Controls->Add(this->textBox5);
415
                        this->Controls->Add(this->textBox4);
416
                        this->Controls->Add(this->textBox3);
417
                        this->Controls->Add(this->textBox2);
418
                        this->Controls->Add(this->textBox1);
419
                        this->Controls->Add(this->label1);
420
                        this->FormBorderStyle = System::Windows::Forms::FormBorderStyle::FixedSingle;
421
                        this->Name = L"frmBreakpoints";
422
                        this->Text = L"emuThor - Breakpoints";
423 35 robfinch
                        this->FormClosing += gcnew System::Windows::Forms::FormClosingEventHandler(this, &frmBreakpoints::frmBreakpoints_FormClosing);
424 32 robfinch
                        this->ResumeLayout(false);
425
                        this->PerformLayout();
426
 
427
                }
428
#pragma endregion
429
        private: System::Void button13_Click(System::Object^  sender, System::EventArgs^  e) {
430
                         }
431
private: System::Void button6_Click(System::Object^  sender, System::EventArgs^  e) {
432
                 }
433
private: System::Void checkBox1_CheckedChanged(System::Object^  sender, System::EventArgs^  e) {
434
                 }
435
private: System::Void button25_Click(System::Object^  sender, System::EventArgs^  e) {
436
                         char *str;
437
                         char buf1[20];
438
                         char buf2[20];
439
                         char *ep;
440
 
441
                         mut->WaitOne();
442
                         ib_active[0] = checkBox1->Checked;
443
                         ib_active[1] = checkBox2->Checked;
444
                         ib_active[2] = checkBox3->Checked;
445
                         ib_active[3] = checkBox4->Checked;
446
                         ib_active[4] = checkBox6->Checked;
447
                         db_active[0] = checkBox7->Checked;
448
                         db_active[1] = checkBox5->Checked;
449
                         db_active[2] = checkBox8->Checked;
450
                         db_active[3] = checkBox9->Checked;
451
                         db_active[4] = checkBox10->Checked;
452
                         str = (char*)(void*)Marshal::StringToHGlobalAnsi(this->textBox1->Text);
453
                         ibreakpoints[0] = _strtoui64(str, &ep, 16);
454
                         str = (char*)(void*)Marshal::StringToHGlobalAnsi(this->textBox2->Text);
455
                         ibreakpoints[1] = _strtoui64(str, &ep, 16);
456
                         str = (char*)(void*)Marshal::StringToHGlobalAnsi(this->textBox3->Text);
457
                         ibreakpoints[2] = _strtoui64(str, &ep, 16);
458
                         str = (char*)(void*)Marshal::StringToHGlobalAnsi(this->textBox4->Text);
459
                         ibreakpoints[3] = _strtoui64(str, &ep, 16);
460
                         str = (char*)(void*)Marshal::StringToHGlobalAnsi(this->textBox5->Text);
461
                         ibreakpoints[4] = _strtoui64(str, &ep, 16);
462
                         mut->ReleaseMutex();
463
                 }
464 35 robfinch
private: System::Void frmBreakpoints_FormClosing(System::Object^  sender, System::Windows::Forms::FormClosingEventArgs^  e) {
465
                         if (e->CloseReason==CloseReason::UserClosing)
466
                                 e->Cancel = true;
467
                 }
468 32 robfinch
};
469
}

powered by: WebSVN 2.1.0

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