OSDN Git Service

Added support for gestures
authorLatif Khalifa <latifer@streamgrid.net>
Sun, 12 Jul 2009 16:48:27 +0000 (16:48 +0000)
committerLatif Khalifa <latifer@streamgrid.net>
Sun, 12 Jul 2009 16:48:27 +0000 (16:48 +0000)
git-svn-id: https://radegast.googlecode.com/svn/trunk@100 f7a694da-4d33-11de-9ad6-1127a62b9fcd

Radegast/GUI/Consoles/Assets/Guesture.Designer.cs [new file with mode: 0644]
Radegast/GUI/Consoles/Assets/Guesture.cs [new file with mode: 0644]
Radegast/GUI/Consoles/Assets/Guesture.resx [new file with mode: 0644]
Radegast/GUI/Consoles/Assets/Notecard.cs
Radegast/GUI/Consoles/Inventory/InventoryConsole.cs
Radegast/Radegast.csproj

diff --git a/Radegast/GUI/Consoles/Assets/Guesture.Designer.cs b/Radegast/GUI/Consoles/Assets/Guesture.Designer.cs
new file mode 100644 (file)
index 0000000..af0554f
--- /dev/null
@@ -0,0 +1,160 @@
+// \r
+// Radegast Metaverse Client\r
+// Copyright (c) 2009, Radegast Development Team\r
+// All rights reserved.\r
+// \r
+// Redistribution and use in source and binary forms, with or without\r
+// modification, are permitted provided that the following conditions are met:\r
+// \r
+//     * Redistributions of source code must retain the above copyright notice,\r
+//       this list of conditions and the following disclaimer.\r
+//     * Redistributions in binary form must reproduce the above copyright\r
+//       notice, this list of conditions and the following disclaimer in the\r
+//       documentation and/or other materials provided with the distribution.\r
+//     * Neither the name of the application "Radegast", nor the names of its\r
+//       contributors may be used to endorse or promote products derived from\r
+//       this software without specific prior written permission.\r
+// \r
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"\r
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\r
+// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\r
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\r
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\r
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\r
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\r
+// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\r
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+//\r
+// $Id$\r
+//\r
+namespace Radegast\r
+{\r
+    partial class Guesture\r
+    {\r
+        /// <summary> \r
+        /// Required designer variable.\r
+        /// </summary>\r
+        private System.ComponentModel.IContainer components = null;\r
+\r
+        /// <summary> \r
+        /// Clean up any resources being used.\r
+        /// </summary>\r
+        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>\r
+        protected override void Dispose(bool disposing)\r
+        {\r
+            if (disposing && (components != null))\r
+            {\r
+                components.Dispose();\r
+            }\r
+            base.Dispose(disposing);\r
+        }\r
+\r
+        #region Component Designer generated code\r
+\r
+        /// <summary> \r
+        /// Required method for Designer support - do not modify \r
+        /// the contents of this method with the code editor.\r
+        /// </summary>\r
+        private void InitializeComponent()\r
+        {\r
+            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Guesture));\r
+            this.lnPanel = new Radegast.LineNumberPanel();\r
+            this.rtbInfo = new Radegast.RRichTextBox();\r
+            this.toolStrip1 = new System.Windows.Forms.ToolStrip();\r
+            this.tbtnPlay = new System.Windows.Forms.ToolStripButton();\r
+            this.tbtnAttach = new System.Windows.Forms.ToolStripButton();\r
+            this.tlblStatus = new System.Windows.Forms.ToolStripLabel();\r
+            this.toolStrip1.SuspendLayout();\r
+            this.SuspendLayout();\r
+            // \r
+            // lnPanel\r
+            // \r
+            this.lnPanel.Dock = System.Windows.Forms.DockStyle.Left;\r
+            this.lnPanel.Location = new System.Drawing.Point(0, 25);\r
+            this.lnPanel.Name = "lnPanel";\r
+            this.lnPanel.RTB = this.rtbInfo;\r
+            this.lnPanel.Size = new System.Drawing.Size(30, 309);\r
+            this.lnPanel.TabIndex = 0;\r
+            // \r
+            // rtbInfo\r
+            // \r
+            this.rtbInfo.BorderStyle = System.Windows.Forms.BorderStyle.None;\r
+            this.rtbInfo.Dock = System.Windows.Forms.DockStyle.Fill;\r
+            this.rtbInfo.Location = new System.Drawing.Point(30, 25);\r
+            this.rtbInfo.Name = "rtbInfo";\r
+            this.rtbInfo.Size = new System.Drawing.Size(353, 309);\r
+            this.rtbInfo.TabIndex = 1;\r
+            this.rtbInfo.Text = "";\r
+            this.rtbInfo.WordWrap = false;\r
+            // \r
+            // toolStrip1\r
+            // \r
+            this.toolStrip1.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden;\r
+            this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {\r
+            this.tbtnPlay,\r
+            this.tbtnAttach,\r
+            this.tlblStatus});\r
+            this.toolStrip1.Location = new System.Drawing.Point(0, 0);\r
+            this.toolStrip1.Name = "toolStrip1";\r
+            this.toolStrip1.Size = new System.Drawing.Size(383, 25);\r
+            this.toolStrip1.TabIndex = 2;\r
+            this.toolStrip1.Text = "toolStrip1";\r
+            // \r
+            // tbtnPlay\r
+            // \r
+            this.tbtnPlay.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;\r
+            this.tbtnPlay.Enabled = false;\r
+            this.tbtnPlay.Image = ((System.Drawing.Image)(resources.GetObject("tbtnPlay.Image")));\r
+            this.tbtnPlay.ImageTransparentColor = System.Drawing.Color.Magenta;\r
+            this.tbtnPlay.Name = "tbtnPlay";\r
+            this.tbtnPlay.Size = new System.Drawing.Size(33, 22);\r
+            this.tbtnPlay.Text = "Play";\r
+            this.tbtnPlay.ToolTipText = "Play guesture in world";\r
+            this.tbtnPlay.Click += new System.EventHandler(this.tbtnPlay_Click);\r
+            // \r
+            // tbtnAttach\r
+            // \r
+            this.tbtnAttach.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;\r
+            this.tbtnAttach.Image = ((System.Drawing.Image)(resources.GetObject("tbtnAttach.Image")));\r
+            this.tbtnAttach.ImageTransparentColor = System.Drawing.Color.Magenta;\r
+            this.tbtnAttach.Name = "tbtnAttach";\r
+            this.tbtnAttach.Size = new System.Drawing.Size(48, 22);\r
+            this.tbtnAttach.Text = "Detach";\r
+            this.tbtnAttach.ToolTipText = "Detach this panel to separate window";\r
+            this.tbtnAttach.Click += new System.EventHandler(this.tbtnAttach_Click);\r
+            // \r
+            // tlblStatus\r
+            // \r
+            this.tlblStatus.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right;\r
+            this.tlblStatus.Name = "tlblStatus";\r
+            this.tlblStatus.Size = new System.Drawing.Size(39, 22);\r
+            this.tlblStatus.Text = "Status";\r
+            this.tlblStatus.ToolTipText = "Status";\r
+            // \r
+            // Guesture\r
+            // \r
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);\r
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;\r
+            this.Controls.Add(this.rtbInfo);\r
+            this.Controls.Add(this.lnPanel);\r
+            this.Controls.Add(this.toolStrip1);\r
+            this.Name = "Guesture";\r
+            this.Size = new System.Drawing.Size(383, 334);\r
+            this.toolStrip1.ResumeLayout(false);\r
+            this.toolStrip1.PerformLayout();\r
+            this.ResumeLayout(false);\r
+            this.PerformLayout();\r
+\r
+        }\r
+\r
+        #endregion\r
+\r
+        private Radegast.LineNumberPanel lnPanel;\r
+        private Radegast.RRichTextBox rtbInfo;\r
+        private System.Windows.Forms.ToolStrip toolStrip1;\r
+        private System.Windows.Forms.ToolStripButton tbtnPlay;\r
+        private System.Windows.Forms.ToolStripButton tbtnAttach;\r
+        private System.Windows.Forms.ToolStripLabel tlblStatus;\r
+    }\r
+}\r
diff --git a/Radegast/GUI/Consoles/Assets/Guesture.cs b/Radegast/GUI/Consoles/Assets/Guesture.cs
new file mode 100644 (file)
index 0000000..389d670
--- /dev/null
@@ -0,0 +1,139 @@
+// \r
+// Radegast Metaverse Client\r
+// Copyright (c) 2009, Radegast Development Team\r
+// All rights reserved.\r
+// \r
+// Redistribution and use in source and binary forms, with or without\r
+// modification, are permitted provided that the following conditions are met:\r
+// \r
+//     * Redistributions of source code must retain the above copyright notice,\r
+//       this list of conditions and the following disclaimer.\r
+//     * Redistributions in binary form must reproduce the above copyright\r
+//       notice, this list of conditions and the following disclaimer in the\r
+//       documentation and/or other materials provided with the distribution.\r
+//     * Neither the name of the application "Radegast", nor the names of its\r
+//       contributors may be used to endorse or promote products derived from\r
+//       this software without specific prior written permission.\r
+// \r
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"\r
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\r
+// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\r
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\r
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\r
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\r
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\r
+// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\r
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+//\r
+// $Id$\r
+//\r
+using System;\r
+using System.Collections.Generic;\r
+using System.ComponentModel;\r
+using System.Drawing;\r
+using System.Data;\r
+using System.Linq;\r
+using System.Text;\r
+using System.Windows.Forms;\r
+using OpenMetaverse;\r
+using OpenMetaverse.Assets;\r
+\r
+namespace Radegast\r
+{\r
+    public partial class Guesture : DettachableControl\r
+    {\r
+        private RadegastInstance instance;\r
+        private GridClient client { get { return instance.Client; } }\r
+        private InventoryGesture gesture;\r
+\r
+        public Guesture(RadegastInstance instance, InventoryGesture gesture)\r
+        {\r
+            InitializeComponent();\r
+            Disposed += new EventHandler(Guesture_Disposed);\r
+\r
+            this.instance = instance;\r
+            this.gesture = gesture;\r
+\r
+            // Callbacks\r
+            client.Assets.OnAssetReceived += new AssetManager.AssetReceivedCallback(Assets_OnAssetReceived);\r
+\r
+            // Start download\r
+            tlblStatus.Text = "Downloading...";\r
+            client.Assets.RequestInventoryAsset(gesture, true);\r
+        }\r
+\r
+        void Guesture_Disposed(object sender, EventArgs e)\r
+        {\r
+            client.Assets.OnAssetReceived -= new AssetManager.AssetReceivedCallback(Assets_OnAssetReceived);\r
+        }\r
+\r
+        void Assets_OnAssetReceived(AssetDownload transfer, Asset asset)\r
+        {\r
+            if (transfer.AssetID != gesture.AssetUUID) return;\r
+\r
+            if (InvokeRequired)\r
+            {\r
+                BeginInvoke(new MethodInvoker(delegate() { Assets_OnAssetReceived(transfer, asset); }));\r
+                return;\r
+            }\r
+\r
+            client.Assets.OnAssetReceived -= new AssetManager.AssetReceivedCallback(Assets_OnAssetReceived);\r
+\r
+            if (!transfer.Success)\r
+            {\r
+                tlblStatus.Text = "Download failed";\r
+                return;\r
+            }\r
+\r
+            tlblStatus.Text = "OK";\r
+            tbtnPlay.Enabled = true;\r
+\r
+            AssetGesture g = (AssetGesture)asset;\r
+            if (g.Decode())\r
+            {\r
+                for (int i=0; i<g.Sequence.Count; i++)\r
+                {\r
+                    rtbInfo.AppendText(g.Sequence[i].ToString().Trim() + Environment.NewLine);\r
+                }\r
+            }\r
+        }\r
+\r
+        #region Detach/Attach\r
+        protected override void ControlIsNotRetachable()\r
+        {\r
+            tbtnAttach.Visible = false;\r
+        }\r
+\r
+        protected override void Detach()\r
+        {\r
+            base.Detach();\r
+            tbtnAttach.Text = "Attach";\r
+        }\r
+\r
+        protected override void Retach()\r
+        {\r
+            base.Retach();\r
+            tbtnAttach.Text = "Detach";\r
+        }\r
+\r
+        private void tbtnAttach_Click(object sender, EventArgs e)\r
+        {\r
+            if (Detached)\r
+            {\r
+                Retach();\r
+            }\r
+            else\r
+            {\r
+                Detach();\r
+            }\r
+        }\r
+        #endregion\r
+\r
+        private void tbtnPlay_Click(object sender, EventArgs e)\r
+        {\r
+            client.Self.PlayGesture(gesture.AssetUUID);\r
+        }\r
+\r
+    }\r
+}\r
diff --git a/Radegast/GUI/Consoles/Assets/Guesture.resx b/Radegast/GUI/Consoles/Assets/Guesture.resx
new file mode 100644 (file)
index 0000000..397fbff
--- /dev/null
@@ -0,0 +1,154 @@
+<?xml version="1.0" encoding="utf-8"?>\r
+<root>\r
+  <!-- \r
+    Microsoft ResX Schema \r
+    \r
+    Version 2.0\r
+    \r
+    The primary goals of this format is to allow a simple XML format \r
+    that is mostly human readable. The generation and parsing of the \r
+    various data types are done through the TypeConverter classes \r
+    associated with the data types.\r
+    \r
+    Example:\r
+    \r
+    ... ado.net/XML headers & schema ...\r
+    <resheader name="resmimetype">text/microsoft-resx</resheader>\r
+    <resheader name="version">2.0</resheader>\r
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>\r
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>\r
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>\r
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>\r
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">\r
+        <value>[base64 mime encoded serialized .NET Framework object]</value>\r
+    </data>\r
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">\r
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>\r
+        <comment>This is a comment</comment>\r
+    </data>\r
+                \r
+    There are any number of "resheader" rows that contain simple \r
+    name/value pairs.\r
+    \r
+    Each data row contains a name, and value. The row also contains a \r
+    type or mimetype. Type corresponds to a .NET class that support \r
+    text/value conversion through the TypeConverter architecture. \r
+    Classes that don't support this are serialized and stored with the \r
+    mimetype set.\r
+    \r
+    The mimetype is used for serialized objects, and tells the \r
+    ResXResourceReader how to depersist the object. This is currently not \r
+    extensible. For a given mimetype the value must be set accordingly:\r
+    \r
+    Note - application/x-microsoft.net.object.binary.base64 is the format \r
+    that the ResXResourceWriter will generate, however the reader can \r
+    read any of the formats listed below.\r
+    \r
+    mimetype: application/x-microsoft.net.object.binary.base64\r
+    value   : The object must be serialized with \r
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter\r
+            : and then encoded with base64 encoding.\r
+    \r
+    mimetype: application/x-microsoft.net.object.soap.base64\r
+    value   : The object must be serialized with \r
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter\r
+            : and then encoded with base64 encoding.\r
+\r
+    mimetype: application/x-microsoft.net.object.bytearray.base64\r
+    value   : The object must be serialized into a byte array \r
+            : using a System.ComponentModel.TypeConverter\r
+            : and then encoded with base64 encoding.\r
+    -->\r
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">\r
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />\r
+    <xsd:element name="root" msdata:IsDataSet="true">\r
+      <xsd:complexType>\r
+        <xsd:choice maxOccurs="unbounded">\r
+          <xsd:element name="metadata">\r
+            <xsd:complexType>\r
+              <xsd:sequence>\r
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />\r
+              </xsd:sequence>\r
+              <xsd:attribute name="name" use="required" type="xsd:string" />\r
+              <xsd:attribute name="type" type="xsd:string" />\r
+              <xsd:attribute name="mimetype" type="xsd:string" />\r
+              <xsd:attribute ref="xml:space" />\r
+            </xsd:complexType>\r
+          </xsd:element>\r
+          <xsd:element name="assembly">\r
+            <xsd:complexType>\r
+              <xsd:attribute name="alias" type="xsd:string" />\r
+              <xsd:attribute name="name" type="xsd:string" />\r
+            </xsd:complexType>\r
+          </xsd:element>\r
+          <xsd:element name="data">\r
+            <xsd:complexType>\r
+              <xsd:sequence>\r
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />\r
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />\r
+              </xsd:sequence>\r
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />\r
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />\r
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />\r
+              <xsd:attribute ref="xml:space" />\r
+            </xsd:complexType>\r
+          </xsd:element>\r
+          <xsd:element name="resheader">\r
+            <xsd:complexType>\r
+              <xsd:sequence>\r
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />\r
+              </xsd:sequence>\r
+              <xsd:attribute name="name" type="xsd:string" use="required" />\r
+            </xsd:complexType>\r
+          </xsd:element>\r
+        </xsd:choice>\r
+      </xsd:complexType>\r
+    </xsd:element>\r
+  </xsd:schema>\r
+  <resheader name="resmimetype">\r
+    <value>text/microsoft-resx</value>\r
+  </resheader>\r
+  <resheader name="version">\r
+    <value>2.0</value>\r
+  </resheader>\r
+  <resheader name="reader">\r
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\r
+  </resheader>\r
+  <resheader name="writer">\r
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\r
+  </resheader>\r
+  <metadata name="toolStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">\r
+    <value>17, 17</value>\r
+  </metadata>\r
+  <assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />\r
+  <data name="tbtnPlay.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">\r
+    <value>\r
+        iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8\r
+        YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAgxJREFUOE+lkvtL\r
+        U2EYx+0PEbtpFwnBKPGKiJImGP0gYhIYs1E5GF5gIxkpA00JRSmMEF0ohMh+GaRWYlqabMVcNdS2QpaI\r
+        VqiDIYhk397vA6fXhCjyhYdzeM/5fp7vczkAdeL2cwho7v/wWzT1zcN+Pwhr51uY2/y41PQaF+wzKKiZ\r
+        QvaN58g0jyLd5KEUcQbg+84P/Cm2tncQjW3j68YWIqubCC3FcOJc478BAuGoZM6zvoRnakXEruEIjhc4\r
+        /g5gZop9c+voGAyLbQIfeBZxLL9BA1jzXvuGbWamuKh+GmmVbswE19A59FEBbmoAG7YbsLtm2mZmiml9\r
+        cvabNDwpz6YB7LYBoMXCumkJr7LOmnnHzBQ/9X2Bo2cOibm1GsBREbAQiYmw/8lnuCeWkVzcgnZlnw1j\r
+        3HV/wuNXK6i/9x5Hc6wawDlTXHbLJ+LZUBQPRyKwdQdxutwl1h+NLXHh5Ht1ewBHsiwawCW57HyDAfWR\r
+        dvl0uhZQ1eqX8aVc7EKLqrum651ATLf9OJx5XQM4KmY0xPzZ0hFAiQJnXB0WwME0E3IsL5B17ZlADqWb\r
+        NYDrOepdlcysmTWWOrxqbceRWtaLk0VO1XW72D5Vckd2gMBfq8zdpmUG62NJvKM4+XyziDk24xmfWoGE\r
+        s1c0gHPmbrPTpHNJKOCo2G1mZs20zcwUJ5yp1AB5+8/zEwgF5GMVDxh4AAAAAElFTkSuQmCC\r
+</value>\r
+  </data>\r
+  <data name="tbtnAttach.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">\r
+    <value>\r
+        iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8\r
+        YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAgxJREFUOE+lkvtL\r
+        U2EYx+0PEbtpFwnBKPGKiJImGP0gYhIYs1E5GF5gIxkpA00JRSmMEF0ohMh+GaRWYlqabMVcNdS2QpaI\r
+        VqiDIYhk397vA6fXhCjyhYdzeM/5fp7vczkAdeL2cwho7v/wWzT1zcN+Pwhr51uY2/y41PQaF+wzKKiZ\r
+        QvaN58g0jyLd5KEUcQbg+84P/Cm2tncQjW3j68YWIqubCC3FcOJc478BAuGoZM6zvoRnakXEruEIjhc4\r
+        /g5gZop9c+voGAyLbQIfeBZxLL9BA1jzXvuGbWamuKh+GmmVbswE19A59FEBbmoAG7YbsLtm2mZmiml9\r
+        cvabNDwpz6YB7LYBoMXCumkJr7LOmnnHzBQ/9X2Bo2cOibm1GsBREbAQiYmw/8lnuCeWkVzcgnZlnw1j\r
+        3HV/wuNXK6i/9x5Hc6wawDlTXHbLJ+LZUBQPRyKwdQdxutwl1h+NLXHh5Ht1ewBHsiwawCW57HyDAfWR\r
+        dvl0uhZQ1eqX8aVc7EKLqrum651ATLf9OJx5XQM4KmY0xPzZ0hFAiQJnXB0WwME0E3IsL5B17ZlADqWb\r
+        NYDrOepdlcysmTWWOrxqbceRWtaLk0VO1XW72D5Vckd2gMBfq8zdpmUG62NJvKM4+XyziDk24xmfWoGE\r
+        s1c0gHPmbrPTpHNJKOCo2G1mZs20zcwUJ5yp1AB5+8/zEwgF5GMVDxh4AAAAAElFTkSuQmCC\r
+</value>\r
+  </data>\r
+</root>
\ No newline at end of file
index f75e016..66052c9 100644 (file)
@@ -48,8 +48,6 @@ namespace Radegast
         private InventoryNotecard notecard;\r
         private AssetNotecard recievedNotecard;\r
 \r
