Permalink
Browse files

Added missing files to the previous commit

  • Loading branch information...
FireCore, LLC
FireCore, LLC committed Jan 5, 2012
1 parent 7b0e212 commit 4d62df4a65b4119ed2cc507594f8c97128d216f2
Showing with 447 additions and 703 deletions.
  1. +0 −188 Seas0nPass/ArchiveUtils.cs
  2. +1 −1 Seas0nPass/Controls/StartControl.Designer.cs
  3. +10 −1 Seas0nPass/Controls/StartControl.cs
  4. +0 −39 Seas0nPass/HookResolver.cs
  5. +3 −0 Seas0nPass/Interfaces/IMainModel.cs
  6. +6 −0 Seas0nPass/Interfaces/IMainView.cs
  7. +2 −0 Seas0nPass/Interfaces/IStartView.cs
  8. +0 −138 Seas0nPass/LogUtil.cs
  9. +1 −0 Seas0nPass/MainForm.Designer.cs
  10. +60 −1 Seas0nPass/MainForm.cs
  11. +25 −8 Seas0nPass/Models/DFUModel.cs
  12. +13 −9 Seas0nPass/Models/DownloadModel.cs
  13. +1 −0 Seas0nPass/Models/FirmwareVersion.cs
  14. +2 −1 Seas0nPass/Models/FirmwareVersionDetector.cs
  15. +58 −10 Seas0nPass/Models/FirmwareVersionModel.cs
  16. +1 −0 Seas0nPass/Models/ITunesAutomationModel.cs
  17. +30 −25 Seas0nPass/Models/ITunesInfoProvider.cs
  18. +26 −3 Seas0nPass/Models/MainModel.cs
  19. +1 −0 Seas0nPass/Models/PatchCommands/CommandResult.cs
  20. +3 −2 Seas0nPass/Models/PatchCommands/CopyCommand.cs
  21. +2 −1 Seas0nPass/Models/PatchCommands/CopydirCommand.cs
  22. +2 −1 Seas0nPass/Models/PatchCommands/DeleteCommand.cs
  23. +3 −2 Seas0nPass/Models/PatchCommands/ExecCommand.cs
  24. +2 −1 Seas0nPass/Models/PatchCommands/MoveCommand.cs
  25. +2 −1 Seas0nPass/Models/PatchCommands/ResetdirCommand.cs
  26. +1 −0 Seas0nPass/Models/PatchCommands/UngzipCommand.cs
  27. +1 −0 Seas0nPass/Models/PatchCommands/UnzipCommand.cs
  28. +25 −12 Seas0nPass/Models/PatchModel.cs
  29. +25 −27 Seas0nPass/Models/TetherModel.cs
  30. +6 −4 Seas0nPass/Models/UniversalPatch.cs
  31. +42 −2 Seas0nPass/Presenters/MainPresenter.cs
  32. +38 −11 Seas0nPass/Program.cs
  33. +3 −3 Seas0nPass/Properties/AssemblyInfo.cs
  34. +3 −3 Seas0nPass/Properties/AssemblyInfo.tpl
  35. BIN Seas0nPass/Resources/Binaries.zip
  36. +26 −15 Seas0nPass/ScriptResource.Designer.cs
  37. +3 −3 Seas0nPass/ScriptResource.resx
  38. +16 −6 Seas0nPass/Seas0nPass.csproj
  39. +0 −184 Seas0nPass/Utils.cs
  40. +4 −1 Seas0nPass/app.config
