C# Class DoubanFM.Core.UserAssistant

处理用户的登录、注销等请求
Inheritance: System.Windows.DependencyObject
Show file Open project: LiteCoder/DoubanFM Class Usage Examples

Public Properties

Property Type Description
CurrentStateProperty System.Windows.DependencyProperty
IsLoggedOffProperty System.Windows.DependencyProperty
IsLoggedOnProperty System.Windows.DependencyProperty
IsLoggingOffProperty System.Windows.DependencyProperty
IsLoggingOnProperty System.Windows.DependencyProperty
LogOnFailedMessageProperty System.Windows.DependencyProperty
ShowLogOnFailedHintProperty System.Windows.DependencyProperty

Public Methods

Method Description
Initialize ( ) : void

初始化用户状态

LogOff ( ) : void

注销

LogOn ( ) : void

登录

Private Methods

Method Description
LogOnWithEmail ( string email, string password ) : DoubanFM.Core.Json.LogOnResult

使用邮箱登录

LogOnWithUsername ( string username, string password ) : DoubanFM.Core.Json.LogOnResult

使用用户名登录

RaiseCurrentStateChangedEvent ( State oldState, State newState ) : void
RaiseLogOffFailedEvent ( ) : void
RaiseLogOffSucceedEvent ( ) : void
RaiseLogOnFailedEvent ( ) : void
RaiseLogOnSucceedEvent ( ) : void
ResetUser ( ) : void

重置与用户有关的所有附加信息

UpdateUserInfo ( ) : bool

更新用户信息

UpdateWhenLogOn ( DoubanFM.Core.Json.LogOnResult result ) : void

更新验证码

根据douban.fm的主页的HTML代码更新登录状态

根据服务器返回的登录结果更新登录状态

Method Details

Initialize() public method

初始化用户状态
public Initialize ( ) : void
return void

LogOff() public method

注销
public LogOff ( ) : void
return void

LogOn() public method

登录
public LogOn ( ) : void
return void

Property Details

CurrentStateProperty public static property

public static DependencyProperty,System.Windows CurrentStateProperty
return System.Windows.DependencyProperty

IsLoggedOffProperty public static property

public static DependencyProperty,System.Windows IsLoggedOffProperty
return System.Windows.DependencyProperty

IsLoggedOnProperty public static property

public static DependencyProperty,System.Windows IsLoggedOnProperty
return System.Windows.DependencyProperty

IsLoggingOffProperty public static property

public static DependencyProperty,System.Windows IsLoggingOffProperty
return System.Windows.DependencyProperty

IsLoggingOnProperty public static property

public static DependencyProperty,System.Windows IsLoggingOnProperty
return System.Windows.DependencyProperty

LogOnFailedMessageProperty public static property

public static DependencyProperty,System.Windows LogOnFailedMessageProperty
return System.Windows.DependencyProperty

ShowLogOnFailedHintProperty public static property

public static DependencyProperty,System.Windows ShowLogOnFailedHintProperty
return System.Windows.DependencyProperty