00001 using System;
00002 using System.Drawing;
00003 using System.Collections;
00004 using System.ComponentModel;
00005 using System.Windows.Forms;
00006
00007 namespace iOCE
00008 {
00012 public class frmAddComment : System.Windows.Forms.Form
00013 {
00014 private System.Windows.Forms.Label label1;
00015 private System.Windows.Forms.ComboBox cboKey;
00016 private System.Windows.Forms.Label label2;
00017 private System.Windows.Forms.TextBox txtValue;
00018 private System.Windows.Forms.Button cmdOK;
00019 private System.Windows.Forms.Button cmdCancel;
00023 private System.ComponentModel.Container components = null;
00024
00025 public String Key;
00026 public String Value;
00027 public bool wasOK;
00028
00029 public frmAddComment()
00030 {
00031
00032
00033
00034 InitializeComponent();
00035
00036 wasOK = false;
00037 Key = "";
00038 Value = "";
00039
00040
00041
00042 }
00043
00047 protected override void Dispose( bool disposing )
00048 {
00049 if( disposing )
00050 {
00051 if(components != null)
00052 {
00053 components.Dispose();
00054 }
00055 }
00056 base.Dispose( disposing );
00057 }
00058
00059 #region Windows Form Designer generated code
00064 private void InitializeComponent()
00065 {
00066 this.label1 = new System.Windows.Forms.Label();
00067 this.cboKey = new System.Windows.Forms.ComboBox();
00068 this.label2 = new System.Windows.Forms.Label();
00069 this.txtValue = new System.Windows.Forms.TextBox();
00070 this.cmdOK = new System.Windows.Forms.Button();
00071 this.cmdCancel = new System.Windows.Forms.Button();
00072 this.SuspendLayout();
00073
00074
00075
00076 this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
00077 this.label1.Location = new System.Drawing.Point(16, 16);
00078 this.label1.Name = "label1";
00079 this.label1.Size = new System.Drawing.Size(48, 24);
00080 this.label1.TabIndex = 0;
00081 this.label1.Text = "Key";
00082
00083
00084
00085 this.cboKey.Items.AddRange(new object[] {
00086 "TITLE",
00087 "ARTIST",
00088 "ALBUM",
00089 "GENRE",
00090 "TRACKNUMBER",
00091 "DESCRIPTION",
00092 "COPYRIGHT",
00093 "DATE",
00094 "PERFORMER",
00095 "VERSION",
00096 "ORGANIZATION",
00097 "LOCATION",
00098 "CONTACT",
00099 "ISRC"});
00100 this.cboKey.Location = new System.Drawing.Point(80, 16);
00101 this.cboKey.Name = "cboKey";
00102 this.cboKey.Size = new System.Drawing.Size(272, 21);
00103 this.cboKey.TabIndex = 1;
00104
00105
00106
00107 this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
00108 this.label2.Location = new System.Drawing.Point(16, 48);
00109 this.label2.Name = "label2";
00110 this.label2.Size = new System.Drawing.Size(48, 24);
00111 this.label2.TabIndex = 2;
00112 this.label2.Text = "Value";
00113
00114
00115
00116 this.txtValue.Location = new System.Drawing.Point(80, 48);
00117 this.txtValue.Name = "txtValue";
00118 this.txtValue.Size = new System.Drawing.Size(272, 20);
00119 this.txtValue.TabIndex = 3;
00120 this.txtValue.Text = "";
00121
00122
00123
00124 this.cmdOK.Location = new System.Drawing.Point(200, 80);
00125 this.cmdOK.Name = "cmdOK";
00126 this.cmdOK.Size = new System.Drawing.Size(72, 24);
00127 this.cmdOK.TabIndex = 4;
00128 this.cmdOK.Text = "&OK";
00129 this.cmdOK.Click += new System.EventHandler(this.cmdOK_Click);
00130
00131
00132
00133 this.cmdCancel.Location = new System.Drawing.Point(280, 80);
00134 this.cmdCancel.Name = "cmdCancel";
00135 this.cmdCancel.Size = new System.Drawing.Size(72, 24);
00136 this.cmdCancel.TabIndex = 5;
00137 this.cmdCancel.Text = "&Cancel";
00138 this.cmdCancel.Click += new System.EventHandler(this.cmdCancel_Click);
00139
00140
00141
00142 this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
00143 this.ClientSize = new System.Drawing.Size(368, 118);
00144 this.Controls.Add(this.cmdCancel);
00145 this.Controls.Add(this.cmdOK);
00146 this.Controls.Add(this.txtValue);
00147 this.Controls.Add(this.label2);
00148 this.Controls.Add(this.cboKey);
00149 this.Controls.Add(this.label1);
00150 this.Name = "frmAddComment";
00151 this.Text = "Add Comment...";
00152 this.Load += new System.EventHandler(this.frmAddComment_Load);
00153 this.ResumeLayout(false);
00154
00155 }
00156 #endregion
00157
00158 private void frmAddComment_Load(object sender, System.EventArgs e)
00159 {
00160 wasOK = false;
00161 cboKey.Text = Key;
00162 txtValue.Text = Value;
00163 }
00164
00165 private void cmdCancel_Click(object sender, System.EventArgs e)
00166 {
00167 wasOK = false;
00168 Key = "";
00169 Value = "";
00170 this.Close();
00171 }
00172
00173 private void cmdOK_Click(object sender, System.EventArgs e)
00174 {
00175 wasOK = true;
00176 Key = cboKey.Text;
00177 Value = txtValue.Text;
00178 this.Close();
00179 }
00180 }
00181 }