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

📄 login.h

📁 导致教室占用的变更
💻 H
字号:
#pragma once

#include "SystemManageInterface.h"

using namespace System;
using namespace System::IO;
using namespace System::Text;
using namespace System::ComponentModel;
using namespace System::Diagnostics;
using namespace System::Drawing;
using namespace System::Windows::Forms;


namespace ClassRoom {


	/// <summary>
	/// CLogin 摘要
	///
	/// 警告: 如果更改此类的名称,则需要更改
	///          与此类所依赖的所有 .resx 文件关联的托管资源编译器工具的
	///          “资源文件名”属性。否则,
	///          设计器将不能与此窗体的关联
	///          本地化资源正确交互。
	/// </summary>
	public ref class Login : public System::Windows::Forms::Form
	{
	public:
		bool flag ;//标记符号,CheckInfo()返回值
		Login(void)
		{
			InitializeComponent();
			flag = false;
			/*StreamWriter^ sw = gcnew StreamWriter("C:\\UserInfo.txt");
			 try
				{
					 sw->Write("qq              ");
					 sw->Write("qq              ");

				 }
				 finally
				 {
					delete sw;
				 }*/
			//
			//TODO: 在此处添加构造函数代码
			//
		}
	protected:
		/// <summary>
		/// 清理所有正在使用的资源。
		/// </summary>
		~Login()
		{
			if (components)
			{
				delete components;
			}
		}
	private: System::Windows::Forms::GroupBox^  groupBox1;
	private: System::Windows::Forms::TextBox^  UserPass;
	private: System::Windows::Forms::TextBox^  UserName;
	private: System::Windows::Forms::Label^  label2;
	private: System::Windows::Forms::Label^  label1;
	private: System::Windows::Forms::Button^  ButtonLogin;
	private: System::Windows::Forms::Button^  ButtonCancel;
	protected: 

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

#pragma region Windows Form Designer generated code
		/// <summary>
		/// 设计器支持所需的方法 - 不要
		/// 使用代码编辑器修改此方法的内容。
		/// </summary>
		void InitializeComponent(void)
		{
			System::ComponentModel::ComponentResourceManager^  resources = (gcnew System::ComponentModel::ComponentResourceManager(Login::typeid));
			this->groupBox1 = (gcnew System::Windows::Forms::GroupBox());
			this->UserPass = (gcnew System::Windows::Forms::TextBox());
			this->UserName = (gcnew System::Windows::Forms::TextBox());
			this->label2 = (gcnew System::Windows::Forms::Label());
			this->label1 = (gcnew System::Windows::Forms::Label());
			this->ButtonLogin = (gcnew System::Windows::Forms::Button());
			this->ButtonCancel = (gcnew System::Windows::Forms::Button());
			this->groupBox1->SuspendLayout();
			this->SuspendLayout();
			// 
			// groupBox1
			// 
			this->groupBox1->BackColor = System::Drawing::Color::Transparent;
			this->groupBox1->Controls->Add(this->UserPass);
			this->groupBox1->Controls->Add(this->UserName);
			this->groupBox1->Controls->Add(this->label2);
			this->groupBox1->Controls->Add(this->label1);
			this->groupBox1->Location = System::Drawing::Point(12, 8);
			this->groupBox1->Name = L"groupBox1";
			this->groupBox1->Size = System::Drawing::Size(302, 102);
			this->groupBox1->TabIndex = 0;
			this->groupBox1->TabStop = false;
			this->groupBox1->Text = L"登录信息";
			// 
			// UserPass
			// 
			this->UserPass->Location = System::Drawing::Point(132, 60);
			this->UserPass->Name = L"UserPass";
			this->UserPass->PasswordChar = '*';
			this->UserPass->Size = System::Drawing::Size(133, 21);
			this->UserPass->TabIndex = 3;
			// 
			// UserName
			// 
			this->UserName->Location = System::Drawing::Point(132, 28);
			this->UserName->Name = L"UserName";
			this->UserName->Size = System::Drawing::Size(133, 21);
			this->UserName->TabIndex = 2;
			// 
			// label2
			// 
			this->label2->AutoSize = true;
			this->label2->BackColor = System::Drawing::Color::Transparent;
			this->label2->Location = System::Drawing::Point(61, 65);
			this->label2->Name = L"label2";
			this->label2->Size = System::Drawing::Size(53, 12);
			this->label2->TabIndex = 1;
			this->label2->Text = L"登录密码";
			// 
			// label1
			// 
			this->label1->AutoSize = true;
			this->label1->BackColor = System::Drawing::Color::Transparent;
			this->label1->Location = System::Drawing::Point(61, 35);
			this->label1->Name = L"label1";
			this->label1->Size = System::Drawing::Size(53, 12);
			this->label1->TabIndex = 0;
			this->label1->Text = L"用户名称";
			// 
			// ButtonLogin
			// 
			this->ButtonLogin->BackColor = System::Drawing::Color::Transparent;
			this->ButtonLogin->FlatStyle = System::Windows::Forms::FlatStyle::Popup;
			this->ButtonLogin->Location = System::Drawing::Point(108, 125);
			this->ButtonLogin->Name = L"ButtonLogin";
			this->ButtonLogin->Size = System::Drawing::Size(75, 23);
			this->ButtonLogin->TabIndex = 1;
			this->ButtonLogin->Text = L"登录";
			this->ButtonLogin->UseVisualStyleBackColor = false;
			this->ButtonLogin->Click += gcnew System::EventHandler(this, &Login::ButtonLogin_Click);
			// 
			// ButtonCancel
			// 
			this->ButtonCancel->BackColor = System::Drawing::Color::Transparent;
			this->ButtonCancel->FlatStyle = System::Windows::Forms::FlatStyle::Popup;
			this->ButtonCancel->Location = System::Drawing::Point(200, 125);
			this->ButtonCancel->Name = L"ButtonCancel";
			this->ButtonCancel->Size = System::Drawing::Size(75, 23);
			this->ButtonCancel->TabIndex = 2;
			this->ButtonCancel->Text = L"取消";
			this->ButtonCancel->UseVisualStyleBackColor = false;
			this->ButtonCancel->Click += gcnew System::EventHandler(this, &Login::ButtonCancel_Click);
			// 
			// Login
			// 
			this->AutoScaleDimensions = System::Drawing::SizeF(6, 12);
			this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
			this->BackgroundImage = (cli::safe_cast<System::Drawing::Image^  >(resources->GetObject(L"$this.BackgroundImage")));
			this->ClientSize = System::Drawing::Size(328, 198);
			this->Controls->Add(this->ButtonCancel);
			this->Controls->Add(this->ButtonLogin);
			this->Controls->Add(this->groupBox1);
			this->FormBorderStyle = System::Windows::Forms::FormBorderStyle::FixedSingle;
			this->KeyPreview = true;
			this->MaximizeBox = false;
			this->Name = L"Login";
			this->StartPosition = System::Windows::Forms::FormStartPosition::CenterScreen;
			this->Text = L"系统登录";
			this->Load += gcnew System::EventHandler(this, &Login::CLogin_Load);
			this->groupBox1->ResumeLayout(false);
			this->groupBox1->PerformLayout();
			this->ResumeLayout(false);

		}
#pragma endregion

	private: System::Void CLogin_Load(System::Object^  sender, System::EventArgs^  e) ;

	//取消
	private: System::Void ButtonCancel_Click(System::Object^  sender, System::EventArgs^  e) ;

	//系统登录
	private: System::Void ButtonLogin_Click(System::Object^  sender, System::EventArgs^  e) ;

    //检查用户名和密码是否存在
	public:  bool CheckInfo(String^ userName, String^ userPassWord);
};
}

⌨️ 快捷键说明

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