/// <summary>
        /// Handle the ResetPassword command.
        /// </summary>
        /// <param name="sender">The Reset Password button.</param>
        /// <param name="e">The event arguments.</param>
        private void OnResetPassword(object sender, RoutedEventArgs e)
        {
            WindowResetPassword reset = new WindowResetPassword();

            reset.User  = (this.users.SelectedItem as User);
            reset.Owner = this;
            reset.ShowDialog();
        }
Beispiel #2
0
        /// <summary>
        /// Set the value of IsCurrentUser when the user changes.
        /// </summary>
        /// <param name="sender">The password dialog.</param>
        /// <param name="eventArgs">The event arguments.</param>
        private static void OnUserChanged(DependencyObject sender, DependencyPropertyChangedEventArgs eventArgs)
        {
            WindowResetPassword window = sender as WindowResetPassword;

            window.IsCurrentUser = window.User.UserId == UserContext.Instance.UserId;
        }