private async void ShowFINGER_Completed(object sender, object e) { FingerStatusText.Text = gloablvalue.checksend(gloablvalue.RecivedText); if (gloablvalue.checksend(gloablvalue.RecivedText) == "Stored!") { FingerStatusText.Text = "Id = " + newfpid.Text + " Stored!"; btnAdd.IsEnabled = true; gloablvalue.RecivedText = ""; HideFINGER.Stop(); ShowFINGER.Stop(); } else if (gloablvalue.checksend(gloablvalue.RecivedText) == "Fingerprints did not match") { FingerStatusText.Text = "Fingerprints did not match" + "\r\n" + "Click on Take fingerprint to try again"; HideFINGER.Stop(); ShowFINGER.Stop(); await BluetoothConnection.SendCommand("+"); FINGER.IsTapEnabled = true; BtN_Menu.IsTapEnabled = true; } else { FingerStatusText.Text = gloablvalue.checksend(gloablvalue.RecivedText); //FingerStatusText.Text = "Error at receiving, please click again"; //HideFINGER.Stop(); //ShowFINGER.Stop(); //await BluetoothConnection.SendCommand("+"); //FINGER.IsTapEnabled = true; //BtN_Menu.IsTapEnabled = true; HideFINGER.Begin(); } }
private async void EndButton_Click(object sender, RoutedEventArgs e) { //try //{ string duration = ht.Text + ":" + mt.Text + ":" + st.Text; DatabaseManagement.InsertLectureData(txtbxLecName.Text, gloablvalue.CurrentId, datetime, duration, txtbxRoom.Text); mytimer.Stop(); HideFINGER.Stop(); ShowFINGER.Stop(); gloablvalue.NewLecId = ""; //try //{ await BluetoothConnection.SendCommand(","); Frame.Navigate(typeof(AllLec)); //} //catch (Exception) //{ // var dialo2g = new MessageDialog("device not ending the fingerprint..!"); // await dialo2g.ShowAsync(); //} //} //catch (Exception) //{ // var dialog = new MessageDialog("Error in insert lecture data !"); // await dialog.ShowAsync(); //} }