示例#1
0
        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();
        }
示例#2
0
        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>();
 }
示例#4
0
 private IEnumerable <IMouseButtonHandler> GetDefaultMouseTools(MouseButtonShortcut shortcut)
 {
     return((from mouseTool in GetMouseTools()
             where shortcut.Equals(mouseTool.DefaultMouseButtonShortcut)
             select mouseTool).Cast <IMouseButtonHandler>());
 }