📄 inputpass.h
字号:
#pragma once
#include "DBBase.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 FAP
{
/// <summary>
/// Summary for InputPass
///
/// WARNING: If you change the name of this class, you will need to change the
/// 'Resource File Name' property for the managed resource compiler tool
/// associated with all .resx files this class depends on. Otherwise,
/// the designers will not be able to interact properly with localized
/// resources associated with this form.
/// </summary>
public __gc class InputPass : public System::Windows::Forms::Form
{
public:
InputPass(void)
{
InitializeComponent();
}
InputPass(String * strPro)
{
InitializeComponent();
blnPass = false;
DBPass = new DBBase();
strProcess = strPro;
}
DBBase *DBPass;
String *strProcess;
bool blnPass;
protected:
void Dispose(Boolean disposing)
{
if (disposing && components)
{
components->Dispose();
}
__super::Dispose(disposing);
}
private: System::Windows::Forms::Label * label1;
private: System::Windows::Forms::Button * button1;
private: System::Windows::Forms::Button * button2;
private: System::Windows::Forms::TextBox * txtPass;
private:
/// <summary>
/// Required designer variable.
/// </summary>
System::ComponentModel::Container* components;
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
void InitializeComponent(void)
{
System::Resources::ResourceManager * resources = new System::Resources::ResourceManager(__typeof(FAP::InputPass));
this->txtPass = new System::Windows::Forms::TextBox();
this->label1 = new System::Windows::Forms::Label();
this->button1 = new System::Windows::Forms::Button();
this->button2 = new System::Windows::Forms::Button();
this->SuspendLayout();
//
// txtPass
//
this->txtPass->AccessibleDescription = resources->GetString(S"txtPass.AccessibleDescription");
this->txtPass->AccessibleName = resources->GetString(S"txtPass.AccessibleName");
this->txtPass->Anchor = (*__try_cast<__box System::Windows::Forms::AnchorStyles * >(resources->GetObject(S"txtPass.Anchor")));
this->txtPass->AutoSize = (*__try_cast<__box System::Boolean * >(resources->GetObject(S"txtPass.AutoSize")));
this->txtPass->BackgroundImage = (__try_cast<System::Drawing::Image * >(resources->GetObject(S"txtPass.BackgroundImage")));
this->txtPass->Dock = (*__try_cast<__box System::Windows::Forms::DockStyle * >(resources->GetObject(S"txtPass.Dock")));
this->txtPass->Enabled = (*__try_cast<__box System::Boolean * >(resources->GetObject(S"txtPass.Enabled")));
this->txtPass->Font = (__try_cast<System::Drawing::Font * >(resources->GetObject(S"txtPass.Font")));
this->txtPass->ImeMode = (*__try_cast<__box System::Windows::Forms::ImeMode * >(resources->GetObject(S"txtPass.ImeMode")));
this->txtPass->Location = (*__try_cast<__box System::Drawing::Point * >(resources->GetObject(S"txtPass.Location")));
this->txtPass->MaxLength = (*__try_cast<__box System::Int32 * >(resources->GetObject(S"txtPass.MaxLength")));
this->txtPass->Multiline = (*__try_cast<__box System::Boolean * >(resources->GetObject(S"txtPass.Multiline")));
this->txtPass->Name = S"txtPass";
this->txtPass->PasswordChar = (*__try_cast<__box System::Char * >(resources->GetObject(S"txtPass.PasswordChar")));
this->txtPass->RightToLeft = (*__try_cast<__box System::Windows::Forms::RightToLeft * >(resources->GetObject(S"txtPass.RightToLeft")));
this->txtPass->ScrollBars = (*__try_cast<__box System::Windows::Forms::ScrollBars * >(resources->GetObject(S"txtPass.ScrollBars")));
this->txtPass->Size = (*__try_cast<__box System::Drawing::Size * >(resources->GetObject(S"txtPass.Size")));
this->txtPass->TabIndex = (*__try_cast<__box System::Int32 * >(resources->GetObject(S"txtPass.TabIndex")));
this->txtPass->Text = resources->GetString(S"txtPass.Text");
this->txtPass->TextAlign = (*__try_cast<__box System::Windows::Forms::HorizontalAlignment * >(resources->GetObject(S"txtPass.TextAlign")));
this->txtPass->Visible = (*__try_cast<__box System::Boolean * >(resources->GetObject(S"txtPass.Visible")));
this->txtPass->WordWrap = (*__try_cast<__box System::Boolean * >(resources->GetObject(S"txtPass.WordWrap")));
//
// label1
//
this->label1->AccessibleDescription = resources->GetString(S"label1.AccessibleDescription");
this->label1->AccessibleName = resources->GetString(S"label1.AccessibleName");
this->label1->Anchor = (*__try_cast<__box System::Windows::Forms::AnchorStyles * >(resources->GetObject(S"label1.Anchor")));
this->label1->AutoSize = (*__try_cast<__box System::Boolean * >(resources->GetObject(S"label1.AutoSize")));
this->label1->Dock = (*__try_cast<__box System::Windows::Forms::DockStyle * >(resources->GetObject(S"label1.Dock")));
this->label1->Enabled = (*__try_cast<__box System::Boolean * >(resources->GetObject(S"label1.Enabled")));
this->label1->Font = (__try_cast<System::Drawing::Font * >(resources->GetObject(S"label1.Font")));
this->label1->Image = (__try_cast<System::Drawing::Image * >(resources->GetObject(S"label1.Image")));
this->label1->ImageAlign = (*__try_cast<__box System::Drawing::ContentAlignment * >(resources->GetObject(S"label1.ImageAlign")));
this->label1->ImageIndex = (*__try_cast<__box System::Int32 * >(resources->GetObject(S"label1.ImageIndex")));
this->label1->ImeMode = (*__try_cast<__box System::Windows::Forms::ImeMode * >(resources->GetObject(S"label1.ImeMode")));
this->label1->Location = (*__try_cast<__box System::Drawing::Point * >(resources->GetObject(S"label1.Location")));
this->label1->Name = S"label1";
this->label1->RightToLeft = (*__try_cast<__box System::Windows::Forms::RightToLeft * >(resources->GetObject(S"label1.RightToLeft")));
this->label1->Size = (*__try_cast<__box System::Drawing::Size * >(resources->GetObject(S"label1.Size")));
this->label1->TabIndex = (*__try_cast<__box System::Int32 * >(resources->GetObject(S"label1.TabIndex")));
this->label1->Text = resources->GetString(S"label1.Text");
this->label1->TextAlign = (*__try_cast<__box System::Drawing::ContentAlignment * >(resources->GetObject(S"label1.TextAlign")));
this->label1->Visible = (*__try_cast<__box System::Boolean * >(resources->GetObject(S"label1.Visible")));
//
// button1
//
this->button1->AccessibleDescription = resources->GetString(S"button1.AccessibleDescription");
this->button1->AccessibleName = resources->GetString(S"button1.AccessibleName");
this->button1->Anchor = (*__try_cast<__box System::Windows::Forms::AnchorStyles * >(resources->GetObject(S"button1.Anchor")));
this->button1->BackgroundImage = (__try_cast<System::Drawing::Image * >(resources->GetObject(S"button1.BackgroundImage")));
this->button1->Dock = (*__try_cast<__box System::Windows::Forms::DockStyle * >(resources->GetObject(S"button1.Dock")));
this->button1->Enabled = (*__try_cast<__box System::Boolean * >(resources->GetObject(S"button1.Enabled")));
this->button1->FlatStyle = (*__try_cast<__box System::Windows::Forms::FlatStyle * >(resources->GetObject(S"button1.FlatStyle")));
this->button1->Font = (__try_cast<System::Drawing::Font * >(resources->GetObject(S"button1.Font")));
this->button1->Image = (__try_cast<System::Drawing::Image * >(resources->GetObject(S"button1.Image")));
this->button1->ImageAlign = (*__try_cast<__box System::Drawing::ContentAlignment * >(resources->GetObject(S"button1.ImageAlign")));
this->button1->ImageIndex = (*__try_cast<__box System::Int32 * >(resources->GetObject(S"button1.ImageIndex")));
this->button1->ImeMode = (*__try_cast<__box System::Windows::Forms::ImeMode * >(resources->GetObject(S"button1.ImeMode")));
this->button1->Location = (*__try_cast<__box System::Drawing::Point * >(resources->GetObject(S"button1.Location")));
this->button1->Name = S"button1";
this->button1->RightToLeft = (*__try_cast<__box System::Windows::Forms::RightToLeft * >(resources->GetObject(S"button1.RightToLeft")));
this->button1->Size = (*__try_cast<__box System::Drawing::Size * >(resources->GetObject(S"button1.Size")));
this->button1->TabIndex = (*__try_cast<__box System::Int32 * >(resources->GetObject(S"button1.TabIndex")));
this->button1->Text = resources->GetString(S"button1.Text");
this->button1->TextAlign = (*__try_cast<__box System::Drawing::ContentAlignment * >(resources->GetObject(S"button1.TextAlign")));
this->button1->Visible = (*__try_cast<__box System::Boolean * >(resources->GetObject(S"button1.Visible")));
this->button1->Click += new System::EventHandler(this, button1_Click);
//
// button2
//
this->button2->AccessibleDescription = resources->GetString(S"button2.AccessibleDescription");
this->button2->AccessibleName = resources->GetString(S"button2.AccessibleName");
this->button2->Anchor = (*__try_cast<__box System::Windows::Forms::AnchorStyles * >(resources->GetObject(S"button2.Anchor")));
this->button2->BackgroundImage = (__try_cast<System::Drawing::Image * >(resources->GetObject(S"button2.BackgroundImage")));
this->button2->DialogResult = System::Windows::Forms::DialogResult::Cancel;
this->button2->Dock = (*__try_cast<__box System::Windows::Forms::DockStyle * >(resources->GetObject(S"button2.Dock")));
this->button2->Enabled = (*__try_cast<__box System::Boolean * >(resources->GetObject(S"button2.Enabled")));
this->button2->FlatStyle = (*__try_cast<__box System::Windows::Forms::FlatStyle * >(resources->GetObject(S"button2.FlatStyle")));
this->button2->Font = (__try_cast<System::Drawing::Font * >(resources->GetObject(S"button2.Font")));
this->button2->Image = (__try_cast<System::Drawing::Image * >(resources->GetObject(S"button2.Image")));
this->button2->ImageAlign = (*__try_cast<__box System::Drawing::ContentAlignment * >(resources->GetObject(S"button2.ImageAlign")));
this->button2->ImageIndex = (*__try_cast<__box System::Int32 * >(resources->GetObject(S"button2.ImageIndex")));
this->button2->ImeMode = (*__try_cast<__box System::Windows::Forms::ImeMode * >(resources->GetObject(S"button2.ImeMode")));
this->button2->Location = (*__try_cast<__box System::Drawing::Point * >(resources->GetObject(S"button2.Location")));
this->button2->Name = S"button2";
this->button2->RightToLeft = (*__try_cast<__box System::Windows::Forms::RightToLeft * >(resources->GetObject(S"button2.RightToLeft")));
this->button2->Size = (*__try_cast<__box System::Drawing::Size * >(resources->GetObject(S"button2.Size")));
this->button2->TabIndex = (*__try_cast<__box System::Int32 * >(resources->GetObject(S"button2.TabIndex")));
this->button2->Text = resources->GetString(S"button2.Text");
this->button2->TextAlign = (*__try_cast<__box System::Drawing::ContentAlignment * >(resources->GetObject(S"button2.TextAlign")));
this->button2->Visible = (*__try_cast<__box System::Boolean * >(resources->GetObject(S"button2.Visible")));
this->button2->Click += new System::EventHandler(this, button2_Click);
//
// InputPass
//
this->AcceptButton = this->button1;
this->AccessibleDescription = resources->GetString(S"$this.AccessibleDescription");
this->AccessibleName = resources->GetString(S"$this.AccessibleName");
this->AutoScaleBaseSize = (*__try_cast<__box System::Drawing::Size * >(resources->GetObject(S"$this.AutoScaleBaseSize")));
this->AutoScroll = (*__try_cast<__box System::Boolean * >(resources->GetObject(S"$this.AutoScroll")));
this->AutoScrollMargin = (*__try_cast<__box System::Drawing::Size * >(resources->GetObject(S"$this.AutoScrollMargin")));
this->AutoScrollMinSize = (*__try_cast<__box System::Drawing::Size * >(resources->GetObject(S"$this.AutoScrollMinSize")));
this->BackgroundImage = (__try_cast<System::Drawing::Image * >(resources->GetObject(S"$this.BackgroundImage")));
this->CancelButton = this->button2;
this->ClientSize = (*__try_cast<__box System::Drawing::Size * >(resources->GetObject(S"$this.ClientSize")));
this->Controls->Add(this->button2);
this->Controls->Add(this->button1);
this->Controls->Add(this->label1);
this->Controls->Add(this->txtPass);
this->Enabled = (*__try_cast<__box System::Boolean * >(resources->GetObject(S"$this.Enabled")));
this->Font = (__try_cast<System::Drawing::Font * >(resources->GetObject(S"$this.Font")));
this->Icon = (__try_cast<System::Drawing::Icon * >(resources->GetObject(S"$this.Icon")));
this->ImeMode = (*__try_cast<__box System::Windows::Forms::ImeMode * >(resources->GetObject(S"$this.ImeMode")));
this->Location = (*__try_cast<__box System::Drawing::Point * >(resources->GetObject(S"$this.Location")));
this->MaximumSize = (*__try_cast<__box System::Drawing::Size * >(resources->GetObject(S"$this.MaximumSize")));
this->MinimumSize = (*__try_cast<__box System::Drawing::Size * >(resources->GetObject(S"$this.MinimumSize")));
this->Name = S"InputPass";
this->RightToLeft = (*__try_cast<__box System::Windows::Forms::RightToLeft * >(resources->GetObject(S"$this.RightToLeft")));
this->StartPosition = (*__try_cast<__box System::Windows::Forms::FormStartPosition * >(resources->GetObject(S"$this.StartPosition")));
this->Text = resources->GetString(S"$this.Text");
this->Load += new System::EventHandler(this, InputPass_Load);
this->ResumeLayout(false);
}
private: System::Void button1_Click(System::Object * sender, System::EventArgs * e)
{
OleDbDataReader * dReadTmp;
String * strPassTmp;
if (txtPass->Text->CompareTo(S"") == 0){
MessageBox::Show(S"请输入密码!!");
return;
}
String * strSQL ;
strSQL = S" select * from PRO_PASS where PROCESS_NO = '";
strSQL = String::Concat(strSQL,strProcess,S"'");
DBPass->blnCnnOpen();
dReadTmp = DBPass->dReadSQL_Select(strSQL);
while (dReadTmp->Read()) {
if (dReadTmp->IsDBNull(1)==true){
strPassTmp = S"";
break;
}
strPassTmp = dReadTmp->GetString(1);
break;
}
dReadTmp->Close();
DBPass->blnCnnClose();
if (strPassTmp->CompareTo(txtPass->Text) == 0) {
blnPass = true;
}
else{
blnPass = false;
}
this->Close();
}
private: System::Void button2_Click(System::Object * sender, System::EventArgs * e)
{
blnPass = false;
this->Close();
}
private: System::Void InputPass_Load(System::Object * sender, System::EventArgs * e)
{
txtPass->Text = S"";
}
};
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -