Beispiel #1
0
 public void ChangeKey(TriggerLayoutData e)
 {
     if (e.NumberOfAddingItems == 0 || e.NumberOfRemovingItems == 0)
     {
         return;                 //ncrunch: no coverage
     }
     InputKeyAndButtonEditor.ChangeExistingKeyInList(e.AddingItem, e.RemovingItem);
 }
		private void ChangeKey(object sender, SelectionChangedEventArgs e)
		{
			if (e.AddedItems.Count == 0 || e.RemovedItems.Count == 0)
				return;

			var inputLayoutData = new TriggerLayoutData
			{
				AddingItem = e.AddedItems[0].ToString(),
				RemovingItem = e.RemovedItems[0].ToString(),
				NumberOfAddingItems = e.AddedItems.Count,
				NumberOfRemovingItems = e.RemovedItems.Count
			};
			Messenger.Default.Send(inputLayoutData, "KeyChanged");
		}
Beispiel #3
0
 public void ChangeType(TriggerLayoutData e)
 {
     if (e.NumberOfAddingItems == 0 || e.NumberOfRemovingItems == 0)
     {
         return;                 //ncrunch: no coverage
     }
     if (e.RemovingItem != "Touchpad" && e.RemovingItem != "MouseDragAndDrop" &&
         e.RemovingItem != "MouseHold" && e.RemovingItem != "MouseHover" &&
         e.RemovingItem != "MouseMovement")
     {
         InputTypeEditor.ChangeExistingTypeInList(e.AddingItem, e.KeyBox.SelectedItem.ToString());
     }
     else
     {
         InputTypeEditor.ChangeExistingTypeInList(e.AddingItem);                 //ncrunch: no coverage
     }
 }
        private void ChangeKey(object sender, SelectionChangedEventArgs e)
        {
            if (e.AddedItems.Count == 0 || e.RemovedItems.Count == 0)
            {
                return;
            }

            var inputLayoutData = new TriggerLayoutData
            {
                AddingItem            = e.AddedItems[0].ToString(),
                RemovingItem          = e.RemovedItems[0].ToString(),
                NumberOfAddingItems   = e.AddedItems.Count,
                NumberOfRemovingItems = e.RemovedItems.Count
            };

            Messenger.Default.Send(inputLayoutData, "KeyChanged");
        }
Beispiel #5
0
 //ncrunch: no coverage start
 public void ChangeState(TriggerLayoutData e)
 {
     if (e.NumberOfAddingItems == 0 || e.NumberOfRemovingItems == 0)
     {
         return;
     }
     if (e.TypeBox.SelectedItem.ToString() != "Touchpad" &&
         e.TypeBox.SelectedItem.ToString() != "MouseDragAndDrop" &&
         e.TypeBox.SelectedItem.ToString() != "MouseHold" &&
         e.TypeBox.SelectedItem.ToString() != "MouseHover" &&
         e.TypeBox.SelectedItem.ToString() != "MouseMovement")
     {
         InputStateEditor.ChangeExistingStateInList(e.AddingItem, e.KeyBox.SelectedItem.ToString());
     }
     else
     {
         InputStateEditor.ChangeExistingStateInList(e.AddingItem);
     }
 }
		public void ChangeType(TriggerLayoutData e)
		{
			if (e.NumberOfAddingItems == 0 || e.NumberOfRemovingItems == 0)
				return; //ncrunch: no coverage 
			if (e.RemovingItem != "Touchpad" && e.RemovingItem != "MouseDragAndDrop" &&
				e.RemovingItem != "MouseHold" && e.RemovingItem != "MouseHover" && 
				e.RemovingItem != "MouseMovement")
				InputTypeEditor.ChangeExistingTypeInList(e.AddingItem, e.KeyBox.SelectedItem.ToString());
			else
				InputTypeEditor.ChangeExistingTypeInList(e.AddingItem); //ncrunch: no coverage 
		}
		//ncrunch: no coverage start
		public void ChangeState(TriggerLayoutData e)
		{
			if (e.NumberOfAddingItems == 0 || e.NumberOfRemovingItems == 0)
				return;
			if (e.TypeBox.SelectedItem.ToString() != "Touchpad" &&
				e.TypeBox.SelectedItem.ToString() != "MouseDragAndDrop" &&
				e.TypeBox.SelectedItem.ToString() != "MouseHold" &&
				e.TypeBox.SelectedItem.ToString() != "MouseHover" &&
				e.TypeBox.SelectedItem.ToString() != "MouseMovement")
				InputStateEditor.ChangeExistingStateInList(e.AddingItem, e.KeyBox.SelectedItem.ToString());
			else
				InputStateEditor.ChangeExistingStateInList(e.AddingItem);
		}
		public void ChangeKey(TriggerLayoutData e)
		{
			if (e.NumberOfAddingItems == 0 || e.NumberOfRemovingItems == 0)
				return; //ncrunch: no coverage 
			InputKeyAndButtonEditor.ChangeExistingKeyInList(e.AddingItem, e.RemovingItem);
		}