aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/FSE/Tango.FSE.Common/FSEDialogViewVM.cs
blob: e5bc8f8e876854a732d4c59bf89f267a41a0b489 (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
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(); }
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="FSEDialogViewVM"/> class.
        /// </summary>
        public FSEDialogViewVM() : base()
        {
            AutoMode = true;
            Settings = SettingsManager.Default.GetOrCreate<FSESettings>();
        }
    }
}