blob: 035b7353fcfac1d7af97e2e84a8c1564de8d0d80 (
plain)
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
|
// --------------------------------------------------------------------------------------------------------------------
// <copyright file="SourceMenuItem.cs" company="HandBrake Project (http://handbrake.fr)">
// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
// </copyright>
// <summary>
// Defines the SourceMenuItem type.
// </summary>
// --------------------------------------------------------------------------------------------------------------------
namespace HandBrakeWPF.Model
{
using System.Collections.ObjectModel;
using System.Windows.Input;
/// <summary>
/// The source menu item.
/// </summary>
public class SourceMenuItem
{
/// <summary>
/// Initializes a new instance of the <see cref="SourceMenuItem"/> class.
/// </summary>
public SourceMenuItem()
{
this.Children = new ObservableCollection<SourceMenuItem>();
}
/// <summary>
/// Gets or sets the text.
/// </summary>
public string Text { get; set; }
/// <summary>
/// Gets or sets the command.
/// </summary>
public ICommand Command { get; set; }
/// <summary>
/// Gets or sets the children.
/// </summary>
public ObservableCollection<SourceMenuItem> Children { get; set; }
/// <summary>
/// Gets or sets a value indicating whether is drive.
/// </summary>
public bool IsDrive { get; set; }
/// <summary>
/// Gets or sets a value indicating whether is open folder.
/// </summary>
public bool IsOpenFolder { get; set; }
/// <summary>
/// Gets a value indicating whether is open file.
/// </summary>
public bool IsOpenFile
{
get
{
return !this.IsOpenFolder && !this.IsDrive && (this.Children == null || this.Children.Count == 0);
}
}
/// <summary>
/// Gets or sets the tag.
/// </summary>
public object Tag { get; set; }
/// <summary>
/// Gets or sets the input gesture text.
/// </summary>
public string InputGestureText { get; set; }
}
}
|