?? login.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 + -