1
0
mirror of https://github.com/fadden/6502bench.git synced 2024-07-11 02:28:54 +00:00

Support command-line invocation

This commit is contained in:
Andy McFadden 2018-10-08 16:18:56 -07:00
parent 2c03216da9
commit d728025144
2 changed files with 10 additions and 0 deletions

View File

@ -263,6 +263,15 @@ namespace SourceGen.AppForms {
UpdateRecentLinks();
ShowNoProject();
ProcessCommandLine();
}
private void ProcessCommandLine() {
string[] args = Environment.GetCommandLineArgs();
if (args.Length == 2) {
DoOpenFile(Path.GetFullPath(args[1]));
}
}
private void InitCodeListView() {

View File

@ -74,6 +74,7 @@ namespace SourceGen {
/// Loads platform symbols.
/// </summary>
/// <param name="fileIdent">Relative pathname of file to open.</param>
/// <param name="projectDir">Full path to project directory.</param>
/// <param name="report">Report of warnings and errors.</param>
/// <returns>True on success (no errors), false on failure.</returns>
public bool LoadFromFile(string fileIdent, string projectDir, out FileLoadReport report) {