shortcuts

Binding a WPF ShortCut Key to a Command in the ViewModel

ⅰ亾dé卋堺 提交于 2019-11-26 17:41:16
问题 I have a WPF app that is using the MVVM pattern. Hooking up buttons to the VM is pretty straight forward since they implement the ICommand. I have a context menu that works similar. The next step is to create shortcut keys for the context menu. I can't figure out how to get the shortcut key invoke the Command. Here is an example: <MenuItem Header="Update" Command="{Binding btnUpdate}" > <MenuItem.Icon> <Image Source="/Images/Update.png" Width="16" Height="16" /> </MenuItem.Icon> </MenuItem>

Making a Windows shortcut start relative to where the folder is?

三世轮回 提交于 2019-11-26 15:20:27
问题 I have a game that uses this file structure: GAME FOLDER ->data ->data->run.bat I want to put a shortcut to run.bat in GAME FOLDER, but if I move it, or someone else installs it it won't work, because the target is wrong. Is there a way to make the target and "start in" relative to GAME FOLDER? 回答1: Right click on your /bat/ folder and click Create Shortcut . On Windows 7 you will get bat - Shortcut in the current directory. On Windows XP you will get Shortcut to bat . Right click on the

Wix create non advertised shortcut for all users / per machine

落花浮王杯 提交于 2019-11-26 15:07:12
问题 In WIX, how do you create a non advertised shortcut in the allusers profile? So far I've only been able to accomplish this with advertised shortcuts. I prefer non-advertised shortcuts because you can go to the shortcut's properties and use "find target". In the tutorials I've seen use a registry value for the keypath of a shortcut. The problem is they use HKCU as the root. When HKCU is used, and another user uninstalls the program (since it's installed for all users) the registry key is left

Binding a WPF ShortCut Key to a Command in the ViewModel

浪子不回头ぞ 提交于 2019-11-26 13:44:07
问题 I have a WPF app that is using the MVVM pattern. Hooking up buttons to the VM is pretty straight forward since they implement the ICommand. I have a context menu that works similar. The next step is to create shortcut keys for the context menu. I can't figure out how to get the shortcut key invoke the Command. Here is an example: <MenuItem Header="Update" Command="{Binding btnUpdate}" > <MenuItem.Icon> <Image Source="/Images/Update.png" Width="16" Height="16" /> </MenuItem.Icon> </MenuItem>

Windows shortcut (.lnk) parser in Java?

狂风中的少年 提交于 2019-11-26 13:17:42
I'm currently using Win32ShellFolderManager2 and ShellFolder.getLinkLocation to resolve windows shortcuts in Java. Unfortunately, if the Java program is running as a service under Vista, getLinkLocation , this does not work. Specifically, I get an exception stating "Could not get shell folder ID list". Searching the web does turn up mentions of this error message, but always in connection with JFileChooser . I'm not using JFileChooser , I just need to resolve a .lnk file to its destination. Does anyone know of a 3rd-party parser for .lnk files written in Java I could use? I've since found

Run a Command Prompt command from Desktop Shortcut

孤人 提交于 2019-11-26 11:53:37
问题 Is it possible to create a desktop shortcut that, when pressed, will open command prompt and run a pre-defined command? 回答1: Create A Shortcut That Opens The Command Prompt & Runs A Command: Yes! You can create a shortcut to cmd.exe with a command specified after it. Alternatively you could create a batch script, if your goal is just to have a clickable way to run commands. Steps: Right click on some empty space in Explorer, and in the context menu go to "New/Shortcut". When prompted to enter

Customizable Shortcuts in Java Application

依然范特西╮ 提交于 2019-11-26 08:36:14
问题 I would like to include customizable keyboard shortcuts in my Java application (the user can change them). Since this is not very unusual request, I was wondering if there exists a library/project that could help me achieve my goal. Unfortunately I was not able to find anything useful on Google. Thank you, aZen Ended up building my own shortcut manager from scratch. This took around 20h. 回答1: Shortcuts may be specified as accelerators in instances of Action. Less flexibly, shortcuts may be

Windows shortcut (.lnk) parser in Java?

此生再无相见时 提交于 2019-11-26 03:39:50
问题 I\'m currently using Win32ShellFolderManager2 and ShellFolder.getLinkLocation to resolve windows shortcuts in Java. Unfortunately, if the Java program is running as a service under Vista, getLinkLocation , this does not work. Specifically, I get an exception stating \"Could not get shell folder ID list\". Searching the web does turn up mentions of this error message, but always in connection with JFileChooser . I\'m not using JFileChooser , I just need to resolve a .lnk file to its