Example #1
0
 //删除记录
 private void DeleteRelationRecord(object sender, RoutedEventArgs e)
 {
     if (IsClickLine())
     {
         FileTools.DeleteLine(FileTools.relationFilePath, Relation_ListView.SelectedIndex);
         Relation_ListView.Items.RemoveAt(Relation_ListView.SelectedIndex);
     }
 }
 //删除记录
 private void DeleteRelationRecord(object sender, RoutedEventArgs e)
 {
     try
     {
         if (IsClickLine())
         {
             FileTools.DeleteLine(FileTools.relationFilePath, Relation_ListView.SelectedIndex);
             //Relation_ListView.Items.RemoveAt(Relation_ListView.SelectedIndex);
             LoadData();
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, this.Title, MessageBoxButton.OK);
     }
 }