コード例 #1
0
ファイル: TestPlugin.cs プロジェクト: bartoszgolek/keyfreak
        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
ファイル: BasePlugin.cs プロジェクト: bartoszgolek/keyfreak
        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);
        }