corrade-vassal

Subversion Repositories:
Compare Path: Rev
With Path: Rev
?path1? @ 15  →  ?path2? @ 16
/Vassal/Vassal/Properties/AssemblyInfo.cs
@@ -36,5 +36,5 @@
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
 
[assembly: AssemblyVersion("1.2.*")]
[assembly: AssemblyVersion("1.3.*")]
[assembly: NeutralResourcesLanguage("en-US")]
/Vassal/Vassal/RegionEditForm.Designer.cs
@@ -185,6 +185,7 @@
this.pictureBox6.TabIndex = 14;
this.pictureBox6.TabStop = false;
this.toolTip1.SetToolTip(this.pictureBox6, "This must be set to the exact name of a\r\nregion or simulator.");
this.pictureBox6.Click += new System.EventHandler(this.ShowToolTip);
//
// groupBox2
//
@@ -207,6 +208,7 @@
this.pictureBox1.TabIndex = 15;
this.pictureBox1.TabStop = false;
this.toolTip1.SetToolTip(this.pictureBox1, resources.GetString("pictureBox1.ToolTip"));
this.pictureBox1.Click += new System.EventHandler(this.ShowToolTip);
//
// groupBox3
//
@@ -247,6 +249,7 @@
this.pictureBox3.TabStop = false;
this.toolTip1.SetToolTip(this.pictureBox3, "You can load any previously exported\r\nregions from a file containing a CSV\r\nlist " +
"of region names by local region\r\npositions line-by-line for each region.");
this.pictureBox3.Click += new System.EventHandler(this.ShowToolTip);
//
// pictureBox2
//
@@ -259,6 +262,7 @@
this.pictureBox2.TabStop = false;
this.toolTip1.SetToolTip(this.pictureBox2, "Vassal exports regions to a CSV file\r\nwhere each column contains the region\r\nname" +
" and the local region position.");
this.pictureBox2.Click += new System.EventHandler(this.ShowToolTip);
//
// groupBox5
//
/Vassal/Vassal/RegionEditForm.cs
@@ -34,7 +34,7 @@
switch (mainForm.LoadRegionsDialog.ShowDialog())
{
case DialogResult.OK:
string file = mainForm.LoadRegionsDialog.FileName;
var file = mainForm.LoadRegionsDialog.FileName;
new Thread(() =>
{
mainForm.BeginInvoke((MethodInvoker) (() =>
@@ -46,7 +46,7 @@
 
// import CSV regions
Vector3 localPosition;
List<KeyValuePair<string, Vector3>> ConfiguredRegions = new List
var ConfiguredRegions = new List
<KeyValuePair<string, Vector3>>(
File.ReadAllLines(file)
.AsParallel()
@@ -67,13 +67,13 @@
.ToArray());
// Update batch restart grid view.
Vassal.vassalForm.BatchRestartGridView.Rows.Clear();
foreach (KeyValuePair<string, Vector3> data in ConfiguredRegions)
foreach (var data in ConfiguredRegions)
{
Vassal.vassalForm.BatchRestartGridView.Rows.Add(data.Key, data.Value);
}
// Update region state grid view.
Vassal.vassalForm.RegionsStateGridView.Rows.Clear();
foreach (KeyValuePair<string, Vector3> data in ConfiguredRegions)
foreach (var data in ConfiguredRegions)
{
Vassal.vassalForm.RegionsStateGridView.Rows.Add(data.Key, "Check pending...",
DateTime.Now.ToUniversalTime()
@@ -115,7 +115,7 @@
switch (mainForm.SaveRegionsDialog.ShowDialog())
{
case DialogResult.OK:
string file = mainForm.SaveRegionsDialog.FileName;
var file = mainForm.SaveRegionsDialog.FileName;
new Thread(() =>
{
mainForm.BeginInvoke((MethodInvoker) (() =>
@@ -127,12 +127,12 @@
 
// Save the regions to CSV.
using (
StreamWriter streamWriter =
var streamWriter =
new StreamWriter(file, false,
Encoding.UTF8))
{
foreach (
KeyValuePair<string, Vector3> region in
var region in
Regions.Items.Cast<ListViewItem>()
.Select(o => (KeyValuePair<string, Vector3>) o.Tag))
{
@@ -164,7 +164,7 @@
if (File.Exists(Vassal.VASSAL_CONSTANTS.VASSAL_REGIONS))
{
Vector3 localPosition;
List<KeyValuePair<string, Vector3>> ConfiguredRegions = new List<KeyValuePair<string, Vector3>>(
var ConfiguredRegions = new List<KeyValuePair<string, Vector3>>(
File.ReadAllLines(Vassal.VASSAL_CONSTANTS.VASSAL_REGIONS)
.Select(o => new List<string>(CSV.ToEnumerable(o)))
.Where(o => o.Count == 2)
@@ -224,7 +224,7 @@
{
mainForm.BeginInvoke((MethodInvoker) (() =>
{
ListViewItem listViewItem = Regions.SelectedItem as ListViewItem;
var listViewItem = Regions.SelectedItem as ListViewItem;
if (listViewItem == null)
{
Regions.BackColor = Color.MistyRose;
@@ -231,7 +231,7 @@
return;
}
 
int selectedItemIndex = Regions.SelectedIndex;
var selectedItemIndex = Regions.SelectedIndex;
if (selectedItemIndex == -1)
return;
 
@@ -253,11 +253,11 @@
{
mainForm.BeginInvoke((MethodInvoker) (() =>
{
ListViewItem listViewItem = Regions.SelectedItem as ListViewItem;
var listViewItem = Regions.SelectedItem as ListViewItem;
if (listViewItem == null)
return;
 
int selectedItemIndex = Regions.SelectedIndex;
var selectedItemIndex = Regions.SelectedIndex;
if (selectedItemIndex == -1)
return;
 
@@ -327,18 +327,31 @@
{
mainForm.BeginInvoke((MethodInvoker) (() =>
{
ListViewItem listViewItem = Regions.SelectedItem as ListViewItem;
var listViewItem = Regions.SelectedItem as ListViewItem;
if (listViewItem == null)
return;
 
int selectedItemIndex = Regions.SelectedIndex;
var selectedItemIndex = Regions.SelectedIndex;
if (selectedItemIndex == -1)
return;
 
KeyValuePair<string, Vector3> region = (KeyValuePair<string, Vector3>) listViewItem.Tag;
var region = (KeyValuePair<string, Vector3>) listViewItem.Tag;
RegionName.Text = region.Key;
RegionPosition.Text = region.Value.ToString();
}));
}
 
private void ShowToolTip(object sender, EventArgs e)
{
mainForm.BeginInvoke(
(Action) (() =>
{
var pictureBox = sender as PictureBox;
if (pictureBox != null)
{
toolTip1.Show(toolTip1.GetToolTip(pictureBox), pictureBox);
}
}));
}
}
}
/Vassal/Vassal/SettingsForm.Designer.cs
@@ -32,24 +32,20 @@
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SettingsForm));
this.tabControl1 = new System.Windows.Forms.TabControl();
this.tabPage1 = new System.Windows.Forms.TabPage();
this.groupBox8 = new System.Windows.Forms.GroupBox();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.pictureBox6 = new System.Windows.Forms.PictureBox();
this.Group = new System.Windows.Forms.TextBox();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.Password = new System.Windows.Forms.TextBox();
this.groupBox3 = new System.Windows.Forms.GroupBox();
this.pictureBox2 = new System.Windows.Forms.PictureBox();
this.HTTPServerURL = new System.Windows.Forms.TextBox();
this.groupBox7 = new System.Windows.Forms.GroupBox();
this.groupBox6 = new System.Windows.Forms.GroupBox();
this.pictureBox5 = new System.Windows.Forms.PictureBox();
this.RegionRestartDelay = new System.Windows.Forms.TextBox();
this.groupBox5 = new System.Windows.Forms.GroupBox();
this.pictureBox4 = new System.Windows.Forms.PictureBox();
this.DataTimeout = new System.Windows.Forms.TextBox();
this.groupBox4 = new System.Windows.Forms.GroupBox();
this.pictureBox3 = new System.Windows.Forms.PictureBox();
this.TeleportTimeout = new System.Windows.Forms.TextBox();
this.groupBox3 = new System.Windows.Forms.GroupBox();
this.pictureBox2 = new System.Windows.Forms.PictureBox();
this.HTTPServerURL = new System.Windows.Forms.TextBox();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.Password = new System.Windows.Forms.TextBox();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.pictureBox6 = new System.Windows.Forms.PictureBox();
this.Group = new System.Windows.Forms.TextBox();
this.tabPage2 = new System.Windows.Forms.TabPage();
this.groupBox16 = new System.Windows.Forms.GroupBox();
this.pictureBox18 = new System.Windows.Forms.PictureBox();
@@ -100,22 +96,24 @@
this.StatusProgress = new System.Windows.Forms.ToolStripProgressBar();
this.StatusText = new System.Windows.Forms.ToolStripStatusLabel();
this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
this.groupBox7 = new System.Windows.Forms.GroupBox();
this.groupBox8 = new System.Windows.Forms.GroupBox();
this.groupBox4 = new System.Windows.Forms.GroupBox();
this.pictureBox3 = new System.Windows.Forms.PictureBox();
this.TeleportTimeout = new System.Windows.Forms.TextBox();
this.groupBox5 = new System.Windows.Forms.GroupBox();
this.pictureBox4 = new System.Windows.Forms.PictureBox();
this.ServicesTimeout = new System.Windows.Forms.TextBox();
this.tabControl1.SuspendLayout();
this.tabPage1.SuspendLayout();
this.groupBox8.SuspendLayout();
this.groupBox1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox6)).BeginInit();
this.groupBox2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
this.groupBox3.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit();
this.groupBox7.SuspendLayout();
this.groupBox6.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox5)).BeginInit();
this.groupBox5.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox4)).BeginInit();
this.groupBox4.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox3)).BeginInit();
this.groupBox3.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit();
this.groupBox2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
this.groupBox1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox6)).BeginInit();
this.tabPage2.SuspendLayout();
this.groupBox16.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox18)).BeginInit();
@@ -137,8 +135,10 @@
this.groupBox35.SuspendLayout();
this.groupBox34.SuspendLayout();
this.statusStrip1.SuspendLayout();
this.groupBox7.SuspendLayout();
this.groupBox8.SuspendLayout();
this.groupBox4.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox3)).BeginInit();
this.groupBox5.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox4)).BeginInit();
this.SuspendLayout();
//
// tabControl1
@@ -164,102 +164,83 @@
this.tabPage1.Text = "General";
this.tabPage1.UseVisualStyleBackColor = true;
//
// groupBox6
// groupBox8
//
this.groupBox6.Controls.Add(this.pictureBox5);
this.groupBox6.Controls.Add(this.RegionRestartDelay);
this.groupBox6.Font = new System.Drawing.Font("Palatino Linotype", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.groupBox6.Location = new System.Drawing.Point(7, 19);
this.groupBox6.Name = "groupBox6";
this.groupBox6.Size = new System.Drawing.Size(200, 50);
this.groupBox6.TabIndex = 5;
this.groupBox6.TabStop = false;
this.groupBox6.Text = "Region Restart Delay";
this.groupBox8.Controls.Add(this.groupBox1);
this.groupBox8.Controls.Add(this.groupBox2);
this.groupBox8.Controls.Add(this.groupBox3);
this.groupBox8.Font = new System.Drawing.Font("Palatino Linotype", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.groupBox8.Location = new System.Drawing.Point(6, 6);
this.groupBox8.Name = "groupBox8";
this.groupBox8.Size = new System.Drawing.Size(652, 171);
this.groupBox8.TabIndex = 7;
this.groupBox8.TabStop = false;
this.groupBox8.Text = "Corrade Settings";
//
// pictureBox5
// groupBox1
//
this.pictureBox5.Cursor = System.Windows.Forms.Cursors.Help;
this.pictureBox5.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox5.Image")));
this.pictureBox5.Location = new System.Drawing.Point(174, 19);
this.pictureBox5.Name = "pictureBox5";
this.pictureBox5.Size = new System.Drawing.Size(20, 20);
this.pictureBox5.TabIndex = 13;
this.pictureBox5.TabStop = false;
this.toolTip1.SetToolTip(this.pictureBox5, "Used for region restarts, this setting\r\nspecifies with what delay to schedule a\r\n" +
"region restart when requested by Vassal.");
this.groupBox1.Controls.Add(this.pictureBox6);
this.groupBox1.Controls.Add(this.Group);
this.groupBox1.Font = new System.Drawing.Font("Palatino Linotype", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.groupBox1.Location = new System.Drawing.Point(7, 81);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(326, 54);
this.groupBox1.TabIndex = 0;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "Group";
//
// RegionRestartDelay
// pictureBox6
//
this.RegionRestartDelay.Font = new System.Drawing.Font("Consolas", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.RegionRestartDelay.Location = new System.Drawing.Point(7, 19);
this.RegionRestartDelay.Name = "RegionRestartDelay";
this.RegionRestartDelay.Size = new System.Drawing.Size(161, 20);
this.RegionRestartDelay.TabIndex = 0;
this.pictureBox6.Cursor = System.Windows.Forms.Cursors.Help;
this.pictureBox6.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox6.Image")));
this.pictureBox6.Location = new System.Drawing.Point(300, 20);
this.pictureBox6.Name = "pictureBox6";
this.pictureBox6.Size = new System.Drawing.Size(20, 20);
this.pictureBox6.TabIndex = 11;
this.pictureBox6.TabStop = false;
this.toolTip1.SetToolTip(this.pictureBox6, "Enter the group that will authenticate\r\nwith Corrade.");
this.pictureBox6.Click += new System.EventHandler(this.ShowToolTip);
//
// groupBox5
// Group
//
this.groupBox5.Controls.Add(this.pictureBox4);
this.groupBox5.Controls.Add(this.DataTimeout);
this.groupBox5.Font = new System.Drawing.Font("Palatino Linotype", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.groupBox5.Location = new System.Drawing.Point(213, 19);
this.groupBox5.Name = "groupBox5";
this.groupBox5.Size = new System.Drawing.Size(185, 53);
this.groupBox5.TabIndex = 4;
this.groupBox5.TabStop = false;
this.groupBox5.Text = "Data Timeout";
this.Group.Font = new System.Drawing.Font("Consolas", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.Group.Location = new System.Drawing.Point(7, 20);
this.Group.Name = "Group";
this.Group.Size = new System.Drawing.Size(287, 20);
this.Group.TabIndex = 0;
//
// pictureBox4
// groupBox2
//
this.pictureBox4.Cursor = System.Windows.Forms.Cursors.Help;
this.pictureBox4.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox4.Image")));
this.pictureBox4.Location = new System.Drawing.Point(159, 19);
this.pictureBox4.Name = "pictureBox4";
this.pictureBox4.Size = new System.Drawing.Size(20, 20);
this.pictureBox4.TabIndex = 15;
this.pictureBox4.TabStop = false;
this.toolTip1.SetToolTip(this.pictureBox4, "This represents the time in milliseconds\r\nbefore Corrade considers that it was no" +
"t\r\nable to pull data for the current region.");
this.groupBox2.Controls.Add(this.pictureBox1);
this.groupBox2.Controls.Add(this.Password);
this.groupBox2.Font = new System.Drawing.Font("Palatino Linotype", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.groupBox2.Location = new System.Drawing.Point(339, 81);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(307, 54);
this.groupBox2.TabIndex = 1;
this.groupBox2.TabStop = false;
this.groupBox2.Text = "Group Password";
//
// DataTimeout
// pictureBox1
//
this.DataTimeout.Font = new System.Drawing.Font("Consolas", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.DataTimeout.Location = new System.Drawing.Point(7, 20);
this.DataTimeout.Name = "DataTimeout";
this.DataTimeout.Size = new System.Drawing.Size(146, 20);
this.DataTimeout.TabIndex = 0;
this.pictureBox1.Cursor = System.Windows.Forms.Cursors.Help;
this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image")));
this.pictureBox1.Location = new System.Drawing.Point(275, 20);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(20, 20);
this.pictureBox1.TabIndex = 12;
this.pictureBox1.TabStop = false;
this.toolTip1.SetToolTip(this.pictureBox1, "Enter the group password that Vassal\r\nwill use to authenticate to Corrade.");
this.pictureBox1.Click += new System.EventHandler(this.ShowToolTip);
//
// groupBox4
// Password
//
this.groupBox4.Controls.Add(this.pictureBox3);
this.groupBox4.Controls.Add(this.TeleportTimeout);
this.groupBox4.Font = new System.Drawing.Font("Palatino Linotype", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.groupBox4.Location = new System.Drawing.Point(404, 19);
this.groupBox4.Name = "groupBox4";
this.groupBox4.Size = new System.Drawing.Size(185, 53);
this.groupBox4.TabIndex = 3;
this.groupBox4.TabStop = false;
this.groupBox4.Text = "Teleport Timeout";
this.Password.Font = new System.Drawing.Font("Consolas", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.Password.Location = new System.Drawing.Point(7, 20);
this.Password.Name = "Password";
this.Password.Size = new System.Drawing.Size(262, 20);
this.Password.TabIndex = 0;
//
// pictureBox3
//
this.pictureBox3.Cursor = System.Windows.Forms.Cursors.Help;
this.pictureBox3.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox3.Image")));
this.pictureBox3.Location = new System.Drawing.Point(156, 20);
this.pictureBox3.Name = "pictureBox3";
this.pictureBox3.Size = new System.Drawing.Size(20, 20);
this.pictureBox3.TabIndex = 14;
this.pictureBox3.TabStop = false;
this.toolTip1.SetToolTip(this.pictureBox3, "This represents the time in milliseconds\r\nbefore Corrade considers that it cannot" +
"\r\nconnect to a region.");
//
// TeleportTimeout
//
this.TeleportTimeout.Font = new System.Drawing.Font("Consolas", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.TeleportTimeout.Location = new System.Drawing.Point(7, 20);
this.TeleportTimeout.Name = "TeleportTimeout";
this.TeleportTimeout.Size = new System.Drawing.Size(143, 20);
this.TeleportTimeout.TabIndex = 0;
//
// groupBox3
//
this.groupBox3.Controls.Add(this.pictureBox2);
@@ -283,6 +264,7 @@
this.pictureBox2.TabStop = false;
this.toolTip1.SetToolTip(this.pictureBox2, "Enter the full address and port (prefix)\r\nthat Vassal will use to talk to Corrade" +
".");
this.pictureBox2.Click += new System.EventHandler(this.ShowToolTip);
//
// HTTPServerURL
//
@@ -292,68 +274,52 @@
this.HTTPServerURL.Size = new System.Drawing.Size(594, 20);
this.HTTPServerURL.TabIndex = 0;
//
// groupBox2
// groupBox7
//
this.groupBox2.Controls.Add(this.pictureBox1);
this.groupBox2.Controls.Add(this.Password);
this.groupBox2.Font = new System.Drawing.Font("Palatino Linotype", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.groupBox2.Location = new System.Drawing.Point(339, 81);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(307, 54);
this.groupBox2.TabIndex = 1;
this.groupBox2.TabStop = false;
this.groupBox2.Text = "Group Password";
this.groupBox7.Controls.Add(this.groupBox5);
this.groupBox7.Controls.Add(this.groupBox6);
this.groupBox7.Controls.Add(this.groupBox4);
this.groupBox7.Font = new System.Drawing.Font("Palatino Linotype", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.groupBox7.Location = new System.Drawing.Point(6, 183);
this.groupBox7.Name = "groupBox7";
this.groupBox7.Size = new System.Drawing.Size(652, 143);
this.groupBox7.TabIndex = 6;
this.groupBox7.TabStop = false;
this.groupBox7.Text = "Vassal Settings";
//
// pictureBox1
// groupBox6
//
this.pictureBox1.Cursor = System.Windows.Forms.Cursors.Help;
this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image")));
this.pictureBox1.Location = new System.Drawing.Point(275, 20);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(20, 20);
this.pictureBox1.TabIndex = 12;
this.pictureBox1.TabStop = false;
this.toolTip1.SetToolTip(this.pictureBox1, "Enter the group password that Vassal\r\nwill use to authenticate to Corrade.");
this.groupBox6.Controls.Add(this.pictureBox5);
this.groupBox6.Controls.Add(this.RegionRestartDelay);
this.groupBox6.Font = new System.Drawing.Font("Palatino Linotype", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.groupBox6.Location = new System.Drawing.Point(7, 19);
this.groupBox6.Name = "groupBox6";
this.groupBox6.Size = new System.Drawing.Size(200, 50);
this.groupBox6.TabIndex = 5;
this.groupBox6.TabStop = false;
this.groupBox6.Text = "Region Restart Delay";
//
// Password
// pictureBox5
//
this.Password.Font = new System.Drawing.Font("Consolas", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.Password.Location = new System.Drawing.Point(7, 20);
this.Password.Name = "Password";
this.Password.Size = new System.Drawing.Size(262, 20);
this.Password.TabIndex = 0;
this.pictureBox5.Cursor = System.Windows.Forms.Cursors.Help;
this.pictureBox5.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox5.Image")));
this.pictureBox5.Location = new System.Drawing.Point(174, 19);
this.pictureBox5.Name = "pictureBox5";
this.pictureBox5.Size = new System.Drawing.Size(20, 20);
this.pictureBox5.TabIndex = 13;
this.pictureBox5.TabStop = false;
this.toolTip1.SetToolTip(this.pictureBox5, "Used for region restarts, this setting\r\nspecifies with what delay to schedule a\r\n" +
"region restart when requested by Vassal.");
this.pictureBox5.Click += new System.EventHandler(this.ShowToolTip);
//
// groupBox1
// RegionRestartDelay
//
this.groupBox1.Controls.Add(this.pictureBox6);
this.groupBox1.Controls.Add(this.Group);
this.groupBox1.Font = new System.Drawing.Font("Palatino Linotype", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.groupBox1.Location = new System.Drawing.Point(7, 81);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(326, 54);
this.groupBox1.TabIndex = 0;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "Group";
this.RegionRestartDelay.Font = new System.Drawing.Font("Consolas", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.RegionRestartDelay.Location = new System.Drawing.Point(7, 19);
this.RegionRestartDelay.Name = "RegionRestartDelay";
this.RegionRestartDelay.Size = new System.Drawing.Size(161, 20);
this.RegionRestartDelay.TabIndex = 0;
//
// pictureBox6
//
this.pictureBox6.Cursor = System.Windows.Forms.Cursors.Help;
this.pictureBox6.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox6.Image")));
this.pictureBox6.Location = new System.Drawing.Point(300, 20);
this.pictureBox6.Name = "pictureBox6";
this.pictureBox6.Size = new System.Drawing.Size(20, 20);
this.pictureBox6.TabIndex = 11;
this.pictureBox6.TabStop = false;
this.toolTip1.SetToolTip(this.pictureBox6, "Enter the group that will authenticate\r\nwith Corrade.");
//
// Group
//
this.Group.Font = new System.Drawing.Font("Consolas", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.Group.Location = new System.Drawing.Point(7, 20);
this.Group.Name = "Group";
this.Group.Size = new System.Drawing.Size(287, 20);
this.Group.TabIndex = 0;
//
// tabPage2
//
this.tabPage2.Controls.Add(this.groupBox16);
@@ -391,6 +357,7 @@
this.pictureBox18.TabStop = false;
this.toolTip1.SetToolTip(this.pictureBox18, "The output filters will be run in sequence, in-order \r\nfrom top to bottom, once a" +
" message leaves Corrade.");
this.pictureBox18.Click += new System.EventHandler(this.ShowToolTip);
//
// DeleteSelectedOutputFilter
//
@@ -515,6 +482,7 @@
this.pictureBox17.TabIndex = 4;
this.pictureBox17.TabStop = false;
this.toolTip1.SetToolTip(this.pictureBox17, resources.GetString("pictureBox17.ToolTip"));
this.pictureBox17.Click += new System.EventHandler(this.ShowToolTip);
//
// DeleteSelectedInputFilter
//
@@ -659,6 +627,7 @@
this.pictureBox20.TabStop = false;
this.toolTip1.SetToolTip(this.pictureBox20, "The VIGENERE secret is shared between a script and\r\nCorrade. This setting represe" +
"nts the key which can be\r\nof any length.");
this.pictureBox20.Click += new System.EventHandler(this.ShowToolTip);
//
// VIGENERESecret
//
@@ -693,6 +662,7 @@
this.pictureBox19.TabStop = false;
this.toolTip1.SetToolTip(this.pictureBox19, "In case the ENIGMA filter has been specified in the \r\nFilters section, then these" +
" settings configure an ENGIMA\r\nmachine with rotos, plugs and the reflector.");
this.pictureBox19.Click += new System.EventHandler(this.ShowToolTip);
//
// groupBox36
//
@@ -917,32 +887,72 @@
this.toolTip1.InitialDelay = 500;
this.toolTip1.ReshowDelay = 100;
//
// groupBox7
// groupBox4
//
this.groupBox7.Controls.Add(this.groupBox6);
this.groupBox7.Controls.Add(this.groupBox4);
this.groupBox7.Controls.Add(this.groupBox5);
this.groupBox7.Font = new System.Drawing.Font("Palatino Linotype", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.groupBox7.Location = new System.Drawing.Point(6, 183);
this.groupBox7.Name = "groupBox7";
this.groupBox7.Size = new System.Drawing.Size(652, 143);
this.groupBox7.TabIndex = 6;
this.groupBox7.TabStop = false;
this.groupBox7.Text = "Vassal Settings";
this.groupBox4.Controls.Add(this.pictureBox3);
this.groupBox4.Controls.Add(this.TeleportTimeout);
this.groupBox4.Font = new System.Drawing.Font("Palatino Linotype", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.groupBox4.Location = new System.Drawing.Point(213, 19);
this.groupBox4.Name = "groupBox4";
this.groupBox4.Size = new System.Drawing.Size(185, 53);
this.groupBox4.TabIndex = 3;
this.groupBox4.TabStop = false;
this.groupBox4.Text = "Teleport Timeout";
//
// groupBox8
// pictureBox3
//
this.groupBox8.Controls.Add(this.groupBox1);
this.groupBox8.Controls.Add(this.groupBox2);
this.groupBox8.Controls.Add(this.groupBox3);
this.groupBox8.Font = new System.Drawing.Font("Palatino Linotype", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.groupBox8.Location = new System.Drawing.Point(6, 6);
this.groupBox8.Name = "groupBox8";
this.groupBox8.Size = new System.Drawing.Size(652, 171);
this.groupBox8.TabIndex = 7;
this.groupBox8.TabStop = false;
this.groupBox8.Text = "Corrade Settings";
this.pictureBox3.Cursor = System.Windows.Forms.Cursors.Help;
this.pictureBox3.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox3.Image")));
this.pictureBox3.Location = new System.Drawing.Point(156, 20);
this.pictureBox3.Name = "pictureBox3";
this.pictureBox3.Size = new System.Drawing.Size(20, 20);
this.pictureBox3.TabIndex = 14;
this.pictureBox3.TabStop = false;
this.toolTip1.SetToolTip(this.pictureBox3, "This represents the time in milliseconds\r\nbefore Corrade considers that it cannot" +
"\r\nconnect to a region.");
this.pictureBox3.Click += new System.EventHandler(this.ShowToolTip);
//
// TeleportTimeout
//
this.TeleportTimeout.Font = new System.Drawing.Font("Consolas", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.TeleportTimeout.Location = new System.Drawing.Point(7, 20);
this.TeleportTimeout.Name = "TeleportTimeout";
this.TeleportTimeout.Size = new System.Drawing.Size(143, 20);
this.TeleportTimeout.TabIndex = 0;
//
// groupBox5
//
this.groupBox5.Controls.Add(this.pictureBox4);
this.groupBox5.Controls.Add(this.ServicesTimeout);
this.groupBox5.Font = new System.Drawing.Font("Palatino Linotype", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.groupBox5.Location = new System.Drawing.Point(404, 21);
this.groupBox5.Name = "groupBox5";
this.groupBox5.Size = new System.Drawing.Size(185, 53);
this.groupBox5.TabIndex = 6;
this.groupBox5.TabStop = false;
this.groupBox5.Text = "Services Timeout";
//
// pictureBox4
//
this.pictureBox4.Cursor = System.Windows.Forms.Cursors.Help;
this.pictureBox4.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox4.Image")));
this.pictureBox4.Location = new System.Drawing.Point(156, 20);
this.pictureBox4.Name = "pictureBox4";
this.pictureBox4.Size = new System.Drawing.Size(20, 20);
this.pictureBox4.TabIndex = 14;
this.pictureBox4.TabStop = false;
this.toolTip1.SetToolTip(this.pictureBox4, "This represents the timeout in milliseconds\r\nallotted to Corrade performing opera" +
"tions.");
this.pictureBox4.Click += new System.EventHandler(this.ShowToolTip);
//
// ServicesTimeout
//
this.ServicesTimeout.Font = new System.Drawing.Font("Consolas", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.ServicesTimeout.Location = new System.Drawing.Point(7, 20);
this.ServicesTimeout.Name = "ServicesTimeout";
this.ServicesTimeout.Size = new System.Drawing.Size(143, 20);
this.ServicesTimeout.TabIndex = 0;
//
// SettingsForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
@@ -962,24 +972,20 @@
this.Shown += new System.EventHandler(this.SettingsFormShown);
this.tabControl1.ResumeLayout(false);
this.tabPage1.ResumeLayout(false);
this.groupBox8.ResumeLayout(false);
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox6)).EndInit();
this.groupBox2.ResumeLayout(false);
this.groupBox2.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
this.groupBox3.ResumeLayout(false);
this.groupBox3.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).EndInit();
this.groupBox7.ResumeLayout(false);
this.groupBox6.ResumeLayout(false);
this.groupBox6.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox5)).EndInit();
this.groupBox5.ResumeLayout(false);
this.groupBox5.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox4)).EndInit();
this.groupBox4.ResumeLayout(false);
this.groupBox4.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox3)).EndInit();
this.groupBox3.ResumeLayout(false);
this.groupBox3.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).EndInit();
this.groupBox2.ResumeLayout(false);
this.groupBox2.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox6)).EndInit();
this.tabPage2.ResumeLayout(false);
this.groupBox16.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.pictureBox18)).EndInit();
@@ -1003,8 +1009,12 @@
this.groupBox34.ResumeLayout(false);
this.statusStrip1.ResumeLayout(false);
this.statusStrip1.PerformLayout();
this.groupBox7.ResumeLayout(false);
this.groupBox8.ResumeLayout(false);
this.groupBox4.ResumeLayout(false);
this.groupBox4.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox3)).EndInit();
this.groupBox5.ResumeLayout(false);
this.groupBox5.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox4)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
 
@@ -1069,14 +1079,8 @@
private System.Windows.Forms.StatusStrip statusStrip1;
private System.Windows.Forms.ToolStripProgressBar StatusProgress;
private System.Windows.Forms.ToolStripStatusLabel StatusText;
private System.Windows.Forms.GroupBox groupBox4;
private System.Windows.Forms.TextBox TeleportTimeout;
private System.Windows.Forms.GroupBox groupBox5;
private System.Windows.Forms.TextBox DataTimeout;
private System.Windows.Forms.PictureBox pictureBox6;
private System.Windows.Forms.ToolTip toolTip1;
private System.Windows.Forms.PictureBox pictureBox4;
private System.Windows.Forms.PictureBox pictureBox3;
private System.Windows.Forms.PictureBox pictureBox2;
private System.Windows.Forms.PictureBox pictureBox1;
private System.Windows.Forms.GroupBox groupBox6;
@@ -1084,5 +1088,11 @@
private System.Windows.Forms.TextBox RegionRestartDelay;
private System.Windows.Forms.GroupBox groupBox8;
private System.Windows.Forms.GroupBox groupBox7;
private System.Windows.Forms.GroupBox groupBox4;
private System.Windows.Forms.PictureBox pictureBox3;
private System.Windows.Forms.TextBox TeleportTimeout;
private System.Windows.Forms.GroupBox groupBox5;
private System.Windows.Forms.PictureBox pictureBox4;
private System.Windows.Forms.TextBox ServicesTimeout;
}
}
/Vassal/Vassal/SettingsForm.cs
@@ -5,15 +5,16 @@
///////////////////////////////////////////////////////////////////////////
 
using System;
using System.ComponentModel;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Net;
using System.Net.Http.Headers;
using System.Net.Sockets;
using System.Reflection;
using System.Threading;
using System.Windows.Forms;
using OpenMetaverse;
using wasSharp;
 
namespace Vassal
{
@@ -28,26 +29,26 @@
mainForm.Group.Text = Vassal.vassalConfiguration.Group;
mainForm.Password.Text = Vassal.vassalConfiguration.Password;
mainForm.TeleportTimeout.Text = Vassal.vassalConfiguration.TeleportTimeout.ToString(Utils.EnUsCulture);
mainForm.DataTimeout.Text = Vassal.vassalConfiguration.DataTimeout.ToString(Utils.EnUsCulture);
mainForm.ServicesTimeout.Text = Vassal.vassalConfiguration.ServicesTimeout.ToString(Utils.EnUsCulture);
mainForm.RegionRestartDelay.Text = Vassal.vassalConfiguration.RegionRestartDelay.ToString(Utils.EnUsCulture);
 
// filters
mainForm.ActiveInputFilters.Items.Clear();
foreach (Filter filter in Vassal.vassalConfiguration.InputFilters)
foreach (var filter in Vassal.vassalConfiguration.InputFilters)
{
mainForm.ActiveInputFilters.Items.Add(new ListViewItem
{
Text = wasGetDescriptionFromEnumValue(filter),
Text = Reflection.GetDescriptionFromEnumValue(filter),
Tag = filter
});
}
mainForm.ActiveOutputFilters.Items.Clear();
mainForm.ActiveInputFilters.DisplayMember = "Text";
foreach (Filter filter in Vassal.vassalConfiguration.OutputFilters)
foreach (var filter in Vassal.vassalConfiguration.OutputFilters)
{
mainForm.ActiveOutputFilters.Items.Add(new ListViewItem
{
Text = wasGetDescriptionFromEnumValue(filter),
Text = Reflection.GetDescriptionFromEnumValue(filter),
Tag = filter
});
}
@@ -55,7 +56,7 @@
 
// cryptography
mainForm.ENIGMARotorSequence.Items.Clear();
foreach (char rotor in Vassal.vassalConfiguration.ENIGMA.rotors)
foreach (var rotor in Vassal.vassalConfiguration.ENIGMA.rotors)
{
mainForm.ENIGMARotorSequence.Items.Add(new ListViewItem
{
@@ -65,7 +66,7 @@
}
mainForm.ENIGMARotorSequence.DisplayMember = "Text";
mainForm.ENIGMAPlugSequence.Items.Clear();
foreach (char plug in Vassal.vassalConfiguration.ENIGMA.plugs)
foreach (var plug in Vassal.vassalConfiguration.ENIGMA.plugs)
{
mainForm.ENIGMAPlugSequence.Items.Add(new ListViewItem
{
@@ -76,6 +77,21 @@
mainForm.ENIGMAPlugSequence.DisplayMember = "Text";
mainForm.ENIGMAReflector.Text = Vassal.vassalConfiguration.ENIGMA.reflector.ToString();
mainForm.VIGENERESecret.Text = Vassal.vassalConfiguration.VIGENERESecret;
 
// HTTP
string mediaType;
switch (Vassal.vassalConfiguration.InputFilters.LastOrDefault())
{
case Filter.RFC1738:
mediaType = @"application/x-www-form-urlencoded";
break;
default:
mediaType = @"text/plain";
break;
}
// Create HTTP Client
Vassal.HTTPClient = new Web.wasHTTPClient(new ProductInfoHeaderValue(@"Vassal",
Vassal.VASSAL_VERSION), new CookieContainer(), mediaType, 60000);
};
 
private readonly Action SetUserConfiguration = () =>
@@ -85,14 +101,14 @@
Vassal.vassalConfiguration.Group = mainForm.Group.Text;
Vassal.vassalConfiguration.Password = mainForm.Password.Text;
uint outUint;
if (uint.TryParse(mainForm.ServicesTimeout.Text, out outUint))
{
Vassal.vassalConfiguration.ServicesTimeout = outUint;
}
if (uint.TryParse(mainForm.TeleportTimeout.Text, out outUint))
{
Vassal.vassalConfiguration.TeleportTimeout = outUint;
}
if (uint.TryParse(mainForm.DataTimeout.Text, out outUint))
{
Vassal.vassalConfiguration.DataTimeout = outUint;
}
if (uint.TryParse(mainForm.RegionRestartDelay.Text, out outUint))
{
Vassal.vassalConfiguration.RegionRestartDelay = outUint;
@@ -113,6 +129,21 @@
};
 
Vassal.vassalConfiguration.VIGENERESecret = mainForm.VIGENERESecret.Text;
 
// HTTP
string mediaType;
switch (Vassal.vassalConfiguration.InputFilters.LastOrDefault())
{
case Filter.RFC1738:
mediaType = @"application/x-www-form-urlencoded";
break;
default:
mediaType = @"text/plain";
break;
}
// Create HTTP Client
Vassal.HTTPClient = new Web.wasHTTPClient(new ProductInfoHeaderValue(@"Vassal",
Vassal.VASSAL_VERSION), new CookieContainer(), mediaType, 60000);
};
 
public SettingsForm()
@@ -121,42 +152,6 @@
mainForm = this;
}
 
///////////////////////////////////////////////////////////////////////////
// Copyright (C) 2015 Wizardry and Steamworks - License: GNU GPLv3 //
///////////////////////////////////////////////////////////////////////////
/// <summary>
/// Get enumeration value from its description.
/// </summary>
/// <typeparam name="T">the enumeration type</typeparam>
/// <param name="description">the description of a member</param>
/// <returns>the value or the default of T if case no description found</returns>
private static T wasGetEnumValueFromDescription<T>(string description)
{
var field = typeof (T).GetFields()
.AsParallel().SelectMany(f => f.GetCustomAttributes(
typeof (DescriptionAttribute), false), (
f, a) => new {Field = f, Att = a}).SingleOrDefault(a => ((DescriptionAttribute) a.Att)
.Description.Equals(description));
return field != null ? (T) field.Field.GetRawConstantValue() : default(T);
}
 
///////////////////////////////////////////////////////////////////////////
// Copyright (C) 2015 Wizardry and Steamworks - License: GNU GPLv3 //
///////////////////////////////////////////////////////////////////////////
/// <summary>
/// Get the description from an enumeration value.
/// </summary>
/// <param name="value">an enumeration value</param>
/// <returns>the description or the empty string</returns>
private static string wasGetDescriptionFromEnumValue(Enum value)
{
DescriptionAttribute attribute = value.GetType()
.GetField(value.ToString())
.GetCustomAttributes(typeof (DescriptionAttribute), false)
.SingleOrDefault() as DescriptionAttribute;
return attribute != null ? attribute.Description : string.Empty;
}
 
private void LoadSettingsRequested(object sender, EventArgs e)
{
mainForm.BeginInvoke((MethodInvoker) (() =>
@@ -164,7 +159,7 @@
switch (mainForm.LoadSettingsDialog.ShowDialog())
{
case DialogResult.OK:
string file = mainForm.LoadSettingsDialog.FileName;
var file = mainForm.LoadSettingsDialog.FileName;
new Thread(() =>
{
mainForm.BeginInvoke((MethodInvoker) (() =>
@@ -201,7 +196,7 @@
switch (mainForm.SaveSettingsDialog.ShowDialog())
{
case DialogResult.OK:
string file = mainForm.SaveSettingsDialog.FileName;
var file = mainForm.SaveSettingsDialog.FileName;
new Thread(() =>
{
mainForm.BeginInvoke((MethodInvoker) (() =>
@@ -246,7 +241,7 @@
ActiveInputFilters.Items.Add(new ListViewItem
{
Text = InputDecode.Text,
Tag = wasGetEnumValueFromDescription<Filter>(InputDecode.Text)
Tag = Reflection.GetEnumValueFromDescription<Filter>(InputDecode.Text)
});
}));
}
@@ -264,7 +259,7 @@
ActiveInputFilters.Items.Add(new ListViewItem
{
Text = InputDecryption.Text,
Tag = wasGetEnumValueFromDescription<Filter>(InputDecryption.Text)
Tag = Reflection.GetEnumValueFromDescription<Filter>(InputDecryption.Text)
});
}));
}
@@ -282,7 +277,7 @@
ActiveOutputFilters.Items.Add(new ListViewItem
{
Text = OutputEncrypt.Text,
Tag = wasGetEnumValueFromDescription<Filter>(OutputEncrypt.Text)
Tag = Reflection.GetEnumValueFromDescription<Filter>(OutputEncrypt.Text)
});
}));
}
@@ -300,7 +295,7 @@
ActiveOutputFilters.Items.Add(new ListViewItem
{
Text = OutputEncode.Text,
Tag = wasGetEnumValueFromDescription<Filter>(OutputEncode.Text)
Tag = Reflection.GetEnumValueFromDescription<Filter>(OutputEncode.Text)
});
}));
}
@@ -309,7 +304,7 @@
{
mainForm.BeginInvoke((MethodInvoker) (() =>
{
ListViewItem listViewItem = ActiveOutputFilters.SelectedItem as ListViewItem;
var listViewItem = ActiveOutputFilters.SelectedItem as ListViewItem;
if (listViewItem == null)
{
ActiveOutputFilters.BackColor = Color.MistyRose;
@@ -324,7 +319,7 @@
{
mainForm.BeginInvoke((MethodInvoker) (() =>
{
ListViewItem listViewItem = ActiveInputFilters.SelectedItem as ListViewItem;
var listViewItem = ActiveInputFilters.SelectedItem as ListViewItem;
if (listViewItem == null)
{
ActiveInputFilters.BackColor = Color.MistyRose;
@@ -357,7 +352,7 @@
{
mainForm.BeginInvoke((MethodInvoker) (() =>
{
ListViewItem listViewItem = ENIGMARotorSequence.SelectedItem as ListViewItem;
var listViewItem = ENIGMARotorSequence.SelectedItem as ListViewItem;
if (listViewItem == null)
{
ENIGMARotorSequence.BackColor = Color.MistyRose;
@@ -390,7 +385,7 @@
{
mainForm.BeginInvoke((MethodInvoker) (() =>
{
ListViewItem listViewItem = ENIGMAPlugSequence.SelectedItem as ListViewItem;
var listViewItem = ENIGMAPlugSequence.SelectedItem as ListViewItem;
if (listViewItem == null)
{
ENIGMAPlugSequence.BackColor = Color.MistyRose;
@@ -415,10 +410,10 @@
// Spawn a thread to check Corrade's connection status.
new Thread(() =>
{
TcpClient tcpClient = new TcpClient();
var tcpClient = new TcpClient();
try
{
Uri uri = new Uri(Vassal.vassalConfiguration.HTTPServerURL);
var uri = new Uri(Vassal.vassalConfiguration.HTTPServerURL);
tcpClient.Connect(uri.Host, uri.Port);
// port open
Vassal.vassalForm.BeginInvoke((MethodInvoker) (() => { Vassal.vassalForm.Tabs.Enabled = true; }));
@@ -425,8 +420,8 @@
// set the loading spinner
if (Vassal.vassalForm.RegionAvatarsMap.Image == null)
{
Assembly thisAssembly = Assembly.GetExecutingAssembly();
Stream file =
var thisAssembly = Assembly.GetExecutingAssembly();
var file =
thisAssembly.GetManifestResourceStream("Vassal.img.loading.gif");
switch (file != null)
{
@@ -462,5 +457,18 @@
}));
}));
}
 
private void ShowToolTip(object sender, EventArgs e)
{
mainForm.BeginInvoke(
(Action) (() =>
{
var pictureBox = sender as PictureBox;
if (pictureBox != null)
{
toolTip1.Show(toolTip1.GetToolTip(pictureBox), pictureBox);
}
}));
}
}
}
/Vassal/Vassal/SettingsForm.resx
@@ -118,7 +118,7 @@
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="pictureBox5.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<data name="pictureBox6.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAABGdBTUEAALGOfPtRkwAAACBjSFJNAACH
DwAAjA8AAP1SAACBQAAAfXkAAOmLAAA85QAAGcxzPIV3AAAKOWlDQ1BQaG90b3Nob3AgSUNDIHByb2Zp
@@ -172,7 +172,10 @@
dQgdpxD/YtCVgwtB0JV/5d+Fgp6AN1enJiPk3QAAAABJRU5ErkJggg==
</value>
</data>
<data name="pictureBox4.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>447, 17</value>
</metadata>
<data name="pictureBox1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAABGdBTUEAALGOfPtRkwAAACBjSFJNAACH
DwAAjA8AAP1SAACBQAAAfXkAAOmLAAA85QAAGcxzPIV3AAAKOWlDQ1BQaG90b3Nob3AgSUNDIHByb2Zp
@@ -226,7 +229,7 @@
dQgdpxD/YtCVgwtB0JV/5d+Fgp6AN1enJiPk3QAAAABJRU5ErkJggg==
</value>
</data>
<data name="pictureBox3.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<data name="pictureBox2.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAABGdBTUEAALGOfPtRkwAAACBjSFJNAACH
DwAAjA8AAP1SAACBQAAAfXkAAOmLAAA85QAAGcxzPIV3AAAKOWlDQ1BQaG90b3Nob3AgSUNDIHByb2Zp
@@ -280,7 +283,7 @@
dQgdpxD/YtCVgwtB0JV/5d+Fgp6AN1enJiPk3QAAAABJRU5ErkJggg==
</value>
</data>
<data name="pictureBox2.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<data name="pictureBox4.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAABGdBTUEAALGOfPtRkwAAACBjSFJNAACH
DwAAjA8AAP1SAACBQAAAfXkAAOmLAAA85QAAGcxzPIV3AAAKOWlDQ1BQaG90b3Nob3AgSUNDIHByb2Zp
@@ -334,7 +337,7 @@
dQgdpxD/YtCVgwtB0JV/5d+Fgp6AN1enJiPk3QAAAABJRU5ErkJggg==
</value>
</data>
<data name="pictureBox1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<data name="pictureBox5.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAABGdBTUEAALGOfPtRkwAAACBjSFJNAACH
DwAAjA8AAP1SAACBQAAAfXkAAOmLAAA85QAAGcxzPIV3AAAKOWlDQ1BQaG90b3Nob3AgSUNDIHByb2Zp
@@ -388,7 +391,7 @@
dQgdpxD/YtCVgwtB0JV/5d+Fgp6AN1enJiPk3QAAAABJRU5ErkJggg==
</value>
</data>
<data name="pictureBox6.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<data name="pictureBox3.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAABGdBTUEAALGOfPtRkwAAACBjSFJNAACH
DwAAjA8AAP1SAACBQAAAfXkAAOmLAAA85QAAGcxzPIV3AAAKOWlDQ1BQaG90b3Nob3AgSUNDIHByb2Zp
@@ -442,9 +445,6 @@
dQgdpxD/YtCVgwtB0JV/5d+Fgp6AN1enJiPk3QAAAABJRU5ErkJggg==
</value>
</data>
<metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>447, 17</value>
</metadata>
<data name="pictureBox18.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAABGdBTUEAALGOfPtRkwAAACBjSFJNAACH
/Vassal/Vassal/Vassal.csproj
@@ -121,6 +121,18 @@
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<None Include="..\..\libopenmetaverse-overrides\libopenjpeg-dotnet-2-1.5.0-dotnet-1-arm.so">
<Link>libopenjpeg-dotnet-2-1.5.0-dotnet-1-arm.so</Link>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="..\..\libopenmetaverse-overrides\libopenjpeg-dotnet-2-1.5.0-dotnet-1-freebsd.so">
<Link>libopenjpeg-dotnet-2-1.5.0-dotnet-1-freebsd.so</Link>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="..\..\libopenmetaverse-overrides\libopenjpeg-dotnet-2-1.5.0-dotnet-1-x86_64-freebsd.so">
<Link>libopenjpeg-dotnet-2-1.5.0-dotnet-1-x86_64-freebsd.so</Link>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
/Vassal/Vassal/Vassal.ini
@@ -24,6 +24,6 @@
</OutputFilters>
<HTTPServerURL>http://127.0.0.1:8080/</HTTPServerURL>
<TeleportTimeout>30000</TeleportTimeout>
<DataTimeout>15000</DataTimeout>
<ServicesTimeout>60000</ServicesTimeout>
<RegionRestartDelay>120</RegionRestartDelay>
</VassalConfiguration>
/Vassal/Vassal/VassalConfiguration.cs
@@ -42,7 +42,7 @@
public class VassalConfiguration
{
private static readonly object VassalConfigurationLock = new object();
private uint _dataTimeout = 15000;
private uint _servicesTimeout = 60000;
 
private ENIGMA _enigma = new ENIGMA
{
@@ -204,13 +204,13 @@
}
}
 
public uint DataTimeout
public uint ServicesTimeout
{
get
{
lock (VassalConfigurationLock)
{
return _dataTimeout;
return _servicesTimeout;
}
}
set
@@ -217,7 +217,7 @@
{
lock (VassalConfigurationLock)
{
_dataTimeout = value;
_servicesTimeout = value;
}
}
}
/Vassal/Vassal/VassalForm.Designer.cs
@@ -66,6 +66,8 @@
this.pictureBox15 = new System.Windows.Forms.PictureBox();
this.pictureBox16 = new System.Windows.Forms.PictureBox();
this.pictureBox17 = new System.Windows.Forms.PictureBox();
this.pictureBox18 = new System.Windows.Forms.PictureBox();
this.pictureBox19 = new System.Windows.Forms.PictureBox();
this.LoadRawFileDialog = new System.Windows.Forms.OpenFileDialog();
this.SavePNGFileDialog = new System.Windows.Forms.SaveFileDialog();
this.SaveRawFileDialog = new System.Windows.Forms.SaveFileDialog();
@@ -92,6 +94,18 @@
this.RemoveEstateListMemberButton = new System.Windows.Forms.Button();
this.EstateListSelectBox = new System.Windows.Forms.ComboBox();
this.RegionToolsTerrainToolsGroup = new System.Windows.Forms.GroupBox();
this.EstateVariablesGroup = new System.Windows.Forms.GroupBox();
this.label10 = new System.Windows.Forms.Label();
this.TerrainToolsSunPositionBox = new System.Windows.Forms.TextBox();
this.TerrainToolsFixedSunBox = new System.Windows.Forms.CheckBox();
this.TerrainToolsUseEstateSunBox = new System.Windows.Forms.CheckBox();
this.label9 = new System.Windows.Forms.Label();
this.TerrainToolsTerrainLowerLimitBox = new System.Windows.Forms.TextBox();
this.label8 = new System.Windows.Forms.Label();
this.TerrainToolsTerrainRaiseLimitBox = new System.Windows.Forms.TextBox();
this.label7 = new System.Windows.Forms.Label();
this.TerrainToolsWaterHeightBox = new System.Windows.Forms.TextBox();
this.SetTerrainVariablesButton = new System.Windows.Forms.Button();
this.groupBox13 = new System.Windows.Forms.GroupBox();
this.RipTerrainButton = new System.Windows.Forms.Button();
this.EstateTerrainDownloadUploadGroup = new System.Windows.Forms.GroupBox();
@@ -128,6 +142,8 @@
this.BatchRestartRegionName = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.BatchRestartPosition = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.ResidentListTab = new System.Windows.Forms.TabPage();
this.ResidentListTeleportHomeGroup = new System.Windows.Forms.GroupBox();
this.button1 = new System.Windows.Forms.Button();
this.ResidentListBanGroup = new System.Windows.Forms.GroupBox();
this.ResidentBanAllEstatesBox = new System.Windows.Forms.CheckBox();
this.ResidentBanButton = new System.Windows.Forms.Button();
@@ -143,6 +159,17 @@
this.RegionsStateLastState = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.RegionsStateLastCheck = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.OverviewTab = new System.Windows.Forms.TabPage();
this.CorradePollTimeDial = new AquaControls.AquaGauge();
this.groupBox24 = new System.Windows.Forms.GroupBox();
this.NetTime = new System.Windows.Forms.Label();
this.groupBox17 = new System.Windows.Forms.GroupBox();
this.PhysicsTime = new System.Windows.Forms.Label();
this.groupBox11 = new System.Windows.Forms.GroupBox();
this.ScriptedObjects = new System.Windows.Forms.Label();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.Agents = new System.Windows.Forms.Label();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.FrameTime = new System.Windows.Forms.Label();
this.groupBox10 = new System.Windows.Forms.GroupBox();
this.RegionAvatarsMap = new System.Windows.Forms.PictureBox();
this.groupBox9 = new System.Windows.Forms.GroupBox();
@@ -159,8 +186,6 @@
this.Dilation = new System.Windows.Forms.Label();
this.groupBox3 = new System.Windows.Forms.GroupBox();
this.LastLag = new System.Windows.Forms.Label();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.Agents = new System.Windows.Forms.Label();
this.Tabs = new System.Windows.Forms.TabControl();
this.EstateTexturesTab = new System.Windows.Forms.TabPage();
this.GroundTexturesGroup = new System.Windows.Forms.GroupBox();
@@ -208,32 +233,14 @@
this.RegionDebugCollisionsBox = new System.Windows.Forms.CheckBox();
this.RegionDebugScriptsBox = new System.Windows.Forms.CheckBox();
this.LoadCSVFile = new System.Windows.Forms.OpenFileDialog();
this.ResidentListTeleportHomeGroup = new System.Windows.Forms.GroupBox();
this.button1 = new System.Windows.Forms.Button();
this.pictureBox18 = new System.Windows.Forms.PictureBox();
this.EstateVariablesGroup = new System.Windows.Forms.GroupBox();
this.SetTerrainVariablesButton = new System.Windows.Forms.Button();
this.pictureBox19 = new System.Windows.Forms.PictureBox();
this.TerrainToolsWaterHeightBox = new System.Windows.Forms.TextBox();
this.label7 = new System.Windows.Forms.Label();
this.TerrainToolsTerrainRaiseLimitBox = new System.Windows.Forms.TextBox();
this.label8 = new System.Windows.Forms.Label();
this.TerrainToolsTerrainLowerLimitBox = new System.Windows.Forms.TextBox();
this.label9 = new System.Windows.Forms.Label();
this.TerrainToolsUseEstateSunBox = new System.Windows.Forms.CheckBox();
this.TerrainToolsFixedSunBox = new System.Windows.Forms.CheckBox();
this.TerrainToolsSunPositionBox = new System.Windows.Forms.TextBox();
this.label10 = new System.Windows.Forms.Label();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.FrameTime = new System.Windows.Forms.Label();
this.groupBox11 = new System.Windows.Forms.GroupBox();
this.ScriptedObjects = new System.Windows.Forms.Label();
this.groupBox17 = new System.Windows.Forms.GroupBox();
this.PhysicsTime = new System.Windows.Forms.Label();
this.groupBox24 = new System.Windows.Forms.GroupBox();
this.NetTime = new System.Windows.Forms.Label();
this.backgroundWorker1 = new System.ComponentModel.BackgroundWorker();
this.CorradePollTimeDial = new AquaControls.AquaGauge();
this.SetCovenantTab = new System.Windows.Forms.TabPage();
this.BatchSetCovenantGridView = new System.Windows.Forms.DataGridView();
this.BatchSetCovenantButton = new System.Windows.Forms.Button();
this.SetCovenantNotecardUUIDBox = new System.Windows.Forms.TextBox();
this.BatchSetCovenantRegionName = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.BatchSetCovenantPosition = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.pictureBox20 = new System.Windows.Forms.PictureBox();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
this.statusStrip1.SuspendLayout();
this.RegionTeleportGroup.SuspendLayout();
@@ -255,6 +262,8 @@
((System.ComponentModel.ISupportInitialize)(this.pictureBox15)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox16)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox17)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox18)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox19)).BeginInit();
this.EstateListsTab.SuspendLayout();
this.EstateListsGroupsGroup.SuspendLayout();
this.EstateListsResidentsGroup.SuspendLayout();
@@ -263,6 +272,7 @@
this.EstateListGroup.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.EstateListGridView)).BeginInit();
this.RegionToolsTerrainToolsGroup.SuspendLayout();
this.EstateVariablesGroup.SuspendLayout();
this.groupBox13.SuspendLayout();
this.EstateTerrainDownloadUploadGroup.SuspendLayout();
this.EstateTopTab.SuspendLayout();
@@ -273,11 +283,17 @@
this.BatchRestartTab.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.BatchRestartGridView)).BeginInit();
this.ResidentListTab.SuspendLayout();
this.ResidentListTeleportHomeGroup.SuspendLayout();
this.ResidentListBanGroup.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.ResidentListGridView)).BeginInit();
this.RegionsStateTab.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.RegionsStateGridView)).BeginInit();
this.OverviewTab.SuspendLayout();
this.groupBox24.SuspendLayout();
this.groupBox17.SuspendLayout();
this.groupBox11.SuspendLayout();
this.groupBox2.SuspendLayout();
this.groupBox1.SuspendLayout();
this.groupBox10.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.RegionAvatarsMap)).BeginInit();
this.groupBox9.SuspendLayout();
@@ -287,7 +303,6 @@
this.groupBox5.SuspendLayout();
this.groupBox4.SuspendLayout();
this.groupBox3.SuspendLayout();
this.groupBox2.SuspendLayout();
this.Tabs.SuspendLayout();
this.EstateTexturesTab.SuspendLayout();
this.GroundTexturesGroup.SuspendLayout();
@@ -304,14 +319,9 @@
this.groupBox19.SuspendLayout();
this.groupBox18.SuspendLayout();
this.RegionToolsRegionDebugGroup.SuspendLayout();
this.ResidentListTeleportHomeGroup.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox18)).BeginInit();
this.EstateVariablesGroup.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox19)).BeginInit();
this.groupBox1.SuspendLayout();
this.groupBox11.SuspendLayout();
this.groupBox17.SuspendLayout();
this.groupBox24.SuspendLayout();
this.SetCovenantTab.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.BatchSetCovenantGridView)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox20)).BeginInit();
this.SuspendLayout();
//
// pictureBox1
@@ -390,6 +400,7 @@
this.pictureBox6.TabIndex = 10;
this.pictureBox6.TabStop = false;
this.toolTip1.SetToolTip(this.pictureBox6, resources.GetString("pictureBox6.ToolTip"));
this.pictureBox6.Click += new System.EventHandler(this.ShowToolTip);
//
// LoadedRegionsBox
//
@@ -464,6 +475,7 @@
this.pictureBox2.TabStop = false;
this.toolTip1.SetToolTip(this.pictureBox2, "Before Vassal can work, Vassal must be\r\nconfigured by using the \"Settings...\"\r\nbu" +
"tton and configuring Vassal.");
this.pictureBox2.Click += new System.EventHandler(this.ShowToolTip);
//
// Version
//
@@ -491,6 +503,7 @@
this.pictureBox4.TabIndex = 12;
this.pictureBox4.TabStop = false;
this.toolTip1.SetToolTip(this.pictureBox4, "This option downloads the current region\r\nterrain given estate rights.");
this.pictureBox4.Click += new System.EventHandler(this.ShowToolTip);
//
// pictureBox7
//
@@ -502,6 +515,7 @@
this.pictureBox7.TabIndex = 12;
this.pictureBox7.TabStop = false;
this.toolTip1.SetToolTip(this.pictureBox7, "This option uploads a terrain height-map\r\nto the current region and applies it.");
this.pictureBox7.Click += new System.EventHandler(this.ShowToolTip);
//
// pictureBox5
//
@@ -513,6 +527,7 @@
this.pictureBox5.TabIndex = 12;
this.pictureBox5.TabStop = false;
this.toolTip1.SetToolTip(this.pictureBox5, resources.GetString("pictureBox5.ToolTip"));
this.pictureBox5.Click += new System.EventHandler(this.ShowToolTip);
//
// pictureBox3
//
@@ -524,6 +539,7 @@
this.pictureBox3.TabIndex = 11;
this.pictureBox3.TabStop = false;
this.toolTip1.SetToolTip(this.pictureBox3, resources.GetString("pictureBox3.ToolTip"));
this.pictureBox3.Click += new System.EventHandler(this.ShowToolTip);
//
// pictureBox8
//
@@ -535,6 +551,7 @@
this.pictureBox8.TabIndex = 11;
this.pictureBox8.TabStop = false;
this.toolTip1.SetToolTip(this.pictureBox8, "Select an estate list from the drop-down\r\nin order to populate the list.");
this.pictureBox8.Click += new System.EventHandler(this.ShowToolTip);
//
// pictureBox9
//
@@ -546,6 +563,7 @@
this.pictureBox9.TabIndex = 15;
this.pictureBox9.TabStop = false;
this.toolTip1.SetToolTip(this.pictureBox9, resources.GetString("pictureBox9.ToolTip"));
this.pictureBox9.Click += new System.EventHandler(this.ShowToolTip);
//
// pictureBox10
//
@@ -558,6 +576,7 @@
this.pictureBox10.TabStop = false;
this.toolTip1.SetToolTip(this.pictureBox10, "Groups can be added to an estate list by\r\nname or by UUID. Simply type the group\r" +
"\nname or the group UUID in the \"Groups\"\r\nbox and then click \"Add Group\" button.");
this.pictureBox10.Click += new System.EventHandler(this.ShowToolTip);
//
// pictureBox11
//
@@ -571,6 +590,7 @@
this.toolTip1.SetToolTip(this.pictureBox11, "In order to add an agent to the state\r\nlist, first type the resident first-name\r\n" +
"and their last-name in the corresponding\r\nboxes and then press the \"Add Resident" +
"\".");
this.pictureBox11.Click += new System.EventHandler(this.ShowToolTip);
//
// pictureBox12
//
@@ -582,6 +602,7 @@
this.pictureBox12.TabIndex = 11;
this.pictureBox12.TabStop = false;
this.toolTip1.SetToolTip(this.pictureBox12, resources.GetString("pictureBox12.ToolTip"));
this.pictureBox12.Click += new System.EventHandler(this.ShowToolTip);
//
// pictureBox13
//
@@ -594,6 +615,7 @@
this.pictureBox13.TabStop = false;
this.toolTip1.SetToolTip(this.pictureBox13, "To apply the region info, make all the\r\nsettings in this group and then press\r\nth" +
"e \"Apply\" button.");
this.pictureBox13.Click += new System.EventHandler(this.ShowToolTip);
//
// pictureBox14
//
@@ -606,6 +628,7 @@
this.pictureBox14.TabStop = false;
this.toolTip1.SetToolTip(this.pictureBox14, "In order to apply the region debug to\r\nthe current region, complete all the \r\nbox" +
"es and press the \"Apply\" button.");
this.pictureBox14.Click += new System.EventHandler(this.ShowToolTip);
//
// pictureBox15
//
@@ -617,6 +640,7 @@
this.pictureBox15.TabIndex = 11;
this.pictureBox15.TabStop = false;
this.toolTip1.SetToolTip(this.pictureBox15, resources.GetString("pictureBox15.ToolTip"));
this.pictureBox15.Click += new System.EventHandler(this.ShowToolTip);
//
// pictureBox16
//
@@ -628,6 +652,7 @@
this.pictureBox16.TabIndex = 12;
this.pictureBox16.TabStop = false;
this.toolTip1.SetToolTip(this.pictureBox16, resources.GetString("pictureBox16.ToolTip"));
this.pictureBox16.Click += new System.EventHandler(this.ShowToolTip);
//
// pictureBox17
//
@@ -639,7 +664,35 @@
this.pictureBox17.TabIndex = 11;
this.pictureBox17.TabStop = false;
this.toolTip1.SetToolTip(this.pictureBox17, resources.GetString("pictureBox17.ToolTip"));
this.pictureBox17.Click += new System.EventHandler(this.ShowToolTip);
//
// pictureBox18
//
this.pictureBox18.Cursor = System.Windows.Forms.Cursors.Help;
this.pictureBox18.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox18.Image")));
this.pictureBox18.Location = new System.Drawing.Point(104, 22);
this.pictureBox18.Name = "pictureBox18";
this.pictureBox18.Size = new System.Drawing.Size(20, 20);
this.pictureBox18.TabIndex = 12;
this.pictureBox18.TabStop = false;
this.toolTip1.SetToolTip(this.pictureBox18, "You can select residents (multiple\r\nselection is possible by control / shift\r\ncli" +
"cking the list) and then press the\r\n\"Teleport Home\" button in order to\r\nteleport" +
" the users home from the region.");
this.pictureBox18.Click += new System.EventHandler(this.ShowToolTip);
//
// pictureBox19
//
this.pictureBox19.Cursor = System.Windows.Forms.Cursors.Help;
this.pictureBox19.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox19.Image")));
this.pictureBox19.Location = new System.Drawing.Point(187, 179);
this.pictureBox19.Name = "pictureBox19";
this.pictureBox19.Size = new System.Drawing.Size(20, 20);
this.pictureBox19.TabIndex = 13;
this.pictureBox19.TabStop = false;
this.toolTip1.SetToolTip(this.pictureBox19, "All the values have to be completed and\r\nthen by pressing the \"Set Variables\"\r\nbu" +
"tton, the settings will be applied to\r\nthe current region.");
this.pictureBox19.Click += new System.EventHandler(this.ShowToolTip);
//
// LoadRawFileDialog
//
this.LoadRawFileDialog.FileName = "openFileDialog1";
@@ -890,13 +943,128 @@
this.RegionToolsTerrainToolsGroup.Controls.Add(this.EstateVariablesGroup);
this.RegionToolsTerrainToolsGroup.Controls.Add(this.groupBox13);
this.RegionToolsTerrainToolsGroup.Controls.Add(this.EstateTerrainDownloadUploadGroup);
this.RegionToolsTerrainToolsGroup.Location = new System.Drawing.Point(479, 100);
this.RegionToolsTerrainToolsGroup.Location = new System.Drawing.Point(125, 15);
this.RegionToolsTerrainToolsGroup.Name = "RegionToolsTerrainToolsGroup";
this.RegionToolsTerrainToolsGroup.Size = new System.Drawing.Size(228, 386);
this.RegionToolsTerrainToolsGroup.Size = new System.Drawing.Size(472, 243);
this.RegionToolsTerrainToolsGroup.TabIndex = 0;
this.RegionToolsTerrainToolsGroup.TabStop = false;
this.RegionToolsTerrainToolsGroup.Text = "Terrain Tools";
//
// EstateVariablesGroup
//
this.EstateVariablesGroup.Controls.Add(this.label10);
this.EstateVariablesGroup.Controls.Add(this.TerrainToolsSunPositionBox);
this.EstateVariablesGroup.Controls.Add(this.TerrainToolsFixedSunBox);
this.EstateVariablesGroup.Controls.Add(this.TerrainToolsUseEstateSunBox);
this.EstateVariablesGroup.Controls.Add(this.label9);
this.EstateVariablesGroup.Controls.Add(this.TerrainToolsTerrainLowerLimitBox);
this.EstateVariablesGroup.Controls.Add(this.label8);
this.EstateVariablesGroup.Controls.Add(this.TerrainToolsTerrainRaiseLimitBox);
this.EstateVariablesGroup.Controls.Add(this.label7);
this.EstateVariablesGroup.Controls.Add(this.TerrainToolsWaterHeightBox);
this.EstateVariablesGroup.Controls.Add(this.pictureBox19);
this.EstateVariablesGroup.Controls.Add(this.SetTerrainVariablesButton);
this.EstateVariablesGroup.Location = new System.Drawing.Point(240, 21);
this.EstateVariablesGroup.Name = "EstateVariablesGroup";
this.EstateVariablesGroup.Size = new System.Drawing.Size(215, 207);
this.EstateVariablesGroup.TabIndex = 15;
this.EstateVariablesGroup.TabStop = false;
this.EstateVariablesGroup.Text = "Variables";
//
// label10
//
this.label10.AutoSize = true;
this.label10.Location = new System.Drawing.Point(83, 152);
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(74, 16);
this.label10.TabIndex = 3;
this.label10.Text = "Sun Position:";
//
// TerrainToolsSunPositionBox
//
this.TerrainToolsSunPositionBox.Location = new System.Drawing.Point(168, 150);
this.TerrainToolsSunPositionBox.Name = "TerrainToolsSunPositionBox";
this.TerrainToolsSunPositionBox.Size = new System.Drawing.Size(39, 22);
this.TerrainToolsSunPositionBox.TabIndex = 3;
//
// TerrainToolsFixedSunBox
//
this.TerrainToolsFixedSunBox.AutoSize = true;
this.TerrainToolsFixedSunBox.Location = new System.Drawing.Point(132, 128);
this.TerrainToolsFixedSunBox.Name = "TerrainToolsFixedSunBox";
this.TerrainToolsFixedSunBox.Size = new System.Drawing.Size(75, 20);
this.TerrainToolsFixedSunBox.TabIndex = 3;
this.TerrainToolsFixedSunBox.Text = "Fixed Sun";
this.TerrainToolsFixedSunBox.UseVisualStyleBackColor = true;
//
// TerrainToolsUseEstateSunBox
//
this.TerrainToolsUseEstateSunBox.AutoSize = true;
this.TerrainToolsUseEstateSunBox.Location = new System.Drawing.Point(107, 102);
this.TerrainToolsUseEstateSunBox.Name = "TerrainToolsUseEstateSunBox";
this.TerrainToolsUseEstateSunBox.Size = new System.Drawing.Size(100, 20);
this.TerrainToolsUseEstateSunBox.TabIndex = 3;
this.TerrainToolsUseEstateSunBox.Text = "Use Estate Sun";
this.TerrainToolsUseEstateSunBox.UseVisualStyleBackColor = true;
//
// label9
//
this.label9.AutoSize = true;
this.label9.Location = new System.Drawing.Point(50, 76);
this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(109, 16);
this.label9.TabIndex = 19;
this.label9.Text = "Terrain Lower Limit:";
//
// TerrainToolsTerrainLowerLimitBox
//
this.TerrainToolsTerrainLowerLimitBox.Location = new System.Drawing.Point(168, 74);
this.TerrainToolsTerrainLowerLimitBox.Name = "TerrainToolsTerrainLowerLimitBox";
this.TerrainToolsTerrainLowerLimitBox.Size = new System.Drawing.Size(39, 22);
this.TerrainToolsTerrainLowerLimitBox.TabIndex = 18;
//
// label8
//
this.label8.AutoSize = true;
this.label8.Location = new System.Drawing.Point(57, 48);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(102, 16);
this.label8.TabIndex = 17;
this.label8.Text = "Terrain Raise Limit:";
//
// TerrainToolsTerrainRaiseLimitBox
//
this.TerrainToolsTerrainRaiseLimitBox.Location = new System.Drawing.Point(168, 46);
this.TerrainToolsTerrainRaiseLimitBox.Name = "TerrainToolsTerrainRaiseLimitBox";
this.TerrainToolsTerrainRaiseLimitBox.Size = new System.Drawing.Size(39, 22);
this.TerrainToolsTerrainRaiseLimitBox.TabIndex = 16;
//
// label7
//
this.label7.AutoSize = true;
this.label7.Location = new System.Drawing.Point(83, 19);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(76, 16);
this.label7.TabIndex = 15;
this.label7.Text = "Water Height:";
//
// TerrainToolsWaterHeightBox
//
this.TerrainToolsWaterHeightBox.Location = new System.Drawing.Point(168, 18);
this.TerrainToolsWaterHeightBox.Name = "TerrainToolsWaterHeightBox";
this.TerrainToolsWaterHeightBox.Size = new System.Drawing.Size(39, 22);
this.TerrainToolsWaterHeightBox.TabIndex = 14;
//
// SetTerrainVariablesButton
//
this.SetTerrainVariablesButton.Location = new System.Drawing.Point(86, 178);
this.SetTerrainVariablesButton.Name = "SetTerrainVariablesButton";
this.SetTerrainVariablesButton.Size = new System.Drawing.Size(95, 23);
this.SetTerrainVariablesButton.TabIndex = 0;
this.SetTerrainVariablesButton.Text = "Set Variables";
this.SetTerrainVariablesButton.UseVisualStyleBackColor = true;
this.SetTerrainVariablesButton.Click += new System.EventHandler(this.RequestSetVariables);
//
// groupBox13
//
this.groupBox13.Controls.Add(this.RipTerrainButton);
@@ -1197,6 +1365,7 @@
//
// RegionRestartDelayBox
//
this.RegionRestartDelayBox.AcceptsReturn = true;
this.RegionRestartDelayBox.Location = new System.Drawing.Point(270, 455);
this.RegionRestartDelayBox.Name = "RegionRestartDelayBox";
this.RegionRestartDelayBox.Size = new System.Drawing.Size(72, 22);
@@ -1259,6 +1428,27 @@
this.ResidentListTab.Text = "Resident List";
this.ResidentListTab.UseVisualStyleBackColor = true;
//
// ResidentListTeleportHomeGroup
//
this.ResidentListTeleportHomeGroup.Controls.Add(this.pictureBox18);
this.ResidentListTeleportHomeGroup.Controls.Add(this.button1);
this.ResidentListTeleportHomeGroup.Location = new System.Drawing.Point(374, 426);
this.ResidentListTeleportHomeGroup.Name = "ResidentListTeleportHomeGroup";
this.ResidentListTeleportHomeGroup.Size = new System.Drawing.Size(132, 60);
this.ResidentListTeleportHomeGroup.TabIndex = 11;
this.ResidentListTeleportHomeGroup.TabStop = false;
this.ResidentListTeleportHomeGroup.Text = "Teleport Home";
//
// button1
//
this.button1.Location = new System.Drawing.Point(6, 20);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(92, 23);
this.button1.TabIndex = 0;
this.button1.Text = "Teleport Home";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.RequestTeleportHome);
//
// ResidentListBanGroup
//
this.ResidentListBanGroup.Controls.Add(this.pictureBox17);
@@ -1423,6 +1613,130 @@
this.OverviewTab.Text = "Overview";
this.OverviewTab.UseVisualStyleBackColor = true;
//
// CorradePollTimeDial
//
this.CorradePollTimeDial.BackColor = System.Drawing.Color.Transparent;
this.CorradePollTimeDial.DialColor = System.Drawing.Color.LightYellow;
this.CorradePollTimeDial.DialText = "Poll (s)";
this.CorradePollTimeDial.Font = new System.Drawing.Font("Consolas", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.CorradePollTimeDial.Glossiness = 0F;
this.CorradePollTimeDial.Location = new System.Drawing.Point(518, 333);
this.CorradePollTimeDial.MaxValue = 5F;
this.CorradePollTimeDial.MinValue = 0F;
this.CorradePollTimeDial.Name = "CorradePollTimeDial";
this.CorradePollTimeDial.NoOfDivisions = 5;
this.CorradePollTimeDial.NoOfSubDivisions = 4;
this.CorradePollTimeDial.RecommendedValue = 0F;
this.CorradePollTimeDial.Size = new System.Drawing.Size(150, 150);
this.CorradePollTimeDial.TabIndex = 15;
this.CorradePollTimeDial.ThresholdPercent = 20F;
this.CorradePollTimeDial.Value = 0F;
//
// groupBox24
//
this.groupBox24.Controls.Add(this.NetTime);
this.groupBox24.Font = new System.Drawing.Font("Palatino Linotype", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.groupBox24.Location = new System.Drawing.Point(596, 281);
this.groupBox24.Name = "groupBox24";
this.groupBox24.Size = new System.Drawing.Size(107, 49);
this.groupBox24.TabIndex = 14;
this.groupBox24.TabStop = false;
this.groupBox24.Text = "Net Time";
//
// NetTime
//
this.NetTime.AutoSize = true;
this.NetTime.Font = new System.Drawing.Font("Consolas", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.NetTime.Location = new System.Drawing.Point(12, 21);
this.NetTime.Name = "NetTime";
this.NetTime.Size = new System.Drawing.Size(32, 18);
this.NetTime.TabIndex = 0;
this.NetTime.Text = " ";
//
// groupBox17
//
this.groupBox17.Controls.Add(this.PhysicsTime);
this.groupBox17.Font = new System.Drawing.Font("Palatino Linotype", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.groupBox17.Location = new System.Drawing.Point(483, 281);
this.groupBox17.Name = "groupBox17";
this.groupBox17.Size = new System.Drawing.Size(107, 49);
this.groupBox17.TabIndex = 13;
this.groupBox17.TabStop = false;
this.groupBox17.Text = "Physics Time";
//
// PhysicsTime
//
this.PhysicsTime.AutoSize = true;
this.PhysicsTime.Font = new System.Drawing.Font("Consolas", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.PhysicsTime.Location = new System.Drawing.Point(12, 21);
this.PhysicsTime.Name = "PhysicsTime";
this.PhysicsTime.Size = new System.Drawing.Size(32, 18);
this.PhysicsTime.TabIndex = 0;
this.PhysicsTime.Text = " ";
//
// groupBox11
//
this.groupBox11.Controls.Add(this.ScriptedObjects);
this.groupBox11.Font = new System.Drawing.Font("Palatino Linotype", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.groupBox11.Location = new System.Drawing.Point(483, 6);
this.groupBox11.Name = "groupBox11";
this.groupBox11.Size = new System.Drawing.Size(107, 49);
this.groupBox11.TabIndex = 12;
this.groupBox11.TabStop = false;
this.groupBox11.Text = "Scripted Objects";
//
// ScriptedObjects
//
this.ScriptedObjects.AutoSize = true;
this.ScriptedObjects.Font = new System.Drawing.Font("Consolas", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.ScriptedObjects.Location = new System.Drawing.Point(12, 21);
this.ScriptedObjects.Name = "ScriptedObjects";
this.ScriptedObjects.Size = new System.Drawing.Size(32, 18);
this.ScriptedObjects.TabIndex = 10;
this.ScriptedObjects.Text = " ";
//
// groupBox2
//
this.groupBox2.Controls.Add(this.Agents);
this.groupBox2.Font = new System.Drawing.Font("Palatino Linotype", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.groupBox2.Location = new System.Drawing.Point(596, 226);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(107, 49);
this.groupBox2.TabIndex = 1;
this.groupBox2.TabStop = false;
this.groupBox2.Text = "Agents";
//
// Agents
//
this.Agents.AutoSize = true;
this.Agents.Font = new System.Drawing.Font("Consolas", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.Agents.Location = new System.Drawing.Point(12, 21);
this.Agents.Name = "Agents";
this.Agents.Size = new System.Drawing.Size(32, 18);
this.Agents.TabIndex = 0;
this.Agents.Text = " ";
//
// groupBox1
//
this.groupBox1.Controls.Add(this.FrameTime);
this.groupBox1.Font = new System.Drawing.Font("Palatino Linotype", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.groupBox1.Location = new System.Drawing.Point(483, 171);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(107, 49);
this.groupBox1.TabIndex = 11;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "Frame Time";
//
// FrameTime
//
this.FrameTime.AutoSize = true;
this.FrameTime.Font = new System.Drawing.Font("Consolas", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.FrameTime.Location = new System.Drawing.Point(12, 21);
this.FrameTime.Name = "FrameTime";
this.FrameTime.Size = new System.Drawing.Size(32, 18);
this.FrameTime.TabIndex = 0;
this.FrameTime.Text = " ";
//
// groupBox10
//
this.groupBox10.Controls.Add(this.RegionAvatarsMap);
@@ -1591,27 +1905,6 @@
this.LastLag.TabIndex = 0;
this.LastLag.Text = " ";
//
// groupBox2
//
this.groupBox2.Controls.Add(this.Agents);
this.groupBox2.Font = new System.Drawing.Font("Palatino Linotype", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.groupBox2.Location = new System.Drawing.Point(596, 226);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(107, 49);
this.groupBox2.TabIndex = 1;
this.groupBox2.TabStop = false;
this.groupBox2.Text = "Agents";
//
// Agents
//
this.Agents.AutoSize = true;
this.Agents.Font = new System.Drawing.Font("Consolas", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.Agents.Location = new System.Drawing.Point(12, 21);
this.Agents.Name = "Agents";
this.Agents.Size = new System.Drawing.Size(32, 18);
this.Agents.TabIndex = 0;
this.Agents.Text = " ";
//
// Tabs
//
this.Tabs.Controls.Add(this.OverviewTab);
@@ -1622,6 +1915,7 @@
this.Tabs.Controls.Add(this.EstateListsTab);
this.Tabs.Controls.Add(this.EstateTexturesTab);
this.Tabs.Controls.Add(this.RegionToolsTab);
this.Tabs.Controls.Add(this.SetCovenantTab);
this.Tabs.Enabled = false;
this.Tabs.Font = new System.Drawing.Font("Palatino Linotype", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.Tabs.Location = new System.Drawing.Point(13, 186);
@@ -1900,8 +2194,8 @@
// RegionToolsTab
//
this.RegionToolsTab.Controls.Add(this.RegionToolsRegionInfoGroup);
this.RegionToolsTab.Controls.Add(this.RegionToolsTerrainToolsGroup);
this.RegionToolsTab.Controls.Add(this.RegionToolsRegionDebugGroup);
this.RegionToolsTab.Controls.Add(this.RegionToolsTerrainToolsGroup);
this.RegionToolsTab.Location = new System.Drawing.Point(4, 25);
this.RegionToolsTab.Name = "RegionToolsTab";
this.RegionToolsTab.Size = new System.Drawing.Size(719, 489);
@@ -1923,7 +2217,7 @@
this.RegionToolsRegionInfoGroup.Controls.Add(this.RegionInfoFlyBox);
this.RegionToolsRegionInfoGroup.Controls.Add(this.ApplyRegionInfoButton);
this.RegionToolsRegionInfoGroup.Enabled = false;
this.RegionToolsRegionInfoGroup.Location = new System.Drawing.Point(13, 12);
this.RegionToolsRegionInfoGroup.Location = new System.Drawing.Point(125, 264);
this.RegionToolsRegionInfoGroup.Name = "RegionToolsRegionInfoGroup";
this.RegionToolsRegionInfoGroup.Size = new System.Drawing.Size(460, 122);
this.RegionToolsRegionInfoGroup.TabIndex = 2;
@@ -2054,7 +2348,7 @@
this.RegionToolsRegionDebugGroup.Controls.Add(this.RegionDebugCollisionsBox);
this.RegionToolsRegionDebugGroup.Controls.Add(this.RegionDebugScriptsBox);
this.RegionToolsRegionDebugGroup.Enabled = false;
this.RegionToolsRegionDebugGroup.Location = new System.Drawing.Point(479, 12);
this.RegionToolsRegionDebugGroup.Location = new System.Drawing.Point(241, 392);
this.RegionToolsRegionDebugGroup.Name = "RegionToolsRegionDebugGroup";
this.RegionToolsRegionDebugGroup.Size = new System.Drawing.Size(228, 82);
this.RegionToolsRegionDebugGroup.TabIndex = 1;
@@ -2105,270 +2399,82 @@
//
this.LoadCSVFile.Filter = "CSV (*.csv)|*.csv|All files (*.*)|*.*";
//
// ResidentListTeleportHomeGroup
// SetCovenantTab
//
this.ResidentListTeleportHomeGroup.Controls.Add(this.pictureBox18);
this.ResidentListTeleportHomeGroup.Controls.Add(this.button1);
this.ResidentListTeleportHomeGroup.Location = new System.Drawing.Point(374, 426);
this.ResidentListTeleportHomeGroup.Name = "ResidentListTeleportHomeGroup";
this.ResidentListTeleportHomeGroup.Size = new System.Drawing.Size(132, 60);
this.ResidentListTeleportHomeGroup.TabIndex = 11;
this.ResidentListTeleportHomeGroup.TabStop = false;
this.ResidentListTeleportHomeGroup.Text = "Teleport Home";
this.SetCovenantTab.Controls.Add(this.pictureBox20);
this.SetCovenantTab.Controls.Add(this.SetCovenantNotecardUUIDBox);
this.SetCovenantTab.Controls.Add(this.BatchSetCovenantButton);
this.SetCovenantTab.Controls.Add(this.BatchSetCovenantGridView);
this.SetCovenantTab.Location = new System.Drawing.Point(4, 25);
this.SetCovenantTab.Name = "SetCovenantTab";
this.SetCovenantTab.Size = new System.Drawing.Size(719, 489);
this.SetCovenantTab.TabIndex = 9;
this.SetCovenantTab.Text = "Set Covenant";
this.SetCovenantTab.UseVisualStyleBackColor = true;
//
// button1
// BatchSetCovenantGridView
//
this.button1.Location = new System.Drawing.Point(6, 20);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(92, 23);
this.button1.TabIndex = 0;
this.button1.Text = "Teleport Home";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.RequestTeleportHome);
this.BatchSetCovenantGridView.AllowUserToAddRows = false;
this.BatchSetCovenantGridView.AllowUserToDeleteRows = false;
this.BatchSetCovenantGridView.AllowUserToOrderColumns = true;
this.BatchSetCovenantGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.BatchSetCovenantGridView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.BatchSetCovenantRegionName,
this.BatchSetCovenantPosition});
this.BatchSetCovenantGridView.Font = new System.Drawing.Font("Consolas", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.BatchSetCovenantGridView.Location = new System.Drawing.Point(3, 3);
this.BatchSetCovenantGridView.Name = "BatchSetCovenantGridView";
this.BatchSetCovenantGridView.ReadOnly = true;
this.BatchSetCovenantGridView.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.BatchSetCovenantGridView.Size = new System.Drawing.Size(712, 443);
this.BatchSetCovenantGridView.TabIndex = 1;
//
// pictureBox18
// BatchSetCovenantButton
//
this.pictureBox18.Cursor = System.Windows.Forms.Cursors.Help;
this.pictureBox18.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox18.Image")));
this.pictureBox18.Location = new System.Drawing.Point(104, 22);
this.pictureBox18.Name = "pictureBox18";
this.pictureBox18.Size = new System.Drawing.Size(20, 20);
this.pictureBox18.TabIndex = 12;
this.pictureBox18.TabStop = false;
this.toolTip1.SetToolTip(this.pictureBox18, "You can select residents (multiple\r\nselection is possible by control / shift\r\ncli" +
"cking the list) and then press the\r\n\"Teleport Home\" button in order to\r\nteleport" +
" the users home from the region.");
this.BatchSetCovenantButton.Location = new System.Drawing.Point(394, 452);
this.BatchSetCovenantButton.Name = "BatchSetCovenantButton";
this.BatchSetCovenantButton.Size = new System.Drawing.Size(121, 23);
this.BatchSetCovenantButton.TabIndex = 3;
this.BatchSetCovenantButton.Text = "Batch Set Covenant";
this.BatchSetCovenantButton.UseVisualStyleBackColor = true;
this.BatchSetCovenantButton.Click += new System.EventHandler(this.RequestBatchSetCovenant);
//
// EstateVariablesGroup
// SetCovenantNotecardUUIDBox
//
this.EstateVariablesGroup.Controls.Add(this.label10);
this.EstateVariablesGroup.Controls.Add(this.TerrainToolsSunPositionBox);
this.EstateVariablesGroup.Controls.Add(this.TerrainToolsFixedSunBox);
this.EstateVariablesGroup.Controls.Add(this.TerrainToolsUseEstateSunBox);
this.EstateVariablesGroup.Controls.Add(this.label9);
this.EstateVariablesGroup.Controls.Add(this.TerrainToolsTerrainLowerLimitBox);
this.EstateVariablesGroup.Controls.Add(this.label8);
this.EstateVariablesGroup.Controls.Add(this.TerrainToolsTerrainRaiseLimitBox);
this.EstateVariablesGroup.Controls.Add(this.label7);
this.EstateVariablesGroup.Controls.Add(this.TerrainToolsWaterHeightBox);
this.EstateVariablesGroup.Controls.Add(this.pictureBox19);
this.EstateVariablesGroup.Controls.Add(this.SetTerrainVariablesButton);
this.EstateVariablesGroup.Location = new System.Drawing.Point(7, 173);
this.EstateVariablesGroup.Name = "EstateVariablesGroup";
this.EstateVariablesGroup.Size = new System.Drawing.Size(215, 207);
this.EstateVariablesGroup.TabIndex = 15;
this.EstateVariablesGroup.TabStop = false;
this.EstateVariablesGroup.Text = "Variables";
this.SetCovenantNotecardUUIDBox.Font = new System.Drawing.Font("Consolas", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.SetCovenantNotecardUUIDBox.Location = new System.Drawing.Point(162, 454);
this.SetCovenantNotecardUUIDBox.Name = "SetCovenantNotecardUUIDBox";
this.SetCovenantNotecardUUIDBox.Size = new System.Drawing.Size(226, 20);
this.SetCovenantNotecardUUIDBox.TabIndex = 4;
//
// SetTerrainVariablesButton
// BatchSetCovenantRegionName
//
this.SetTerrainVariablesButton.Location = new System.Drawing.Point(86, 178);
this.SetTerrainVariablesButton.Name = "SetTerrainVariablesButton";
this.SetTerrainVariablesButton.Size = new System.Drawing.Size(95, 23);
this.SetTerrainVariablesButton.TabIndex = 0;
this.SetTerrainVariablesButton.Text = "Set Variables";
this.SetTerrainVariablesButton.UseVisualStyleBackColor = true;
this.SetTerrainVariablesButton.Click += new System.EventHandler(this.RequestSetVariables);
this.BatchSetCovenantRegionName.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
this.BatchSetCovenantRegionName.HeaderText = "Region Name";
this.BatchSetCovenantRegionName.Name = "BatchSetCovenantRegionName";
this.BatchSetCovenantRegionName.ReadOnly = true;
this.BatchSetCovenantRegionName.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Programmatic;
//
// pictureBox19
// BatchSetCovenantPosition
//
this.pictureBox19.Cursor = System.Windows.Forms.Cursors.Help;
this.pictureBox19.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox19.Image")));
this.pictureBox19.Location = new System.Drawing.Point(187, 179);
this.pictureBox19.Name = "pictureBox19";
this.pictureBox19.Size = new System.Drawing.Size(20, 20);
this.pictureBox19.TabIndex = 13;
this.pictureBox19.TabStop = false;
this.toolTip1.SetToolTip(this.pictureBox19, "All the values have to be completed and\r\nthen by pressing the \"Set Variables\"\r\nbu" +
"tton, the settings will be applied to\r\nthe current region.");
this.BatchSetCovenantPosition.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
this.BatchSetCovenantPosition.HeaderText = "Position";
this.BatchSetCovenantPosition.Name = "BatchSetCovenantPosition";
this.BatchSetCovenantPosition.ReadOnly = true;
this.BatchSetCovenantPosition.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Programmatic;
//
// TerrainToolsWaterHeightBox
// pictureBox20
//
this.TerrainToolsWaterHeightBox.Location = new System.Drawing.Point(168, 18);
this.TerrainToolsWaterHeightBox.Name = "TerrainToolsWaterHeightBox";
this.TerrainToolsWaterHeightBox.Size = new System.Drawing.Size(39, 22);
this.TerrainToolsWaterHeightBox.TabIndex = 14;
this.pictureBox20.Cursor = System.Windows.Forms.Cursors.Help;
this.pictureBox20.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox20.Image")));
this.pictureBox20.Location = new System.Drawing.Point(521, 453);
this.pictureBox20.Name = "pictureBox20";
this.pictureBox20.Size = new System.Drawing.Size(20, 20);
this.pictureBox20.TabIndex = 13;
this.pictureBox20.TabStop = false;
this.toolTip1.SetToolTip(this.pictureBox20, resources.GetString("pictureBox20.ToolTip"));
this.pictureBox20.Click += new System.EventHandler(this.ShowToolTip);
//
// label7
//
this.label7.AutoSize = true;
this.label7.Location = new System.Drawing.Point(83, 19);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(76, 16);
this.label7.TabIndex = 15;
this.label7.Text = "Water Height:";
//
// TerrainToolsTerrainRaiseLimitBox
//
this.TerrainToolsTerrainRaiseLimitBox.Location = new System.Drawing.Point(168, 46);
this.TerrainToolsTerrainRaiseLimitBox.Name = "TerrainToolsTerrainRaiseLimitBox";
this.TerrainToolsTerrainRaiseLimitBox.Size = new System.Drawing.Size(39, 22);
this.TerrainToolsTerrainRaiseLimitBox.TabIndex = 16;
//
// label8
//
this.label8.AutoSize = true;
this.label8.Location = new System.Drawing.Point(57, 48);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(102, 16);
this.label8.TabIndex = 17;
this.label8.Text = "Terrain Raise Limit:";
//
// TerrainToolsTerrainLowerLimitBox
//
this.TerrainToolsTerrainLowerLimitBox.Location = new System.Drawing.Point(168, 74);
this.TerrainToolsTerrainLowerLimitBox.Name = "TerrainToolsTerrainLowerLimitBox";
this.TerrainToolsTerrainLowerLimitBox.Size = new System.Drawing.Size(39, 22);
this.TerrainToolsTerrainLowerLimitBox.TabIndex = 18;
//
// label9
//
this.label9.AutoSize = true;
this.label9.Location = new System.Drawing.Point(50, 76);
this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(109, 16);
this.label9.TabIndex = 19;
this.label9.Text = "Terrain Lower Limit:";
//
// TerrainToolsUseEstateSunBox
//
this.TerrainToolsUseEstateSunBox.AutoSize = true;
this.TerrainToolsUseEstateSunBox.Location = new System.Drawing.Point(107, 102);
this.TerrainToolsUseEstateSunBox.Name = "TerrainToolsUseEstateSunBox";
this.TerrainToolsUseEstateSunBox.Size = new System.Drawing.Size(100, 20);
this.TerrainToolsUseEstateSunBox.TabIndex = 3;
this.TerrainToolsUseEstateSunBox.Text = "Use Estate Sun";
this.TerrainToolsUseEstateSunBox.UseVisualStyleBackColor = true;
//
// TerrainToolsFixedSunBox
//
this.TerrainToolsFixedSunBox.AutoSize = true;
this.TerrainToolsFixedSunBox.Location = new System.Drawing.Point(132, 128);
this.TerrainToolsFixedSunBox.Name = "TerrainToolsFixedSunBox";
this.TerrainToolsFixedSunBox.Size = new System.Drawing.Size(75, 20);
this.TerrainToolsFixedSunBox.TabIndex = 3;
this.TerrainToolsFixedSunBox.Text = "Fixed Sun";
this.TerrainToolsFixedSunBox.UseVisualStyleBackColor = true;
//
// TerrainToolsSunPositionBox
//
this.TerrainToolsSunPositionBox.Location = new System.Drawing.Point(168, 150);
this.TerrainToolsSunPositionBox.Name = "TerrainToolsSunPositionBox";
this.TerrainToolsSunPositionBox.Size = new System.Drawing.Size(39, 22);
this.TerrainToolsSunPositionBox.TabIndex = 3;
//
// label10
//
this.label10.AutoSize = true;
this.label10.Location = new System.Drawing.Point(83, 152);
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(74, 16);
this.label10.TabIndex = 3;
this.label10.Text = "Sun Position:";
//
// groupBox1
//
this.groupBox1.Controls.Add(this.FrameTime);
this.groupBox1.Font = new System.Drawing.Font("Palatino Linotype", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.groupBox1.Location = new System.Drawing.Point(483, 171);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(107, 49);
this.groupBox1.TabIndex = 11;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "Frame Time";
//
// FrameTime
//
this.FrameTime.AutoSize = true;
this.FrameTime.Font = new System.Drawing.Font("Consolas", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.FrameTime.Location = new System.Drawing.Point(12, 21);
this.FrameTime.Name = "FrameTime";
this.FrameTime.Size = new System.Drawing.Size(32, 18);
this.FrameTime.TabIndex = 0;
this.FrameTime.Text = " ";
//
// groupBox11
//
this.groupBox11.Controls.Add(this.ScriptedObjects);
this.groupBox11.Font = new System.Drawing.Font("Palatino Linotype", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.groupBox11.Location = new System.Drawing.Point(483, 6);
this.groupBox11.Name = "groupBox11";
this.groupBox11.Size = new System.Drawing.Size(107, 49);
this.groupBox11.TabIndex = 12;
this.groupBox11.TabStop = false;
this.groupBox11.Text = "Scripted Objects";
//
// ScriptedObjects
//
this.ScriptedObjects.AutoSize = true;
this.ScriptedObjects.Font = new System.Drawing.Font("Consolas", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.ScriptedObjects.Location = new System.Drawing.Point(12, 21);
this.ScriptedObjects.Name = "ScriptedObjects";
this.ScriptedObjects.Size = new System.Drawing.Size(32, 18);
this.ScriptedObjects.TabIndex = 10;
this.ScriptedObjects.Text = " ";
//
// groupBox17
//
this.groupBox17.Controls.Add(this.PhysicsTime);
this.groupBox17.Font = new System.Drawing.Font("Palatino Linotype", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.groupBox17.Location = new System.Drawing.Point(483, 281);
this.groupBox17.Name = "groupBox17";
this.groupBox17.Size = new System.Drawing.Size(107, 49);
this.groupBox17.TabIndex = 13;
this.groupBox17.TabStop = false;
this.groupBox17.Text = "Physics Time";
//
// PhysicsTime
//
this.PhysicsTime.AutoSize = true;
this.PhysicsTime.Font = new System.Drawing.Font("Consolas", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.PhysicsTime.Location = new System.Drawing.Point(12, 21);
this.PhysicsTime.Name = "PhysicsTime";
this.PhysicsTime.Size = new System.Drawing.Size(32, 18);
this.PhysicsTime.TabIndex = 0;
this.PhysicsTime.Text = " ";
//
// groupBox24
//
this.groupBox24.Controls.Add(this.NetTime);
this.groupBox24.Font = new System.Drawing.Font("Palatino Linotype", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.groupBox24.Location = new System.Drawing.Point(596, 281);
this.groupBox24.Name = "groupBox24";
this.groupBox24.Size = new System.Drawing.Size(107, 49);
this.groupBox24.TabIndex = 14;
this.groupBox24.TabStop = false;
this.groupBox24.Text = "Net Time";
//
// NetTime
//
this.NetTime.AutoSize = true;
this.NetTime.Font = new System.Drawing.Font("Consolas", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.NetTime.Location = new System.Drawing.Point(12, 21);
this.NetTime.Name = "NetTime";
this.NetTime.Size = new System.Drawing.Size(32, 18);
this.NetTime.TabIndex = 0;
this.NetTime.Text = " ";
//
// CorradePollTimeDial
//
this.CorradePollTimeDial.BackColor = System.Drawing.Color.Transparent;
this.CorradePollTimeDial.DialColor = System.Drawing.Color.LightYellow;
this.CorradePollTimeDial.DialText = "Poll (s)";
this.CorradePollTimeDial.Font = new System.Drawing.Font("Consolas", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.CorradePollTimeDial.Glossiness = 0F;
this.CorradePollTimeDial.Location = new System.Drawing.Point(518, 333);
this.CorradePollTimeDial.MaxValue = 5F;
this.CorradePollTimeDial.MinValue = 0F;
this.CorradePollTimeDial.Name = "CorradePollTimeDial";
this.CorradePollTimeDial.NoOfDivisions = 5;
this.CorradePollTimeDial.NoOfSubDivisions = 4;
this.CorradePollTimeDial.RecommendedValue = 0F;
this.CorradePollTimeDial.Size = new System.Drawing.Size(150, 150);
this.CorradePollTimeDial.TabIndex = 15;
this.CorradePollTimeDial.ThresholdPercent = 20F;
this.CorradePollTimeDial.Value = 0F;
//
// Vassal
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
@@ -2411,6 +2517,8 @@
((System.ComponentModel.ISupportInitialize)(this.pictureBox15)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox16)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox17)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox18)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox19)).EndInit();
this.EstateListsTab.ResumeLayout(false);
this.EstateListsGroupsGroup.ResumeLayout(false);
this.EstateListsGroupsGroup.PerformLayout();
@@ -2423,6 +2531,8 @@
this.EstateListGroup.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.EstateListGridView)).EndInit();
this.RegionToolsTerrainToolsGroup.ResumeLayout(false);
this.EstateVariablesGroup.ResumeLayout(false);
this.EstateVariablesGroup.PerformLayout();
this.groupBox13.ResumeLayout(false);
this.EstateTerrainDownloadUploadGroup.ResumeLayout(false);
this.EstateTopTab.ResumeLayout(false);
@@ -2437,6 +2547,7 @@
((System.ComponentModel.ISupportInitialize)(this.BatchRestartGridView)).EndInit();
this.ResidentListTab.ResumeLayout(false);
this.ResidentListTab.PerformLayout();
this.ResidentListTeleportHomeGroup.ResumeLayout(false);
this.ResidentListBanGroup.ResumeLayout(false);
this.ResidentListBanGroup.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.ResidentListGridView)).EndInit();
@@ -2443,6 +2554,16 @@
this.RegionsStateTab.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.RegionsStateGridView)).EndInit();
this.OverviewTab.ResumeLayout(false);
this.groupBox24.ResumeLayout(false);
this.groupBox24.PerformLayout();
this.groupBox17.ResumeLayout(false);
this.groupBox17.PerformLayout();
this.groupBox11.ResumeLayout(false);
this.groupBox11.PerformLayout();
this.groupBox2.ResumeLayout(false);
this.groupBox2.PerformLayout();
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
this.groupBox10.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.RegionAvatarsMap)).EndInit();
this.groupBox9.ResumeLayout(false);
@@ -2459,8 +2580,6 @@
this.groupBox4.PerformLayout();
this.groupBox3.ResumeLayout(false);
this.groupBox3.PerformLayout();
this.groupBox2.ResumeLayout(false);
this.groupBox2.PerformLayout();
this.Tabs.ResumeLayout(false);
this.EstateTexturesTab.ResumeLayout(false);
this.GroundTexturesGroup.ResumeLayout(false);
@@ -2485,19 +2604,10 @@
this.groupBox18.PerformLayout();
this.RegionToolsRegionDebugGroup.ResumeLayout(false);
this.RegionToolsRegionDebugGroup.PerformLayout();
this.ResidentListTeleportHomeGroup.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.pictureBox18)).EndInit();
this.EstateVariablesGroup.ResumeLayout(false);
this.EstateVariablesGroup.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox19)).EndInit();
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
this.groupBox11.ResumeLayout(false);
this.groupBox11.PerformLayout();
this.groupBox17.ResumeLayout(false);
this.groupBox17.PerformLayout();
this.groupBox24.ResumeLayout(false);
this.groupBox24.PerformLayout();
this.SetCovenantTab.ResumeLayout(false);
this.SetCovenantTab.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.BatchSetCovenantGridView)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox20)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
 
@@ -2704,6 +2814,13 @@
private Label PhysicsTime;
private BackgroundWorker backgroundWorker1;
private AquaControls.AquaGauge CorradePollTimeDial;
private TabPage SetCovenantTab;
public DataGridView BatchSetCovenantGridView;
private Button BatchSetCovenantButton;
private TextBox SetCovenantNotecardUUIDBox;
private DataGridViewTextBoxColumn BatchSetCovenantRegionName;
private DataGridViewTextBoxColumn BatchSetCovenantPosition;
private PictureBox pictureBox20;
}
}
 
/Vassal/Vassal/VassalForm.cs
@@ -12,6 +12,7 @@
using System.IO;
using System.Linq;
using System.Net;
using System.Net.Http.Headers;
using System.Net.Sockets;
using System.Reflection;
using System.Text;
@@ -39,8 +40,14 @@
public static Vassal vassalForm;
public static readonly object ClientInstanceTeleportLock = new object();
public static readonly object RegionsStateCheckLock = new object();
public static Web.wasHTTPClient HTTPClient;
 
/// <summary>
/// Corrade version.
/// </summary>
public static readonly string VASSAL_VERSION = Assembly.GetEntryAssembly().GetName().Version.ToString();
 
/// <summary>
/// Corrade's input filter function.
/// </summary>
private static readonly Func<string, string> wasInput = o =>
@@ -47,7 +54,7 @@
{
if (string.IsNullOrEmpty(o)) return string.Empty;
 
foreach (Filter filter in vassalConfiguration.InputFilters)
foreach (var filter in vassalConfiguration.InputFilters)
{
switch (filter)
{
@@ -83,7 +90,7 @@
{
if (string.IsNullOrEmpty(o)) return string.Empty;
 
foreach (Filter filter in vassalConfiguration.OutputFilters)
foreach (var filter in vassalConfiguration.OutputFilters)
{
switch (filter)
{
@@ -116,7 +123,7 @@
{
try
{
string result = wasPOST(vassalConfiguration.HTTPServerURL,
var result = Encoding.UTF8.GetString(HTTPClient.POST(vassalConfiguration.HTTPServerURL,
KeyValue.Escape(new Dictionary<string, string>
{
{"command", "getregiondata"},
@@ -123,7 +130,7 @@
{"group", vassalConfiguration.Group},
{"password", vassalConfiguration.Password},
{"data", "Name"}
}, wasOutput), 60000);
}, wasOutput)).Result);
bool success;
if (string.IsNullOrEmpty(result) ||
!bool.TryParse(wasInput(KeyValue.Get("success", result)), out success))
@@ -172,69 +179,17 @@
vassalForm = this;
}
 
///////////////////////////////////////////////////////////////////////////
// Copyright (C) 2014 Wizardry and Steamworks - License: GNU GPLv3 //
///////////////////////////////////////////////////////////////////////////
/// <summary>
/// Sends a post request to an URL with set key-value pairs.
/// </summary>
/// <param name="URL">the url to send the message to</param>
/// <param name="message">key-value pairs to send</param>
/// <param name="millisecondsTimeout">the time in milliseconds for the request to timeout</param>
private static string wasPOST(string URL, Dictionary<string, string> message, uint millisecondsTimeout)
private void ShowToolTip(object sender, EventArgs e)
{
try
{
HttpWebRequest request = (HttpWebRequest) WebRequest.Create(URL);
request.UserAgent = VASSAL_CONSTANTS.USER_AGENT;
request.Proxy = WebRequest.DefaultWebProxy;
request.Pipelined = true;
request.KeepAlive = true;
request.Timeout = (int) millisecondsTimeout;
request.ReadWriteTimeout = (int) millisecondsTimeout;
request.AllowAutoRedirect = true;
request.AllowWriteStreamBuffering = true;
request.AutomaticDecompression = DecompressionMethods.GZip | DecompressionMethods.Deflate;
request.Method = WebRequestMethods.Http.Post;
// set the content type based on chosen output filers
switch (vassalConfiguration.OutputFilters.Last())
vassalForm.BeginInvoke(
(Action)(() =>
{
case Filter.RFC1738:
request.ContentType = VASSAL_CONSTANTS.CONTENT_TYPE.WWW_FORM_URLENCODED;
break;
default:
request.ContentType = VASSAL_CONSTANTS.CONTENT_TYPE.TEXT_PLAIN;
break;
}
// send request
using (Stream requestStream = request.GetRequestStream())
{
using (StreamWriter dataStream = new StreamWriter(requestStream))
PictureBox pictureBox = sender as PictureBox;
if (pictureBox != null)
{
dataStream.Write(KeyValue.Encode(message));
toolTip1.Show(toolTip1.GetToolTip(pictureBox), pictureBox);
}
}
// read response
using (HttpWebResponse response = (HttpWebResponse) request.GetResponse())
{
using (Stream responseStream = response.GetResponseStream())
{
if (responseStream != null)
{
using (
StreamReader streamReader = new StreamReader(responseStream))
{
return streamReader.ReadToEnd();
}
}
}
}
}
catch (Exception)
{
}
 
return null;
}));
}
 
private void RegionSelected(object sender, EventArgs e)
@@ -253,12 +208,12 @@
 
Monitor.Enter(ClientInstanceTeleportLock);
 
string selectedRegionName = string.Empty;
Vector3 selectedRegionPosition = Vector3.Zero;
bool startTeleport = false;
var selectedRegionName = string.Empty;
var selectedRegionPosition = Vector3.Zero;
var startTeleport = false;
vassalForm.Invoke((MethodInvoker) (() =>
{
ListViewItem listViewItem = LoadedRegionsBox.SelectedItem as ListViewItem;
var listViewItem = LoadedRegionsBox.SelectedItem as ListViewItem;
switch (listViewItem != null && LoadedRegionsBox.SelectedIndex != -1)
{
case true:
@@ -285,8 +240,8 @@
// Pause for teleport (10 teleports / 15s allowed).
Thread.Sleep(700);
 
int elapsedSeconds = 0;
Timer teleportTimer = new Timer(TimeSpan.FromSeconds(1).TotalMilliseconds);
var elapsedSeconds = 0;
var teleportTimer = new Timer(TimeSpan.FromSeconds(1).TotalMilliseconds);
teleportTimer.Elapsed += (o, p) =>
{
vassalForm.Invoke((MethodInvoker) (() =>
@@ -301,10 +256,10 @@
};
teleportTimer.Start();
string result = null;
ManualResetEvent receivedPOST = new ManualResetEvent(false);
var receivedPOST = new ManualResetEvent(false);
new Thread(() =>
{
result = wasInput(wasPOST(vassalConfiguration.HTTPServerURL,
result = wasInput(Encoding.UTF8.GetString(HTTPClient.POST(vassalConfiguration.HTTPServerURL,
KeyValue.Escape(new Dictionary<string, string>
{
{"command", "teleport"},
@@ -313,7 +268,7 @@
{"region", selectedRegionName},
{"position", selectedRegionPosition.ToString()},
{"fly", "True"}
}, wasOutput), vassalConfiguration.TeleportTimeout));
}, wasOutput)).Result));
receivedPOST.Set();
}) {IsBackground = true}.Start();
receivedPOST.WaitOne((int) vassalConfiguration.TeleportTimeout, false);
@@ -364,8 +319,8 @@
vassalForm.StatusProgress.Value = 100;
vassalForm.RegionTeleportGroup.Enabled = true;
// Set the map image to the loading spinner.
Assembly thisAssembly = Assembly.GetExecutingAssembly();
Stream file =
var thisAssembly = Assembly.GetExecutingAssembly();
var file =
thisAssembly.GetManifestResourceStream("Vassal.img.loading.gif");
switch (file != null)
{
@@ -434,7 +389,7 @@
private void SettingsRequested(object sender, EventArgs e)
{
vassalForm.BeginInvoke((MethodInvoker) (() => { VassalStatusGroup.Enabled = false; }));
SettingsForm settingsForm = new SettingsForm {TopMost = true};
var settingsForm = new SettingsForm {TopMost = true};
settingsForm.Show();
}
 
@@ -467,6 +422,20 @@
VassalConfiguration.Load(VASSAL_CONSTANTS.VASSAL_CONFIGURATION_FILE, ref vassalConfiguration);
// Apply settings
RegionRestartDelayBox.Text = vassalConfiguration.RegionRestartDelay.ToString(Utils.EnUsCulture);
// HTTP
string mediaType;
switch (vassalConfiguration.InputFilters.LastOrDefault())
{
case Filter.RFC1738:
mediaType = @"application/x-www-form-urlencoded";
break;
default:
mediaType = @"text/plain";
break;
}
// Create HTTP Client
Vassal.HTTPClient = new Web.wasHTTPClient(new ProductInfoHeaderValue(@"Vassal",
Vassal.VASSAL_VERSION), new CookieContainer(), mediaType, vassalConfiguration.ServicesTimeout);
}
 
// Get all the regions if they exist.
@@ -473,7 +442,7 @@
if (File.Exists(VASSAL_CONSTANTS.VASSAL_REGIONS))
{
Vector3 localPosition;
List<KeyValuePair<string, Vector3>> ConfiguredRegions = new List<KeyValuePair<string, Vector3>>(
var ConfiguredRegions = new List<KeyValuePair<string, Vector3>>(
File.ReadAllLines(VASSAL_CONSTANTS.VASSAL_REGIONS)
.Select(o => new List<string>(CSV.ToEnumerable(o)))
.Where(o => o.Count == 2)
@@ -489,12 +458,18 @@
.ToArray());
// Populate the batch restart grid view.
BatchRestartGridView.Rows.Clear();
foreach (KeyValuePair<string, Vector3> data in ConfiguredRegions)
foreach (var data in ConfiguredRegions)
{
BatchRestartGridView.Rows.Add(data.Key, data.Value.ToString());
}
// Populate the batch covenant grid view.
BatchSetCovenantGridView.Rows.Clear();
foreach (var data in ConfiguredRegions)
{
BatchSetCovenantGridView.Rows.Add(data.Key, data.Value.ToString());
}
// Populate the regions state grid view.
foreach (KeyValuePair<string, Vector3> data in ConfiguredRegions)
foreach (var data in ConfiguredRegions)
{
RegionsStateGridView.Rows.Add(data.Key, "Check pening...");
}
@@ -508,8 +483,8 @@
try
{
// Check Corrade connection status.
TcpClient tcpClient = new TcpClient();
Uri uri = new Uri(vassalConfiguration.HTTPServerURL);
var tcpClient = new TcpClient();
var uri = new Uri(vassalConfiguration.HTTPServerURL);
tcpClient.Connect(uri.Host, uri.Port);
// port open
vassalForm.BeginInvoke((MethodInvoker) (() =>
@@ -516,8 +491,8 @@
{
vassalForm.CurrentRegionAt.Visible = true;
vassalForm.CurrentRegionName.Visible = true;
Assembly thisAssembly = Assembly.GetExecutingAssembly();
Stream file =
var thisAssembly = Assembly.GetExecutingAssembly();
var file =
thisAssembly.GetManifestResourceStream("Vassal.img.online.png");
switch (file != null)
{
@@ -540,8 +515,8 @@
{
vassalForm.CurrentRegionAt.Visible = false;
vassalForm.CurrentRegionName.Visible = false;
Assembly thisAssembly = Assembly.GetExecutingAssembly();
Stream file =
var thisAssembly = Assembly.GetExecutingAssembly();
var file =
thisAssembly.GetManifestResourceStream("Vassal.img.offline.png");
switch (file != null)
{
@@ -561,7 +536,7 @@
try
{
// Get the simulator name and if we are an estate manager.
string result = wasPOST(vassalConfiguration.HTTPServerURL,
var result = Encoding.UTF8.GetString(HTTPClient.POST(vassalConfiguration.HTTPServerURL,
KeyValue.Escape(new Dictionary<string, string>
{
{"command", "getregiondata"},
@@ -574,7 +549,7 @@
"IsEstateManager"
})
}
}, wasOutput), vassalConfiguration.DataTimeout);
}, wasOutput)).Result);
 
bool success;
if (string.IsNullOrEmpty(result) ||
@@ -581,7 +556,7 @@
!bool.TryParse(wasInput(KeyValue.Get("success", result)), out success))
throw new Exception();
 
List<string> data = CSV.ToEnumerable(wasInput(KeyValue.Get("data", result))).ToList();
var data = CSV.ToEnumerable(wasInput(KeyValue.Get("data", result))).ToList();
if (data.Count.Equals(0))
throw new Exception();
 
@@ -651,7 +626,7 @@
overviewTabTimer.Elapsed += (o, p) =>
{
// Do not do anything in case the tab is not selected.
bool run = false;
var run = false;
vassalForm.Invoke((MethodInvoker) (() => { run = Tabs.SelectedTab.Equals(OverviewTab); }));
 
if (!run)
@@ -665,10 +640,10 @@
try
{
// Start measuring the lag to Corrade.
Stopwatch stopWatch = new Stopwatch();
var stopWatch = new Stopwatch();
stopWatch.Start();
// Get the statistics.
string result = wasPOST(vassalConfiguration.HTTPServerURL,
var result = Encoding.UTF8.GetString(HTTPClient.POST(vassalConfiguration.HTTPServerURL,
KeyValue.Escape(new Dictionary<string, string>
{
{"command", "getregiondata"},
@@ -692,7 +667,7 @@
"AvatarPositions"
})
}
}, wasOutput), vassalConfiguration.DataTimeout);
}, wasOutput)).Result);
stopWatch.Stop();
 
bool success;
@@ -700,7 +675,7 @@
!bool.TryParse(wasInput(KeyValue.Get("success", result)), out success))
throw new Exception();
 
List<string> data = CSV.ToEnumerable(wasInput(KeyValue.Get("data", result))).ToList();
var data = CSV.ToEnumerable(wasInput(KeyValue.Get("data", result))).ToList();
if (data.Count.Equals(0))
throw new Exception();
 
@@ -741,7 +716,7 @@
// Get avatar positions.
// Pattern: [...], X, 10, Y, 63, Z, 200, [...], X, 52, Y, 73, Z, 55, [...[...]]
float X = 0, Y = 0, Z = 0;
List<Vector3> positions = data.Select((x, i) => new {Item = x, Index = i})
var positions = data.Select((x, i) => new {Item = x, Index = i})
.Where(x => x.Item.Equals("X") || x.Item.Equals("Y") || x.Item.Equals("Z"))
.Select(z => data[z.Index + 1]).Select((x, i) => new {Value = x, Index = i})
.GroupBy(x => x.Index/3)
@@ -754,7 +729,7 @@
.ToList();
 
// Get the map image.
result = wasPOST(vassalConfiguration.HTTPServerURL,
result = Encoding.UTF8.GetString(HTTPClient.POST(vassalConfiguration.HTTPServerURL,
KeyValue.Escape(new Dictionary<string, string>
{
{"command", "getgridregiondata"},
@@ -761,7 +736,7 @@
{"group", vassalConfiguration.Group},
{"password", vassalConfiguration.Password},
{"data", "MapImageID"}
}, wasOutput), vassalConfiguration.DataTimeout);
}, wasOutput)).Result);
 
if (string.IsNullOrEmpty(result) ||
!bool.TryParse(wasInput(KeyValue.Get("success", result)), out success))
@@ -770,7 +745,7 @@
data = CSV.ToEnumerable(wasInput(KeyValue.Get("data", result))).ToList();
if (!data.Count.Equals(2))
throw new Exception();
result = wasPOST(vassalConfiguration.HTTPServerURL,
result = Encoding.UTF8.GetString(HTTPClient.POST(vassalConfiguration.HTTPServerURL,
KeyValue.Escape(new Dictionary<string, string>
{
{"command", "download"},
@@ -779,20 +754,20 @@
{"item", data.Last()},
{"type", "Texture"},
{"format", "Jpeg"}
}, wasOutput), vassalConfiguration.DataTimeout);
}, wasOutput)).Result);
if (string.IsNullOrEmpty(result) ||
!bool.TryParse(wasInput(KeyValue.Get("success", result)), out success))
throw new Exception();
byte[] mapImageBytes = Convert.FromBase64String(wasInput(KeyValue.Get("data", result)));
var mapImageBytes = Convert.FromBase64String(wasInput(KeyValue.Get("data", result)));
Image mapImage;
using (MemoryStream memoryStream = new MemoryStream(mapImageBytes, 0, mapImageBytes.Length))
using (var memoryStream = new MemoryStream(mapImageBytes, 0, mapImageBytes.Length))
{
mapImage = Image.FromStream(memoryStream);
}
 
// Draw the avatars onto the map.
Graphics mapGraphics = Graphics.FromImage(mapImage);
foreach (Vector3 position in positions)
var mapGraphics = Graphics.FromImage(mapImage);
foreach (var position in positions)
{
mapGraphics.FillEllipse(Brushes.Chartreuse,
new Rectangle((int) position.X, (int) position.Y, 4, 4));
@@ -817,7 +792,7 @@
regionsStateTabTimer.Elapsed += (o, p) =>
{
// Do not do anything in case the tab is not selected.
bool run = false;
var run = false;
vassalForm.Invoke((MethodInvoker) (() => { run = Tabs.SelectedTab.Equals(RegionsStateTab); }));
 
if (!run)
@@ -830,7 +805,7 @@
 
try
{
string regionName = string.Empty;
var regionName = string.Empty;
vassalForm.Invoke((MethodInvoker) (() =>
{
regionName =
@@ -844,7 +819,7 @@
throw new Exception();
 
// Get the region status.
string result = wasPOST(vassalConfiguration.HTTPServerURL,
var result = Encoding.UTF8.GetString(HTTPClient.POST(vassalConfiguration.HTTPServerURL,
KeyValue.Escape(new Dictionary<string, string>
{
{"command", "getgridregiondata"},
@@ -852,7 +827,7 @@
{"password", vassalConfiguration.Password},
{"region", regionName},
{"data", "Access"}
}, wasOutput), vassalConfiguration.DataTimeout);
}, wasOutput)).Result);
 
bool success;
if (string.IsNullOrEmpty(result) ||
@@ -859,11 +834,11 @@
!bool.TryParse(wasInput(KeyValue.Get("success", result)), out success))
throw new Exception();
 
List<string> data = CSV.ToEnumerable(wasInput(KeyValue.Get("data", result))).ToList();
var data = CSV.ToEnumerable(wasInput(KeyValue.Get("data", result))).ToList();
if (!data.Count.Equals(2))
throw new Exception();
 
string status = data.Last();
var status = data.Last();
vassalForm.Invoke((MethodInvoker) (() =>
{
switch (status)
@@ -911,7 +886,7 @@
estateTopTabTimer.Elapsed += (o, p) =>
{
// Do not do anything in case the tab is not selected.
bool run = false;
var run = false;
vassalForm.Invoke((MethodInvoker) (() => { run = Tabs.SelectedTab.Equals(EstateTopTab); }));
 
if (!run)
@@ -925,7 +900,7 @@
try
{
// Get the top scripts.
string result = wasPOST(vassalConfiguration.HTTPServerURL,
var result = Encoding.UTF8.GetString(HTTPClient.POST(vassalConfiguration.HTTPServerURL,
KeyValue.Escape(new Dictionary<string, string>
{
{"command", "getregiontop"},
@@ -932,7 +907,7 @@
{"group", vassalConfiguration.Group},
{"password", vassalConfiguration.Password},
{"type", "scripts"}
}, wasOutput), vassalConfiguration.DataTimeout);
}, wasOutput)).Result);
 
bool success;
if (string.IsNullOrEmpty(result) ||
@@ -939,7 +914,7 @@
!bool.TryParse(wasInput(KeyValue.Get("success", result)), out success))
throw new Exception();
 
HashSet<List<string>> data =
var data =
new HashSet<List<string>>(CSV.ToEnumerable(wasInput(KeyValue.Get("data", result)))
.Select((x, i) => new {Index = i, Value = x})
.GroupBy(x => x.Index/5)
@@ -951,7 +926,7 @@
{
// Remove rows that are not in the data update.
foreach (
int index in
var index in
TopScriptsGridView.Rows.AsParallel().Cast<DataGridViewRow>()
.Where(
topScriptsRow =>
@@ -961,9 +936,9 @@
TopScriptsGridView.Rows.RemoveAt(index);
}
// Now update or add new data.
foreach (List<string> dataComponents in data.Where(q => q.Count.Equals(5)))
foreach (var dataComponents in data.Where(q => q.Count.Equals(5)))
{
DataGridViewRow row =
var row =
TopScriptsGridView.Rows.AsParallel()
.Cast<DataGridViewRow>()
.FirstOrDefault(q => q.Cells["TopScriptsUUID"].Value.Equals(dataComponents[2]));
@@ -985,7 +960,7 @@
}));
 
// Get the top colliders.
result = wasPOST(vassalConfiguration.HTTPServerURL,
result = Encoding.UTF8.GetString(HTTPClient.POST(vassalConfiguration.HTTPServerURL,
KeyValue.Escape(new Dictionary<string, string>
{
{"command", "getregiontop"},
@@ -992,7 +967,7 @@
{"group", vassalConfiguration.Group},
{"password", vassalConfiguration.Password},
{"type", "colliders"}
}, wasOutput), vassalConfiguration.DataTimeout);
}, wasOutput)).Result);
 
if (string.IsNullOrEmpty(result) ||
!bool.TryParse(wasInput(KeyValue.Get("success", result)), out success))
@@ -1009,7 +984,7 @@
{
// Remove rows that are not in the data update.
foreach (
int index in
var index in
TopCollidersGridView.Rows.AsParallel().Cast<DataGridViewRow>()
.Where(
topCollidersRow =>
@@ -1019,9 +994,9 @@
TopCollidersGridView.Rows.RemoveAt(index);
}
// Now update or add new data.
foreach (List<string> dataComponents in data.Where(q => q.Count.Equals(5)))
foreach (var dataComponents in data.Where(q => q.Count.Equals(5)))
{
DataGridViewRow row =
var row =
TopCollidersGridView.Rows.AsParallel()
.Cast<DataGridViewRow>()
.FirstOrDefault(q => q.Cells["TopCollidersUUID"].Value.Equals(dataComponents[2]));
@@ -1055,7 +1030,7 @@
residentListTabTimer.Elapsed += (o, p) =>
{
// Do not do anything in case the tab is not selected.
bool run = false;
var run = false;
vassalForm.Invoke((MethodInvoker) (() => { run = Tabs.SelectedTab.Equals(ResidentListTab); }));
 
if (!run)
@@ -1069,7 +1044,7 @@
try
{
// Get the avatar positions.
string result = wasPOST(vassalConfiguration.HTTPServerURL,
var result = Encoding.UTF8.GetString(HTTPClient.POST(vassalConfiguration.HTTPServerURL,
KeyValue.Escape(new Dictionary<string, string>
{
{"command", "getavatarpositions"},
@@ -1076,7 +1051,7 @@
{"group", vassalConfiguration.Group},
{"password", vassalConfiguration.Password},
{"entity", "region"}
}, wasOutput), vassalConfiguration.DataTimeout);
}, wasOutput)).Result);
 
bool success;
if (string.IsNullOrEmpty(result) ||
@@ -1083,7 +1058,7 @@
!bool.TryParse(wasInput(KeyValue.Get("success", result)), out success))
throw new Exception();
 
HashSet<List<string>> data =
var data =
new HashSet<List<string>>(CSV.ToEnumerable(wasInput(KeyValue.Get("data", result)))
.Select((x, i) => new {Index = i, Value = x})
.GroupBy(x => x.Index/3)
@@ -1095,7 +1070,7 @@
{
// Remove rows that are not in the data update.
foreach (
int index in
var index in
ResidentListGridView.Rows.AsParallel().Cast<DataGridViewRow>()
.Where(
residentListRow =>
@@ -1105,9 +1080,9 @@
ResidentListGridView.Rows.RemoveAt(index);
}
// Now update or add new data.
foreach (List<string> dataComponents in data.Where(q => q.Count.Equals(3)))
foreach (var dataComponents in data.Where(q => q.Count.Equals(3)))
{
DataGridViewRow row =
var row =
ResidentListGridView.Rows.AsParallel()
.Cast<DataGridViewRow>()
.FirstOrDefault(q => q.Cells["ResidentListUUID"].Value.Equals(dataComponents[1]));
@@ -1137,7 +1112,7 @@
estateTexturesTabTimer.Elapsed += (o, p) =>
{
// Do not do anything in case the tab is not selected.
bool run = false;
var run = false;
vassalForm.Invoke((MethodInvoker) (() => { run = Tabs.SelectedTab.Equals(EstateTexturesTab); }));
 
if (!run)
@@ -1151,13 +1126,13 @@
try
{
// Get the region terrain texture UUIDs.
string result = wasPOST(vassalConfiguration.HTTPServerURL,
var result = Encoding.UTF8.GetString(HTTPClient.POST(vassalConfiguration.HTTPServerURL,
KeyValue.Escape(new Dictionary<string, string>
{
{"command", "getregionterraintextures"},
{"group", vassalConfiguration.Group},
{"password", vassalConfiguration.Password}
}, wasOutput), vassalConfiguration.DataTimeout);
}, wasOutput)).Result);
 
bool success;
if (string.IsNullOrEmpty(result) ||
@@ -1164,7 +1139,7 @@
!bool.TryParse(wasInput(KeyValue.Get("success", result)), out success))
throw new Exception();
 
List<string> data = CSV.ToEnumerable(wasInput(KeyValue.Get("data", result))).ToList();
var data = CSV.ToEnumerable(wasInput(KeyValue.Get("data", result))).ToList();
if (!data.Count.Equals(4))
throw new Exception();
 
@@ -1194,7 +1169,7 @@
 
Parallel.ForEach(Enumerable.Range(0, 4), i =>
{
result = wasPOST(vassalConfiguration.HTTPServerURL,
result = Encoding.UTF8.GetString(HTTPClient.POST(vassalConfiguration.HTTPServerURL,
KeyValue.Escape(new Dictionary<string, string>
{
{"command", "download"},
@@ -1203,14 +1178,14 @@
{"item", data[i]},
{"type", "Texture"},
{"format", "Jpeg"}
}, wasOutput), vassalConfiguration.DataTimeout);
}, wasOutput)).Result);
 
if (string.IsNullOrEmpty(result) ||
!bool.TryParse(wasInput(KeyValue.Get("success", result)), out success))
return;
 
byte[] mapImageBytes = Convert.FromBase64String(wasInput(KeyValue.Get("data", result)));
using (MemoryStream memoryStream = new MemoryStream(mapImageBytes, 0, mapImageBytes.Length))
var mapImageBytes = Convert.FromBase64String(wasInput(KeyValue.Get("data", result)));
using (var memoryStream = new MemoryStream(mapImageBytes, 0, mapImageBytes.Length))
{
groundTextureImages[i] = Image.FromStream(memoryStream);
}
@@ -1255,7 +1230,7 @@
{
// Clear any selection.
LoadedRegionsBox.SelectedIndex = -1;
RegionEditForm regionEditForm = new RegionEditForm {TopMost = true};
var regionEditForm = new RegionEditForm {TopMost = true};
regionEditForm.Show();
}
 
@@ -1271,7 +1246,7 @@
switch (vassalForm.ExportCSVDialog.ShowDialog())
{
case DialogResult.OK:
string file = vassalForm.ExportCSVDialog.FileName;
var file = vassalForm.ExportCSVDialog.FileName;
new Thread(() =>
{
vassalForm.BeginInvoke((MethodInvoker) (() =>
@@ -1281,7 +1256,7 @@
vassalForm.StatusText.Text = @"exporting...";
vassalForm.StatusProgress.Value = 0;
 
using (StreamWriter streamWriter = new StreamWriter(file, false, Encoding.UTF8))
using (var streamWriter = new StreamWriter(file, false, Encoding.UTF8))
{
foreach (DataGridViewRow topScriptsRow in TopScriptsGridView.Rows)
{
@@ -1318,7 +1293,7 @@
switch (vassalForm.ExportCSVDialog.ShowDialog())
{
case DialogResult.OK:
string file = vassalForm.ExportCSVDialog.FileName;
var file = vassalForm.ExportCSVDialog.FileName;
new Thread(() =>
{
vassalForm.BeginInvoke((MethodInvoker) (() =>
@@ -1328,7 +1303,7 @@
vassalForm.StatusText.Text = @"exporting...";
vassalForm.StatusProgress.Value = 0;
 
using (StreamWriter streamWriter = new StreamWriter(file, false, Encoding.UTF8))
using (var streamWriter = new StreamWriter(file, false, Encoding.UTF8))
{
foreach (DataGridViewRow topCollidersRow in TopCollidersGridView.Rows)
{
@@ -1372,7 +1347,7 @@
topScriptsRowRegex = new Regex(@".+?", RegexOptions.Compiled);
break;
}
foreach (DataGridViewRow topScriptsRow in TopScriptsGridView.Rows.AsParallel().Cast<DataGridViewRow>())
foreach (var topScriptsRow in TopScriptsGridView.Rows.AsParallel().Cast<DataGridViewRow>())
{
topScriptsRow.Visible =
topScriptsRowRegex.IsMatch(topScriptsRow.Cells["TopScriptsScore"].Value.ToString()) ||
@@ -1401,7 +1376,7 @@
break;
}
foreach (
DataGridViewRow topCollidersRow in TopCollidersGridView.Rows.AsParallel().Cast<DataGridViewRow>())
var topCollidersRow in TopCollidersGridView.Rows.AsParallel().Cast<DataGridViewRow>())
{
topCollidersRow.Visible =
topCollidersRowRegex.IsMatch(topCollidersRow.Cells["TopCollidersScore"].Value.ToString()) ||
@@ -1425,11 +1400,11 @@
}));
 
// Enqueue all the UUIDs to return.
Queue<KeyValuePair<UUID, Vector3>> returnUUIDs = new Queue<KeyValuePair<UUID, Vector3>>();
var returnUUIDs = new Queue<KeyValuePair<UUID, Vector3>>();
vassalForm.Invoke((MethodInvoker) (() =>
{
foreach (
DataGridViewRow topScriptsRow in
var topScriptsRow in
TopScriptsGridView.Rows.AsParallel()
.Cast<DataGridViewRow>()
.Where(o => o.Selected || o.Cells.Cast<DataGridViewCell>().Any(p => p.Selected)))
@@ -1461,21 +1436,21 @@
try
{
vassalForm.Invoke((MethodInvoker) (() => { vassalForm.StatusProgress.Value = 0; }));
int totalObjects = returnUUIDs.Count;
var totalObjects = returnUUIDs.Count;
do
{
// Dequeue the first object.
KeyValuePair<UUID, Vector3> objectData = returnUUIDs.Dequeue();
var objectData = returnUUIDs.Dequeue();
 
vassalForm.Invoke(
(MethodInvoker)
(() => { vassalForm.StatusText.Text = @"Returning object UUID: " + objectData.Key; }));
 
string currentRegionName = string.Empty;
var currentRegionName = string.Empty;
vassalForm.Invoke((MethodInvoker) (() => { currentRegionName = CurrentRegionName.Text; }));
 
// Teleport to the object.
string result = wasPOST(vassalConfiguration.HTTPServerURL,
var result = Encoding.UTF8.GetString(HTTPClient.POST(vassalConfiguration.HTTPServerURL,
KeyValue.Escape(new Dictionary<string, string>
{
{"command", "teleport"},
@@ -1484,7 +1459,7 @@
{"position", objectData.Value.ToString()},
{"region", currentRegionName},
{"fly", "True"}
}, wasOutput), vassalConfiguration.TeleportTimeout);
}, wasOutput)).Result);
 
if (string.IsNullOrEmpty(result))
{
@@ -1495,7 +1470,7 @@
}
 
// Return the object.
result = wasPOST(vassalConfiguration.HTTPServerURL,
result = Encoding.UTF8.GetString(HTTPClient.POST(vassalConfiguration.HTTPServerURL,
KeyValue.Escape(new Dictionary<string, string>
{
{"command", "derez"},
@@ -1504,7 +1479,7 @@
{"item", objectData.Key.ToString()},
{"range", "32"}, // maximal prim size = 64 - middle bounding box at half
{"type", "ReturnToOwner"}
}, wasOutput), vassalConfiguration.DataTimeout);
}, wasOutput)).Result);
 
if (string.IsNullOrEmpty(result))
{
@@ -1530,13 +1505,13 @@
{
vassalForm.StatusText.Text = @"Returned object: " + objectData.Key;
// Remove the row from the grid view.
DataGridViewRow row =
var row =
TopScriptsGridView.Rows.AsParallel()
.Cast<DataGridViewRow>()
.FirstOrDefault(
o => o.Cells["TopScriptsUUID"].Value.Equals(objectData.Key.ToString()));
if (row == null) return;
int i = row.Index;
var i = row.Index;
TopScriptsGridView.Rows.RemoveAt(i);
}));
break;
@@ -1586,11 +1561,11 @@
}));
 
// Enqueue all the UUIDs to return.
Queue<KeyValuePair<UUID, Vector3>> returnObjectUUIDQueue = new Queue<KeyValuePair<UUID, Vector3>>();
var returnObjectUUIDQueue = new Queue<KeyValuePair<UUID, Vector3>>();
vassalForm.Invoke((MethodInvoker) (() =>
{
foreach (
DataGridViewRow topCollidersRow in
var topCollidersRow in
TopCollidersGridView.Rows.AsParallel()
.Cast<DataGridViewRow>()
.Where(o => o.Selected || o.Cells.Cast<DataGridViewCell>().Any(p => p.Selected)))
@@ -1623,21 +1598,21 @@
try
{
vassalForm.Invoke((MethodInvoker) (() => { vassalForm.StatusProgress.Value = 0; }));
int totalObjects = returnObjectUUIDQueue.Count;
var totalObjects = returnObjectUUIDQueue.Count;
do
{
// Dequeue the first object.
KeyValuePair<UUID, Vector3> objectData = returnObjectUUIDQueue.Dequeue();
var objectData = returnObjectUUIDQueue.Dequeue();
 
vassalForm.Invoke(
(MethodInvoker)
(() => { vassalForm.StatusText.Text = @"Returning UUID: " + objectData.Key; }));
 
string currentRegionName = string.Empty;
var currentRegionName = string.Empty;
vassalForm.Invoke((MethodInvoker) (() => { currentRegionName = CurrentRegionName.Text; }));
 
// Teleport to the object.
string result = wasPOST(vassalConfiguration.HTTPServerURL,
var result = Encoding.UTF8.GetString(HTTPClient.POST(vassalConfiguration.HTTPServerURL,
KeyValue.Escape(new Dictionary<string, string>
{
{"command", "teleport"},
@@ -1646,7 +1621,7 @@
{"position", objectData.Value.ToString()},
{"region", currentRegionName},
{"fly", "True"}
}, wasOutput), vassalConfiguration.DataTimeout);
}, wasOutput)).Result);
 
if (string.IsNullOrEmpty(result))
{
@@ -1657,7 +1632,7 @@
}
 
// Return the object.
result = wasPOST(vassalConfiguration.HTTPServerURL,
result = Encoding.UTF8.GetString(HTTPClient.POST(vassalConfiguration.HTTPServerURL,
KeyValue.Escape(new Dictionary<string, string>
{
{"command", "derez"},
@@ -1666,7 +1641,7 @@
{"item", objectData.Key.ToString()},
{"range", "32"}, // maximal prim size = 64 - middle bounding box at half
{"type", "ReturnToOwner"}
}, wasOutput), vassalConfiguration.DataTimeout);
}, wasOutput)).Result);
 
if (string.IsNullOrEmpty(result))
{
@@ -1692,13 +1667,13 @@
{
vassalForm.StatusText.Text = @"Returned object: " + objectData.Key;
// Remove the row from the grid view.
DataGridViewRow row =
var row =
TopCollidersGridView.Rows.AsParallel()
.Cast<DataGridViewRow>()
.FirstOrDefault(
o => o.Cells["TopCollidersUUID"].Value.Equals(objectData.Key.ToString()));
if (row == null) return;
int i = row.Index;
var i = row.Index;
TopCollidersGridView.Rows.RemoveAt(i);
}));
break;
@@ -1745,21 +1720,22 @@
vassalForm.Invoke((MethodInvoker) (() =>
{
vassalForm.BatchRestartButton.Enabled = false;
vassalForm.RegionRestartDelayBox.Enabled = false;
RegionTeleportGroup.Enabled = false;
}));
 
// Enqueue all the regions to restart.
Queue<KeyValuePair<string, Vector3>> restartRegionQueue = new Queue<KeyValuePair<string, Vector3>>();
var restartRegionQueue = new Queue<KeyValuePair<string, Vector3>>();
vassalForm.Invoke((MethodInvoker) (() =>
{
foreach (
DataGridViewRow topCollidersRow in
var topCollidersRow in
BatchRestartGridView.Rows.AsParallel()
.Cast<DataGridViewRow>()
.Where(o => o.Selected || o.Cells.Cast<DataGridViewCell>().Any(p => p.Selected)))
{
Vector3 objectPosition;
string regionName = topCollidersRow.Cells["BatchRestartRegionName"].Value.ToString();
var regionName = topCollidersRow.Cells["BatchRestartRegionName"].Value.ToString();
if (string.IsNullOrEmpty(regionName) ||
!Vector3.TryParse(topCollidersRow.Cells["BatchRestartPosition"].Value.ToString(),
out objectPosition))
@@ -1774,6 +1750,7 @@
vassalForm.Invoke((MethodInvoker) (() =>
{
vassalForm.BatchRestartButton.Enabled = true;
vassalForm.RegionRestartDelayBox.Enabled = true;
RegionTeleportGroup.Enabled = true;
}));
return;
@@ -1788,7 +1765,7 @@
do
{
// Dequeue the first object.
KeyValuePair<string, Vector3> restartRegionData = restartRegionQueue.Dequeue();
var restartRegionData = restartRegionQueue.Dequeue();
DataGridViewRow currentDataGridViewRow = null;
vassalForm.Invoke((MethodInvoker) (() =>
{
@@ -1807,11 +1784,11 @@
 
try
{
bool success = false;
var success = false;
string result;
 
// Retry to teleport to each region a few times.
int teleportRetries = 3;
var teleportRetries = 3;
do
{
vassalForm.Invoke((MethodInvoker) (() =>
@@ -1823,7 +1800,7 @@
}));
 
// Teleport to the region.
result = wasPOST(vassalConfiguration.HTTPServerURL,
result = Encoding.UTF8.GetString(HTTPClient.POST(vassalConfiguration.HTTPServerURL,
KeyValue.Escape(new Dictionary<string, string>
{
{"command", "teleport"},
@@ -1832,7 +1809,7 @@
{"position", restartRegionData.Value.ToString()},
{"region", restartRegionData.Key},
{"fly", "True"}
}, wasOutput), vassalConfiguration.DataTimeout);
}, wasOutput)).Result);
 
if (string.IsNullOrEmpty(result))
{
@@ -1888,7 +1865,7 @@
if (!success)
throw new Exception("Failed to teleport to region.");
 
result = wasPOST(vassalConfiguration.HTTPServerURL,
result = Encoding.UTF8.GetString(HTTPClient.POST(vassalConfiguration.HTTPServerURL,
KeyValue.Escape(new Dictionary<string, string>
{
{"command", "getregiondata"},
@@ -1895,7 +1872,7 @@
{"group", vassalConfiguration.Group},
{"password", vassalConfiguration.Password},
{"data", "IsEstateManager"}
}, wasOutput), vassalConfiguration.DataTimeout);
}, wasOutput)).Result);
 
if (string.IsNullOrEmpty(result))
throw new Exception("Error communicating with Corrade.");
@@ -1906,7 +1883,7 @@
if (!success)
throw new Exception("Could not retrieve estate rights.");
 
List<string> data = CSV.ToEnumerable(wasInput(KeyValue.Get("data", result))).ToList();
var data = CSV.ToEnumerable(wasInput(KeyValue.Get("data", result))).ToList();
if (!data.Count.Equals(2))
throw new Exception("Could not retrieve estate rights.");
 
@@ -1916,7 +1893,7 @@
isEstateManager)
{
case true: // we are an estate manager
result = wasPOST(vassalConfiguration.HTTPServerURL,
result = Encoding.UTF8.GetString(HTTPClient.POST(vassalConfiguration.HTTPServerURL,
KeyValue.Escape(new Dictionary<string, string>
{
{"command", "restartregion"},
@@ -1925,9 +1902,9 @@
{"action", "restart"},
{
"delay",
vassalConfiguration.RegionRestartDelay.ToString(Utils.EnUsCulture)
vassalForm.RegionRestartDelayBox.Text
}
}, wasOutput), vassalConfiguration.DataTimeout);
}, wasOutput)).Result);
 
if (string.IsNullOrEmpty(result))
throw new Exception("Error communicating with Corrade.");
@@ -1944,7 +1921,7 @@
currentDataGridViewRow.Selected = false;
currentDataGridViewRow.DefaultCellStyle.BackColor = Color.LightGreen;
foreach (
DataGridViewCell cell in
var cell in
currentDataGridViewRow.Cells.AsParallel().Cast<DataGridViewCell>())
{
cell.ToolTipText = @"Region scheduled for restart.";
@@ -1963,7 +1940,7 @@
currentDataGridViewRow.Selected = false;
currentDataGridViewRow.DefaultCellStyle.BackColor = Color.LightPink;
foreach (
DataGridViewCell cell in
var cell in
currentDataGridViewRow.Cells.AsParallel().Cast<DataGridViewCell>())
{
cell.ToolTipText = ex.Message;
@@ -1987,6 +1964,7 @@
vassalForm.BeginInvoke((MethodInvoker) (() =>
{
vassalForm.BatchRestartButton.Enabled = true;
vassalForm.RegionRestartDelayBox.Enabled = true;
RegionTeleportGroup.Enabled = true;
}));
}
@@ -2009,7 +1987,7 @@
break;
}
foreach (
DataGridViewRow residentListRow in ResidentListGridView.Rows.AsParallel().Cast<DataGridViewRow>())
var residentListRow in ResidentListGridView.Rows.AsParallel().Cast<DataGridViewRow>())
{
residentListRow.Visible =
residentListRowRegex.IsMatch(residentListRow.Cells["ResidentListName"].Value.ToString()) ||
@@ -2031,11 +2009,11 @@
}));
 
// Enqueue all the agents to ban.
Queue<UUID> agentsQueue = new Queue<UUID>();
var agentsQueue = new Queue<UUID>();
vassalForm.Invoke((MethodInvoker) (() =>
{
foreach (
DataGridViewRow residentListRow in
var residentListRow in
ResidentListGridView.Rows.AsParallel()
.Cast<DataGridViewRow>()
.Where(o => o.Selected || o.Cells.Cast<DataGridViewCell>().Any(p => p.Selected)))
@@ -2066,7 +2044,7 @@
do
{
// Dequeue the first object.
UUID agentUUID = agentsQueue.Dequeue();
var agentUUID = agentsQueue.Dequeue();
DataGridViewRow currentDataGridViewRow = null;
vassalForm.Invoke((MethodInvoker) (() =>
{
@@ -2082,12 +2060,12 @@
 
try
{
bool alsoBan = false;
var alsoBan = false;
vassalForm.Invoke(
(MethodInvoker) (() => { alsoBan = vassalForm.ResidentBanAllEstatesBox.Checked; }));
 
// Ban the resident.
string result = wasPOST(vassalConfiguration.HTTPServerURL,
var result = Encoding.UTF8.GetString(HTTPClient.POST(vassalConfiguration.HTTPServerURL,
KeyValue.Escape(new Dictionary<string, string>
{
{"command", "setestatelist"},
@@ -2097,7 +2075,7 @@
{"action", "add"},
{"agent", agentUUID.ToString()},
{"all", alsoBan.ToString()}
}, wasOutput), vassalConfiguration.DataTimeout);
}, wasOutput)).Result);
 
if (string.IsNullOrEmpty(result))
throw new Exception("Error communicating with Corrade.");
@@ -2115,7 +2093,7 @@
currentDataGridViewRow.Selected = false;
currentDataGridViewRow.DefaultCellStyle.BackColor = Color.LightGreen;
foreach (
DataGridViewCell cell in
var cell in
currentDataGridViewRow.Cells.AsParallel().Cast<DataGridViewCell>())
{
cell.ToolTipText = @"Resident banned.";
@@ -2134,7 +2112,7 @@
currentDataGridViewRow.Selected = false;
currentDataGridViewRow.DefaultCellStyle.BackColor = Color.LightPink;
foreach (
DataGridViewCell cell in
var cell in
currentDataGridViewRow.Cells.AsParallel().Cast<DataGridViewCell>())
{
cell.ToolTipText = ex.Message;
@@ -2177,7 +2155,7 @@
try
{
// Get the map heights.
string result = wasPOST(vassalConfiguration.HTTPServerURL,
var result = Encoding.UTF8.GetString(HTTPClient.POST(vassalConfiguration.HTTPServerURL,
KeyValue.Escape(new Dictionary<string, string>
{
{"command", "getterrainheight"},
@@ -2184,7 +2162,7 @@
{"group", vassalConfiguration.Group},
{"password", vassalConfiguration.Password},
{"entity", "region"}
}, wasOutput), vassalConfiguration.DataTimeout);
}, wasOutput)).Result);
 
if (string.IsNullOrEmpty(result))
throw new Exception("Error communicating with Corrade.");
@@ -2196,8 +2174,8 @@
if (!success)
throw new Exception("Could not get terrain heights.");
 
List<double> heights = new List<double>();
foreach (string map in CSV.ToEnumerable(wasInput(KeyValue.Get("data", result))))
var heights = new List<double>();
foreach (var map in CSV.ToEnumerable(wasInput(KeyValue.Get("data", result))))
{
double height;
if (!double.TryParse(map, out height))
@@ -2207,12 +2185,12 @@
if (heights.Count.Equals(0))
throw new Exception("Could not get terrain heights.");
 
double maxHeight = heights.Max();
using (Bitmap bitmap = new Bitmap(256, 256))
var maxHeight = heights.Max();
using (var bitmap = new Bitmap(256, 256))
{
foreach (int x in Enumerable.Range(1, 255))
foreach (var x in Enumerable.Range(1, 255))
{
foreach (int y in Enumerable.Range(1, 255))
foreach (var y in Enumerable.Range(1, 255))
{
bitmap.SetPixel(x, 256 - y,
Color.FromArgb(
@@ -2221,13 +2199,13 @@
0, 0));
}
}
Bitmap closureBitmap = (Bitmap) bitmap.Clone();
var closureBitmap = (Bitmap) bitmap.Clone();
vassalForm.BeginInvoke((MethodInvoker) (() =>
{
switch (vassalForm.SavePNGFileDialog.ShowDialog())
{
case DialogResult.OK:
string file = vassalForm.SavePNGFileDialog.FileName;
var file = vassalForm.SavePNGFileDialog.FileName;
new Thread(() =>
{
vassalForm.BeginInvoke((MethodInvoker) (() =>
@@ -2290,7 +2268,7 @@
try
{
// Download the terrain.
string result = wasPOST(vassalConfiguration.HTTPServerURL,
var result = Encoding.UTF8.GetString(HTTPClient.POST(vassalConfiguration.HTTPServerURL,
KeyValue.Escape(new Dictionary<string, string>
{
{"command", "terrain"},
@@ -2297,7 +2275,7 @@
{"group", vassalConfiguration.Group},
{"password", vassalConfiguration.Password},
{"action", "get"}
}, wasOutput), vassalConfiguration.DataTimeout);
}, wasOutput)).Result);
 
if (string.IsNullOrEmpty(result))
throw new Exception("Error communicating with Corrade.");
@@ -2309,7 +2287,7 @@
if (!success)
throw new Exception("Could not download terrain.");
 
byte[] data = Convert.FromBase64String(wasInput(KeyValue.Get("data", result)));
var data = Convert.FromBase64String(wasInput(KeyValue.Get("data", result)));
 
vassalForm.BeginInvoke((MethodInvoker) (() =>
{
@@ -2316,7 +2294,7 @@
switch (vassalForm.SaveRawFileDialog.ShowDialog())
{
case DialogResult.OK:
string file = vassalForm.SaveRawFileDialog.FileName;
var file = vassalForm.SaveRawFileDialog.FileName;
new Thread(() =>
{
vassalForm.BeginInvoke((MethodInvoker) (() =>
@@ -2380,7 +2358,7 @@
switch (vassalForm.LoadRawFileDialog.ShowDialog())
{
case DialogResult.OK:
string file = vassalForm.LoadRawFileDialog.FileName;
var file = vassalForm.LoadRawFileDialog.FileName;
vassalForm.StatusText.Text = @"loading terrain...";
vassalForm.StatusProgress.Value = 0;
 
@@ -2393,7 +2371,7 @@
}));
 
// Upload the terrain.
string result = wasPOST(vassalConfiguration.HTTPServerURL,
var result = Encoding.UTF8.GetString(HTTPClient.POST(vassalConfiguration.HTTPServerURL,
KeyValue.Escape(new Dictionary<string, string>
{
{"command", "terrain"},
@@ -2401,7 +2379,7 @@
{"password", vassalConfiguration.Password},
{"action", "set"},
{"data", Convert.ToBase64String(data)}
}, wasOutput), vassalConfiguration.DataTimeout);
}, wasOutput)).Result);
 
if (string.IsNullOrEmpty(result))
throw new Exception("Error communicating with Corrade.");
@@ -2480,7 +2458,7 @@
estateListRowRegex = new Regex(@".+?", RegexOptions.Compiled);
break;
}
foreach (DataGridViewRow estateListRow in EstateListGridView.Rows.AsParallel().Cast<DataGridViewRow>())
foreach (var estateListRow in EstateListGridView.Rows.AsParallel().Cast<DataGridViewRow>())
{
estateListRow.Visible =
estateListRowRegex.IsMatch(estateListRow.Cells["EstateListName"].Value.ToString());
@@ -2490,8 +2468,8 @@
 
private void EstateListSelected(object sender, EventArgs e)
{
string selectedEstateListType = string.Empty;
bool queryEstateList = false;
var selectedEstateListType = string.Empty;
var queryEstateList = false;
vassalForm.Invoke((MethodInvoker) (() =>
{
if (vassalForm.EstateListSelectBox.SelectedItem == null) return;
@@ -2527,7 +2505,7 @@
}));
 
// Get the selected estate list.
string result = wasPOST(vassalConfiguration.HTTPServerURL,
var result = Encoding.UTF8.GetString(HTTPClient.POST(vassalConfiguration.HTTPServerURL,
KeyValue.Escape(new Dictionary<string, string>
{
{"command", "getestatelist"},
@@ -2534,7 +2512,7 @@
{"group", vassalConfiguration.Group},
{"password", vassalConfiguration.Password},
{"type", selectedEstateListType}
}, wasOutput), vassalConfiguration.DataTimeout);
}, wasOutput)).Result);
 
if (string.IsNullOrEmpty(result))
throw new Exception("Error communicating with Corrade.");
@@ -2547,7 +2525,7 @@
throw new Exception("Could not retrieve estate list.");
 
vassalForm.Invoke((MethodInvoker) (() => { EstateListGridView.Rows.Clear(); }));
foreach (List<string> data in CSV.ToEnumerable(wasInput(KeyValue.Get("data", result)))
foreach (var data in CSV.ToEnumerable(wasInput(KeyValue.Get("data", result)))
.Where(x => !string.IsNullOrEmpty(x))
.Select((x, i) => new {Index = i, Value = x})
.GroupBy(x => x.Index/2)
@@ -2591,8 +2569,8 @@
private void RequestRemoveEstateListMember(object sender, EventArgs e)
{
// Get the estate list type.
string selectedEstateListType = string.Empty;
bool queryEstateList = false;
var selectedEstateListType = string.Empty;
var queryEstateList = false;
vassalForm.Invoke((MethodInvoker) (() =>
{
if (vassalForm.EstateListSelectBox.SelectedItem == null)
@@ -2617,11 +2595,11 @@
if (!queryEstateList) return;
 
// Enqueue all the regions to restart.
Queue<UUID> estateListMembersQueue = new Queue<UUID>();
var estateListMembersQueue = new Queue<UUID>();
vassalForm.Invoke((MethodInvoker) (() =>
{
foreach (
DataGridViewRow estateListRow in
var estateListRow in
EstateListGridView.Rows.AsParallel()
.Cast<DataGridViewRow>()
.Where(o => o.Selected || o.Cells.Cast<DataGridViewCell>().Any(p => p.Selected)))
@@ -2649,7 +2627,7 @@
try
{
Monitor.Enter(ClientInstanceTeleportLock);
UUID memberUUID = UUID.Zero;
var memberUUID = UUID.Zero;
do
{
try
@@ -2657,7 +2635,7 @@
memberUUID = estateListMembersQueue.Dequeue();
 
// Remove the agent or group from the list.
string result = wasPOST(vassalConfiguration.HTTPServerURL,
var result = Encoding.UTF8.GetString(HTTPClient.POST(vassalConfiguration.HTTPServerURL,
KeyValue.Escape(new Dictionary<string, string>
{
{"command", "setestatelist"},
@@ -2666,7 +2644,7 @@
{"type", selectedEstateListType},
{"action", "remove"},
{selectedEstateListType.Equals("group") ? "target" : "agent", memberUUID.ToString()}
}, wasOutput), vassalConfiguration.DataTimeout);
}, wasOutput)).Result);
 
if (string.IsNullOrEmpty(result))
throw new Exception("Error communicating with Corrade");
@@ -2681,7 +2659,7 @@
vassalForm.Invoke((MethodInvoker) (() =>
{
foreach (
int i in
var i in
EstateListGridView.Rows.AsParallel()
.Cast<DataGridViewRow>()
.Where(
@@ -2722,8 +2700,8 @@
private void RequestEstateListsAddResident(object sender, EventArgs e)
{
// Get the estate list type.
string selectedEstateListType = string.Empty;
bool queryEstateList = false;
var selectedEstateListType = string.Empty;
var queryEstateList = false;
vassalForm.Invoke((MethodInvoker) (() =>
{
selectedEstateListType = vassalForm.EstateListSelectBox.SelectedItem.ToString();
@@ -2742,8 +2720,8 @@
// If not estate list type is selected then return.
if (!queryEstateList) return;
 
string firstName = string.Empty;
string lastName = string.Empty;
var firstName = string.Empty;
var lastName = string.Empty;
 
vassalForm.Invoke((MethodInvoker) (() =>
{
@@ -2785,7 +2763,7 @@
Monitor.Enter(ClientInstanceTeleportLock);
 
// Add the resident to the list.
string result = wasPOST(vassalConfiguration.HTTPServerURL,
var result = Encoding.UTF8.GetString(HTTPClient.POST(vassalConfiguration.HTTPServerURL,
KeyValue.Escape(new Dictionary<string, string>
{
{"command", "setestatelist"},
@@ -2795,7 +2773,7 @@
{"action", "add"},
{"firstname", firstName},
{"lastname", lastName}
}, wasOutput), vassalConfiguration.DataTimeout);
}, wasOutput)).Result);
 
if (string.IsNullOrEmpty(result))
throw new Exception("Error communicating with Corrade");
@@ -2808,7 +2786,7 @@
throw new Exception("Unable to add resident");
 
// Retrieve the estate list for updates.
result = wasPOST(vassalConfiguration.HTTPServerURL,
result = Encoding.UTF8.GetString(HTTPClient.POST(vassalConfiguration.HTTPServerURL,
KeyValue.Escape(new Dictionary<string, string>
{
{"command", "getestatelist"},
@@ -2815,7 +2793,7 @@
{"group", vassalConfiguration.Group},
{"password", vassalConfiguration.Password},
{"type", selectedEstateListType}
}, wasOutput), vassalConfiguration.DataTimeout);
}, wasOutput)).Result);
 
if (string.IsNullOrEmpty(result))
throw new Exception("Error communicating with Corrade.");
@@ -2827,7 +2805,7 @@
throw new Exception("Could not retrieve estate list.");
 
vassalForm.Invoke((MethodInvoker) (() => { EstateListGridView.Rows.Clear(); }));
foreach (List<string> data in CSV.ToEnumerable(wasInput(KeyValue.Get("data", result)))
foreach (var data in CSV.ToEnumerable(wasInput(KeyValue.Get("data", result)))
.Where(x => !string.IsNullOrEmpty(x))
.Select((x, i) => new {Index = i, Value = x})
.GroupBy(x => x.Index/2)
@@ -2859,8 +2837,8 @@
private void RequestEstateListsAddGroup(object sender, EventArgs e)
{
// Get the estate list type.
string selectedEstateListType = string.Empty;
bool queryEstateList = false;
var selectedEstateListType = string.Empty;
var queryEstateList = false;
vassalForm.Invoke((MethodInvoker) (() =>
{
selectedEstateListType = vassalForm.EstateListSelectBox.SelectedItem.ToString();
@@ -2879,7 +2857,7 @@
// If not estate list type is selected then return.
if (!queryEstateList) return;
 
string target = string.Empty;
var target = string.Empty;
 
vassalForm.Invoke((MethodInvoker) (() =>
{
@@ -2911,7 +2889,7 @@
Monitor.Enter(ClientInstanceTeleportLock);
 
// Add the group to the list.
string result = wasPOST(vassalConfiguration.HTTPServerURL,
var result = Encoding.UTF8.GetString(HTTPClient.POST(vassalConfiguration.HTTPServerURL,
KeyValue.Escape(new Dictionary<string, string>
{
{"command", "setestatelist"},
@@ -2920,7 +2898,7 @@
{"type", selectedEstateListType},
{"action", "add"},
{"target", target}
}, wasOutput), vassalConfiguration.DataTimeout);
}, wasOutput)).Result);
 
if (string.IsNullOrEmpty(result))
throw new Exception("Error communicating with Corrade");
@@ -2933,7 +2911,7 @@
throw new Exception("Unable to add group");
 
// Retrieve the estate list for updates.
result = wasPOST(vassalConfiguration.HTTPServerURL,
result = Encoding.UTF8.GetString(HTTPClient.POST(vassalConfiguration.HTTPServerURL,
KeyValue.Escape(new Dictionary<string, string>
{
{"command", "getestatelist"},
@@ -2940,7 +2918,7 @@
{"group", vassalConfiguration.Group},
{"password", vassalConfiguration.Password},
{"type", selectedEstateListType}
}, wasOutput), vassalConfiguration.DataTimeout);
}, wasOutput)).Result);
 
if (string.IsNullOrEmpty(result))
throw new Exception("Error communicating with Corrade.");
@@ -2952,7 +2930,7 @@
throw new Exception("Could not retrieve estate list.");
 
vassalForm.Invoke((MethodInvoker) (() => { EstateListGridView.Rows.Clear(); }));
foreach (List<string> data in CSV.ToEnumerable(wasInput(KeyValue.Get("data", result)))
foreach (var data in CSV.ToEnumerable(wasInput(KeyValue.Get("data", result)))
.Where(x => !string.IsNullOrEmpty(x))
.Select((x, i) => new {Index = i, Value = x})
.GroupBy(x => x.Index/2)
@@ -2995,9 +2973,9 @@
{
Monitor.Enter(ClientInstanceTeleportLock);
 
bool scripts = false;
bool collisons = false;
bool physics = false;
var scripts = false;
var collisons = false;
var physics = false;
vassalForm.Invoke((MethodInvoker) (() =>
{
scripts = RegionDebugScriptsBox.Checked;
@@ -3006,7 +2984,7 @@
}));
 
// Set the debug settings.
string result = wasPOST(vassalConfiguration.HTTPServerURL,
var result = Encoding.UTF8.GetString(HTTPClient.POST(vassalConfiguration.HTTPServerURL,
KeyValue.Escape(new Dictionary<string, string>
{
{"command", "setregiondebug"},
@@ -3015,7 +2993,7 @@
{"scripts", scripts.ToString()},
{"collisions", collisons.ToString()},
{"physics", physics.ToString()}
}, wasOutput), vassalConfiguration.DataTimeout);
}, wasOutput)).Result);
 
if (string.IsNullOrEmpty(result))
throw new Exception("Error communicating with Corrade");
@@ -3061,17 +3039,17 @@
{
Monitor.Enter(ClientInstanceTeleportLock);
 
bool terraform = false;
bool fly = false;
bool damage = false;
bool resell = false;
bool push = false;
bool parcel = false;
bool mature = false;
var terraform = false;
var fly = false;
var damage = false;
var resell = false;
var push = false;
var parcel = false;
var mature = false;
uint agentLimit = 20;
double objectBonus = 2.0;
var objectBonus = 2.0;
 
bool run = false;
var run = false;
 
vassalForm.Invoke((MethodInvoker) (() =>
{
@@ -3108,7 +3086,7 @@
if (!run) return;
 
// Set the debug settings.
string result = wasPOST(vassalConfiguration.HTTPServerURL,
var result = Encoding.UTF8.GetString(HTTPClient.POST(vassalConfiguration.HTTPServerURL,
KeyValue.Escape(new Dictionary<string, string>
{
{"command", "setregioninfo"},
@@ -3123,7 +3101,7 @@
{"mature", mature.ToString()},
{"limit", agentLimit.ToString(Utils.EnUsCulture)},
{"bonus", objectBonus.ToString(Utils.EnUsCulture)}
}, wasOutput), vassalConfiguration.DataTimeout);
}, wasOutput)).Result);
 
if (string.IsNullOrEmpty(result))
throw new Exception("Error communicating with Corrade");
@@ -3156,7 +3134,7 @@
 
private void RequestEstateTexturesApply(object sender, EventArgs e)
{
List<UUID> groundTextureUUIDs = new List<UUID>();
var groundTextureUUIDs = new List<UUID>();
vassalForm.Invoke((MethodInvoker) (() =>
{
UUID textureUUID;
@@ -3221,7 +3199,7 @@
Monitor.Enter(ClientInstanceTeleportLock);
 
// Set the debug settings.
string result = wasPOST(vassalConfiguration.HTTPServerURL,
var result = Encoding.UTF8.GetString(HTTPClient.POST(vassalConfiguration.HTTPServerURL,
KeyValue.Escape(new Dictionary<string, string>
{
{"command", "setregionterraintextures"},
@@ -3228,7 +3206,7 @@
{"group", vassalConfiguration.Group},
{"password", vassalConfiguration.Password},
{"data", CSV.FromEnumerable(groundTextureUUIDs.Select(o => o.ToString()))}
}, wasOutput), vassalConfiguration.DataTimeout);
}, wasOutput)).Result);
 
if (string.IsNullOrEmpty(result))
throw new Exception("Error communicating with Corrade");
@@ -3261,12 +3239,12 @@
 
private void RequestDownloadRegionTexture(object sender, EventArgs e)
{
string textureName = string.Empty;
UUID textureUUID = UUID.Zero;
bool run = false;
var textureName = string.Empty;
var textureUUID = UUID.Zero;
var run = false;
vassalForm.Invoke((MethodInvoker) (() =>
{
Button button = sender as Button;
var button = sender as Button;
if (button == null)
{
run = false;
@@ -3322,7 +3300,7 @@
{
Monitor.Enter(ClientInstanceTeleportLock);
 
string result = wasPOST(vassalConfiguration.HTTPServerURL,
var result = Encoding.UTF8.GetString(HTTPClient.POST(vassalConfiguration.HTTPServerURL,
KeyValue.Escape(new Dictionary<string, string>
{
{"command", "download"},
@@ -3331,7 +3309,7 @@
{"item", textureUUID.ToString()},
{"type", "Texture"},
{"format", "Png"}
}, wasOutput), vassalConfiguration.DataTimeout);
}, wasOutput)).Result);
 
if (string.IsNullOrEmpty(result))
throw new Exception("Error communicating with Corrade");
@@ -3340,9 +3318,9 @@
if (!bool.TryParse(wasInput(KeyValue.Get("success", result)), out success))
throw new Exception("No success status could be retrieved");
 
byte[] mapImageBytes = Convert.FromBase64String(wasInput(KeyValue.Get("data", result)));
var mapImageBytes = Convert.FromBase64String(wasInput(KeyValue.Get("data", result)));
Image mapImage;
using (MemoryStream memoryStream = new MemoryStream(mapImageBytes, 0, mapImageBytes.Length))
using (var memoryStream = new MemoryStream(mapImageBytes, 0, mapImageBytes.Length))
{
mapImage = Image.FromStream(memoryStream);
}
@@ -3352,7 +3330,7 @@
switch (vassalForm.SavePNGFileDialog.ShowDialog())
{
case DialogResult.OK:
string file = vassalForm.SavePNGFileDialog.FileName;
var file = vassalForm.SavePNGFileDialog.FileName;
new Thread(() =>
{
vassalForm.BeginInvoke((MethodInvoker) (() =>
@@ -3404,8 +3382,8 @@
private void RequestEstateListsAddGroupsFromCSV(object sender, EventArgs e)
{
// Get the estate list type.
string selectedEstateListType = string.Empty;
bool queryEstateList = false;
var selectedEstateListType = string.Empty;
var queryEstateList = false;
vassalForm.Invoke((MethodInvoker) (() =>
{
if (vassalForm.EstateListSelectBox.SelectedItem == null) return;
@@ -3425,7 +3403,7 @@
// If not estate list type is selected then return.
if (!queryEstateList) return;
 
Queue<KeyValuePair<string, UUID>> targets = new Queue<KeyValuePair<string, UUID>>();
var targets = new Queue<KeyValuePair<string, UUID>>();
 
vassalForm.Invoke((MethodInvoker) (() =>
{
@@ -3432,7 +3410,7 @@
switch (vassalForm.LoadCSVFile.ShowDialog())
{
case DialogResult.OK:
string file = vassalForm.LoadCSVFile.FileName;
var file = vassalForm.LoadCSVFile.FileName;
try
{
vassalForm.StatusText.Text = @"loading group list...";
@@ -3440,7 +3418,7 @@
 
// import groups
UUID targetUUID;
foreach (KeyValuePair<string, UUID> target in
foreach (var target in
File.ReadAllLines(file)
.AsParallel()
.Select(o => new List<string>(CSV.ToEnumerable(o)))
@@ -3466,7 +3444,7 @@
}));
 
if (targets.Count.Equals(0)) return;
int initialQueueSize = targets.Count;
var initialQueueSize = targets.Count;
 
// Block teleports and disable button.
vassalForm.Invoke((MethodInvoker) (() =>
@@ -3483,7 +3461,7 @@
 
do
{
KeyValuePair<string, UUID> target = targets.Dequeue();
var target = targets.Dequeue();
 
vassalForm.Invoke((MethodInvoker) (() =>
{
@@ -3493,7 +3471,7 @@
}));
 
// Skip any items that already exist.
bool run = false;
var run = false;
vassalForm.Invoke((MethodInvoker) (() =>
{
run =
@@ -3509,7 +3487,7 @@
try
{
// Add the group to the list.
string result = wasPOST(vassalConfiguration.HTTPServerURL,
var result = Encoding.UTF8.GetString(HTTPClient.POST(vassalConfiguration.HTTPServerURL,
KeyValue.Escape(new Dictionary<string, string>
{
{"command", "setestatelist"},
@@ -3518,7 +3496,7 @@
{"type", selectedEstateListType},
{"action", "add"},
{"target", target.Value.ToString()}
}, wasOutput), vassalConfiguration.DataTimeout);
}, wasOutput)).Result);
 
if (string.IsNullOrEmpty(result))
throw new Exception("Error communicating with Corrade");
@@ -3541,7 +3519,7 @@
try
{
// Retrieve the estate list for updates.
string result = wasPOST(vassalConfiguration.HTTPServerURL,
var result = Encoding.UTF8.GetString(HTTPClient.POST(vassalConfiguration.HTTPServerURL,
KeyValue.Escape(new Dictionary<string, string>
{
{"command", "getestatelist"},
@@ -3548,7 +3526,7 @@
{"group", vassalConfiguration.Group},
{"password", vassalConfiguration.Password},
{"type", selectedEstateListType}
}, wasOutput), vassalConfiguration.DataTimeout);
}, wasOutput)).Result);
 
if (string.IsNullOrEmpty(result))
throw new Exception("Error communicating with Corrade.");
@@ -3561,7 +3539,7 @@
throw new Exception("Could not retrieve estate list.");
 
vassalForm.Invoke((MethodInvoker) (() => { EstateListGridView.Rows.Clear(); }));
foreach (List<string> data in CSV.ToEnumerable(wasInput(KeyValue.Get("data", result)))
foreach (var data in CSV.ToEnumerable(wasInput(KeyValue.Get("data", result)))
.Where(x => !string.IsNullOrEmpty(x))
.Select((x, i) => new {Index = i, Value = x})
.GroupBy(x => x.Index/2)
@@ -3597,8 +3575,8 @@
private void RequestEstateListsAddResidentsFromCSV(object sender, EventArgs e)
{
// Get the estate list type.
string selectedEstateListType = string.Empty;
bool queryEstateList = false;
var selectedEstateListType = string.Empty;
var queryEstateList = false;
vassalForm.Invoke((MethodInvoker) (() =>
{
if (vassalForm.EstateListSelectBox.SelectedItem == null) return;
@@ -3618,7 +3596,7 @@
// If not estate list type is selected then return.
if (!queryEstateList) return;
 
Queue<KeyValuePair<string, UUID>> targets = new Queue<KeyValuePair<string, UUID>>();
var targets = new Queue<KeyValuePair<string, UUID>>();
 
vassalForm.Invoke((MethodInvoker) (() =>
{
@@ -3625,7 +3603,7 @@
switch (vassalForm.LoadCSVFile.ShowDialog())
{
case DialogResult.OK:
string file = vassalForm.LoadCSVFile.FileName;
var file = vassalForm.LoadCSVFile.FileName;
try
{
vassalForm.StatusText.Text = @"loading residents list...";
@@ -3633,7 +3611,7 @@
 
// import groups
UUID targetUUID;
foreach (KeyValuePair<string, UUID> target in
foreach (var target in
File.ReadAllLines(file)
.AsParallel()
.Select(o => new List<string>(CSV.ToEnumerable(o)))
@@ -3659,7 +3637,7 @@
}));
 
if (targets.Count.Equals(0)) return;
int initialQueueSize = targets.Count;
var initialQueueSize = targets.Count;
 
// Block teleports and disable button.
vassalForm.Invoke((MethodInvoker) (() =>
@@ -3676,7 +3654,7 @@
 
do
{
KeyValuePair<string, UUID> target = targets.Dequeue();
var target = targets.Dequeue();
 
vassalForm.Invoke((MethodInvoker) (() =>
{
@@ -3686,7 +3664,7 @@
}));
 
// Skip any items that already exist.
bool run = false;
var run = false;
vassalForm.Invoke((MethodInvoker) (() =>
{
run =
@@ -3702,7 +3680,7 @@
try
{
// Add the group to the list.
string result = wasPOST(vassalConfiguration.HTTPServerURL,
var result = Encoding.UTF8.GetString(HTTPClient.POST(vassalConfiguration.HTTPServerURL,
KeyValue.Escape(new Dictionary<string, string>
{
{"command", "setestatelist"},
@@ -3711,7 +3689,7 @@
{"type", selectedEstateListType},
{"action", "add"},
{"agent", target.Value.ToString()}
}, wasOutput), vassalConfiguration.DataTimeout);
}, wasOutput)).Result);
 
if (string.IsNullOrEmpty(result))
throw new Exception("Error communicating with Corrade");
@@ -3734,7 +3712,7 @@
try
{
// Retrieve the estate list for updates.
string result = wasPOST(vassalConfiguration.HTTPServerURL,
var result = Encoding.UTF8.GetString(HTTPClient.POST(vassalConfiguration.HTTPServerURL,
KeyValue.Escape(new Dictionary<string, string>
{
{"command", "getestatelist"},
@@ -3741,7 +3719,7 @@
{"group", vassalConfiguration.Group},
{"password", vassalConfiguration.Password},
{"type", selectedEstateListType}
}, wasOutput), vassalConfiguration.DataTimeout);
}, wasOutput)).Result);
 
if (string.IsNullOrEmpty(result))
throw new Exception("Error communicating with Corrade.");
@@ -3754,7 +3732,7 @@
throw new Exception("Could not retrieve estate list.");
 
vassalForm.Invoke((MethodInvoker) (() => { EstateListGridView.Rows.Clear(); }));
foreach (List<string> data in CSV.ToEnumerable(wasInput(KeyValue.Get("data", result)))
foreach (var data in CSV.ToEnumerable(wasInput(KeyValue.Get("data", result)))
.Where(x => !string.IsNullOrEmpty(x))
.Select((x, i) => new {Index = i, Value = x})
.GroupBy(x => x.Index/2)
@@ -3794,7 +3772,7 @@
switch (vassalForm.ExportCSVDialog.ShowDialog())
{
case DialogResult.OK:
string file = vassalForm.ExportCSVDialog.FileName;
var file = vassalForm.ExportCSVDialog.FileName;
new Thread(() =>
{
vassalForm.BeginInvoke((MethodInvoker) (() =>
@@ -3804,7 +3782,7 @@
vassalForm.StatusText.Text = @"exporting...";
vassalForm.StatusProgress.Value = 0;
 
using (StreamWriter streamWriter = new StreamWriter(file, false, Encoding.UTF8))
using (var streamWriter = new StreamWriter(file, false, Encoding.UTF8))
{
foreach (DataGridViewRow estateListRow in EstateListGridView.Rows)
{
@@ -3842,11 +3820,11 @@
}));
 
// Enqueue all the agents to teleport home.
Queue<UUID> agentsQueue = new Queue<UUID>();
var agentsQueue = new Queue<UUID>();
vassalForm.Invoke((MethodInvoker) (() =>
{
foreach (
DataGridViewRow residentListRow in
var residentListRow in
ResidentListGridView.Rows.AsParallel()
.Cast<DataGridViewRow>()
.Where(o => o.Selected || o.Cells.Cast<DataGridViewCell>().Any(p => p.Selected)))
@@ -3877,7 +3855,7 @@
do
{
// Dequeue the first object.
UUID agentUUID = agentsQueue.Dequeue();
var agentUUID = agentsQueue.Dequeue();
DataGridViewRow currentDataGridViewRow = null;
vassalForm.Invoke((MethodInvoker) (() =>
{
@@ -3894,7 +3872,7 @@
try
{
// Teleport the user home.
string result = wasPOST(vassalConfiguration.HTTPServerURL,
var result = Encoding.UTF8.GetString(HTTPClient.POST(vassalConfiguration.HTTPServerURL,
KeyValue.Escape(new Dictionary<string, string>
{
{"command", "estateteleportusershome"},
@@ -3901,7 +3879,7 @@
{"group", vassalConfiguration.Group},
{"password", vassalConfiguration.Password},
{"avatars", agentUUID.ToString()}
}, wasOutput), vassalConfiguration.DataTimeout);
}, wasOutput)).Result);
 
if (string.IsNullOrEmpty(result))
throw new Exception("Error communicating with Corrade.");
@@ -3919,7 +3897,7 @@
currentDataGridViewRow.Selected = false;
currentDataGridViewRow.DefaultCellStyle.BackColor = Color.LightGreen;
foreach (
DataGridViewCell cell in
var cell in
currentDataGridViewRow.Cells.AsParallel().Cast<DataGridViewCell>())
{
cell.ToolTipText = @"Resident teleported home.";
@@ -3938,7 +3916,7 @@
currentDataGridViewRow.Selected = false;
currentDataGridViewRow.DefaultCellStyle.BackColor = Color.LightPink;
foreach (
DataGridViewCell cell in
var cell in
currentDataGridViewRow.Cells.AsParallel().Cast<DataGridViewCell>())
{
cell.ToolTipText = ex.Message;
@@ -3980,14 +3958,14 @@
{
Monitor.Enter(ClientInstanceTeleportLock);
 
int waterHeight = 10;
int terrainRaiseLimit = 100;
int terrainLowerLimit = -100;
bool useEstateSun = true;
bool fixedSun = false;
int sunPosition = 18;
var waterHeight = 10;
var terrainRaiseLimit = 100;
var terrainLowerLimit = -100;
var useEstateSun = true;
var fixedSun = false;
var sunPosition = 18;
 
bool run = false;
var run = false;
 
vassalForm.Invoke((MethodInvoker) (() =>
{
@@ -4036,7 +4014,7 @@
if (!run) return;
 
// Set the terrain variables.
string result = wasPOST(vassalConfiguration.HTTPServerURL,
var result = Encoding.UTF8.GetString(HTTPClient.POST(vassalConfiguration.HTTPServerURL,
KeyValue.Escape(new Dictionary<string, string>
{
{"command", "setregionterrainvariables"},
@@ -4048,7 +4026,7 @@
{"useestatesun", useEstateSun.ToString()},
{"fixedsun", fixedSun.ToString()},
{"sunposition", sunPosition.ToString()}
}, wasOutput), vassalConfiguration.DataTimeout);
}, wasOutput)).Result);
 
if (string.IsNullOrEmpty(result))
throw new Exception("Error communicating with Corrade");
@@ -4084,10 +4062,10 @@
// Spawn a thread to check Corrade's connection status.
new Thread(() =>
{
TcpClient tcpClient = new TcpClient();
var tcpClient = new TcpClient();
try
{
Uri uri = new Uri(vassalConfiguration.HTTPServerURL);
var uri = new Uri(vassalConfiguration.HTTPServerURL);
tcpClient.Connect(uri.Host, uri.Port);
// port open
vassalForm.BeginInvoke((MethodInvoker) (() => { vassalForm.Tabs.Enabled = true; }));
@@ -4094,8 +4072,8 @@
// set the loading spinner
if (vassalForm.RegionAvatarsMap.Image == null)
{
Assembly thisAssembly = Assembly.GetExecutingAssembly();
Stream file =
var thisAssembly = Assembly.GetExecutingAssembly();
var file =
thisAssembly.GetManifestResourceStream("Vassal.img.loading.gif");
switch (file != null)
{
@@ -4343,8 +4321,258 @@
}
}
 
#region CRYPTOGRAPHY
private void RequestBatchSetCovenant(object sender, EventArgs e)
{
// Block teleports and disable button.
vassalForm.Invoke((MethodInvoker)(() =>
{
vassalForm.BatchSetCovenantButton.Enabled = false;
vassalForm.SetCovenantNotecardUUIDBox.Enabled = false;
RegionTeleportGroup.Enabled = false;
}));
 
#endregion
// Enqueue all the regions to set covenant.
var batchSetCovenantQueue = new Queue<KeyValuePair<string, Vector3>>();
vassalForm.Invoke((MethodInvoker)(() =>
{
foreach (
var topCollidersRow in
BatchSetCovenantGridView.Rows.AsParallel()
.Cast<DataGridViewRow>()
.Where(o => o.Selected || o.Cells.Cast<DataGridViewCell>().Any(p => p.Selected)))
{
Vector3 objectPosition;
var regionName = topCollidersRow.Cells["BatchSetCovenantRegionName"].Value.ToString();
if (string.IsNullOrEmpty(regionName) ||
!Vector3.TryParse(topCollidersRow.Cells["BatchSetCovenantPosition"].Value.ToString(),
out objectPosition))
continue;
batchSetCovenantQueue.Enqueue(new KeyValuePair<string, Vector3>(regionName, objectPosition));
}
}));
 
// If no rows were selected, enable teleports, the return button and return.
if (batchSetCovenantQueue.Count.Equals(0))
{
vassalForm.Invoke((MethodInvoker)(() =>
{
vassalForm.BatchSetCovenantButton.Enabled = true;
vassalForm.SetCovenantNotecardUUIDBox.Enabled = true;
RegionTeleportGroup.Enabled = true;
}));
return;
}
 
new Thread(() =>
{
Monitor.Enter(ClientInstanceTeleportLock);
 
try
{
do
{
// Dequeue the first object.
var batchSetCovenantRegionData = batchSetCovenantQueue.Dequeue();
DataGridViewRow currentDataGridViewRow = null;
vassalForm.Invoke((MethodInvoker)(() =>
{
currentDataGridViewRow = vassalForm.BatchSetCovenantGridView.Rows.AsParallel()
.Cast<DataGridViewRow>()
.FirstOrDefault(
o =>
o.Cells["BatchSetCovenantRegionName"].Value.ToString()
.Equals(batchSetCovenantRegionData.Key, StringComparison.OrdinalIgnoreCase) &&
o.Cells["BatchSetCovenantPosition"].Value.ToString()
.Equals(batchSetCovenantRegionData.Value.ToString(),
StringComparison.OrdinalIgnoreCase));
}));
 
if (currentDataGridViewRow == null) continue;
 
try
{
var success = false;
string result;
 
// Retry to teleport to each region a few times.
var teleportRetries = 3;
do
{
vassalForm.Invoke((MethodInvoker)(() =>
{
vassalForm.StatusText.Text = @"Attempting to teleport to " + batchSetCovenantRegionData.Key +
@" " + @"(" +
teleportRetries.ToString(Utils.EnUsCulture) +
@")";
}));
 
// Teleport to the region.
result = Encoding.UTF8.GetString(HTTPClient.POST(vassalConfiguration.HTTPServerURL,
KeyValue.Escape(new Dictionary<string, string>
{
{"command", "teleport"},
{"group", vassalConfiguration.Group},
{"password", vassalConfiguration.Password},
{"position", batchSetCovenantRegionData.Value.ToString()},
{"region", batchSetCovenantRegionData.Key},
{"fly", "True"}
}, wasOutput)).Result);
 
if (string.IsNullOrEmpty(result))
{
vassalForm.Invoke(
(MethodInvoker)
(() =>
{
vassalForm.StatusText.Text = @"Error communicating with Corrade.";
}));
continue;
}
if (!bool.TryParse(wasInput(KeyValue.Get("success", result)), out success))
{
vassalForm.Invoke(
(MethodInvoker)
(() =>
{
vassalForm.StatusText.Text = @"No success status could be retrieved. ";
}));
continue;
}
switch (success)
{
case true:
vassalForm.Invoke(
(MethodInvoker)
(() => { vassalForm.StatusText.Text = @"Teleport succeeded."; }));
break;
default:
// In case the destination is to close (Corrade status code 37559),
// then we are on the same region so no need to retry.
uint status; //37559
switch (
uint.TryParse(wasInput(KeyValue.Get("status", result)), out status) &&
status.Equals(37559))
{
case true: // We are on the region already!
success = true;
break;
default:
vassalForm.Invoke(
(MethodInvoker)
(() => { vassalForm.StatusText.Text = @"Teleport failed."; }));
break;
}
break;
}
 
// Pause for teleport (10 teleports / 15s allowed).
Thread.Sleep(700);
} while (!success && !(--teleportRetries).Equals(0));
 
if (!success)
throw new Exception("Failed to teleport to region.");
 
result = Encoding.UTF8.GetString(HTTPClient.POST(vassalConfiguration.HTTPServerURL,
KeyValue.Escape(new Dictionary<string, string>
{
{"command", "getregiondata"},
{"group", vassalConfiguration.Group},
{"password", vassalConfiguration.Password},
{"data", "IsEstateManager"}
}, wasOutput)).Result);
 
if (string.IsNullOrEmpty(result))
throw new Exception("Error communicating with Corrade.");
 
if (!bool.TryParse(wasInput(KeyValue.Get("success", result)), out success))
throw new Exception("No success status could be retrieved.");
 
if (!success)
throw new Exception("Could not retrieve estate rights.");
 
var data = CSV.ToEnumerable(wasInput(KeyValue.Get("data", result))).ToList();
if (!data.Count.Equals(2))
throw new Exception("Could not retrieve estate rights.");
 
bool isEstateManager;
switch (
bool.TryParse(data[data.IndexOf("IsEstateManager") + 1], out isEstateManager) &&
isEstateManager)
{
case true: // we are an estate manager
result = Encoding.UTF8.GetString(HTTPClient.POST(vassalConfiguration.HTTPServerURL,
KeyValue.Escape(new Dictionary<string, string>
{
{"command", "setestatecovenant"},
{"group", vassalConfiguration.Group},
{"password", vassalConfiguration.Password},
{"item", vassalForm.SetCovenantNotecardUUIDBox.Text}
}, wasOutput)).Result);
 
if (string.IsNullOrEmpty(result))
throw new Exception("Error communicating with Corrade.");
 
if (!bool.TryParse(wasInput(KeyValue.Get("success", result)), out success))
throw new Exception("No success status could be retrieved.");
 
if (!success)
throw new Exception("Could not set region covenant.");
 
vassalForm.Invoke((MethodInvoker)(() =>
{
vassalForm.StatusText.Text = @"Region covenant set.";
currentDataGridViewRow.Selected = false;
currentDataGridViewRow.DefaultCellStyle.BackColor = Color.LightGreen;
foreach (
var cell in
currentDataGridViewRow.Cells.AsParallel().Cast<DataGridViewCell>())
{
cell.ToolTipText = @"Region covenant set.";
}
}));
break;
default:
throw new Exception("No estate manager rights for setting covenant.");
}
}
catch (Exception ex)
{
vassalForm.Invoke((MethodInvoker)(() =>
{
vassalForm.StatusText.Text = ex.Message;
currentDataGridViewRow.Selected = false;
currentDataGridViewRow.DefaultCellStyle.BackColor = Color.LightPink;
foreach (
var cell in
currentDataGridViewRow.Cells.AsParallel().Cast<DataGridViewCell>())
{
cell.ToolTipText = ex.Message;
}
}));
}
finally
{
// Pause for teleport (10 teleports / 15s allowed).
Thread.Sleep(700);
}
} while (!batchSetCovenantQueue.Count.Equals(0));
}
catch (Exception)
{
}
finally
{
Monitor.Exit(ClientInstanceTeleportLock);
// Allow teleports and enable button.
vassalForm.BeginInvoke((MethodInvoker)(() =>
{
vassalForm.BatchSetCovenantButton.Enabled = true;
vassalForm.SetCovenantNotecardUUIDBox.Enabled = true;
RegionTeleportGroup.Enabled = true;
}));
}
})
{ IsBackground = true }.Start();
}
}
}
/Vassal/Vassal/VassalForm.resx
@@ -7420,21 +7420,60 @@
residents from all estates that Corrade
is the owner of.</value>
</data>
<metadata name="LoadRawFileDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>374, 17</value>
</metadata>
<metadata name="SavePNGFileDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>529, 17</value>
</metadata>
<metadata name="SaveRawFileDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>684, 17</value>
</metadata>
<metadata name="EstateListName.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="EstateListUUID.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<data name="pictureBox18.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAABGdBTUEAALGOfPtRkwAAACBjSFJNAACH
DwAAjA8AAP1SAACBQAAAfXkAAOmLAAA85QAAGcxzPIV3AAAKOWlDQ1BQaG90b3Nob3AgSUNDIHByb2Zp
bGUAAEjHnZZ3VFTXFofPvXd6oc0wAlKG3rvAANJ7k15FYZgZYCgDDjM0sSGiAhFFRJoiSFDEgNFQJFZE
sRAUVLAHJAgoMRhFVCxvRtaLrqy89/Ly++Osb+2z97n77L3PWhcAkqcvl5cGSwGQyhPwgzyc6RGRUXTs
AIABHmCAKQBMVka6X7B7CBDJy82FniFyAl8EAfB6WLwCcNPQM4BOB/+fpFnpfIHomAARm7M5GSwRF4g4
JUuQLrbPipgalyxmGCVmvihBEcuJOWGRDT77LLKjmNmpPLaIxTmns1PZYu4V8bZMIUfEiK+ICzO5nCwR
3xKxRoowlSviN+LYVA4zAwAUSWwXcFiJIjYRMYkfEuQi4uUA4EgJX3HcVyzgZAvEl3JJS8/hcxMSBXQd
li7d1NqaQffkZKVwBALDACYrmcln013SUtOZvBwAFu/8WTLi2tJFRbY0tba0NDQzMv2qUP91829K3NtF
ehn4uWcQrf+L7a/80hoAYMyJarPziy2uCoDOLQDI3fti0zgAgKSobx3Xv7oPTTwviQJBuo2xcVZWlhGX
wzISF/QP/U+Hv6GvvmckPu6P8tBdOfFMYYqALq4bKy0lTcinZ6QzWRy64Z+H+B8H/nUeBkGceA6fwxNF
hImmjMtLELWbx+YKuGk8Opf3n5r4D8P+pMW5FonS+BFQY4yA1HUqQH7tBygKESDR+8Vd/6NvvvgwIH55
4SqTi3P/7zf9Z8Gl4iWDm/A5ziUohM4S8jMX98TPEqABAUgCKpAHykAd6ABDYAasgC1wBG7AG/iDEBAJ
VgMWSASpgA+yQB7YBApBMdgJ9oBqUAcaQTNoBcdBJzgFzoNL4Bq4AW6D+2AUTIBnYBa8BgsQBGEhMkSB
5CEVSBPSh8wgBmQPuUG+UBAUCcVCCRAPEkJ50GaoGCqDqqF6qBn6HjoJnYeuQIPQXWgMmoZ+h97BCEyC
qbASrAUbwwzYCfaBQ+BVcAK8Bs6FC+AdcCXcAB+FO+Dz8DX4NjwKP4PnEIAQERqiihgiDMQF8UeikHiE
j6xHipAKpAFpRbqRPuQmMorMIG9RGBQFRUcZomxRnqhQFAu1BrUeVYKqRh1GdaB6UTdRY6hZ1Ec0Ga2I
1kfboL3QEegEdBa6EF2BbkK3oy+ib6Mn0K8xGAwNo42xwnhiIjFJmLWYEsw+TBvmHGYQM46Zw2Kx8lh9
rB3WH8vECrCF2CrsUexZ7BB2AvsGR8Sp4Mxw7rgoHA+Xj6vAHcGdwQ3hJnELeCm8Jt4G749n43PwpfhG
fDf+On4Cv0CQJmgT7AghhCTCJkIloZVwkfCA8JJIJKoRrYmBRC5xI7GSeIx4mThGfEuSIemRXEjRJCFp
B+kQ6RzpLuklmUzWIjuSo8gC8g5yM/kC+RH5jQRFwkjCS4ItsUGiRqJDYkjiuSReUlPSSXK1ZK5kheQJ
yeuSM1J4KS0pFymm1HqpGqmTUiNSc9IUaVNpf+lU6RLpI9JXpKdksDJaMm4ybJkCmYMyF2TGKQhFneJC
YVE2UxopFykTVAxVm+pFTaIWU7+jDlBnZWVkl8mGyWbL1sielh2lITQtmhcthVZKO04bpr1borTEaQln
yfYlrUuGlszLLZVzlOPIFcm1yd2WeydPl3eTT5bfJd8p/1ABpaCnEKiQpbBf4aLCzFLqUtulrKVFS48v
vacIK+opBimuVTyo2K84p6Ss5KGUrlSldEFpRpmm7KicpFyufEZ5WoWiYq/CVSlXOavylC5Ld6Kn0Cvp
vfRZVUVVT1Whar3qgOqCmrZaqFq+WpvaQ3WCOkM9Xr1cvUd9VkNFw08jT6NF454mXpOhmai5V7NPc15L
Wytca6tWp9aUtpy2l3audov2Ax2yjoPOGp0GnVu6GF2GbrLuPt0berCehV6iXo3edX1Y31Kfq79Pf9AA
bWBtwDNoMBgxJBk6GWYathiOGdGMfI3yjTqNnhtrGEcZ7zLuM/5oYmGSYtJoct9UxtTbNN+02/R3Mz0z
llmN2S1zsrm7+QbzLvMXy/SXcZbtX3bHgmLhZ7HVosfig6WVJd+y1XLaSsMq1qrWaoRBZQQwShiXrdHW
ztYbrE9Zv7WxtBHYHLf5zdbQNtn2iO3Ucu3lnOWNy8ft1OyYdvV2o/Z0+1j7A/ajDqoOTIcGh8eO6o5s
xybHSSddpySno07PnU2c+c7tzvMuNi7rXM65Iq4erkWuA24ybqFu1W6P3NXcE9xb3Gc9LDzWepzzRHv6
eO7yHPFS8mJ5NXvNelt5r/Pu9SH5BPtU+zz21fPl+3b7wX7efrv9HqzQXMFb0ekP/L38d/s/DNAOWBPw
YyAmMCCwJvBJkGlQXlBfMCU4JvhI8OsQ55DSkPuhOqHC0J4wybDosOaw+XDX8LLw0QjjiHUR1yIVIrmR
XVHYqLCopqi5lW4r96yciLaILoweXqW9KnvVldUKq1NWn46RjGHGnIhFx4bHHol9z/RnNjDn4rziauNm
WS6svaxnbEd2OXuaY8cp40zG28WXxU8l2CXsTphOdEisSJzhunCruS+SPJPqkuaT/ZMPJX9KCU9pS8Wl
xqae5Mnwknm9acpp2WmD6frphemja2zW7Fkzy/fhN2VAGasyugRU0c9Uv1BHuEU4lmmfWZP5Jiss60S2
dDYvuz9HL2d7zmSue+63a1FrWWt78lTzNuWNrXNaV78eWh+3vmeD+oaCDRMbPTYe3kTYlLzpp3yT/LL8
V5vDN3cXKBVsLBjf4rGlpVCikF84stV2a9021DbutoHt5turtn8sYhddLTYprih+X8IqufqN6TeV33za
Eb9joNSydP9OzE7ezuFdDrsOl0mX5ZaN7/bb3VFOLy8qf7UnZs+VimUVdXsJe4V7Ryt9K7uqNKp2Vr2v
Tqy+XeNc01arWLu9dn4fe9/Qfsf9rXVKdcV17w5wD9yp96jvaNBqqDiIOZh58EljWGPft4xvm5sUmoqb
PhziHRo9HHS4t9mqufmI4pHSFrhF2DJ9NProje9cv+tqNWytb6O1FR8Dx4THnn4f+/3wcZ/jPScYJ1p/
0Pyhtp3SXtQBdeR0zHYmdo52RXYNnvQ+2dNt293+o9GPh06pnqo5LXu69AzhTMGZT2dzz86dSz83cz7h
/HhPTM/9CxEXbvUG9g5c9Ll4+ZL7pQt9Tn1nL9tdPnXF5srJq4yrndcsr3X0W/S3/2TxU/uA5UDHdavr
XTesb3QPLh88M+QwdP6m681Lt7xuXbu94vbgcOjwnZHokdE77DtTd1PuvriXeW/h/sYH6AdFD6UeVjxS
fNTws+7PbaOWo6fHXMf6Hwc/vj/OGn/2S8Yv7ycKnpCfVEyqTDZPmU2dmnafvvF05dOJZ+nPFmYKf5X+
tfa5zvMffnP8rX82YnbiBf/Fp99LXsq/PPRq2aueuYC5R69TXy/MF72Rf3P4LeNt37vwd5MLWe+x7ys/
6H7o/ujz8cGn1E+f/gUDmPP8usTo0wAAAAlwSFlzAAAuIwAALiMBeKU/dgAAANVJREFUOE/Nkj0LwjAQ
hv3lHW1xUOigoKAgFKeCgyL4kUVwcCi46KSTLuLm5nLyRqIxvZAIoTg8y13v4b1ca1EkKCQW4Yqp+VFF
wle6JF6QmGZ0OaRv9tuurJVnPlgTQnA/N6RksxxKjrs2Pa51KtZ9dgawwmwwtg4iIXpJPC/1ACvEukiT
j/KvetqayTqS63Ud76MgGUS3U5N6nQn7DbAeRUetiSdAerOv45VQJeN6Jk6hOhCuzPVNqhcCSLk6h5fQ
dQgdpxD/YtCVgwtB0JV/5d+Fgp6AN1enJiPk3QAAAABJRU5ErkJggg==
</value>
</data>
<data name="pictureBox19.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAABGdBTUEAALGOfPtRkwAAACBjSFJNAACH
@@ -7489,6 +7528,21 @@
dQgdpxD/YtCVgwtB0JV/5d+Fgp6AN1enJiPk3QAAAABJRU5ErkJggg==
</value>
</data>
<metadata name="LoadRawFileDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>374, 17</value>
</metadata>
<metadata name="SavePNGFileDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>529, 17</value>
</metadata>
<metadata name="SaveRawFileDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>684, 17</value>
</metadata>
<metadata name="EstateListName.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="EstateListUUID.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="TopCollidersScore.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
@@ -7525,7 +7579,25 @@
<metadata name="BatchRestartPosition.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<data name="pictureBox18.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<metadata name="ResidentListName.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="ResidentListUUID.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="ResidentListPosition.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="RegionsStateRegionName.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="RegionsStateLastState.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="RegionsStateLastCheck.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<data name="pictureBox20.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAABGdBTUEAALGOfPtRkwAAACBjSFJNAACH
DwAAjA8AAP1SAACBQAAAfXkAAOmLAAA85QAAGcxzPIV3AAAKOWlDQ1BQaG90b3Nob3AgSUNDIHByb2Zp
@@ -7579,24 +7651,23 @@
dQgdpxD/YtCVgwtB0JV/5d+Fgp6AN1enJiPk3QAAAABJRU5ErkJggg==
</value>
</data>
<metadata name="ResidentListName.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<data name="pictureBox20.ToolTip" xml:space="preserve">
<value>In order to change the estate covenant
the field must be set to the asset UUID
of a notecard inside Corrade's inventory.
 
You can control / shift-click the rows
in the region table above and then press
the "Batch Set Covenant..." button and
Vassal will send Corrade to all the
regions in-turn and set the covenant.</value>
</data>
<metadata name="BatchSetCovenantRegionName.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="ResidentListUUID.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="BatchSetCovenantPosition.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="ResidentListPosition.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="RegionsStateRegionName.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="RegionsStateLastState.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="RegionsStateLastCheck.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="LoadCSVFile.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>837, 17</value>
</metadata>