예제 #1
0
파일: MainHub.cs 프로젝트: uvbs/bot-2016
        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();
        }
예제 #2
0
파일: MainHub.cs 프로젝트: KyLuaa/bot
        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();
        }