blob: 712aa4526ec8b0baecdcef251b5ffdd91d952011 (
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
75
76
77
78
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Tango.Settings;
using Tango.SharedUI;
namespace Tango.FSE.Common
{
public class FSEDialogViewVM : DialogViewVM
{
protected FSESettings Settings { get; set; }
private bool _autoMode;
/// <summary>
/// Will apply the default cancel and OK buttons.
/// </summary>
public bool AutoMode
{
get { return _autoMode; }
set { _autoMode = value; RaisePropertyChangedAuto(); }
}
private bool _hasDefault;
/// <summary>
/// Makes the OK button press by default.
/// </summary>
public bool HasDefault
{
get { return _hasDefault; }
set { _hasDefault = value; RaisePropertyChangedAuto(); }
}
private String _okText;
/// <summary>
/// Gets or sets the OK button text.
/// </summary>
public String OKText
{
get { return _okText; }
set { _okText = value; }
}
private String _cancelText;
/// <summary>
/// Gets or sets the cancel button text.
/// </summary>
public String CancelText
{
get { return _cancelText; }
set { _cancelText = value; RaisePropertyChangedAuto(); }
}
private bool _canCancel;
/// <summary>
/// Gets or sets a value indicating whether to display the cancel button.
/// When CanClose is set to false, the cancel button will also be hidden.
/// </summary>
public bool CanCancel
{
get { return _canCancel; }
set { _canCancel = value; RaisePropertyChangedAuto(); }
}
/// <summary>
/// Initializes a new instance of the <see cref="FSEDialogViewVM"/> class.
/// </summary>
public FSEDialogViewVM() : base()
{
AutoMode = true;
CanCancel = true;
HasDefault = true;
Settings = SettingsManager.Default.GetOrCreate<FSESettings>();
}
}
}
|