-        private UUID requestID;\r
-\r
         public Notecard(RadegastInstance instance, InventoryNotecard notecard)\r
         {\r
             InitializeComponent();\r
@@ -65,7 +63,7 @@ namespace Radegast
             // Callbacks\r
             client.Assets.OnAssetReceived += new AssetManager.AssetReceivedCallback(Assets_OnAssetReceived);\r
 \r
-            requestID = client.Assets.RequestInventoryAsset(notecard, true);\r
+            client.Assets.RequestInventoryAsset(notecard, true);\r
         }\r
 \r
         void Notecard_Disposed(object sender, EventArgs e)\r
@@ -75,7 +73,7 @@ namespace Radegast
 \r
         void Assets_OnAssetReceived(AssetDownload transfer, Asset asset)\r
         {\r
-            if (requestID != transfer.ID) return;\r
+            if (transfer.AssetID != notecard.AssetUUID) return;\r
 \r
             if (InvokeRequired)\r
             {\r
@@ -174,7 +172,7 @@ namespace Radegast
         private void btnRefresh_Click(object sender, EventArgs e)\r
         {\r
             rtbContent.Text = "Loading...";\r
-            requestID = client.Assets.RequestInventoryAsset(notecard, true);\r
+            client.Assets.RequestInventoryAsset(notecard, true);\r
         }\r
 \r
         private void rtbContent_LinkClicked(object sender, LinkClickedEventArgs e)\r
index 72a89ad..30d8d5e 100644 (file)
@@ -632,6 +632,10 @@ namespace Radegast
             {\r
                 txtAssetID.Text = String.Empty;\r
             }\r
+            foreach (Control c in pnlDetail.Controls)\r
+            {\r
+                c.Dispose();\r
+            }\r
             pnlDetail.Controls.Clear();\r
 \r
             switch (item.AssetType)\r
@@ -660,6 +664,12 @@ namespace Radegast
                     pnlDetail.Controls.Add(script);\r
                     break;\r
 \r
+                case AssetType.Gesture:\r
+                    Guesture gesture = new Guesture(instance, (InventoryGesture)item);\r
+                    gesture.Dock = DockStyle.Fill;\r
+                    pnlDetail.Controls.Add(gesture);\r
+                    break;\r
+\r
             }\r
         }\r
 \r
