public Dialog() { _dialog = DependencyService.Get <IDialog>(DependencyFetchTarget.NewInstance); if (_dialog == null) { throw new Exception("Object reference not set to an instance of a Dialog."); } _dialog.Hidden += (s, e) => { Hidden?.Invoke(this, EventArgs.Empty); }; _dialog.OutsideClicked += (s, e) => { OutsideClicked?.Invoke(this, EventArgs.Empty); }; _dialog.Shown += (s, e) => { Shown?.Invoke(this, EventArgs.Empty); }; _dialog.BackButtonPressed += (s, e) => { BackButtonPressed?.Invoke(this, EventArgs.Empty); }; SetBinding(ContentProperty, new Binding(nameof(Content), mode: BindingMode.OneWayToSource, source: _dialog)); SetBinding(PositiveProperty, new Binding(nameof(Positive), mode: BindingMode.OneWayToSource, source: _dialog)); SetBinding(NeutralProperty, new Binding(nameof(Neutral), mode: BindingMode.OneWayToSource, source: _dialog)); SetBinding(NegativeProperty, new Binding(nameof(Negative), mode: BindingMode.OneWayToSource, source: _dialog)); SetBinding(TitleProperty, new Binding(nameof(Title), mode: BindingMode.OneWayToSource, source: _dialog)); }
//private Naviframe _naviframe; /// <summary> /// Initializes a new instance of the Window class. /// </summary> public ReactWindow(string name) : base(name) { Log.Info(ReactConstants.Tag, "## Contruct ReactWindow [BGN] ## "); // size //var size = ScreenSize; //Resize(size.Width, size.Height); //BackgroundColor = Color.Gray; // events /* * Deleted += (sender, e) => * { * Closed?.Invoke(this, EventArgs.Empty); * }; * CloseRequested += (sender, e) => * { * Unrealize(); * }; * * KeyGrab(EvasKeyEventArgs.PlatformBackButtonName, false); * KeyUp += (s, e) => * { * if (e.KeyName == EvasKeyEventArgs.PlatformBackButtonName) * { * BackButtonPressed?.Invoke(this, EventArgs.Empty); * } * }; */ // active window //Active(); //AutoDeletion = false; // f**k off here //Show(); this.KeyGrab(EvasKeyEventArgs.PlatformBackButtonName, false); this.KeyGrab("XF86Red", false); this.KeyUp += (s, e) => { if (e.KeyName == EvasKeyEventArgs.PlatformBackButtonName) { Log.Info(ReactConstants.Tag, "============================Back key is pressed"); BackButtonPressed?.Invoke(this, EventArgs.Empty); } else if (e.KeyName == "XF86Red") { Log.Info(ReactConstants.Tag, "============================Red key is pressed"); RedButtonPressed?.Invoke(this, EventArgs.Empty); } }; // conformant container _conformant = new Conformant(this); _conformant.SetAlignment(-1.0, -1.0); // fill _conformant.SetWeight(1.0, 1.0); // expand _conformant.Show(); Log.Info(ReactConstants.Tag, "## Contruct ReactWindow [END] ## "); // // Initialize(); }
void IObservable <BackButtonPressedArgs> .Notify(BackButtonPressedArgs eventArgs) { if (BackButtonPressed != null) { BackButtonPressed.Invoke(this, eventArgs); } }
protected override bool OnBackButtonPressed() { if (EnableBackButton && LockInteraction()) { OnBackButtonPressedAnimations().ContinueWith((t) => { BackButtonPressed?.Invoke(); ReleaseInteraction(); }); } return(BackButtonPressed != null || base.OnBackButtonPressed()); }
public override void OnBackPressed() { if (BackButtonEnabled) { BackButtonPressed?.Invoke(this, EventArgs.Empty); base.OnBackPressed(); } }
/// <summary> /// Occurs when the back button is pressed. /// </summary> /// <returns> /// To be added. /// </returns> /// <remarks> /// TODO: This implementation requires improvements. /// </remarks> protected override sealed bool OnBackButtonPressed() { BackButtonPressed.SafeInvoke(this); var popupLayout = Content as PopupLayout; //// TODO: Lookup for top most popup layout. return((popupLayout != null && popupLayout.IsPopupActive) || base.OnBackButtonPressed()); }
public static void UnAssignAllEvents() { OnOpenView = null; OnCloseView = null; OnBackButtonPressed = null; OnChangeSound = null; OnStartGame = null; OnPauseGame = null; OnShootBubble = null; OnAllowShoot = null; }
protected override void BackButtonWasPressed(ViewController topViewController) { BeatmapDetailsLoader.instance.StopLoading(); // filter will be re-selected during the LoadBeatmaps on finish handler, which will re-install this delegate if (_currentFilter != null) { _currentFilter.SettingChanged -= FilterSettingChanged; } BackButtonPressed?.Invoke(); }
public IEnumerator LoadSetupCloseBackButtons() { if (YUR.Yur.YURAssetBundle == null) { string URI = "file:///" + Application.dataPath + "/AssetBundles/" + YUR.Yur.assetBundleName; UnityEngine.Networking.UnityWebRequest request = UnityEngine.Networking.UnityWebRequestAssetBundle.GetAssetBundle(URI, 0); yield return(request.SendWebRequest()); if (request.error != null) { yield break; } else { YUR_Log.Log("Local asset bundle found!"); yield return(YUR.Yur.YURAssetBundle = DownloadHandlerAssetBundle.GetContent(request)); } } var temppp = YUR.Yur.YURAssetBundle.LoadAsset <GameObject>("YUR Back Button"); yield return(BackButton = Instantiate(temppp, gameObject.transform)); // BackButton = (GameObject)Instantiate(Resources.Load("YUR Back Button"), gameObject.transform); BackButton.GetComponent <Button>().onClick.AddListener(delegate { if (BackButtonPressed != null) { BackButtonPressed.Invoke(); } YURScreenCoordinator.ScreenCoordinator.BackButtonPressed(); }); temppp = YUR.Yur.YURAssetBundle.LoadAsset <GameObject>("YUR Close Button"); yield return(CloseButton = Instantiate(temppp, gameObject.transform)); // CloseButton = (GameObject)Instantiate(Resources.Load("YUR Close Button"), gameObject.transform); CloseButton.GetComponent <Button>().onClick.AddListener(delegate { if (CloseButtonPressed != null) { CloseButtonPressed.Invoke(); } YURScreenCoordinator.ScreenCoordinator.CloseButtonPressed(); }); if (Finished != null) { Finished.Invoke(); } }
protected override bool OnBackButtonPressed() { try { BackButtonPressed?.Invoke(); } catch (System.Exception ex) { string title = this.GetType().Name + " - " + System.Reflection.MethodBase.GetCurrentMethod().Name; BalizaFacil.App.Instance.UnhandledException(title, ex); } return(true); }
protected override void BackButtonWasPressed(ViewController topViewController) { if (!_readyForDeactivation) { return; } _lastSearchQuery = _searchQuery; SearchBehaviour.Instance.StopSearch(); _searchResultsListViewController.UpdateSongs(new IPreviewBeatmapLevel[0]); PopAllViewControllersFromNavigationController(true); BackButtonPressed?.Invoke(); }
private async void OnBackButtonClicked(object sender, EventArgs e) { if (BackButtonPressed != null) { bool popout = BackButtonPressed.Invoke(sender, e); if (popout) { await PopNavigationAsync(); } } else { await PopNavigationAsync(); } }
// ----------------------------------------------------------------------------- // Overrides public override void OnBackPressed() { bool isBackPressConsumed = !BackButtonEnabled; if (/*isBackPressConsumed == false &&*/ GetCurrentFragment() is FragmentBase currentFragment) { isBackPressConsumed = currentFragment.OnBackPressed(); } if (isBackPressConsumed == false) { BackButtonPressed?.Invoke(this, EventArgs.Empty); base.OnBackPressed(); } }
public void FireBackButtonPressedEvent() { if (BackButtonPressed != null) { foreach (Delegate d in BackButtonPressed.GetInvocationList()) { try { d.DynamicInvoke(null); } catch { continue; } } } }
void Initialize() { this.KeyGrab(EvasKeyEventArgs.PlatformBackButtonName, false); this.KeyGrab("XF86Red", false); this.KeyUp += (s, e) => { if (e.KeyName == EvasKeyEventArgs.PlatformBackButtonName) { Log.Info(ReactConstants.Tag, "============================Back key is pressed"); BackButtonPressed?.Invoke(this, EventArgs.Empty); } else if (e.KeyName == "XF86Red") { Log.Info(ReactConstants.Tag, "============================Red key is pressed"); RedButtonPressed?.Invoke(this, EventArgs.Empty); } }; // conformant container _conformant = new Conformant(this); _conformant.SetAlignment(-1.0, -1.0); // fill _conformant.SetWeight(1.0, 1.0); // expand _conformant.Show(); #region "Navigator navigator container " /* * _naviframe = new Naviframe(this) * { * PreserveContentOnPop = true, * DefaultBackButtonEnabled = true * }; * * _naviframe.Popped += (s, e) => * { * Log.Info(ReactConstants.Tag, "Naviframe was popped: "+(int)(IntPtr)e.Content); * }; * * _naviframe.Show(); * * // include navi * _conformant.SetContent(_naviframe); */ #endregion AvailableOrientations = DisplayOrientations.Portrait | DisplayOrientations.Landscape | DisplayOrientations.PortraitFlipped | DisplayOrientations.LandscapeFlipped; }
public InformationPopup() { _popUp = DependencyService.Get <InformationPopup>(DependencyFetchTarget.NewInstance); if (_popUp == null) { throw new InvalidOperationException("Object reference not set to an instance of a Popup."); } _popUp.BackButtonPressed += (s, e) => { BackButtonPressed?.Invoke(this, EventArgs.Empty); }; SetBinding(IsProgressRunningProperty, new Binding(nameof(IsProgressRunning), mode: BindingMode.OneWayToSource, source: _popUp)); SetBinding(BottomButtonProperty, new Binding(nameof(BottomButton), mode: BindingMode.OneWayToSource, source: _popUp)); SetBinding(TitleProperty, new Binding(nameof(Title), mode: BindingMode.OneWayToSource, source: _popUp)); SetBinding(TextProperty, new Binding(nameof(Text), mode: BindingMode.OneWayToSource, source: _popUp)); }
/// <summary> /// Creates and initializes a new instance of the TwoButtonPopup class. /// </summary> /// <since_tizen> 4 </since_tizen> public TwoButtonPopup() { _popUp = DependencyService.Get <ITwoButtonPopup>(DependencyFetchTarget.NewInstance); if (_popUp == null) { throw new Exception("Object reference not set to an instance of a Popup."); } _popUp.BackButtonPressed += (s, e) => { BackButtonPressed?.Invoke(this, EventArgs.Empty); }; SetBinding(ContentProperty, new Binding(nameof(Content), mode: BindingMode.OneWayToSource, source: _popUp)); SetBinding(FirstButtonProperty, new Binding(nameof(FirstButton), mode: BindingMode.OneWayToSource, source: _popUp)); SetBinding(SecondButtonProperty, new Binding(nameof(SecondButton), mode: BindingMode.OneWayToSource, source: _popUp)); SetBinding(TitleProperty, new Binding(nameof(Title), mode: BindingMode.OneWayToSource, source: _popUp)); SetBinding(TextProperty, new Binding(nameof(Text), mode: BindingMode.OneWayToSource, source: _popUp)); }
// Constructor public GraphicPopUp() { _popUp = DependencyService.Get <IGraphicPopup>(DependencyFetchTarget.NewInstance); if (_popUp == null) { throw new Exception("Object reference not set to an instance of a Popup."); } _popUp.BackButtonPressed += (s, e) => { BackButtonPressed?.Invoke(this, EventArgs.Empty); }; _popUp.TimedOut += (s, e) => { TimedOut?.Invoke(this, EventArgs.Empty); }; SetBinding(TextProperty, new Binding(nameof(Text), mode: BindingMode.OneWayToSource, source: _popUp)); SetBinding(DurationProperty, new Binding(nameof(Duration), mode: BindingMode.OneWayToSource, source: _popUp)); }
public static void FireBackButtonPressed() { BackButtonPressed?.Invoke(null, new EventArgs()); }
void BackButtonPressedHandler(object sender, EventArgs e) { BackButtonPressed?.Invoke(this, EventArgs.Empty); }
protected override bool OnBackButtonPressed() { BackButtonPressed?.Invoke(this, new EventArgs()); return(base.OnBackButtonPressed()); }
private void OnBackButtonPressed() { BackButtonPressed?.Invoke(); }
private void BackButtonPressedHandler(object sender, EventArgs e) { Console.WriteLine("[GraphicPopUpRenderer.BackButtonPressedHandler] "); BackButtonPressed?.Invoke(this, EventArgs.Empty); _popUp.Dismiss(); }