Created
August 11, 2014 11:59
-
-
Save AlexArchive/b98995c445eee866d52c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value) | |
{ | |
var converter = new HotkeyConverter(); | |
var keys = (value == null) ? Keys.None : (Keys) converter.ConvertTo(value, typeof(Keys)); | |
value = base.EditValue(context, provider, keys); | |
return converter.ConvertFrom(value); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value) | |
{ | |
Keys keys = (value == null) ? Keys.None : (Keys)((Hotkey)value); | |
object obj = base.EditValue(context, provider, keys); | |
return (Hotkey)((Keys)obj); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment