コード例 #1
0
 private void UpdateUser(UserHistory user)
 {
     try
     {
         Cursor = Cursors.WaitCursor;
         ResultsGrid.Visible = false;
         var entry = user.Update(parser, DateTime.Now);
         loader.Save(history);
         UpdateList();
         if (entry.SomethingHappened)
             new HistoryEntryForm(entry).ShowDialog();
     }
     #if !DEBUG
     catch (Exception e)
     {
         MessageBox.Show(e.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
     #endif
     finally
     {
         ResultsGrid.Visible = true;
         Cursor = Cursors.Default;
     }
 }