public static void Main(string[] args) { // Parse command line arguments. Parser.Default.ParseArguments <Options>(args).WithParsed((a) => Arguments = a); // Convert relative paths to absolute paths. if (!Path.IsPathRooted(Arguments.Input)) { Arguments.Input = Path.GetFullPath(Application.StartupPath + Arguments.Input); } if (!Path.IsPathRooted(Arguments.Output)) { Arguments.Output = Path.GetFullPath(Application.StartupPath + Arguments.Output); } // Start the GUI if no arguments are passed. if (args.Length == 0) { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new Encdec()); } else if (!string.IsNullOrEmpty(Arguments.GetFilePath)) { using SingleExtract file = new SingleExtract(Arguments.GetFilePath); } else { Explorer.RefreshExplorer(); if (Arguments.Unpack) { SDK.InitExtraction(true); } if (Arguments.Decode) { SDK.InitDecoding(true); } if (Arguments.Repack) { SDK.InitRepacking(true); } } }
/// <summary> /// Decode button click handler. /// </summary> private void DecodeButton_Click(object sender, EventArgs e) => SDK.InitDecoding();