private void CharLoad(object sender, System.Timers.ElapsedEventArgs e) { if (World.Player.Name == null) { return; } Wait2CharLoad.Elapsed -= CharLoad; Wait2CharLoad.Stop(); Wait2CharLoad.Dispose(); setEQ(); try { XmlSerializeHelper <SaveClass> .Load(World.Player.Name, out SaveClass, true); } catch (Exception ex) { MessageBox.Show(ex.InnerException.Message); } if (SaveClass == null) { SaveClass = new SaveClass(); } Wait2CharLoad = null; Core.Window.FormClosing += Window_FormClosing; Other.OnParalyze += Other_OnParalyze; World.Player.Changed += Player_Changed; Autolot.Reload(); World.Player.Print("=== Loaded === "); UO.PrintInformation("=== Loaded === "); }
public Initialize() { XmlSerializeHelper <GameWIndoSizeDATA> .Load("WindowSize", out GWSDATA, false); GWS = new GameWindowSize(GWSDATA); Wait2CharLoad = new System.Timers.Timer(100); Wait2CharLoad.Elapsed += CharLoad; Wait2CharLoad.Start(); }