⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 productssummaryviewdialog.designer.cs

📁 Microsoft Mobile Development Handbook的代码,有C#,VB,C++的
💻 CS
字号:
namespace MobileDevelopersHandbook.DSAExample
{
    partial class ProductsSummaryViewDialog
    {
        public void AttachVisibilityBindings(ControlCollection controls)
        {
            for (int i = 0; (i < controls.Count); i = (i + 1))
            {
                if ((controls[i].DataBindings["Visible"] != null))
                {
                    // Attach event handlers to auto-hide controls.
                    controls[i].DataBindings["Visible"].Format += new System.Windows.Forms.ConvertEventHandler(this.Visibility_Format);
                    controls[i].DataBindings["Visible"].DataSourceUpdateMode = System.Windows.Forms.DataSourceUpdateMode.Never;
                }
            }

        }
    
        public void Visibility_Format(object sender, System.Windows.Forms.ConvertEventArgs e)
        {
            if ((e.Value == System.DBNull.Value))
            {
                e.Value = false;
            }
            else
            {
                e.Value = true;
            }

        }
    
        public static ProductsSummaryViewDialog Instance(System.Windows.Forms.BindingSource bindingSource)
        {
            System.Windows.Forms.Cursor.Current = System.Windows.Forms.Cursors.WaitCursor;
            if ((defaultInstance == null))
            {
                defaultInstance = new ProductsSummaryViewDialog();
                defaultInstance.productsBindingSource.DataSource = bindingSource;
            }
            defaultInstance.AutoScrollPosition = new System.Drawing.Point(0, 0);
            defaultInstance.productsBindingSource.Position = bindingSource.Position;
            System.Windows.Forms.Cursor.Current = System.Windows.Forms.Cursors.Default;
            return defaultInstance;
        }
    
        private static ProductsSummaryViewDialog defaultInstance;
        /// <summary>
        /// Required designer variable.
        /// </summary>
        private System.ComponentModel.IContainer components = null;
        private System.Windows.Forms.MainMenu mainMenu1;

        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }

