protected async Task onclick() { IsDismissed = true; await OnDismiss.InvokeAsync(null); StateHasChanged(); }
void Awake() { sendButton.interactable = false; invalidEmailIndicator.SetActive(false); sendButton.onClick.AddListener(() => OnSendEmail?.Invoke(inputField.text)); closeButton.onClick.AddListener(() => OnDismiss?.Invoke(dontAskAgain.isOn)); inputField.onValueChanged.AddListener(value => { bool isValidValue = IsValidEmail(value); sendButton.interactable = isValidValue; if (!string.IsNullOrEmpty(value)) { invalidEmailIndicator.SetActive(!isValidValue); } else { invalidEmailIndicator.SetActive(false); } }); inputField.onSubmit.AddListener(value => { if (sendButton.interactable) { sendButton.onClick.Invoke(); } }); showHideAnimator.OnWillFinishStart += OnWillFinishStart; }
protected async Task OnClick() { _isDismissed = true; await OnDismiss.InvokeAsync(null).ConfigureAwait(false); StateHasChanged(); }
public void Hide() { navAnimate?.AnimateOutInstant(); IsCurrent = false; OnDismiss?.Invoke(); MVCCLog.Log($"UIView Hide {this.gameObject.name}"); }
public void Dismiss() { OnDismiss?.Invoke(); navAnimate?.AnimateOut(); IsCurrent = false; MVCCLog.Log($"UIView Dismiss {this.gameObject.name}"); }
public void ProcessKeyDown(string keyCode) { if (keyCode == "27") { OnDismiss.InvokeAsync(null); } }
public async void FocusHandler() { System.Diagnostics.Debug.WriteLine($"Callout {PortalId} called dismiss from FocusHandler from {this.DirectionalHint}"); await OnDismiss.InvokeAsync(true); await HiddenChanged.InvokeAsync(true); }
public void OnCancelClicked() { this.gameObject.SetActive(false); if (OnDismiss != null) { OnDismiss.Invoke( ); } }
public async void FocusHandler() { //Need way to tie focus handler between all the callouts (linked contextualmenus) ... only dimiss when ALL of them lost focus. System.Diagnostics.Debug.WriteLine($"Callout {PortalId} called dismiss from FocusHandler from {this.DirectionalHint}"); await OnDismiss.InvokeAsync(null); //await HiddenChanged.InvokeAsync(true); }
protected void OnClick() { IsOpen = false; OnDismiss.InvokeAsync(EventCallback.Empty); BSAlertEvent = new BSAlertEvent() { Target = this }; CloseEvent.InvokeAsync(BSAlertEvent); EventQue.Add(ClosedEvent); }
protected void DismissHandler(bool isDismissed) { System.Diagnostics.Debug.WriteLine($"ContextualMenu {PortalId} tried dismiss from {this.DirectionalHint} with SubmenuActiveKey = {SubmenuActiveKey}"); if (string.IsNullOrEmpty(SubmenuActiveKey)) { System.Diagnostics.Debug.WriteLine($"ContextualMenu dismiss successful! {this.DirectionalHint} with SubmenuActiveKey = {SubmenuActiveKey}"); OnDismiss.InvokeAsync(true); } }
private async Task KeyDownHandler(KeyboardEventArgs args) { switch (args.Key) { case "Escape": await OnDismiss.InvokeAsync(args); break; } //return Task.CompletedTask; }
/// <summary> /// Creates a new message cell. /// </summary> private NotificationCell CreateCell() { var cell = CreateChild <NotificationCell>("cell", ChildCount); cell.Anchor = AnchorType.Top; cell.Pivot = PivotType.Top; cell.Width = this.Width; cell.OnDismiss += (c) => { // Remove from notifications automatically if hidden. OnDismiss?.Invoke(cell.Notification); cellRecycler.Return(cell); AdjustCellPos(); }; return(cell); }
public Panel() { Debug.WriteLine("Panel Created"); HeaderTemplate = builder => { if (HeaderText != null) { builder.OpenElement(0, "div"); { builder.AddAttribute(1, "class", "ms-Panel-header"); builder.OpenElement(2, "p"); { builder.AddAttribute(3, "class", "xlargeFont ms-Panel-headerText"); //builder.AddAttribute(4, "id", ) builder.AddAttribute(5, "role", "heading"); builder.AddAttribute(6, "aria-level", "2"); builder.AddContent(7, HeaderText); } builder.CloseElement(); } builder.CloseElement(); } }; onPanelClick = () => { this._dismiss(); }; _dismiss = () => { OnDismiss.InvokeAsync(null); //normally, would check react synth events to see if event was interrupted from the OnDismiss callback before calling the following... // To Do this.Close(); }; }
public async void ClickHandler() { await OnDismiss.InvokeAsync(true); await HiddenChanged.InvokeAsync(true); }
public async void ResizeHandler() { await OnDismiss.InvokeAsync(null); //await HiddenChanged.InvokeAsync(true); }
[JSInvokable] public async void ScrollHandler() { await OnDismiss.InvokeAsync(null); //await HiddenChanged.InvokeAsync(true); }
protected void Dismiss(bool dismissAll = false) { OnDismiss.InvokeAsync(dismissAll); }
public Panel() { Debug.WriteLine("Panel Created"); _animationTimer = new Timer(); HeaderTemplate = builder => { if (HeaderText != null) { builder.OpenElement(0, "div"); { builder.AddAttribute(1, "class", "ms-Panel-header"); builder.OpenElement(2, "p"); { builder.AddAttribute(3, "class", "xlargeFont ms-Panel-headerText"); //builder.AddAttribute(4, "id", ) builder.AddAttribute(5, "role", "heading"); builder.AddAttribute(6, "aria-level", "2"); builder.AddContent(7, HeaderText); } builder.CloseElement(); } builder.CloseElement(); } }; onPanelClick = () => { this._dismiss(); }; _dismiss = async() => { await OnDismiss.InvokeAsync(null); //normally, would check react synth events to see if event was interrupted from the OnDismiss callback before calling the following... // To Do this.Close(); }; _clearExistingAnimationTimer = () => { if (_animationTimer.Enabled) { _animationTimer.Stop(); _animationTimer.Elapsed -= _handler; } }; _animateTo = (animationState) => { _animationTimer.Interval = 200; _handler = null; _handler = (s, e) => { InvokeAsync(() => { //Debug.WriteLine("Inside invokeAsync from animateTo timer elapsed"); _animationTimer.Elapsed -= _handler; _animationTimer.Stop(); previousVisibility = currentVisibility; currentVisibility = animationState; _onTransitionComplete(); }); }; _animationTimer.Elapsed += _handler; _animationTimer.Start(); }; _onTransitionComplete = async() => { isAnimating = false; //StateHasChanged(); await UpdateFooterPositionAsync(); if (currentVisibility == PanelVisibilityState.Open) { await OnOpened.InvokeAsync(null); } if (currentVisibility == PanelVisibilityState.Closed) { await OnDismissed.InvokeAsync(null); } StateHasChanged(); }; }
protected Task OnClose(MouseEventArgs mouseEventArgs) { return(OnDismiss.InvokeAsync(null)); }
[JSInvokable] public async void ResizeHandler() { await OnDismiss.InvokeAsync(true); await HiddenChanged.InvokeAsync(true); }
protected void onclick() { IsOpen = false; OnDismiss.InvokeAsync(EventCallback.Empty); }