private void Client_OnRegistrationForm(object Sender, DataForm Form) { Field FormType = Form["FORM_TYPE"]; if (FormType != null && FormType.ValueString == "urn:xmpp:captcha") { ParameterDialog Dialog = new ParameterDialog(Form); MainWindow.currentInstance.Dispatcher.Invoke(() => Dialog.ShowDialog()); } else { Form.Submit(); } }
private Task Client_OnRegistrationForm(object _, DataForm Form) { Field FormType = Form["FORM_TYPE"]; if (FormType != null && FormType.ValueString == "urn:xmpp:captcha") { ParameterDialog Dialog = new ParameterDialog(Form); MainWindow.UpdateGui(() => Dialog.ShowDialog()); } else { Form.Submit(); } return(Task.CompletedTask); }