Permalink
Browse files

Generate Export ID, pass in command line arguments, disable UI

  • Loading branch information...
bertrandom committed Oct 19, 2018
1 parent 0afd152 commit 735e3bc90ed7c1c50fd02d6626690ffa5c6f21f6
Showing with 16 additions and 6 deletions.
  1. +4 −4 SatellaWave/SatellaWave/MainWindow.cs
  2. +12 −2 SatellaWave/SatellaWave/Program.cs
@@ -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)
@@ -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()
@@ -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)

0 comments on commit 735e3bc

Please sign in to comment.