private void Form1_Load(object sender, EventArgs e) { this.toolStripStatusLabel1.Text = "SharpTune Version " + sharpTuner.Version; MessageBox.Show(@" This program 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. This program 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. " + @"THIS SOFTWARE IS PROVIDED 'AS IS' AND WITHOUT ANY WARRANTY OF ANY KIND, WHETHER ORAL, WRITTEN, EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT. FOR OFF-ROAD USE ONLY. " + @"Source code for this program and all included software, patches, data, and information can be found at: http://github.com/Merp/SharpTune http://github.com/Merp/MerpMod http://github.com/Merp/SubaruDefs.", "SharpTune"); // Instantiate the writer //TODO switch to traces instead of console redirection. _writer = new TextBoxStreamWriter(txtConsole); // Redirect the out Console stream Console.SetOut(_writer); sharpTuner.Init(); }
/// <summary> /// Determines which command to run. /// </summary> private static bool Run(string[] args) { if (args.Length < 1) { SharpTune.Program.RomModGui(); return(true); } SharpTuner.Init(); if (args[0] == "ecumaptool") { return(EcuMapTool.Run(Utils.ShiftLeftTruncate(args))); } else if (args[0] == "rommod") { return(SharpTune.RomMod.RomMod.Run(Utils.ShiftLeftTruncate(args))); } else if (args[0] == "xmltoidc") { //TODO FIX THIS!! //NSFW.XMLtoIDC.Run(args); } else if (args.Length == 2 && args[0] == "help") { PrintHelp(args[1]); return(true); } else if (args[0] == "deftools") { Trace.WriteLine("Running definition tools!"); return(DefinitionTools.DefinitionTool(args)); } return(false); }
/// <summary> /// Determines which command to run. /// </summary> private static bool Run(string[] args) { if (args.Length < 1) { SharpTune.Program.RomModGui(); return(true); } SharpTuner.Init(); if (args[0] == "convtools") { return(ConvTool.Run(Utils.ShiftLeftTruncate(args))); } else if (args[0] == "rommod") { return(SharpTune.RomMod.RomMod.Run(Utils.ShiftLeftTruncate(args))); } else if (args[0] == "xmltoidc") { //TODO FIX THIS!! //NSFW.XMLtoIDC.Run(args); } else if (args.Length == 2 && args[0] == "help") { PrintHelp(args[1]); return(true); } return(false); }
/// <summary> /// Determines which command to run. /// </summary> private static bool Run(string[] args) { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); sharpTuner = new SharpTuner(); if (args.Length < 1) { Application.Run(sharpTuner.mainWindow); return(true); } else { sharpTuner.Init(); if (args[0] == "ecumaptool") { return(EcuMapTool.Run(sharpTuner.AvailableDevices, Utils.ShiftLeftTruncate(args))); } else if (args[0] == "rommod") { return(SharpTune.RomMod.RomMod.Run(sharpTuner.AvailableDevices, Utils.ShiftLeftTruncate(args))); } else if (args[0] == "xmlconvertor") { ECU di = new ECU(sharpTuner, args[1]); XMLtoIDC xti = new XMLtoIDC(di); //TODO clean up this routine: xti.Run(args); } else if (args.Length == 2 && args[0] == "help") { PrintHelp_RomMod(args[1]); return(true); } } return(false); }
private void Form1_Load(object sender, EventArgs e) { this.toolStripStatusLabel1.Text = "SharpTune Version " + SharpTuner.Version; MessageBox.Show("THIS SOFTWARE IS PROVIDED 'AS IS' AND WITHOUT ANY WARRANTY OF ANY KIND, WHETHER ORAL, WRITTEN, EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT.", "SharpTune"); // Instantiate the writer //TODO switch to traces instead of console redirection. _writer = new TextBoxStreamWriter(txtConsole); // Redirect the out Console stream Console.SetOut(_writer); SharpTuner.Init(); }
private void definitionLocationToolStripMenuItem_Click(object sender, EventArgs e) { FolderBrowserDialog d = new FolderBrowserDialog(); if (SharpTuner.ActiveImage != null) { string path = SharpTuner.ActiveImage.ToString(); d.SelectedPath = path; } DialogResult ret = Utils.STAShowFDialog(d); if (ret == DialogResult.OK) { Settings.Default.SubaruDefsRepoPath = d.SelectedPath.ToString(); SharpTuner.Init(); SharpTuner.RefreshImages(); } }
/// <summary> /// Determines which command to run. /// </summary> private static bool Run(string[] args) { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); sharpTuner = new SharpTuner(); if (args.Length < 1) { Application.Run(sharpTuner.mainWindow); return true; } else { sharpTuner.Init(); if (args[0] == "ecumaptool") { return EcuMapTool.Run(sharpTuner.AvailableDevices, Utils.ShiftLeftTruncate(args)); } else if (args[0] == "rommod") { return SharpTune.RomMod.RomMod.Run(sharpTuner.AvailableDevices, Utils.ShiftLeftTruncate(args)); } else if (args[0] == "xmlconvertor") { ECU di = new ECU(sharpTuner, args[1]); XMLtoIDC xti = new XMLtoIDC(di); //TODO clean up this routine: xti.Run(args); } else if (args.Length == 2 && args[0] == "help") { PrintHelp_RomMod(args[1]); return true; } } return false; }