Ejemplo n.º 1
0
 private async void lvDevicesList_ItemSelected(object sender, SelectedItemChangedEventArgs e)
 {
     lvDevicesList.SelectedItem = Color.Transparent;
     try
     {
         var index = (lvDevicesList.ItemsSource as ObservableCollection <SetDevicesList>).IndexOf(e.SelectedItem as SetDevicesList);
         var a     = new SetDevicesList();
         ObservableCollection <SetDevicesList> dt = new ObservableCollection <SetDevicesList>();
         App.NavigateMasterDetail(new PCHealth(DevicesList[index], DEP_ID, GROUPNAME));
     }
     catch (Exception ex)
     {
         await DisplayAlert("CloudSchool", "Error! " + ex.Message, "ok");
     }
 }
 private async void lvDevicesList_ItemSelected(object sender, SelectedItemChangedEventArgs e)
 {
     try
     {
         var index = (lvDevicesList.ItemsSource as ObservableCollection <SetDevicesList>).IndexOf(e.SelectedItem as SetDevicesList);
         var a     = new SetDevicesList();
         ObservableCollection <SetDevicesList> dt = new ObservableCollection <SetDevicesList>();
         AddNewTicket.DEVICE_ID = DevicesList[index].ToString();
         App.NavigateMasterDetail(new AddNewTicket());
     }
     catch (Exception ex)
     {
         await DisplayAlert("CloudSchool", "Error! " + ex.Message, "ok");
     }
 }
Ejemplo n.º 3
0
 private async void btnAccess_Clicked(object sender, EventArgs e)
 {
     try
     {
         var            item      = (Xamarin.Forms.Button)sender;
         SetDevicesList listitem  = (from itm in dt where itm.deviceID == item.CommandParameter.ToString() select itm).FirstOrDefault <SetDevicesList>();
         string         device_id = listitem.deviceID.ToString();
         try
         {
             App.NavigateMasterDetail(new WebViewPage(device_id));
         }
         catch { }
     }
     catch (Exception ex)
     {
         await DisplayAlert("Error!", ex.Message, "Ok");
     }
 }