ConnectionBuilderViewModel.cs
1.9 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
/***********************************************
* CONFIDENTIAL AND PROPRIETARY
*
* The source code and other information contained herein is the confidential and exclusive property of
* ZIH Corp. and is subject to the terms and conditions in your end user license agreement.
* This source code, and any other information contained herein, shall not be copied, reproduced, published,
* displayed or distributed, in whole or in part, in any medium, by any means, for any purpose except as
* expressly permitted under such license agreement.
*
* Copyright ZIH Corp. 2018
*
* ALL RIGHTS RESERVED
***********************************************/
using System.Collections.ObjectModel;
using Zebra.Windows.DevDemo.Utils;
namespace Zebra.Windows.DevDemo.Demos.ConnectionBuilder {
public class ConnectionBuilderViewModel : IDemoViewModel {
private string logData;
private ObservableCollection<string> connectionPrefixes = new ObservableCollection<string>() {
ConnectionPrefix.None,
ConnectionPrefix.TcpMulti,
ConnectionPrefix.Tcp,
ConnectionPrefix.TcpStatus,
ConnectionPrefix.Usb,
ConnectionPrefix.UsbDirect
};
public string LogData {
get => logData;
set {
if (logData != value) {
logData = value;
OnPropertyChanged();
}
}
}
public ObservableCollection<string> ConnectionPrefixes {
get => connectionPrefixes;
}
public ConnectionBuilderViewModel() {
Name = "Connection Builder";
logData = "Log:\n\n";
if(BluetoothHelper.IsBluetoothSupported()) {
connectionPrefixes.Add(ConnectionPrefix.Bluetooth);
connectionPrefixes.Add(ConnectionPrefix.BluetoothMulti);
}
}
}
}