[xiph-commits] r7317 - trunk/oggdsf/src/tools/iOCE
illiminable at dactyl.lonelymoon.com
illiminable
Sat Jul 24 09:49:21 PDT 2004
Author: illiminable
Date: Sat Jul 24 09:49:21 2004
New Revision: 7317
Modified:
trunk/oggdsf/src/tools/iOCE/frmAddComment.cs
trunk/oggdsf/src/tools/iOCE/frmMain.cs
trunk/oggdsf/src/tools/iOCE/frmMain.resx
Log:
* Comment editing GUI done.
Modified: trunk/oggdsf/src/tools/iOCE/frmAddComment.cs
===================================================================
--- trunk/oggdsf/src/tools/iOCE/frmAddComment.cs 2004-07-24 15:30:53 UTC (rev 7316)
+++ trunk/oggdsf/src/tools/iOCE/frmAddComment.cs 2004-07-24 16:49:18 UTC (rev 7317)
@@ -33,6 +33,9 @@
//
InitializeComponent();
+ wasOK = false;
+ Key = "";
+ Value = "";
//
// TODO: Add any constructor code after InitializeComponent call
//
@@ -155,8 +158,8 @@
private void frmAddComment_Load(object sender, System.EventArgs e)
{
wasOK = false;
- Key = "";
- Value = "";
+ cboKey.Text = Key;
+ txtValue.Text = Value;
}
private void cmdCancel_Click(object sender, System.EventArgs e)
Modified: trunk/oggdsf/src/tools/iOCE/frmMain.cs
===================================================================
--- trunk/oggdsf/src/tools/iOCE/frmMain.cs 2004-07-24 15:30:53 UTC (rev 7316)
+++ trunk/oggdsf/src/tools/iOCE/frmMain.cs 2004-07-24 16:49:18 UTC (rev 7317)
@@ -98,14 +98,14 @@
this.mnuFileExit = new System.Windows.Forms.MenuItem();
this.lblVendor = new System.Windows.Forms.Label();
this.groupBox1 = new System.Windows.Forms.GroupBox();
+ this.cmdEdit = new System.Windows.Forms.Button();
+ this.cmdRemove = new System.Windows.Forms.Button();
+ this.cmdAdd = new System.Windows.Forms.Button();
this.lsvUserComments = new System.Windows.Forms.ListView();
this.colKey = new System.Windows.Forms.ColumnHeader();
this.colValue = new System.Windows.Forms.ColumnHeader();
this.txtVendorString = new System.Windows.Forms.TextBox();
this.dlgOpenFile = new System.Windows.Forms.OpenFileDialog();
- this.cmdAdd = new System.Windows.Forms.Button();
- this.cmdRemove = new System.Windows.Forms.Button();
- this.cmdEdit = new System.Windows.Forms.Button();
this.cmdApply = new System.Windows.Forms.Button();
this.cmdRevert = new System.Windows.Forms.Button();
this.groupBox1.SuspendLayout();
@@ -167,6 +167,35 @@
this.groupBox1.TabStop = false;
this.groupBox1.Text = "Vorbis Comments";
//
+ // cmdEdit
+ //
+ this.cmdEdit.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
+ this.cmdEdit.Location = new System.Drawing.Point(440, 192);
+ this.cmdEdit.Name = "cmdEdit";
+ this.cmdEdit.Size = new System.Drawing.Size(80, 24);
+ this.cmdEdit.TabIndex = 5;
+ this.cmdEdit.Text = "&Edit...";
+ this.cmdEdit.Click += new System.EventHandler(this.cmdEdit_Click);
+ //
+ // cmdRemove
+ //
+ this.cmdRemove.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
+ this.cmdRemove.Location = new System.Drawing.Point(536, 192);
+ this.cmdRemove.Name = "cmdRemove";
+ this.cmdRemove.Size = new System.Drawing.Size(80, 24);
+ this.cmdRemove.TabIndex = 4;
+ this.cmdRemove.Text = "&Remove";
+ //
+ // cmdAdd
+ //
+ this.cmdAdd.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
+ this.cmdAdd.Location = new System.Drawing.Point(344, 192);
+ this.cmdAdd.Name = "cmdAdd";
+ this.cmdAdd.Size = new System.Drawing.Size(80, 24);
+ this.cmdAdd.TabIndex = 3;
+ this.cmdAdd.Text = "&Add...";
+ this.cmdAdd.Click += new System.EventHandler(this.cmdAdd_Click);
+ //
// lsvUserComments
//
this.lsvUserComments.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
@@ -201,34 +230,6 @@
this.txtVendorString.TabIndex = 1;
this.txtVendorString.Text = "";
//
- // cmdAdd
- //
- this.cmdAdd.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
- this.cmdAdd.Location = new System.Drawing.Point(344, 192);
- this.cmdAdd.Name = "cmdAdd";
- this.cmdAdd.Size = new System.Drawing.Size(80, 24);
- this.cmdAdd.TabIndex = 3;
- this.cmdAdd.Text = "&Add...";
- this.cmdAdd.Click += new System.EventHandler(this.cmdAdd_Click);
- //
- // cmdRemove
- //
- this.cmdRemove.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
- this.cmdRemove.Location = new System.Drawing.Point(536, 192);
- this.cmdRemove.Name = "cmdRemove";
- this.cmdRemove.Size = new System.Drawing.Size(80, 24);
- this.cmdRemove.TabIndex = 4;
- this.cmdRemove.Text = "&Remove";
- //
- // cmdEdit
- //
- this.cmdEdit.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
- this.cmdEdit.Location = new System.Drawing.Point(440, 192);
- this.cmdEdit.Name = "cmdEdit";
- this.cmdEdit.Size = new System.Drawing.Size(80, 24);
- this.cmdEdit.TabIndex = 5;
- this.cmdEdit.Text = "&Edit...";
- //
// cmdApply
//
this.cmdApply.Location = new System.Drawing.Point(456, 280);
@@ -289,7 +290,7 @@
private void cmdAdd_Click(object sender, System.EventArgs e)
{
- ListView.SelectedListViewItemCollection locSelected = lsvUserComments.SelectedItems;
+
ListViewItem locItem = null;
frmAddComment locAddForm = new frmAddComment();
@@ -304,5 +305,36 @@
}
}
+
+ private void cmdEdit_Click(object sender, System.EventArgs e)
+ {
+ ListView.SelectedListViewItemCollection locSelected = lsvUserComments.SelectedItems;
+
+
+
+ if (locSelected.Count == 1)
+ {
+ ListViewItem locItem = locSelected[0];
+ ListViewItem.ListViewSubItemCollection locSubItems = locItem.SubItems;
+
+ frmAddComment locAddForm = new frmAddComment();
+ locAddForm.Text = "Edit Comment...";
+ locAddForm.Key = locSubItems[0].Text;
+ locAddForm.Value = locSubItems[1].Text;
+
+
+ locAddForm.ShowDialog();
+ if (locAddForm.wasOK == true)
+ {
+ String[] locSubItemStr = new String[2];
+ locSubItemStr[0] = locAddForm.Key;
+ locSubItemStr[1] = locAddForm.Value;
+ lsvUserComments.Items.Remove(locItem);
+ locItem = new ListViewItem(locSubItemStr);
+
+ lsvUserComments.Items.Add(locItem);
+ }
+ }
+ }
}
}
Modified: trunk/oggdsf/src/tools/iOCE/frmMain.resx
===================================================================
--- trunk/oggdsf/src/tools/iOCE/frmMain.resx 2004-07-24 15:30:53 UTC (rev 7316)
+++ trunk/oggdsf/src/tools/iOCE/frmMain.resx 2004-07-24 16:49:18 UTC (rev 7317)
@@ -157,6 +157,33 @@
<data name="groupBox1.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
+ <data name="cmdEdit.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+ <value>False</value>
+ </data>
+ <data name="cmdEdit.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+ <value>Private</value>
+ </data>
+ <data name="cmdEdit.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+ <value>Private</value>
+ </data>
+ <data name="cmdRemove.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+ <value>False</value>
+ </data>
+ <data name="cmdRemove.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+ <value>Private</value>
+ </data>
+ <data name="cmdRemove.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+ <value>Private</value>
+ </data>
+ <data name="cmdAdd.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+ <value>False</value>
+ </data>
+ <data name="cmdAdd.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+ <value>Private</value>
+ </data>
+ <data name="cmdAdd.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+ <value>Private</value>
+ </data>
<data name="lsvUserComments.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
@@ -196,33 +223,6 @@
<data name="dlgOpenFile.Location" type="System.Drawing.Point, System.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>114, 17</value>
</data>
- <data name="cmdAdd.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
- <value>False</value>
- </data>
- <data name="cmdAdd.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
- <value>Private</value>
- </data>
- <data name="cmdAdd.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
- <value>Private</value>
- </data>
- <data name="cmdRemove.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
- <value>False</value>
- </data>
- <data name="cmdRemove.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
- <value>Private</value>
- </data>
- <data name="cmdRemove.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
- <value>Private</value>
- </data>
- <data name="cmdEdit.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
- <value>False</value>
- </data>
- <data name="cmdEdit.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
- <value>Private</value>
- </data>
- <data name="cmdEdit.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
- <value>Private</value>
- </data>
<data name="cmdApply.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
@@ -253,15 +253,15 @@
<data name="$this.Localizable" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
- <data name="$this.Name">
- <value>frmMain</value>
- </data>
<data name="$this.GridSize" type="System.Drawing.Size, System.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>8, 8</value>
</data>
<data name="$this.DrawGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</data>
+ <data name="$this.Name">
+ <value>frmMain</value>
+ </data>
<data name="$this.TrayHeight" type="System.Int32, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>80</value>
</data>
More information about the commits
mailing list