Пример #1
0
        public static JournalEntry CreateJournalEntry(string text)
        {
            JournalEntry je=null;

            JObject jo = (JObject)JObject.Parse(text);

            string Eventstr = Tools.GetString(jo["event"]);

            if (Eventstr == null)  // Should normaly not happend unless corrupt string.
                return null;

            switch (Eventstr)
            {
                case "fileheader":
                    je = new JournalFileHeader(jo);
                    break;

                case "FSDJump":
                    je = new JournalFSDJump(jo);
                    break;

                case "LoadGame":
                    je = new JournalLoadGame(jo);
                    break;

                case "Bounty":
                case "BuyAmmo":
                case "BuyDrones":
                case "BuyExplorationData":
                case "BuyTradeData":
                case "CapShipBond":
                case "ClearSavedGame":
                case "CockpitBreached":
                case "CollectCargo":
                case "CommitCrime":
                case "CommunityGoalJoin":
                case "CommunityGoalReward":
                case "DatalinkScan":
                case "Died":
                case "DockFighter":
                case "DockingCancelled":
                case "DockingDenied":
                case "DockingGranted":
                case "DockingRequested":
                case "DockingTimeout":
                case "DockSRV":
                case "EjectCargo":
                case "EngineerApply":
                case "EngineerCraft":
                case "EngineerProgress":
                case "EscapeInterdiction":
                case "FactionKillBond":
                case "FuelScoop":
                case "HeatDamage":
                case "HeatWarning":
                case "HullDamage":
                case "Interdicted":
                case "Interdiction":
                case "LaunchFighter":
                case "LaunchSRV":
                case "Liftoff":
                case "Location":
                case "MarketBuy":
                case "MarketSell":
                case "MaterialCollected":
                case "MaterialDiscarded":
                case "MaterialDiscovered":
                case "MiningRefined":
                case "MissionAbandoned":
                case "MissionAccepted":
                case "MissionCompleted":
                case "MissionFailed":
                case "ModuleBuy":
                case "ModuleSell":
                case "ModuleSwap":
                case "NewCommander":
                case "PayFines":
                case "PayLegacyFines":
                case "PowerplayCollect":
                case "PowerplayDefect":
                case "PowerplayDeliver":
                case "PowerplayFastTrack":
                case "PowerplayJoin":
                case "PowerplayLeave":
                case "PowerplaySalary":
                case "PowerplayVote":
                case "PowerplayVoucher":
                case "Progress":
                case "Promotion":
                case "Rank":
                case "RebootRepair":
                case "ReceiveText":
                case "RedeemVoucher":
                case "RefuelAll":
                case "RefuelPartial":
                case "Repair":
                case "RestockVehicle":
                case "Resurrect":
                case "Scan":
                case "Screenshot":
                case "SelfDestruct":
                case "SellDrones":
                case "SellExplorationData":
                case "SendText":
                case "ShieldState":
                case "ShipyardBuy":
                case "ShipyardNew":
                case "ShipyardSell":
                case "ShipyardSwap":
                case "ShipyardTransfer":
                case "SupercruiseEntry":
                case "SupercruiseExit":
                case "Synthesis":
                case "Touchdown":
                case "Undocked":
                case "USSDrop":
                case "VehicleSwitch":
                case "WingAdd":
                case "WingJoin":
                case "WingLeave":
                    je = new JournalUnhandled(jo, Eventstr);
                    break;

                default:
                    je = new JournalUnknown(jo);
                    break;
            }

            return je;
        }
Пример #2
0
 public JournalUnhandled(JObject jo, string journaltypestr) : base(jo, JournalUnhandled.JournalString2Type(journaltypestr))
 {
 }