diff --git a/.gitignore b/.gitignore index 7964536..1b0e567 100644 --- a/.gitignore +++ b/.gitignore @@ -186,4 +186,5 @@ # LightSwitch generated files GeneratedArtifacts/ _Pvt_Extensions/ -ModelManifest.xml \ No newline at end of file +ModelManifest.xml +.vs diff --git a/Sunfish/Sunfish/HttpServer.cs b/Sunfish/Sunfish/HttpServer.cs index 00de905..41c1f54 100644 --- a/Sunfish/Sunfish/HttpServer.cs +++ b/Sunfish/Sunfish/HttpServer.cs @@ -45,7 +45,6 @@ } loop = new Thread(ServerLoop); loop.Start(); - fwRule = WindowsFirewall.Allow(port); return true; } @@ -106,7 +105,6 @@ } finally { - WindowsFirewall.Remove(fwRule); } return true; } @@ -266,16 +264,13 @@ public class LogError { - private DateTime time = DateTime.Now; - private Exception e; - public LogError(Exception e) { - this.e = e; + Exception = e; } - public DateTime Time { get { return time; } } - public Exception Exception { get { return e; } } + public DateTime Time { get; } = DateTime.Now; + public Exception Exception { get; } } public class HttpPost diff --git a/Sunfish/Sunfish/Program.cs b/Sunfish/Sunfish/Program.cs index 3757a97..c67c83b 100644 --- a/Sunfish/Sunfish/Program.cs +++ b/Sunfish/Sunfish/Program.cs @@ -1,8 +1,6 @@ -using System; -using System.Collections.Generic; -using System.Linq; +using DolphinWebXplorer2.wx; +using System; using System.Windows.Forms; -using DolphinWebXplorer2.wx; namespace DolphinWebXplorer2 { @@ -20,7 +18,7 @@ Application.SetCompatibleTextRenderingDefault(false); try { - Application.Run(mainform=new Form1()); + Application.Run(mainform = new Form1()); } finally { diff --git a/Sunfish/Sunfish/Properties/Resources.Designer.cs b/Sunfish/Sunfish/Properties/Resources.Designer.cs index 3795ac1..ae0a542 100644 --- a/Sunfish/Sunfish/Properties/Resources.Designer.cs +++ b/Sunfish/Sunfish/Properties/Resources.Designer.cs @@ -1,7 +1,7 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:4.0.30319.34209 +// Runtime Version:4.0.30319.42000 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -19,7 +19,7 @@ // class via a tool like ResGen or Visual Studio. // To add or remove a member, edit your .ResX file then rerun ResGen // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] internal class Resources { diff --git a/Sunfish/Sunfish/Properties/Settings.Designer.cs b/Sunfish/Sunfish/Properties/Settings.Designer.cs index ec38d51..50ca31b 100644 --- a/Sunfish/Sunfish/Properties/Settings.Designer.cs +++ b/Sunfish/Sunfish/Properties/Settings.Designer.cs @@ -1,7 +1,7 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:4.0.30319.34209 +// Runtime Version:4.0.30319.42000 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -12,7 +12,7 @@ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "12.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.8.0.0")] internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); diff --git a/Sunfish/Sunfish/Sunfish.csproj b/Sunfish/Sunfish/Sunfish.csproj index 0c05f0e..7649cf2 100644 --- a/Sunfish/Sunfish/Sunfish.csproj +++ b/Sunfish/Sunfish/Sunfish.csproj @@ -10,7 +10,7 @@ Properties DolphinWebXplorer2 Sunfish - v3.5 + v4.0 512 sunfishWebServer.ico @@ -35,6 +35,7 @@ false false true + true @@ -128,6 +129,7 @@ Resources.resx True + SettingsSingleFileGenerator diff --git a/Sunfish/Sunfish/app.config b/Sunfish/Sunfish/app.config new file mode 100644 index 0000000..fcd0c93 --- /dev/null +++ b/Sunfish/Sunfish/app.config @@ -0,0 +1,3 @@ + + +