📄 form1.h
字号:
this->euroEntry->Size = System::Drawing::Size(578, 306);
this->euroEntry->SplitterDistance = 192;
this->euroEntry->TabIndex = 0;
//
// euroValues
//
this->euroValues->Controls->Add(this->euroValue5);
this->euroValues->Controls->Add(this->euroValue4);
this->euroValues->Controls->Add(this->euroValue3);
this->euroValues->Controls->Add(this->euroValue2);
this->euroValues->Controls->Add(this->euroValue1);
this->euroValues->Dock = System::Windows::Forms::DockStyle::Fill;
this->euroValues->Location = System::Drawing::Point(0, 0);
this->euroValues->Name = L"euroValues";
this->euroValues->Size = System::Drawing::Size(578, 192);
this->euroValues->TabIndex = 0;
this->euroValues->TabStop = false;
this->euroValues->Text = L"Values 1 to 50";
//
// euroValue5
//
this->euroValue5->BackColor = System::Drawing::Color::Silver;
this->euroValue5->ContextMenuStrip = this->buttonContextMenu;
this->euroValue5->Location = System::Drawing::Point(418, 141);
this->euroValue5->Name = L"euroValue5";
this->euroValue5->Size = System::Drawing::Size(75, 23);
this->euroValue5->TabIndex = 0;
this->euroValue5->Text = L"5";
this->euroValue5->UseVisualStyleBackColor = false;
this->euroValue5->Click += gcnew System::EventHandler(this, &Form1::euroValue_Click);
//
// euroValue4
//
this->euroValue4->BackColor = System::Drawing::Color::Silver;
this->euroValue4->ContextMenuStrip = this->buttonContextMenu;
this->euroValue4->Location = System::Drawing::Point(85, 141);
this->euroValue4->Name = L"euroValue4";
this->euroValue4->Size = System::Drawing::Size(75, 23);
this->euroValue4->TabIndex = 0;
this->euroValue4->Text = L"4";
this->euroValue4->UseVisualStyleBackColor = false;
this->euroValue4->Click += gcnew System::EventHandler(this, &Form1::euroValue_Click);
//
// euroValue3
//
this->euroValue3->BackColor = System::Drawing::Color::Silver;
this->euroValue3->ContextMenuStrip = this->buttonContextMenu;
this->euroValue3->Location = System::Drawing::Point(418, 41);
this->euroValue3->Name = L"euroValue3";
this->euroValue3->Size = System::Drawing::Size(75, 23);
this->euroValue3->TabIndex = 0;
this->euroValue3->Text = L"3";
this->euroValue3->UseVisualStyleBackColor = false;
this->euroValue3->Click += gcnew System::EventHandler(this, &Form1::euroValue_Click);
//
// euroValue2
//
this->euroValue2->BackColor = System::Drawing::Color::Silver;
this->euroValue2->ContextMenuStrip = this->buttonContextMenu;
this->euroValue2->Location = System::Drawing::Point(242, 91);
this->euroValue2->Name = L"euroValue2";
this->euroValue2->Size = System::Drawing::Size(75, 23);
this->euroValue2->TabIndex = 0;
this->euroValue2->Text = L"2";
this->euroValue2->UseVisualStyleBackColor = false;
this->euroValue2->Click += gcnew System::EventHandler(this, &Form1::euroValue_Click);
//
// euroValue1
//
this->euroValue1->BackColor = System::Drawing::Color::Silver;
this->euroValue1->ContextMenuStrip = this->buttonContextMenu;
this->euroValue1->Location = System::Drawing::Point(85, 41);
this->euroValue1->Name = L"euroValue1";
this->euroValue1->Size = System::Drawing::Size(75, 23);
this->euroValue1->TabIndex = 0;
this->euroValue1->Text = L"1";
this->euroValue1->UseVisualStyleBackColor = false;
this->euroValue1->Click += gcnew System::EventHandler(this, &Form1::euroValue_Click);
//
// euroStars
//
this->euroStars->Controls->Add(this->euroStar2);
this->euroStars->Controls->Add(this->euroStar1);
this->euroStars->Dock = System::Windows::Forms::DockStyle::Fill;
this->euroStars->Location = System::Drawing::Point(0, 0);
this->euroStars->Name = L"euroStars";
this->euroStars->Size = System::Drawing::Size(578, 110);
this->euroStars->TabIndex = 0;
this->euroStars->TabStop = false;
this->euroStars->Text = L"Values 1 to 9";
//
// euroStar2
//
this->euroStar2->BackColor = System::Drawing::Color::Gold;
this->euroStar2->ContextMenuStrip = this->buttonContextMenu;
this->euroStar2->Location = System::Drawing::Point(418, 47);
this->euroStar2->Name = L"euroStar2";
this->euroStar2->Size = System::Drawing::Size(75, 23);
this->euroStar2->TabIndex = 1;
this->euroStar2->Text = L"2";
this->euroStar2->UseVisualStyleBackColor = false;
this->euroStar2->Click += gcnew System::EventHandler(this, &Form1::euroStarClick);
//
// euroStar1
//
this->euroStar1->BackColor = System::Drawing::Color::Gold;
this->euroStar1->ContextMenuStrip = this->buttonContextMenu;
this->euroStar1->Location = System::Drawing::Point(85, 47);
this->euroStar1->Name = L"euroStar1";
this->euroStar1->Size = System::Drawing::Size(75, 23);
this->euroStar1->TabIndex = 0;
this->euroStar1->Text = L"1";
this->euroStar1->UseVisualStyleBackColor = false;
this->euroStar1->Click += gcnew System::EventHandler(this, &Form1::euroStarClick);
//
// webTab
//
this->webTab->Controls->Add(this->webBrowser);
this->webTab->Location = System::Drawing::Point(4, 22);
this->webTab->Name = L"webTab";
this->webTab->Padding = System::Windows::Forms::Padding(3);
this->webTab->Size = System::Drawing::Size(584, 312);
this->webTab->TabIndex = 2;
this->webTab->Text = L"Web Page";
this->webTab->UseVisualStyleBackColor = true;
//
// webBrowser
//
this->webBrowser->Dock = System::Windows::Forms::DockStyle::Fill;
this->webBrowser->Location = System::Drawing::Point(3, 3);
this->webBrowser->MinimumSize = System::Drawing::Size(20, 20);
this->webBrowser->Name = L"webBrowser";
this->webBrowser->Size = System::Drawing::Size(578, 306);
this->webBrowser->TabIndex = 0;
this->webBrowser->Url = (gcnew System::Uri(L"http://www.national-lottery.co.uk", System::UriKind::Absolute));
//
// Form1
//
this->AutoScaleDimensions = System::Drawing::SizeF(6, 13);
this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
this->ClientSize = System::Drawing::Size(592, 362);
this->Controls->Add(this->tabControl1);
this->Controls->Add(this->menuStrip1);
this->MainMenuStrip = this->menuStrip1;
this->Name = L"Form1";
this->Text = L"A Winning Application";
this->menuStrip1->ResumeLayout(false);
this->menuStrip1->PerformLayout();
this->tabControl1->ResumeLayout(false);
this->buttonContextMenu->ResumeLayout(false);
this->lottoTab->ResumeLayout(false);
this->lottoValues->ResumeLayout(false);
this->euroTab->ResumeLayout(false);
this->euroEntry->Panel1->ResumeLayout(false);
this->euroEntry->Panel2->ResumeLayout(false);
this->euroEntry->ResumeLayout(false);
this->euroValues->ResumeLayout(false);
this->euroStars->ResumeLayout(false);
this->webTab->ResumeLayout(false);
this->ResumeLayout(false);
this->PerformLayout();
}
#pragma endregion
private:
System::Void playMenuItem_Click(System::Object^ sender, System::EventArgs^ e)
{
array<int>^ values; // Variable to store a handle to array of integers
if(lottoTab->Visible)
{
// Generate and set values for Lotto entry
values = gcnew array<int>(lottoValuesCount); // Create the array
GetValues(values, lottoUserMinimum, lottoUserMaximum); // Generate values
SetValues(values, lottoValues);
}
else if(euroTab->Visible)
{
// Generate and set values for Euromillions entry
values = gcnew array<int>(euroValuesCount);
GetValues(values, euroUserMinimum, euroUserMaximum);
SetValues(values, euroValues);
values = gcnew array<int>(euroStarsCount);
GetValues(values, euroStarsUserMinimum, euroStarsUserMaximum);
SetValues(values, euroStars);
}
}
private:
System::Void upperMenuItem_Click(System::Object^ sender, System::EventArgs^ e)
{
::DialogResult result;
if(lottoTab->Visible)
{
lottoLimitsDialog->SetUpperEnabled();
result = lottoLimitsDialog->ShowDialog(this);
if(result == ::DialogResult::OK)
{
lottoUserMaximum = lottoLimitsDialog->UpperLimit;
lottoUserMinimum = lottoLimitsDialog->LowerLimit;
}
}
else if(euroTab->Visible)
{
euroLimitsDialog->SetUpperEnabled();
result = euroLimitsDialog->ShowDialog(this);
if(result == ::DialogResult::OK)
{
euroUserMaximum = euroLimitsDialog->UpperValuesLimit;
euroUserMinimum = euroLimitsDialog->LowerValuesLimit;
euroStarsUserMaximum = euroLimitsDialog->UpperStarsLimit;
euroStarsUserMinimum = euroLimitsDialog->LowerStarsLimit;
}
}
}
private:
System::Void lowerMenuItem_Click(System::Object^ sender, System::EventArgs^ e)
{
::DialogResult result;
if(lottoTab->Visible)
{
lottoLimitsDialog->SetLowerEnabled();
::DialogResult result = lottoLimitsDialog->ShowDialog(this);
if(result == ::DialogResult::OK)
{
// Update user limits from dialog properties
lottoUserMaximum = lottoLimitsDialog->UpperLimit;
lottoUserMinimum = lottoLimitsDialog->LowerLimit;
}
}
else if(euroTab->Visible)
{
euroLimitsDialog->SetLowerEnabled();
result = euroLimitsDialog->ShowDialog(this);
if(result == ::DialogResult::OK)
{
euroUserMaximum = euroLimitsDialog->UpperValuesLimit;
euroUserMinimum = euroLimitsDialog->LowerValuesLimit;
euroStarsUserMaximum = euroLimitsDialog->UpperStarsLimit;
euroStarsUserMinimum = euroLimitsDialog->LowerStarsLimit;
}
}
}
private:
System::Void aboutMenuItem_Click(System::Object^ sender, System::EventArgs^ e)
{
MessageBox::Show(L"
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -