WaitCD.cs 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  1. using System;
  2. using System.Drawing;
  3. using System.Collections;
  4. using System.ComponentModel;
  5. using System.Windows.Forms;
  6. namespace NeroFiddlesCOM.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(8, 72);
  66. this.label1.Name = "label1";
  67. this.label1.Size = new System.Drawing.Size(112, 16);
  68. this.label1.TabIndex = 1;
  69. this.label1.Text = "Last detected media:";
  70. this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
  71. //
  72. // c_LastDetectedMedia
  73. //
  74. this.c_LastDetectedMedia.Location = new System.Drawing.Point(112, 72);
  75. this.c_LastDetectedMedia.Name = "c_LastDetectedMedia";
  76. this.c_LastDetectedMedia.ReadOnly = true;
  77. this.c_LastDetectedMedia.Size = new System.Drawing.Size(176, 20);
  78. this.c_LastDetectedMedia.TabIndex = 2;
  79. this.c_LastDetectedMedia.Text = "";
  80. //
  81. // label2
  82. //
  83. this.label2.Location = new System.Drawing.Point(8, 96);
  84. this.label2.Name = "label2";
  85. this.label2.Size = new System.Drawing.Size(104, 16);
  86. this.label2.TabIndex = 3;
  87. this.label2.Text = "Requested media:";
  88. this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
  89. //
  90. // c_RequestedMedia
  91. //
  92. this.c_RequestedMedia.Location = new System.Drawing.Point(112, 96);
  93. this.c_RequestedMedia.Name = "c_RequestedMedia";
  94. this.c_RequestedMedia.ReadOnly = true;
  95. this.c_RequestedMedia.Size = new System.Drawing.Size(176, 20);
  96. this.c_RequestedMedia.TabIndex = 4;
  97. this.c_RequestedMedia.Text = "";
  98. //
  99. // c_Cancel
  100. //
  101. this.c_Cancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
  102. this.c_Cancel.Location = new System.Drawing.Point(112, 128);
  103. this.c_Cancel.Name = "c_Cancel";
  104. this.c_Cancel.TabIndex = 5;
  105. this.c_Cancel.Text = "Cancel";
  106. this.c_Cancel.Click += new System.EventHandler(this.c_Cancel_Click);
  107. //
  108. // c_WaitCDText
  109. //
  110. this.c_WaitCDText.Location = new System.Drawing.Point(8, 8);
  111. this.c_WaitCDText.Name = "c_WaitCDText";
  112. this.c_WaitCDText.Size = new System.Drawing.Size(280, 56);
  113. this.c_WaitCDText.TabIndex = 0;
  114. //
  115. // WaitCDForm
  116. //
  117. this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
  118. this.CancelButton = this.c_Cancel;
  119. this.ClientSize = new System.Drawing.Size(298, 160);
  120. this.ControlBox = false;
  121. this.Controls.Add(this.c_WaitCDText);
  122. this.Controls.Add(this.c_Cancel);
  123. this.Controls.Add(this.c_LastDetectedMedia);
  124. this.Controls.Add(this.c_RequestedMedia);
  125. this.Controls.Add(this.label1);
  126. this.Controls.Add(this.label2);
  127. this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
  128. this.MaximizeBox = false;
  129. this.MinimizeBox = false;
  130. this.Name = "WaitCDForm";
  131. this.ShowInTaskbar = false;
  132. this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
  133. this.Text = "WaitCD";
  134. this.ResumeLayout(false);
  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. }