Shortcuts für Save, SaveAll, Reload und Validate
This commit is contained in:
parent
9d70c2a482
commit
6138c99ba9
@ -14,6 +14,7 @@ using ENI2.DetailViewControls;
|
|||||||
using ENI2.Util;
|
using ENI2.Util;
|
||||||
|
|
||||||
using ENI2.EditControls;
|
using ENI2.EditControls;
|
||||||
|
using System.Windows.Input;
|
||||||
|
|
||||||
namespace ENI2
|
namespace ENI2
|
||||||
{
|
{
|
||||||
@ -143,6 +144,23 @@ namespace ENI2
|
|||||||
|
|
||||||
BindingOperations.EnableCollectionSynchronization(_messages, this.messageListLock);
|
BindingOperations.EnableCollectionSynchronization(_messages, this.messageListLock);
|
||||||
Dispatcher.BeginInvoke((Action)(() => this.listBoxMessages.SelectedIndex = 0));
|
Dispatcher.BeginInvoke((Action)(() => this.listBoxMessages.SelectedIndex = 0));
|
||||||
|
|
||||||
|
RoutedCommand saveCmd = new RoutedCommand();
|
||||||
|
saveCmd.InputGestures.Add(new KeyGesture(Key.S, ModifierKeys.Control));
|
||||||
|
CommandBindings.Add(new CommandBinding(saveCmd, this.buttonSave_Click));
|
||||||
|
|
||||||
|
RoutedCommand saveAllCmd = new RoutedCommand();
|
||||||
|
saveAllCmd.InputGestures.Add(new KeyGesture(Key.A, ModifierKeys.Control));
|
||||||
|
CommandBindings.Add(new CommandBinding(saveAllCmd, this.buttonSaveAll_Click));
|
||||||
|
|
||||||
|
RoutedCommand reloadCmd = new RoutedCommand();
|
||||||
|
reloadCmd.InputGestures.Add(new KeyGesture(Key.R, ModifierKeys.Control));
|
||||||
|
CommandBindings.Add(new CommandBinding(reloadCmd, this.ShortCutReload));
|
||||||
|
|
||||||
|
RoutedCommand validateCmd = new RoutedCommand();
|
||||||
|
validateCmd.InputGestures.Add(new KeyGesture(Key.F, ModifierKeys.Control));
|
||||||
|
CommandBindings.Add(new CommandBinding(validateCmd, this.ShortCutValidate));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
@ -541,6 +559,16 @@ namespace ENI2
|
|||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
private void ShortCutReload(object sender, ExecutedRoutedEventArgs e)
|
||||||
|
{
|
||||||
|
this.DetailControl_RequestReload(this.Core.Id.Value);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ShortCutValidate(object sender, ExecutedRoutedEventArgs e)
|
||||||
|
{
|
||||||
|
this.DetailControl_RequestValidate();
|
||||||
|
}
|
||||||
|
|
||||||
private void DetailControl_RequestReload(Guid id)
|
private void DetailControl_RequestReload(Guid id)
|
||||||
{
|
{
|
||||||
/// core und messages neu laden
|
/// core und messages neu laden
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user