www.pudn.com > CS_IOSample1.rar > AboutForm.cs, change:2014-08-08,size:5538b


using System; 
using System.Collections.Generic; 
using System.ComponentModel; 
using System.Data; 
using System.Drawing; 
using System.Text; 
using System.Windows.Forms; 
 
namespace CS_IOSample1 
{ 
    public partial class AboutForm : Form 
    { 
        private Panel panel1; 
        private TextBox textBox1; 
        private TextBox textBox2; 
        /// <summary> 
        /// Required designer variable. 
        /// </summary> 
        private System.ComponentModel.IContainer components = null; 
 
        public AboutForm() 
        { 
            InitializeComponent(); 
 
            // Add MainMenu if Pocket PC 
            if (Symbol.Win32.PlatformType == "PocketPC") 
            { 
                this.Menu = new MainMenu(); 
            } 
 
            textBox1.Text = "CS_IOSample1\r\nv1.00.03\r\nCopyright  2011 Motorola Solutions, Inc. All rights reserved.\r\n"; 
        } 
 
        /// <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.panel1 = new System.Windows.Forms.Panel(); 
            this.textBox2 = new System.Windows.Forms.TextBox(); 
            this.textBox1 = new System.Windows.Forms.TextBox(); 
            this.panel1.SuspendLayout(); 
            this.SuspendLayout(); 
            //  
            // panel1 
            //  
            this.panel1.Controls.Add(this.textBox2); 
            this.panel1.Controls.Add(this.textBox1); 
            this.panel1.Dock = System.Windows.Forms.DockStyle.Fill; 
            this.panel1.Location = new System.Drawing.Point(0, 0); 
            this.panel1.Name = "panel1"; 
            this.panel1.Size = new System.Drawing.Size(240, 272); 
            //  
            // textBox2 
            //  
            this.textBox2.BackColor = System.Drawing.SystemColors.Control; 
            this.textBox2.BorderStyle = System.Windows.Forms.BorderStyle.None; 
            this.textBox2.Dock = System.Windows.Forms.DockStyle.Fill; 
            this.textBox2.Font = new System.Drawing.Font("Tahoma", 8F, System.Drawing.FontStyle.Regular); 
            this.textBox2.Location = new System.Drawing.Point(0, 128); 
            this.textBox2.Multiline = true; 
            this.textBox2.Name = "textBox2"; 
            this.textBox2.ReadOnly = true; 
            this.textBox2.Size = new System.Drawing.Size(240, 144); 
            this.textBox2.TabIndex = 10; 
            this.textBox2.TabStop = false; 
            this.textBox2.Text = "This sample application is provided to demonstrate various programming practices " + 
                "and is not intended for production use"; 
            this.textBox2.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; 
            //  
            // textBox1 
            //  
            this.textBox1.BackColor = System.Drawing.SystemColors.Control; 
            this.textBox1.BorderStyle = System.Windows.Forms.BorderStyle.None; 
            this.textBox1.Dock = System.Windows.Forms.DockStyle.Top; 
            this.textBox1.Location = new System.Drawing.Point(0, 0); 
            this.textBox1.Multiline = true; 
            this.textBox1.Name = "textBox1"; 
            this.textBox1.ReadOnly = true; 
            this.textBox1.Size = new System.Drawing.Size(240, 128); 
            this.textBox1.TabIndex = 9; 
            this.textBox1.TabStop = false; 
            this.textBox1.Text = "Sample text"; 
            this.textBox1.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; 
            //  
            // AboutForm 
            //  
            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, 272); 
            this.Controls.Add(this.panel1); 
            this.MaximizeBox = false; 
            this.MinimizeBox = false; 
            this.Name = "AboutForm"; 
            this.Text = "IO Sample"; 
            this.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.AboutForm_KeyPress); 
            this.Resize += new System.EventHandler(this.AboutForm_Resize); 
            this.panel1.ResumeLayout(false); 
            this.ResumeLayout(false); 
 
        } 
 
        #endregion 
 
        private void AboutForm_KeyPress(object sender, KeyPressEventArgs e) 
        { 
            this.Close(); 
        } 
 
        private void AboutForm_Resize(object sender, EventArgs e) 
        { 
            // If it is CE 
            if (Symbol.Win32.PlatformType.IndexOf("PocketPC", 0) <= 0) 
            { 
                this.Width = (Screen.PrimaryScreen.WorkingArea.Width > 320 ? 320 : Screen.PrimaryScreen.WorkingArea.Width); 
                this.Height = (Screen.PrimaryScreen.WorkingArea.Height > 320 ? 320 : Screen.PrimaryScreen.WorkingArea.Height); 
            } 
        } 
    } 
}