internal async Task ServerStartingNotification(ServerStartingNotification notification) { if (ServerStarting != null) { await ServerStarting?.Invoke(notification); } }
/// <summary> /// Button event to start/stop the server. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void startServerToggleButton_CheckedChanged(object sender, EventArgs e) { if (startServerToggleButton.Checked) { ServerStarting?.Invoke(sender, e); InvokeUI(() => { startServerToggleButton.Text = "Stop"; clearButton.Enabled = true; }); } else { ServerEnding?.Invoke(sender, e); InvokeUI(() => { startServerToggleButton.Text = "Start"; clearButton.Enabled = false; }); } }
protected virtual void OnServerStarting(string e) { ServerStarting?.Invoke(this, e); }
protected void OnServerStarting() { ServerStarting?.Invoke(mvarID); }
private void StartServerButton_OnClick(object sender, RoutedEventArgs e) { ServerStarting?.Invoke(this, ServerNameTextBox.Text); BuildServerName(); }