Form1.h
上传用户:asa1698
上传日期:2022-01-15
资源大小:8015k
文件大小:41k
- #pragma once
- #include<windows.h>
- #include"time.h"
- namespace DVD {
- 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 摘要
- ///
- /// 警告: 如果更改此类的名称,则需要更改
- /// 与此类所依赖的所有 .resx 文件关联的托管资源编译器工具的
- /// “资源文件名”属性。否则,
- /// 设计器将不能与此窗体的关联
- /// 本地化资源正确交互。
- /// </summary>
- public ref class Form1 : public System::Windows::Forms::Form
- {
- public:
- Form1(void)
- {
- InitializeComponent();
- //
- //TODO: 在此处添加构造函数代码
- //
- }
- private: System::Windows::Forms::Timer^ timer1;
- public:
- int volumeDVD;
- int RateDVD;//DVD碟片的总长
- int fasterlowerRate;//快进退的程度
- int Dishware;//碟片代号
- int pos;//标志
- char * DishURL;//碟片路径
- private: System::Windows::Forms::Label^ label8;
- public:
- private: System::Windows::Forms::LinkLabel^ linkLabel4;
- private: System::Windows::Forms::Label^ label7;
- private: System::Windows::Forms::Label^ label6;
- private: AxWMPLib::AxWindowsMediaPlayer^ myplayer;
- int slowerRate;//快退的程度
- protected:
- /// <summary>
- /// 清理所有正在使用的资源。
- /// </summary>
- ~Form1()
- {
- if (components)
- {
- delete components;
- }
- }
- private: System::Windows::Forms::GroupBox^ groupBox2;
- private: System::Windows::Forms::PictureBox^ pictureBox1;
- private: System::Windows::Forms::GroupBox^ groupBox1;
- private: System::Windows::Forms::Button^ button3;
- private: System::Windows::Forms::Button^ button6;
- private: System::Windows::Forms::Button^ button5;
- private: System::Windows::Forms::Button^ button10;
- private: System::Windows::Forms::Button^ button9;
- private: System::Windows::Forms::Button^ button8;
- private: System::Windows::Forms::Button^ button7;
- private: System::Windows::Forms::GroupBox^ groupBox4;
- private: System::Windows::Forms::RadioButton^ radioButton6;
- private: System::Windows::Forms::Button^ button4;
- private: System::Windows::Forms::RadioButton^ radioButton5;
- private: System::Windows::Forms::RadioButton^ radioButton4;
- private: System::Windows::Forms::RadioButton^ radioButton3;
- private: System::Windows::Forms::RadioButton^ radioButton2;
- private: System::Windows::Forms::RadioButton^ radioButton1;
- private: System::Windows::Forms::GroupBox^ groupBox3;
- private: System::Windows::Forms::Button^ button2;
- private: System::Windows::Forms::Button^ button1;
- private: System::Windows::Forms::MenuStrip^ menuStrip1;
- private: System::Windows::Forms::ToolStripMenuItem^ 退出ToolStripMenuItem;
- private: System::Windows::Forms::ToolStripMenuItem^ 开始ToolStripMenuItem;
- private: System::Windows::Forms::ToolStripMenuItem^ 开始ToolStripMenuItem1;
- private: System::Windows::Forms::ToolStripMenuItem^ 开始ToolStripMenuItem2;
- private: System::Windows::Forms::ToolStripMenuItem^ 暂停ToolStripMenuItem1;
- private: System::Windows::Forms::ToolStripMenuItem^ 停止ToolStripMenuItem;
- private: System::Windows::Forms::ToolStripMenuItem^ 快进ToolStripMenuItem;
- private: System::Windows::Forms::ToolStripMenuItem^ 快退ToolStripMenuItem;
- private: System::Windows::Forms::ToolStripMenuItem^ 上一曲ToolStripMenuItem;
- private: System::Windows::Forms::ToolStripMenuItem^ 下一曲ToolStripMenuItem;
- private: System::Windows::Forms::ToolStripMenuItem^ 暂停ToolStripMenuItem;
- private: System::Windows::Forms::ToolStripMenuItem^ 增加ToolStripMenuItem;
- private: System::Windows::Forms::ToolStripMenuItem^ 退出ToolStripMenuItem1;
- private: System::Windows::Forms::ToolStripMenuItem^ 推出ToolStripMenuItem;
- private: System::Windows::Forms::ToolStripMenuItem^ 减小ToolStripMenuItem;
- private: System::Windows::Forms::ToolStripMenuItem^ 静音ToolStripMenuItem;
- private: System::Windows::Forms::GroupBox^ groupBox5;
- private: System::Windows::Forms::LinkLabel^ linkLabel1;
- private: System::Windows::Forms::Label^ label1;
- private: System::Windows::Forms::TrackBar^ trackBar1;
- private: System::Windows::Forms::Label^ label3;
- private: System::Windows::Forms::Label^ label4;
- private: System::Windows::Forms::TrackBar^ trackBar2;
- private: System::Windows::Forms::Label^ label2;
- private: System::Windows::Forms::LinkLabel^ linkLabel3;
- private: System::Windows::Forms::LinkLabel^ linkLabel2;
- private: System::Windows::Forms::Button^ button11;
- private: System::Windows::Forms::TextBox^ textBox1;
- private: System::Windows::Forms::Label^ label5;
- private: System::ComponentModel::IContainer^ components;
- 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->groupBox2 = (gcnew System::Windows::Forms::GroupBox());
- this->button10 = (gcnew System::Windows::Forms::Button());
- this->button9 = (gcnew System::Windows::Forms::Button());
- this->button8 = (gcnew System::Windows::Forms::Button());
- this->button7 = (gcnew System::Windows::Forms::Button());
- this->button6 = (gcnew System::Windows::Forms::Button());
- this->button5 = (gcnew System::Windows::Forms::Button());
- this->button3 = (gcnew System::Windows::Forms::Button());
- this->groupBox1 = (gcnew System::Windows::Forms::GroupBox());
- this->pictureBox1 = (gcnew System::Windows::Forms::PictureBox());
- this->groupBox4 = (gcnew System::Windows::Forms::GroupBox());
- this->radioButton6 = (gcnew System::Windows::Forms::RadioButton());
- this->button4 = (gcnew System::Windows::Forms::Button());
- this->radioButton5 = (gcnew System::Windows::Forms::RadioButton());
- this->radioButton4 = (gcnew System::Windows::Forms::RadioButton());
- this->radioButton3 = (gcnew System::Windows::Forms::RadioButton());
- this->radioButton2 = (gcnew System::Windows::Forms::RadioButton());
- this->radioButton1 = (gcnew System::Windows::Forms::RadioButton());
- this->groupBox3 = (gcnew System::Windows::Forms::GroupBox());
- this->textBox1 = (gcnew System::Windows::Forms::TextBox());
- this->button11 = (gcnew System::Windows::Forms::Button());
- this->trackBar1 = (gcnew System::Windows::Forms::TrackBar());
- this->label4 = (gcnew System::Windows::Forms::Label());
- this->button2 = (gcnew System::Windows::Forms::Button());
- this->button1 = (gcnew System::Windows::Forms::Button());
- this->menuStrip1 = (gcnew System::Windows::Forms::MenuStrip());
- this->退出ToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
- this->开始ToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
- this->开始ToolStripMenuItem1 = (gcnew System::Windows::Forms::ToolStripMenuItem());
- this->开始ToolStripMenuItem2 = (gcnew System::Windows::Forms::ToolStripMenuItem());
- this->暂停ToolStripMenuItem1 = (gcnew System::Windows::Forms::ToolStripMenuItem());
- this->停止ToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
- this->快进ToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
- this->快退ToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
- this->上一曲ToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
- this->下一曲ToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
- this->暂停ToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
- this->增加ToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
- this->减小ToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
- this->静音ToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
- this->退出ToolStripMenuItem1 = (gcnew System::Windows::Forms::ToolStripMenuItem());
- this->推出ToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
- this->groupBox5 = (gcnew System::Windows::Forms::GroupBox());
- this->label8 = (gcnew System::Windows::Forms::Label());
- this->linkLabel4 = (gcnew System::Windows::Forms::LinkLabel());
- this->label7 = (gcnew System::Windows::Forms::Label());
- this->label6 = (gcnew System::Windows::Forms::Label());
- this->label5 = (gcnew System::Windows::Forms::Label());
- this->linkLabel3 = (gcnew System::Windows::Forms::LinkLabel());
- this->linkLabel2 = (gcnew System::Windows::Forms::LinkLabel());
- this->label2 = (gcnew System::Windows::Forms::Label());
- this->trackBar2 = (gcnew System::Windows::Forms::TrackBar());
- this->label3 = (gcnew System::Windows::Forms::Label());
- this->linkLabel1 = (gcnew System::Windows::Forms::LinkLabel());
- this->label1 = (gcnew System::Windows::Forms::Label());
- this->timer1 = (gcnew System::Windows::Forms::Timer(this->components));
- this->myplayer = (gcnew AxWMPLib::AxWindowsMediaPlayer());
- this->groupBox2->SuspendLayout();
- this->groupBox1->SuspendLayout();
- (cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->pictureBox1))->BeginInit();
- this->groupBox4->SuspendLayout();
- this->groupBox3->SuspendLayout();
- (cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->trackBar1))->BeginInit();
- this->menuStrip1->SuspendLayout();
- this->groupBox5->SuspendLayout();
- (cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->trackBar2))->BeginInit();
- (cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->myplayer))->BeginInit();
- this->SuspendLayout();
- //
- // groupBox2
- //
- this->groupBox2->Controls->Add(this->button10);
- this->groupBox2->Controls->Add(this->button9);
- this->groupBox2->Controls->Add(this->button8);
- this->groupBox2->Controls->Add(this->button7);
- this->groupBox2->Controls->Add(this->button6);
- this->groupBox2->Controls->Add(this->button5);
- this->groupBox2->Controls->Add(this->button3);
- resources->ApplyResources(this->groupBox2, L"groupBox2");
- this->groupBox2->Name = L"groupBox2";
- this->groupBox2->TabStop = false;
- this->groupBox2->ChangeUICues += gcnew System::Windows::Forms::UICuesEventHandler(this, &Form1::groupBox2_ChangeUICues);
- this->groupBox2->Enter += gcnew System::EventHandler(this, &Form1::groupBox2_Enter);
- //
- // button10
- //
- resources->ApplyResources(this->button10, L"button10");
- this->button10->Name = L"button10";
- this->button10->UseVisualStyleBackColor = true;
- this->button10->Click += gcnew System::EventHandler(this, &Form1::button10_Click);
- //
- // button9
- //
- resources->ApplyResources(this->button9, L"button9");
- this->button9->Name = L"button9";
- this->button9->UseVisualStyleBackColor = true;
- this->button9->Click += gcnew System::EventHandler(this, &Form1::button9_Click);
- //
- // button8
- //
- resources->ApplyResources(this->button8, L"button8");
- this->button8->Name = L"button8";
- this->button8->UseVisualStyleBackColor = true;
- this->button8->Click += gcnew System::EventHandler(this, &Form1::button8_Click);
- //
- // button7
- //
- resources->ApplyResources(this->button7, L"button7");
- this->button7->Name = L"button7";
- this->button7->UseVisualStyleBackColor = true;
- this->button7->Click += gcnew System::EventHandler(this, &Form1::button7_Click);
- //
- // button6
- //
- resources->ApplyResources(this->button6, L"button6");
- this->button6->Name = L"button6";
- this->button6->UseVisualStyleBackColor = true;
- this->button6->Click += gcnew System::EventHandler(this, &Form1::button6_Click);
- //
- // button5
- //
- resources->ApplyResources(this->button5, L"button5");
- this->button5->Name = L"button5";
- this->button5->UseVisualStyleBackColor = true;
- this->button5->Click += gcnew System::EventHandler(this, &Form1::button5_Click);
- //
- // button3
- //
- resources->ApplyResources(this->button3, L"button3");
- this->button3->Name = L"button3";
- this->button3->UseVisualStyleBackColor = true;
- this->button3->Click += gcnew System::EventHandler(this, &Form1::button3_Click);
- //
- // groupBox1
- //
- resources->ApplyResources(this->groupBox1, L"groupBox1");
- this->groupBox1->Controls->Add(this->pictureBox1);
- this->groupBox1->Name = L"groupBox1";
- this->groupBox1->TabStop = false;
- this->groupBox1->Enter += gcnew System::EventHandler(this, &Form1::groupBox1_Enter);
- //
- // pictureBox1
- //
- resources->ApplyResources(this->pictureBox1, L"pictureBox1");
- this->pictureBox1->Name = L"pictureBox1";
- this->pictureBox1->TabStop = false;
- this->pictureBox1->Click += gcnew System::EventHandler(this, &Form1::pictureBox1_Click);
- //
- // groupBox4
- //
- this->groupBox4->Controls->Add(this->radioButton6);
- this->groupBox4->Controls->Add(this->button4);
- this->groupBox4->Controls->Add(this->radioButton5);
- this->groupBox4->Controls->Add(this->radioButton4);
- this->groupBox4->Controls->Add(this->radioButton3);
- this->groupBox4->Controls->Add(this->radioButton2);
- this->groupBox4->Controls->Add(this->radioButton1);
- resources->ApplyResources(this->groupBox4, L"groupBox4");
- this->groupBox4->Name = L"groupBox4";
- this->groupBox4->TabStop = false;
- //
- // radioButton6
- //
- resources->ApplyResources(this->radioButton6, L"radioButton6");
- this->radioButton6->Name = L"radioButton6";
- this->radioButton6->TabStop = true;
- this->radioButton6->UseVisualStyleBackColor = true;
- //
- // button4
- //
- resources->ApplyResources(this->button4, L"button4");
- this->button4->Name = L"button4";
- this->button4->UseVisualStyleBackColor = true;
- this->button4->Click += gcnew System::EventHandler(this, &Form1::button4_Click);
- //
- // radioButton5
- //
- resources->ApplyResources(this->radioButton5, L"radioButton5");
- this->radioButton5->Name = L"radioButton5";
- this->radioButton5->TabStop = true;
- this->radioButton5->UseVisualStyleBackColor = true;
- //
- // radioButton4
- //
- resources->ApplyResources(this->radioButton4, L"radioButton4");
- this->radioButton4->Name = L"radioButton4";
- this->radioButton4->TabStop = true;
- this->radioButton4->UseVisualStyleBackColor = true;
- //
- // radioButton3
- //
- resources->ApplyResources(this->radioButton3, L"radioButton3");
- this->radioButton3->Name = L"radioButton3";
- this->radioButton3->TabStop = true;
- this->radioButton3->UseVisualStyleBackColor = true;
- //
- // radioButton2
- //
- resources->ApplyResources(this->radioButton2, L"radioButton2");
- this->radioButton2->Name = L"radioButton2";
- this->radioButton2->TabStop = true;
- this->radioButton2->UseVisualStyleBackColor = true;
- //
- // radioButton1
- //
- resources->ApplyResources(this->radioButton1, L"radioButton1");
- this->radioButton1->Name = L"radioButton1";
- this->radioButton1->TabStop = true;
- this->radioButton1->UseVisualStyleBackColor = true;
- //
- // groupBox3
- //
- this->groupBox3->BackColor = System::Drawing::SystemColors::Control;
- this->groupBox3->Controls->Add(this->textBox1);
- this->groupBox3->Controls->Add(this->button11);
- this->groupBox3->Controls->Add(this->trackBar1);
- this->groupBox3->Controls->Add(this->label4);
- this->groupBox3->Controls->Add(this->button2);
- this->groupBox3->Controls->Add(this->button1);
- resources->ApplyResources(this->groupBox3, L"groupBox3");
- this->groupBox3->Name = L"groupBox3";
- this->groupBox3->TabStop = false;
- //
- // textBox1
- //
- resources->ApplyResources(this->textBox1, L"textBox1");
- this->textBox1->Name = L"textBox1";
- //
- // button11
- //
- resources->ApplyResources(this->button11, L"button11");
- this->button11->Name = L"button11";
- this->button11->UseVisualStyleBackColor = true;
- this->button11->Click += gcnew System::EventHandler(this, &Form1::button11_Click_1);
- //
- // trackBar1
- //
- resources->ApplyResources(this->trackBar1, L"trackBar1");
- this->trackBar1->Name = L"trackBar1";
- this->trackBar1->Value = 5;
- this->trackBar1->MouseUp += gcnew System::Windows::Forms::MouseEventHandler(this, &Form1::trackBar1_MouseUp);
- //
- // label4
- //
- resources->ApplyResources(this->label4, L"label4");
- this->label4->Name = L"label4";
- //
- // button2
- //
- resources->ApplyResources(this->button2, L"button2");
- this->button2->Name = L"button2";
- this->button2->UseVisualStyleBackColor = true;
- this->button2->Click += gcnew System::EventHandler(this, &Form1::button2_Click);
- //
- // button1
- //
- resources->ApplyResources(this->button1, L"button1");
- this->button1->Name = L"button1";
- this->button1->UseVisualStyleBackColor = true;
- this->button1->Click += gcnew System::EventHandler(this, &Form1::button1_Click);
- //
- // menuStrip1
- //
- this->menuStrip1->Items->AddRange(gcnew cli::array< System::Windows::Forms::ToolStripItem^ >(2) {this->退出ToolStripMenuItem,
- this->退出ToolStripMenuItem1});
- resources->ApplyResources(this->menuStrip1, L"menuStrip1");
- this->menuStrip1->Name = L"menuStrip1";
- this->menuStrip1->ItemClicked += gcnew System::Windows::Forms::ToolStripItemClickedEventHandler(this, &Form1::menuStrip1_ItemClicked);
- //
- // 退出ToolStripMenuItem
- //
- this->退出ToolStripMenuItem->DropDownItems->AddRange(gcnew cli::array< System::Windows::Forms::ToolStripItem^ >(3) {this->开始ToolStripMenuItem,
- this->开始ToolStripMenuItem1, this->暂停ToolStripMenuItem});
- this->退出ToolStripMenuItem->Name = L"退出ToolStripMenuItem";
- resources->ApplyResources(this->退出ToolStripMenuItem, L"退出ToolStripMenuItem");
- //
- // 开始ToolStripMenuItem
- //
- this->开始ToolStripMenuItem->Name = L"开始ToolStripMenuItem";
- resources->ApplyResources(this->开始ToolStripMenuItem, L"开始ToolStripMenuItem");
- this->开始ToolStripMenuItem->Click += gcnew System::EventHandler(this, &Form1::开始ToolStripMenuItem_Click);
- //
- // 开始ToolStripMenuItem1
- //
- this->开始ToolStripMenuItem1->DropDownItems->AddRange(gcnew cli::array< System::Windows::Forms::ToolStripItem^ >(7) {this->开始ToolStripMenuItem2,
- this->暂停ToolStripMenuItem1, this->停止ToolStripMenuItem, this->快进ToolStripMenuItem, this->快退ToolStripMenuItem, this->上一曲ToolStripMenuItem,
- this->下一曲ToolStripMenuItem});
- this->开始ToolStripMenuItem1->Name = L"开始ToolStripMenuItem1";
- resources->ApplyResources(this->开始ToolStripMenuItem1, L"开始ToolStripMenuItem1");
- //
- // 开始ToolStripMenuItem2
- //
- this->开始ToolStripMenuItem2->Name = L"开始ToolStripMenuItem2";
- resources->ApplyResources(this->开始ToolStripMenuItem2, L"开始ToolStripMenuItem2");
- this->开始ToolStripMenuItem2->Click += gcnew System::EventHandler(this, &Form1::开始ToolStripMenuItem2_Click);
- //
- // 暂停ToolStripMenuItem1
- //
- this->暂停ToolStripMenuItem1->Name = L"暂停ToolStripMenuItem1";
- resources->ApplyResources(this->暂停ToolStripMenuItem1, L"暂停ToolStripMenuItem1");
- this->暂停ToolStripMenuItem1->Click += gcnew System::EventHandler(this, &Form1::暂停ToolStripMenuItem1_Click);
- //
- // 停止ToolStripMenuItem
- //
- this->停止ToolStripMenuItem->Name = L"停止ToolStripMenuItem";
- resources->ApplyResources(this->停止ToolStripMenuItem, L"停止ToolStripMenuItem");
- this->停止ToolStripMenuItem->Click += gcnew System::EventHandler(this, &Form1::停止ToolStripMenuItem_Click);
- //
- // 快进ToolStripMenuItem
- //
- this->快进ToolStripMenuItem->Name = L"快进ToolStripMenuItem";
- resources->ApplyResources(this->快进ToolStripMenuItem, L"快进ToolStripMenuItem");
- this->快进ToolStripMenuItem->Click += gcnew System::EventHandler(this, &Form1::快进ToolStripMenuItem_Click);
- //
- // 快退ToolStripMenuItem
- //
- this->快退ToolStripMenuItem->Name = L"快退ToolStripMenuItem";
- resources->ApplyResources(this->快退ToolStripMenuItem, L"快退ToolStripMenuItem");
- this->快退ToolStripMenuItem->Click += gcnew System::EventHandler(this, &Form1::快退ToolStripMenuItem_Click);
- //
- // 上一曲ToolStripMenuItem
- //
- this->上一曲ToolStripMenuItem->Name = L"上一曲ToolStripMenuItem";
- resources->ApplyResources(this->上一曲ToolStripMenuItem, L"上一曲ToolStripMenuItem");
- this->上一曲ToolStripMenuItem->Click += gcnew System::EventHandler(this, &Form1::上一曲ToolStripMenuItem_Click);
- //
- // 下一曲ToolStripMenuItem
- //
- this->下一曲ToolStripMenuItem->Name = L"下一曲ToolStripMenuItem";
- resources->ApplyResources(this->下一曲ToolStripMenuItem, L"下一曲ToolStripMenuItem");
- this->下一曲ToolStripMenuItem->Click += gcnew System::EventHandler(this, &Form1::下一曲ToolStripMenuItem_Click);
- //
- // 暂停ToolStripMenuItem
- //
- this->暂停ToolStripMenuItem->DropDownItems->AddRange(gcnew cli::array< System::Windows::Forms::ToolStripItem^ >(3) {this->增加ToolStripMenuItem,
- this->减小ToolStripMenuItem, this->静音ToolStripMenuItem});
- this->暂停ToolStripMenuItem->Name = L"暂停ToolStripMenuItem";
- resources->ApplyResources(this->暂停ToolStripMenuItem, L"暂停ToolStripMenuItem");
- //
- // 增加ToolStripMenuItem
- //
- this->增加ToolStripMenuItem->Name = L"增加ToolStripMenuItem";
- resources->ApplyResources(this->增加ToolStripMenuItem, L"增加ToolStripMenuItem");
- this->增加ToolStripMenuItem->Click += gcnew System::EventHandler(this, &Form1::增加ToolStripMenuItem_Click);
- //
- // 减小ToolStripMenuItem
- //
- this->减小ToolStripMenuItem->Name = L"减小ToolStripMenuItem";
- resources->ApplyResources(this->减小ToolStripMenuItem, L"减小ToolStripMenuItem");
- this->减小ToolStripMenuItem->Click += gcnew System::EventHandler(this, &Form1::减小ToolStripMenuItem_Click);
- //
- // 静音ToolStripMenuItem
- //
- this->静音ToolStripMenuItem->Name = L"静音ToolStripMenuItem";
- resources->ApplyResources(this->静音ToolStripMenuItem, L"静音ToolStripMenuItem");
- this->静音ToolStripMenuItem->Click += gcnew System::EventHandler(this, &Form1::静音ToolStripMenuItem_Click);
- //
- // 退出ToolStripMenuItem1
- //
- this->退出ToolStripMenuItem1->DropDownItems->AddRange(gcnew cli::array< System::Windows::Forms::ToolStripItem^ >(1) {this->推出ToolStripMenuItem});
- this->退出ToolStripMenuItem1->Name = L"退出ToolStripMenuItem1";
- resources->ApplyResources(this->退出ToolStripMenuItem1, L"退出ToolStripMenuItem1");
- //
- // 推出ToolStripMenuItem
- //
- this->推出ToolStripMenuItem->Name = L"推出ToolStripMenuItem";
- resources->ApplyResources(this->推出ToolStripMenuItem, L"推出ToolStripMenuItem");
- this->推出ToolStripMenuItem->Click += gcnew System::EventHandler(this, &Form1::推出ToolStripMenuItem_Click);
- //
- // groupBox5
- //
- this->groupBox5->Controls->Add(this->myplayer);
- this->groupBox5->Controls->Add(this->label8);
- this->groupBox5->Controls->Add(this->linkLabel4);
- this->groupBox5->Controls->Add(this->label7);
- this->groupBox5->Controls->Add(this->label6);
- this->groupBox5->Controls->Add(this->label5);
- this->groupBox5->Controls->Add(this->linkLabel3);
- this->groupBox5->Controls->Add(this->linkLabel2);
- this->groupBox5->Controls->Add(this->label2);
- this->groupBox5->Controls->Add(this->trackBar2);
- this->groupBox5->Controls->Add(this->label3);
- this->groupBox5->Controls->Add(this->linkLabel1);
- this->groupBox5->Controls->Add(this->label1);
- resources->ApplyResources(this->groupBox5, L"groupBox5");
- this->groupBox5->Name = L"groupBox5";
- this->groupBox5->TabStop = false;
- this->groupBox5->Enter += gcnew System::EventHandler(this, &Form1::groupBox5_Enter);
- //
- // label8
- //
- resources->ApplyResources(this->label8, L"label8");
- this->label8->Name = L"label8";
- //
- // linkLabel4
- //
- resources->ApplyResources(this->linkLabel4, L"linkLabel4");
- this->linkLabel4->LinkColor = System::Drawing::Color::Purple;
- this->linkLabel4->Name = L"linkLabel4";
- this->linkLabel4->TabStop = true;
- //
- // label7
- //
- resources->ApplyResources(this->label7, L"label7");
- this->label7->Name = L"label7";
- //
- // label6
- //
- resources->ApplyResources(this->label6, L"label6");
- this->label6->ForeColor = System::Drawing::Color::FromArgb(static_cast<System::Int32>(static_cast<System::Byte>(64)), static_cast<System::Int32>(static_cast<System::Byte>(0)),
- static_cast<System::Int32>(static_cast<System::Byte>(64)));
- this->label6->Name = L"label6";
- //
- // label5
- //
- resources->ApplyResources(this->label5, L"label5");
- this->label5->Name = L"label5";
- //
- // linkLabel3
- //
- resources->ApplyResources(this->linkLabel3, L"linkLabel3");
- this->linkLabel3->LinkColor = System::Drawing::Color::Purple;
- this->linkLabel3->Name = L"linkLabel3";
- this->linkLabel3->TabStop = true;
- //
- // linkLabel2
- //
- resources->ApplyResources(this->linkLabel2, L"linkLabel2");
- this->linkLabel2->LinkColor = System::Drawing::Color::Purple;
- this->linkLabel2->Name = L"linkLabel2";
- //
- // label2
- //
- resources->ApplyResources(this->label2, L"label2");
- this->label2->ForeColor = System::Drawing::Color::FromArgb(static_cast<System::Int32>(static_cast<System::Byte>(64)), static_cast<System::Int32>(static_cast<System::Byte>(0)),
- static_cast<System::Int32>(static_cast<System::Byte>(64)));
- this->label2->Name = L"label2";
- //
- // trackBar2
- //
- resources->ApplyResources(this->trackBar2, L"trackBar2");
- this->trackBar2->LargeChange = 1;
- this->trackBar2->Maximum = 100;
- this->trackBar2->Name = L"trackBar2";
- //
- // label3
- //
- resources->ApplyResources(this->label3, L"label3");
- this->label3->Name = L"label3";
- //
- // linkLabel1
- //
- resources->ApplyResources(this->linkLabel1, L"linkLabel1");
- this->linkLabel1->LinkColor = System::Drawing::Color::Purple;
- this->linkLabel1->Name = L"linkLabel1";
- this->linkLabel1->TabStop = true;
- //
- // label1
- //
- resources->ApplyResources(this->label1, L"label1");
- this->label1->ForeColor = System::Drawing::Color::FromArgb(static_cast<System::Int32>(static_cast<System::Byte>(64)), static_cast<System::Int32>(static_cast<System::Byte>(0)),
- static_cast<System::Int32>(static_cast<System::Byte>(64)));
- this->label1->Name = L"label1";
- //
- // timer1
- //
- this->timer1->Interval = 1000;
- this->timer1->Tick += gcnew System::EventHandler(this, &Form1::timer1_Tick);
- //
- // myplayer
- //
- resources->ApplyResources(this->myplayer, L"myplayer");
- this->myplayer->Name = L"myplayer";
- this->myplayer->OcxState = (cli::safe_cast<System::Windows::Forms::AxHost::State^ >(resources->GetObject(L"myplayer.OcxState")));
- //
- // Form1
- //
- resources->ApplyResources(this, L"$this");
- this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
- this->Controls->Add(this->groupBox5);
- this->Controls->Add(this->groupBox3);
- this->Controls->Add(this->groupBox4);
- this->Controls->Add(this->menuStrip1);
- this->Controls->Add(this->groupBox1);
- this->Controls->Add(this->groupBox2);
- this->MainMenuStrip = this->menuStrip1;
- this->Name = L"Form1";
- this->Load += gcnew System::EventHandler(this, &Form1::Form1_Load);
- this->Paint += gcnew System::Windows::Forms::PaintEventHandler(this, &Form1::Form1_Paint);
- this->groupBox2->ResumeLayout(false);
- this->groupBox1->ResumeLayout(false);
- (cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->pictureBox1))->EndInit();
- this->groupBox4->ResumeLayout(false);
- this->groupBox4->PerformLayout();
- this->groupBox3->ResumeLayout(false);
- this->groupBox3->PerformLayout();
- (cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->trackBar1))->EndInit();
- this->menuStrip1->ResumeLayout(false);
- this->menuStrip1->PerformLayout();
- this->groupBox5->ResumeLayout(false);
- this->groupBox5->PerformLayout();
- (cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->trackBar2))->EndInit();
- (cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->myplayer))->EndInit();
- this->ResumeLayout(false);
- this->PerformLayout();
- }
- #pragma endregion
- private: System::Void Form1_Load(System::Object^ sender, System::EventArgs^ e) {
-
- // this->myplayer->openPlayer("");
- }
- private: System::Void Form1_Paint(System::Object^ sender, System::Windows::Forms::PaintEventArgs^ e) {
- }
- private: System::Void groupBox1_Enter(System::Object^ sender, System::EventArgs^ e) {
- }
- private: System::Void pictureBox1_Click(System::Object^ sender, System::EventArgs^ e) {
- }
- private: System::Void progressBar1_Click(System::Object^ sender, System::EventArgs^ e) {
- }
- private: System::Void button8_Click(System::Object^ sender, System::EventArgs^ e) {
- //快进
- FastGo();
- }
- private: System::Void menuStrip1_ItemClicked(System::Object^ sender, System::Windows::Forms::ToolStripItemClickedEventArgs^ e) {
- }
- private: System::Void button2_Click(System::Object^ sender, System::EventArgs^ e) {
- VolumeReduse();
- }
- private:System::Void BeginDVD()
- {
- pos = 0;
- Dishware =0;
- trackBar1->Value = 5;
- timer1->Enabled = false;
- trackBar2->Value=0;
- timer1->Interval = 1000;
- linkLabel3->Text = "正常";
- textBox1->Text = "5";
- //DishURL = "D:\dish\1.wma";
- if(radioButton1->Checked==true)
- {
- linkLabel1->Text = "现在读取第一张碟片!";
- trackBar2->Maximum = 50;
- Dishware = 1;
- pos = 1;
- //DishURL = "D:\dish\1.wma";
- }
- else if (radioButton2->Checked)
- {
- linkLabel1->Text = "现在读取第二张碟片!";
- trackBar2->Maximum = 60;
- Dishware = 2;
- pos = 1;
- //DishURL = "D:\dish\2.wma";
- }
- else if (radioButton3->Checked)
- {
- linkLabel1->Text = "现在读取第三张碟片!";
- trackBar2->Maximum = 70;
- Dishware = 3;
- pos = 1;
- // DishURL = "D:\dish\3.wma";
- }
- else if (radioButton4->Checked)
- {
- linkLabel1->Text = "现在读取第四张碟片!";
- trackBar2->Maximum = 80;
- Dishware = 4;
- pos = 1;
- // DishURL = "D:\dish\4.wma";
- }
- else if (radioButton5->Checked)
- {
- linkLabel1->Text = "现在读取第五张碟片!";
- trackBar2->Maximum = 90;
- Dishware = 5;
- pos = 1;
- // DishURL = "D:\dish\5.wma";
- }
- else if (radioButton6->Checked)
- {
- linkLabel1->Text = "现在读取第六张碟片!";
- trackBar2->Maximum = 100;
- Dishware = 6;
- pos = 1;
- // DishURL = "D:\dish\6.wma";
- }
- else
- {
- linkLabel1->Text = "请选择碟片!";
- trackBar2->Maximum =100;
- }
- linkLabel4->Text = System::Convert::ToString(trackBar2->Maximum);
- if (pos == 1)
- {
- button3->Enabled = true;
- button5->Enabled = true;
- button6->Enabled = true;
- button7->Enabled = true;
- button8->Enabled = true;
- button9->Enabled = true;
- button10->Enabled = true;
- button10->Text = System::Convert::ToString(Dishware);
- }
- }
- private: System::Void DVDPlay()
- {
- switch(Dishware)
- {
- case 1:
- this->myplayer->URL ="D:\dish\1.wma";
- case 2:
- this->myplayer->URL ="D:\dish\2.wma";
- case 3:
- this->myplayer->URL ="D:\dish\3.wma";
- case 4:
- this->myplayer->URL ="D:\dish\4.wma";
- case 5:
- this->myplayer->URL ="D:\dish\5.wma";
- case 6:
- this->myplayer->URL ="D:\dish\6.wma";
- // default:
- // this->myplayer->URL ="D:\dish\6.wma";
- }
- // this->myplayer->URL = SDishURL;
- button5->Enabled = false;
- fasterlowerRate = 1;
- timer1->Enabled = true;
- linkLabel3->Text="正常";
- linkLabel1->Text="正在播放....";
- this->myplayer->Ctlcontrols->play();
- }
- private: System::Void Pause()
- {
- this->myplayer->Ctlcontrols->pause();
- button5->Enabled = true;
- trackBar2->Value = volumeDVD ;
- timer1->Enabled = false;
- linkLabel1->Text = "暂停播放 ! ";
- // this->myplayer->Ctlcontrols->stop();
- }
- private: System::Void Stop()
- {
- this->myplayer->Ctlcontrols->stop();
- button5->Enabled = true;
- trackBar2->Value = 0;
- timer1->Enabled = false;
- linkLabel1->Text = "停止播放 ! ";
- }
- private: System::Void FastBack()
- {
- this->myplayer->Ctlcontrols->fastReverse();
- if(fasterlowerRate >0 )
- {
- timer1->Enabled=false;
- fasterlowerRate = -1;
- timer1->Enabled =true;
- }
- switch (fasterlowerRate){
- case -1:
- timer1->Interval = 800; fasterlowerRate = -2;linkLabel3->Text = "快退*1";break;
- case -2:
- timer1->Interval = 600; fasterlowerRate = -3;linkLabel3->Text = "快退*2";break;
- case -3:
- timer1->Interval = 400; fasterlowerRate = -4; linkLabel3->Text = "快退*3";break;
- case -4:
- timer1->Interval = 200;fasterlowerRate = -5;linkLabel3->Text = "快退*4";break;
- default:
- timer1->Interval = 1000;fasterlowerRate=1;linkLabel3->Text = "正常";
- }
- }
- private: System::Void FastGo()
- {
- this->myplayer->Ctlcontrols->fastForward();
- switch (fasterlowerRate){
- case 1:
- timer1->Interval =800;fasterlowerRate = 2;linkLabel3->Text = "快进*1";break;
- case 2:
- timer1->Interval = 600; fasterlowerRate = 3;linkLabel3->Text = "快进*2";break;
- case 3:
- timer1->Interval = 400; fasterlowerRate = 4; linkLabel3->Text = "快进*3";break;
- case 4:
- timer1->Interval = 200;fasterlowerRate = 5;linkLabel3->Text = "快进*4";break;
- default:
- timer1->Interval = 1000;fasterlowerRate = 1;linkLabel3->Text = "正常";
- }
- }
- private:System::Void LastOne()
- {
- this->myplayer->Ctlcontrols->previous();
- switch(Dishware)
- {
- case 1:
- linkLabel1->Text ="这已经是第一曲了...";pos=0;break;
- case 2:
- radioButton1->Checked=true;pos=1;break;
- case 3:
- radioButton2->Checked=true;pos=1;break;
- case 4:
- radioButton3->Checked=true;pos=1;break;
- case 5:
- radioButton4->Checked=true;pos=1;break;
- case 6:
- radioButton5->Checked=true;pos=1;break;
- default:
- pos=0;linkLabel1->Text="错误!";
- }
- if (pos == 1)
- {
- BeginDVD();
- button5->Enabled = false;
- fasterlowerRate = 1;
- timer1->Enabled = true;
- linkLabel1->Text="正在播放....";
- }
- }
- private: System::Void NextOne()
- {
- this->myplayer->Ctlcontrols->next();
- switch(Dishware)
- {
- case 1:
- radioButton2->Checked=true;pos=1;break;
- case 2:
- radioButton3->Checked=true;pos=1;break;
- case 3:
- radioButton4->Checked=true;pos=1;break;
- case 4:
- radioButton5->Checked=true;pos=1;break;
- case 5:
- radioButton6->Checked=true;pos=1;break;
- case 6:
- linkLabel1->Text="这已经最后一曲了...";pos=0;break;
- default:
- pos=0;linkLabel1->Text="错误!";
- }
- if(pos == 1)
- {
- BeginDVD();
- button5->Enabled = false;
- fasterlowerRate = 1;
- timer1->Enabled = true;
- linkLabel1->Text="正在播放....";
- }
- }
- private: System::Void VolumeAdd()
- {
- if (trackBar1->Value >9 )
- {
- this->myplayer->settings->volume = 100;
- trackBar1->Value = 10;
- }
- else
- {
- this->myplayer->settings->volume += 10;
- trackBar1->Value = trackBar1 ->Value + 1;
- }
- textBox1->Text =System::Convert::ToString(trackBar1->Value) ;
- }
- private: System::Void VolumeReduse()
- {
- if (trackBar1->Value < 1 )
- {
- this->myplayer->settings->volume = 0;
- trackBar1->Value = 0;
- }
- else
- {
- this->myplayer->settings->volume -= 10;
- trackBar1->Value = trackBar1 ->Value - 1;
- }
- textBox1->Text =System::Convert::ToString(trackBar1->Value) ;
- }
- private: System::Void button4_Click(System::Object^ sender, System::EventArgs^ e) {
- BeginDVD();
- }
- private: System::Void groupBox5_Enter(System::Object^ sender, System::EventArgs^ e) {
- }
- private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) {
- VolumeAdd();
- }
- private: System::Void textBox1_TextChanged(System::Object^ sender, System::EventArgs^ e) {
- }
- private: System::Void textBox1_TextChanged_1(System::Object^ sender, System::EventArgs^ e) {
- }
- private: System::Void groupBox2_ChangeUICues(System::Object^ sender, System::Windows::Forms::UICuesEventArgs^ e) {
- }
- private: System::Void trackBar1_MouseUp(System::Object^ sender, System::Windows::Forms::MouseEventArgs^ e) {
- textBox1->Text =System::Convert::ToString(trackBar1->Value) ;
- }
- private: System::Void button11_Click_1(System::Object^ sender, System::EventArgs^ e) {
- if (textBox1->Text!="")
- {
- //int i = System::Convert::ToInt32(textBox1->Text);
- //System::Windows::Forms::MessageBox::Show(i.ToString());
- //strncpy(textBox1->Text->ToCharArray(),DVDDishVolume.str,sizeof(textBox1->Text->ToString()));
- //DVDDishVolume.str = textBox1->Text->ToCharArray();
- //DVDDishVolume.str = textBox1->Text->ToString();
- //strcpy(DVDDishVolume.str,textBox1->Text->ToCharArray());
- //DVDDishVolume.Volume = atoi(DVDDishVolume.str);
- volumeDVD = System::Convert::ToInt32(textBox1->Text);
- }
- if (volumeDVD > 10 )
- {
- this->myplayer->settings->volume= 100;
- trackBar1->Value = 10;
- }
- else if(volumeDVD < 0)
- {
- this->myplayer->settings->volume=0;
- trackBar1->Value = 0;
- }
- else
- {
- this->myplayer->settings->volume = volumeDVD * 10;
- trackBar1->Value = volumeDVD;
- }
- textBox1->Text =System::Convert::ToString(trackBar1->Value) ;
- }
- private: System::Void button5_Click(System::Object^ sender, System::EventArgs^ e)
- {
- DVDPlay();
- }
- private: System::Void button6_Click(System::Object^ sender, System::EventArgs^ e) {
- Pause();
- }
- private: System::Void button3_Click(System::Object^ sender, System::EventArgs^ e) {
- Stop();
- }
- private: System::Void timer1_Tick(System::Object^ sender, System::EventArgs^ e) {
- if (fasterlowerRate > 0)
- {
- if ((trackBar2->Value)==(trackBar2->Maximum))
- {
- trackBar2->Value=0;
- linkLabel1->Text = "停止播放 ! ";
- timer1->Enabled = false;
- }
- else
- {
- trackBar2->Value = trackBar2->Value + 1;
- volumeDVD = trackBar2->Value;
- }
- }
- else
- {
- if ((trackBar2->Value)==(trackBar2->Minimum))
- {
- trackBar2->Value=0;
- linkLabel1->Text = "停止播放 ! ";
- timer1->Enabled = false;
- }
- else
- {
- trackBar2->Value = trackBar2->Value - 1;
- volumeDVD = trackBar2->Value;
- }
- }
- }
- private: System::Void groupBox2_Enter(System::Object^ sender, System::EventArgs^ e) {
- }
- private: System::Void button7_Click(System::Object^ sender, System::EventArgs^ e) {
- //快退
- FastBack();
- }
- private: System::Void button9_Click(System::Object^ sender, System::EventArgs^ e) {
- LastOne();
- }
- private: System::Void button10_Click(System::Object^ sender, System::EventArgs^ e) {
- NextOne();
- }
- private: System::Void 开始ToolStripMenuItem_Click(System::Object^ sender, System::EventArgs^ e) {
- BeginDVD();
- }
- private: System::Void 开始ToolStripMenuItem2_Click(System::Object^ sender, System::EventArgs^ e) {
- DVDPlay();
- }
- private: System::Void 暂停ToolStripMenuItem1_Click(System::Object^ sender, System::EventArgs^ e) {
- Pause();
- }
- private: System::Void 停止ToolStripMenuItem_Click(System::Object^ sender, System::EventArgs^ e) {
- Stop();
- }
- private: System::Void 快进ToolStripMenuItem_Click(System::Object^ sender, System::EventArgs^ e) {
- FastGo();
- }
- private: System::Void 快退ToolStripMenuItem_Click(System::Object^ sender, System::EventArgs^ e) {
- FastBack();
- }
- private: System::Void 上一曲ToolStripMenuItem_Click(System::Object^ sender, System::EventArgs^ e) {
- LastOne();
- }
- private: System::Void 下一曲ToolStripMenuItem_Click(System::Object^ sender, System::EventArgs^ e) {
- NextOne();
- }
- private: System::Void 增加ToolStripMenuItem_Click(System::Object^ sender, System::EventArgs^ e) {
- VolumeAdd();
- }
- private: System::Void 减小ToolStripMenuItem_Click(System::Object^ sender, System::EventArgs^ e) {
- VolumeReduse();
- }
- private: System::Void 静音ToolStripMenuItem_Click(System::Object^ sender, System::EventArgs^ e) {
- trackBar1->Value = 0;
- textBox1->Text =System::Convert::ToString(trackBar1->Value) ;
- }
- private: System::Void 推出ToolStripMenuItem_Click(System::Object^ sender, System::EventArgs^ e) {
- exit(0);
- }
- };
- }