Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Generate Export ID, pass in command line arguments, disable UI
  • Loading branch information
bertrandom committed Oct 19, 2018
1 parent 0afd152 commit 735e3bc
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
8 changes: 4 additions & 4 deletions SatellaWave/SatellaWave/MainWindow.cs
Expand Up @@ -100,11 +100,11 @@ private void exportToolStripMenuItem_Click(object sender, EventArgs e)
{
fsd.InitialDirectory = Program.lastExportDirectory;
}
if (fsd.ShowDialog())
{
//if (fsd.ShowDialog())
//{
//No \ at the end
Program.ExportBSX(fsd.FileName);
}
//Program.ExportBSX(fsd.FileName);
//}
}

private void addChannelToolStripMenuItem_Click(object sender, EventArgs e)
Expand Down
14 changes: 12 additions & 2 deletions SatellaWave/SatellaWave/Program.cs
Expand Up @@ -103,9 +103,19 @@ static void Main()
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);

string[] arguments = Environment.GetCommandLineArgs();

string repoFile = arguments[arguments.Length - 2];
string exportFolder = arguments[arguments.Length - 1];
mainWindow = new MainWindow();

Application.Run(mainWindow);
Random r = new Random();
lastExportID = (byte)r.Next(0, 5000);

LoadBSXRepository(repoFile);
ExportBSX(exportFolder);

//Application.Run(mainWindow);
}

public static void NewRepository()
Expand Down Expand Up @@ -2564,7 +2574,7 @@ public static void ExportBSX(string folderPath)
mapfile.Close();

lastExportID++;
MessageBox.Show("Export is a success.", "Export", MessageBoxButtons.OK);
// MessageBox.Show("Export is a success.", "Export", MessageBoxButtons.OK);
}

public static void SaveChannelFile(byte[] filedata, ushort lci, string folderPath)
Expand Down

0 comments on commit 735e3bc

Please sign in to comment.