Repository navigation
Expand file tree
/
Copy pathServiceControlEditorViewModel.cs
More file actions
59 lines (43 loc) · 1.71 KB
/
Copy pathServiceControlEditorViewModel.cs
File metadata and controls
59 lines (43 loc) · 1.71 KB
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
namespace ServiceControl.Config.UI.InstanceAdd;
using System.Collections.Generic;
using System.Windows.Input;
using Framework.Rx;
using PropertyChanged;
using ServiceControlInstaller.Engine.Instances;
using Validation;
public class ServiceControlEditorViewModel : RxProgressScreen
{
public ServiceControlEditorViewModel()
{
Transports = ServiceControlCoreTransports.GetSupportedTransports();
ServiceControl = new ServiceControlInformation(this);
ServiceControlAudit = new ServiceControlAuditInformation(this);
}
[DoNotNotify]
public ValidationTemplate ValidationTemplate { get; set; }
public IEnumerable<TransportInfo> Transports { get; }
public TransportInfo SelectedTransport
{
get => selectedTransport;
set
{
ConnectionString = null;
selectedTransport = value;
}
}
public virtual void OnSelectedTransportChanged()
{
// Needs to exist in base class for Fody to call it so it can be executed in superclass
}
public string TransportWarning => SelectedTransport?.Help;
public string ConnectionString { get; set; }
public string SampleConnectionString => SelectedTransport?.SampleConnectionString;
public bool ShowConnectionString => !string.IsNullOrEmpty(SelectedTransport?.SampleConnectionString);
public ServiceControlInformation ServiceControl { get; set; }
public ServiceControlAuditInformation ServiceControlAudit { get; set; }
public bool InstallErrorInstance { get; set; } = true;
public bool InstallAuditInstance { get; set; } = true;
public ICommand Cancel { get; set; }
public ICommand Save { get; set; }
TransportInfo selectedTransport;
}