Artemis.Profiles.Layers.Types.Audio.AudioType.Update C# (CSharp) Method

Update() public method

public Update ( LayerModel layerModel, IDataModel dataModel, bool isPreview = false ) : void
layerModel LayerModel
dataModel IDataModel
isPreview bool
return void
        public void Update(LayerModel layerModel, IDataModel dataModel, bool isPreview = false)
        {
            if ((_device == null) || isPreview)
                return;

            lock (SpectrumData)
            {
                UpdateLayers(layerModel);

                if (!SpectrumData.Any())
                    return;

                var settings = (AudioPropertiesModel) layerModel.Properties;
                if (settings.Direction == Direction.TopToBottom || settings.Direction == Direction.BottomToTop)
                    ApplyVertical(settings);
                else if (settings.Direction == Direction.LeftToRight || settings.Direction == Direction.RightToLeft)
                    ApplyHorizontal(settings);
            }
        }