blob: 4027af171618dfbc92316dcd92f778774ea74aaa (
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
|
using Google.Protobuf;
using Google.Protobuf.Collections;
using Microsoft.Win32;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Threading;
using Tango.Core.Commands;
using Tango.PMR;
using Tango.Scripting;
using Tango.Settings;
using Tango.SharedUI;
using Tango.Stubs.UI.Views;
using Tango.Stubs.ViewModels;
using Tango.Transport.Adapters;
namespace Tango.Stubs.UI.ViewModels
{
/// <summary>
/// Represents the script execution utility main view model.
/// </summary>
/// <seealso cref="Tango.SharedUI.ViewModel" />
public class MainViewVM : ViewModel
{
private StubsViewVM _stubsViewVM;
/// <summary>
/// Gets or sets the stubs view vm.
/// </summary>
public StubsViewVM StubsViewVM
{
get { return _stubsViewVM; }
set { _stubsViewVM = value; RaisePropertyChangedAuto(); }
}
/// <summary>
/// Initializes a new instance of the <see cref="MainViewVM"/> class.
/// </summary>
public MainViewVM()
{
LogManager.RegisterLogger(new Logging.FileLogger() { Enabled = true });
StubsViewVM = new StubsViewVM(ConnectionMode.Internal);
Application.Current.Exit += Current_Exit;
}
private void Current_Exit(object sender, ExitEventArgs e)
{
StubsViewVM.SaveSettings();
}
}
}
|