示例#1
0
 public CharacterManager(Paths paths, AccountManager accountManager)
 {
     _paths = paths;
     _accountManager = accountManager;
     _characters = new Dictionary<String, Character>();
     ActiveCharacters = new List<String>();
     InactiveCharacters = new List<String>();
     SelectedCharacter = null;
     _textFileio = new TextFileio(paths.ConfigPath, null);
     _eventDispatcher = EventDispatcher.Instance;
     _eventDispatcher.characterSettingUpdatedHandler += CharacterSettingUpdatedListener;
 }
示例#2
0
 private string GenerateInvestmentHtml(List<string> potentialInvestments)
 {
     string hexColor = RandomHexColor();
     var pageMarkup = new List<object>();
     pageMarkup.Add("<body bgcolor='" + hexColor + "'>");
     pageMarkup.AddRange(from typeId in potentialInvestments
                         select "<a href='#' onclick='CCPEVE.showMarketDetails(" + typeId.ToString() + ")'>x</a>");
     var textFileio = new TextFileio(Paths.LocalDropboxPath, EtConstants.MarketSearchHtml);
     textFileio.Save(pageMarkup);
     return hexColor;
 }
示例#3
0
        private void Initialize()
        {
            _textFileio = new TextFileio("", _configFileName);
            List<String> config = _textFileio.Read();
            var configLines = new Dictionary<String, String>();
            var characterNames = new List<String>();

            foreach (String line in config)
            {
                String[] parts = line.Split('=');
                if (parts[0].Equals(EtConstants.CharacterKey))
                    characterNames.Add(parts[1]);
                else
                    configLines.Add(parts[0], parts[1]);
            }

            Paths.LogPath = configLines[EtConstants.LogPathKey];
            Paths.ClientPath = configLines[EtConstants.ClientPathKey];
            Paths.ConfigPath = configLines[EtConstants.ConfigPathKey];
            Paths.EveSettingsPath = configLines[EtConstants.EveSettingsPathKey];
            Paths.LocalDropboxPath = configLines[EtConstants.LocalDropboxPathKey];
            Paths.WebDropboxPath = Paths.LocalDropboxPath.Replace('\\', '/');
            ClientConfig.TimingMultiplier = Convert.ToInt32(configLines[EtConstants.TimingMultiplierKey]);
            ClientConfig.Iterations = Convert.ToInt32(configLines[EtConstants.IterationsKey]);
            ClientConfig.XResolution = Convert.ToInt32(configLines[EtConstants.XResolutionKey]);
            ClientConfig.YResolution = Convert.ToInt32(configLines[EtConstants.YResolutionKey]);

            CharacterManager.Load(characterNames);

            String fileName = Convert.ToString(ClientConfig.XResolution) + "x" +
                              Convert.ToString(ClientConfig.YResolution) + ".ini";
            _eveUiDataIo = new EveUiDataIo(Paths.ConfigPath, fileName, Ui);

            _textFileToDictionaryLoader = new TextFileToDictionaryLoader(Paths.ConfigPath, FittableModuleTypeIdsFilename);
            Modules.FittableModuleTypeIDs = _textFileToDictionaryLoader.LoadIntKeyEqualsIntValueEqualsOneLine();
            Modules.LongNameTypeIDs = _textFileToDictionaryLoader.LoadIntKeyEqualsIntValueEqualsOneLine(
                Paths.ConfigPath, LongNameTypeIdsFilename);
            Modules.TypeNames = _textFileToDictionaryLoader.LoadIntKeyStringValue(Paths.ConfigPath, TypeNamesFilename);
        }