private void OnRequestFrameValueSet(int frameIndex, int channelIndex, Channel.Value value)
        {
            var writer  = Editor.BeatmapWriter;
            var channel = writer.TypeInstance.ChannelFlyweights[channelIndex];

            if (channel.ValueFlyweights.Contains(value))
            {
                var command = new SetChannelValueCommand(writer,
                                                         () => new SetChannelValueCommand.Args(frameIndex, channelIndex, value));

                Editor.UndoStackComponent.ExecuteCommand(command);
                Editor.SetDirty();
            }
        }
        private void OnRequestFrameValueRotate(int frameIndex, int channelIndex)
        {
            var writer            = Editor.BeatmapWriter;
            var channel           = writer.TypeInstance.ChannelFlyweights[channelIndex];
            var currentValue      = writer.GetValue(frameIndex, channelIndex);
            var currentValueIndex = channel.ValueFlyweights.FindIndex(val => val == currentValue);
            var nextValueIndex    = (int)Mathf.Repeat(currentValueIndex + 1, channel.ValueFlyweights.Count);
            var nextValue         = channel.ValueFlyweights[nextValueIndex];

            var command = new SetChannelValueCommand(writer,
                                                     () => new SetChannelValueCommand.Args(frameIndex, channelIndex, nextValue));

            Editor.UndoStackComponent.ExecuteCommand(command);
            Editor.SetDirty();
        }