📄 printform.h
字号:
//文件名:PrintForm.h
#pragma once
using namespace System;
using namespace System::ComponentModel;
using namespace System::Collections;
using namespace System::Windows::Forms;
using namespace System::Data;
using namespace System::Drawing;
using namespace System::Data::SqlClient;
namespace 宾馆酒店管理系统 {
/// <summary>
/// PrintForm 摘要
///
/// 警告: 如果更改此类的名称,则需要更改
/// 与此类所依赖的所有 .resx 文件关联的托管资源编译器工具的
/// “资源文件名”属性。否则,
/// 设计器将不能与此窗体的关联
/// 本地化资源正确交互。
/// </summary>
public ref class PrintForm : public System::Windows::Forms::Form
{
public:
PrintForm(void)
{
InitializeComponent();
//
//TODO: 在此处添加构造函数代码
//
}
protected:
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
~PrintForm()
{
if (components)
{
delete components;
}
}
private: System::Windows::Forms::GroupBox^ 帐单GroupBox;
protected:
private: System::Windows::Forms::DataGridView^ 帐单DataGridView;
private: System::Windows::Forms::Button^ 查询Button;
private: System::Windows::Forms::Button^ 打印Button;
private: System::Windows::Forms::Label^ label4;
private: System::Windows::Forms::TextBox^ 酒店房号TextBox;
private: System::Windows::Forms::TextBox^ 客人姓名TextBox;
private: System::Windows::Forms::Label^ label3;
private: System::Windows::Forms::ComboBox^ 帐单类型ComboBox;
private: System::Windows::Forms::PrintPreviewDialog^ printPreviewDialog1;
private: System::Windows::Forms::Label^ label1;
private: System::Drawing::Printing::PrintDocument^ printDocument1;
private:
/// <summary>
/// 必需的设计器变量。
/// </summary>
System::ComponentModel::Container ^components;
#pragma region Windows Form Designer generated code
/// <summary>
/// 设计器支持所需的方法 - 不要
/// 使用代码编辑器修改此方法的内容。
/// </summary>
void InitializeComponent(void)
{
System::Windows::Forms::DataGridViewCellStyle^ dataGridViewCellStyle1 = (gcnew System::Windows::Forms::DataGridViewCellStyle());
System::ComponentModel::ComponentResourceManager^ resources = (gcnew System::ComponentModel::ComponentResourceManager(PrintForm::typeid));
this->帐单GroupBox = (gcnew System::Windows::Forms::GroupBox());
this->帐单DataGridView = (gcnew System::Windows::Forms::DataGridView());
this->查询Button = (gcnew System::Windows::Forms::Button());
this->打印Button = (gcnew System::Windows::Forms::Button());
this->label4 = (gcnew System::Windows::Forms::Label());
this->酒店房号TextBox = (gcnew System::Windows::Forms::TextBox());
this->客人姓名TextBox = (gcnew System::Windows::Forms::TextBox());
this->label3 = (gcnew System::Windows::Forms::Label());
this->帐单类型ComboBox = (gcnew System::Windows::Forms::ComboBox());
this->printPreviewDialog1 = (gcnew System::Windows::Forms::PrintPreviewDialog());
this->label1 = (gcnew System::Windows::Forms::Label());
this->printDocument1 = (gcnew System::Drawing::Printing::PrintDocument());
this->帐单GroupBox->SuspendLayout();
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->帐单DataGridView))->BeginInit();
this->SuspendLayout();
//
// 帐单GroupBox
//
this->帐单GroupBox->Controls->Add(this->帐单DataGridView);
this->帐单GroupBox->Location = System::Drawing::Point(5, 32);
this->帐单GroupBox->Name = L"帐单GroupBox";
this->帐单GroupBox->Size = System::Drawing::Size(533, 378);
this->帐单GroupBox->TabIndex = 19;
this->帐单GroupBox->TabStop = false;
this->帐单GroupBox->Text = L"旅客入住单";
//
// 帐单DataGridView
//
this->帐单DataGridView->BackgroundColor = System::Drawing::SystemColors::Highlight;
this->帐单DataGridView->ColumnHeadersHeightSizeMode = System::Windows::Forms::DataGridViewColumnHeadersHeightSizeMode::AutoSize;
this->帐单DataGridView->GridColor = System::Drawing::Color::FromArgb(static_cast<System::Int32>(static_cast<System::Byte>(192)), static_cast<System::Int32>(static_cast<System::Byte>(64)),
static_cast<System::Int32>(static_cast<System::Byte>(0)));
this->帐单DataGridView->Location = System::Drawing::Point(5, 17);
this->帐单DataGridView->Name = L"帐单DataGridView";
this->帐单DataGridView->ReadOnly = true;
this->帐单DataGridView->RowHeadersVisible = false;
dataGridViewCellStyle1->BackColor = System::Drawing::Color::Green;
dataGridViewCellStyle1->ForeColor = System::Drawing::Color::Yellow;
this->帐单DataGridView->RowsDefaultCellStyle = dataGridViewCellStyle1;
this->帐单DataGridView->RowTemplate->Height = 23;
this->帐单DataGridView->SelectionMode = System::Windows::Forms::DataGridViewSelectionMode::FullRowSelect;
this->帐单DataGridView->Size = System::Drawing::Size(524, 355);
this->帐单DataGridView->TabIndex = 1;
//
// 查询Button
//
this->查询Button->Image = (cli::safe_cast<System::Drawing::Image^ >(resources->GetObject(L"查询Button.Image")));
this->查询Button->Location = System::Drawing::Point(406, 5);
this->查询Button->Name = L"查询Button";
this->查询Button->Size = System::Drawing::Size(65, 25);
this->查询Button->TabIndex = 17;
this->查询Button->Text = L"查询";
this->查询Button->TextAlign = System::Drawing::ContentAlignment::MiddleRight;
this->查询Button->TextImageRelation = System::Windows::Forms::TextImageRelation::ImageBeforeText;
this->查询Button->UseVisualStyleBackColor = true;
this->查询Button->Click += gcnew System::EventHandler(this, &PrintForm::查询Button_Click);
//
// 打印Button
//
this->打印Button->Image = (cli::safe_cast<System::Drawing::Image^ >(resources->GetObject(L"打印Button.Image")));
this->打印Button->Location = System::Drawing::Point(475, 5);
this->打印Button->Name = L"打印Button";
this->打印Button->Size = System::Drawing::Size(65, 25);
this->打印Button->TabIndex = 18;
this->打印Button->Text = L"打印";
this->打印Button->TextAlign = System::Drawing::ContentAlignment::MiddleRight;
this->打印Button->TextImageRelation = System::Windows::Forms::TextImageRelation::ImageBeforeText;
this->打印Button->UseVisualStyleBackColor = true;
this->打印Button->Click += gcnew System::EventHandler(this, &PrintForm::打印Button_Click);
//
// label4
//
this->label4->AutoSize = true;
this->label4->Location = System::Drawing::Point(165, 12);
this->label4->Name = L"label4";
this->label4->Size = System::Drawing::Size(65, 12);
this->label4->TabIndex = 15;
this->label4->Text = L"酒店房号:";
//
// 酒店房号TextBox
//
this->酒店房号TextBox->Location = System::Drawing::Point(232, 7);
this->酒店房号TextBox->Name = L"酒店房号TextBox";
this->酒店房号TextBox->Size = System::Drawing::Size(54, 21);
this->酒店房号TextBox->TabIndex = 16;
this->酒店房号TextBox->Text = L"RZX";
//
// 客人姓名TextBox
//
this->客人姓名TextBox->Location = System::Drawing::Point(354, 7);
this->客人姓名TextBox->Name = L"客人姓名TextBox";
this->客人姓名TextBox->Size = System::Drawing::Size(48, 21);
this->客人姓名TextBox->TabIndex = 14;
this->客人姓名TextBox->Text = L"%%";
//
// label3
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -