private void Initialize() { if (_initialized) { return; } _messageText = GameObjectHelpers.FindGameObject(gameObject, "Message")?.GetComponent <Text>(); _cancelBTNObject = GameObjectHelpers.FindGameObject(gameObject, "CancelBTN"); _cancelBTN = _cancelBTNObject?.GetComponent <Button>(); _cancelBTNText = _cancelBTNObject?.GetComponentInChildren <Text>(true); _cancelBTN?.onClick.AddListener(() => { OnCancelButtonClick?.Invoke(_messageId); HideMessageBox(); }); _confirmButtonObject = GameObjectHelpers.FindGameObject(gameObject, "ConfirmBTN"); _confirmBTNText = _confirmButtonObject?.GetComponentInChildren <Text>(true); _confirmBTN = _confirmButtonObject?.GetComponent <Button>(); _confirmBTN?.onClick.AddListener(() => { OnConfirmButtonClick?.Invoke(_messageId); HideMessageBox(); }); _initialized = true; }
private void buttonCancel_Click(object sender, EventArgs e) { OnCancelButtonClick?.Invoke(sender, e); }
public void CancelProcess(object tokenSource) { OnCancelButtonClick?.Invoke(this, EventArgs.Empty); }
private void CancelBtn_Click(object sender, RoutedEventArgs e) { OnCancelButtonClick?.Invoke(); }