⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 form1.h

📁 This rar contains code from every chapter of Wrox.Ivor.Hortons.Beginning.Visual.C.Plus.Plus.2008.Mar
💻 H
📖 第 1 页 / 共 5 页
字号:
      // 
      // redToolStripButton
      // 
      this->redToolStripButton->DisplayStyle = System::Windows::Forms::ToolStripItemDisplayStyle::Image;
      this->redToolStripButton->Image = (cli::safe_cast<System::Drawing::Image^  >(resources->GetObject(L"redToolStripButton.Image")));
      this->redToolStripButton->ImageTransparentColor = System::Drawing::Color::Magenta;
      this->redToolStripButton->Name = L"redToolStripButton";
      this->redToolStripButton->Size = System::Drawing::Size(23, 22);
      this->redToolStripButton->Text = L"toolStripButton1";
      this->redToolStripButton->ToolTipText = L"Draw in red";
      this->redToolStripButton->Click += gcnew System::EventHandler(this, &Form1::redToolStripMenuItem_Click);
      // 
      // greenToolStripButton
      // 
      this->greenToolStripButton->DisplayStyle = System::Windows::Forms::ToolStripItemDisplayStyle::Image;
      this->greenToolStripButton->Image = (cli::safe_cast<System::Drawing::Image^  >(resources->GetObject(L"greenToolStripButton.Image")));
      this->greenToolStripButton->ImageTransparentColor = System::Drawing::Color::Magenta;
      this->greenToolStripButton->Name = L"greenToolStripButton";
      this->greenToolStripButton->Size = System::Drawing::Size(23, 22);
      this->greenToolStripButton->Text = L"toolStripButton1";
      this->greenToolStripButton->ToolTipText = L"Draw in green";
      this->greenToolStripButton->Click += gcnew System::EventHandler(this, &Form1::greenToolStripMenuItem_Click);
      // 
      // blueToolStripButton
      // 
      this->blueToolStripButton->DisplayStyle = System::Windows::Forms::ToolStripItemDisplayStyle::Image;
      this->blueToolStripButton->Image = (cli::safe_cast<System::Drawing::Image^  >(resources->GetObject(L"blueToolStripButton.Image")));
      this->blueToolStripButton->ImageTransparentColor = System::Drawing::Color::Magenta;
      this->blueToolStripButton->Name = L"blueToolStripButton";
      this->blueToolStripButton->Size = System::Drawing::Size(23, 22);
      this->blueToolStripButton->Text = L"toolStripButton1";
      this->blueToolStripButton->ToolTipText = L"Draw in blue";
      this->blueToolStripButton->Click += gcnew System::EventHandler(this, &Form1::blueToolStripMenuItem_Click);
      // 
      // toolStripSeparator9
      // 
      this->toolStripSeparator9->Name = L"toolStripSeparator9";
      this->toolStripSeparator9->Size = System::Drawing::Size(6, 25);
      // 
      // penWidthButton
      // 
      this->penWidthButton->DisplayStyle = System::Windows::Forms::ToolStripItemDisplayStyle::Image;
      this->penWidthButton->Image = (cli::safe_cast<System::Drawing::Image^  >(resources->GetObject(L"penWidthButton.Image")));
      this->penWidthButton->ImageTransparentColor = System::Drawing::Color::Magenta;
      this->penWidthButton->Name = L"penWidthButton";
      this->penWidthButton->Size = System::Drawing::Size(23, 22);
      this->penWidthButton->Text = L"Set Pen Width";
      this->penWidthButton->Click += gcnew System::EventHandler(this, &Form1::penWidthButton_Click);
      // 
      // toolStripSeparator7
      // 
      this->toolStripSeparator7->Name = L"toolStripSeparator7";
      this->toolStripSeparator7->Size = System::Drawing::Size(6, 25);
      // 
      // fontToolStripButton
      // 
      this->fontToolStripButton->DisplayStyle = System::Windows::Forms::ToolStripItemDisplayStyle::Image;
      this->fontToolStripButton->Image = (cli::safe_cast<System::Drawing::Image^  >(resources->GetObject(L"fontToolStripButton.Image")));
      this->fontToolStripButton->ImageTransparentColor = System::Drawing::Color::Magenta;
      this->fontToolStripButton->Name = L"fontToolStripButton";
      this->fontToolStripButton->Size = System::Drawing::Size(23, 22);
      this->fontToolStripButton->Text = L"toolStripButton2";
      this->fontToolStripButton->Click += gcnew System::EventHandler(this, &Form1::fontToolStripButton_Click);
      // 
      // toolStripSeparator10
      // 
      this->toolStripSeparator10->Name = L"toolStripSeparator10";
      this->toolStripSeparator10->Size = System::Drawing::Size(6, 25);
      // 
      // penWidthComboBox
      // 
      this->penWidthComboBox->DropDownStyle = System::Windows::Forms::ComboBoxStyle::DropDownList;
      this->penWidthComboBox->FlatStyle = System::Windows::Forms::FlatStyle::System;
      this->penWidthComboBox->Items->AddRange(gcnew cli::array< System::Object^  >(6) {L"Width 1", L"Width 2", L"Width 3", L"Width 4", 
        L"Width 5", L"Width 6"});
      this->penWidthComboBox->Name = L"penWidthComboBox";
      this->penWidthComboBox->Size = System::Drawing::Size(80, 25);
      this->penWidthComboBox->ToolTipText = L"Select pen width";
      this->penWidthComboBox->SelectedIndexChanged += gcnew System::EventHandler(this, &Form1::penWidthComboBox_SelectedIndexChanged);
      // 
      // contextMenuStrip1
      // 
      this->contextMenuStrip1->Items->AddRange(gcnew cli::array< System::Windows::Forms::ToolStripItem^  >(13) {this->moveContextMenuItem, 
        this->deleteContextMenuItem, this->sendToBackContextMenuItem, this->contextSeparator, this->lineContextMenuItem, this->rectangleContextMenuItem, 
        this->circleContextMenuItem, this->curveContextMenuItem, this->textContextMenuItem, this->blackContextMenuItem, this->redContextMenuItem, 
        this->greenContextMenuItem, this->blueContextMenuItem});
      this->contextMenuStrip1->Name = L"contextMenuStrip1";
      this->contextMenuStrip1->Size = System::Drawing::Size(152, 274);
      this->contextMenuStrip1->Opening += gcnew System::ComponentModel::CancelEventHandler(this, &Form1::contextMenuStrip1_Opening);
      // 
      // moveContextMenuItem
      // 
      this->moveContextMenuItem->Name = L"moveContextMenuItem";
      this->moveContextMenuItem->Size = System::Drawing::Size(151, 22);
      this->moveContextMenuItem->Text = L"Move";
      this->moveContextMenuItem->Click += gcnew System::EventHandler(this, &Form1::moveContextMenuItem_Click);
      // 
      // deleteContextMenuItem
      // 
      this->deleteContextMenuItem->Name = L"deleteContextMenuItem";
      this->deleteContextMenuItem->Size = System::Drawing::Size(151, 22);
      this->deleteContextMenuItem->Text = L"Delete";
      this->deleteContextMenuItem->Click += gcnew System::EventHandler(this, &Form1::deleteContextMenuItem_Click);
      // 
      // sendToBackContextMenuItem
      // 
      this->sendToBackContextMenuItem->Name = L"sendToBackContextMenuItem";
      this->sendToBackContextMenuItem->Size = System::Drawing::Size(151, 22);
      this->sendToBackContextMenuItem->Text = L"Send-To-Back";
      this->sendToBackContextMenuItem->Click += gcnew System::EventHandler(this, &Form1::sendToBackContextMenuItem_Click);
      // 
      // contextSeparator
      // 
      this->contextSeparator->Name = L"contextSeparator";
      this->contextSeparator->Size = System::Drawing::Size(148, 6);
      // 
      // lineContextMenuItem
      // 
      this->lineContextMenuItem->Name = L"lineContextMenuItem";
      this->lineContextMenuItem->Size = System::Drawing::Size(151, 22);
      this->lineContextMenuItem->Text = L"Line";
      this->lineContextMenuItem->ToolTipText = L"Draw lines";
      this->lineContextMenuItem->Click += gcnew System::EventHandler(this, &Form1::lineToolStripMenuItem_Click);
      // 
      // rectangleContextMenuItem
      // 
      this->rectangleContextMenuItem->Name = L"rectangleContextMenuItem";
      this->rectangleContextMenuItem->Size = System::Drawing::Size(151, 22);
      this->rectangleContextMenuItem->Text = L"Rectangle";
      this->rectangleContextMenuItem->ToolTipText = L"Draw rectangles";
      this->rectangleContextMenuItem->Click += gcnew System::EventHandler(this, &Form1::rectangleToolStripMenuItem_Click);
      // 
      // circleContextMenuItem
      // 
      this->circleContextMenuItem->Name = L"circleContextMenuItem";
      this->circleContextMenuItem->Size = System::Drawing::Size(151, 22);
      this->circleContextMenuItem->Text = L"Circle";
      this->circleContextMenuItem->ToolTipText = L"Draw circles";
      this->circleContextMenuItem->Click += gcnew System::EventHandler(this, &Form1::circleToolStripMenuItem_Click);
      // 
      // curveContextMenuItem
      // 
      this->curveContextMenuItem->Name = L"curveContextMenuItem";
      this->curveContextMenuItem->Size = System::Drawing::Size(151, 22);
      this->curveContextMenuItem->Text = L"Curve";
      this->curveContextMenuItem->ToolTipText = L"Draw curves";
      this->curveContextMenuItem->Click += gcnew System::EventHandler(this, &Form1::curveToolStripMenuItem_DoubleClick);
      // 
      // textContextMenuItem
      // 
      this->textContextMenuItem->Name = L"textContextMenuItem";
      this->textContextMenuItem->Size = System::Drawing::Size(151, 22);
      this->textContextMenuItem->Text = L"Text";
      this->textContextMenuItem->ToolTipText = L"Create text elements";
      this->textContextMenuItem->Click += gcnew System::EventHandler(this, &Form1::textToolStripMenuItem_Click);
      // 
      // blackContextMenuItem
      // 
      this->blackContextMenuItem->Name = L"blackContextMenuItem";
      this->blackContextMenuItem->Size = System::Drawing::Size(151, 22);
      this->blackContextMenuItem->Text = L"Black";
      this->blackContextMenuItem->Click += gcnew System::EventHandler(this, &Form1::blackToolStripMenuItem_Click);
      // 
      // redContextMenuItem
      // 
      this->redContextMenuItem->Name = L"redContextMenuItem";
      this->redContextMenuItem->Size = System::Drawing::Size(151, 22);
      this->redContextMenuItem->Text = L"Red";
      this->redContextMenuItem->Click += gcnew System::EventHandler(this, &Form1::redToolStripMenuItem_Click);
      // 
      // greenContextMenuItem
      // 
      this->greenContextMenuItem->Name = L"greenContextMenuItem";
      this->greenContextMenuItem->Size = System::Drawing::Size(151, 22);
      this->greenContextMenuItem->Text = L"Green";
      this->greenContextMenuItem->Click += gcnew System::EventHandler(this, &Form1::greenToolStripMenuItem_Click);
      // 
      // blueContextMenuItem
      // 
      this->blueContextMenuItem->Name = L"blueContextMenuItem";
      this->blueContextMenuItem->Size = System::Drawing::Size(151, 22);
      this->blueContextMenuItem->Text = L"Blue";
      this->blueContextMenuItem->Click += gcnew System::EventHandler(this, &Form1::blueToolStripMenuItem_Click);
      // 
      // openFileDialog
      // 
      this->openFileDialog->FileName = L"sketch";
      this->openFileDialog->Filter = L"\"CLR Sketches|*.ske| All files|*.*\"";
      this->openFileDialog->InitialDirectory = L"\"C:\\CLR Sketches\"";
      this->openFileDialog->Title = L"Open a Sketch";
      // 
      // saveFileDialog
      // 
      this->saveFileDialog->FileName = L"sketch";
      this->saveFileDialog->Filter = L"\"CLR Sketches|*.ske| All files|*.*\"";
      this->saveFileDialog->InitialDirectory = L"\"C:\\CLR Sketches\"";
      this->saveFileDialog->Title = L"Save a  Sketch";
      // 
      // printDocument
      // 
      this->printDocument->PrintPage += gcnew System::Drawing::Printing::PrintPageEventHandler(this, &Form1::printDocument_PrintPage);
      // 
      // printDialog
      // 
      this->printDialog->Document = this->printDocument;
      this->printDialog->UseEXDialog = true;
      // 
      // Form1
      // 
      this->AutoScaleDimensions = System::Drawing::SizeF(6, 13);
      this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
      this->ClientSize = System::Drawing::Size(506, 285);
      this->ContextMenuStrip = this->contextMenuStrip1;
      this->Controls->Add(this->toolStrip1);
      this->Controls->Add(this->menuStrip1);
      this->MainMenuStrip = this->menuStrip1;
      this->Name = L"Form1";
      this->Text = L"CLR Sketcher";
      this->MouseUp += gcnew System::Windows::Forms::MouseEventHandler(this, &Form1::Form1_MouseUp);
      this->Paint += gcnew System::Windows::Forms::PaintEventHandler(this, &Form1::Form1_Paint);
      this->MouseDown += gcnew System::Windows::Forms::MouseEventHandler(this, &Form1::Form1_MouseDown);
      this->MouseMove += gcnew System::Windows::Forms::MouseEventHandler(this, &Form1::Form1_MouseMove);
      this->menuStrip1->ResumeLayout(false);
      this->menuStrip1->PerformLayout();
      this->toolStrip1->ResumeLayout(false);
      this->toolStrip1->PerformLayout();
      this->contextMenuStrip1->ResumeLayout(false);
      this->ResumeLayout(false);
      this->PerformLayout();

    }
#pragma endregion
  private: System::Void lineToolStripMenuItem_Click(System::Object^  sender, System::EventArgs^  e) {
   elementType = ElementType::LINE;          }

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -