Exemple #1
0
        /// <summary>
        /// Let user select user.
        /// </summary>
        /// <param name="sender">Object that raised the event.</param>
        /// <param name="e">Event arguments.</param>
        private void buttonUserModified_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                // user search
                UserSelectWindow dlg = new UserSelectWindow();
                dlg.UserSearch += dialog_UserSearch;
                if (App.ShowDialog(dlg))
                {
                    (sender as Button).Content = dlg.SelectedUser;

                    if (sender == buttonUserModifiedToday)
                    {
                        radioButtonBasicUserModifiedToday.IsChecked = true;
                    }
                    else if (sender == buttonUserModifiedWeek)
                    {
                        radioButtonBasicUserModifiedWeek.IsChecked = true;
                    }
                    else if (sender == buttonUserModifiedAll)
                    {
                        radioButtonBasicUserModifiedAll.IsChecked = true;
                    }
                }
                dlg.UserSearch -= dialog_UserSearch;
            }
            catch (Exception err)
            {
                App.HandleException(err);
            }
        }
Exemple #2
0
        /// <summary>
        /// Select a new user.
        /// </summary>
        /// <param name="sender">Object that raised the event.</param>
        /// <param name="e">Event arguments.</param>
        private void buttonTracedEntity_Click(object sender, RoutedEventArgs e)
        {
            UserSelectWindow dlg = new UserSelectWindow();

            dlg.UserSearch += dialog_UserSearch;
            if (App.ShowDialog(dlg))
            {
                TracedEntity = dlg.SelectedUser;
            }
            dlg.UserSearch -= dialog_UserSearch;
        }