private async void Main_Load(object sender, EventArgs e) { if (!initialized) { return; } showMsg("Starting SuperADD Daemon...", loadImg, true, false); await SuperADDDaemon.Start(); hideMsg(); if (desktopMode) { showPassPrompt(); } if (autoRunIndex > -1 && autoRunIndex < OUList.Items.Count) { OUList.SelectedIndex = autoRunIndex; if (autoRunContinue) { autoRunIndex = -2; } else { autoRunIndex = -1; } } }
private async void Main_FormClosing(object sender, FormClosingEventArgs e) { showMsg("Stopping SuperADD Daemon...", loadImg, true, false); if (SuperADDDaemon.ServerStarted) { e.Cancel = true; await SuperADDDaemon.Stop(); Close(); } }