asmrobot
2024-12-31 a8536c3c73a4445b1f1252a1d3271e0c73b35613
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
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
    {
        /// <summary>
        /// 是否组队
        /// </summary>
        public bool IsGroup { get; set; }
 
        /// <summary>
        /// tgp_daemon路径
        /// </summary>
        public string TGPDaemonPath { get; set; }
 
        /// <summary>
        /// 启动游戏等待秒数
        /// </summary>
        public Int32 StartWaitSecond { get; set; }
 
 
        /// <summary>
        /// 角色个数
        /// </summary>
        public Int32 RoleCount { get; set; }
 
 
        /// <summary>
        /// 是否是否微信通知
        /// </summary>
        public bool NotificationWechat { get; set; }
 
 
        /// <summary>
        /// 用户名1
        /// </summary>
        public string UserName1 { get; set; }
 
        /// <summary>
        /// 密码1
        /// </summary>
        public string Password1 { get; set; }
 
 
 
        /// <summary>
        /// 用户名2
        /// </summary>
        public string UserName2 { get; set; }
 
        /// <summary>
        /// 密码2
        /// </summary>
        public string Password2 { get; set; }
 
 
        /// <summary>
        /// 用户名3
        /// </summary>
        public string UserName3 { get; set; }
 
        /// <summary>
        /// 密码3
        /// </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;
            }
        }
 
    }
 
}