📄 form1.h
字号:
this->bindingNavigatorCountItem->Text = L"of {0}";
this->bindingNavigatorCountItem->ToolTipText = L"Total number of items";
//
// bindingNavigatorSeparator1
//
this->bindingNavigatorSeparator1->Name = L"bindingNavigatorSeparator";
this->bindingNavigatorSeparator1->Size = System::Drawing::Size(6, 6);
//
// bindingNavigatorMoveNextItem
//
this->bindingNavigatorMoveNextItem->DisplayStyle = System::Windows::Forms::ToolStripItemDisplayStyle::Image;
this->bindingNavigatorMoveNextItem->Image = (cli::safe_cast<System::Drawing::Image^ >(resources->GetObject(L"bindingNavigatorMoveNextItem.Image")));
this->bindingNavigatorMoveNextItem->Name = L"bindingNavigatorMoveNextItem";
this->bindingNavigatorMoveNextItem->RightToLeftAutoMirrorImage = true;
this->bindingNavigatorMoveNextItem->Size = System::Drawing::Size(23, 20);
this->bindingNavigatorMoveNextItem->Text = L"Move next";
//
// bindingNavigatorMoveLastItem
//
this->bindingNavigatorMoveLastItem->DisplayStyle = System::Windows::Forms::ToolStripItemDisplayStyle::Image;
this->bindingNavigatorMoveLastItem->Image = (cli::safe_cast<System::Drawing::Image^ >(resources->GetObject(L"bindingNavigatorMoveLastItem.Image")));
this->bindingNavigatorMoveLastItem->Name = L"bindingNavigatorMoveLastItem";
this->bindingNavigatorMoveLastItem->RightToLeftAutoMirrorImage = true;
this->bindingNavigatorMoveLastItem->Size = System::Drawing::Size(23, 20);
this->bindingNavigatorMoveLastItem->Text = L"Move last";
//
// bindingNavigatorSeparator2
//
this->bindingNavigatorSeparator2->Name = L"bindingNavigatorSeparator";
this->bindingNavigatorSeparator2->Size = System::Drawing::Size(6, 6);
//
// bindingNavigatorAddNewItem
//
this->bindingNavigatorAddNewItem->DisplayStyle = System::Windows::Forms::ToolStripItemDisplayStyle::Image;
this->bindingNavigatorAddNewItem->Image = (cli::safe_cast<System::Drawing::Image^ >(resources->GetObject(L"bindingNavigatorAddNewItem.Image")));
this->bindingNavigatorAddNewItem->Name = L"bindingNavigatorAddNewItem";
this->bindingNavigatorAddNewItem->RightToLeftAutoMirrorImage = true;
this->bindingNavigatorAddNewItem->Size = System::Drawing::Size(23, 22);
this->bindingNavigatorAddNewItem->Text = L"Add new";
//
// bindingNavigatorDeleteItem
//
this->bindingNavigatorDeleteItem->DisplayStyle = System::Windows::Forms::ToolStripItemDisplayStyle::Image;
this->bindingNavigatorDeleteItem->Image = (cli::safe_cast<System::Drawing::Image^ >(resources->GetObject(L"bindingNavigatorDeleteItem.Image")));
this->bindingNavigatorDeleteItem->Name = L"bindingNavigatorDeleteItem";
this->bindingNavigatorDeleteItem->RightToLeftAutoMirrorImage = true;
this->bindingNavigatorDeleteItem->Size = System::Drawing::Size(23, 20);
this->bindingNavigatorDeleteItem->Text = L"Delete";
//
// Order_DetailsBindingNavigatorSaveItem
//
this->Order_DetailsBindingNavigatorSaveItem->DisplayStyle = System::Windows::Forms::ToolStripItemDisplayStyle::Image;
this->Order_DetailsBindingNavigatorSaveItem->Image = (cli::safe_cast<System::Drawing::Image^ >(resources->GetObject(L"Order_DetailsBindingNavigatorSaveItem.Image")));
this->Order_DetailsBindingNavigatorSaveItem->Name = L"Order_DetailsBindingNavigatorSaveItem";
this->Order_DetailsBindingNavigatorSaveItem->Size = System::Drawing::Size(23, 23);
this->Order_DetailsBindingNavigatorSaveItem->Text = L"Save Data";
this->Order_DetailsBindingNavigatorSaveItem->Click += gcnew System::EventHandler(this, &Form1::Order_DetailsBindingNavigatorSaveItem_Click);
//
// OrderIDLabel
//
OrderIDLabel->AutoSize = true;
OrderIDLabel->Location = System::Drawing::Point(81, 72);
OrderIDLabel->Name = L"OrderIDLabel";
OrderIDLabel->Size = System::Drawing::Size(50, 13);
OrderIDLabel->TabIndex = 1;
OrderIDLabel->Text = L"Order ID:";
//
// OrderIDTextBox
//
this->OrderIDTextBox->DataBindings->Add((gcnew System::Windows::Forms::Binding(L"Text", this->Order_DetailsBindingSource, L"OrderID",
true)));
this->OrderIDTextBox->Location = System::Drawing::Point(148, 69);
this->OrderIDTextBox->Name = L"OrderIDTextBox";
this->OrderIDTextBox->Size = System::Drawing::Size(120, 20);
this->OrderIDTextBox->TabIndex = 2;
//
// ProductIDLabel
//
ProductIDLabel->AutoSize = true;
ProductIDLabel->Location = System::Drawing::Point(81, 98);
ProductIDLabel->Name = L"ProductIDLabel";
ProductIDLabel->Size = System::Drawing::Size(61, 13);
ProductIDLabel->TabIndex = 3;
ProductIDLabel->Text = L"Product ID:";
//
// ProductIDTextBox
//
this->ProductIDTextBox->DataBindings->Add((gcnew System::Windows::Forms::Binding(L"Text", this->Order_DetailsBindingSource, L"ProductID",
true)));
this->ProductIDTextBox->Location = System::Drawing::Point(148, 95);
this->ProductIDTextBox->Name = L"ProductIDTextBox";
this->ProductIDTextBox->Size = System::Drawing::Size(120, 20);
this->ProductIDTextBox->TabIndex = 4;
//
// UnitPriceLabel
//
UnitPriceLabel->AutoSize = true;
UnitPriceLabel->Location = System::Drawing::Point(81, 124);
UnitPriceLabel->Name = L"UnitPriceLabel";
UnitPriceLabel->Size = System::Drawing::Size(56, 13);
UnitPriceLabel->TabIndex = 5;
UnitPriceLabel->Text = L"Unit Price:";
//
// UnitPriceTextBox
//
this->UnitPriceTextBox->DataBindings->Add((gcnew System::Windows::Forms::Binding(L"Text", this->Order_DetailsBindingSource, L"UnitPrice",
true)));
this->UnitPriceTextBox->Location = System::Drawing::Point(148, 121);
this->UnitPriceTextBox->Name = L"UnitPriceTextBox";
this->UnitPriceTextBox->Size = System::Drawing::Size(120, 20);
this->UnitPriceTextBox->TabIndex = 6;
//
// QuantityLabel
//
QuantityLabel->AutoSize = true;
QuantityLabel->Location = System::Drawing::Point(81, 147);
QuantityLabel->Name = L"QuantityLabel";
QuantityLabel->Size = System::Drawing::Size(49, 13);
QuantityLabel->TabIndex = 7;
QuantityLabel->Text = L"Quantity:";
//
// QuantityNumericUpDown
//
this->QuantityNumericUpDown->DataBindings->Add((gcnew System::Windows::Forms::Binding(L"Value", this->Order_DetailsBindingSource,
L"Quantity", true)));
this->QuantityNumericUpDown->Location = System::Drawing::Point(148, 147);
this->QuantityNumericUpDown->Name = L"QuantityNumericUpDown";
this->QuantityNumericUpDown->Size = System::Drawing::Size(120, 20);
this->QuantityNumericUpDown->TabIndex = 8;
//
// DiscountLabel
//
DiscountLabel->AutoSize = true;
DiscountLabel->Location = System::Drawing::Point(81, 176);
DiscountLabel->Name = L"DiscountLabel";
DiscountLabel->Size = System::Drawing::Size(52, 13);
DiscountLabel->TabIndex = 9;
DiscountLabel->Text = L"Discount:";
//
// DiscountTextBox
//
this->DiscountTextBox->DataBindings->Add((gcnew System::Windows::Forms::Binding(L"Text", this->Order_DetailsBindingSource, L"Discount",
true)));
this->DiscountTextBox->Location = System::Drawing::Point(148, 173);
this->DiscountTextBox->Name = L"DiscountTextBox";
this->DiscountTextBox->Size = System::Drawing::Size(120, 20);
this->DiscountTextBox->TabIndex = 10;
//
// Form1
//
this->AutoScaleDimensions = System::Drawing::SizeF(6, 13);
this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
this->ClientSize = System::Drawing::Size(349, 262);
this->Controls->Add(OrderIDLabel);
this->Controls->Add(this->OrderIDTextBox);
this->Controls->Add(ProductIDLabel);
this->Controls->Add(this->ProductIDTextBox);
this->Controls->Add(UnitPriceLabel);
this->Controls->Add(this->UnitPriceTextBox);
this->Controls->Add(QuantityLabel);
this->Controls->Add(this->QuantityNumericUpDown);
this->Controls->Add(DiscountLabel);
this->Controls->Add(this->DiscountTextBox);
this->Controls->Add(this->Order_DetailsBindingNavigator);
this->Name = L"Form1";
this->Text = L"Binding Multiple Controls";
this->Load += gcnew System::EventHandler(this, &Form1::Form1_Load);
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->DataSet1))->EndInit();
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->Order_DetailsBindingSource))->EndInit();
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->Order_DetailsBindingNavigator))->EndInit();
this->Order_DetailsBindingNavigator->ResumeLayout(false);
this->Order_DetailsBindingNavigator->PerformLayout();
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->QuantityNumericUpDown))->EndInit();
this->ResumeLayout(false);
this->PerformLayout();
}
#pragma endregion
private: System::Void Order_DetailsBindingNavigatorSaveItem_Click(System::Object^ sender, System::EventArgs^ e) {
this->Validate();
this->Order_DetailsBindingSource->EndEdit();
this->Order_DetailsTableAdapter->Update(this->DataSet1->Order_Details);
}
private: System::Void Form1_Load(System::Object^ sender, System::EventArgs^ e) {
// TODO: This line of code loads data into the 'DataSet1.Order_Details' table. You can move, or remove it, as needed.
this->Order_DetailsTableAdapter->Fill(this->DataSet1->Order_Details);
}
};
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -