private void ExecuteOkClick(object parameter) { OkAction?.Invoke(); if (parameter is Window window) { window.Close(); } }
public RenameForm(string label, string oldName, OkAction ok) { InitializeComponent(); Label.Text = label; OnOk = ok; OldName = oldName; NameInput.Text = oldName; DataContext = this; NameInput.Focus(); }
void ViewModel_OnOk(object sender, EventArgs e) { OkAction?.Invoke(); CloseView(); }
public void SetAndShow(string message, OkAction action) { gameObject.SetActive(true); _messagetext.text = message; OnClicked = action; }
public void ShowForm(OkAction okAction) { clean(); this.okAction = okAction; gameObject.SetActive(true); }