WaitCD.cs 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  1. using System;
  2. using System.Drawing;
  3. using System.Collections;
  4. using System.ComponentModel;
  5. using System.Windows.Forms;
  6. namespace LYFZ.NeroDiscBurn.NET
  7. {
  8. /// <summary>
  9. /// Summary description for WaitCD.
  10. /// </summary>
  11. public class WaitCDForm : System.Windows.Forms.Form
  12. {
  13. // This is our own event. It will be called when our
  14. // Cancel button is clicked.
  15. //
  16. public event EventHandler OnCancel;
  17. private System.Windows.Forms.Label label1;
  18. public System.Windows.Forms.TextBox c_LastDetectedMedia;
  19. private System.Windows.Forms.Label label2;
  20. public System.Windows.Forms.TextBox c_RequestedMedia;
  21. private System.Windows.Forms.Button c_Cancel;
  22. public System.Windows.Forms.Label c_WaitCDText;
  23. /// <summary>
  24. /// Required designer variable.
  25. /// </summary>
  26. private System.ComponentModel.Container components = null;
  27. public WaitCDForm()
  28. {
  29. //
  30. // Required for Windows Form Designer support
  31. //
  32. InitializeComponent();
  33. }
  34. /// <summary>
  35. /// Clean up any resources being used.
  36. /// </summary>
  37. protected override void Dispose( bool disposing )
  38. {
  39. if( disposing )
  40. {
  41. if(components != null)
  42. {
  43. components.Dispose();
  44. }
  45. }
  46. base.Dispose( disposing );
  47. }
  48. #region Windows Form Designer generated code
  49. /// <summary>
  50. /// Required method for Designer support - do not modify
  51. /// the contents of this method with the code editor.
  52. /// </summary>
  53. private void InitializeComponent()
  54. {
  55. this.label1 = new System.Windows.Forms.Label();
  56. this.c_LastDetectedMedia = new System.Windows.Forms.TextBox();
  57. this.label2 = new System.Windows.Forms.Label();
  58. this.c_RequestedMedia = new System.Windows.Forms.TextBox();
  59. this.c_Cancel = new System.Windows.Forms.Button();
  60. this.c_WaitCDText = new System.Windows.Forms.Label();
  61. this.SuspendLayout();
  62. //
  63. // label1
  64. //
  65. this.label1.Location = new System.Drawing.Point(10, 78);
  66. this.label1.Name = "label1";
  67. this.label1.Size = new System.Drawing.Size(134, 17);
  68. this.label1.TabIndex = 1;
  69. this.label1.Text = "最后检测到的介质:";
  70. this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
  71. //
  72. // c_LastDetectedMedia
  73. //
  74. this.c_LastDetectedMedia.Location = new System.Drawing.Point(134, 78);
  75. this.c_LastDetectedMedia.Name = "c_LastDetectedMedia";
  76. this.c_LastDetectedMedia.ReadOnly = true;
  77. this.c_LastDetectedMedia.Size = new System.Drawing.Size(212, 21);
  78. this.c_LastDetectedMedia.TabIndex = 2;
  79. //
  80. // label2
  81. //
  82. this.label2.Location = new System.Drawing.Point(10, 103);
  83. this.label2.Name = "label2";
  84. this.label2.Size = new System.Drawing.Size(124, 18);
  85. this.label2.TabIndex = 3;
  86. this.label2.Text = "请求媒体:";
  87. this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
  88. //
  89. // c_RequestedMedia
  90. //
  91. this.c_RequestedMedia.Location = new System.Drawing.Point(134, 103);
  92. this.c_RequestedMedia.Name = "c_RequestedMedia";
  93. this.c_RequestedMedia.ReadOnly = true;
  94. this.c_RequestedMedia.Size = new System.Drawing.Size(212, 21);
  95. this.c_RequestedMedia.TabIndex = 4;
  96. //
  97. // c_Cancel
  98. //
  99. this.c_Cancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
  100. this.c_Cancel.Location = new System.Drawing.Point(134, 138);
  101. this.c_Cancel.Name = "c_Cancel";
  102. this.c_Cancel.Size = new System.Drawing.Size(90, 25);
  103. this.c_Cancel.TabIndex = 5;
  104. this.c_Cancel.Text = "取 消";
  105. this.c_Cancel.Click += new System.EventHandler(this.c_Cancel_Click);
  106. //
  107. // c_WaitCDText
  108. //
  109. this.c_WaitCDText.Location = new System.Drawing.Point(10, 9);
  110. this.c_WaitCDText.Name = "c_WaitCDText";
  111. this.c_WaitCDText.Size = new System.Drawing.Size(358, 60);
  112. this.c_WaitCDText.TabIndex = 0;
  113. //
  114. // WaitCDForm
  115. //
  116. this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
  117. this.CancelButton = this.c_Cancel;
  118. this.ClientSize = new System.Drawing.Size(391, 191);
  119. this.ControlBox = false;
  120. this.Controls.Add(this.c_WaitCDText);
  121. this.Controls.Add(this.c_Cancel);
  122. this.Controls.Add(this.c_LastDetectedMedia);
  123. this.Controls.Add(this.c_RequestedMedia);
  124. this.Controls.Add(this.label1);
  125. this.Controls.Add(this.label2);
  126. this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
  127. this.MaximizeBox = false;
  128. this.MinimizeBox = false;
  129. this.Name = "WaitCDForm";
  130. this.ShowInTaskbar = false;
  131. this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
  132. this.Text = "等待一个光盘(WaitCD)";
  133. this.ResumeLayout(false);
  134. this.PerformLayout();
  135. }
  136. #endregion
  137. private void c_Cancel_Click(object sender, System.EventArgs e)
  138. {
  139. // If there is an event subscriber, let's notify it.
  140. //
  141. if (null != OnCancel)
  142. {
  143. OnCancel (this, null);
  144. }
  145. }
  146. }
  147. }