private void PhoneApplicationPage_Loaded(object sender, RoutedEventArgs e) { App app = Application.Current as App; string ID = app.ID; sc.FindUIDCompleted += new EventHandler <FindUIDCompletedEventArgs>(sc_FindUIDCompleted); sc.FindUIDAsync(ID); }
// void sc_FindDeviceCompleted(object sender, FindDeviceCompletedEventArgs e) // { // List<Device> devices = e.Result; // } private void button1_Click(object sender, RoutedEventArgs e) { string ID = TextBoxID.Text; string Password = PasswordBox.Password; loginUser.UID = int.Parse(ID); loginUser.Password = Password; sc.FindUIDAsync(ID); // NavigationService.Navigate(new Uri("/Page1.xaml", UriKind.Relative)); //sc.FindUIDCompleted += new EventHandler<FindUIDCompletedEventArgs>(sc_FindUIDCompleted); }