/// <summary>
        /// The class constructor that is invoked to replace the contents of the window.
        /// </summary>
        /// <param name="menuWindow"> The window that is showing this page. </param>
        public VerMarcadoresWindow(MenuWindow menuWindow)
        {
            InitializeComponent();
            this.menuWindow = menuWindow;

            Proxy.MenuServiceClient server = new Proxy.MenuServiceClient();
            var playersList = server.GetScores();

            server.Close();

            DataContext = playersList;
        }
        private void ClickChangePassword(object sender, RoutedEventArgs e)
        {
            string currentPassword = TextBoxCurrentPassword.Password;
            string newPassword     = TextBoxNewPassword.Password;
            string confirmation    = TextBoxConfirmation.Password;

            if (!string.IsNullOrEmpty(currentPassword) && !string.IsNullOrEmpty(newPassword) && !string.IsNullOrEmpty(confirmation))
            {
                if (newPassword.Equals(confirmation))
                {
                    try
                    {
                        Proxy.MenuServiceClient server = new Proxy.MenuServiceClient();
                        bool isPasswordChanged         = server.ChangePassword(username, currentPassword, newPassword);
                        server.Close();
                        if (isPasswordChanged)
                        {
                            MessageBox.Show(Properties.Resources.PasswordChanged);
                            menuWindow.GoBack();
                        }
                        else
                        {
                            LabelAlert.Content = Properties.Resources.IncorrectPassword;
                        }
                    }
                    catch (System.ServiceModel.EndpointNotFoundException ex)
                    {
                        Console.WriteLine(ex.ToString());
                        LabelAlert.Content = Properties.Resources.ServerIsOff;
                    }
                }
                else
                {
                    LabelAlert.Content = Properties.Resources.PasswordsDoNotMatch;
                }
            }
            else
            {
                LabelAlert.Content = Properties.Resources.EmptyFields;
            }
        }