using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ZTImage.Configuration;
namespace RichCreator
{
[ConfigPath("configs","RichCreator.config")]
public class RichCreatorConfig
{
///
/// 是否组队
///
public bool IsGroup { get; set; }
///
/// tgp_daemon路径
///
public string TGPDaemonPath { get; set; }
///
/// 启动游戏等待秒数
///
public Int32 StartWaitSecond { get; set; }
///
/// 角色个数
///
public Int32 RoleCount { get; set; }
///
/// 是否是否微信通知
///
public bool NotificationWechat { get; set; }
///
/// 用户名1
///
public string UserName1 { get; set; }
///
/// 密码1
///
public string Password1 { get; set; }
///
/// 用户名2
///
public string UserName2 { get; set; }
///
/// 密码2
///
public string Password2 { get; set; }
///
/// 用户名3
///
public string UserName3 { get; set; }
///
/// 密码3
///
public string Password3 { get; set; }
///
/// 获取配置文件中账号的数量
///
///
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;
}
///
/// 获取指定编号
///
/// 从0开始
///
///
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;
}
}
}
}