Exemple #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));
            }
            }
        }
 public MidiProgramGui(MidiProgramStrategy data)
 {
     InitializeComponent();
     this.DataContext = data;
 }