public override void Evaluate() { if (OnYes != null) { OnYes.Evaluate(); } }
public override void Awake() { base.Awake(); yesButton.OnSelect.AddListener(() => { onYes?.Invoke(); OnYes?.Invoke(); gameObject.SetActive(false); }); noButton.OnSelect.AddListener(() => { onNo?.Invoke(); OnNo?.Invoke(); gameObject.SetActive(false); }); yesButton.OnDeselect.AddListener(() => { onYes?.Invoke(); OnYes?.Invoke(); gameObject.SetActive(false); }); noButton.OnDeselect.AddListener(() => { onNo?.Invoke(); OnNo?.Invoke(); gameObject.SetActive(false); }); }
public void InitializeOk(string message, string title, OnYes onYes, bool cancelable = false) { _message = message; _title = title; _onYes = onYes; _cancelable = cancelable; _dialogType = DialogType.OK; }
public override void HandleMediation() { base.HandleMediation(); okButton.OnClick.AddListener(() => OnOk.Dispatch()); yesButton.OnClick.AddListener(() => OnYes.Dispatch()); noButton.OnClick.AddListener(() => OnNo.Dispatch()); }
public override void Evaluate() { base.Evaluate(); if (OnYes != null) { OnYes.Evaluate(); } //SendOPToNewUser(); }
public override void Evaluate() { base.Evaluate(); SendNIToOldUser(); if (OnYes != null) { OnYes.Evaluate(); } }
public void InitializeYesNo(string message, string title, OnYes onYes, OnNo onNo, bool cancelable = false) { _message = message; _title = title; _onYes = onYes; _onNo = onNo; _cancelable = cancelable; _dialogType = DialogType.YesNo; }
private void DoOnYes(object sender, EventArgs e) { if (OnYes != null) { OnYes.DoAction(Ability); } else { Triggers.FinishTrigger(); } }
protected override void Run() { MessageBoxResult result = System.Windows.MessageBox.Show(Window.GetWindow(this), Message, Title, Buttons, Image, DefaultButton); Reset(); OnResult?.ExecuteIfPossible(result); switch (result) { case MessageBoxResult.OK: OnOk?.ExecuteIfPossible(null); break; case MessageBoxResult.Cancel: OnCancel?.ExecuteIfPossible(null); break; case MessageBoxResult.Yes: OnYes?.ExecuteIfPossible(null); break; case MessageBoxResult.No: OnNo?.ExecuteIfPossible(null); break; } }
private void Create(string message) { IsDialog = true; Message = message; var count = 0; var lines = BasicOne.SplitToLines(message, Width - 2); var enumerable = lines as string[] ?? lines.ToArray(); Height = enumerable.Length + 3; PostionY = ParentWindow.Height / 2 - Height / 2; foreach (var l in enumerable) { var messageLabel = new Label(l, 1, 2 + count, this); Inputs.Add(messageLabel); count++; } /* * var messageLabel = new Label(Message, PostionX + 2, PostionY + 2, "messageLabel", this); * messageLabel.BackgroundColour = BackgroundColour;*/ _yesBtn = new Button(Width - 9, Height, "YES", this) { Action = () => { OnYes?.Invoke(); ExitWindow(); } }; _noBtn = new Button(Width - 4, Height, "NO", this) { Action = () => { OnNo?.Invoke(); ExitWindow(); } }; Inputs.Add(_yesBtn); Inputs.Add(_noBtn); CurrentlySelected = _yesBtn; }
public virtual void Evaluate() { if (Condition == null) { return; } if (Condition.IsValid) { if (OnYes != null) { OnYes.Evaluate(); } } else { if (OnNo != null) { OnNo.Evaluate(); } } }
private void CtrlBtnEdit_Click(object sender, EventArgs e) { string text = ""; bool flag = true; while (flag) { text = RenameForm.Invoke(false, _text); if (text != "") { flag = false; } else { MessageBox.Show("Если нужно удалить запись - выбирайте опцию" + " \"Удалить\". Пустые значения вводить нельзя."); } } DialogResult = DialogResult.OK; OnYes?.Invoke(text); Close(); }
public override void Evaluate() { base.Evaluate(); SendOPToV7(); OnYes.Evaluate(); }
private void button_Yes_Click(object sender, EventArgs e) { _isOk = true; OnYes?.Invoke(); FinishForm(); }