📄 communityform.h
字号:
this->dataGridViewTextBoxColumn7->DataPropertyName = L"小区网站";
this->dataGridViewTextBoxColumn7->HeaderText = L"小区网站";
this->dataGridViewTextBoxColumn7->Name = L"dataGridViewTextBoxColumn7";
this->dataGridViewTextBoxColumn7->ReadOnly = true;
//
// 浏览图像Button
//
this->浏览图像Button->Anchor = static_cast<System::Windows::Forms::AnchorStyles>((System::Windows::Forms::AnchorStyles::Top | System::Windows::Forms::AnchorStyles::Right));
this->浏览图像Button->Location = System::Drawing::Point(433, 82);
this->浏览图像Button->Name = L"浏览图像Button";
this->浏览图像Button->Size = System::Drawing::Size(99, 23);
this->浏览图像Button->TabIndex = 51;
this->浏览图像Button->Text = L"浏览图像...";
this->浏览图像Button->UseVisualStyleBackColor = true;
this->浏览图像Button->Click += gcnew System::EventHandler(this, &CommunityForm::浏览图像Button_Click);
//
// 小区网站TextBox
//
this->小区网站TextBox->DataBindings->Add((gcnew System::Windows::Forms::Binding(L"Text", this->小区信息BindingSource, L"小区网站", true)));
this->小区网站TextBox->Location = System::Drawing::Point(74, 111);
this->小区网站TextBox->Name = L"小区网站TextBox";
this->小区网站TextBox->Size = System::Drawing::Size(152, 21);
this->小区网站TextBox->TabIndex = 50;
//
// 小区信息DataGridView
//
this->小区信息DataGridView->AllowUserToAddRows = false;
this->小区信息DataGridView->AllowUserToDeleteRows = false;
this->小区信息DataGridView->Anchor = static_cast<System::Windows::Forms::AnchorStyles>((((System::Windows::Forms::AnchorStyles::Top | System::Windows::Forms::AnchorStyles::Bottom)
| System::Windows::Forms::AnchorStyles::Left)
| System::Windows::Forms::AnchorStyles::Right));
this->小区信息DataGridView->AutoGenerateColumns = false;
this->小区信息DataGridView->BackgroundColor = System::Drawing::Color::LightGray;
this->小区信息DataGridView->ColumnHeadersBorderStyle = System::Windows::Forms::DataGridViewHeaderBorderStyle::Sunken;
dataGridViewCellStyle1->Alignment = System::Windows::Forms::DataGridViewContentAlignment::MiddleCenter;
dataGridViewCellStyle1->BackColor = System::Drawing::SystemColors::ActiveCaption;
dataGridViewCellStyle1->Font = (gcnew System::Drawing::Font(L"宋体", 9, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point,
static_cast<System::Byte>(134)));
dataGridViewCellStyle1->ForeColor = System::Drawing::SystemColors::WindowText;
dataGridViewCellStyle1->SelectionBackColor = System::Drawing::SystemColors::Highlight;
dataGridViewCellStyle1->SelectionForeColor = System::Drawing::SystemColors::GradientActiveCaption;
dataGridViewCellStyle1->WrapMode = System::Windows::Forms::DataGridViewTriState::True;
this->小区信息DataGridView->ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1;
this->小区信息DataGridView->Columns->AddRange(gcnew cli::array< System::Windows::Forms::DataGridViewColumn^ >(11) {this->dataGridViewTextBoxColumn1,
this->dataGridViewTextBoxColumn2, this->dataGridViewTextBoxColumn3, this->dataGridViewTextBoxColumn4, this->dataGridViewTextBoxColumn5,
this->dataGridViewTextBoxColumn6, this->dataGridViewTextBoxColumn7, this->dataGridViewTextBoxColumn8, this->dataGridViewTextBoxColumn9,
this->dataGridViewTextBoxColumn10, this->dataGridViewTextBoxColumn11});
this->小区信息DataGridView->DataSource = this->小区信息BindingSource;
this->小区信息DataGridView->Location = System::Drawing::Point(10, 168);
this->小区信息DataGridView->MultiSelect = false;
this->小区信息DataGridView->Name = L"小区信息DataGridView";
this->小区信息DataGridView->ReadOnly = true;
dataGridViewCellStyle2->Alignment = System::Windows::Forms::DataGridViewContentAlignment::TopCenter;
dataGridViewCellStyle2->BackColor = System::Drawing::SystemColors::Control;
dataGridViewCellStyle2->Font = (gcnew System::Drawing::Font(L"宋体", 9, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,
static_cast<System::Byte>(134)));
dataGridViewCellStyle2->ForeColor = System::Drawing::SystemColors::WindowText;
dataGridViewCellStyle2->SelectionBackColor = System::Drawing::SystemColors::Highlight;
dataGridViewCellStyle2->SelectionForeColor = System::Drawing::SystemColors::HighlightText;
dataGridViewCellStyle2->WrapMode = System::Windows::Forms::DataGridViewTriState::True;
this->小区信息DataGridView->RowHeadersDefaultCellStyle = dataGridViewCellStyle2;
this->小区信息DataGridView->RowHeadersVisible = false;
dataGridViewCellStyle3->SelectionBackColor = System::Drawing::Color::Green;
this->小区信息DataGridView->RowsDefaultCellStyle = dataGridViewCellStyle3;
this->小区信息DataGridView->RowTemplate->Height = 23;
this->小区信息DataGridView->SelectionMode = System::Windows::Forms::DataGridViewSelectionMode::FullRowSelect;
this->小区信息DataGridView->Size = System::Drawing::Size(521, 237);
this->小区信息DataGridView->TabIndex = 48;
//
// 总负责人TextBox
//
this->总负责人TextBox->DataBindings->Add((gcnew System::Windows::Forms::Binding(L"Text", this->小区信息BindingSource, L"总负责人", true)));
this->总负责人TextBox->Location = System::Drawing::Point(297, 30);
this->总负责人TextBox->Name = L"总负责人TextBox";
this->总负责人TextBox->Size = System::Drawing::Size(66, 21);
this->总负责人TextBox->TabIndex = 31;
//
// 小区地址TextBox
//
this->小区地址TextBox->DataBindings->Add((gcnew System::Windows::Forms::Binding(L"Text", this->小区信息BindingSource, L"小区地址", true)));
this->小区地址TextBox->Location = System::Drawing::Point(74, 57);
this->小区地址TextBox->Name = L"小区地址TextBox";
this->小区地址TextBox->Size = System::Drawing::Size(289, 21);
this->小区地址TextBox->TabIndex = 33;
//
// 邮政编码TextBox
//
this->邮政编码TextBox->Anchor = static_cast<System::Windows::Forms::AnchorStyles>(((System::Windows::Forms::AnchorStyles::Top | System::Windows::Forms::AnchorStyles::Left)
| System::Windows::Forms::AnchorStyles::Right));
this->邮政编码TextBox->DataBindings->Add((gcnew System::Windows::Forms::Binding(L"Text", this->小区信息BindingSource, L"邮政编码", true)));
this->邮政编码TextBox->Location = System::Drawing::Point(434, 57);
this->邮政编码TextBox->Name = L"邮政编码TextBox";
this->邮政编码TextBox->Size = System::Drawing::Size(98, 21);
this->邮政编码TextBox->TabIndex = 35;
//
// 小区名称TextBox
//
this->小区名称TextBox->DataBindings->Add((gcnew System::Windows::Forms::Binding(L"Text", this->小区信息BindingSource, L"小区名称", true)));
this->小区名称TextBox->Location = System::Drawing::Point(74, 30);
this->小区名称TextBox->Name = L"小区名称TextBox";
this->小区名称TextBox->Size = System::Drawing::Size(152, 21);
this->小区名称TextBox->TabIndex = 29;
//
// 服务电话TextBox
//
this->服务电话TextBox->Anchor = static_cast<System::Windows::Forms::AnchorStyles>(((System::Windows::Forms::AnchorStyles::Top | System::Windows::Forms::AnchorStyles::Left)
| System::Windows::Forms::AnchorStyles::Right));
this->服务电话TextBox->DataBindings->Add((gcnew System::Windows::Forms::Binding(L"Text", this->小区信息BindingSource, L"服务电话", true)));
this->服务电话TextBox->Location = System::Drawing::Point(434, 30);
this->服务电话TextBox->Name = L"服务电话TextBox";
this->服务电话TextBox->Size = System::Drawing::Size(98, 21);
this->服务电话TextBox->TabIndex = 37;
//
// 电子信箱TextBox
//
this->电子信箱TextBox->DataBindings->Add((gcnew System::Windows::Forms::Binding(L"Text", this->小区信息BindingSource, L"电子信箱", true)));
this->电子信箱TextBox->Location = System::Drawing::Point(74, 84);
this->电子信箱TextBox->Name = L"电子信箱TextBox";
this->电子信箱TextBox->Size = System::Drawing::Size(152, 21);
this->电子信箱TextBox->TabIndex = 39;
//
// 背景图像TextBox
//
this->背景图像TextBox->Anchor = static_cast<System::Windows::Forms::AnchorStyles>(((System::Windows::Forms::AnchorStyles::Top | System::Windows::Forms::AnchorStyles::Left)
| System::Windows::Forms::AnchorStyles::Right));
this->背景图像TextBox->DataBindings->Add((gcnew System::Windows::Forms::Binding(L"Text", this->小区信息BindingSource, L"背景图像", true)));
this->背景图像TextBox->Location = System::Drawing::Point(297, 84);
this->背景图像TextBox->Name = L"背景图像TextBox";
this->背景图像TextBox->ReadOnly = true;
this->背景图像TextBox->Size = System::Drawing::Size(129, 21);
this->背景图像TextBox->TabIndex = 41;
//
// 标志图标TextBox
//
this->标志图标TextBox->Anchor = static_cast<System::Windows::Forms::AnchorStyles>(((System::Windows::Forms::AnchorStyles::Top | System::Windows::Forms::AnchorStyles::Left)
| System::Windows::Forms::AnchorStyles::Right));
this->标志图标TextBox->DataBindings->Add((gcnew System::Windows::Forms::Binding(L"Text", this->小区信息BindingSource, L"标志图标", true)));
this->标志图标TextBox->Location = System::Drawing::Point(297, 111);
this->标志图标TextBox->Name = L"标志图标TextBox";
this->标志图标TextBox->ReadOnly = true;
this->标志图标TextBox->Size = System::Drawing::Size(129, 21);
this->标志图标TextBox->TabIndex = 43;
//
// 系统名称TextBox
//
this->系统名称TextBox->DataBindings->Add((gcnew System::Windows::Forms::Binding(L"Text", this->小区信息BindingSource, L"系统名称", true)));
this->系统名称TextBox->Location = System::Drawing::Point(74, 138);
this->系统名称TextBox->Name = L"系统名称TextBox";
this->系统名称TextBox->Size = System::Drawing::Size(289, 21);
this->系统名称TextBox->TabIndex = 45;
//
// 优先级TextBox
//
this->优先级TextBox->Anchor = static_cast<System::Windows::Forms::AnchorStyles>(((System::Windows::Forms::AnchorStyles::Top | System::Windows::Forms::AnchorStyles::Left)
| System::Windows::Forms::AnchorStyles::Right));
this->优先级TextBox->DataBindings->Add((gcnew System::Windows::Forms::Binding(L"Text", this->小区信息BindingSource, L"优先级", true)));
this->优先级TextBox->Location = System::Drawing::Point(434, 138);
this->优先级TextBox->Name = L"优先级TextBox";
this->优先级TextBox->Size = System::Drawing::Size(98, 21);
this->优先级TextBox->TabIndex = 47;
//
// CommunityForm
//
this->AutoScaleDimensions = System::Drawing::SizeF(6, 12);
this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
this->ClientSize = System::Drawing::Size(542, 416);
this->Controls->Add(this->浏览图标Button);
this->Controls->Add(this->浏览图像Button);
this->Controls->Add(小区网站Label);
this->Controls->Add(this->小区网站TextBox);
this->Controls->Add(this->小区信息DataGridView);
this->Controls->Add(小区名称Label);
this->Controls->Add(总负责人Label);
this->Controls->Add(小区地址Label);
this->Controls->Add(邮政编码Label);
this->Controls->Add(服务电话Label);
this->Controls->Add(电子信箱Label);
this->Controls->Add(背景图像Label);
this->Controls->Add(标志图标Label);
this->Controls->Add(系统名称Label);
this->Controls->Add(优先级Label);
this->Controls->Add(this->总负责人TextBox);
this->Controls->Add(this->小区地址TextBox);
this->Controls->Add(this->邮政编码TextBox);
this->Controls->Add(this->小区名称TextBox);
this->Controls->Add(this->服务电话TextBox);
this->Controls->Add(this->电子信箱TextBox);
this->Controls->Add(this->背景图像TextBox);
this->Controls->Add(this->标志图标TextBox);
this->Controls->Add(this->系统名称TextBox);
this->Controls->Add(this->优先级TextBox);
this->Controls->Add(this->小区信息BindingNavigator);
this->Name = L"CommunityForm";
this->ShowInTaskbar = false;
this->StartPosition = System::Windows::Forms::FormStartPosition::CenterParent;
this->Text = L"系统管理[小区信息设置]";
this->Load += gcnew System::EventHandler(this, &CommunityForm::CommunityForm_Load);
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->DBCommunityDataSet))->EndInit();
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->小区信息BindingSource))->EndInit();
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->小区信息BindingNavigator))->EndInit();
this->小区信息BindingNavigator->ResumeLayout(false);
this->小区信息BindingNavigator->PerformLayout();
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->小区信息DataGridView))->EndInit();
this->ResumeLayout(false);
this->PerformLayout();
}
#pragma endregion
private: System::Void 小区信息BindingNavigatorSaveItem_Click(System::Object^ sender, System::EventArgs^ e)
{
this->Validate();
this->小区信息BindingSource->EndEdit();
this->小区信息TableAdapter->Update(this->DBCommunityDataSet->小区信息);
}
private: System::Void CommunityForm_Load(System::Object^ sender, System::EventArgs^ e)
{// TODO: 这行代码将数据加载到表“DBCommunityDataSet.小区信息”中
this->小区信息TableAdapter->Fill(this->DBCommunityDataSet->小区信息);
}
private: System::Void 浏览图像Button_Click(System::Object^ sender, System::EventArgs^ e)
{
OpenFileDialog^ MyDlg = gcnew OpenFileDialog();
MyDlg->Title = "选择图像";
MyDlg->Filter = "JPEG图像文件(*.jpg)|*.jpg|所有图像文件(JPeg, Gif, Bmp, etc.)|*.jpg;*.jpeg; *.gif;*.bmp;*.tif; *.tiff; *.png|所有文件(*.*)|*.*";
if (MyDlg->ShowDialog() == System::Windows::Forms::DialogResult::OK)
{
this->背景图像TextBox->Text=System::IO::Path::GetFileName(MyDlg->FileName);
String^ MySrcPath = MyDlg->FileName;
String^ MyDestPath = Application::StartupPath + "\\Data\\" + this->背景图像TextBox->Text;
System::IO::File::Copy(MySrcPath, MyDestPath);
}
}
private: System::Void 浏览图标Button_Click(System::Object^ sender, System::EventArgs^ e)
{
OpenFileDialog^ MyDlg = gcnew OpenFileDialog();
MyDlg->Title = "选择图标";
MyDlg->Filter = "图标文件(*.ico)|*.ico|所有图像文件(JPeg, Gif, Bmp, etc.)|*.jpg;*.jpeg; *.gif;*.bmp;*.tif; *.tiff; *.png| JPeg图像文件(*.jpg;*.jpeg) |*.jpg;*.jpeg |BMP图像文件(*.bmp)|*.bmp|Tiff图像文件(*.tif;*.tiff)| *.tif;*.tiff|Png图像文件(*.png)| *.png |所有文件(*.*)|*.*";
if (MyDlg->ShowDialog() ==System::Windows::Forms::DialogResult::OK)
{
this->标志图标TextBox->Text = System::IO::Path::GetFileName(MyDlg->FileName);
String^ MySrcPath = MyDlg->FileName;
String^ MyDestPath = Application::StartupPath + "\\Data\\" + this->标志图标TextBox->Text;
System::IO::File::Copy(MySrcPath, MyDestPath);
}
}
};
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -