// --------------------------------------------------------------------------------------------------------------------
// <copyright file="DataCommands.cs" company="Catel development team">
// Copyright (c) 2008 - 2011 Catel development team. All rights reserved.
// </copyright>
// <summary>
// Data commands class.
// </summary>
// --------------------------------------------------------------------------------------------------------------------
using System.Windows.Input;
namespace Catel.Windows.Input
{
/// <summary>
/// Data commands class.
/// </summary>
public static class DataCommands
{
/// <summary>
/// Constructor that initializes the commands.
/// </summary>
static DataCommands()
{
// Add
InputGestureCollection addActionGestures = new InputGestureCollection();
addActionGestures.Add(new KeyGesture(Key.Insert, ModifierKeys.Shift));
Add = new RoutedUICommand(Properties.Resources.CommandDataAdd, "Add", typeof(DataCommands), addActionGestures);
// AddAll
AddAll = new RoutedUICommand(Properties.Resources.CommandDataAddAll, "AddAll", typeof(DataCommands));
// Edit
InputGestureCollection editActionGestures = new InputGestureCollection();
editActionGestures.Add(new KeyGesture(Key.Enter, ModifierKeys.Alt));
Edit = new RoutedUICommand(Properties.Resources.CommandDataEdit, "Edit", typeof(DataCommands), editActionGestures);
// Remove
InputGestureCollection removeActionGestures = new InputGestureCollection();
removeActionGestures.Add(new KeyGesture(Key.Delete, ModifierKeys.Shift));
Remove = new RoutedUICommand(Properties.Resources.CommandDataRemove, "Remove", typeof(DataCommands), removeActionGestures);
// RemoveAll
RemoveAll = new RoutedUICommand(Properties.Resources.CommandDataRemoveAll, "Submit", typeof(DataCommands));
// Sort
Sort = new RoutedUICommand(Properties.Resources.CommandDataSort, "Sort", typeof(DataCommands));
// Synchronize
Synchronize = new RoutedUICommand(Properties.Resources.CommandDataSynchronize, "Synchronize", typeof(DataCommands));
// Revert
Revert = new RoutedUICommand(Properties.Resources.CommandDataRevert, "Revert", typeof(DataCommands));
// Submit
InputGestureCollection submitActionGestures = new InputGestureCollection();
submitActionGestures.Add(new KeyGesture(Key.Enter, ModifierKeys.Alt | ModifierKeys.Control));
Submit = new RoutedUICommand(Properties.Resources.CommandDataSubmit, "Submit", typeof(DataCommands), submitActionGestures);
}
/// <summary>
/// Start adding a new item or reference.
/// </summary>
public static RoutedUICommand Add { get; private set; }
/// <summary>
/// Start adding a new item or reference.
/// </summary>
public static RoutedUICommand AddAll { get; private set; }
/// <summary>
/// Remove a item or reference.
/// </summary>
public static RoutedUICommand Remove { get; private set; }
/// <summary>
/// Edit a item or change reference.
/// </summary>
public static RoutedUICommand RemoveAll { get; private set; }
/// <summary>
/// Edit a item or change reference.
/// </summary>
public static RoutedUICommand Edit { get; private set; }
/// <summary>
/// Sort.
/// </summary>
public static RoutedUICommand Sort { get; private set; }
/// <summary>
/// Synchronize data.
/// </summary>
public static RoutedUICommand Synchronize { get; private set; }
/// <summary>
/// Revert data.
/// </summary>
public static RoutedUICommand Revert { get; private set; }
/// <summary>
/// Submit.
/// </summary>
public static RoutedUICommand Submit { get; private set; }
}
}