-
Notifications
You must be signed in to change notification settings - Fork 3
/
DiscItem.cs
48 lines (42 loc) · 1.29 KB
/
DiscItem.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using JarrettVance.ChapterTools.Properties;
namespace JarrettVance.ChapterTools
{
public partial class DiscItem : UserControl
{
public event EventHandler Opened;
public DiscItem()
{
InitializeComponent();
}
public DiscItem(Disc disc)
{
InitializeComponent();
this.Tag = disc;
lblName.Text = disc.Name;
if (disc.FoundExtractions.Length > 0)
this.lblStatus.Text = "Possible chapters files: " + string.Join(", ", disc.FoundExtractions);
else
this.lblStatus.Text = "No possible chapter files found";
if (disc.Type == "DVD")
picDisc.Image = Resources.DVD;
else if (disc.Type == "Bluray")
picDisc.Image = Resources.Bluray;
else if (disc.Type == "HDDVD")
picDisc.Image = Resources.HDDVD;
else
picDisc.Image = null;
}
private void btnUpdate_Click(object sender, EventArgs e)
{
if (Opened != null) Opened(this, e);
}
}
}