diff --git a/TransmitMii.sln b/TransmitMii.sln index 29583a5..8215fad 100644 --- a/TransmitMii.sln +++ b/TransmitMii.sln @@ -1,6 +1,6 @@  -Microsoft Visual Studio Solution File, Format Version 10.00 -# Visual C# Express 2008 +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TransmitMii", "TransmitMii\TransmitMii.csproj", "{70517550-06FA-4743-B5D7-2CB7C153E35E}" EndProject Global diff --git a/TransmitMii.suo b/TransmitMii.suo deleted file mode 100644 index f8a1f31..0000000 Binary files a/TransmitMii.suo and /dev/null differ diff --git a/TransmitMii/Properties/AssemblyInfo.cs b/TransmitMii/Properties/AssemblyInfo.cs index 86c1410..cd1aa8b 100644 --- a/TransmitMii/Properties/AssemblyInfo.cs +++ b/TransmitMii/Properties/AssemblyInfo.cs @@ -49,5 +49,5 @@ using System.Runtime.InteropServices; // Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern // übernehmen, indem Sie "*" eingeben: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.2.0.0")] -[assembly: AssemblyFileVersion("1.2.0.0")] +[assembly: AssemblyVersion("1.3.0.0")] +[assembly: AssemblyFileVersion("1.3.0.0")] diff --git a/TransmitMii/Properties/Resources.Designer.cs b/TransmitMii/Properties/Resources.Designer.cs index a2dbdb5..477772c 100644 --- a/TransmitMii/Properties/Resources.Designer.cs +++ b/TransmitMii/Properties/Resources.Designer.cs @@ -1,27 +1,10 @@ -/* This file is part of TransmitMii - * Copyright (C) 2009 Leathl - * - * TransmitMii is free software: you can redistribute it and/or - * modify it under the terms of the GNU General Public License as published - * by the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * TransmitMii is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty - * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // -// Dieser Code wurde von einem Tool generiert. -// Laufzeitversion:2.0.50727.4927 +// This code was generated by a tool. +// Runtime Version:4.0.30128.1 // -// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn -// der Code erneut generiert wird. +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. // //------------------------------------------------------------------------------ @@ -30,13 +13,13 @@ namespace TransmitMii.Properties { /// - /// Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw. + /// A strongly-typed resource class, for looking up localized strings, etc. /// - // Diese Klasse wurde von der StronglyTypedResourceBuilder automatisch generiert - // -Klasse über ein Tool wie ResGen oder Visual Studio automatisch generiert. - // Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen - // mit der /str-Option erneut aus, oder Sie erstellen Ihr VS-Projekt neu. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0")] + // This class was auto-generated by the StronglyTypedResourceBuilder + // 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.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] internal class Resources { @@ -50,7 +33,7 @@ namespace TransmitMii.Properties { } /// - /// Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird. + /// Returns the cached ResourceManager instance used by this class. /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] internal static global::System.Resources.ResourceManager ResourceManager { @@ -64,8 +47,8 @@ namespace TransmitMii.Properties { } /// - /// Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle - /// Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden. + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] internal static global::System.Globalization.CultureInfo Culture { diff --git a/TransmitMii/Properties/Settings.Designer.cs b/TransmitMii/Properties/Settings.Designer.cs index 211b201..9637b81 100644 --- a/TransmitMii/Properties/Settings.Designer.cs +++ b/TransmitMii/Properties/Settings.Designer.cs @@ -1,10 +1,10 @@ //------------------------------------------------------------------------------ // -// Dieser Code wurde von einem Tool generiert. -// Laufzeitversion:2.0.50727.4927 +// This code was generated by a tool. +// Runtime Version:4.0.30128.1 // -// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn -// der Code erneut generiert wird. +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. // //------------------------------------------------------------------------------ @@ -12,7 +12,7 @@ namespace TransmitMii.Properties { [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "9.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.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/TransmitMii/Readme.txt b/TransmitMii/Readme.txt index e307ef3..b3bc0cc 100644 --- a/TransmitMii/Readme.txt +++ b/TransmitMii/Readme.txt @@ -9,6 +9,9 @@ TransmitMii is hosted on the CustomizeMii project page: http://customizemii.goog ----------------------------------------------------------------------------------------- Changelog: +Version 1.3 + - Fixed sending zip files + Version 1.2 - Improvement in startup speed (thanks shadow1643) - Added ability to send ZIPs (to HBC) diff --git a/TransmitMii/TransmitMii.csproj b/TransmitMii/TransmitMii.csproj index e684ca6..d00562e 100644 --- a/TransmitMii/TransmitMii.csproj +++ b/TransmitMii/TransmitMii.csproj @@ -1,5 +1,5 @@  - + Debug AnyCPU @@ -12,8 +12,6 @@ TransmitMii v2.0 512 - - Resources\TransmitMii Icon.ico publish\ true @@ -30,6 +28,10 @@ false false true + + + 3.5 + true @@ -41,6 +43,7 @@ 4 + AllRules.ruleset pdbonly @@ -51,6 +54,7 @@ 4 + AllRules.ruleset true @@ -59,6 +63,7 @@ full x86 prompt + AllRules.ruleset bin\x86\Release\ @@ -67,6 +72,7 @@ pdbonly x86 prompt + AllRules.ruleset diff --git a/TransmitMii/TransmitMii.csproj.user b/TransmitMii/TransmitMii.csproj.user index 3258829..dc40f19 100644 --- a/TransmitMii/TransmitMii.csproj.user +++ b/TransmitMii/TransmitMii.csproj.user @@ -1,4 +1,5 @@ - + + publish\ diff --git a/TransmitMii/TransmitMii_Main.cs b/TransmitMii/TransmitMii_Main.cs index 5735700..b14f2fb 100644 --- a/TransmitMii/TransmitMii_Main.cs +++ b/TransmitMii/TransmitMii_Main.cs @@ -27,7 +27,7 @@ namespace TransmitMii { public partial class TransmitMii_Main : Form { - const string version = "1.2"; //Hint for myself: Never use a char in the Version (UpdateCheck)! + const string version = "1.3"; //Hint for myself: Never use a char in the Version (UpdateCheck)! private bool IsRunning = false; private string fileName; private string statusText; @@ -182,7 +182,7 @@ namespace TransmitMii bwTransmit.CancelAsync(); - try { theStream.Close(); ; } + try { theStream.Close(); } catch { } try { theClient.Close(); } catch { } diff --git a/TransmitMii/TransmitMii_Transmit.cs b/TransmitMii/TransmitMii_Transmit.cs index 00ea125..3e7a0d7 100644 --- a/TransmitMii/TransmitMii_Transmit.cs +++ b/TransmitMii/TransmitMii_Transmit.cs @@ -65,8 +65,9 @@ namespace TransmitMii theClient = new TcpClient(); byte[] compFileData; - int Blocksize = 4 * 1024; - if (protocol != Protocol.JODI) Blocksize = 16 * 1024; + //int Blocksize = 4 * 1024; + int Blocksize = 64 * 1024; //Had problems with smaller values and bigger files... + if (protocol == Protocol.HAXX) Blocksize = 16 * 1024; byte[] buffer = new byte[4]; string theIP = tbIP.Text; @@ -85,7 +86,7 @@ namespace TransmitMii StatusUpdate("Magic Sent... Sending Version Info..."); buffer[0] = 0; - buffer[1] = protocol == Protocol.JODI ? (byte)5 : (byte)4; + buffer[1] = protocol != Protocol.HAXX ? (byte)5 : (byte)4; buffer[2] = (byte)(((fileName.Length + 2) >> 8) & 0xff); buffer[3] = (byte)((fileName.Length + 2) & 0xff); @@ -95,11 +96,11 @@ namespace TransmitMii if (compress) { StatusUpdate("Version Info Sent... Compressing File..."); - try { compFileData = zlib.Compress(fileData); } + try { byte[] temp = zlib.Compress(fileData); compFileData = temp; } catch { //Compression failed, let's continue without compression - if (!Aborted) ErrorBox("a"); + compress = false; compFileData = fileData; fileData = new byte[0]; } @@ -122,7 +123,7 @@ namespace TransmitMii try { theStream.Write(buffer, 0, 4); } catch (Exception ex) { if (!Aborted) ErrorBox("Error sending Filesize:\n" + ex.Message); theStream.Close(); theClient.Close(); return false; } - if (compress) + if (protocol != Protocol.HAXX) { buffer[0] = (byte)((fileData.Length >> 24) & 0xff); buffer[1] = (byte)((fileData.Length >> 16) & 0xff); @@ -152,6 +153,8 @@ namespace TransmitMii { theStream.Write(compFileData, off, compFileData.Length - off); } + + //theStream.Write(compFileData, 0, compFileData.Length); } catch (Exception ex) { if (!Aborted) ErrorBox("Error sending File:\n" + ex.Message); theStream.Close(); theClient.Close(); return false; } diff --git a/TransmitMii/TransmitMii_zlib.cs b/TransmitMii/TransmitMii_zlib.cs index 4bf2508..ab99446 100644 --- a/TransmitMii/TransmitMii_zlib.cs +++ b/TransmitMii/TransmitMii_zlib.cs @@ -47,7 +47,7 @@ namespace TransmitMii err = compress2(outFile, ref outLength, inFile, inFile.Length, 6); - if (err == ZLibError.Z_OK && outLength > -1) + if (err == ZLibError.Z_OK && (outLength > -1 && outLength < inFile.Length)) { Array.Resize(ref outFile, outLength); return outFile;