private void copyFile()
        {
            if (lstRole == null || lstRole.Count == 0)
            {
                return;
            }

            onScriptStartEvent();

            for (int i = 0; i < lstRole.Count; i++)
            {
                if (role.Equals(""))
                {
                    break;
                }
                if (role.Equals(lstRole[i]))
                {
                    continue;
                }
                string destFileName = path.Replace(role, lstRole[i]);
                File.Copy(path, destFileName, true);
                IniSetting.setFilePath(destFileName);
                IniSetting.writeValue <string>("AutoLogin", "LoginRace", lstRole[i]);
                IniSetting.writeValue <string>("AutoLogin", "LoginServerName", roleServer);

                Thread.Sleep(100);
            }

            onScriptFinishEvent();
        }
Esempio n. 2
0
        private static IniSetting getInstance()
        {
            if (iniSetting == null)
            {
                iniSetting = new IniSetting();
            }

            return(iniSetting);
        }
Esempio n. 3
0
        private void init()
        {
            if (name.Equals("") || path.Equals("") ||
                name.IndexOf('.') == -1)
            {
                return;
            }

            try
            {
                IniSetting.setFilePath(path);
                IniSetting.readValue <string>("AutoLogin", "LoginRace", ref role);
                IniSetting.readValue <string>("AutoLogin", "LoginServerName", ref server);

                int startIndex = base.name.IndexOf(' ');
                int endIndex   = base.name.IndexOf('.');
                script = (startIndex != -1) ? name.Substring(startIndex, endIndex - startIndex) : "";
            }
            catch (Exception ex)
            { }
        }