using System.ComponentModel; using System.Drawing; using System.Resources; using System.Windows.Forms; namespace Microsoft.Samples.AppUpdater { public class UpdateForm : Form { private Label label1; private Button button1; private Button button2; private Label label2; private PictureBox pictureBox1; private Container components; public UpdateForm() { InitializeComponent(); } protected override void Dispose(bool disposing) { if (disposing && components != null) { components.Dispose(); } base.Dispose(disposing); } private void InitializeComponent() { System.Resources.ResourceManager resourceManager = new System.Resources.ResourceManager(typeof(Microsoft.Samples.AppUpdater.UpdateForm)); label1 = new System.Windows.Forms.Label(); button1 = new System.Windows.Forms.Button(); button2 = new System.Windows.Forms.Button(); label2 = new System.Windows.Forms.Label(); pictureBox1 = new System.Windows.Forms.PictureBox(); SuspendLayout(); label1.Font = new System.Drawing.Font("SimSun", 9f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 0); label1.Location = new System.Drawing.Point(88, 24); label1.Name = "label1"; label1.Size = new System.Drawing.Size(264, 19); label1.TabIndex = 0; label1.Text = "新版本的客户端已经下载完毕."; button1.DialogResult = System.Windows.Forms.DialogResult.Yes; button1.Location = new System.Drawing.Point(70, 90); button1.Name = "button1"; button1.Size = new System.Drawing.Size(84, 25); button1.TabIndex = 1; button1.Text = "确定"; button2.DialogResult = System.Windows.Forms.DialogResult.No; button2.Location = new System.Drawing.Point(196, 90); button2.Name = "button2"; button2.Size = new System.Drawing.Size(84, 25); button2.TabIndex = 2; button2.Text = "取消"; label2.Location = new System.Drawing.Point(88, 56); label2.Name = "label2"; label2.Size = new System.Drawing.Size(272, 18); label2.TabIndex = 3; label2.Text = "您希望关闭系统后启动新版本的客户端吗?"; pictureBox1.Image = (System.Drawing.Image)resourceManager.GetObject("pictureBox1.Image"); pictureBox1.Location = new System.Drawing.Point(16, 24); pictureBox1.Name = "pictureBox1"; pictureBox1.Size = new System.Drawing.Size(56, 50); pictureBox1.TabIndex = 4; pictureBox1.TabStop = false; AutoScaleBaseSize = new System.Drawing.Size(6, 14); base.ClientSize = new System.Drawing.Size(357, 130); base.Controls.Add(pictureBox1); base.Controls.Add(label2); base.Controls.Add(button2); base.Controls.Add(button1); base.Controls.Add(label1); Font = new System.Drawing.Font("SimSun", 9f); base.Name = "UpdateForm"; Text = "已有可用的新版本"; ResumeLayout(false); } } }