private void _todoDataList_ListChanged(object sender, ListChangedEventArgs e) { if (e.ListChangedType == ListChangedType.ItemAdded || e.ListChangedType == ListChangedType.ItemDeleted || e.ListChangedType == ListChangedType.ItemDeleted) { try { _fileIOService.SavaData(sender); } catch (Exception ex) { MessageBox.Show(ex.Message); Close(); } } }