📄 form1.h
字号:
// toolStripButton3
//
this->toolStripButton3->Image = (cli::safe_cast<System::Drawing::Image^ >(resources->GetObject(L"toolStripButton3.Image")));
this->toolStripButton3->ImageAlign = System::Drawing::ContentAlignment::MiddleLeft;
this->toolStripButton3->ImageTransparentColor = System::Drawing::Color::Magenta;
this->toolStripButton3->Name = L"toolStripButton3";
this->toolStripButton3->Size = System::Drawing::Size(73, 22);
this->toolStripButton3->Text = L"系统登录";
this->toolStripButton3->MouseLeave += gcnew System::EventHandler(this, &Form1::ToolStripMenuItem_MouseLeave);
this->toolStripButton3->MouseHover += gcnew System::EventHandler(this, &Form1::ToolStripMenuItem_MouseHover);
this->toolStripButton3->Click += gcnew System::EventHandler(this, &Form1::MenuLogin_Click);
//
// toolStripButton1
//
this->toolStripButton1->Image = (cli::safe_cast<System::Drawing::Image^ >(resources->GetObject(L"toolStripButton1.Image")));
this->toolStripButton1->ImageAlign = System::Drawing::ContentAlignment::MiddleLeft;
this->toolStripButton1->ImageTransparentColor = System::Drawing::Color::Magenta;
this->toolStripButton1->Name = L"toolStripButton1";
this->toolStripButton1->Size = System::Drawing::Size(73, 22);
this->toolStripButton1->Text = L"系统退出";
this->toolStripButton1->MouseLeave += gcnew System::EventHandler(this, &Form1::ToolStripMenuItem_MouseLeave);
this->toolStripButton1->MouseHover += gcnew System::EventHandler(this, &Form1::ToolStripMenuItem_MouseHover);
this->toolStripButton1->Click += gcnew System::EventHandler(this, &Form1::MenuExit_Click);
//
// toolStripSeparator1
//
this->toolStripSeparator1->Name = L"toolStripSeparator1";
this->toolStripSeparator1->Size = System::Drawing::Size(6, 25);
this->toolStripSeparator1->MouseHover += gcnew System::EventHandler(this, &Form1::ToolStripMenuItem_MouseHover);
this->toolStripSeparator1->MouseLeave += gcnew System::EventHandler(this, &Form1::ToolStripMenuItem_MouseLeave);
//
// toolStripButton4
//
this->toolStripButton4->Image = (cli::safe_cast<System::Drawing::Image^ >(resources->GetObject(L"toolStripButton4.Image")));
this->toolStripButton4->ImageTransparentColor = System::Drawing::Color::Magenta;
this->toolStripButton4->Name = L"toolStripButton4";
this->toolStripButton4->Size = System::Drawing::Size(109, 22);
this->toolStripButton4->Text = L"操作员信息管理";
this->toolStripButton4->MouseLeave += gcnew System::EventHandler(this, &Form1::ToolStripMenuItem_MouseLeave);
this->toolStripButton4->MouseHover += gcnew System::EventHandler(this, &Form1::ToolStripMenuItem_MouseHover);
this->toolStripButton4->Click += gcnew System::EventHandler(this, &Form1::MenuOperator_Click);
//
// toolStripButton2
//
this->toolStripButton2->Image = (cli::safe_cast<System::Drawing::Image^ >(resources->GetObject(L"toolStripButton2.Image")));
this->toolStripButton2->ImageTransparentColor = System::Drawing::Color::Magenta;
this->toolStripButton2->Name = L"toolStripButton2";
this->toolStripButton2->Size = System::Drawing::Size(97, 22);
this->toolStripButton2->Text = L"图书信息管理";
this->toolStripButton2->MouseLeave += gcnew System::EventHandler(this, &Form1::ToolStripMenuItem_MouseLeave);
this->toolStripButton2->MouseHover += gcnew System::EventHandler(this, &Form1::ToolStripMenuItem_MouseHover);
this->toolStripButton2->Click += gcnew System::EventHandler(this, &Form1::MenuBookManage_Click);
//
// toolStripSeparator2
//
this->toolStripSeparator2->Name = L"toolStripSeparator2";
this->toolStripSeparator2->Size = System::Drawing::Size(6, 25);
this->toolStripSeparator2->MouseHover += gcnew System::EventHandler(this, &Form1::ToolStripMenuItem_MouseHover);
this->toolStripSeparator2->MouseLeave += gcnew System::EventHandler(this, &Form1::ToolStripMenuItem_MouseLeave);
//
// ButtonInStore
//
this->ButtonInStore->Image = (cli::safe_cast<System::Drawing::Image^ >(resources->GetObject(L"ButtonInStore.Image")));
this->ButtonInStore->ImageTransparentColor = System::Drawing::Color::Magenta;
this->ButtonInStore->Name = L"ButtonInStore";
this->ButtonInStore->Size = System::Drawing::Size(97, 22);
this->ButtonInStore->Text = L"图书入库管理";
this->ButtonInStore->MouseLeave += gcnew System::EventHandler(this, &Form1::ToolStripMenuItem_MouseLeave);
this->ButtonInStore->MouseHover += gcnew System::EventHandler(this, &Form1::ToolStripMenuItem_MouseHover);
this->ButtonInStore->Click += gcnew System::EventHandler(this, &Form1::MenuInStore_Click);
//
// toolStripButton5
//
this->toolStripButton5->Image = (cli::safe_cast<System::Drawing::Image^ >(resources->GetObject(L"toolStripButton5.Image")));
this->toolStripButton5->ImageTransparentColor = System::Drawing::Color::Magenta;
this->toolStripButton5->Name = L"toolStripButton5";
this->toolStripButton5->Size = System::Drawing::Size(97, 22);
this->toolStripButton5->Text = L"入库查询管理";
this->toolStripButton5->MouseLeave += gcnew System::EventHandler(this, &Form1::ToolStripMenuItem_MouseLeave);
this->toolStripButton5->MouseHover += gcnew System::EventHandler(this, &Form1::ToolStripMenuItem_MouseHover);
this->toolStripButton5->Click += gcnew System::EventHandler(this, &Form1::MenuInQuery_Click);
//
// StatusBar
//
this->StatusBar->GripStyle = System::Windows::Forms::ToolStripGripStyle::Visible;
this->StatusBar->Items->AddRange(gcnew cli::array< System::Windows::Forms::ToolStripItem^ >(8) {this->toolStripStatusLabel1,
this->HintLabel, this->toolStripStatusLabel3, this->OperatorLabel, this->toolStripStatusLabel2, this->DateLabel, this->toolStripStatusLabel4,
this->TimeLabel});
this->StatusBar->LayoutStyle = System::Windows::Forms::ToolStripLayoutStyle::Flow;
this->StatusBar->Location = System::Drawing::Point(0, 589);
this->StatusBar->Name = L"StatusBar";
this->StatusBar->Size = System::Drawing::Size(905, 19);
this->StatusBar->TabIndex = 2;
this->StatusBar->Text = L"statusStrip1";
//
// toolStripStatusLabel1
//
this->toolStripStatusLabel1->Name = L"toolStripStatusLabel1";
this->toolStripStatusLabel1->Size = System::Drawing::Size(47, 17);
this->toolStripStatusLabel1->Text = L"提示: ";
this->toolStripStatusLabel1->TextAlign = System::Drawing::ContentAlignment::MiddleLeft;
//
// HintLabel
//
this->HintLabel->AutoSize = false;
this->HintLabel->Name = L"HintLabel";
this->HintLabel->Size = System::Drawing::Size(400, 17);
this->HintLabel->TextAlign = System::Drawing::ContentAlignment::MiddleLeft;
//
// toolStripStatusLabel3
//
this->toolStripStatusLabel3->Name = L"toolStripStatusLabel3";
this->toolStripStatusLabel3->Size = System::Drawing::Size(53, 17);
this->toolStripStatusLabel3->Text = L"操作员:";
this->toolStripStatusLabel3->TextAlign = System::Drawing::ContentAlignment::MiddleLeft;
//
// OperatorLabel
//
this->OperatorLabel->AutoSize = false;
this->OperatorLabel->Name = L"OperatorLabel";
this->OperatorLabel->Size = System::Drawing::Size(80, 17);
this->OperatorLabel->TextAlign = System::Drawing::ContentAlignment::MiddleLeft;
//
// toolStripStatusLabel2
//
this->toolStripStatusLabel2->Name = L"toolStripStatusLabel2";
this->toolStripStatusLabel2->Size = System::Drawing::Size(65, 17);
this->toolStripStatusLabel2->Text = L"当前日期:";
this->toolStripStatusLabel2->TextAlign = System::Drawing::ContentAlignment::MiddleLeft;
//
// DateLabel
//
this->DateLabel->AutoSize = false;
this->DateLabel->Name = L"DateLabel";
this->DateLabel->Size = System::Drawing::Size(80, 17);
this->DateLabel->TextAlign = System::Drawing::ContentAlignment::MiddleLeft;
this->DateLabel->Click += gcnew System::EventHandler(this, &Form1::DateLabel_Click);
//
// toolStripStatusLabel4
//
this->toolStripStatusLabel4->Name = L"toolStripStatusLabel4";
this->toolStripStatusLabel4->Size = System::Drawing::Size(41, 17);
this->toolStripStatusLabel4->Text = L"时间:";
this->toolStripStatusLabel4->TextAlign = System::Drawing::ContentAlignment::MiddleLeft;
//
// TimeLabel
//
this->TimeLabel->Name = L"TimeLabel";
this->TimeLabel->Size = System::Drawing::Size(0, 17);
this->TimeLabel->TextAlign = System::Drawing::ContentAlignment::MiddleLeft;
//
// Timer
//
this->Timer->Enabled = true;
this->Timer->Interval = 500;
this->Timer->Tick += gcnew System::EventHandler(this, &Form1::Timer_Tick);
//
// Form1
//
this->AutoScaleDimensions = System::Drawing::SizeF(6, 12);
this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
this->AutoScroll = true;
this->AutoSize = true;
this->BackColor = System::Drawing::SystemColors::Control;
this->BackgroundImage = (cli::safe_cast<System::Drawing::Image^ >(resources->GetObject(L"$this.BackgroundImage")));
this->BackgroundImageLayout = System::Windows::Forms::ImageLayout::Stretch;
this->ClientSize = System::Drawing::Size(905, 608);
this->Controls->Add(this->StatusBar);
this->Controls->Add(this->ToolBar);
this->Controls->Add(this->Menu);
this->MainMenuStrip = this->Menu;
this->Name = L"Form1";
this->StartPosition = System::Windows::Forms::FormStartPosition::CenterScreen;
this->Text = L"Form1";
this->Shown += gcnew System::EventHandler(this, &Form1::Form1_Shown);
this->FormClosing += gcnew System::Windows::Forms::FormClosingEventHandler(this, &Form1::Form1_FormClosing);
this->Load += gcnew System::EventHandler(this, &Form1::Form1_Load);
this->Menu->ResumeLayout(false);
this->Menu->PerformLayout();
this->ToolBar->ResumeLayout(false);
this->ToolBar->PerformLayout();
this->StatusBar->ResumeLayout(false);
this->StatusBar->PerformLayout();
this->ResumeLayout(false);
this->PerformLayout();
}
#pragma endregion
private: System::Void Form1_Load(System::Object^ sender, System::EventArgs^ e) {
Text = "图书综合管理系统";
OperatorLabel->Text = CLogin::CurUser;
DateTime date = DateTime::Now;
//获取系统日期
DateLabel->Text = date.ToString("yyyy-MM-dd");
for (int i=0; i< Menu->Items->Count; i++)
{
Menu->Items[i]->MouseHover += gcnew System::EventHandler(this, &Form1::ToolStripMenuItem_MouseHover);
Menu->Items[i]->MouseLeave += gcnew System::EventHandler(this, &Form1::ToolStripMenuItem_MouseLeave);
for (int j = 0; j< ((ToolStripMenuItem^)(Menu->Items[i]))->DropDownItems->Count;j++ )
{
((ToolStripMenuItem^)(Menu->Items[i]))->DropDownItems[j]->MouseHover += gcnew System::EventHandler(this, &Form1::ToolStripMenuItem_MouseHover);
((ToolStripMenuItem^)(Menu->Items[i]))->DropDownItems[j]->MouseLeave += gcnew System::EventHandler(this, &Form1::ToolStripMenuItem_MouseLeave);
}
}
}
private: System::Void toolStripButton5_Click(System::Object^ sender, System::EventArgs^ e) {
}
//系统登录
private: System::Void MenuLogin_Click(System::Object^ sender, System::EventArgs^ e) {
CLogin^ login1 = gcnew CLogin();
login1->ShowDialog();
OperatorLabel->Text = CLogin::CurUser;
}
//调用用户管理窗口
private: System::Void MenuOperator_Click(System::Object^ sender, System::EventArgs^ e) {
UserInfoManage^ UserInfo = gcnew UserInfoManage();
UserInfo->ShowDialog(this);
}
private: System::Void Form1_Shown(System::Object^ sender, System::EventArgs^ e) {
}
private: System::Void MenuExit_Click(System::Object^ sender, System::EventArgs^ e) {
Close();
}
private: System::Void Form1_FormClosing(System::Object^ sender, System::Windows::Forms::FormClosingEventArgs^ e) {
if (MessageBox::Show("确实要退出系统吗?","提示",MessageBoxButtons::YesNo)==::DialogResult::No)
{
e->Cancel = true;
}
}
private: System::Void ToolStripMenuItem_MouseHover(System::Object^ sender, System::EventArgs^ e) {
HintLabel->Text = ((ToolStripItem^)sender)->Text;
}
private: System::Void ToolStripMenuItem_MouseLeave(System::Object^ sender, System::EventArgs^ e) {
HintLabel->Text ="";
}
private: System::Void DateLabel_Click(System::Object^ sender, System::EventArgs^ e) {
}
private: System::Void Timer_Tick(System::Object^ sender, System::EventArgs^ e) {
DateTime time = DateTime::Now;
TimeLabel->Text = time.ToString("hh:mm:ss");
}
private: System::Void MenuBookManage_Click(System::Object^ sender, System::EventArgs^ e) {
CBookInfoManage ^ BookInfo = gcnew CBookInfoManage();
BookInfo->ShowDialog();
}
private: System::Void MenuInStore_Click(System::Object^ sender, System::EventArgs^ e) {
CInStore^ inStore = gcnew CInStore();
inStore->ShowDialog();
}
//图书出库管理
private: System::Void MenuOutput_Click(System::Object^ sender, System::EventArgs^ e) {
COutStore ^ outStore = gcnew COutStore();
outStore->ShowDialog();
}
private: System::Void MenuInQuery_Click(System::Object^ sender, System::EventArgs^ e) {
CInStoreQuery^ inStoreQuery = gcnew CInStoreQuery();
inStoreQuery->ShowDialog();
}
private: System::Void MenuOutQuery_Click(System::Object^ sender, System::EventArgs^ e) {
COutStoreQuery^ outStoreQuery = gcnew COutStoreQuery();
outStoreQuery->ShowDialog();
}
};
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -