public HotkeyDefinition(string name, string description, HotkeysMediator action, string defaultHotkey) { Name = name; Description = description; Action = action; DefaultHotkey = defaultHotkey; }
public override HotkeyInterceptResult InterceptHotkey(HotkeysMediator hotkeyMessage, object parameters) { switch (hotkeyMessage) { case HotkeysMediator.OperationsCopy: case HotkeysMediator.OperationsCut: case HotkeysMediator.OperationsPaste: case HotkeysMediator.OperationsPasteSpecial: return(HotkeyInterceptResult.Abort); case HotkeysMediator.OperationsDelete: var faces = Document.Selection.GetSelectedFaces().ToList(); var removeFaceTexture = Document.TextureCollection.GetItem("tooltextures/remove_face"); if (faces.Count > 0 && removeFaceTexture != null) { Action <Document, Face> action = (doc, face) => { face.Texture.Name = "tooltextures/remove_face"; face.Texture.Texture = removeFaceTexture.GetTexture(); face.CalculateTextureCoordinates(false); }; Document.PerformAction("Apply texture", new EditFace(faces, action, true)); Mediator.Publish(EditorMediator.TextureSelected, faces[0]); } return(HotkeyInterceptResult.Abort); } return(HotkeyInterceptResult.Continue); }
public HotkeyDefinition(string name, string description, HotkeysMediator action, object parameter, string defaultHotkey) { Name = name; Description = description; Action = action; DefaultHotkey = defaultHotkey; Parameter = parameter; }
public HotkeyDefinition(string name, string description, HotkeysMediator action, params string[] defaultHotkeys) { ID = action.ToString(); Name = name; Description = description; Action = action; DefaultHotkeys = defaultHotkeys; }
public override HotkeyInterceptResult InterceptHotkey(HotkeysMediator hotkeyMessage) { if (hotkeyMessage == HotkeysMediator.OperationsDelete) { CameraDelete(); return HotkeyInterceptResult.Abort; } return HotkeyInterceptResult.Continue; }
public HotkeyDefinition(string name, string description, HotkeysMediator action, object parameter, params string[] defaultHotkeys) { ID = action + (parameter != null ? "." + parameter : ""); Name = name; Description = description; Action = action; DefaultHotkeys = defaultHotkeys; Parameter = parameter; }
public override HotkeyInterceptResult InterceptHotkey(HotkeysMediator hotkeyMessage, object parameters) { if (hotkeyMessage == HotkeysMediator.OperationsDelete) { CameraDelete(); return(HotkeyInterceptResult.Abort); } return(HotkeyInterceptResult.Continue); }
public override HotkeyInterceptResult InterceptHotkey(HotkeysMediator hotkeyMessage, object parameters) { switch (hotkeyMessage) { case HotkeysMediator.OperationsPasteSpecial: case HotkeysMediator.OperationsPaste: return(HotkeyInterceptResult.SwitchToSelectTool); } return(HotkeyInterceptResult.Continue); }
public override HotkeyInterceptResult InterceptHotkey(HotkeysMediator hotkeyMessage) { switch (hotkeyMessage) { case HotkeysMediator.OperationsPasteSpecial: case HotkeysMediator.OperationsPaste: return HotkeyInterceptResult.SwitchToSelectTool; } return HotkeyInterceptResult.Continue; }
public override HotkeyInterceptResult InterceptHotkey(HotkeysMediator hotkeyMessage, object parameters) { switch (hotkeyMessage) { case HotkeysMediator.OperationsCopy: case HotkeysMediator.OperationsCut: case HotkeysMediator.OperationsPaste: case HotkeysMediator.OperationsPasteSpecial: case HotkeysMediator.OperationsDelete: return(HotkeyInterceptResult.Abort); } return(HotkeyInterceptResult.Continue); }
public override HotkeyInterceptResult InterceptHotkey(HotkeysMediator hotkeyMessage) { switch (hotkeyMessage) { case HotkeysMediator.OperationsCopy: case HotkeysMediator.OperationsCut: case HotkeysMediator.OperationsPaste: case HotkeysMediator.OperationsPasteSpecial: case HotkeysMediator.OperationsDelete: return HotkeyInterceptResult.Abort; } return HotkeyInterceptResult.Continue; }
public override HotkeyInterceptResult InterceptHotkey(HotkeysMediator hotkeyMessage, object parameters) { switch (hotkeyMessage) { case HotkeysMediator.OperationsPasteSpecial: case HotkeysMediator.OperationsPaste: return(HotkeyInterceptResult.SwitchToSelectTool); case HotkeysMediator.SwitchTool: if (parameters is HotkeyTool && (HotkeyTool)parameters == GetHotkeyToolType()) { CycleClipSide(); return(HotkeyInterceptResult.Abort); } break; } return(HotkeyInterceptResult.Continue); }
public override HotkeyInterceptResult InterceptHotkey(HotkeysMediator hotkeyMessage, object parameters) { switch (hotkeyMessage) { case HotkeysMediator.HistoryUndo: case HotkeysMediator.HistoryRedo: MessageBox.Show("Please exit the VM tool to undo any changes."); return(HotkeyInterceptResult.Abort); case HotkeysMediator.OperationsPaste: case HotkeysMediator.OperationsPasteSpecial: return(HotkeyInterceptResult.SwitchToSelectTool); case HotkeysMediator.SwitchTool: if (parameters is HotkeyTool && (HotkeyTool)parameters == GetHotkeyToolType()) { CycleShowPoints(); return(HotkeyInterceptResult.Abort); } break; } return(HotkeyInterceptResult.Continue); }
/// <summary> /// Intercepts a document hotkey. Returns false if the hotkey should not be executed. /// </summary> /// <param name="hotkeyMessage">The hotkey message</param> /// <param name="parameters">The hotkey parameters</param> /// <returns>False to prevent execution of the document hotkey</returns> public abstract HotkeyInterceptResult InterceptHotkey(HotkeysMediator hotkeyMessage, object parameters);
public override HotkeyInterceptResult InterceptHotkey(HotkeysMediator hotkeyMessage, object parameters) { switch (hotkeyMessage) { case HotkeysMediator.OperationsPasteSpecial: case HotkeysMediator.OperationsPaste: return HotkeyInterceptResult.SwitchToSelectTool; case HotkeysMediator.SwitchTool: if (parameters is HotkeyTool && (HotkeyTool) parameters == GetHotkeyToolType()) { CycleClipSide(); return HotkeyInterceptResult.Abort; } break; } return HotkeyInterceptResult.Continue; }
public override HotkeyInterceptResult InterceptHotkey(HotkeysMediator hotkeyMessage, object parameters) { return HotkeyInterceptResult.Continue; }
public override HotkeyInterceptResult InterceptHotkey(HotkeysMediator hotkeyMessage) { return HotkeyInterceptResult.Continue; }
public override HotkeyInterceptResult InterceptHotkey(HotkeysMediator hotkeyMessage) { switch (hotkeyMessage) { case HotkeysMediator.HistoryUndo: case HotkeysMediator.HistoryRedo: MessageBox.Show("Please exit the VM tool to undo any changes."); return HotkeyInterceptResult.Abort; case HotkeysMediator.OperationsPaste: case HotkeysMediator.OperationsPasteSpecial: return HotkeyInterceptResult.SwitchToSelectTool; } return HotkeyInterceptResult.Continue; }
/// <summary> /// Intercepts a document hotkey. Returns false if the hotkey should not be executed. /// </summary> /// <param name="hotkeyMessage">The hotkey message</param> /// <returns>False to prevent execution of the document hotkey</returns> public abstract HotkeyInterceptResult InterceptHotkey(HotkeysMediator hotkeyMessage);
public override HotkeyInterceptResult InterceptHotkey(HotkeysMediator hotkeyMessage, object parameters) { return(HotkeyInterceptResult.Continue); }
public override HotkeyInterceptResult InterceptHotkey(HotkeysMediator hotkeyMessage, object parameters) { switch (hotkeyMessage) { case HotkeysMediator.HistoryUndo: case HotkeysMediator.HistoryRedo: MessageBox.Show("Please exit the VM tool to undo any changes."); return HotkeyInterceptResult.Abort; case HotkeysMediator.OperationsPaste: case HotkeysMediator.OperationsPasteSpecial: return HotkeyInterceptResult.SwitchToSelectTool; case HotkeysMediator.SwitchTool: if (parameters is HotkeyTool && (HotkeyTool)parameters == GetHotkeyToolType()) { CycleShowPoints(); return HotkeyInterceptResult.Abort; } break; } return HotkeyInterceptResult.Continue; }