Esempio n. 1
0
        public EditVolume(Window parent, Cue_Wrapper cue)
        {
            Owner        = parent;
            DataContext  = this;
            CueWrapper   = cue;
            StringValues = cue.WrapperRoot.AcbFile.StringValues;

            var         command       = cue.SequenceCommand;
            ACB_Command volumeCommand = command?.Commands.FirstOrDefault(x => x.CommandType == CommandType.VolumeBus);

            if (command != null && volumeCommand != null)
            {
                StringValue = cue.WrapperRoot.AcbFile.GetTable(volumeCommand.ReferenceIndex.TableGuid, cue.WrapperRoot.AcbFile.StringValues, true);
                Volume      = volumeCommand.Param2;
            }
            else
            {
                //Default values
                StringValue = (CueWrapper.WrapperRoot.AcbFile.StringValues.Count > 0) ? CueWrapper.WrapperRoot.AcbFile.StringValues[0] : null;
                Volume      = 10000;
            }

            originalStringValue = StringValue;
            originalVolume      = Volume;

            InitializeComponent();
        }
Esempio n. 2
0
        public VolumeControl(Window parent, Cue_Wrapper cue)
        {
            DataContext = this;
            CueWrapper  = cue;

            var         command       = cue.SequenceCommand;
            ACB_Command volumeCommand = command?.Commands.FirstOrDefault(x => x.CommandType == CommandType.VolumeRandomization1 || x.CommandType == CommandType.VolumeRandomization2);

            InitValues(command, volumeCommand);

            InitializeComponent();
            Title = "Volume (cue-level)";
            Owner = parent;
        }
Esempio n. 3
0
        public EditCueLimit(Window parent, Cue_Wrapper cue)
        {
            CueWrapper = cue;
            var         command         = cue.SequenceCommand;
            ACB_Command cueLimitCommand = command?.Commands.FirstOrDefault(x => x.CommandType == CommandType.CueLimit);

            if (cueLimitCommand != null)
            {
                CueLimit = cueLimitCommand.Param1;
            }

            originalCueLimit = CueLimit;

            InitializeComponent();
            DataContext = this;
            Owner       = parent;
        }