corrade-vassal

Subversion Repositories:
Compare Path: Rev
With Path: Rev
?path1? @ 16  →  ?path2? @ 17
/Vassal/Vassal/Properties/AssemblyInfo.cs
@@ -36,5 +36,5 @@
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
 
[assembly: AssemblyVersion("1.3.*")]
[assembly: AssemblyVersion("1.4.*")]
[assembly: NeutralResourcesLanguage("en-US")]
/Vassal/Vassal/VassalForm.cs
@@ -182,9 +182,9 @@
private void ShowToolTip(object sender, EventArgs e)
{
vassalForm.BeginInvoke(
(Action)(() =>
(Action) (() =>
{
PictureBox pictureBox = sender as PictureBox;
var pictureBox = sender as PictureBox;
if (pictureBox != null)
{
toolTip1.Show(toolTip1.GetToolTip(pictureBox), pictureBox);
@@ -434,8 +434,8 @@
break;
}
// Create HTTP Client
Vassal.HTTPClient = new Web.wasHTTPClient(new ProductInfoHeaderValue(@"Vassal",
Vassal.VASSAL_VERSION), new CookieContainer(), mediaType, vassalConfiguration.ServicesTimeout);
HTTPClient = new Web.wasHTTPClient(new ProductInfoHeaderValue(@"Vassal",
VASSAL_VERSION), new CookieContainer(), mediaType, vassalConfiguration.ServicesTimeout);
}
 
// Get all the regions if they exist.
@@ -652,18 +652,18 @@
{
"data", CSV.FromEnumerable(new[]
{
"Agents",
"LastLag",
"Dilation",
"FPS",
"PhysicsFPS",
"ActiveScripts",
"ScriptTime",
"Objects",
"FrameTime",
"ScriptedObjects",
"PhysicsTime",
"NetTime",
"Stats.Agents",
"Stats.LastLag",
"Stats.Dilation",
"Stats.FPS",
"Stats.PhysicsFPS",
"Stats.ActiveScripts",
"Stats.ScriptTime",
"Stats.Objects",
"Stats.FrameTime",
"Stats.ScriptedObjects",
"Stats.PhysicsTime",
"Stats.NetTime",
"AvatarPositions"
})
}
@@ -682,29 +682,29 @@
vassalForm.BeginInvoke((MethodInvoker) (() =>
{
// Populate the overview tab.
Agents.Text = data[data.IndexOf("Agents") + 1];
Agents.Text = data[data.IndexOf("Stats.Agents") + 1];
Agents.Enabled = true;
LastLag.Text = data[data.IndexOf("LastLag") + 1];
LastLag.Text = data[data.IndexOf("Stats.LastLag") + 1];
LastLag.Enabled = true;
Dilation.Text = data[data.IndexOf("Dilation") + 1];
Dilation.Text = data[data.IndexOf("Stats.Dilation") + 1];
Dilation.Enabled = true;
FPS.Text = data[data.IndexOf("FPS") + 1];
FPS.Text = data[data.IndexOf("Stats.FPS") + 1];
FPS.Enabled = true;
PhysicsFPS.Text = data[data.IndexOf("PhysicsFPS") + 1];
PhysicsFPS.Text = data[data.IndexOf("Stats.PhysicsFPS") + 1];
PhysicsFPS.Enabled = true;
ActiveScripts.Text = data[data.IndexOf("ActiveScripts") + 1];
ActiveScripts.Text = data[data.IndexOf("Stats.ActiveScripts") + 1];
ActiveScripts.Enabled = true;
ScriptTime.Text = data[data.IndexOf("ScriptTime") + 1];
ScriptTime.Text = data[data.IndexOf("Stats.ScriptTime") + 1];
ScriptTime.Enabled = true;
FrameTime.Text = data[data.IndexOf("FrameTime") + 1];
FrameTime.Text = data[data.IndexOf("Stats.FrameTime") + 1];
FrameTime.Enabled = true;
ScriptedObjects.Text = data[data.IndexOf("ScriptedObjects") + 1];
ScriptedObjects.Text = data[data.IndexOf("Stats.ScriptedObjects") + 1];
ScriptedObjects.Enabled = true;
PhysicsTime.Text = data[data.IndexOf("PhysicsTime") + 1];
PhysicsTime.Text = data[data.IndexOf("Stats.PhysicsTime") + 1];
PhysicsTime.Enabled = true;
NetTime.Text = data[data.IndexOf("NetTime") + 1];
NetTime.Text = data[data.IndexOf("Stats.NetTime") + 1];
NetTime.Enabled = true;
Objects.Text = data[data.IndexOf("Objects") + 1];
Objects.Text = data[data.IndexOf("Stats.Objects") + 1];
Objects.Enabled = true;
 
// Show the overview lag time.
@@ -4097,234 +4097,10 @@
{IsBackground = true}.Start();
}
 
/// <summary>
/// Linden constants.
/// </summary>
public struct LINDEN_CONSTANTS
{
public struct ALERTS
{
public const string NO_ROOM_TO_SIT_HERE = @"No room to sit here, try another spot.";
 
public const string UNABLE_TO_SET_HOME =
@"You can only set your 'Home Location' on your land or at a mainland Infohub.";
 
public const string HOME_SET = @"Home position set.";
}
 
public struct ASSETS
{
public struct NOTECARD
{
public const string NEWLINE = "\n";
public const uint MAXIMUM_BODY_LENTH = 65536;
}
}
 
public struct AVATARS
{
public const uint SET_DISPLAY_NAME_SUCCESS = 200;
public const string LASTNAME_PLACEHOLDER = @"Resident";
public const uint MAXIMUM_DISPLAY_NAME_CHARACTERS = 31;
public const uint MINIMUM_DISPLAY_NAME_CHARACTERS = 1;
public const uint MAXIMUM_NUMBER_OF_ATTACHMENTS = 38;
 
public struct PROFILE
{
public const uint SECOND_LIFE_TEXT_SIZE = 510;
public const uint FIRST_LIFE_TEXT_SIZE = 253;
}
 
public struct PICKS
{
public const uint MAXIMUM_PICKS = 10;
public const uint MAXIMUM_PICK_DESCRIPTION_SIZE = 1022;
}
 
public struct CLASSIFIEDS
{
public const uint MAXIMUM_CLASSIFIEDS = 100;
}
}
 
public struct PRIMITIVES
{
public const uint MAXIMUM_NAME_SIZE = 63;
public const uint MAXIMUM_DESCRIPTION_SIZE = 127;
public const double MAXIMUM_REZ_HEIGHT = 4096.0;
public const double MINIMUM_SIZE_X = 0.01;
public const double MINIMUM_SIZE_Y = 0.01;
public const double MINIMUM_SIZE_Z = 0.01;
public const double MAXIMUM_SIZE_X = 64.0;
public const double MAXIMUM_SIZE_Y = 64.0;
public const double MAXIMUM_SIZE_Z = 64.0;
}
 
public struct OBJECTS
{
public const uint MAXIMUM_PRIMITIVE_COUNT = 256;
}
 
public struct DIRECTORY
{
public struct EVENT
{
public const uint SEARCH_RESULTS_COUNT = 200;
}
 
public struct GROUP
{
public const uint SEARCH_RESULTS_COUNT = 100;
}
 
public struct LAND
{
public const uint SEARCH_RESULTS_COUNT = 100;
}
 
public struct PEOPLE
{
public const uint SEARCH_RESULTS_COUNT = 100;
}
}
 
public struct ESTATE
{
public const uint REGION_RESTART_DELAY = 120;
public const uint MAXIMUM_BAN_LIST_LENGTH = 500;
public const uint MAXIMUM_GROUP_LIST_LENGTH = 63;
public const uint MAXIMUM_USER_LIST_LENGTH = 500;
public const uint MAXIMUM_MANAGER_LIST_LENGTH = 10;
 
public struct MESSAGES
{
public const string REGION_RESTART_MESSAGE = @"restart";
}
}
 
public struct PARCELS
{
public const double MAXIMUM_AUTO_RETURN_TIME = 999999;
public const uint MINIMUM_AUTO_RETURN_TIME = 0;
public const uint MAXIMUM_NAME_LENGTH = 63;
public const uint MAXIMUM_DESCRIPTION_LENGTH = 255;
}
 
public struct GRID
{
public const string SECOND_LIFE = @"Second Life";
public const string TIME_ZONE = @"Pacific Standard Time";
}
 
public struct CHAT
{
public const uint MAXIMUM_MESSAGE_LENGTH = 1024;
}
 
public struct GROUPS
{
public const uint MAXIMUM_NUMBER_OF_ROLES = 10;
public const string EVERYONE_ROLE_NAME = @"Everyone";
public const uint MAXIMUM_GROUP_NAME_LENGTH = 35;
public const uint MAXIMUM_GROUP_TITLE_LENGTH = 20;
}
 
public struct NOTICES
{
public const uint MAXIMUM_NOTICE_MESSAGE_LENGTH = 512;
}
 
public struct LSL
{
public const string CSV_DELIMITER = @", ";
public const float SENSOR_RANGE = 96;
public const string DATE_TIME_STAMP = @"yyy-MM-ddTHH:mm:ss.ffffffZ";
}
 
public struct REGION
{
public const float TELEPORT_MINIMUM_DISTANCE = 1;
public const float DEFAULT_AGENT_LIMIT = 40;
public const float DEFAULT_OBJECT_BONUS = 1;
public const bool DEFAULT_FIXED_SUN = false;
public const float DEFAULT_TERRAIN_LOWER_LIMIT = -4;
public const float DEFAULT_TERRAIN_RAISE_LIMIT = 4;
public const bool DEFAULT_USE_ESTATE_SUN = true;
public const float DEFAULT_WATER_HEIGHT = 20;
public const float SUNRISE = 6;
}
 
public struct VIEWER
{
public const float MAXIMUM_DRAW_DISTANCE = 4096;
}
 
public struct TELEPORTS
{
public struct THROTTLE
{
public const uint MAX_TELEPORTS = 10;
public const uint GRACE_SECONDS = 15;
}
}
}
 
/// <summary>
/// Constants used by Corrade.
/// </summary>
public struct VASSAL_CONSTANTS
{
/// <summary>
/// Copyright.
/// </summary>
public const string COPYRIGHT = @"(c) Copyright 2013 Wizardry and Steamworks";
 
public const string WIZARDRY_AND_STEAMWORKS = @"Wizardry and Steamworks";
public const string VASSAL = @"Vassal";
public const string WIZARDRY_AND_STEAMWORKS_WEBSITE = @"http://grimore.org";
 
/// <summary>
/// Vassal version.
/// </summary>
public static readonly string VASSAL_VERSION = Assembly.GetEntryAssembly().GetName().Version.ToString();
 
/// <summary>
/// Corrade user agent.
/// </summary>
public static readonly string USER_AGENT =
$"{VASSAL}/{VASSAL_VERSION} ({WIZARDRY_AND_STEAMWORKS_WEBSITE})";
 
/// <summary>
/// Vassal compile date.
/// </summary>
public static readonly string VASSAL_COMPILE_DATE = new DateTime(2000, 1, 1).Add(new TimeSpan(
TimeSpan.TicksPerDay*Assembly.GetEntryAssembly().GetName().Version.Build + // days since 1 January 2000
TimeSpan.TicksPerSecond*2*Assembly.GetEntryAssembly().GetName().Version.Revision)).ToLongDateString();
 
/// <summary>
/// Vassal configuration file.
/// </summary>
public static readonly string VASSAL_CONFIGURATION_FILE = @"Vassal.ini";
 
/// <summary>
/// Vassal regions file.
/// </summary>
public static readonly string VASSAL_REGIONS = @"Regions.csv";
 
/// <summary>
/// Conten-types that Corrade can send and receive.
/// </summary>
public struct CONTENT_TYPE
{
public const string TEXT_PLAIN = @"text/plain";
public const string WWW_FORM_URLENCODED = @"application/x-www-form-urlencoded";
}
}
 
private void RequestBatchSetCovenant(object sender, EventArgs e)
{
// Block teleports and disable button.
vassalForm.Invoke((MethodInvoker)(() =>
vassalForm.Invoke((MethodInvoker) (() =>
{
vassalForm.BatchSetCovenantButton.Enabled = false;
vassalForm.SetCovenantNotecardUUIDBox.Enabled = false;
@@ -4333,7 +4109,7 @@
 
// Enqueue all the regions to set covenant.
var batchSetCovenantQueue = new Queue<KeyValuePair<string, Vector3>>();
vassalForm.Invoke((MethodInvoker)(() =>
vassalForm.Invoke((MethodInvoker) (() =>
{
foreach (
var topCollidersRow in
@@ -4354,7 +4130,7 @@
// If no rows were selected, enable teleports, the return button and return.
if (batchSetCovenantQueue.Count.Equals(0))
{
vassalForm.Invoke((MethodInvoker)(() =>
vassalForm.Invoke((MethodInvoker) (() =>
{
vassalForm.BatchSetCovenantButton.Enabled = true;
vassalForm.SetCovenantNotecardUUIDBox.Enabled = true;
@@ -4374,7 +4150,7 @@
// Dequeue the first object.
var batchSetCovenantRegionData = batchSetCovenantQueue.Dequeue();
DataGridViewRow currentDataGridViewRow = null;
vassalForm.Invoke((MethodInvoker)(() =>
vassalForm.Invoke((MethodInvoker) (() =>
{
currentDataGridViewRow = vassalForm.BatchSetCovenantGridView.Rows.AsParallel()
.Cast<DataGridViewRow>()
@@ -4398,9 +4174,10 @@
var teleportRetries = 3;
do
{
vassalForm.Invoke((MethodInvoker)(() =>
vassalForm.Invoke((MethodInvoker) (() =>
{
vassalForm.StatusText.Text = @"Attempting to teleport to " + batchSetCovenantRegionData.Key +
vassalForm.StatusText.Text = @"Attempting to teleport to " +
batchSetCovenantRegionData.Key +
@" " + @"(" +
teleportRetries.ToString(Utils.EnUsCulture) +
@")";
@@ -4518,7 +4295,7 @@
if (!success)
throw new Exception("Could not set region covenant.");
 
vassalForm.Invoke((MethodInvoker)(() =>
vassalForm.Invoke((MethodInvoker) (() =>
{
vassalForm.StatusText.Text = @"Region covenant set.";
currentDataGridViewRow.Selected = false;
@@ -4537,7 +4314,7 @@
}
catch (Exception ex)
{
vassalForm.Invoke((MethodInvoker)(() =>
vassalForm.Invoke((MethodInvoker) (() =>
{
vassalForm.StatusText.Text = ex.Message;
currentDataGridViewRow.Selected = false;
@@ -4564,7 +4341,7 @@
{
Monitor.Exit(ClientInstanceTeleportLock);
// Allow teleports and enable button.
vassalForm.BeginInvoke((MethodInvoker)(() =>
vassalForm.BeginInvoke((MethodInvoker) (() =>
{
vassalForm.BatchSetCovenantButton.Enabled = true;
vassalForm.SetCovenantNotecardUUIDBox.Enabled = true;
@@ -4572,7 +4349,231 @@
}));
}
})
{ IsBackground = true }.Start();
{IsBackground = true}.Start();
}
 
/// <summary>
/// Linden constants.
/// </summary>
public struct LINDEN_CONSTANTS
{
public struct ALERTS
{
public const string NO_ROOM_TO_SIT_HERE = @"No room to sit here, try another spot.";
 
public const string UNABLE_TO_SET_HOME =
@"You can only set your 'Home Location' on your land or at a mainland Infohub.";
 
public const string HOME_SET = @"Home position set.";
}
 
public struct ASSETS
{
public struct NOTECARD
{
public const string NEWLINE = "\n";
public const uint MAXIMUM_BODY_LENTH = 65536;
}
}
 
public struct AVATARS
{
public const uint SET_DISPLAY_NAME_SUCCESS = 200;
public const string LASTNAME_PLACEHOLDER = @"Resident";
public const uint MAXIMUM_DISPLAY_NAME_CHARACTERS = 31;
public const uint MINIMUM_DISPLAY_NAME_CHARACTERS = 1;
public const uint MAXIMUM_NUMBER_OF_ATTACHMENTS = 38;
 
public struct PROFILE
{
public const uint SECOND_LIFE_TEXT_SIZE = 510;
public const uint FIRST_LIFE_TEXT_SIZE = 253;
}
 
public struct PICKS
{
public const uint MAXIMUM_PICKS = 10;
public const uint MAXIMUM_PICK_DESCRIPTION_SIZE = 1022;
}
 
public struct CLASSIFIEDS
{
public const uint MAXIMUM_CLASSIFIEDS = 100;
}
}
 
public struct PRIMITIVES
{
public const uint MAXIMUM_NAME_SIZE = 63;
public const uint MAXIMUM_DESCRIPTION_SIZE = 127;
public const double MAXIMUM_REZ_HEIGHT = 4096.0;
public const double MINIMUM_SIZE_X = 0.01;
public const double MINIMUM_SIZE_Y = 0.01;
public const double MINIMUM_SIZE_Z = 0.01;
public const double MAXIMUM_SIZE_X = 64.0;
public const double MAXIMUM_SIZE_Y = 64.0;
public const double MAXIMUM_SIZE_Z = 64.0;
}
 
public struct OBJECTS
{
public const uint MAXIMUM_PRIMITIVE_COUNT = 256;
}
 
public struct DIRECTORY
{
public struct EVENT
{
public const uint SEARCH_RESULTS_COUNT = 200;
}
 
public struct GROUP
{
public const uint SEARCH_RESULTS_COUNT = 100;
}
 
public struct LAND
{
public const uint SEARCH_RESULTS_COUNT = 100;
}
 
public struct PEOPLE
{
public const uint SEARCH_RESULTS_COUNT = 100;
}
}
 
public struct ESTATE
{
public const uint REGION_RESTART_DELAY = 120;
public const uint MAXIMUM_BAN_LIST_LENGTH = 500;
public const uint MAXIMUM_GROUP_LIST_LENGTH = 63;
public const uint MAXIMUM_USER_LIST_LENGTH = 500;
public const uint MAXIMUM_MANAGER_LIST_LENGTH = 10;
 
public struct MESSAGES
{
public const string REGION_RESTART_MESSAGE = @"restart";
}
}
 
public struct PARCELS
{
public const double MAXIMUM_AUTO_RETURN_TIME = 999999;
public const uint MINIMUM_AUTO_RETURN_TIME = 0;
public const uint MAXIMUM_NAME_LENGTH = 63;
public const uint MAXIMUM_DESCRIPTION_LENGTH = 255;
}
 
public struct GRID
{
public const string SECOND_LIFE = @"Second Life";
public const string TIME_ZONE = @"Pacific Standard Time";
}
 
public struct CHAT
{
public const uint MAXIMUM_MESSAGE_LENGTH = 1024;
}
 
public struct GROUPS
{
public const uint MAXIMUM_NUMBER_OF_ROLES = 10;
public const string EVERYONE_ROLE_NAME = @"Everyone";
public const uint MAXIMUM_GROUP_NAME_LENGTH = 35;
public const uint MAXIMUM_GROUP_TITLE_LENGTH = 20;
}
 
public struct NOTICES
{
public const uint MAXIMUM_NOTICE_MESSAGE_LENGTH = 512;
}
 
public struct LSL
{
public const string CSV_DELIMITER = @", ";
public const float SENSOR_RANGE = 96;
public const string DATE_TIME_STAMP = @"yyy-MM-ddTHH:mm:ss.ffffffZ";
}
 
public struct REGION
{
public const float TELEPORT_MINIMUM_DISTANCE = 1;
public const float DEFAULT_AGENT_LIMIT = 40;
public const float DEFAULT_OBJECT_BONUS = 1;
public const bool DEFAULT_FIXED_SUN = false;
public const float DEFAULT_TERRAIN_LOWER_LIMIT = -4;
public const float DEFAULT_TERRAIN_RAISE_LIMIT = 4;
public const bool DEFAULT_USE_ESTATE_SUN = true;
public const float DEFAULT_WATER_HEIGHT = 20;
public const float SUNRISE = 6;
}
 
public struct VIEWER
{
public const float MAXIMUM_DRAW_DISTANCE = 4096;
}
 
public struct TELEPORTS
{
public struct THROTTLE
{
public const uint MAX_TELEPORTS = 10;
public const uint GRACE_SECONDS = 15;
}
}
}
 
/// <summary>
/// Constants used by Corrade.
/// </summary>
public struct VASSAL_CONSTANTS
{
/// <summary>
/// Copyright.
/// </summary>
public const string COPYRIGHT = @"(c) Copyright 2013 Wizardry and Steamworks";
 
public const string WIZARDRY_AND_STEAMWORKS = @"Wizardry and Steamworks";
public const string VASSAL = @"Vassal";
public const string WIZARDRY_AND_STEAMWORKS_WEBSITE = @"http://grimore.org";
 
/// <summary>
/// Vassal version.
/// </summary>
public static readonly string VASSAL_VERSION = Assembly.GetEntryAssembly().GetName().Version.ToString();
 
/// <summary>
/// Corrade user agent.
/// </summary>
public static readonly string USER_AGENT =
$"{VASSAL}/{VASSAL_VERSION} ({WIZARDRY_AND_STEAMWORKS_WEBSITE})";
 
/// <summary>
/// Vassal compile date.
/// </summary>
public static readonly string VASSAL_COMPILE_DATE = new DateTime(2000, 1, 1).Add(new TimeSpan(
TimeSpan.TicksPerDay*Assembly.GetEntryAssembly().GetName().Version.Build + // days since 1 January 2000
TimeSpan.TicksPerSecond*2*Assembly.GetEntryAssembly().GetName().Version.Revision)).ToLongDateString();
 
/// <summary>
/// Vassal configuration file.
/// </summary>
public static readonly string VASSAL_CONFIGURATION_FILE = @"Vassal.ini";
 
/// <summary>
/// Vassal regions file.
/// </summary>
public static readonly string VASSAL_REGIONS = @"Regions.csv";
 
/// <summary>
/// Conten-types that Corrade can send and receive.
/// </summary>
public struct CONTENT_TYPE
{
public const string TEXT_PLAIN = @"text/plain";
public const string WWW_FORM_URLENCODED = @"application/x-www-form-urlencoded";
}
}
}
}