示例#1
0
 public LoginViewModel(IAdapter adapter, IBluetoothLE ble, INavigation navigation, IStrongPlateDataService database)
 {
     this.adapter    = adapter;
     this.ble        = ble;
     this.navigation = navigation;
     this.database   = database;
     LoginCommand    = new Command(Login);
 }
 public DeviceViewModel(IAdapter adapter, IBluetoothLE ble, INavigation navigation, IStrongPlateDataService database)
 {
     this.ble          = ble;
     this.adapter      = adapter;
     this.navigation   = navigation;
     this.database     = database;
     _bleStatus        = GetStateText();
     ble.StateChanged += OnStateChanged;
     StartScanCommand  = new Command(StartScan);
 }
示例#3
0
 public ServiceListViewModel(IStrongPlateDataService database)
 {
     this.database = database;
     MessagingCenter.Subscribe <DeviceItem>(this, "connectdevice", (arg) =>
     {
         device = arg.Device;
         GetServices();
         PostPlateData();
     });
     MessagingCenter.Send("true", "senddevice");
 }
 public LoginPage(IAdapter adapter, IBluetoothLE ble, IStrongPlateDataService database)
 {
     InitializeComponent();
     BindingContext = new LoginViewModel(adapter, ble, Navigation, database);
 }
示例#5
0
 public ServiceListPage(IStrongPlateDataService database)
 {
     InitializeComponent();
     BindingContext = new ServiceListViewModel(database);
 }