示例#1
0
        internal Mapping(Device device, Format.Mapping rawMapping)
            : this(rawMapping)
        {
            Attach(device);

            if (Id >= 0)
            {
                Format.MidiDefinition rawDefinition = getMidiDefinition(device, Command.MappingType, Id);
                if (rawDefinition != null)
                {
                    MidiBinding = AMidiDefinition.Parse(device.TypeStr, Command.MappingType, rawDefinition);
                }
            }
        }
示例#2
0
        internal Mapping(Device device, Format.Mapping rawMapping)
            : this(rawMapping)
        {
            if (Command == null)    //pestrela: favorites crash
            {
                return;
            }

            Attach(device);

            if (Id >= 0)
            {
                Format.MidiDefinition rawDefinition = getMidiDefinition(device, Command.MappingType, Id);
                if (rawDefinition != null)
                {
                    MidiBinding = AMidiDefinition.Parse(device.TypeStr, Command.MappingType, rawDefinition);
                }
            }
        }