Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Generate Export ID, pass in command line arguments, disable UI
- Loading branch information
Showing
with
16 additions
and
6 deletions.
-
+4
−4
SatellaWave/SatellaWave/MainWindow.cs
-
+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) |
|
|