예제 #1
0
파일: Mapping.cs 프로젝트: whiteschool/cmdr
        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);
                }
            }
        }