private void OkCreate(object sender, RoutedEventArgs e) { List <int> IDs = new List <int>(); Common.UIElementCollectionToList(users.Children).Where((x) => ((CCheckUserItem)x).Selected).ToList().ForEach((x) => IDs.Add(((CCheckUserItem)x).User.ID)); clin.Client.CreateGroup(groupName.Text, IDs.ToArray()); OnOk?.Invoke(); }
public void OnOkCallback() { if (ConfirmLoading) { ShowLoading(); } OnOk?.Invoke(this); }
private void CloseFn(string output = null) { if (output != null && output.Length > 0) { OnOk?.Invoke(output); } Close(); }
/// <summary> /// Triggers on ok /// </summary> public void Ok(Object sender, EventArgs e) { if (Directory.Exists(ProjectLocation.Text)) { OnOk?.Invoke(ProjectName.Text, ProjectLocation.Text); CloseForm(); } else { ShowError("Location does not exist, or is invalid.\nPlease check the project save location and try again."); } }
public InputDialogViewModel() { DialogOk = new Command(() => { OnOk?.Invoke(this, null); }); DialogCancel = new Command(() => { OnCancel?.Invoke(this, null); }); }
protected override void OnInitDocument(Document document) { //add interactivity to the HTML. var okButton = (HtmlButtonElement)document.GetElementById("ok"); var cancelButton = (HtmlButtonElement)document.GetElementById("cancel"); cancelButton.OnClick += arg => { BeginInvoke(new Action(() => OnCancel?.Invoke(this, EventArgs.Empty))); return(true); }; okButton.OnClick += arg => { Login = ((HtmlInputElement)document.GetElementById("username")).Value; Password = ((HtmlInputElement)document.GetElementById("password")).Value; BeginInvoke(new Action(() => OnOk?.Invoke(this, EventArgs.Empty))); return(true); }; }
private void _ok(object obj) { OnOk?.Invoke(this, EventArgs.Empty); }
protected virtual bool CanOK(object parameter) { return(IsModified && OnOk?.Invoke(this) != false); }
private void _ok(object obj) { SaveToModel(); OnOk?.Invoke(this, EventArgs.Empty); }
private void InvokeOnOk() { OnOk?.Invoke(this, EventArgs.Empty); }
private void Button_Click(object sender, RoutedEventArgs e) { OnOk?.Invoke(this, new OnOkEventArgs(TopicName, Message)); }