index 0068137..477118f 100644 (file)
     <Compile Include="GUI\Consoles\AnimTab.Designer.cs">\r
       <DependentUpon>AnimTab.cs</DependentUpon>\r
     </Compile>\r
+    <Compile Include="GUI\Consoles\Assets\Guesture.cs">\r
+      <SubType>UserControl</SubType>\r
+    </Compile>\r
+    <Compile Include="GUI\Consoles\Assets\Guesture.Designer.cs">\r
+      <DependentUpon>Guesture.cs</DependentUpon>\r
+    </Compile>\r
     <Compile Include="GUI\Consoles\Assets\Landmark.cs">\r
       <SubType>UserControl</SubType>\r
     </Compile>\r
       <SubType>Designer</SubType>\r
       <DependentUpon>AnimTab.cs</DependentUpon>\r
     </EmbeddedResource>\r
+    <EmbeddedResource Include="GUI\Consoles\Assets\Guesture.resx">\r
+      <DependentUpon>Guesture.cs</DependentUpon>\r
+      <SubType>Designer</SubType>\r
+    </EmbeddedResource>\r
     <EmbeddedResource Include="GUI\Consoles\Assets\Landmark.resx">\r
       <DependentUpon>Landmark.cs</DependentUpon>\r
       <SubType>Designer</SubType>\r