Ejemplo n.º 1
0
        public NewFlowCommandResult New([FromBody] NewFlowCommand command)
        {
            command.setRequestHost(HttpContext.Request.Host.ToString());

            _loggingService.Log(this.GetType(), ELogType.Input, ELogLevel.Info, new { Flow = this.User.Identity.Name, Path = this.Request.Path, Method = this.Request.Method });

            NewFlowCommandResult result = (NewFlowCommandResult)_flowHandler.Handle(command);

            _loggingService.Log(this.GetType(), ELogType.Output, ELogLevel.Info, new { Flow = this.User.Identity.Name, Path = this.Request.Path, Method = this.Request.Method, Code = this.Response.StatusCode });

            HttpContext.Response.StatusCode = result.Code;

            return(result);
        }
Ejemplo n.º 2
0
        private void Window_PreviewKeyDown(object sender, KeyEventArgs e)
        {
            if (e.Key == Key.Z && e.KeyboardDevice.Modifiers.HasFlag(ModifierKeys.Control))
            {
                UndoCommand.Execute(null);
            }
            else if (e.Key == Key.Y && e.KeyboardDevice.Modifiers.HasFlag(ModifierKeys.Control))
            {
                RedoCommand.Execute(null);
            }

            else if (e.Key == Key.N && e.KeyboardDevice.Modifiers.HasFlag(ModifierKeys.Control))
            {
                NewFlowCommand.Execute(null);
            }
            else if (e.Key == Key.O && e.KeyboardDevice.Modifiers.HasFlag(ModifierKeys.Control))
            {
                OpenFlowCommand.Execute(null);
            }
            else if (e.Key == Key.S && e.KeyboardDevice.Modifiers.HasFlag(ModifierKeys.Control | ModifierKeys.Shift))
            {
                SaveAllFlowsCommand.Execute(null);
            }
            else if (e.Key == Key.S && e.KeyboardDevice.Modifiers.HasFlag(ModifierKeys.Control))
            {
                SaveFlowCommand.Execute(null);
            }

            else if (e.Key == Key.F5 && e.KeyboardDevice.Modifiers.HasFlag(ModifierKeys.Shift))
            {
                StopFlowCommand.Execute(null);
            }
            else if (e.Key == Key.F5)
            {
                RunFlowCommand.Execute(null);
            }
            else if (e.Key == Key.F10)
            {
                StepFlowCommand.Execute(null);
            }
        }