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

📄 roomnamequery.h

📁 导致教室占用的变更
💻 H
📖 第 1 页 / 共 2 页
字号:
#pragma once
#include "FileRW.h"

using namespace System;
using namespace System::ComponentModel;
using namespace System::Collections;
using namespace System::Windows::Forms;
using namespace System::Data;
using namespace System::Drawing;


namespace ClassRoom {

	/// <summary>
	/// Form2 摘要
	///
	/// 警告: 如果更改此类的名称,则需要更改
	///          与此类所依赖的所有 .resx 文件关联的托管资源编译器工具的
	///          “资源文件名”属性。否则,
	///          设计器将不能与此窗体的关联
	///          本地化资源正确交互。
	/// </summary>
	public ref class RoomNameQuery : public System::Windows::Forms::Form
	{
	public:
		
		RoomNameQuery(void)
		{
			InitializeComponent();
			BuildingIndex = -1;
			RoomIndex = -1;
			ClassRoomArray = gcnew array<String^,2>{

												{"112教室","114教室","116教室","118教室","206教室",
												 "208教室","218教室","221教室","223教室","225教室",
												 "227教室","240教室","249教室","251教室","253教室",
												 "255教室","257教室","260教室","301教室","304教室",
												 "308教室","310教室","313教室","315教室","325教室",
												 "327教室","329教室","331教室","333教室","335教室",
												 "337教室","343教室","353教室","355教室","357教室",
												 "359教室","361教室","363教室","401教室","403教室",
												 "450教室","452教室",""},

												 {"324教室","326教室","328教室","330教室","429教室",
												  "431教室","434教室","436教室","438教室","441教室",
												  "443教室","447教室","449教室","451教室","453教室",
												  "456教室","460教室","463教室","466教室","468教室",
												  "511教室","512教室","513教室","514教室","515教室",
												  "516教室","517教室","518教室","519教室","520教室",
												  "521教室","525教室","527教室","529教室","531教室",""},

												{"102教室","104教室","105教室","106教室","108教室",
												 "201教室","203教室","204教室","205教室","207教室",
												 "301教室","303教室","304教室","305教室","307教室",
												 "401教室","403教室","404教室","405教室","407教室",""},
			
												{"101教室","102教室","103教室","201教室","203教室",""}

													}; 

			BuildingArray = gcnew array<String^>{"N 楼","H 楼","M 楼","G 楼"}; 

			FilePath = gcnew array<String^>{".\\Data\\N_RoomSubject.txt",
											".\\Data\\H_RoomSubject.txt",
											".\\Data\\M_RoomSubject.txt",
											".\\Data\\G_RoomSubject.txt"};
			ClassRoomNumber = gcnew array<Int32^>{ 42,35,20,5};

			this->comboBox2->Items->AddRange( BuildingArray );
			array<String^>^ temp ={"","","","","","",""};
			DataGridViewRowCollection^ rows = this->dataGridView1->Rows;
			file = gcnew FileRW();
		    SubjectArray = gcnew array<String^, 2>{ 
							{"","","","","","",""},
							{"","","","","","",""},
							{"","","","","","",""},
							{"","","","","","",""},
							{"","","","","","",""}};
							
			for(int i = 0;i<5;i++)
			{
				for(int j=0;j<7;j++)
				{
					temp->SetValue(SubjectArray->GetValue(i,j),j);
				}
					rows->Add(temp);
			}
			//
			//TODO: 在此处添加构造函数代码
			//
		}

	protected:
		/// <summary>
		/// 清理所有正在使用的资源。
		/// </summary>
		~RoomNameQuery()
		{
			if (components)
			{
				delete components;
			}
		}


	private: System::Windows::Forms::GroupBox^  groupBox2;
	private: System::Windows::Forms::ComboBox^  comboBox1;
	private: System::Windows::Forms::Label^  label1;
	private: System::Windows::Forms::Button^  button1;
	private: System::Windows::Forms::Label^  label2;
	private: System::Windows::Forms::ComboBox^  comboBox2;
	private: System::Windows::Forms::GroupBox^  groupBox1;
	private: System::Windows::Forms::DataGridView^  dataGridView1;
    private: System::Windows::Forms::DataGridViewTextBoxColumn^  Column1;
	private: System::Windows::Forms::DataGridViewTextBoxColumn^  Column2;
	private: System::Windows::Forms::DataGridViewTextBoxColumn^  Column3;
	private: System::Windows::Forms::DataGridViewTextBoxColumn^  Column4;
	private: System::Windows::Forms::DataGridViewTextBoxColumn^  Column5;
	private: System::Windows::Forms::DataGridViewTextBoxColumn^  Column6;
	private: System::Windows::Forms::DataGridViewTextBoxColumn^  Column7;
	private: System::Windows::Forms::Label^  label3;
	private: System::Windows::Forms::Label^  label7;
	private: System::Windows::Forms::Label^  label6;
	private: System::Windows::Forms::Label^  label5;
	private: System::Windows::Forms::Label^  label4;




	private:
		/// <summary>
		/// 必需的设计器变量。
		/// </summary>
		System::ComponentModel::Container ^components;

		array<String^>^ BuildingArray ;//存放教学楼名称的数组
		array<String^,2>^ ClassRoomArray; //存放教室名称数组
		array<String^>^ FilePath ;//存储教室状态信息文件的路径
		array<Int32^>^ ClassRoomNumber;//不同楼的教室的数量,便于依据教室数量创建不同的二叉树
		array<String^,2>^ SubjectArray;//存放课程的二维数组
		FileRW^ file ;//文件读取对象
		int BuildingIndex ;//返回教学楼选择的编号
		int RoomIndex ;//返回教室选择的编号


#pragma region Windows Form Designer generated code
		/// <summary>
		/// 设计器支持所需的方法 - 不要
		/// 使用代码编辑器修改此方法的内容。
		/// </summary>
		void InitializeComponent(void)
		{
			System::Windows::Forms::DataGridViewCellStyle^  dataGridViewCellStyle1 = (gcnew System::Windows::Forms::DataGridViewCellStyle());
			System::Windows::Forms::DataGridViewCellStyle^  dataGridViewCellStyle2 = (gcnew System::Windows::Forms::DataGridViewCellStyle());
			System::Windows::Forms::DataGridViewCellStyle^  dataGridViewCellStyle3 = (gcnew System::Windows::Forms::DataGridViewCellStyle());
			System::Windows::Forms::DataGridViewCellStyle^  dataGridViewCellStyle4 = (gcnew System::Windows::Forms::DataGridViewCellStyle());
			System::Windows::Forms::DataGridViewCellStyle^  dataGridViewCellStyle5 = (gcnew System::Windows::Forms::DataGridViewCellStyle());
			System::Windows::Forms::DataGridViewCellStyle^  dataGridViewCellStyle6 = (gcnew System::Windows::Forms::DataGridViewCellStyle());
			System::Windows::Forms::DataGridViewCellStyle^  dataGridViewCellStyle7 = (gcnew System::Windows::Forms::DataGridViewCellStyle());
			System::ComponentModel::ComponentResourceManager^  resources = (gcnew System::ComponentModel::ComponentResourceManager(RoomNameQuery::typeid));
			this->groupBox2 = (gcnew System::Windows::Forms::GroupBox());
			this->label2 = (gcnew System::Windows::Forms::Label());
			this->comboBox2 = (gcnew System::Windows::Forms::ComboBox());
			this->button1 = (gcnew System::Windows::Forms::Button());
			this->label1 = (gcnew System::Windows::Forms::Label());
			this->comboBox1 = (gcnew System::Windows::Forms::ComboBox());
			this->groupBox1 = (gcnew System::Windows::Forms::GroupBox());
			this->label7 = (gcnew System::Windows::Forms::Label());
			this->label6 = (gcnew System::Windows::Forms::Label());
			this->label5 = (gcnew System::Windows::Forms::Label());
			this->label4 = (gcnew System::Windows::Forms::Label());
			this->label3 = (gcnew System::Windows::Forms::Label());
			this->dataGridView1 = (gcnew System::Windows::Forms::DataGridView());
			this->Column1 = (gcnew System::Windows::Forms::DataGridViewTextBoxColumn());
			this->Column2 = (gcnew System::Windows::Forms::DataGridViewTextBoxColumn());
			this->Column3 = (gcnew System::Windows::Forms::DataGridViewTextBoxColumn());
			this->Column4 = (gcnew System::Windows::Forms::DataGridViewTextBoxColumn());
			this->Column5 = (gcnew System::Windows::Forms::DataGridViewTextBoxColumn());
			this->Column6 = (gcnew System::Windows::Forms::DataGridViewTextBoxColumn());
			this->Column7 = (gcnew System::Windows::Forms::DataGridViewTextBoxColumn());
			this->groupBox2->SuspendLayout();
			this->groupBox1->SuspendLayout();
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->dataGridView1))->BeginInit();
			this->SuspendLayout();
			// 
			// groupBox2
			// 
			this->groupBox2->BackColor = System::Drawing::Color::Transparent;
			this->groupBox2->Controls->Add(this->label2);
			this->groupBox2->Controls->Add(this->comboBox2);
			this->groupBox2->Controls->Add(this->button1);
			this->groupBox2->Controls->Add(this->label1);
			this->groupBox2->Controls->Add(this->comboBox1);
			this->groupBox2->Font = (gcnew System::Drawing::Font(L"宋体", 10.5F, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(134)));
			this->groupBox2->ForeColor = System::Drawing::SystemColors::Desktop;
			this->groupBox2->Location = System::Drawing::Point(25, 13);
			this->groupBox2->Name = L"groupBox2";
			this->groupBox2->Size = System::Drawing::Size(651, 98);
			this->groupBox2->TabIndex = 4;
			this->groupBox2->TabStop = false;
			this->groupBox2->Text = L"教室选择";
			this->groupBox2->Enter += gcnew System::EventHandler(this, &RoomNameQuery::groupBox2_Enter);
			// 
			// label2
			// 
			this->label2->AutoSize = true;
			this->label2->Font = (gcnew System::Drawing::Font(L"宋体", 12, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(134)));
			this->label2->Location = System::Drawing::Point(95, 50);
			this->label2->Name = L"label2";
			this->label2->Size = System::Drawing::Size(56, 16);
			this->label2->TabIndex = 4;
			this->label2->Text = L"教学楼";
			// 
			// comboBox2
			// 
			this->comboBox2->DropDownStyle = System::Windows::Forms::ComboBoxStyle::DropDownList;
			this->comboBox2->FormattingEnabled = true;
			this->comboBox2->Location = System::Drawing::Point(162, 46);
			this->comboBox2->Name = L"comboBox2";
			this->comboBox2->Size = System::Drawing::Size(75, 22);
			this->comboBox2->TabIndex = 3;
			this->comboBox2->SelectedIndexChanged += gcnew System::EventHandler(this, &RoomNameQuery::comboBox2_SelectedIndexChanged);

⌨️ 快捷键说明

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