InitializeLoggingAndConfig();\r
\r
client = new GridClient();\r
+\r
+ client.Settings.MULTIPLE_SIMS = true;\r
+\r
client.Settings.USE_INTERPOLATION_TIMER = false;\r
client.Settings.ALWAYS_REQUEST_OBJECTS = true;\r
client.Settings.ALWAYS_DECODE_OBJECTS = true;\r
client.Settings.OBJECT_TRACKING = true;\r
client.Settings.ENABLE_SIMSTATS = true;\r
client.Settings.FETCH_MISSING_INVENTORY = true;\r
- client.Settings.MULTIPLE_SIMS = true;\r
client.Settings.SEND_AGENT_THROTTLE = true;\r
client.Settings.SEND_AGENT_UPDATES = true;\r
\r
client.Groups.RequestCurrentGroups();\r
}\r
\r
+ public static string SafeFileName(string fileName)\r
+ {\r
+ foreach (char lDisallowed in Path.GetInvalidFileNameChars())\r
+ {\r
+ fileName = fileName.Replace(lDisallowed.ToString(), "_");\r
+ }\r
+\r
+ return fileName;\r
+ }\r
+\r
public void LogClientMessage(string fileName, string message)\r
{\r
lock (this)\r
--- /dev/null
+// \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: RadegastInstance.cs 152 2009-08-24 14:19:58Z latifer@gmail.com $\r
+//\r
+namespace Radegast\r
+{\r
+ partial class InventoryBackup\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 Windows Form 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(InventoryBackup));\r
+ this.txtFolderName = new System.Windows.Forms.TextBox();\r
+ this.btnFolder = new System.Windows.Forms.Button();\r
+ this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog();\r
+ this.toolStrip1 = new System.Windows.Forms.ToolStrip();\r
+ this.lblStatus = new System.Windows.Forms.ToolStripLabel();\r
+ this.sbrProgress = new System.Windows.Forms.ToolStripProgressBar();\r
+ this.lvwFiles = new Radegast.ListViewNoFlicker();\r
+ this.InventoryItem = new System.Windows.Forms.ColumnHeader();\r
+ this.clFileName = new System.Windows.Forms.ColumnHeader();\r
+ this.Progress = new System.Windows.Forms.ColumnHeader();\r
+ this.toolStrip1.SuspendLayout();\r
+ this.SuspendLayout();\r
+ // \r
+ // txtFolderName\r
+ // \r
+ this.txtFolderName.Location = new System.Drawing.Point(12, 12);\r
+ this.txtFolderName.Name = "txtFolderName";\r
+ this.txtFolderName.ReadOnly = true;\r
+ this.txtFolderName.Size = new System.Drawing.Size(308, 20);\r
+ this.txtFolderName.TabIndex = 0;\r
+ // \r
+ // btnFolder\r
+ // \r
+ this.btnFolder.Location = new System.Drawing.Point(326, 10);\r
+ this.btnFolder.Name = "btnFolder";\r
+ this.btnFolder.Size = new System.Drawing.Size(75, 23);\r
+ this.btnFolder.TabIndex = 1;\r
+ this.btnFolder.Text = "Select folder";\r
+ this.btnFolder.UseVisualStyleBackColor = true;\r
+ this.btnFolder.Click += new System.EventHandler(this.btnFolder_Click);\r
+ // \r
+ // openFileDialog1\r
+ // \r
+ this.openFileDialog1.AddExtension = false;\r
+ this.openFileDialog1.CheckFileExists = false;\r
+ this.openFileDialog1.FileName = "use this folder";\r
+ // \r
+ // toolStrip1\r
+ // \r
+ this.toolStrip1.Dock = System.Windows.Forms.DockStyle.Bottom;\r
+ this.toolStrip1.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden;\r
+ this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {\r
+ this.lblStatus,\r
+ this.sbrProgress});\r
+ this.toolStrip1.Location = new System.Drawing.Point(0, 361);\r
+ this.toolStrip1.Name = "toolStrip1";\r
+ this.toolStrip1.Size = new System.Drawing.Size(774, 25);\r
+ this.toolStrip1.TabIndex = 2;\r
+ // \r
+ // lblStatus\r
+ // \r
+ this.lblStatus.Name = "lblStatus";\r
+ this.lblStatus.Size = new System.Drawing.Size(39, 22);\r
+ this.lblStatus.Text = "Status";\r
+ // \r
+ // sbrProgress\r
+ // \r
+ this.sbrProgress.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right;\r
+ this.sbrProgress.Name = "sbrProgress";\r
+ this.sbrProgress.Size = new System.Drawing.Size(100, 22);\r
+ this.sbrProgress.Step = 1;\r
+ // \r
+ // lvwFiles\r
+ // \r
+ this.lvwFiles.AllowColumnReorder = true;\r
+ this.lvwFiles.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)\r
+ | System.Windows.Forms.AnchorStyles.Left)\r
+ | System.Windows.Forms.AnchorStyles.Right)));\r
+ this.lvwFiles.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {\r
+ this.InventoryItem,\r
+ this.clFileName,\r
+ this.Progress});\r
+ this.lvwFiles.FullRowSelect = true;\r
+ this.lvwFiles.GridLines = true;\r
+ this.lvwFiles.HideSelection = false;\r
+ this.lvwFiles.Location = new System.Drawing.Point(0, 39);\r
+ this.lvwFiles.MultiSelect = false;\r
+ this.lvwFiles.Name = "lvwFiles";\r
+ this.lvwFiles.ShowGroups = false;\r
+ this.lvwFiles.ShowItemToolTips = true;\r
+ this.lvwFiles.Size = new System.Drawing.Size(774, 319);\r
+ this.lvwFiles.TabIndex = 15;\r
+ this.lvwFiles.UseCompatibleStateImageBehavior = false;\r
+ this.lvwFiles.View = System.Windows.Forms.View.Details;\r
+ this.lvwFiles.DoubleClick += new System.EventHandler(this.lvwFiles_DoubleClick);\r
+ // \r
+ // InventoryItem\r
+ // \r
+ this.InventoryItem.Text = "Inventory item";\r
+ this.InventoryItem.Width = 200;\r
+ // \r
+ // clFileName\r
+ // \r
+ this.clFileName.Text = "File";\r
+ this.clFileName.Width = 350;\r
+ // \r
+ // Progress\r
+ // \r
+ this.Progress.Text = "Progress";\r
+ this.Progress.Width = 193;\r
+ // \r
+ // InventoryBackup\r
+ // \r
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);\r
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;\r
+ this.ClientSize = new System.Drawing.Size(774, 386);\r
+ this.Controls.Add(this.lvwFiles);\r
+ this.Controls.Add(this.toolStrip1);\r
+ this.Controls.Add(this.btnFolder);\r
+ this.Controls.Add(this.txtFolderName);\r
+ this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));\r
+ this.Name = "InventoryBackup";\r
+ this.Text = "Inventory Backup";\r
+ this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.InventoryBackup_FormClosing);\r
+ this.toolStrip1.ResumeLayout(false);\r
+ this.toolStrip1.PerformLayout();\r
+ this.ResumeLayout(false);\r
+ this.PerformLayout();\r
+\r
+ }\r
+\r
+ #endregion\r
+\r
+ private System.Windows.Forms.TextBox txtFolderName;\r
+ private System.Windows.Forms.Button btnFolder;\r
+ private System.Windows.Forms.OpenFileDialog openFileDialog1;\r
+ private System.Windows.Forms.ToolStrip toolStrip1;\r
+ private System.Windows.Forms.ToolStripLabel lblStatus;\r
+ private System.Windows.Forms.ToolStripProgressBar sbrProgress;\r
+ private ListViewNoFlicker lvwFiles;\r
+ private System.Windows.Forms.ColumnHeader InventoryItem;\r
+ private System.Windows.Forms.ColumnHeader clFileName;\r
+ private System.Windows.Forms.ColumnHeader Progress;\r
+ }\r
+}
\ No newline at end of file
--- /dev/null
+// \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: RadegastInstance.cs 152 2009-08-24 14:19:58Z latifer@gmail.com $\r
+//\r
+using System;\r
+using System.Collections;\r
+using System.Collections.Generic;\r
+using System.IO;\r
+using System.Threading;\r
+using System.Windows.Forms;\r
+using OpenMetaverse;\r
+using OpenMetaverse.Assets;\r
+\r
+namespace Radegast\r
+{\r
+ public partial class InventoryBackup : Form\r
+ {\r
+ private RadegastInstance instance;\r
+ GridClient client { get { return instance.Client; } }\r
+ private Inventory inv;\r
+ private Thread backupThread;\r
+ private string folderName;\r
+ private int fetched = 0;\r
+\r
+ public InventoryBackup(RadegastInstance instance)\r
+ {\r
+ InitializeComponent();\r
+ Disposed += new System.EventHandler(InventoryBackup_Disposed);\r
+ this.instance = instance;\r
+ inv = client.Inventory.Store;\r
+ }\r
+\r
+ void InventoryBackup_Disposed(object sender, System.EventArgs e)\r
+ {\r
+\r
+ }\r
+\r
+ private void btnFolder_Click(object sender, System.EventArgs e)\r
+ {\r
+ openFileDialog1.CheckFileExists = false;\r
+ DialogResult res = openFileDialog1.ShowDialog();\r
+\r
+ if (res == DialogResult.OK)\r
+ {\r
+ string dir = Path.GetDirectoryName(openFileDialog1.FileName);\r
+ txtFolderName.Text = folderName = dir;\r
+ btnFolder.Enabled = false;\r
+\r
+ lvwFiles.Items.Clear();\r
+\r
+ lblStatus.Text = "Fetching items...";\r
+ sbrProgress.Style = ProgressBarStyle.Marquee;\r
+ fetched = 0;\r
+\r
+ if (backupThread != null)\r
+ {\r
+ if (backupThread.IsAlive)\r
+ backupThread.Abort();\r
+ backupThread = null;\r
+ }\r
+\r
+ backupThread = new Thread(new ThreadStart(() =>\r
+ {\r
+ TraverseDir(inv.RootNode, Path.DirectorySeparatorChar.ToString());\r
+ BeginInvoke(new MethodInvoker(() =>\r
+ {\r
+ lblStatus.Text = string.Format("Done ({0} items saved).", fetched);\r
+ sbrProgress.Style = ProgressBarStyle.Blocks;\r
+ btnFolder.Enabled = true;\r
+ }\r
+ ));\r
+ }\r
+ ));\r
+\r
+ backupThread.IsBackground = false;\r
+ backupThread.Name = "Inventory Backup";\r
+ backupThread.Start();\r
+\r
+ }\r
+\r
+ }\r
+\r
+ private void TraverseDir(InventoryNode node, string path)\r
+ {\r
+ foreach (InventoryNode n in node.Nodes.Values)\r
+ {\r
+ if (n.Data is InventoryFolder)\r
+ {\r
+ TraverseDir(n, Path.Combine(path, RadegastInstance.SafeFileName(n.Data.Name)));\r
+ }\r
+ else\r
+ {\r
+ InventoryItem item = (InventoryItem)n.Data;\r
+\r
+ if (item.AssetType == AssetType.LSLText || item.AssetType == AssetType.Notecard)\r
+ {\r
+ ListViewItem lvi = new ListViewItem();\r
+ lvi.Text = n.Data.Name;\r
+ lvi.Tag = n.Data;\r
+ lvi.Name = n.Data.UUID.ToString();\r
+\r
+ string filePartial = Path.Combine(path, RadegastInstance.SafeFileName(n.Data.Name));\r
+ ListViewItem.ListViewSubItem fileName = new ListViewItem.ListViewSubItem(lvi, filePartial);\r
+ lvi.SubItems.Add(fileName);\r
+\r
+ ListViewItem.ListViewSubItem status = new ListViewItem.ListViewSubItem(lvi, "Fetching asset");\r
+ lvi.SubItems.Add(status);\r
+\r
+ BeginInvoke(new MethodInvoker(() =>\r
+ {\r
+ lvwFiles.Items.Add(lvi);\r
+ lvwFiles.EnsureVisible(lvwFiles.Items.Count - 1);\r
+ }));\r
+\r
+ Asset receivedAsset = null;\r
+ using (AutoResetEvent done = new AutoResetEvent(false))\r
+ {\r
+ client.Assets.RequestInventoryAsset(item, true, (AssetDownload transfer, Asset asset) =>\r
+ {\r
+ if (transfer.Success)\r
+ {\r
+ receivedAsset = asset;\r
+ }\r
+ done.Set();\r
+ }\r
+ );\r
+\r
+ done.WaitOne(30 * 1000, false);\r
+ }\r
+\r
+ if (receivedAsset == null)\r
+ {\r
+ BeginInvoke(new MethodInvoker(() => status.Text = "Failed to fetch asset"));\r
+ }\r
+ else\r
+ {\r
+ BeginInvoke(new MethodInvoker(() => status.Text = "Saving..."));\r
+\r
+\r
+ string fullName = string.Empty;\r
+ string dirName = string.Empty;\r
+\r
+ try\r
+ {\r
+ switch (item.AssetType)\r
+ {\r
+ case AssetType.Notecard:\r
+ fullName = folderName + filePartial + ".txt";\r
+ dirName = Path.GetDirectoryName(fullName);\r
+\r
+ if (!Directory.Exists(dirName))\r
+ {\r
+ Directory.CreateDirectory(dirName);\r
+ }\r
+\r
+ AssetNotecard note = (AssetNotecard)receivedAsset;\r
+ if (note.Decode())\r
+ {\r
+ File.WriteAllText(fullName, note.BodyText, System.Text.Encoding.UTF8);\r
+ }\r
+ break;\r
+\r
+ case AssetType.LSLText:\r
+ if ((item.Permissions.OwnerMask & (PermissionMask.Modify | PermissionMask.Copy | PermissionMask.Transfer)) == 0)\r
+ break;\r
+ fullName = folderName + filePartial + ".lsl";\r
+ dirName = Path.GetDirectoryName(fullName);\r
+\r
+ if (!Directory.Exists(dirName))\r
+ {\r
+ Directory.CreateDirectory(dirName);\r
+ }\r
+\r
+ AssetScriptText script = (AssetScriptText)receivedAsset;\r
+ if (script.Decode())\r
+ {\r
+ File.WriteAllText(fullName, script.Source, System.Text.Encoding.UTF8);\r
+ }\r
+ break;\r
+\r
+ }\r
+\r
+ BeginInvoke(new MethodInvoker(() =>\r
+ {\r
+ fileName.Text = fullName;\r
+ status.Text = "Saved";\r
+ lblStatus.Text = string.Format("Saved {0} items", ++fetched);\r
+ }));\r
+\r
+ }\r
+ catch (Exception ex)\r
+ {\r
+ BeginInvoke(new MethodInvoker(() => status.Text = "Failed to save " + Path.GetFileName(fullName) + ": " + ex.Message));\r
+ }\r
+\r
+ }\r
+ }\r
+ }\r
+ }\r
+ }\r
+\r
+ private void InventoryBackup_FormClosing(object sender, FormClosingEventArgs e)\r
+ {\r
+ if (backupThread != null)\r
+ {\r
+ if (backupThread.IsAlive)\r
+ {\r
+ backupThread.Abort();\r
+ Thread.Sleep(1000);\r
+ }\r
+ backupThread = null;\r
+ }\r
+ }\r
+\r
+ private void lvwFiles_DoubleClick(object sender, EventArgs e)\r
+ {\r
+ try\r
+ {\r
+ if (lvwFiles.SelectedItems.Count == 1)\r
+ {\r
+ ListViewItem item = lvwFiles.SelectedItems[0];\r
+\r
+ if (item.SubItems.Count >= 3)\r
+ {\r
+ if ("Saved" == item.SubItems[2].Text)\r
+ {\r
+ System.Diagnostics.Process.Start(item.SubItems[1].Text);\r
+ }\r
+ }\r
+ }\r
+ }\r
+ catch (Exception) { }\r
+ }\r
+ }\r
+}\r
--- /dev/null
+<?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="openFileDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">\r
+ <value>17, 17</value>\r
+ </metadata>\r
+ <metadata name="toolStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">\r
+ <value>157, 17</value>\r
+ </metadata>\r
+ <assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />\r
+ <data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">\r
+ <value>\r
+ AAABAAEAEBAAAAAAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAQAQAAAAAAAAAAAAAAAAAAAAA\r
+ AAAAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAA\r
+ AAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAA\r
+ AAEAAAABAAAAAQAAAAHCmW8HPUFD/ygrKwcAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAAB/ceQ+f/I\r
+ kf89QUP9AAAAAQAAAAHuu4dX/8iR/z1BQ/89QUP/PUFD/z1BQ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AAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAA\r
+ AAEAAAABAAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA\r
+ //8AAP//AAD//w==\r
+</value>\r
+ </data>\r
+</root>
\ No newline at end of file
// \r
// saveAllTToolStripMenuItem\r
// \r
+ this.saveAllTToolStripMenuItem.Enabled = false;\r
this.saveAllTToolStripMenuItem.Name = "saveAllTToolStripMenuItem";\r
this.saveAllTToolStripMenuItem.Size = new System.Drawing.Size(163, 22);\r
this.saveAllTToolStripMenuItem.Text = "Save all text";\r
this.saveAllTToolStripMenuItem.ToolTipText = "Saves all notecards and scripts to folder on local disk";\r
+ this.saveAllTToolStripMenuItem.Click += new System.EventHandler(this.saveAllTToolStripMenuItem_Click);\r
// \r
// tbtbSort\r
// \r
Logger.Log("Reading inventory cache from " + instance.InventoryCacheFileName, Helpers.LogLevel.Debug, client);\r
Inventory.RestoreFromDisk(instance.InventoryCacheFileName);\r
AddFolderFromStore(invRootNode, Inventory.RootFolder);\r
+ saveAllTToolStripMenuItem.Enabled = false;\r
InventoryUpdate = new Thread(new ThreadStart(StartTraverseNodes));\r
InventoryUpdate.Name = "InventoryUpdate";\r
InventoryUpdate.IsBackground = true;\r
InventoryUpdate.Start();\r
+\r
invRootNode.Expand();\r
\r
invTree.TreeViewNodeSorter = new InvNodeSorter();\r
Invoke(new MethodInvoker(delegate() { UpdateStatus(text); }));\r
return;\r
}\r
+\r
+ if (text == "OK")\r
+ {\r
+ saveAllTToolStripMenuItem.Enabled = true;\r
+ }\r
+\r
tlabelStatus.Text = text;\r
}\r
\r
InventoryUpdate = null;\r
}\r
\r
+ saveAllTToolStripMenuItem.Enabled = false;\r
+\r
Inventory.Items = new Dictionary<UUID, InventoryNode>();\r
- Inventory.RootNode.Nodes = new InventoryNodeDictionary(null);\r
+ Inventory.RootFolder = Inventory.RootFolder;\r
+\r
invTree.Nodes.Clear();\r
UUID2NodeCache.Clear();\r
invRootNode = AddDir(null, Inventory.RootFolder);\r
- Inventory.UpdateNodeFor(Inventory.RootFolder);\r
\r
InventoryUpdate = new Thread(new ThreadStart(StartTraverseNodes));\r
InventoryUpdate.Name = "InventoryUpdate";\r
}\r
#endregion\r
\r
+ private void saveAllTToolStripMenuItem_Click(object sender, EventArgs e)\r
+ {\r
+ (new InventoryBackup(instance)).Show();\r
+ }\r
+\r
\r
}\r
\r
<data name="tbtnFile.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
+ YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIISURBVDhPpZP7S1NxGMbPPxKaXVUkMEq8IpKUCoY/hGgI\r
+ ymqkDYYXcCjDZOANURSjCNGFQUTsl4GXVMxKk62YU4fXQpaIlygHQxBRH8/zwvyaIAYe+HLgnPN8nue9\r
+ HA3nvDTq63oW/jm13XOwvPTB3DYFY5MH+bXfcN8ygfTSMSSXfESicQDxBqdYHwH29g9w2tnZ3UcguIvN\r
+ rR3417exuBJE5N1n/wfwLgXEOc38Bc6xNRHb+/y4nm49G0Bnit2zf9H6bkliE/jKuYxrd6oVgDWfjB+K\r
+ TWeKMyrGEVfowITvD9re/9ABVQrAhh0HHK+ZselMMaN/mvwtDb+aVqkA7HYIwIj3ysfluPTorJnP6Ezx\r
+ oHsD1s5ZXEktUwCOioB5f1CEPR9+wTG6iuiserTo8dkwng7HT/R+XUPF8xlcTjErAOdMcW6NW8STiwG8\r
+ 7vej8oUPN/PsEv3t8Ao0TZP3T1u8uJRkUgAuSYHtO97oLxmXd5t9Ho8aPTK+GzntqNfrLm2fFoihwYOI\r
+ xGIF4KjoGBLzY1OrF9k6OOFxnwDC4wxIMX1G0pMhgVyMNyoA13PAtS7OrJk1PrC69LUdQWxuF6IybHrX\r
+ LRI7JrtZdoDAo1XmbjMyD+tjSXxGcXRmnYg5ttD9QuxDhN0uUgDOmbvNTpPOJaGAo2K36cyaGZvOFIfd\r
+ KlSA8/zRh9ABIDUG+1JpAAAAAElFTkSuQmCC\r
</value>\r
</data>\r
<data name="tbtbSort.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">\r
<value>\r
iVBORw0KGgoAAAANSUhEUgAAABAAAAA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vPTB3DYFY5MH+bXfcN8ygfTSMSSXfESicQDxBqdYHwH29g9w2tnZ3UcguIvN\r
+ rR3417exuBJE5N1n/wfwLgXEOc38Bc6xNRHb+/y4nm49G0Bnit2zf9H6bkliE/jKuYxrd6oVgDWfjB+K\r
+ TWeKMyrGEVfowITvD9re/9ABVQrAhh0HHK+ZselMMaN/mvwtDb+aVqkA7HYIwIj3ysfluPTorJnP6Ezx\r
+ oHsD1s5ZXEktUwCOioB5f1CEPR9+wTG6iuiserTo8dkwng7HT/R+XUPF8xlcTjErAOdMcW6NW8STiwG8\r
+ 7vej8oUPN/PsEv3t8Ao0TZP3T1u8uJRkUgAuSYHtO97oLxmXd5t9Ho8aPTK+GzntqNfrLm2fFoihwYOI\r
+ xGIF4KjoGBLzY1OrF9k6OOFxnwDC4wxIMX1G0pMhgVyMNyoA13PAtS7OrJk1PrC69LUdQWxuF6IybHrX\r
+ LRI7JrtZdoDAo1XmbjMyD+tjSXxGcXRmnYg5ttD9QuxDhN0uUgDOmbvNTpPOJaGAo2K36cyaGZvOFIfd\r
+ KlSA8/zRh9ABIDUG+1JpAAAAAElFTkSuQmCC\r
+</value>\r
+ </data>\r
+ <data name="txtCreator.AgentID" mimetype="application/x-microsoft.net.object.binary.base64">\r
+ <value>\r
+ AAEAAAD/////AQAAAAAAAAAMAgAAAElPcGVuTWV0YXZlcnNlVHlwZXMsIFZlcnNpb249MC4wLjAuMCwg\r
+ Q3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1udWxsBQEAAAAST3Blbk1ldGF2ZXJzZS5VVUlE\r
+ AQAAAARHdWlkAwtTeXN0ZW0uR3VpZAIAAAAE/f///wtTeXN0ZW0uR3VpZAsAAAACX2ECX2ICX2MCX2QC\r
+ X2UCX2YCX2cCX2gCX2kCX2oCX2sAAAAAAAAAAAAAAAgHBwICAgICAgICAAAAAAAAAAAAAAAAAAAAAAs=\r
</value>\r
</data>\r
<metadata name="ctxInv.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">\r
<Compile Include="GUI\Consoles\FriendsConsole.Designer.cs">\r
<DependentUpon>FriendsConsole.cs</DependentUpon>\r
</Compile>\r
+ <Compile Include="GUI\Consoles\Inventory\InventoryBackup.cs">\r
+ <SubType>Form</SubType>\r
+ </Compile>\r
+ <Compile Include="GUI\Consoles\Inventory\InventoryBackup.Designer.cs">\r
+ <DependentUpon>InventoryBackup.cs</DependentUpon>\r
+ </Compile>\r
<Compile Include="GUI\Consoles\Inventory\InventoryConsole.cs">\r
<SubType>UserControl</SubType>\r
</Compile>\r
<SubType>Designer</SubType>\r
<DependentUpon>FriendsConsole.cs</DependentUpon>\r
</EmbeddedResource>\r
+ <EmbeddedResource Include="GUI\Consoles\Inventory\InventoryBackup.resx">\r
+ <DependentUpon>InventoryBackup.cs</DependentUpon>\r
+ <SubType>Designer</SubType>\r
+ </EmbeddedResource>\r
<EmbeddedResource Include="GUI\Consoles\Inventory\InventoryConsole.resx">\r
<DependentUpon>InventoryConsole.cs</DependentUpon>\r
<SubType>Designer</SubType>\r