Commit 78ba2f17 authored by Vincent's avatar Vincent 💩

Working on Dive Selector

parent 5b162777
......@@ -221,11 +221,7 @@ namespace divecomputer_test {
SetReadProgress(100, true);
if (!writeAll) {
DiveSelector.Show();
DiveSelector.SetDives(allDives);
DiveSelector.OnDone += (source, a) => {
Console.WriteLine(a);
};
SelectDives(allDives);
} else {
writer.End();
......@@ -244,6 +240,18 @@ namespace divecomputer_test {
SetWriteProgress(100, false);
}
private void SelectDives(List<Dive> d) {
if (InvokeRequired) {
Invoke(new Action(() => { SelectDives(d); }));
} else {
DiveSelector.Show();
DiveSelector.SetDives(d);
DiveSelector.OnDone += (source, a) => {
Console.WriteLine(a);
};
}
}
private void DivecomputerWorker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) {
Invoke(new Action(() => {
if (currentTask.ctx != null) currentTask.ctx.Dispose();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment