Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

118 lines
3.0 KiB

  1. using System;
  2. using System.Drawing;
  3. using System.Collections;
  4. using System.ComponentModel;
  5. using System.Windows.Forms;
  6. namespace Microsoft.Fusion.ADF
  7. {
  8. /// <summary>
  9. /// Summary description for Progress.
  10. /// </summary>
  11. public class Progress : System.Windows.Forms.Form
  12. {
  13. private System.Windows.Forms.ProgressBar progressBar1;
  14. private System.Windows.Forms.Label label1;
  15. private System.Windows.Forms.Label label2;
  16. /// <summary>
  17. /// Required designer variable.
  18. /// </summary>
  19. private System.ComponentModel.Container components = null;
  20. public Progress()
  21. {
  22. //
  23. // Required for Windows Form Designer support
  24. //
  25. InitializeComponent();
  26. //
  27. // TODO: Add any constructor code after InitializeComponent call
  28. //
  29. }
  30. /// <summary>
  31. /// Clean up any resources being used.
  32. /// </summary>
  33. protected override void Dispose( bool disposing )
  34. {
  35. if( disposing )
  36. {
  37. if(components != null)
  38. {
  39. components.Dispose();
  40. }
  41. }
  42. base.Dispose( disposing );
  43. }
  44. #region Windows Form Designer generated code
  45. /// <summary>
  46. /// Required method for Designer support - do not modify
  47. /// the contents of this method with the code editor.
  48. /// </summary>
  49. private void InitializeComponent()
  50. {
  51. this.progressBar1 = new System.Windows.Forms.ProgressBar();
  52. this.label1 = new System.Windows.Forms.Label();
  53. this.label2 = new System.Windows.Forms.Label();
  54. this.SuspendLayout();
  55. //
  56. // progressBar1
  57. //
  58. this.progressBar1.Location = new System.Drawing.Point(24, 88);
  59. this.progressBar1.Name = "progressBar1";
  60. this.progressBar1.Size = new System.Drawing.Size(296, 24);
  61. this.progressBar1.TabIndex = 0;
  62. //
  63. // label1
  64. //
  65. this.label1.Location = new System.Drawing.Point(24, 16);
  66. this.label1.Name = "label1";
  67. this.label1.Size = new System.Drawing.Size(296, 24);
  68. this.label1.TabIndex = 1;
  69. this.label1.Text = "Downloading...";
  70. //
  71. // label2
  72. //
  73. this.label2.Location = new System.Drawing.Point(24, 48);
  74. this.label2.Name = "label2";
  75. this.label2.Size = new System.Drawing.Size(296, 24);
  76. this.label2.TabIndex = 2;
  77. //
  78. // Progress
  79. //
  80. this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
  81. this.ClientSize = new System.Drawing.Size(360, 126);
  82. this.Controls.AddRange(new System.Windows.Forms.Control[] {
  83. this.label2,
  84. this.label1,
  85. this.progressBar1});
  86. this.Name = "Progress";
  87. this.Text = "ClickOnce";
  88. this.ResumeLayout(false);
  89. }
  90. #endregion
  91. public void SetRange(int minStatus, int maxStatus)
  92. {
  93. progressBar1.Minimum = minStatus;
  94. progressBar1.Maximum = maxStatus;
  95. }
  96. public void SetStatus(int status)
  97. {
  98. progressBar1.Value = status;
  99. }
  100. public void SetText(string text)
  101. {
  102. this.label1.Text = text;
  103. }
  104. public void SetTotal(string text)
  105. {
  106. this.label2.Text = text;
  107. }
  108. }
  109. }