protected override void BackButtonWasPressed(ViewController topViewController)
        {
            if (topViewController is SplashScreen)
            {
                DismissViewController(_splashScreen, immediately: true);
            }

            DidFinishEvent?.Invoke();
        }
 protected override void BackButtonWasPressed(ViewController topViewController)
 {
     if (_resultsViewController.isInViewControllerHierarchy)
     {
         _menuLightsManager.SetColorPreset(_defaultLights, false);
         DismissViewController(_resultsViewController);
     }
     else if (_songDetail.isInViewControllerHierarchy)
     {
         SetLeftScreenViewController(null, ViewController.AnimationType.Out);
         SetRightScreenViewController(null, ViewController.AnimationType.Out);
         DismissViewController(_songDetail);
     }
     else
     {
         DidFinishEvent?.Invoke();
     }
 }
 protected void RaiseDidFinishEvent() => DidFinishEvent?.Invoke();
Ejemplo n.º 4
0
        public void Parse()
        {
            string line = null;

            _state = (int)ParsingState.WAIT_MSG_ID;

            bool hasError = false;

            while ((line = NextNonEmptyLine()) != null)
            {
                string    value     = null;
                TokenType tokenType = ParseLine(line, out value);
                switch (tokenType)
                {
                case TokenType.MSG_ID:
                    if ((_state & (int)ParsingState.WAIT_MSG_ID) != 0)
                    {
                        if (_msgStr != null)
                        {
                            if (DidFindPairEvent != null)
                            {
                                DidFindPairEvent.Invoke(_msgId, _msgStr);
                            }
                            _msgId = _msgStr = null;
                        }

                        _state = (int)ParsingState.WAIT_MSG_STR;
                        _msgId = value;
                    }
                    else
                    {
                        hasError = true;
                    }
                    break;

                case TokenType.MSG_STR:
                    if ((_state & (int)ParsingState.WAIT_MSG_STR) != 0)
                    {
                        _state  = (int)ParsingState.WAIT_STRING | (int)ParsingState.WAIT_MSG_ID;
                        _msgStr = value;
                    }
                    else
                    {
                        hasError = true;
                    }
                    break;

                case TokenType.STRING:
                    if ((_state & (int)ParsingState.WAIT_STRING) != 0)
                    {
                        if (_msgStr.Length > 0)
                        {
                            _msgStr += NEW_LINE_TOKEN;
                        }
                        _msgStr += value;
                    }
                    else
                    {
                        hasError = true;
                    }
                    break;

                default:
                    hasError = true;
                    break;
                }

                if (hasError)
                {
                    break;
                }
            }// end of while

            /// Last Item
            if (_msgStr != null)
            {
                if (DidFindPairEvent != null)
                {
                    DidFindPairEvent.Invoke(_msgId, _msgStr);
                }
                _msgId = _msgStr = null;
            }

            /// Response
            if (hasError)
            {
                if (DidFailWithErrorEvent != null)
                {
                    DidFailWithErrorEvent.Invoke(_lineSeparator.LineNumber, GetErrorMessage((int)_state));
                }
            }
            else
            {
                if (DidFinishEvent != null)
                {
                    DidFinishEvent.Invoke();
                }
            }
        }
Ejemplo n.º 5
0
 private void RaiseEventAndRemoveSelf()
 {
     DidFinishEvent?.Invoke();
     _backButtonController.StartAnimation(ScreenBackButtonAnimationController.AnimationType.FadeOut);
     _backButton.onClick.RemoveListener(_backButtonAction);
 }
 private void HandleLevelRequestNavigationControllerDidfinish(LevelRequestNavigationController viewController)
 {
     viewController.DismissModalViewController(null);
     DidFinishEvent?.Invoke();
 }
Ejemplo n.º 7
0
 protected override void BackButtonWasPressed(ViewController topViewController)
 {
     DidFinishEvent?.Invoke();
 }
 public void DismissButtonWasPressed()
 {
     DidFinishEvent?.Invoke(this);
 }