/Vassal/Vassal/SettingsForm.cs |
@@ -7,7 +7,6 @@ |
using System; |
using System.Drawing; |
using System.Linq; |
using System.Net; |
using System.Net.Http.Headers; |
using System.Net.Sockets; |
using System.Reflection; |
@@ -15,6 +14,7 @@ |
using System.Windows.Forms; |
using OpenMetaverse; |
using wasSharp; |
using wasSharp.Web; |
|
namespace Vassal |
{ |
@@ -89,7 +89,8 @@ |
mediaType = @"text/plain"; |
break; |
} |
Vassal.HTTPClient = new Web.wasHTTPClient(new ProductInfoHeaderValue(@"Vassal", Vassal.VASSAL_VERSION), mediaType, 60000); |
Vassal.HTTPClient = new wasHTTPClient(new ProductInfoHeaderValue(@"Vassal", Vassal.VASSAL_VERSION), |
mediaType, 60000); |
}; |
|
private readonly Action SetUserConfiguration = () => |
@@ -140,7 +141,7 @@ |
break; |
} |
// Create HTTP Client |
Vassal.HTTPClient = new Web.wasHTTPClient(new ProductInfoHeaderValue(@"Vassal", |
Vassal.HTTPClient = new wasHTTPClient(new ProductInfoHeaderValue(@"Vassal", |
Vassal.VASSAL_VERSION), mediaType, 60000); |
}; |
|
/Vassal/Vassal/Vassal.csproj |
@@ -121,15 +121,15 @@ |
<DesignTime>True</DesignTime> |
</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> |
<Link>libs\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> |
<Link>libs\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> |
<Link>libs\libopenjpeg-dotnet-2-1.5.0-dotnet-1-x86_64-freebsd.so</Link> |
<CopyToOutputDirectory>Always</CopyToOutputDirectory> |
</None> |
<None Include="Properties\Settings.settings"> |
@@ -165,10 +165,8 @@ |
<EmbeddedResource Include="img\online.png" /> |
<Content Include="Vassal.ico" /> |
</ItemGroup> |
<ItemGroup /> |
<ItemGroup> |
<Folder Include="libs\" /> |
</ItemGroup> |
<ItemGroup> |
<BootstrapperPackage Include=".NETFramework,Version=v4.5"> |
<Visible>False</Visible> |
<ProductName>Microsoft .NET Framework 4.5 %28x86 and x64%29</ProductName> |
/Vassal/Vassal/VassalConfiguration.cs |
@@ -8,7 +8,6 @@ |
using System.Collections.Generic; |
using System.ComponentModel; |
using System.IO; |
using System.Linq; |
using System.Text; |
using System.Xml.Serialization; |
|
@@ -42,7 +41,6 @@ |
public class VassalConfiguration |
{ |
private static readonly object VassalConfigurationLock = new object(); |
private uint _servicesTimeout = 60000; |
|
private ENIGMA _enigma = new ENIGMA |
{ |
@@ -57,6 +55,7 @@ |
private List<Filter> _outputFilters = new List<Filter>(); |
private string _password = string.Empty; |
private uint _regionRestartDelay = 120; |
private uint _servicesTimeout = 60000; |
private uint _teleportTimeout = 30000; |
private string _vigenereSecret = string.Empty; |
|
@@ -244,9 +243,9 @@ |
{ |
lock (VassalConfigurationLock) |
{ |
using (StreamWriter writer = new StreamWriter(file, false, Encoding.UTF8)) |
using (var writer = new StreamWriter(file, false, Encoding.UTF8)) |
{ |
XmlSerializer serializer = new XmlSerializer(typeof (VassalConfiguration)); |
var serializer = new XmlSerializer(typeof(VassalConfiguration)); |
serializer.Serialize(writer, configuration); |
//writer.Flush(); |
} |
@@ -257,10 +256,10 @@ |
{ |
lock (VassalConfigurationLock) |
{ |
using (StreamReader stream = new StreamReader(file, Encoding.UTF8)) |
using (var stream = new StreamReader(file, Encoding.UTF8)) |
{ |
XmlSerializer serializer = |
new XmlSerializer(typeof (VassalConfiguration)); |
var serializer = |
new XmlSerializer(typeof(VassalConfiguration)); |
configuration = (VassalConfiguration) serializer.Deserialize(stream); |
} |
} |
/Vassal/Vassal/VassalForm.cs |
@@ -11,7 +11,6 @@ |
using System.Drawing.Imaging; |
using System.IO; |
using System.Linq; |
using System.Net; |
using System.Net.Http.Headers; |
using System.Net.Sockets; |
using System.Reflection; |
@@ -21,6 +20,8 @@ |
using System.Windows.Forms; |
using OpenMetaverse; |
using wasSharp; |
using wasSharp.Web; |
using wasSharp.Web.Utilities; |
using Parallel = System.Threading.Tasks.Parallel; |
using Timer = System.Timers.Timer; |
|
@@ -40,7 +41,7 @@ |
public static Vassal vassalForm; |
public static readonly object ClientInstanceTeleportLock = new object(); |
public static readonly object RegionsStateCheckLock = new object(); |
public static Web.wasHTTPClient HTTPClient; |
public static wasHTTPClient HTTPClient; |
|
/// <summary> |
/// Corrade version. |
@@ -59,10 +60,10 @@ |
switch (filter) |
{ |
case Filter.RFC1738: |
o = Web.URLUnescapeDataString(o); |
o = Extensions.URLUnescapeDataString(o); |
break; |
case Filter.RFC3986: |
o = Web.URIUnescapeDataString(o); |
o = Extensions.URIUnescapeDataString(o); |
break; |
case Filter.ENIGMA: |
o = Cryptography.ENIGMA(o, vassalConfiguration.ENIGMA.rotors.ToArray(), |
@@ -95,10 +96,10 @@ |
switch (filter) |
{ |
case Filter.RFC1738: |
o = Web.URLEscapeDataString(o); |
o = Extensions.URLEscapeDataString(o); |
break; |
case Filter.RFC3986: |
o = Web.URIEscapeDataString(o); |
o = Extensions.URIEscapeDataString(o); |
break; |
case Filter.ENIGMA: |
o = Cryptography.ENIGMA(o, vassalConfiguration.ENIGMA.rotors.ToArray(), |
@@ -435,7 +436,7 @@ |
break; |
} |
// Create HTTP Client |
HTTPClient = new Web.wasHTTPClient(new ProductInfoHeaderValue(@"Vassal", |
HTTPClient = new wasHTTPClient(new ProductInfoHeaderValue(@"Vassal", |
VASSAL_VERSION), mediaType, vassalConfiguration.ServicesTimeout); |
} |
|