Пример #1
0
        private void CheckLogin()
        {
            var token = PropertiesHelper.GetToken();

            if (!token.IsLogined || !token.IsValid)
            {
                this.ShowLogin();
            }
        }
Пример #2
0
 /// <summary>
 /// 设置认证信息
 /// </summary>
 /// <param name="token"></param>
 public static void SetToken(Token token)
 {
     PropertiesHelper.SetObject("Token", token);
 }
Пример #3
0
        /// <summary>
        /// 获取保存的认证信息
        /// </summary>
        /// <returns></returns>
        public static Token GetToken()
        {
            var token = PropertiesHelper.GetObject <Token>("Token");

            return(token ?? new Token());
        }