public void Save() { List <npc_trainer> list = trainerInfoGrid.ItemsSource as List <npc_trainer>; if (list != null && list.Count != 0) { WorldWorker.SaveNpcTrainer(list, _entry); } statusLabel.Content = "Saved."; }