1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
| #include <Windows.h>
#include <stdlib.h>
#pragma once
#pragma comment (lib, "winmm.lib")
char z;
namespace Pad {
using namespace System;
using namespace System::ComponentModel;
using namespace System::Collections;
using namespace System::Windows::Forms;
using namespace System::Data;
using namespace System::Drawing;
/// <summary>
/// Сводка для Form1
/// </summary>
public ref class Form1 : public System::Windows::Forms::Form
{
public:
Form1(void)
{
InitializeComponent();
//
//TODO: добавьте код конструктора
//
}
protected:
/// <summary>
/// Освободить все используемые ресурсы.
/// </summary>
~Form1()
{
if (components)
{
delete components;
}
}
private: System::Windows::Forms::PictureBox^ pictureBox2;
protected:
private: System::Windows::Forms::Timer^ timer1;
private: System::Windows::Forms::PictureBox^ pictureBox1;
private: System::Windows::Forms::ContextMenuStrip^ contextMenuStrip1;
private: System::Windows::Forms::ToolStripMenuItem^ барабаныToolStripMenuItem;
private: System::Windows::Forms::ToolStripMenuItem^ тимпаныToolStripMenuItem;
private: System::Windows::Forms::ToolStripMenuItem^ snareToolStripMenuItem;
private: System::Windows::Forms::ToolStripMenuItem^ dJНаборToolStripMenuItem;
private: System::Windows::Forms::ToolStripMenuItem^ originalToolStripMenuItem;
private: System::Windows::Forms::PictureBox^ pictureBox3;
private: System::Windows::Forms::PictureBox^ pictureBox4;
private: System::Windows::Forms::PictureBox^ pictureBox5;
private: System::Windows::Forms::PictureBox^ pictureBox6;
private: System::Windows::Forms::PictureBox^ pictureBox7;
private: System::Windows::Forms::PictureBox^ pictureBox8;
private: System::ComponentModel::IContainer^ components;
protected:
protected:
private:
/// <summary>
/// Требуется переменная конструктора.
/// </summary>
#pragma region Windows Form Designer generated code
/// <summary>
/// Обязательный метод для поддержки конструктора - не изменяйте
/// содержимое данного метода при помощи редактора кода.
/// </summary>
void InitializeComponent(void)
{
this->components = (gcnew System::ComponentModel::Container());
System::ComponentModel::ComponentResourceManager^ resources = (gcnew System::ComponentModel::ComponentResourceManager(Form1::typeid));
this->pictureBox2 = (gcnew System::Windows::Forms::PictureBox());
this->timer1 = (gcnew System::Windows::Forms::Timer(this->components));
this->pictureBox1 = (gcnew System::Windows::Forms::PictureBox());
this->contextMenuStrip1 = (gcnew System::Windows::Forms::ContextMenuStrip(this->components));
this->барабаныToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
this->тимпаныToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
this->snareToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
this->dJНаборToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
this->originalToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
this->pictureBox3 = (gcnew System::Windows::Forms::PictureBox());
this->pictureBox4 = (gcnew System::Windows::Forms::PictureBox());
this->pictureBox5 = (gcnew System::Windows::Forms::PictureBox());
this->pictureBox6 = (gcnew System::Windows::Forms::PictureBox());
this->pictureBox7 = (gcnew System::Windows::Forms::PictureBox());
this->pictureBox8 = (gcnew System::Windows::Forms::PictureBox());
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->pictureBox2))->BeginInit();
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->pictureBox1))->BeginInit();
this->contextMenuStrip1->SuspendLayout();
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->pictureBox3))->BeginInit();
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->pictureBox4))->BeginInit();
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->pictureBox5))->BeginInit();
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->pictureBox6))->BeginInit();
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->pictureBox7))->BeginInit();
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->pictureBox8))->BeginInit();
this->SuspendLayout();
//
// pictureBox2
//
this->pictureBox2->BackColor = System::Drawing::Color::Transparent;
this->pictureBox2->ImageLocation = L"";
this->pictureBox2->InitialImage = nullptr;
this->pictureBox2->Location = System::Drawing::Point(279, 41);
this->pictureBox2->Name = L"pictureBox2";
this->pictureBox2->Size = System::Drawing::Size(217, 256);
this->pictureBox2->SizeMode = System::Windows::Forms::PictureBoxSizeMode::Zoom;
this->pictureBox2->TabIndex = 1;
this->pictureBox2->TabStop = false;
this->pictureBox2->Click += gcnew System::EventHandler(this, &Form1::pictureBox2_Click);
//
// timer1
//
this->timer1->Interval = 500;
this->timer1->Tick += gcnew System::EventHandler(this, &Form1::timer1_Tick);
//
// pictureBox1
//
this->pictureBox1->BackColor = System::Drawing::Color::Transparent;
this->pictureBox1->ImageLocation = L"";
this->pictureBox1->InitialImage = nullptr;
this->pictureBox1->Location = System::Drawing::Point(47, 41);
this->pictureBox1->Name = L"pictureBox1";
this->pictureBox1->Size = System::Drawing::Size(217, 256);
this->pictureBox1->SizeMode = System::Windows::Forms::PictureBoxSizeMode::Zoom;
this->pictureBox1->TabIndex = 2;
this->pictureBox1->TabStop = false;
//
// contextMenuStrip1
//
this->contextMenuStrip1->Items->AddRange(gcnew cli::array< System::Windows::Forms::ToolStripItem^ >(5) {this->барабаныToolStripMenuItem,
this->тимпаныToolStripMenuItem, this->snareToolStripMenuItem, this->dJНаборToolStripMenuItem, this->originalToolStripMenuItem});
this->contextMenuStrip1->Name = L"contextMenuStrip1";
this->contextMenuStrip1->Size = System::Drawing::Size(153, 136);
//
// барабаныToolStripMenuItem
//
this->барабаныToolStripMenuItem->Name = L"барабаныToolStripMenuItem";
this->барабаныToolStripMenuItem->Size = System::Drawing::Size(152, 22);
this->барабаныToolStripMenuItem->Text = L"Барабаны";
this->барабаныToolStripMenuItem->Click += gcnew System::EventHandler(this, &Form1::барабаныToolStripMenuItem_Click);
//
// тимпаныToolStripMenuItem
//
this->тимпаныToolStripMenuItem->Name = L"тимпаныToolStripMenuItem";
this->тимпаныToolStripMenuItem->Size = System::Drawing::Size(152, 22);
this->тимпаныToolStripMenuItem->Text = L"Тимпаны";
this->тимпаныToolStripMenuItem->Click += gcnew System::EventHandler(this, &Form1::тимпаныToolStripMenuItem_Click);
//
// snareToolStripMenuItem
//
this->snareToolStripMenuItem->Name = L"snareToolStripMenuItem";
this->snareToolStripMenuItem->Size = System::Drawing::Size(152, 22);
this->snareToolStripMenuItem->Text = L"Snare";
this->snareToolStripMenuItem->Click += gcnew System::EventHandler(this, &Form1::snareToolStripMenuItem_Click);
//
// dJНаборToolStripMenuItem
//
this->dJНаборToolStripMenuItem->Name = L"dJНаборToolStripMenuItem";
this->dJНаборToolStripMenuItem->Size = System::Drawing::Size(152, 22);
this->dJНаборToolStripMenuItem->Text = L"DJ набор";
this->dJНаборToolStripMenuItem->Click += gcnew System::EventHandler(this, &Form1::dJНаборToolStripMenuItem_Click);
//
// originalToolStripMenuItem
//
this->originalToolStripMenuItem->Name = L"originalToolStripMenuItem";
this->originalToolStripMenuItem->Size = System::Drawing::Size(152, 22);
this->originalToolStripMenuItem->Text = L"Original";
this->originalToolStripMenuItem->Click += gcnew System::EventHandler(this, &Form1::originalToolStripMenuItem_Click);
//
// pictureBox3
//
this->pictureBox3->BackColor = System::Drawing::Color::Transparent;
this->pictureBox3->ImageLocation = L"";
this->pictureBox3->InitialImage = nullptr;
this->pictureBox3->Location = System::Drawing::Point(502, 41);
this->pictureBox3->Name = L"pictureBox3";
this->pictureBox3->Size = System::Drawing::Size(217, 256);
this->pictureBox3->SizeMode = System::Windows::Forms::PictureBoxSizeMode::Zoom;
this->pictureBox3->TabIndex = 3;
this->pictureBox3->TabStop = false;
this->pictureBox3->Click += gcnew System::EventHandler(this, &Form1::pictureBox3_Click);
//
// pictureBox4
//
this->pictureBox4->BackColor = System::Drawing::Color::Transparent;
this->pictureBox4->ImageLocation = L"";
this->pictureBox4->InitialImage = nullptr;
this->pictureBox4->Location = System::Drawing::Point(728, 41);
this->pictureBox4->Name = L"pictureBox4";
this->pictureBox4->Size = System::Drawing::Size(217, 256);
this->pictureBox4->SizeMode = System::Windows::Forms::PictureBoxSizeMode::Zoom;
this->pictureBox4->TabIndex = 4;
this->pictureBox4->TabStop = false;
//
// pictureBox5
//
this->pictureBox5->BackColor = System::Drawing::Color::Transparent;
this->pictureBox5->ImageLocation = L"";
this->pictureBox5->InitialImage = nullptr;
this->pictureBox5->Location = System::Drawing::Point(733, 308);
this->pictureBox5->Name = L"pictureBox5";
this->pictureBox5->Size = System::Drawing::Size(217, 256);
this->pictureBox5->SizeMode = System::Windows::Forms::PictureBoxSizeMode::Zoom;
this->pictureBox5->TabIndex = 8;
this->pictureBox5->TabStop = false;
//
// pictureBox6
//
this->pictureBox6->BackColor = System::Drawing::Color::Transparent;
this->pictureBox6->ImageLocation = L"";
this->pictureBox6->InitialImage = nullptr;
this->pictureBox6->Location = System::Drawing::Point(507, 308);
this->pictureBox6->Name = L"pictureBox6";
this->pictureBox6->Size = System::Drawing::Size(217, 256);
this->pictureBox6->SizeMode = System::Windows::Forms::PictureBoxSizeMode::Zoom;
this->pictureBox6->TabIndex = 7;
this->pictureBox6->TabStop = false;
//
// pictureBox7
//
this->pictureBox7->BackColor = System::Drawing::Color::Transparent;
this->pictureBox7->ImageLocation = L"";
this->pictureBox7->InitialImage = nullptr;
this->pictureBox7->Location = System::Drawing::Point(284, 308);
this->pictureBox7->Name = L"pictureBox7";
this->pictureBox7->Size = System::Drawing::Size(217, 256);
this->pictureBox7->SizeMode = System::Windows::Forms::PictureBoxSizeMode::Zoom;
this->pictureBox7->TabIndex = 5;
this->pictureBox7->TabStop = false;
//
// pictureBox8
//
this->pictureBox8->BackColor = System::Drawing::Color::Transparent;
this->pictureBox8->ImageLocation = L"";
this->pictureBox8->InitialImage = nullptr;
this->pictureBox8->Location = System::Drawing::Point(52, 308);
this->pictureBox8->Name = L"pictureBox8";
this->pictureBox8->Size = System::Drawing::Size(217, 256);
this->pictureBox8->SizeMode = System::Windows::Forms::PictureBoxSizeMode::Zoom;
this->pictureBox8->TabIndex = 6;
this->pictureBox8->TabStop = false;
//
// Form1
//
this->AutoScaleDimensions = System::Drawing::SizeF(6, 13);
this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
this->BackColor = System::Drawing::SystemColors::Window;
this->BackgroundImage = (cli::safe_cast<System::Drawing::Image^ >(resources->GetObject(L"$this.BackgroundImage")));
this->BackgroundImageLayout = System::Windows::Forms::ImageLayout::Zoom;
this->ClientSize = System::Drawing::Size(995, 604);
this->Controls->Add(this->pictureBox5);
this->Controls->Add(this->pictureBox6);
this->Controls->Add(this->pictureBox7);
this->Controls->Add(this->pictureBox8);
this->Controls->Add(this->pictureBox4);
this->Controls->Add(this->pictureBox3);
this->Controls->Add(this->pictureBox2);
this->Controls->Add(this->pictureBox1);
this->FormBorderStyle = System::Windows::Forms::FormBorderStyle::None;
this->Name = L"Form1";
this->StartPosition = System::Windows::Forms::FormStartPosition::CenterScreen;
this->Text = L"q";
this->Load += gcnew System::EventHandler(this, &Form1::Form1_Load);
this->KeyPress += gcnew System::Windows::Forms::KeyPressEventHandler(this, &Form1::Form1_KeyPress);
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->pictureBox2))->EndInit();
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->pictureBox1))->EndInit();
this->contextMenuStrip1->ResumeLayout(false);
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->pictureBox3))->EndInit();
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->pictureBox4))->EndInit();
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->pictureBox5))->EndInit();
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->pictureBox6))->EndInit();
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->pictureBox7))->EndInit();
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->pictureBox8))->EndInit();
this->ResumeLayout(false);
}
#pragma endregion
private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e)
{
}
private: System::Void Form1_Load(System::Object^ sender, System::EventArgs^ e) {
}
private: System::Void pictureBox2_Click(System::Object^ sender, System::EventArgs^ e)
{
exit(1);
}
private: System::Void Form1_KeyPress(System::Object^ sender, System::Windows::Forms::KeyPressEventArgs^ e)
{
switch (e->KeyChar)
{
case 'q':
pictureBox2->Image=pictureBox1->Image->FromFile("buttons\\123.png");
mciSendString(L"play "+z+" (1).wav", NULL, 0, NULL);
timer1->Enabled = true;
break;
case 'w':
pictureBox1->Image=pictureBox1->Image->FromFile("buttons\\123.png");
mciSendString(L"play "+z+" (2).wav", NULL, 0, NULL);
timer1->Enabled = true;
break;
case 'e':
pictureBox1->Image=pictureBox1->Image->FromFile("buttons\\123.png");
mciSendString(L"play "+z+" (3).wav", NULL, 0, NULL);
timer1->Enabled = true;
break;
case 'r':
pictureBox1->Image=pictureBox1->Image->FromFile("buttons\\123.png");
mciSendString(L"play "+z+" (4).wav", NULL, 0, NULL);
timer1->Enabled = true;
break;
case 'a':
pictureBox1->Image=pictureBox1->Image->FromFile("buttons\\123.png");
mciSendString(L"play "+z+" (5).wav", NULL, 0, NULL);
timer1->Enabled = true;
break;
case 's':
pictureBox1->Image=pictureBox1->Image->FromFile("buttons\\123.png");
mciSendString(L"play "+z+" (6).wav", NULL, 0, NULL);
timer1->Enabled = true;
break;
case 'd':
pictureBox1->Image=pictureBox1->Image->FromFile("buttons\\123.png");
mciSendString(L"play "+z+" (7).wav", NULL, 0, NULL);
timer1->Enabled = true;
break;
case 'f':
pictureBox1->Image=pictureBox1->Image->FromFile("buttons\\123.png");
mciSendString(L"play "+z+" (8).wav", NULL, 0, NULL);
timer1->Enabled = true;
break;
}
}
private: System::Void timer1_Tick(System::Object^ sender, System::EventArgs^ e)
{
pictureBox2->Image = nullptr;
pictureBox1->Image = nullptr;
pictureBox3->Image = nullptr;
pictureBox4->Image = nullptr;
pictureBox5->Image = nullptr;
pictureBox6->Image = nullptr;
pictureBox7->Image = nullptr;
pictureBox8->Image = nullptr;
}
private: System::Void originalToolStripMenuItem_Click(System::Object^ sender, System::EventArgs^ e) {
}
private: System::Void pictureBox3_Click(System::Object^ sender, System::EventArgs^ e) {
}
private: System::Void барабаныToolStripMenuItem_Click(System::Object^ sender, System::EventArgs^ e)
{
z = "b";
}
private: System::Void тимпаныToolStripMenuItem_Click(System::Object^ sender, System::EventArgs^ e)
{
z = "ts";
}
private: System::Void snareToolStripMenuItem_Click(System::Object^ sender, System::EventArgs^ e)
{
z = "sn";
}
private: System::Void dJНаборToolStripMenuItem_Click(System::Object^ sender, System::EventArgs^ e)
{
z = "dj";
}
};
} |