Exemplo n.º 1
0
        protected override bool ReadInData()
        {
            using (StreamReader myReader = new StreamReader(SaveFile))
            {
                CharacterData temp = Settings.MainSettings.serializer.Deserialize <CharacterData>(new JsonTextReader(myReader));
                Console.Write($"Loading data from {Path.GetFileName(SaveFile)}");
                Information          = temp.Information;
                Skills               = temp.Skills;
                Attributes           = temp.Attributes;
                SkillQueue           = temp.SkillQueue;
                Stats                = temp.Stats;
                Location             = temp.Location;
                Activity             = temp.Activity;
                Ship                 = temp.Ship;
                Assets               = temp.Assets;
                Notifications        = temp.Notifications;
                IndustryJobs         = temp.IndustryJobs;
                CharacterID          = Settings.AuthorisationData.CharacterID;
                Wallet               = temp.Wallet;
                Clones               = temp.Clones;
                Implants             = temp.Implants;
                Fittings             = temp.Fittings;
                Bookmarks            = temp.Bookmarks;
                BookmarkFolders      = temp.BookmarkFolders;
                CalendarEvents       = temp.CalendarEvents;
                Portrait             = temp.Portrait;
                CorporationHistory   = temp.CorporationHistory;
                Medals               = temp.Medals;
                Standings            = temp.Standings;
                ResearchAgents       = temp.ResearchAgents;
                Blueprints           = temp.Blueprints;
                Fatigue              = temp.Fatigue;
                ContactNotifications = temp.ContactNotifications;
                Roles                = temp.Roles;
                Titles               = temp.Titles;
                Contacts             = temp.Contacts;
                Labels               = temp.Labels;
                Contracts            = temp.Contracts;
                FactionWarfareStats  = temp.FactionWarfareStats;
                Fleet                = temp.Fleet;



                Console.Write(" - successful");
                Console.WriteLine();
                Console.WriteLine();

                return(true);
            }
        }
Exemplo n.º 2
0
        protected override void Download()
        {
            //Wallet = DownloadData("Wallet Balance", Settings.EsiClient.Wallet.CharacterWallet());
            Wallet        = new CharacterWalletData(ref Settings);
            Information   = DownloadData("Information", Settings.EsiClient.Character.Information(CharacterID));
            Skills        = DownloadData("Skills", Settings.EsiClient.Skills.List());
            Attributes    = DownloadData("Attributes", Settings.EsiClient.Skills.Attributes());
            Stats         = DownloadData("Stats", Settings.EsiClient.Character.Stats());
            SkillQueue    = DownloadData("Skill Queue", Settings.EsiClient.Skills.Queue());
            Location      = DownloadData("Location", Settings.EsiClient.Location.Location());
            Activity      = DownloadData("Activity", Settings.EsiClient.Location.Online());
            Ship          = DownloadData("Ship", Settings.EsiClient.Location.Ship());
            Assets        = DownloadData("Assets", Settings.EsiClient.Assets.ForCharacter());
            Notifications = DownloadData("Notifications", Settings.EsiClient.Character.Notifications());
            IndustryJobs  = DownloadData("Industry jobs", Settings.EsiClient.Industry.JobsForCharacter());
            Clones        = DownloadData("Clones", Settings.EsiClient.Clones.List());
            //Implants.AddRange(DownloadData("Implants", Settings.EsiClient.Clones.Implants()));
            Fittings           = DownloadData("Fittings", Settings.EsiClient.Fittings.List());
            Bookmarks          = DownloadData("Bookmarks", Settings.EsiClient.Bookmarks.ForCharacter());
            BookmarkFolders    = DownloadData("Bookmark folders", Settings.EsiClient.Bookmarks.FoldersForCharacter());
            CalendarEvents     = DownloadData("Calendar events", Settings.EsiClient.Calendar.Events());
            Portrait           = DownloadData("Portrait", Settings.EsiClient.Character.Portrait(CharacterID));
            CorporationHistory = DownloadData("Corporation history", Settings.EsiClient.Character.CorporationHistory(CharacterID));
            // disabled because of chat servers being borked i guess
            //ChatChannels = DownloadData("Chat channels", Settings.EsiClient.Character.ChatChannels());
            Medals               = DownloadData("Medals", Settings.EsiClient.Character.Medals());
            Standings            = DownloadData("Standings", Settings.EsiClient.Character.Standings());
            ResearchAgents       = DownloadData("Research agents", Settings.EsiClient.Character.AgentsResearch());
            Blueprints           = DownloadData("Blueprints", Settings.EsiClient.Character.Blueprints(1));
            Fatigue              = DownloadData("Fatigue", Settings.EsiClient.Character.Fatigue());
            ContactNotifications = DownloadData("Contact notifications", Settings.EsiClient.Character.ContactNotifications());
            Roles               = DownloadData("Roles", Settings.EsiClient.Character.Roles());
            Titles              = DownloadData("Titles", Settings.EsiClient.Character.Titles());
            Contacts            = DownloadData("Contacts", Settings.EsiClient.Contacts.ListForCharacter(1));
            Labels              = DownloadData("Labels", Settings.EsiClient.Contacts.LabelsForCharacter());
            Contracts           = DownloadData("Contracts", Settings.EsiClient.Contracts.CharacterContracts(1));
            FactionWarfareStats = DownloadData("Faction warfare statistics", Settings.EsiClient.FactionWarfare.StatsForCharacter());
            MiningLedger        = DownloadData("Mining ledger", Settings.EsiClient.Industry.MiningLedger(1));
            Killmails           = DownloadData("Killmails", Settings.EsiClient.Killmails.ForCharacter());
            LoyaltyPoints       = DownloadData("Loyalty points", Settings.EsiClient.Loyalty.Points());
            //Mail = new MailData(ref Settings);
            //Mails = GetMails();
            Fleet   = DownloadData("Fleet", Settings.EsiClient.Fleets.FleetInfo());
            Planets = DownloadData("Planets", Settings.EsiClient.PlanetaryInteraction.Colonies());



            Console.WriteLine();
            SaveToFile();
        }