Ejemplo n.º 1
0
 private void btnClear_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         if (0 == _reviewRepo.GetCount())
         {
             return;
         }
         //TODO: Adda aconfirmation here.
         //DialogResult result = MessageBox.Show("Are you sure to clear all items?", Utils.AssemblyTitle, MessageBoxButtons.YesNo, MessageBoxIcon.Question);
         //if (DialogResult.Yes == result)
         //{
         _reviewRepo.Clear();
         RefreshReviewList();
         var solutionConfig = SolutionConfig.GetSolutionConfig();
         if (solutionConfig != null)
         {
             solutionConfig.Delete();
         }
         //}
     }
     catch (Exception ex)
     {
         Utils.HandleException(ex);
     }
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Handles the Click event of the tbtnClear control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
        private void tbtnClear_Click(object sender, EventArgs e)
        {
            try
            {
                if (0 == _reviewRepo.GetCount())
                {
                    return;
                }

                DialogResult result = MessageBox.Show("Are you sure to clear all items?", Utils.AssemblyTitle, MessageBoxButtons.YesNo, MessageBoxIcon.Question);
                if (DialogResult.Yes == result)
                {
                    _reviewRepo.Clear();
                    RefreshReviewList();
                }
            }
            catch (Exception ex)
            {
                Utils.HandleException(ex);
            }
        }