        #region Windows Form Designer generated code

        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            this.components = new System.ComponentModel.Container();
            this.productsBindingSource = new System.Windows.Forms.BindingSource(this.components);
            this.productIdLabel = new System.Windows.Forms.Label();
            this.productNameLabel = new System.Windows.Forms.Label();
            this.priceLabel = new System.Windows.Forms.Label();
            this.descriptionLabel = new System.Windows.Forms.Label();
            this.mainMenu1 = new System.Windows.Forms.MainMenu();
            this.editMenuItemMenuItem = new System.Windows.Forms.MenuItem();
            this.orderMenuItem = new System.Windows.Forms.MenuItem();
            this.productIdLabel1 = new System.Windows.Forms.Label();
            this.productNameLabel1 = new System.Windows.Forms.Label();
            this.priceLabel1 = new System.Windows.Forms.Label();
            this.descriptionLabel1 = new System.Windows.Forms.Label();
            this.topBorderPanel = new System.Windows.Forms.Panel();
            this.leftBorderPanel = new System.Windows.Forms.Panel();
            this.rightBorderPanel = new System.Windows.Forms.Panel();
            this.SuspendLayout();
            // 
            // productsBindingSource
            // 
            this.productsBindingSource.DataMember = "Products";
            this.productsBindingSource.DataSource = typeof(MobileDevelopersHandbook.DSAExample.AppDatabaseDataSet);
            // 
            // productIdLabel
            // 
            this.productIdLabel.DataBindings.Add(new System.Windows.Forms.Binding("Visible", this.productsBindingSource, "ProductId", true));
            this.productIdLabel.Dock = System.Windows.Forms.DockStyle.Top;
            this.productIdLabel.Font = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Bold);
            this.productIdLabel.Location = new System.Drawing.Point(4, 2);
            this.productIdLabel.Name = "productIdLabel";
            this.productIdLabel.Size = new System.Drawing.Size(232, 21);
            this.productIdLabel.Text = "Product Id:";
            // 
            // productNameLabel
            // 
            this.productNameLabel.DataBindings.Add(new System.Windows.Forms.Binding("Visible", this.productsBindingSource, "ProductName", true));
            this.productNameLabel.Dock = System.Windows.Forms.DockStyle.Top;
            this.productNameLabel.Font = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Bold);
            this.productNameLabel.Location = new System.Drawing.Point(4, 43);
            this.productNameLabel.Name = "productNameLabel";
            this.productNameLabel.Size = new System.Drawing.Size(232, 21);
            this.productNameLabel.Text = "Product Name:";
            // 
            // priceLabel
            // 
            this.priceLabel.DataBindings.Add(new System.Windows.Forms.Binding("Visible", this.productsBindingSource, "Price", true));
            this.priceLabel.Dock = System.Windows.Forms.DockStyle.Top;
            this.priceLabel.Font = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Bold);
            this.priceLabel.Location = new System.Drawing.Point(4, 84);
            this.priceLabel.Name = "priceLabel";
            this.priceLabel.Size = new System.Drawing.Size(232, 21);
            this.priceLabel.Text = "Price:";
            // 
            // descriptionLabel
            // 
            this.descriptionLabel.DataBindings.Add(new System.Windows.Forms.Binding("Visible", this.productsBindingSource, "Description", true));
            this.descriptionLabel.Dock = System.Windows.Forms.DockStyle.Top;
            this.descriptionLabel.Font = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Bold);
            this.descriptionLabel.Location = new System.Drawing.Point(4, 125);
            this.descriptionLabel.Name = "descriptionLabel";
            this.descriptionLabel.Size = new System.Drawing.Size(232, 21);
            this.descriptionLabel.Text = "Description:";
            // 
            // mainMenu1
            // 
            this.mainMenu1.MenuItems.Add(this.editMenuItemMenuItem);
            this.mainMenu1.MenuItems.Add(this.orderMenuItem);
            // 
            // editMenuItemMenuItem
            // 
            this.editMenuItemMenuItem.Text = "Edit";
            this.editMenuItemMenuItem.Click += new System.EventHandler(this.editMenuItemMenuItem_Click);
            // 
            // orderMenuItem
            // 
            this.orderMenuItem.Text = "Order";
            this.orderMenuItem.Click += new System.EventHandler(this.orderMenuItem_Click);
            // 
            // productIdLabel1
            // 
            this.productIdLabel1.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.productsBindingSource, "ProductId", true));
            this.productIdLabel1.DataBindings.Add(new System.Windows.Forms.Binding("Visible", this.productsBindingSource, "ProductId", true));
            this.productIdLabel1.Dock = System.Windows.Forms.DockStyle.Top;
            this.productIdLabel1.Location = new System.Drawing.Point(4, 23);
            this.productIdLabel1.Name = "productIdLabel1";
            this.productIdLabel1.Size = new System.Drawing.Size(232, 20);
            // 
            // productNameLabel1
            // 
            this.productNameLabel1.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.productsBindingSource, "ProductName", true));
            this.productNameLabel1.DataBindings.Add(new System.Windows.Forms.Binding("Visible", this.productsBindingSource, "ProductName", true));
            this.productNameLabel1.Dock = System.Windows.Forms.DockStyle.Top;
            this.productNameLabel1.Location = new System.Drawing.Point(4, 64);
            this.productNameLabel1.Name = "productNameLabel1";
            this.productNameLabel1.Size = new System.Drawing.Size(232, 20);
            // 
            // priceLabel1
            // 
            this.priceLabel1.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.productsBindingSource, "Price", true));
            this.priceLabel1.DataBindings.Add(new System.Windows.Forms.Binding("Visible", this.productsBindingSource, "Price", true));
            this.priceLabel1.Dock = System.Windows.Forms.DockStyle.Top;
            this.priceLabel1.Location = new System.Drawing.Point(4, 105);
            this.priceLabel1.Name = "priceLabel1";
            this.priceLabel1.Size = new System.Drawing.Size(232, 20);
            // 
            // descriptionLabel1
            // 
            this.descriptionLabel1.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.productsBindingSource, "Description", true));
            this.descriptionLabel1.DataBindings.Add(new System.Windows.Forms.Binding("Visible", this.productsBindingSource, "Description", true));
            this.descriptionLabel1.Dock = System.Windows.Forms.DockStyle.Top;
            this.descriptionLabel1.Location = new System.Drawing.Point(4, 146);
            this.descriptionLabel1.Name = "descriptionLabel1";
            this.descriptionLabel1.Size = new System.Drawing.Size(232, 105);
            // 
            // topBorderPanel
            // 
            this.topBorderPanel.Dock = System.Windows.Forms.DockStyle.Top;
            this.topBorderPanel.Location = new System.Drawing.Point(4, 0);
            this.topBorderPanel.Name = "topBorderPanel";
            this.topBorderPanel.Size = new System.Drawing.Size(232, 2);
            // 
            // leftBorderPanel
            // 
            this.leftBorderPanel.Dock = System.Windows.Forms.DockStyle.Left;
            this.leftBorderPanel.Location = new System.Drawing.Point(0, 0);
            this.leftBorderPanel.Name = "leftBorderPanel";
            this.leftBorderPanel.Size = new System.Drawing.Size(4, 268);
            // 
            // rightBorderPanel
            // 
            this.rightBorderPanel.Dock = System.Windows.Forms.DockStyle.Right;
            this.rightBorderPanel.Location = new System.Drawing.Point(236, 0);
            this.rightBorderPanel.Name = "rightBorderPanel";
            this.rightBorderPanel.Size = new System.Drawing.Size(4, 268);
            // 
            // ProductsSummaryViewDialog
            // 
            this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
            this.AutoScroll = true;
            this.ClientSize = new System.Drawing.Size(240, 268);
            this.Controls.Add(this.descriptionLabel1);
            this.Controls.Add(this.descriptionLabel);
            this.Controls.Add(this.priceLabel1);
            this.Controls.Add(this.priceLabel);
            this.Controls.Add(this.productNameLabel1);
            this.Controls.Add(this.productNameLabel);
            this.Controls.Add(this.productIdLabel1);
            this.Controls.Add(this.productIdLabel);
            this.Controls.Add(this.topBorderPanel);
            this.Controls.Add(this.leftBorderPanel);
            this.Controls.Add(this.rightBorderPanel);
            this.Menu = this.mainMenu1;
            this.MinimizeBox = false;
            this.Name = "ProductsSummaryViewDialog";
            this.Text = "Product Details";
            this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.ProductsSummaryViewDialog_KeyDown);
            this.ResumeLayout(false);

        }

        #endregion

        private System.Windows.Forms.MenuItem editMenuItemMenuItem;
        private System.Windows.Forms.BindingSource productsBindingSource;
        private System.Windows.Forms.Label productIdLabel1;
        private System.Windows.Forms.Label productNameLabel1;
        private System.Windows.Forms.Label priceLabel1;
        private System.Windows.Forms.Label descriptionLabel1;
        private System.Windows.Forms.Panel topBorderPanel;
        private System.Windows.Forms.Panel leftBorderPanel;
        private System.Windows.Forms.Panel rightBorderPanel;
        private System.Windows.Forms.Label productIdLabel;
        private System.Windows.Forms.Label productNameLabel;
        private System.Windows.Forms.Label priceLabel;
        private System.Windows.Forms.Label descriptionLabel;
        private System.Windows.Forms.MenuItem orderMenuItem;
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -