private void RemoveHost(object selected) { if (SelectedItem != null) { HostCollectionView.Remove(SelectedItem); } else { MessageBox.Show("선택한 항목이 없습니다."); } }
private void RegisterHost(object parameter) { if (!(HostCollectionView.Where(x => x.hostname == InputHostname).Count() > 0)) { HostCollectionView.Add(new TargetHost { hostname = InputHostname, block = InputAllowRadio ? false: true, comment = InputComment }); OnPropertyChanged(); } else { MessageBox.Show(string.Format("{0} : 이미 등록된 호스트 입니다.", InputHostname)); } }