diff --git a/LibreMetaverse.sln b/LibreMetaverse.sln
index 3c24389e..5effbb94 100644
--- a/LibreMetaverse.sln
+++ b/LibreMetaverse.sln
@@ -2,8 +2,6 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.1.32414.318
MinimumVisualStudioVersion = 10.0.40219.1
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Baker", "Programs\Baker\Baker.csproj", "{95F42663-0000-0000-0000-000000000000}"
-EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GridProxy", "Programs\GridProxy\GridProxy.csproj", "{79B51DAA-0000-0000-0000-000000000000}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IRCGateway", "Programs\examples\IRCGateway\IRCGateway.csproj", "{89049BBC-0000-0000-0000-000000000000}"
@@ -48,11 +46,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "utilities", "utilities", "{
util\SignPackages.ps1 = util\SignPackages.ps1
EndProjectSection
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GridAccountant", "Programs\examples\GridAccountant\GridAccountant.csproj", "{6DE58F9A-0000-0000-0000-000000000000}"
- ProjectSection(ProjectDependencies) = postProject
- {27C70F3A-0000-0000-0000-000000000000} = {27C70F3A-0000-0000-0000-000000000000}
- EndProjectSection
-EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LibreMetaverse.LslTools", "LibreMetaverse.LslTools\LibreMetaverse.LslTools.csproj", "{989E5E15-D99B-4CF1-AF64-90C568FC979A}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LibreMetaverse.Voice", "LibreMetaverse.Voice\LibreMetaverse.Voice.csproj", "{FB07C6DE-F791-4336-B6E2-B32EEAC34792}"
@@ -70,20 +63,6 @@ Global
ReleaseNoGui|x86 = ReleaseNoGui|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {95F42663-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|x64
- {95F42663-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|x64
- {95F42663-0000-0000-0000-000000000000}.Debug|x64.ActiveCfg = Debug|x64
- {95F42663-0000-0000-0000-000000000000}.Debug|x64.Build.0 = Debug|x64
- {95F42663-0000-0000-0000-000000000000}.Debug|x86.ActiveCfg = Debug|x86
- {95F42663-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|x64
- {95F42663-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|x64
- {95F42663-0000-0000-0000-000000000000}.Release|x64.ActiveCfg = Release|x64
- {95F42663-0000-0000-0000-000000000000}.Release|x64.Build.0 = Release|x64
- {95F42663-0000-0000-0000-000000000000}.Release|x86.ActiveCfg = Release|x86
- {95F42663-0000-0000-0000-000000000000}.Release|x86.Build.0 = Release|x86
- {95F42663-0000-0000-0000-000000000000}.ReleaseNoGui|Any CPU.ActiveCfg = Release|x64
- {95F42663-0000-0000-0000-000000000000}.ReleaseNoGui|x64.ActiveCfg = Release|x64
- {95F42663-0000-0000-0000-000000000000}.ReleaseNoGui|x86.ActiveCfg = Release|x86
{79B51DAA-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|x64
{79B51DAA-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|x64
{79B51DAA-0000-0000-0000-000000000000}.Debug|x64.ActiveCfg = Debug|x64
@@ -336,20 +315,6 @@ Global
{2867B4B3-0000-0000-0000-000000000000}.ReleaseNoGui|x64.Build.0 = Release|x64
{2867B4B3-0000-0000-0000-000000000000}.ReleaseNoGui|x86.ActiveCfg = Release|Any CPU
{2867B4B3-0000-0000-0000-000000000000}.ReleaseNoGui|x86.Build.0 = Release|Any CPU
- {6DE58F9A-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|x64
- {6DE58F9A-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|x64
- {6DE58F9A-0000-0000-0000-000000000000}.Debug|x64.ActiveCfg = Debug|x64
- {6DE58F9A-0000-0000-0000-000000000000}.Debug|x64.Build.0 = Debug|x64
- {6DE58F9A-0000-0000-0000-000000000000}.Debug|x86.ActiveCfg = Debug|x86
- {6DE58F9A-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|x64
- {6DE58F9A-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|x64
- {6DE58F9A-0000-0000-0000-000000000000}.Release|x64.ActiveCfg = Release|x64
- {6DE58F9A-0000-0000-0000-000000000000}.Release|x64.Build.0 = Release|x64
- {6DE58F9A-0000-0000-0000-000000000000}.Release|x86.ActiveCfg = Release|x86
- {6DE58F9A-0000-0000-0000-000000000000}.Release|x86.Build.0 = Release|x86
- {6DE58F9A-0000-0000-0000-000000000000}.ReleaseNoGui|Any CPU.ActiveCfg = Release|x64
- {6DE58F9A-0000-0000-0000-000000000000}.ReleaseNoGui|x64.ActiveCfg = Release|x64
- {6DE58F9A-0000-0000-0000-000000000000}.ReleaseNoGui|x86.ActiveCfg = Release|x86
{989E5E15-D99B-4CF1-AF64-90C568FC979A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{989E5E15-D99B-4CF1-AF64-90C568FC979A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{989E5E15-D99B-4CF1-AF64-90C568FC979A}.Debug|x64.ActiveCfg = Debug|Any CPU
diff --git a/Programs/Baker/Baker.cs b/Programs/Baker/Baker.cs
deleted file mode 100644
index 4add86e9..00000000
--- a/Programs/Baker/Baker.cs
+++ /dev/null
@@ -1,19 +0,0 @@
-using System;
-using System.Windows.Forms;
-
-namespace Baker
-{
- internal static class Baker
- {
- ///
- /// The main entry point for the application.
- ///
- [STAThread]
- private static void Main(string[] args)
- {
- Application.EnableVisualStyles();
- Application.SetCompatibleTextRenderingDefault(false);
- Application.Run(new FrmBaker());
- }
- }
-}
\ No newline at end of file
diff --git a/Programs/Baker/Baker.csproj b/Programs/Baker/Baker.csproj
deleted file mode 100644
index 76c17d2b..00000000
--- a/Programs/Baker/Baker.csproj
+++ /dev/null
@@ -1,34 +0,0 @@
-
-
- net6.0-windows;net7.0-windows;net8.0-windows
-
-
- net6.0-linux;net7.0-linux;net8.0-linux
-
-
- net6.0-macos;net7.0-macos;net8.0-macos
-
-
- Baker
- Baker
- true
- true
- WinExe
- ..\..\bin\
- x64;x86
- true
- snupkg
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Programs/Baker/Oven.cs b/Programs/Baker/Oven.cs
deleted file mode 100644
index 00028e05..00000000
--- a/Programs/Baker/Oven.cs
+++ /dev/null
@@ -1,68 +0,0 @@
-using System;
-using System.Drawing;
-using System.Runtime.InteropServices;
-
-namespace Baker
-{
- public static class Oven
- {
- public static Bitmap ModifyAlphaMask(Bitmap alpha, byte weight, float ramp)
- {
- // Create the new modifiable image (our canvas)
- int width = alpha.Width;
- int height = alpha.Height;
- int pixelFormatSize = Image.GetPixelFormatSize(alpha.PixelFormat) / 8;
- int stride = width * pixelFormatSize;
- byte[] data = new byte[stride * height];
- //GCHandle handle = GCHandle.Alloc(data, GCHandleType.Pinned);
- IntPtr pointer = Marshal.UnsafeAddrOfPinnedArrayElement(data, 0);
- Bitmap modified = new Bitmap(width, height, stride, alpha.PixelFormat, pointer);
-
- // Copy the existing alpha mask to the canvas
- Graphics g = Graphics.FromImage(modified);
- g.DrawImageUnscaledAndClipped(alpha, new Rectangle(0, 0, width, height));
- g.Dispose();
-
- // Modify the canvas based on the input weight and ramp values
- // TODO: use the ramp
- // TODO: only bother with the alpha values
- for (int i = 0; i < data.Length; i++)
- {
- if (data[i] < weight) data[i] = 0;
- }
-
- return modified;
- }
-
- public static Bitmap ApplyAlphaMask(Bitmap source, Bitmap alpha)
- {
- // Create the new modifiable image (our canvas)
- int width = source.Width;
- int height = source.Height;
-
- if (alpha.Width != width || alpha.Height != height ||
- alpha.PixelFormat != source.PixelFormat)
- {
- throw new Exception("Source image and alpha mask formats do not match");
- }
-
- int pixelFormatSize = Image.GetPixelFormatSize(source.PixelFormat) / 8;
- int stride = width * pixelFormatSize;
- byte[] data = new byte[stride * height];
- //GCHandle handle = GCHandle.Alloc(data, GCHandleType.Pinned);
- IntPtr pointer = Marshal.UnsafeAddrOfPinnedArrayElement(data, 0);
- Bitmap modified = new Bitmap(width, height, stride, source.PixelFormat, pointer);
-
- // Copy the source image to the canvas
- Graphics g = Graphics.FromImage(modified);
- g.DrawImageUnscaledAndClipped(source, new Rectangle(0, 0, width, height));
- g.Dispose();
-
- // Get access to the pixel data for the alpha mask (probably using lockbits)
-
- // Combine the alpha mask alpha bytes in to the canvas
-
- return modified;
- }
- }
-}
diff --git a/Programs/Baker/frmBaker.Designer.cs b/Programs/Baker/frmBaker.Designer.cs
deleted file mode 100644
index 3e502a9f..00000000
--- a/Programs/Baker/frmBaker.Designer.cs
+++ /dev/null
@@ -1,134 +0,0 @@
-namespace Baker
-{
- partial class FrmBaker
- {
- ///
- /// Required designer variable.
- ///
- private System.ComponentModel.IContainer components = null;
-
- ///
- /// Clean up any resources being used.
- ///
- /// true if managed resources should be disposed; otherwise, false.
- protected override void Dispose(bool disposing)
- {
- if (disposing && (components != null))
- {
- components.Dispose();
- }
- base.Dispose(disposing);
- }
-
- #region Windows Form Designer generated code
-
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- this.pic1 = new System.Windows.Forms.PictureBox();
- this.cmdLoadShirt = new System.Windows.Forms.Button();
- this.scrollWeight = new System.Windows.Forms.HScrollBar();
- this.cmdLoadSkin = new System.Windows.Forms.Button();
- this.cboMask = new System.Windows.Forms.ComboBox();
- ((System.ComponentModel.ISupportInitialize)(this.pic1)).BeginInit();
- this.SuspendLayout();
- //
- // pic1
- //
- this.pic1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
- this.pic1.Location = new System.Drawing.Point(12, 41);
- this.pic1.Name = "pic1";
- this.pic1.Size = new System.Drawing.Size(512, 483);
- this.pic1.TabIndex = 0;
- this.pic1.TabStop = false;
- //
- // cmdLoadShirt
- //
- this.cmdLoadShirt.Location = new System.Drawing.Point(449, 530);
- this.cmdLoadShirt.Name = "cmdLoadShirt";
- this.cmdLoadShirt.Size = new System.Drawing.Size(75, 23);
- this.cmdLoadShirt.TabIndex = 1;
- this.cmdLoadShirt.Text = "Load Shirt";
- this.cmdLoadShirt.UseVisualStyleBackColor = true;
- //
- // scrollWeight
- //
- this.scrollWeight.Location = new System.Drawing.Point(12, 530);
- this.scrollWeight.Maximum = 255;
- this.scrollWeight.Name = "scrollWeight";
- this.scrollWeight.Size = new System.Drawing.Size(345, 23);
- this.scrollWeight.TabIndex = 0;
- this.scrollWeight.Scroll += new System.Windows.Forms.ScrollEventHandler(this.scrollWeight_Scroll);
- //
- // cmdLoadSkin
- //
- this.cmdLoadSkin.Location = new System.Drawing.Point(366, 530);
- this.cmdLoadSkin.Name = "cmdLoadSkin";
- this.cmdLoadSkin.Size = new System.Drawing.Size(75, 23);
- this.cmdLoadSkin.TabIndex = 2;
- this.cmdLoadSkin.Text = "Load Skin";
- this.cmdLoadSkin.UseVisualStyleBackColor = true;
- this.cmdLoadSkin.Click += new System.EventHandler(this.cmdLoadSkin_Click);
- //
- // cboMask
- //
- this.cboMask.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
- this.cboMask.FormattingEnabled = true;
- this.cboMask.Items.AddRange(new object[] {
- "glove_length_alpha",
- "gloves_fingers_alpha",
- "jacket_length_lower_alpha",
- "jacket_length_upper_alpha",
- "jacket_open_lower_alpha",
- "jacket_open_upper_alpha",
- "pants_length_alpha",
- "pants_waist_alpha",
- "shirt_bottom_alpha",
- "shirt_collar_alpha",
- "shirt_collar_back_alpha",
- "shirt_sleeve_alpha",
- "shoe_height_alpha",
- "skirt_length_alpha",
- "skirt_slit_front_alpha",
- "skirt_slit_left_alpha",
- "skirt_slit_right_alpha"});
- this.cboMask.Location = new System.Drawing.Point(358, 12);
- this.cboMask.Name = "cboMask";
- this.cboMask.Size = new System.Drawing.Size(166, 21);
- this.cboMask.TabIndex = 3;
- this.cboMask.SelectedIndexChanged += new System.EventHandler(this.cboMask_SelectedIndexChanged);
- //
- // frmBaker
- //
- this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
- this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- this.ClientSize = new System.Drawing.Size(538, 563);
- this.Controls.Add(this.cboMask);
- this.Controls.Add(this.cmdLoadSkin);
- this.Controls.Add(this.scrollWeight);
- this.Controls.Add(this.cmdLoadShirt);
- this.Controls.Add(this.pic1);
- this.Name = "FrmBaker";
- this.Text = "Baker";
- this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.frmBaker_FormClosing);
- this.Load += new System.EventHandler(this.frmBaker_Load);
- ((System.ComponentModel.ISupportInitialize)(this.pic1)).EndInit();
- this.ResumeLayout(false);
-
- }
-
- #endregion
-
- private System.Windows.Forms.PictureBox pic1;
- private System.Windows.Forms.HScrollBar scrollWeight;
- private System.Windows.Forms.Button cmdLoadShirt;
- private System.Windows.Forms.Button cmdLoadSkin;
- private System.Windows.Forms.ComboBox cboMask;
-
- }
-}
-
-
diff --git a/Programs/Baker/frmBaker.cs b/Programs/Baker/frmBaker.cs
deleted file mode 100644
index 03f694a9..00000000
--- a/Programs/Baker/frmBaker.cs
+++ /dev/null
@@ -1,61 +0,0 @@
-using System;
-using System.Windows.Forms;
-using System.IO;
-using System.Drawing;
-using IronSoftware.Drawing;
-
-namespace Baker
-{
- public partial class FrmBaker : Form
- {
- Bitmap _alphaMask;
-
- public FrmBaker()
- {
- InitializeComponent();
- }
-
- private void frmBaker_Load(object sender, EventArgs e)
- {
- cboMask.SelectedIndex = 0;
- DisplayResource(cboMask.Text);
- }
-
- private void DisplayResource(string resource)
- {
- Stream stream = OpenMetaverse.Helpers.GetResourceStream(resource + ".tga");
-
- if (stream != null)
- {
- _alphaMask = AnyBitmap.FromStream(stream);
- stream.Close();
-
- pic1.Image = Oven.ModifyAlphaMask(_alphaMask, (byte)scrollWeight.Value, 0.0f); // *HACK:
- }
- else
- {
- MessageBox.Show($"Failed to load embedded resource \"{resource}\"", "Baker",
- MessageBoxButtons.OK, MessageBoxIcon.Error);
- }
- }
-
- private void scrollWeight_Scroll(object sender, ScrollEventArgs e)
- {
- pic1.Image = Oven.ModifyAlphaMask(_alphaMask, (byte)scrollWeight.Value, 0.0f); // *HACK:
- }
-
- private void frmBaker_FormClosing(object sender, FormClosingEventArgs e)
- {
- }
-
- private void cmdLoadSkin_Click(object sender, EventArgs e)
- {
-
- }
-
- private void cboMask_SelectedIndexChanged(object sender, EventArgs e)
- {
- DisplayResource(cboMask.Text);
- }
- }
-}
diff --git a/Programs/Baker/frmBaker.resx b/Programs/Baker/frmBaker.resx
deleted file mode 100644
index ff31a6db..00000000
--- a/Programs/Baker/frmBaker.resx
+++ /dev/null
@@ -1,120 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- text/microsoft-resx
-
-
- 2.0
-
-
- System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
\ No newline at end of file
diff --git a/Programs/examples/GridAccountant/AssemblyInfo.cs b/Programs/examples/GridAccountant/AssemblyInfo.cs
deleted file mode 100644
index 77ecbc8b..00000000
--- a/Programs/examples/GridAccountant/AssemblyInfo.cs
+++ /dev/null
@@ -1,31 +0,0 @@
-using System.Reflection;
-using System.Runtime.CompilerServices;
-
-//
-// In order to sign your assembly you must specify a key to use. Refer to the
-// Microsoft .NET Framework documentation for more information on assembly signing.
-//
-// Use the attributes below to control which key is used for signing.
-//
-// Notes:
-// (*) If no key is specified, the assembly is not signed.
-// (*) KeyName refers to a key that has been installed in the Crypto Service
-// Provider (CSP) on your machine. KeyFile refers to a file which contains
-// a key.
-// (*) If the KeyFile and the KeyName values are both specified, the
-// following processing occurs:
-// (1) If the KeyName can be found in the CSP, that key is used.
-// (2) If the KeyName does not exist and the KeyFile does exist, the key
-// in the KeyFile is installed into the CSP and used.
-// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility.
-// When specifying the KeyFile, the location of the KeyFile should be
-// relative to the project output directory which is
-// %Project Directory%\obj\. For example, if your KeyFile is
-// located in the project directory, you would specify the AssemblyKeyFile
-// attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")]
-// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework
-// documentation for more information on this.
-//
-[assembly: AssemblyDelaySign(false)]
-[assembly: AssemblyKeyFile("")]
-[assembly: AssemblyKeyName("")]
diff --git a/Programs/examples/GridAccountant/GridAccountant.csproj b/Programs/examples/GridAccountant/GridAccountant.csproj
deleted file mode 100644
index 7caa2077..00000000
--- a/Programs/examples/GridAccountant/GridAccountant.csproj
+++ /dev/null
@@ -1,35 +0,0 @@
-
-
- net6.0-windows;net7.0-windows;net8.0-windows
-
-
- net6.0-linux;net7.0-linux;net8.0-linux
-
-
- net6.0-macos;net7.0-macos;net8.0-macos
-
-
- GridAccountant
- GridAccountant
- true
- true
- WinExe
- ..\..\..\bin\
- x64;x86
- false
-
-
-
-
-
-
-
- frmGridAccountant.cs
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Programs/examples/GridAccountant/frmGridAccountant.cs b/Programs/examples/GridAccountant/frmGridAccountant.cs
deleted file mode 100644
index da597fb7..00000000
--- a/Programs/examples/GridAccountant/frmGridAccountant.cs
+++ /dev/null
@@ -1,521 +0,0 @@
-/*
- * Copyright (c) 2006-2016, openmetaverse.co
- * All rights reserved.
- *
- * - Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * - Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- * - Neither the name of the openmetaverse.co nor the names
- * of its contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Windows.Forms;
-using System.Data;
-using OpenMetaverse;
-using OpenMetaverse.Packets;
-
-namespace GridAccountant
-{
- ///
- /// Summary description for Form1.
- ///
- public class frmGridAccountant : System.Windows.Forms.Form
- {
- private System.Windows.Forms.GroupBox grpLogin;
- private System.Windows.Forms.TextBox txtPassword;
- private System.Windows.Forms.TextBox txtLastName;
- private System.Windows.Forms.Button cmdConnect;
- private System.Windows.Forms.TextBox txtFirstName;
- private System.Windows.Forms.Label label1;
- private System.Windows.Forms.Label label2;
- private System.Windows.Forms.Label label3;
- ///
- /// Required designer variable.
- ///
- private System.ComponentModel.Container components = null;
- private System.Windows.Forms.Label label4;
- private System.Windows.Forms.Label lblName;
- private System.Windows.Forms.Label lblBalance;
- private System.Windows.Forms.Label label6;
- private System.Windows.Forms.Label label5;
- private System.Windows.Forms.TextBox txtFind;
- private System.Windows.Forms.Button cmdFind;
- private System.Windows.Forms.TextBox txtTransfer;
- private System.Windows.Forms.Button cmdTransfer;
- private System.Windows.Forms.Label label7;
- private System.Windows.Forms.ListView lstFind;
- private System.Windows.Forms.ColumnHeader colName;
- private System.Windows.Forms.ColumnHeader colOnline;
- private System.Windows.Forms.ColumnHeader colUuid;
-
- private GridClient Client;
-
- public frmGridAccountant()
- {
- //
- // Required for Windows Form Designer support
- //
- InitializeComponent();
- }
-
- ///
- /// Clean up any resources being used.
- ///
- protected override void Dispose( bool disposing )
- {
- Client.Network.Logout();
-
- if( disposing )
- {
- if (components != null)
- {
- components.Dispose();
- }
- }
- base.Dispose( disposing );
- }
-
- #region Windows Form Designer generated code
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- this.grpLogin = new System.Windows.Forms.GroupBox();
- this.label3 = new System.Windows.Forms.Label();
- this.label2 = new System.Windows.Forms.Label();
- this.label1 = new System.Windows.Forms.Label();
- this.txtPassword = new System.Windows.Forms.TextBox();
- this.txtLastName = new System.Windows.Forms.TextBox();
- this.cmdConnect = new System.Windows.Forms.Button();
- this.txtFirstName = new System.Windows.Forms.TextBox();
- this.label4 = new System.Windows.Forms.Label();
- this.lblName = new System.Windows.Forms.Label();
- this.lblBalance = new System.Windows.Forms.Label();
- this.label6 = new System.Windows.Forms.Label();
- this.label5 = new System.Windows.Forms.Label();
- this.txtFind = new System.Windows.Forms.TextBox();
- this.cmdFind = new System.Windows.Forms.Button();
- this.txtTransfer = new System.Windows.Forms.TextBox();
- this.cmdTransfer = new System.Windows.Forms.Button();
- this.label7 = new System.Windows.Forms.Label();
- this.lstFind = new System.Windows.Forms.ListView();
- this.colName = new System.Windows.Forms.ColumnHeader();
- this.colOnline = new System.Windows.Forms.ColumnHeader();
- this.colUuid = new System.Windows.Forms.ColumnHeader();
- this.grpLogin.SuspendLayout();
- this.SuspendLayout();
- //
- // grpLogin
- //
- this.grpLogin.Controls.Add(this.label3);
- this.grpLogin.Controls.Add(this.label2);
- this.grpLogin.Controls.Add(this.label1);
- this.grpLogin.Controls.Add(this.txtPassword);
- this.grpLogin.Controls.Add(this.txtLastName);
- this.grpLogin.Controls.Add(this.cmdConnect);
- this.grpLogin.Controls.Add(this.txtFirstName);
- this.grpLogin.Enabled = false;
- this.grpLogin.Location = new System.Drawing.Point(16, 344);
- this.grpLogin.Name = "grpLogin";
- this.grpLogin.Size = new System.Drawing.Size(560, 80);
- this.grpLogin.TabIndex = 50;
- this.grpLogin.TabStop = false;
- //
- // label3
- //
- this.label3.Location = new System.Drawing.Point(280, 24);
- this.label3.Name = "label3";
- this.label3.Size = new System.Drawing.Size(120, 16);
- this.label3.TabIndex = 50;
- this.label3.Text = "Password";
- //
- // label2
- //
- this.label2.Location = new System.Drawing.Point(152, 24);
- this.label2.Name = "label2";
- this.label2.Size = new System.Drawing.Size(120, 16);
- this.label2.TabIndex = 50;
- this.label2.Text = "Last Name";
- //
- // label1
- //
- this.label1.Location = new System.Drawing.Point(16, 24);
- this.label1.Name = "label1";
- this.label1.Size = new System.Drawing.Size(120, 16);
- this.label1.TabIndex = 50;
- this.label1.Text = "First Name";
- //
- // txtPassword
- //
- this.txtPassword.Location = new System.Drawing.Point(280, 40);
- this.txtPassword.Name = "txtPassword";
- this.txtPassword.PasswordChar = '*';
- this.txtPassword.Size = new System.Drawing.Size(120, 20);
- this.txtPassword.TabIndex = 2;
- this.txtPassword.Text = "";
- //
- // txtLastName
- //
- this.txtLastName.Location = new System.Drawing.Point(152, 40);
- this.txtLastName.Name = "txtLastName";
- this.txtLastName.Size = new System.Drawing.Size(112, 20);
- this.txtLastName.TabIndex = 1;
- this.txtLastName.Text = "";
- //
- // cmdConnect
- //
- this.cmdConnect.Location = new System.Drawing.Point(424, 40);
- this.cmdConnect.Name = "cmdConnect";
- this.cmdConnect.Size = new System.Drawing.Size(120, 24);
- this.cmdConnect.TabIndex = 3;
- this.cmdConnect.Text = "Connect";
- this.cmdConnect.Click += new System.EventHandler(this.cmdConnect_Click);
- //
- // txtFirstName
- //
- this.txtFirstName.Location = new System.Drawing.Point(16, 40);
- this.txtFirstName.Name = "txtFirstName";
- this.txtFirstName.Size = new System.Drawing.Size(120, 20);
- this.txtFirstName.TabIndex = 0;
- this.txtFirstName.Text = "";
- //
- // label4
- //
- this.label4.Location = new System.Drawing.Point(16, 8);
- this.label4.Name = "label4";
- this.label4.Size = new System.Drawing.Size(48, 16);
- this.label4.TabIndex = 50;
- this.label4.Text = "Name:";
- //
- // lblName
- //
- this.lblName.Location = new System.Drawing.Point(64, 8);
- this.lblName.Name = "lblName";
- this.lblName.Size = new System.Drawing.Size(184, 16);
- this.lblName.TabIndex = 50;
- //
- // lblBalance
- //
- this.lblBalance.Location = new System.Drawing.Point(512, 8);
- this.lblBalance.Name = "lblBalance";
- this.lblBalance.Size = new System.Drawing.Size(64, 16);
- this.lblBalance.TabIndex = 50;
- this.lblBalance.TextAlign = System.Drawing.ContentAlignment.TopRight;
- //
- // label6
- //
- this.label6.Location = new System.Drawing.Point(456, 8);
- this.label6.Name = "label6";
- this.label6.Size = new System.Drawing.Size(56, 16);
- this.label6.TabIndex = 50;
- this.label6.Text = "Balance:";
- //
- // label5
- //
- this.label5.Location = new System.Drawing.Point(16, 40);
- this.label5.Name = "label5";
- this.label5.Size = new System.Drawing.Size(88, 16);
- this.label5.TabIndex = 50;
- this.label5.Text = "People Search";
- //
- // txtFind
- //
- this.txtFind.Enabled = false;
- this.txtFind.Location = new System.Drawing.Point(16, 56);
- this.txtFind.Name = "txtFind";
- this.txtFind.Size = new System.Drawing.Size(184, 20);
- this.txtFind.TabIndex = 4;
- this.txtFind.Text = "";
- //
- // cmdFind
- //
- this.cmdFind.Enabled = false;
- this.cmdFind.Location = new System.Drawing.Point(208, 56);
- this.cmdFind.Name = "cmdFind";
- this.cmdFind.Size = new System.Drawing.Size(48, 24);
- this.cmdFind.TabIndex = 5;
- this.cmdFind.Text = "Find";
- this.cmdFind.Click += new System.EventHandler(this.cmdFind_Click);
- //
- // txtTransfer
- //
- this.txtTransfer.Enabled = false;
- this.txtTransfer.Location = new System.Drawing.Point(360, 192);
- this.txtTransfer.MaxLength = 7;
- this.txtTransfer.Name = "txtTransfer";
- this.txtTransfer.Size = new System.Drawing.Size(104, 20);
- this.txtTransfer.TabIndex = 7;
- this.txtTransfer.Text = "";
- //
- // cmdTransfer
- //
- this.cmdTransfer.Enabled = false;
- this.cmdTransfer.Location = new System.Drawing.Point(472, 192);
- this.cmdTransfer.Name = "cmdTransfer";
- this.cmdTransfer.Size = new System.Drawing.Size(104, 24);
- this.cmdTransfer.TabIndex = 8;
- this.cmdTransfer.Text = "Transfer Lindens";
- this.cmdTransfer.Click += new System.EventHandler(this.cmdTransfer_Click);
- //
- // label7
- //
- this.label7.Location = new System.Drawing.Point(360, 176);
- this.label7.Name = "label7";
- this.label7.Size = new System.Drawing.Size(88, 16);
- this.label7.TabIndex = 17;
- this.label7.Text = "Amount:";
- //
- // lstFind
- //
- this.lstFind.Activation = System.Windows.Forms.ItemActivation.OneClick;
- this.lstFind.AllowColumnReorder = true;
- this.lstFind.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
- this.colName,
- this.colOnline,
- this.colUuid});
- this.lstFind.FullRowSelect = true;
- this.lstFind.HideSelection = false;
- this.lstFind.Location = new System.Drawing.Point(16, 88);
- this.lstFind.Name = "lstFind";
- this.lstFind.Size = new System.Drawing.Size(336, 248);
- this.lstFind.Sorting = System.Windows.Forms.SortOrder.Ascending;
- this.lstFind.TabIndex = 6;
- this.lstFind.View = System.Windows.Forms.View.Details;
- //
- // colName
- //
- this.colName.Text = "Name";
- this.colName.Width = 120;
- //
- // colOnline
- //
- this.colOnline.Text = "Online";
- this.colOnline.Width = 50;
- //
- // colUuid
- //
- this.colUuid.Text = "UUID";
- this.colUuid.Width = 150;
- //
- // frmGridAccountant
- //
- this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
- this.ClientSize = new System.Drawing.Size(592, 437);
- this.Controls.Add(this.lstFind);
- this.Controls.Add(this.label7);
- this.Controls.Add(this.cmdTransfer);
- this.Controls.Add(this.txtTransfer);
- this.Controls.Add(this.txtFind);
- this.Controls.Add(this.cmdFind);
- this.Controls.Add(this.label5);
- this.Controls.Add(this.lblBalance);
- this.Controls.Add(this.label6);
- this.Controls.Add(this.lblName);
- this.Controls.Add(this.label4);
- this.Controls.Add(this.grpLogin);
- this.Name = "frmGridAccountant";
- this.Text = "Grid Accountant";
- this.Load += new System.EventHandler(this.frmGridAccountant_Load);
- this.grpLogin.ResumeLayout(false);
- this.ResumeLayout(false);
-
- }
- #endregion
-
- ///
- /// The main entry point for the application.
- ///
- [STAThread]
- static void Main()
- {
- frmGridAccountant frm = new frmGridAccountant();
- frm.ShowDialog();
- }
-
- private delegate void StringParamInvoker(string value);
- private delegate void ListViewItemParamInvoker(ListViewItem item);
-
- private void UpdateBalance(string value)
- {
- lblBalance.Text = value;
- }
-
- private void AddFindItem(ListViewItem item)
- {
- lock (lstFind)
- {
- lstFind.Items.Add(item);
- }
- }
-
- protected void BalanceHandler(object sender, PacketReceivedEventArgs e)
- {
- Packet packet = e.Packet;
- string value = ((MoneyBalanceReplyPacket)packet).MoneyData.MoneyBalance.ToString();
- this.BeginInvoke(new StringParamInvoker(UpdateBalance), new object[] { value });
- }
-
- private void DirPeopleHandler(object sender, PacketReceivedEventArgs e)
- {
- Packet packet = e.Packet;
-
- DirPeopleReplyPacket reply = (DirPeopleReplyPacket)packet;
-
- foreach (DirPeopleReplyPacket.QueryRepliesBlock block in reply.QueryReplies)
- {
- ListViewItem listItem = new ListViewItem(new string[] {
- Utils.BytesToString(block.FirstName) + " " + Utils.BytesToString(block.LastName),
- (block.Online ? "Yes" : "No"), block.AgentID.ToString() });
-
- this.BeginInvoke(new ListViewItemParamInvoker(AddFindItem), new object[] { listItem });
- }
- }
-
- private void frmGridAccountant_Load(object sender, System.EventArgs e)
- {
- Client = new GridClient();
-
- Client.Settings.MULTIPLE_SIMS = false;
-
- Client.Network.LoginProgress += Network_OnLogin;
-
- // Install our packet handlers
- Client.Network.RegisterCallback(PacketType.MoneyBalanceReply, BalanceHandler);
- Client.Network.RegisterCallback(PacketType.DirPeopleReply, DirPeopleHandler);
-
- grpLogin.Enabled = true;
- }
-
- private void Network_OnLogin(object sender, LoginProgressEventArgs e)
- {
- if (e.Status == LoginStatus.Success)
- {
- Random rand = new Random();
-
- // AgentSetAppearance
- AgentSetAppearancePacket appearance = new AgentSetAppearancePacket();
- appearance.VisualParam = new AgentSetAppearancePacket.VisualParamBlock[251];
- // Setup some random appearance values
- for (int i = 0; i < 251; i++)
- {
- appearance.VisualParam[i] = new AgentSetAppearancePacket.VisualParamBlock();
- appearance.VisualParam[i].ParamValue = (byte)rand.Next(255);
- }
- appearance.AgentData.AgentID = Client.Self.AgentID;
- appearance.AgentData.SessionID = Client.Self.SessionID;
- appearance.AgentData.SerialNum = 1;
- appearance.AgentData.Size = new Vector3(0.45F, 0.6F, 1.831094F);
- appearance.ObjectData.TextureEntry = Utils.EmptyBytes;
-
- Client.Network.SendPacket(appearance);
-
- // Request our balance
- Client.Self.RequestBalance();
-
- BeginInvoke(
- (MethodInvoker)delegate()
- {
- lblName.Text = Client.ToString();
- txtFind.Enabled = cmdFind.Enabled = true;
- txtTransfer.Enabled = cmdTransfer.Enabled = true;
- });
- }
- else if (e.Status == LoginStatus.Failed)
- {
- BeginInvoke(
- (MethodInvoker)delegate()
- {
- MessageBox.Show(this, "Error logging in: " + Client.Network.LoginMessage);
- cmdConnect.Text = "Connect";
- txtFirstName.Enabled = txtLastName.Enabled = txtPassword.Enabled = true;
- txtFind.Enabled = cmdFind.Enabled = false;
- lblName.Text = lblBalance.Text = String.Empty;
- txtTransfer.Enabled = cmdTransfer.Enabled = false;
- });
- }
- }
-
- private void cmdConnect_Click(object sender, System.EventArgs e)
- {
- if (cmdConnect.Text == "Connect")
- {
- cmdConnect.Text = "Disconnect";
- txtFirstName.Enabled = txtLastName.Enabled = txtPassword.Enabled = false;
-
- LoginParams loginParams = Client.Network.DefaultLoginParams(txtFirstName.Text, txtLastName.Text,
- txtPassword.Text, "GridAccountant", "1.0.0");
- Client.Network.BeginLogin(loginParams);
- }
- else
- {
- Client.Network.Logout();
- cmdConnect.Text = "Connect";
- txtFirstName.Enabled = txtLastName.Enabled = txtPassword.Enabled = true;
- txtFind.Enabled = cmdFind.Enabled = false;
- lblName.Text = lblBalance.Text = "";
- txtTransfer.Enabled = cmdTransfer.Enabled = false;
- }
- }
-
- private void cmdFind_Click(object sender, System.EventArgs e)
- {
- lstFind.Items.Clear();
-
- DirFindQueryPacket query = new DirFindQueryPacket();
- query.AgentData.AgentID = Client.Self.AgentID;
- query.AgentData.SessionID = Client.Self.SessionID;
- query.QueryData.QueryFlags = 1;
- query.QueryData.QueryID = UUID.Random();
- query.QueryData.QueryStart = 0;
- query.QueryData.QueryText = Utils.StringToBytes(txtFind.Text);
- query.Header.Reliable = true;
-
- Client.Network.SendPacket(query);
- }
-
- private void cmdTransfer_Click(object sender, System.EventArgs e)
- {
- int amount = 0;
-
- try
- {
- amount = System.Convert.ToInt32(txtTransfer.Text);
- }
- catch (Exception)
- {
- MessageBox.Show(txtTransfer.Text + " is not a valid amount");
- return;
- }
-
- if (lstFind.SelectedItems.Count != 1)
- {
- MessageBox.Show("Find an avatar using the directory search and select " +
- "their name to transfer money");
- return;
- }
-
- Client.Self.GiveAvatarMoney(new UUID(lstFind.SelectedItems[0].SubItems[2].Text),
- amount, "GridAccountant payment");
- }
- }
-}
diff --git a/Programs/examples/GridAccountant/frmGridAccountant.resx b/Programs/examples/GridAccountant/frmGridAccountant.resx
deleted file mode 100644
index 637671ea..00000000
--- a/Programs/examples/GridAccountant/frmGridAccountant.resx
+++ /dev/null
@@ -1,328 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- text/microsoft-resx
-
-
- 1.3
-
-
- System.Resources.ResXResourceReader, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- System.Resources.ResXResourceWriter, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- Private
-
-
- 8, 8
-
-
- True
-
-
- False
-
-
- True
-
-
- Private
-
-
- False
-
-
- Private
-
-
- Private
-
-
- False
-
-
- Private
-
-
- Private
-
-
- False
-
-
- Private
-
-
- Private
-
-
- Private
-
-
- False
-
-
- Private
-
-
- Private
-
-
- False
-
-
- Private
-
-
- False
-
-
- Private
-
-
- Private
-
-
- Private
-
-
- False
-
-
- Private
-
-
- False
-
-
- Private
-
-
- Private
-
-
- False
-
-
- Private
-
-
- Private
-
-
- False
-
-
- Private
-
-
- Private
-
-
- False
-
-
- Private
-
-
- Private
-
-
- False
-
-
- Private
-
-
- Private
-
-
- Private
-
-
- False
-
-
- Private
-
-
- False
-
-
- Private
-
-
- Private
-
-
- Private
-
-
- False
-
-
- Private
-
-
- False
-
-
- Private
-
-
- Private
-
-
- False
-
-
- Private
-
-
- Private
-
-
- False
-
-
- Private
-
-
- Private
-
-
- Private
-
-
- Private
-
-
- Private
-
-
- Private
-
-
- Private
-
-
- Private
-
-
- False
-
-
- (Default)
-
-
- False
-
-
- False
-
-
- 8, 8
-
-
- True
-
-
- 80
-
-
- True
-
-
- frmGridAccountant
-
-
- Private
-
-
\ No newline at end of file