public bool CloseFile() { if (haveBeenEdited) { DialogResult dr = MessageBox.Show("Close", "Do you want to close?", MessageBoxButtons.YesNoCancel); if (dr == DialogResult.Yes) { // tpsn.PrintState(); // tusr.PrintState(); unlocker.Save(); } else if (dr == DialogResult.No) { } else { return(false); } } unlocker = null; EmptyAllCompoment(); haveBeenEdited = false; 重新整理ToolStripMenuItem.Enabled = false; 進階ToolStripMenuItem.Enabled = false; if (isOpen) { //if(consoleComboBoxSelection.SelectedIndex ==0) Utility.encryptTrophy(path,toolStripComboBox2.Text); isOpen = false; } return(true); }
public InstallService(Logger logger, IFindInstaller findInstaller, IProcessController processController, InstallerContextFactory installerContextFactory, IFileTransferService fileTransferService, Func <InstallerBase[]> installWhisperers, Func <UninstallerBase[]> uninstallers, IHub hub, IUnlocker unlocker, NovoClient novoClient, InstallerArgFactory argFactory) { _logger = logger; _findInstaller = findInstaller; _processController = processController; _installerContextFactory = installerContextFactory; _fileTransferService = fileTransferService; _installWhisperers = installWhisperers; _uninstallers = uninstallers; _hub = hub; _unlocker = unlocker; _novoClient = novoClient; _argFactory = argFactory; }
public LaunchLockProcess( IConfiguration configuration, ILockFinder lockFinder, ILockReader lockReader, ILockBuilder lockBuilder, ILockWriter lockWriter, ICommunicator communicator, IFileSystem fileSystem, IUnlocker unlocker, ILauncher launcher) { Configuration = configuration ?? throw new System.ArgumentException(nameof(configuration)); LockFinder = lockFinder ?? throw new ArgumentException(nameof(lockFinder)); LockBuilder = lockBuilder ?? throw new ArgumentException(nameof(lockBuilder)); LockReader = lockReader ?? throw new ArgumentException(nameof(lockReader)); LockWriter = lockWriter ?? throw new ArgumentException(nameof(lockWriter)); Communicator = communicator ?? throw new ArgumentException(nameof(communicator)); FileSystem = fileSystem ?? throw new ArgumentException(nameof(fileSystem)); Unlocker = unlocker ?? throw new ArgumentException(nameof(unlocker)); Launcher = launcher ?? throw new ArgumentException(nameof(launcher)); }
private void OpenFile(string path_in) { try { if (isOpen) { CloseFile(); } path = path_in; //if(consoleComboBoxSelection.SelectedIndex == 0) Utility.decryptTrophy(path); if (consoleComboBoxSelection.SelectedIndex == 0) { unlocker = new PS3Unlocker(path); } else { unlocker = new VitaUnlocker(path); } //tconf = new TROPCONF(path); //tpsn = new TROPTRNS(path); //tusr = new TROPUSR(path); //tpsn.PrintState(); // tusr.PrintState(); RefreashCompoment(); isOpen = true; 重新整理ToolStripMenuItem.Enabled = true; 進階ToolStripMenuItem.Enabled = true; } catch (Exception ex) { unlocker = null; //tconf = null; //tpsn = null; //tusr = null; GC.Collect(); //if (consoleComboBoxSelection.SelectedIndex == 0) Utility.encryptTrophy(path, toolStripComboBox2.Text); Console.WriteLine(ex.StackTrace); MessageBox.Show("Open Failed:" + ex.Message); } }