private void Window_KeyUp(object sender, KeyEventArgs e) { if (e.Key == Key.Escape) { ResetTool(); SelectionSet.ClearSelection(); // newly 20120725 } }
private void RemoveEntityInternal() { if (SelectionSet.Contents.Count > 0) { if (MessageBox.Show(string.Format("选中 {0} 个实体,确定移除它们吗?", SelectionSet.Contents.Count), "提示", MessageBoxButton.OK, MessageBoxImage.Question) == MessageBoxResult.No) { return; } } else { MessageBox.Show("请先选择实体。", "提示", MessageBoxButton.OK, MessageBoxImage.Information); return; } MapControl.Current.RemoveFeatures(SelectionSet.Contents); SelectionSet.ClearSelection(); }