Example #1
0
        private static void ShowPoliceComputer()
        {
            Game.IsPaused = true;
            if (!Configs.SkipLogin)
            {
                login = new ComputerLogin();
                login.Show();

                while (login.Window.IsVisible || ComputerLogin.next_form.IsAlive || ComputerMain.form_ped_db.IsAlive ||
                       ComputerMain.form_veh_db.IsAlive || ComputerMain.form_backup.IsAlive || ComputerMain.form_active_calls.IsAlive ||
                       ComputerPedDB.form_main.IsAlive || ComputerVehDB.form_main.IsAlive || ComputerRequestBackup.form_main.IsAlive ||
                       ComputerCurrentCallDetails.form_main.IsAlive)
                {
                    GameFiber.Yield();
                }
            }
            else
            {
                main = new ComputerMain();
                main.Show();

                while (main.Window.IsVisible || ComputerMain.form_ped_db.IsAlive || ComputerMain.form_veh_db.IsAlive ||
                       ComputerMain.form_backup.IsAlive || ComputerMain.form_active_calls.IsAlive || ComputerPedDB.form_main.IsAlive ||
                       ComputerPedDB.form_main.IsAlive || ComputerVehDB.form_main.IsAlive || ComputerRequestBackup.form_main.IsAlive ||
                       ComputerCurrentCallDetails.form_main.IsAlive)
                {
                    GameFiber.Yield();
                }
            }

            Function.DisableBackground();

            _opened       = false;
            Game.IsPaused = false;
        }
        private void ShowForm(GwenForm gwenForm)
        {
            Game.IsPaused = true;
            gwenForm.Show();

            var screenSize = Game.Resolution;
            var formSize   = gwenForm.Size;

            var formX = screenSize.Width / 2 - formSize.Width / 2;
            var formY = screenSize.Height / 3 - formSize.Height / 2;

            gwenForm.Position = new System.Drawing.Point(formX, formY);

            while (gwenForm.Window.IsVisible)
            {
                GameFiber.Yield();
            }

            Game.IsPaused = false;
        }