diff --git a/.vs/SAMPLauncherNET/v15/.suo b/.vs/SAMPLauncherNET/v15/.suo index 01cef5d..e4e79b4 100644 Binary files a/.vs/SAMPLauncherNET/v15/.suo and b/.vs/SAMPLauncherNET/v15/.suo differ diff --git a/SAMPLauncherNET/Properties/AssemblyInfo.cs b/SAMPLauncherNET/Properties/AssemblyInfo.cs index 89104ed..12d2dc2 100644 --- a/SAMPLauncherNET/Properties/AssemblyInfo.cs +++ b/SAMPLauncherNET/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ // Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden, // übernehmen, indem Sie "*" eingeben: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.6.6")] -[assembly: AssemblyFileVersion("1.0.6.6")] +[assembly: AssemblyVersion("1.0.6.7")] +[assembly: AssemblyFileVersion("1.0.6.7")] diff --git a/SAMPLauncherNET/Source/SAMPLauncherNET/Core/PluginProvider.cs b/SAMPLauncherNET/Source/SAMPLauncherNET/Core/PluginProvider.cs index 1326547..301e8c2 100644 --- a/SAMPLauncherNET/Source/SAMPLauncherNET/Core/PluginProvider.cs +++ b/SAMPLauncherNET/Source/SAMPLauncherNET/Core/PluginProvider.cs @@ -44,7 +44,7 @@ private static string GetDownloadURL(string infoPath, string githubAPIURL, ref G { try { - using (FileStream stream = File.Open(infoPath, FileMode.Open)) + using (FileStream stream = File.Open(infoPath, FileMode.Open, FileAccess.Read)) { lastReleaseInfo = serializer.ReadObject(stream) as GitHubLatestReleaseDataContract; } diff --git a/SAMPLauncherNET/Source/SAMPLauncherNET/Core/SAMP.cs b/SAMPLauncherNET/Source/SAMPLauncherNET/Core/SAMP.cs index c2abfd4..4d00ff2 100644 --- a/SAMPLauncherNET/Source/SAMPLauncherNET/Core/SAMP.cs +++ b/SAMPLauncherNET/Source/SAMPLauncherNET/Core/SAMP.cs @@ -250,7 +250,7 @@ public static List APIIO { if (File.Exists(ServerListAPIPath)) { - using (FileStream stream = File.Open(ServerListAPIPath, FileMode.Open)) + using (FileStream stream = File.Open(ServerListAPIPath, FileMode.Open, FileAccess.Read)) { APIDataContract[] api_arr = (APIDataContract[])(apiSerializer.ReadObject(stream)); foreach (APIDataContract apidc in api_arr) @@ -310,7 +310,7 @@ public static PluginDataContract[] PluginsDataIO { if (File.Exists(PluginsDataPath)) { - using (FileStream stream = File.Open(PluginsDataPath, FileMode.Open)) + using (FileStream stream = File.Open(PluginsDataPath, FileMode.Open, FileAccess.Read)) { pluginsData = pluginsDataSerializer.ReadObject(stream) as PluginDataContract[]; } @@ -366,7 +366,7 @@ public static string Chatlog string ret = ""; try { - using (FileStream fs = File.Open(ChatlogPath, FileMode.Open)) + using (FileStream fs = File.Open(ChatlogPath, FileMode.Open, FileAccess.Read)) { using (StreamReader sr = new StreamReader(fs, Encoding.Default)) { @@ -392,7 +392,7 @@ public static string SavedPositions string ret = ""; try { - using (FileStream fs = File.Open(SavedPositionsPath, FileMode.Open)) + using (FileStream fs = File.Open(SavedPositionsPath, FileMode.Open, FileAccess.Read)) { using (StreamReader sr = new StreamReader(fs, Encoding.Default)) { diff --git a/SAMPLauncherNET/Source/SAMPLauncherNET/Core/SAMPCTLProvider.cs b/SAMPLauncherNET/Source/SAMPLauncherNET/Core/SAMPCTLProvider.cs index 0acd586..b9b1bbc 100644 --- a/SAMPLauncherNET/Source/SAMPLauncherNET/Core/SAMPCTLProvider.cs +++ b/SAMPLauncherNET/Source/SAMPLauncherNET/Core/SAMPCTLProvider.cs @@ -81,7 +81,7 @@ public static bool Update() { try { - using (FileStream stream = File.Open(SAMPCTLInfoPath, FileMode.Open)) + using (FileStream stream = File.Open(SAMPCTLInfoPath, FileMode.Open, FileAccess.Read)) { lastReleaseInfo = serializer.ReadObject(stream) as GitHubLatestReleaseDataContract; } @@ -148,7 +148,7 @@ public static bool Update() { if (File.Exists(SAMPCTLDownloadPath)) { - using (FileStream archive_file_stream = File.Open(SAMPCTLDownloadPath, FileMode.Open)) + using (FileStream archive_file_stream = File.Open(SAMPCTLDownloadPath, FileMode.Open, FileAccess.Read)) { using (GZipInputStream gzip_stream = new GZipInputStream(archive_file_stream)) { diff --git a/SAMPLauncherNET/Source/SAMPLauncherNET/Core/ServerListConnector.cs b/SAMPLauncherNET/Source/SAMPLauncherNET/Core/ServerListConnector.cs index 5e62ceb..660675d 100644 --- a/SAMPLauncherNET/Source/SAMPLauncherNET/Core/ServerListConnector.cs +++ b/SAMPLauncherNET/Source/SAMPLauncherNET/Core/ServerListConnector.cs @@ -184,7 +184,7 @@ public Dictionary ServerListIO switch (serverListType) { case EServerListType.Favourites: - using (FileStream stream = File.Open(Endpoint, FileMode.Open)) + using (FileStream stream = File.Open(Endpoint, FileMode.Open, FileAccess.Read)) { FavouriteDataContract[] favourites = (FavouriteDataContract[])(favouriteListJSONSerializer.ReadObject(stream)); foreach (FavouriteDataContract fdc in favourites) @@ -221,7 +221,7 @@ public Dictionary ServerListIO } break; case EServerListType.LegacyFavourites: - using (FileStream stream = File.Open(Endpoint, FileMode.Open)) + using (FileStream stream = File.Open(Endpoint, FileMode.Open, FileAccess.Read)) { using (BinaryReader reader = new BinaryReader(stream)) { diff --git a/SAMPLauncherNET/Source/SAMPLauncherNET/Core/Utils.cs b/SAMPLauncherNET/Source/SAMPLauncherNET/Core/Utils.cs index 6c713a4..89a5bb3 100644 --- a/SAMPLauncherNET/Source/SAMPLauncherNET/Core/Utils.cs +++ b/SAMPLauncherNET/Source/SAMPLauncherNET/Core/Utils.cs @@ -211,7 +211,7 @@ public static bool IsFileAvailable(string path) bool ret = true; try { - using (File.Open(path, FileMode.Open)) + using (File.Open(path, FileMode.Open, FileAccess.Read)) { // } diff --git a/SAMPLauncherNET/Source/SAMPLauncherNET/UI/Forms/MainForm.cs b/SAMPLauncherNET/Source/SAMPLauncherNET/UI/Forms/MainForm.cs index 8396b5a..e6a69d4 100644 --- a/SAMPLauncherNET/Source/SAMPLauncherNET/UI/Forms/MainForm.cs +++ b/SAMPLauncherNET/Source/SAMPLauncherNET/UI/Forms/MainForm.cs @@ -2281,9 +2281,17 @@ private void apiGridView_DoubleClick(object sender, EventArgs e) /// Key event arguments private void serversGridView_KeyUp(object sender, KeyEventArgs e) { - if (e.KeyCode == Keys.Delete) + switch (e.KeyCode) { - RemoveSelectionFromFavourites(false); + case Keys.Delete: + RemoveSelectionFromFavourites(false); + break; + case Keys.Return: + if (SelectedServer != null) + { + Connect(quitWhenDone: closeWhenLaunchedCheckBox.Checked, createSessionLog: createSessionsLogCheckBox.Checked); + } + break; } }