public void Run(bool isLogged, string userName, string password, IAppClient client) { Model = new AuthorizationModel(isLogged, userName, password); View.ApplyModel(Model); Client = client; Client.AppMsgReceived += OnAppMsgReceived; if (Model.IsLogged) { ApplyState <AuthorizationLoggedState>(); } else { ApplyState <AuthorizationLoginState>(); } }
public void Run(PlayerAuthInfo playerAuthInfo, IAppClient client) { Model = new AuthorizationModel(playerAuthInfo.IsLogged, playerAuthInfo.UserName, playerAuthInfo.Password); View.ApplyModel(Model); Client = client; Client.AppMsgReceived += OnAppMsgReceived; if (Model.IsLogged) { ApplyState <AuthorizationLoggedState>(); } else { ApplyState <AuthorizationLoginState>(); } }