[mapguide-commits] r5572 - sandbox/maestro-3.0/Maestro.Editors/Generic

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Mon Feb 28 10:41:59 EST 2011


Author: jng
Date: 2011-02-28 07:41:58 -0800 (Mon, 28 Feb 2011)
New Revision: 5572

Modified:
   sandbox/maestro-3.0/Maestro.Editors/Generic/XmlEditorCtrl.Designer.cs
   sandbox/maestro-3.0/Maestro.Editors/Generic/XmlEditorCtrl.cs
   sandbox/maestro-3.0/Maestro.Editors/Generic/XmlEditorCtrl.resx
Log:
Implement unimplemented cut/copy/paste/undo commands on the xml editor toolbar

Modified: sandbox/maestro-3.0/Maestro.Editors/Generic/XmlEditorCtrl.Designer.cs
===================================================================
--- sandbox/maestro-3.0/Maestro.Editors/Generic/XmlEditorCtrl.Designer.cs	2011-02-28 15:17:24 UTC (rev 5571)
+++ sandbox/maestro-3.0/Maestro.Editors/Generic/XmlEditorCtrl.Designer.cs	2011-02-28 15:41:58 UTC (rev 5572)
@@ -94,6 +94,7 @@
             this.btnCopy.Image = global::Maestro.Editors.Properties.Resources.document_copy;
             resources.ApplyResources(this.btnCopy, "btnCopy");
             this.btnCopy.Name = "btnCopy";
+            this.btnCopy.Click += new System.EventHandler(this.btnCopy_Click);
             // 
             // btnCut
             // 
@@ -101,6 +102,7 @@
             this.btnCut.Image = global::Maestro.Editors.Properties.Resources.scissors_blue;
             resources.ApplyResources(this.btnCut, "btnCut");
             this.btnCut.Name = "btnCut";
+            this.btnCut.Click += new System.EventHandler(this.btnCut_Click);
             // 
             // btnPaste
             // 
@@ -108,6 +110,7 @@
             this.btnPaste.Image = global::Maestro.Editors.Properties.Resources.clipboard_paste;
             resources.ApplyResources(this.btnPaste, "btnPaste");
             this.btnPaste.Name = "btnPaste";
+            this.btnPaste.Click += new System.EventHandler(this.btnPaste_Click);
             // 
             // toolStripSeparator2
             // 

Modified: sandbox/maestro-3.0/Maestro.Editors/Generic/XmlEditorCtrl.cs
===================================================================
--- sandbox/maestro-3.0/Maestro.Editors/Generic/XmlEditorCtrl.cs	2011-02-28 15:17:24 UTC (rev 5571)
+++ sandbox/maestro-3.0/Maestro.Editors/Generic/XmlEditorCtrl.cs	2011-02-28 15:41:58 UTC (rev 5572)
@@ -215,9 +215,32 @@
 
         private void txtXmlContent_KeyUp(object sender, KeyEventArgs e)
         {
-            if (e.Control && e.KeyCode == Keys.A)
+            /*
+            if (e.KeyData == (Keys.Control | Keys.A))
+            {
                 txtXmlContent.SelectAll();
-
+                e.SuppressKeyPress = true;
+                e.Handled = true;
+            }
+            else if (e.KeyData == (Keys.Control | Keys.C))
+            {
+                txtXmlContent.Copy();
+                e.SuppressKeyPress = true;
+                e.Handled = true;
+            }
+            else if (e.KeyData == (Keys.Control | Keys.V))
+            {
+                txtXmlContent.Paste();
+                e.SuppressKeyPress = true;
+                e.Handled = true;
+            }
+            else if (e.KeyData == (Keys.Control | Keys.X))
+            {
+                txtXmlContent.Cut();
+                e.SuppressKeyPress = true;
+                e.Handled = true;
+            }
+            */
             UpdateTextPosition();
             EvaluateCommands();
         }
@@ -315,5 +338,20 @@
             if (_ready)
                 OnResourceChanged();
         }
+
+        private void btnCut_Click(object sender, EventArgs e)
+        {
+            txtXmlContent.Cut();
+        }
+
+        private void btnCopy_Click(object sender, EventArgs e)
+        {
+            txtXmlContent.Copy();
+        }
+
+        private void btnPaste_Click(object sender, EventArgs e)
+        {
+            txtXmlContent.Paste();
+        }
     }
 }

Modified: sandbox/maestro-3.0/Maestro.Editors/Generic/XmlEditorCtrl.resx
===================================================================
--- sandbox/maestro-3.0/Maestro.Editors/Generic/XmlEditorCtrl.resx	2011-02-28 15:17:24 UTC (rev 5571)
+++ sandbox/maestro-3.0/Maestro.Editors/Generic/XmlEditorCtrl.resx	2011-02-28 15:41:58 UTC (rev 5572)
@@ -118,7 +118,7 @@
     <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </resheader>
   <metadata name="toolStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
-    <value>17, 17</value>
+    <value>0, 0</value>
   </metadata>
   <assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
   <data name="btnUndo.ImageTransparentColor" type="System.Drawing.Color, System.Drawing">
@@ -330,7 +330,7 @@
     <value>resDataCtrl</value>
   </data>
   <data name="&gt;&gt;resDataCtrl.Type" xml:space="preserve">
-    <value>Maestro.Editors.Generic.ResourceDataPanel, Maestro.Editors, Version=3.0.0.5334, Culture=neutral, PublicKeyToken=null</value>
+    <value>Maestro.Editors.Generic.ResourceDataPanel, Maestro.Editors, Version=3.0.0.5475, Culture=neutral, PublicKeyToken=null</value>
   </data>
   <data name="&gt;&gt;resDataCtrl.Parent" xml:space="preserve">
     <value>$this</value>
@@ -450,6 +450,6 @@
     <value>XmlEditorCtrl</value>
   </data>
   <data name="&gt;&gt;$this.Type" xml:space="preserve">
-    <value>Maestro.Editors.EditorBase, Maestro.Editors, Version=3.0.0.5334, Culture=neutral, PublicKeyToken=null</value>
+    <value>Maestro.Editors.EditorBase, Maestro.Editors, Version=3.0.0.5475, Culture=neutral, PublicKeyToken=null</value>
   </data>
 </root>
\ No newline at end of file



More information about the mapguide-commits mailing list