Ejemplo n.º 1
0
        public Menu(bool showAuthenticationMode)
        {
            InitializeComponent();

            try
            {
                //Adjust menu BackGround
                SetBackGroundDimensions();

                if (showAuthenticationMode)
                {
                    //Show Authentication type
                    _AuthenticationMode.SetValue(Grid.RowSpanProperty, 3);
                    _AuthenticationMode.SetValue(Grid.ColumnSpanProperty, 3);
                    _AuthenticationMode.lblModalPopupTitle.Content = "Choose Authentication Mode";
                    grdLayoutRoot.Children.Add(_AuthenticationMode);

                    _AuthenticationMode._LoginPopup.Closed       += new EventHandler(_LoginPopup_Closed);
                    _AuthenticationMode.AuthenticationModeClosed += new AuthenticationMode.AuthenticationModeClosedHandler(authenticationMode_AuthenticationModeClosed);
                }
                else
                {
                    CheckPlayerProgress();
                    SetWelcomeMessage();
                }

                //Remove install button if running out of the browser
                if (Application.Current.IsRunningOutOfBrowser)
                {
                    btnInstall.Visibility = Visibility.Collapsed;
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }