📄 productsummaryviewdialog.cs
字号:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace MobileDevelopersHandbook
{
public partial class ProductSummaryViewDialog : Form
{
public ProductSummaryViewDialog()
{
InitializeComponent();
// Attach event handlers to auto-hide controls.
this.AttachVisibilityBindings(this.Controls);
}
private void editMenuItemMenuItem_Click(object sender, EventArgs e)
{
MobileDevelopersHandbook.ProductEditViewDialog productEditViewDialog = MobileDevelopersHandbook.ProductEditViewDialog.Instance(this.productBindingSource);
productEditViewDialog.ShowDialog();
this.Close();
}
private void ProductSummaryViewDialog_KeyDown(object sender, KeyEventArgs e)
{
if ((e.KeyCode == System.Windows.Forms.Keys.Up))
{
this.AutoScrollPosition = new System.Drawing.Point(0, ((0 - this.AutoScrollPosition.Y)
- 16));
e.Handled = true;
}
if ((e.KeyCode == System.Windows.Forms.Keys.Down))
{
this.AutoScrollPosition = new System.Drawing.Point(0, ((0 - this.AutoScrollPosition.Y)
+ 16));
e.Handled = true;
}
if ((e.KeyCode == System.Windows.Forms.Keys.Up))
{
// Up
}
if ((e.KeyCode == System.Windows.Forms.Keys.Down))
{
// Down
}
if ((e.KeyCode == System.Windows.Forms.Keys.Left))
{
// Left
}
if ((e.KeyCode == System.Windows.Forms.Keys.Right))
{
// Right
}
if ((e.KeyCode == System.Windows.Forms.Keys.Enter))
{
// Enter
}
}
private void ProductSummaryViewDialog_Load(object sender, EventArgs e)
{
// Get the ProductCategory name for the current record
ProductsDataSet.ProductRow productRow = (ProductsDataSet.ProductRow)((DataRowView)this.productBindingSource.Current).Row;
this.productCategoryLabel1.Text = productRow.ProductCategoryRow.Name;
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -