Exemple #1
0
        public SettingsViewModel()
        {
            MessengerInstance = Messenger.Default;

            _settingsModel = new SettingsModel();
            PortNames = new ObservableCollection<string>(SerialPort.GetPortNames());
            ParityCollection = new ObservableCollection<string>(Enum.GetNames(typeof(Parity)));
            StopBitsCollection = new ObservableCollection<string>(Enum.GetNames(typeof(StopBits)));
            DataBitsCollection = new ObservableCollection<string>(Enum.GetNames(typeof(DataBits)));

            CreateNavigateToMainPageCommand();
            CreateRefreshSerialPortsCommand();
        }
Exemple #2
0
 private void ExecuteNavigateToMainPageCommand(SettingsModel portSettings)
 {
     MessengerInstance.Send(new SerialPortSettingsMessage(_settingsModel));
     NavigationHelper.NavigateTo<MasterDevicePage>();
 }
 public SerialPortSettingsMessage(SettingsModel serialPortSettings)
 {
     SerialPortSettings = serialPortSettings;
 }