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.

122 lines
3.7 KiB

  1. /*=============================================================================
  2. **
  3. ** Class: DownloadStatus
  4. **
  5. ** Purpose: WinForm dialog for download status or info
  6. **
  7. ** Date: 7/11/2001
  8. **
  9. ** Copyright (c) Microsoft, 2001
  10. **
  11. =============================================================================*/
  12. using System;
  13. using System.Drawing;
  14. using System.Collections;
  15. using System.ComponentModel;
  16. using System.Windows.Forms;
  17. namespace Microsoft.Fusion.ADF
  18. {
  19. /// <summary>
  20. /// Summary description for DownloadStatus.
  21. /// </summary>
  22. [System.Runtime.InteropServices.ComVisible(false)]
  23. public class DownloadStatus : System.Windows.Forms.Form
  24. {
  25. private System.Windows.Forms.ProgressBar progressBar1;
  26. private System.Windows.Forms.Label label1;
  27. /// <summary>
  28. /// Required designer variable.
  29. /// </summary>
  30. private System.ComponentModel.Container components = null;
  31. public DownloadStatus(int minStatus, int maxStatus)
  32. {
  33. //
  34. // Required for Windows Form Designer support
  35. //
  36. InitializeComponent();
  37. progressBar1.Minimum = minStatus;
  38. progressBar1.Maximum = maxStatus;
  39. //
  40. // TODO: Add any constructor code after InitializeComponent call
  41. //
  42. }
  43. /// <summary>
  44. /// Clean up any resources being used.
  45. /// </summary>
  46. protected override void Dispose(bool disposing)
  47. {
  48. if( disposing )
  49. {
  50. if(components != null)
  51. {
  52. components.Dispose();
  53. }
  54. }
  55. base.Dispose(disposing);
  56. }
  57. #region Windows Form Designer generated code
  58. /// <summary>
  59. /// Required method for Designer support - do not modify
  60. /// the contents of this method with the code editor.
  61. /// </summary>
  62. private void InitializeComponent()
  63. {
  64. this.label1 = new System.Windows.Forms.Label();
  65. this.progressBar1 = new System.Windows.Forms.ProgressBar();
  66. this.SuspendLayout();
  67. //
  68. // label1
  69. //
  70. this.label1.Font = new System.Drawing.Font("Arial", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
  71. this.label1.Location = new System.Drawing.Point(48, 32);
  72. this.label1.Name = "label1";
  73. this.label1.Size = new System.Drawing.Size(248, 20);
  74. this.label1.TabIndex = 1;
  75. this.label1.Text = "On-demand download in progress...";
  76. //
  77. // progressBar1
  78. //
  79. this.progressBar1.Location = new System.Drawing.Point(40, 72);
  80. this.progressBar1.Name = "progressBar1";
  81. this.progressBar1.Size = new System.Drawing.Size(248, 20);
  82. this.progressBar1.TabIndex = 0;
  83. //
  84. // DownloadStatus
  85. //
  86. this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
  87. this.ClientSize = new System.Drawing.Size(322, 127);
  88. this.Controls.AddRange(new System.Windows.Forms.Control[] {this.label1, this.progressBar1});
  89. this.Name = "ClickOnceDownloadStatus";
  90. this.Text = "ClickOnce Download";
  91. this.ShowInTaskbar = false;
  92. this.FormBorderStyle = FormBorderStyle.FixedDialog;
  93. this.MinimizeBox = false;
  94. this.MaximizeBox = false;
  95. // this.Load += new System.EventHandler(this.DownloadStatus_Load);
  96. this.ResumeLayout(false);
  97. }
  98. #endregion
  99. // private void DownloadStatus_Load(object sender, System.EventArgs e)
  100. // {
  101. // }
  102. public void SetStatus(int status)
  103. {
  104. progressBar1.Value = status;
  105. }
  106. public void SetMessage(string text)
  107. {
  108. label1.Text = text;
  109. }
  110. }
  111. }