private IMouseButtonHandler GetActiveMouseTool(MouseButtonShortcut shortcut) { if (shortcut == null) return null; return (from mouseTool in GetMouseTools() where mouseTool.Active && shortcut.Equals(mouseTool.MouseButton) select mouseTool).FirstOrDefault(); }
private IMouseButtonHandler GetActiveMouseTool(MouseButtonShortcut shortcut) { if (shortcut == null) { return(null); } return((from mouseTool in GetMouseTools() where mouseTool.Active && shortcut.Equals(mouseTool.MouseButton) select mouseTool).FirstOrDefault()); }
private IEnumerable<IMouseButtonHandler> GetDefaultMouseTools(MouseButtonShortcut shortcut) { return (from mouseTool in GetMouseTools() where shortcut.Equals(mouseTool.DefaultMouseButtonShortcut) select mouseTool).Cast<IMouseButtonHandler>(); }
private IEnumerable <IMouseButtonHandler> GetDefaultMouseTools(MouseButtonShortcut shortcut) { return((from mouseTool in GetMouseTools() where shortcut.Equals(mouseTool.DefaultMouseButtonShortcut) select mouseTool).Cast <IMouseButtonHandler>()); }