| | |
| | | public class RichCreatorConfig |
| | | { |
| | | /// <summary> |
| | | /// 是否组队 |
| | | /// </summary> |
| | | public bool IsGroup { get; set; } |
| | | |
| | | /// <summary> |
| | | /// tgp_daemon路径 |
| | | /// </summary> |
| | | public string TGPDaemonPath { get; set; } |
| | |
| | | /// </summary> |
| | | public string Password3 { get; set; } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | /// <summary> |
| | | /// 获取配置文件中账号的数量 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public Int32 GetAccountCount() |
| | | { |
| | | Int32 accountCount = 0; |
| | | if (!string.IsNullOrEmpty(this.UserName1)) |
| | | { |
| | | accountCount = 1; |
| | | if (!string.IsNullOrEmpty(this.UserName2)) |
| | | { |
| | | accountCount = 2; |
| | | if (!string.IsNullOrEmpty(this.UserName3)) |
| | | { |
| | | accountCount = 3; |
| | | } |
| | | } |
| | | } |
| | | |
| | | return accountCount; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 获取指定编号 |
| | | /// </summary> |
| | | /// <param name="accountIndex">从0开始</param> |
| | | /// <param name="username"></param> |
| | | /// <param name="password"></param> |
| | | public void GetAccount(Int32 accountIndex, out string username, out string password) |
| | | { |
| | | username = this.UserName1; |
| | | password = this.Password1; |
| | | if (accountIndex == 1) |
| | | { |
| | | username = this.UserName2; |
| | | password = this.Password2; |
| | | } |
| | | |
| | | if (accountIndex == 2) |
| | | { |
| | | username = this.UserName3; |
| | | password = this.Password3; |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | } |