public SnapshotOutput(PZOutput o) { try { client = new SnapshotClient(o.client); } catch { } outputitem = o.outputitem; }
public static void LoadApply(SnapShot s) { Console.WriteLine("Loading Snapshot..."); Console.WriteLine("\t Load blacklist..."); { TradeBotCore.blacklist = s.blacklist; } foreach (var item in TradeBotCore.blacklist) { Console.WriteLine("\t\t" + item); } // catch { TradeBotCore.blacklist.Clear(); } Console.WriteLine("\t Load clist..."); HelperHandler.clist.Clear(); foreach (var item in s.clist) { HelperHandler.clist.Add(item.ToConverter()); Console.WriteLine("\t\t" + item.client.clientname); } Console.WriteLine("\t Load olist..."); HelperHandler.olist.Clear(); foreach (var item in s.olist) { HelperHandler.olist.Add(item.ToOutput()); Console.WriteLine("\t\t" + item.client.clientname); } Console.WriteLine("\t Loaded slist..."); HelperHandler.slist.Clear(); foreach (var item in s.slist) { HelperHandler.slist.Add(item.ToStorage()); Console.WriteLine("\t\t" + item.client.clientname); } Console.WriteLine("\t Load Helper Enabled state..."); HelperHandler.enabled = s.helpersenabled; Console.WriteLine("\t\t" + HelperHandler.enabled); Console.WriteLine("\t Load clientlist..."); TradeBotCore.clientlist = SnapshotClient.ConvertList(s.clientlist); foreach (var item in TradeBotCore.clientlist) { Console.WriteLine("\t\t" + item); } Console.WriteLine("Finished Loading!!"); //new System.Threading.Thread(() => { //foreach (var client in s.clientlist) //{ // KRelayMove.Core.clientlist[KRelayMove.Core.IndexOfClient(client.ToClient().client)].StartMove(client.clientloc); //} //}).Start(); MoveClients(s); }
public SnapshotStorage(PZStorage s) { try { inputitem = s.inputitem; } catch { } try { client = new SnapshotClient(s.client); } catch { } }
public SnapShot() { blacklist = TradeBotCore.blacklist; foreach (var item in HelperHandler.slist) { slist.Add(new SnapshotStorage(item)); } foreach (var item in HelperHandler.clist) { clist.Add(new SnapshotConverter(item)); } foreach (var item in HelperHandler.olist) { olist.Add(new SnapshotOutput(item)); } helpersenabled = HelperHandler.enabled; clientlist = SnapshotClient.ConvertList(TradeBotCore.clientlist);//must be last one to be converted!! }