Example #1
0
 public override void Update()
 {
     if (mediator == null)
     {
         mediator = ApplicationFacade.Instance.RetrieveMediator(Mediators.LOGIN_MEDIATOR) as LoginMediator;
     }
     mediator.Update();
 }
Example #2
0
 public void StartUp(GameObject root)
 {
     if (loginMeditor == null)
     {
         loginMeditor = new LoginMediator();
         RegisterMediator(loginMeditor);
     }
     loginMeditor.Init(root);
 }
Example #3
0
    public override void Execute(INotification notification)
    {
        LoginProxy    _proxy    = (LoginProxy)this.Facade.RetrieveProxy(LoginProxy.NAME);
        LoginMediator _mediator = (LoginMediator)this.Facade.RetrieveMediator(LoginMediator.NAME);

        switch (notification.Name)
        {
        case LoginNotify.ShowRole:
        {
            _mediator.ShowRoleUI();
            break;
        }
        }
    }
 static int OnDestroy(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 1);
         LoginMediator obj = (LoginMediator)ToLua.CheckObject(L, 1, typeof(LoginMediator));
         obj.OnDestroy();
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
        public ILoginMediator Build()
        {
            if (_configurationService == null)
            {
                _configurationService = new Mock <IConfigurationService>();
                _configurationService.Setup(x => x.Get <CommonWebConfiguration>())
                .Returns(new CommonWebConfiguration {
                    VacancyResultsPerPage = 5
                });
            }

            var mediator = new LoginMediator(_userDataProvider.Object, _candidateServiceProvider.Object, _configurationService.Object, new LoginViewModelServerValidator(), new AccountUnlockViewModelServerValidator(), new ResendAccountUnlockCodeViewModelServerValidator(), _authenticationTicketService.Object, new ForgottenPasswordViewModelServerValidator(), new PasswordResetViewModelServerValidator(), new ForgottenEmailViewModelServerValidator(), new Mock <ILogService>().Object);

            return(mediator);
        }
Example #6
0
 protected override void OnShow(INotification notification)
 {
     if (loginMediator == null)
     {
         loginMediator = Facade.RetrieveMediator("LoginMediator") as LoginMediator;
     }
     if (PlayerPrefs.HasKey("UserName") && PlayerPrefs.HasKey("UserPass"))
     {
         panel.account.value = PlayerPrefs.GetString("UserName");
         user             = panel.account.value;
         panel.pawd.value = PlayerPrefs.GetString("UserPass");
         pass             = panel.pawd.value;
     }
     Facade.SendNotification(NotificationID.UpdateResources_Close);
 }
 static int ConnectToServer(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 4);
         LoginMediator obj  = (LoginMediator)ToLua.CheckObject(L, 1, typeof(LoginMediator));
         string        arg0 = ToLua.CheckString(L, 2);
         string        arg1 = ToLua.CheckString(L, 3);
         string        arg2 = ToLua.CheckString(L, 4);
         obj.ConnectToServer(arg0, arg1, arg2);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
    static int set_m_UIName(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            LoginMediator obj  = (LoginMediator)o;
            string        arg0 = ToLua.CheckString(L, 2);
            obj.m_UIName = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index m_UIName on a nil value" : e.Message));
        }
    }
    static int get_m_UIName(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            LoginMediator obj = (LoginMediator)o;
            string        ret = obj.m_UIName;
            LuaDLL.lua_pushstring(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index m_UIName on a nil value" : e.Message));
        }
    }
    static int get_m_View(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            LoginMediator         obj = (LoginMediator)o;
            LuaInterface.LuaTable ret = obj.m_View;
            ToLua.Push(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index m_View on a nil value" : e.Message));
        }
    }
    static int _CreateLoginMediator(IntPtr L)
    {
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 0)
            {
                LoginMediator obj = new LoginMediator();
                ToLua.PushObject(L, obj);
                return(1);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to ctor method: LoginMediator.New"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
 public void Init()
 {
     CreateViewMock();
     TestMediator = new LoginMediator(MockView.Object);
     CreateAppModelMock();
 }
Example #13
0
        public LoginMediator Build()
        {
            var mediator = new LoginMediator(_userDataProvider.Object, _candidateServiceProvider.Object, _configurationManager.Object, new LoginViewModelServerValidator(), new AccountUnlockViewModelServerValidator(), new ResendAccountUnlockCodeViewModelServerValidator());

            return(mediator);
        }
Example #14
0
 protected override void OnDestroy()
 {
     loginMediator = null;
     base.OnDestroy();
 }