Ejemplo n.º 1
0
        public LoginViewModel(ICUCService cucService, MessageService messageService, PopUpService popUpService, NavigationService navigationService, ILoginService loginService, IFirebaseAnalyticsDependency firebaseAnalyticsDependency)
        {
            _navigationService           = navigationService;
            _loginService                = loginService;
            _popUpService                = popUpService;
            _messageService              = messageService;
            _cucService                  = cucService;
            _firebaseAnalyticsDependency = firebaseAnalyticsDependency;

            Init();
        }
Ejemplo n.º 2
0
        public SummaryBonusesViewModel(IValidBonusService validBonusService, ILoginService loginService, ICUCService cucService, PopUpService popupService, IFirebaseAnalyticsDependency firebaseAnalyticsDependency, NavigationService navigationService, MessageService messageService)
        {
            _validBonusService           = validBonusService;
            _loginService                = loginService;
            _cucService                  = cucService;
            _navigationService           = navigationService;
            _popupService                = popupService;
            _validBonusService           = validBonusService;
            _firebaseAnalyticsDependency = firebaseAnalyticsDependency;
            _messageService              = messageService;

            LoadData();
        }
Ejemplo n.º 3
0
                private void DrawFunctionWrapper(int windowID)
                {
                    PaintingGameViewUI = true;
                    ef.globChanged     = false;
                    _elementIndex      = 0;
                    _lineOpen          = false;
                    focusInd           = 0;

                    try
                    {
                        if (!UseWindow)
                        {
                            GUI.matrix = Matrix4x4.TRS(new Vector3(0, 0, 0), Quaternion.identity,
                                                       new Vector3(upscale, upscale, 1));
                            GUILayout.BeginArea(new Rect(40 / upscale, 20 / upscale, Screen.width / upscale, Screen.height / upscale));
                        }

                        if (!PopUpService.ShowingPopup())
                        {
                            _function();
                        }

                        nl();

                        UnIndent();

                        (GUI.tooltip.IsNullOrEmpty() ? "" : "{0}:{1}".F(Msg.ToolTip.GetText(), GUI.tooltip)).nl(PEGI_Styles.HintText);

                        if (UseWindow)
                        {
                            if (_windowRect.Contains(Input.mousePosition))
                            {
                                MouseOverUI = true;
                            }

                            GUI.DragWindow(new Rect(0, 0, 3000, 40 * upscale));
                        }
                        else
                        {
                            MouseOverUI = true;
                            GUILayout.EndArea();
                        }
                    }
                    catch (Exception ex)
                    {
                        Debug.LogError(ex);
                    }

                    PaintingGameViewUI = false;
                }
Ejemplo n.º 4
0
        public static bool fullWindowDocumentationClickOpen(GameView.InspectionDelegate function, string toolTip = "", int buttonSize = 20)
        {
            if (toolTip.IsNullOrEmpty())
            {
                toolTip = icon.Question.GetDescription();
            }

            if (fullWindowDocumentationClickOpen(toolTip, buttonSize))
            {
                PopUpService.inspectDocumentationDelegate = function;
                PopUpService.InitiatePopUp();
                return(true);
            }

            return(false);
        }
Ejemplo n.º 5
0
        public static bool fullWindowDocumentationWithLinkClickOpen(this string text, string link, string linkName = null, string tip = "", int buttonSize = 20)
        {
            if (tip.IsNullOrEmpty())
            {
                tip = icon.Question.GetDescription();
            }

            if (fullWindowDocumentationClickOpen(tip, buttonSize))
            {
                PopUpService.popUpText = text;
                PopUpService.InitiatePopUp();
                PopUpService.relatedLink     = link;
                PopUpService.relatedLinkName = linkName.IsNullOrEmpty() ? link : linkName;
                return(true);
            }

            return(false);
        }
Ejemplo n.º 6
0
        public static void fullWindowAreYouSureOpen(Action action, string header = "",
                                                    string text = "")
        {
            if (header.IsNullOrEmpty())
            {
                header = Msg.AreYouSure.GetText();
            }

            if (text.IsNullOrEmpty())
            {
                text = Msg.ClickYesToConfirm.GetText();
            }

            PopUpService.areYouSureFunk = action;
            PopUpService.popUpText      = text;
            PopUpService.popUpHeader    = header;
            PopUpService.InitiatePopUp();
        }
Ejemplo n.º 7
0
        public ChoiceCucViewModel(PopUpService popUpService, NavigationService navigationService, MessageService messageService, IResourcesDependency resourcesDependency, ICUCService cucService, ILoginService loginService, IFirebaseAnalyticsDependency firebaseAnalyticsDependency, IValidBonusService validBonusService)
        {
            _popUpService                = popUpService;
            _navigationService           = navigationService;
            _messageService              = messageService;
            _resourcesDependency         = resourcesDependency;
            _cucService                  = cucService;
            _loginService                = loginService;
            _firebaseAnalyticsDependency = firebaseAnalyticsDependency;
            _validBonusService           = validBonusService;


            _userName = _loginService.GetUser().UserName;

            // Eventos de cuando cambia las propiuedades
            this.WhenAny(OnIsEnabledSellingPointChanged, p => p.IsEnabledSellingPoint);
            this.WhenAny(OnSellingPointTitleChanged, p => p.SellingPointTitle);

            Init();
        }
Ejemplo n.º 8
0
        public static bool fullWindowDocumentationClickOpen(this string text, string toolTip = "", int buttonSize = 20, icon clickIcon = icon.Question)
        {
            bool gotHeadline = false;

            if (toolTip.IsNullOrEmpty())
            {
                toolTip = Msg.ToolTip.GetDescription();
            }
            else
            {
                gotHeadline = true;
            }

            if (fullWindowDocumentationClickOpen(toolTip, buttonSize, clickIcon))
            {
                PopUpService.popUpText   = text;
                PopUpService.popUpHeader = gotHeadline ? toolTip : "";
                PopUpService.InitiatePopUp();
                return(true);
            }

            return(false);
        }
Ejemplo n.º 9
0
 public static void FullWindwDocumentationOpen(string text)
 {
     PopUpService.popUpText = text;
     PopUpService.InitiatePopUp();
 }