private void ExecuteOkClick(object parameter)
 {
     OkAction?.Invoke();
     if (parameter is Window window)
     {
         window.Close();
     }
 }
Example #2
0
        public RenameForm(string label, string oldName, OkAction ok)
        {
            InitializeComponent();

            Label.Text     = label;
            OnOk           = ok;
            OldName        = oldName;
            NameInput.Text = oldName;

            DataContext = this;
            NameInput.Focus();
        }
Example #3
0
 void ViewModel_OnOk(object sender, EventArgs e)
 {
     OkAction?.Invoke();
     CloseView();
 }
Example #4
0
 public void SetAndShow(string message, OkAction action)
 {
     gameObject.SetActive(true);
     _messagetext.text = message;
     OnClicked         = action;
 }
Example #5
0
 public void ShowForm(OkAction okAction)
 {
     clean();
     this.okAction = okAction;
     gameObject.SetActive(true);
 }