source: branches/eraser6/BlackBox/Eraser/BlackBoxMainForm.cs @ 1420

Revision 1420, 1.9 KB checked in by lowjoel, 5 years ago (diff)

Set the icon of the Crash Assistant so that progress can be monitored.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
Line 
1/*
2 * $Id$
3 * Copyright 2008-2009 The Eraser Project
4 * Original Author: Joel Low <lowjoel@users.sourceforge.net>
5 * Modified By:
6 *
7 * This file is part of Eraser.
8 *
9 * Eraser is free software: you can redistribute it and/or modify it under the
10 * terms of the GNU General Public License as published by the Free Software
11 * Foundation, either version 3 of the License, or (at your option) any later
12 * version.
13 *
14 * Eraser is distributed in the hope that it will be useful, but WITHOUT ANY
15 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
16 * A PARTICULAR PURPOSE. See the GNU General Public License for more details.
17 *
18 * A copy of the GNU General Public License can be found at
19 * <http://www.gnu.org/licenses/>.
20 */
21
22using System;
23using System.Collections.Generic;
24using System.ComponentModel;
25using System.Data;
26using System.Drawing;
27using System.Text;
28using System.Windows.Forms;
29using Eraser.Util;
30
31namespace Eraser
32{
33    public partial class BlackBoxMainForm : Form
34    {
35        public BlackBoxMainForm()
36        {
37            InitializeComponent();
38            UXThemeApi.UpdateControlTheme(this);
39
40            ReportsLb.BeginUpdate();
41            foreach (BlackBoxReport report in BlackBox.GetDumps())
42            {
43                if (report.Submitted)
44                    continue;
45
46                ReportsLb.Items.Add(report);
47                ReportsLb.SetItemChecked(ReportsLb.Items.Count - 1, true);
48            }
49            ReportsLb.EndUpdate();
50        }
51
52        private void SubmitBtn_Click(object sender, EventArgs e)
53        {
54            Visible = false;
55
56            BlackBoxReport[] selectedReports = new BlackBoxReport[ReportsLb.CheckedItems.Count];
57            ReportsLb.CheckedItems.CopyTo(selectedReports, 0);
58            BlackBoxUploadForm form = new BlackBoxUploadForm(selectedReports);
59            form.Show();
60
61            Close();
62        }
63
64        private void PostponeBtn_Click(object sender, EventArgs e)
65        {
66            Close();
67        }
68
69        /// <summary>
70        /// The global BlackBox instance.
71        /// </summary>
72        private BlackBox BlackBox = BlackBox.Get();
73    }
74}
Note: See TracBrowser for help on using the repository browser.