UpdateForm.cs 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. using System.ComponentModel;
  2. using System.Drawing;
  3. using System.Resources;
  4. using System.Windows.Forms;
  5. namespace Microsoft.Samples.AppUpdater
  6. {
  7. public class UpdateForm : Form
  8. {
  9. private Label label1;
  10. private Button button1;
  11. private Button button2;
  12. private Label label2;
  13. private PictureBox pictureBox1;
  14. private Container components;
  15. public UpdateForm()
  16. {
  17. InitializeComponent();
  18. }
  19. protected override void Dispose(bool disposing)
  20. {
  21. if (disposing && components != null)
  22. {
  23. components.Dispose();
  24. }
  25. base.Dispose(disposing);
  26. }
  27. private void InitializeComponent()
  28. {
  29. System.Resources.ResourceManager resourceManager = new System.Resources.ResourceManager(typeof(Microsoft.Samples.AppUpdater.UpdateForm));
  30. label1 = new System.Windows.Forms.Label();
  31. button1 = new System.Windows.Forms.Button();
  32. button2 = new System.Windows.Forms.Button();
  33. label2 = new System.Windows.Forms.Label();
  34. pictureBox1 = new System.Windows.Forms.PictureBox();
  35. SuspendLayout();
  36. label1.Font = new System.Drawing.Font("SimSun", 9f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 0);
  37. label1.Location = new System.Drawing.Point(88, 24);
  38. label1.Name = "label1";
  39. label1.Size = new System.Drawing.Size(264, 19);
  40. label1.TabIndex = 0;
  41. label1.Text = "新版本的客户端已经下载完毕.";
  42. button1.DialogResult = System.Windows.Forms.DialogResult.Yes;
  43. button1.Location = new System.Drawing.Point(70, 90);
  44. button1.Name = "button1";
  45. button1.Size = new System.Drawing.Size(84, 25);
  46. button1.TabIndex = 1;
  47. button1.Text = "确定";
  48. button2.DialogResult = System.Windows.Forms.DialogResult.No;
  49. button2.Location = new System.Drawing.Point(196, 90);
  50. button2.Name = "button2";
  51. button2.Size = new System.Drawing.Size(84, 25);
  52. button2.TabIndex = 2;
  53. button2.Text = "取消";
  54. label2.Location = new System.Drawing.Point(88, 56);
  55. label2.Name = "label2";
  56. label2.Size = new System.Drawing.Size(272, 18);
  57. label2.TabIndex = 3;
  58. label2.Text = "您希望关闭系统后启动新版本的客户端吗?";
  59. pictureBox1.Image = (System.Drawing.Image)resourceManager.GetObject("pictureBox1.Image");
  60. pictureBox1.Location = new System.Drawing.Point(16, 24);
  61. pictureBox1.Name = "pictureBox1";
  62. pictureBox1.Size = new System.Drawing.Size(56, 50);
  63. pictureBox1.TabIndex = 4;
  64. pictureBox1.TabStop = false;
  65. AutoScaleBaseSize = new System.Drawing.Size(6, 14);
  66. base.ClientSize = new System.Drawing.Size(357, 130);
  67. base.Controls.Add(pictureBox1);
  68. base.Controls.Add(label2);
  69. base.Controls.Add(button2);
  70. base.Controls.Add(button1);
  71. base.Controls.Add(label1);
  72. Font = new System.Drawing.Font("SimSun", 9f);
  73. base.Name = "UpdateForm";
  74. Text = "已有可用的新版本";
  75. ResumeLayout(false);
  76. }
  77. }
  78. }