Ejemplo n.º 1
0
        void _playControl_RequestUpdateCheck(LobbyType lobbyType, PlayControl.LoginToLobbyCallback loginToLobbyCallback)
        {
            _updateCheckControl = new UpdateCheckControl();
            if (_updateCheckControl.HasPendingUpdates == true)
            {
                SystemWatcher.Close();

                _playControl.Visible = false;

                _updateCheckControl.Parent              = _mainTabControl.TabPages[0];
                _updateCheckControl.Dock                = DockStyle.Fill;
                _updateCheckControl.AutoupdateComplete += new UpdateCheckControl.AutoupdateCompleteHandler(delegate(bool updateCanceled)
                {
                    _updateCheckControl.Visible = false;
                    _playControl.Visible        = true;

                    if (updateCanceled == false)
                    {
                        SystemWatcher.InitializeWithAutoupdateProtectedFileList();

                        loginToLobbyCallback(lobbyType);
                    }
                });

                _updateCheckControl.Show();
            }
            else
            {
                SystemWatcher.InitializeWithAutoupdateProtectedFileList();

                loginToLobbyCallback(lobbyType);
            }
        }