Пример #1
0
        public static IMidiStrategy CreateStrategy(MidiOutputType type, JObject details)
        {
            switch (type)
            {
            case MidiOutputType.CTRL:
            {
                JObject content = details != null ? details : MidiCtrlStrategy.CreateJObject();
                return(new MidiCtrlStrategy(content));
            }

            case MidiOutputType.PROGRAM:
            {
                JObject content = details != null ? details : MidiProgramStrategy.CreateJObject();
                return(new MidiProgramStrategy(content));
            }

            case MidiOutputType.LIST:
            {
                JObject content = details != null ? details : MidiListStrategy.CreateJObject();
                return(new MidiListStrategy(content));
            }

            default:
            {
                JObject content = details != null ? details : MidiNoteStrategy.CreateJObject();
                return(new MidiNoteStrategy(content));
            }
            }
        }
Пример #2
0
 public MidiNoteGui(MidiNoteStrategy data)
 {
     InitializeComponent();
     this.DataContext = data;
 }