| 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 | |
|---|
| 22 | using System; |
|---|
| 23 | using System.Collections.Generic; |
|---|
| 24 | using System.ComponentModel; |
|---|
| 25 | using System.Data; |
|---|
| 26 | using System.Drawing; |
|---|
| 27 | using System.Text; |
|---|
| 28 | using System.Windows.Forms; |
|---|
| 29 | using Eraser.Util; |
|---|
| 30 | |
|---|
| 31 | namespace 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 | using (BlackBoxUploadForm form = new BlackBoxUploadForm(selectedReports)) |
|---|
| 59 | form.ShowDialog(); |
|---|
| 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 | } |
|---|