View
@@ -1,188 +0,0 @@
-////
-//
-// Seas0nPass
-//
-// Copyright 2011 FireCore, LLC. All rights reserved.
-// http://firecore.com
-//
-////
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.IO;
-using ICSharpCode.SharpZipLib.Zip;
-using ICSharpCode.SharpZipLib.Tar;
-using ICSharpCode.SharpZipLib.GZip;
-using ICSharpCode.SharpZipLib.Core;
-using System.IO.Compression;
-
-namespace Seas0nPass
-{
- public static class ArchiveUtils
- {
-
- public static void CreateSample(string outPathname, string password, List<String> contents)
- {
-
- FileStream fsOut = File.Create(outPathname);
- ZipOutputStream zipStream = new ZipOutputStream(fsOut);
-
- zipStream.SetLevel(3); //0-9, 9 being the highest level of compression
-
- zipStream.Password = password; // optional. Null is the same as not setting.
-
- foreach (string filename in contents)
- {
-
- string entryName = ZipEntry.CleanName(filename); // Removes drive from name and fixes slash direction
- ZipEntry newEntry = new ZipEntry(entryName);
- newEntry.DateTime = DateTime.Now;
-
- // Specifying the AESKeySize triggers AES encryption. Allowable values are 0 (off), 128 or 256.
- // newEntry.AESKeySize = 256;
-
- // To permit the zip to be unpacked by built-in extractor in WinXP and Server2003, WinZip 8, Java, and other older code,
- // you need to do one of the following: Specify UseZip64.Off, or set the Size.
- // If the file may be bigger than 4GB, or you do not need WinXP built-in compatibility, you do not need either,
- // but the zip will be in Zip64 format which not all utilities can understand.
- // zipStream.UseZip64 = UseZip64.Off;
-
- zipStream.UseZip64 = UseZip64.Off;
-
- zipStream.PutNextEntry(newEntry);
-
- // Zip the file in buffered chunks
- // the "using" will close the stream even if an exception occurs
- byte[] buffer = new byte[4096];
- using (FileStream streamReader = File.OpenRead(filename))
- {
- StreamUtils.Copy(streamReader, zipStream, buffer);
- }
- zipStream.CloseEntry();
- }
- zipStream.IsStreamOwner = true; // Makes the Close also Close the underlying stream
- zipStream.Close();
- }
-
- public static void ExtractGZip(string gzipFileName, string targetDir, string targetName)
- {
-
- byte[] dataBuffer = new byte[4096];
-
- using (System.IO.Stream fs = new FileStream(gzipFileName, FileMode.Open, FileAccess.Read))
- {
- using (GZipInputStream gzipStream = new GZipInputStream(fs))
- {
-
- // Change this to your needs
- string fnOut = Path.Combine(targetDir, targetName);
-
- using (FileStream fsOut = File.Create(fnOut))
- {
- StreamUtils.Copy(gzipStream, fsOut, dataBuffer);
- }
- }
- }
- }
-
- public static void ExtractZipFile(string archiveFilenameIn, string password, string outFolder)
- {
- ZipFile zf = null;
- try
- {
- FileStream fs = File.OpenRead(archiveFilenameIn);
- zf = new ZipFile(fs);
- if (!String.IsNullOrEmpty(password))
- {
- zf.Password = password; // AES encrypted entries are handled automatically
- }
- foreach (ZipEntry zipEntry in zf)
- {
- if (!zipEntry.IsFile)
- {
- continue; // Ignore directories
- }
- String entryFileName = zipEntry.Name;
- // to remove the folder from the entry:- entryFileName = Path.GetFileName(entryFileName);
- // Optionally match entrynames against a selection list here to skip as desired.
- // The unpacked length is available in the zipEntry.Size property.
-
- byte[] buffer = new byte[4096]; // 4K is optimum
- Stream zipStream = zf.GetInputStream(zipEntry);
-
- // Manipulate the output filename here as desired.
- String fullZipToPath = Path.Combine(outFolder, entryFileName);
- string directoryName = Path.GetDirectoryName(fullZipToPath);
- if (directoryName.Length > 0)
- Directory.CreateDirectory(directoryName);
-
- // Unzip file in buffered chunks. This is just as fast as unpacking to a buffer the full size
- // of the file, but does not waste memory.
- // The "using" will close the stream even if an exception occurs.
- using (FileStream streamWriter = File.Create(fullZipToPath))
- {
- StreamUtils.Copy(zipStream, streamWriter, buffer);
- }
- }
- }
- finally
- {
- if (zf != null)
- {
- zf.IsStreamOwner = true; // Makes close also shut the underlying stream
- zf.Close(); // Ensure we release resources
- }
- }
- }
-
- public static void GetViaZipInput(Stream inputStream, string outFolder)
- {
- ZipFile zf = null;
- try
- {
-
- zf = new ZipFile(inputStream);
- foreach (ZipEntry zipEntry in zf)
- {
- if (!zipEntry.IsFile)
- {
- continue; // Ignore directories
- }
- String entryFileName = zipEntry.Name;
- // to remove the folder from the entry:- entryFileName = Path.GetFileName(entryFileName);
- // Optionally match entrynames against a selection list here to skip as desired.
- // The unpacked length is available in the zipEntry.Size property.
-
- byte[] buffer = new byte[4096]; // 4K is optimum
- Stream zipStream = zf.GetInputStream(zipEntry);
-
- // Manipulate the output filename here as desired.
- String fullZipToPath = Path.Combine(outFolder, entryFileName);
- string directoryName = Path.GetDirectoryName(fullZipToPath);
- if (directoryName.Length > 0)
- Directory.CreateDirectory(directoryName);
-
- // Unzip file in buffered chunks. This is just as fast as unpacking to a buffer the full size
- // of the file, but does not waste memory.
- // The "using" will close the stream even if an exception occurs.
- using (FileStream streamWriter = File.Create(fullZipToPath))
- {
- StreamUtils.Copy(zipStream, streamWriter, buffer);
- }
- }
- }
- finally
- {
- if (zf != null)
- {
- zf.IsStreamOwner = true; // Makes close also shut the underlying stream
- zf.Close(); // Ensure we release resources
- }
- }
- }
-
-
-
- }
-}

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
@@ -34,6 +34,7 @@ public StartControl()
tetherNotRequiredImage = tetheredPictureBox.BackgroundImage;
tetherDisabledImage = tetheredPictureBox.InitialImage;
tetherEnabledImage = tetheredPictureBox.ErrorImage;
+
}
public event EventHandler<CreateIPSWFirmwareClickedEventArgs> CreateIPSW_fwVersion_Clicked;
@@ -70,7 +71,7 @@ private void tetheredPoctureBox_Click(object sender, EventArgs e)
}
public void DisableTether()
- {
+ {
tetheredPictureBox.BackgroundImage = tetherDisabledImage;
tetheredPictureBox.Enabled = false;
tetherLabel.Enabled = false;
@@ -139,5 +140,13 @@ public SynchronizationContext SyncContext
{
get { return new WindowsFormsSynchronizationContext(); }
}
+
+
+ public void ResetState()
+ {
+ SetPressedState(tetheredPictureBox, false);
+ SetPressedState(ipswPictureBox, false);
+
+ }
}
}
View
@@ -1,39 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Reflection;
-using System.IO;
-
-namespace Seas0nPass
-{
- public class HookResolver
- {
- Dictionary<string, Assembly> _loaded;
-
- public HookResolver()
- {
- _loaded = new Dictionary<string, Assembly>(StringComparer.OrdinalIgnoreCase);
- AppDomain.CurrentDomain.AssemblyResolve += new ResolveEventHandler(CurrentDomain_AssemblyResolve);
- }
-
- System.Reflection.Assembly CurrentDomain_AssemblyResolve(object sender, ResolveEventArgs args)
- {
- string name = "Seas0nPass.Resources." + args.Name.Split(',')[0] + ".dll";
- Assembly asm;
- lock (_loaded)
- {
- if (!_loaded.TryGetValue(name, out asm))
- {
- using (Stream io = this.GetType().Assembly.GetManifestResourceStream(name))
- {
- byte[] bytes = new BinaryReader(io).ReadBytes((int)io.Length);
- asm = Assembly.Load(bytes);
- _loaded.Add(name, asm);
- }
- }
- }
- return asm;
- }
- }
-}
@@ -17,5 +17,8 @@ public interface IMainModel
{
bool IsTetherPossible();
void SetFirmwareVersionModel(IFirmwareVersionModel firmwareVersionModel);
+
+ IEnumerable<string> GetProgramsToWarnNames();
+
}
}
@@ -20,7 +20,13 @@ public interface IMainView
void ShowControl(IView control);
void ShowTetherMessage(string fwName);
void ShowNotEnoughFreeSpaceMessage();
+ void ShowCantAccessOriginalFirmwareMessage(string fileName);
void ShowManualRestoreInstructions(string fileName);
void ShowCompatibleITunesVersionIsNotInstalled(string requiredITunesVersion, string installedITunesVersion);
+ void ShowProgramsWarning(IEnumerable<string> programNames);
+ void ShowCrashMessage();
+
+
+ event EventHandler Loaded;
}
}
@@ -28,5 +28,7 @@ public interface IStartView : IView
void EnableTether();
void SetTetherNotRequiredState();
void InitFirmwaresList(FirmwareVersion[] firmwares);
+
+ void ResetState();
}
}
Oops, something went wrong.

0 comments on commit 4d62df4

Please sign in to comment.