Пример #1
0
        public IKeyCommand CreateCommand(string commandName, KeyCommandConfig config)
        {
            switch (commandName)
            {
            case "TestCommand":
                return(new TestCommand
                {
                    Id = config.Id,
                    Description = config.Description,
                    Icon = config.Icon,
                    KeyCode = config.KeyCode,
                    Parameters = config.Parameters
                });
            }

            return(null);
        }
Пример #2
0
        public IKeyCommand CreateCommand(string commandName, KeyCommandConfig config)
        {
            switch (commandName)
            {
            case "GroupCommand":
                return(new GroupCommand
                {
                    Id = config.Id,
                    Icon = config.Icon,
                    Description = config.Description,
                    KeyCode = config.KeyCode
                });

            case "ShellCommand":
                return(new ShellCommand
                {
                    Id = config.Id,
                    Icon = config.Icon,
                    Description = config.Description,
                    KeyCode = config.KeyCode,
                    Parameters = config.Parameters
                });

            case "SequenceCommand":
                return(new SequenceCommand
                {
                    Id = config.Id,
                    Icon = config.Icon,
                    Description = config.Description,
                    KeyCode = config.KeyCode,
                    Parameters = config.Parameters
                });
            }

            return(null);
        }