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(); }
private void ExecuteNavigateToMainPageCommand(SettingsModel portSettings) { MessengerInstance.Send(new SerialPortSettingsMessage(_settingsModel)); NavigationHelper.NavigateTo<MasterDevicePage>(); }
public SerialPortSettingsMessage(SettingsModel serialPortSettings) { SerialPortSettings = serialPortSettings; }