예제 #1
0
        public FFXIVConfig ReadConfig()
        {
            FFXIVConfig config = default(FFXIVConfig);

            this.stream.BaseStream.Position = 0;

            while (!this.stream.EndOfStream)
            {
                string line = stream.ReadLine();

                if (line.StartsWith("ScreenMode"))
                {
                    config.ScreenMode = (FFXIVScreenMode)ushort.Parse(line.Substring(line.Length - 1));
                }
            }

            return(config);
        }
예제 #2
0
 private void ReadFFXIVConfig()
 {
     try
     {
         using (FFXIVConfigReader reader = new FFXIVConfigReader(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), @"My Games\FINAL FANTASY XIV - A Realm Reborn\FFXIV.cfg")))
         {
             this.xivConfig = reader.ReadConfig();
         }
     }
     catch (Exception ex)
     {
         this.log.WriteException("Can't read FF XIV config file.", ex);
     }
 }