public void ButtondelFingerTable(object sender, RoutedEventArgs e) { m_SEN0188SQLite.DelallDataSets(); m_SEN0188SQLite.GetDataSets(); if (m_Environment.SensorInitialized) { SensorCMDs.DeleteFingerId(this.m_Sensorinputconfigoptions, 10000); // Delete complete Finger Template Library into Sensor } }
public void ButtonDeleteTemplate(object sender, Windows.UI.Xaml.RoutedEventArgs e) { if (DataSets.SelectedItem == null) { return; } DBDataSet dataSet = DataSets.SelectedItem as DBDataSet; if (dataSet != null) { m_SEN0188SQLite.DelDataSetByFingerId(dataSet.FingerID); if (m_Environment.SensorInitialized) { SensorCMDs.DeleteFingerId(m_Sensorinputconfigoptions, (UInt16)dataSet.FingerID); } m_SEN0188SQLite.GetDataSets(); } }
void ButtonComWithSensor(Object sender, Windows.UI.Xaml.RoutedEventArgs e) { AppBarButton buttton = sender as AppBarButton; if (buttton != null) { if (buttton.Name == "InitSensor") { SensorCMDs.InitSensor(m_Sensorinputconfigoptions); m_Environment.SensorInitialized = false; SensorIDValue.Text = ""; } else if (buttton.Name == "RegisterFingerId") { if (DataSets.SelectedItem != null) { DBDataSet dataSet = DataSets.SelectedItem as DBDataSet; if (dataSet != null) { SensorCMDs.RegisterFingerId(m_Sensorinputconfigoptions, (UInt16)dataSet.FingerID); DataSets.SelectedItem = null; } } } else if (buttton.Name == "VerifyFingerId") { SensorCMDs.VerifyFingerId(m_Sensorinputconfigoptions); DataSets.SelectedItem = null; } else if (buttton.Name == "DeleteallFingerIs") { SensorCMDs.DeleteFingerId(m_Sensorinputconfigoptions, (UInt16)10000); } else if (buttton.Name == "DownloadFingerId") { if (DataSets.SelectedItem != null) { DBDataSet dataSet = DataSets.SelectedItem as DBDataSet; if (dataSet != null) { SensorCMDs.DownloadFingerId(m_Sensorinputconfigoptions, (UInt16)dataSet.FingerID, dataSet.FingerTemplate); } DataSets.SelectedItem = null; } } else if (buttton.Name == "DownloadallFingerIds") { SensorCMDs.DeleteFingerId(m_Sensorinputconfigoptions, 10000); // delete complete FingerLib into Sensor for (int i = 0; i < this.m_DataSets.Count; i++) { DBDataSet dataSet = m_DataSets[i]; SensorCMDs.DownloadFingerId(m_Sensorinputconfigoptions, (UInt16)dataSet.FingerID, dataSet.FingerTemplate); } DataSets.SelectedItem = null; } else if (buttton.Name == "SetSensorID") { byte[] SensorId = Encoding.ASCII.GetBytes(SensorIDValue.Text); SensorCMDs.SetSensorID(m_Sensorinputconfigoptions, SensorId); // Set Sensor ID SensorIDValue.Text = ""; DataSets.SelectedItem = null; } SensorCmdState.Text = "..."; } }