internal MainHub(Objects.Client c) { if (!WinAPI.IsIconic(c.TibiaProcess.MainWindowHandle)) { this.StartPosition = FormStartPosition.Manual; WinAPI.RECT rect = new WinAPI.RECT(); WinAPI.GetWindowRect(c.TibiaProcess.MainWindowHandle, out rect); this.Location = new Point(rect.left + 10, rect.top + 30); } this.Client = c; InitializeComponent(); this.Icon = Properties.Resources.icon; if (!this.Client.HasLoadedProperties) { ObjectPropertiesLoader loader = new ObjectPropertiesLoader(this.Client); loader.ShowDialog(); if (!loader.Finished) { Environment.Exit(Environment.ExitCode); } loader.Dispose(); } this.timerUpdate.Start(); }
internal MainHub(Objects.Client c) { if (!WinAPI.IsIconic(c.TibiaProcess.MainWindowHandle)) { this.StartPosition = FormStartPosition.Manual; WinAPI.RECT rect = new WinAPI.RECT(); WinAPI.GetWindowRect(c.TibiaProcess.MainWindowHandle, out rect); this.Location = new Point(rect.left + 10, rect.top + 30); } this.Client = c; InitializeComponent(); this.Icon = Properties.Resources.icon; if (!this.Client.HasLoadedProperties) { ObjectPropertiesLoader loader = new ObjectPropertiesLoader(this.Client); loader.ShowDialog(); if (!loader.Finished) Environment.Exit(Environment.ExitCode); loader.Dispose(); } this.timerUpdate.Start(); }