コード例 #1
0
        public static void SendCompressor(int id, CompressorModel compressor)
        {
            if (!bool.Parse(LibraryData.Settings["CompressorEnabled"]))
            {
                return;
            }
            if (compressor == null)
            {
                return;
            }
            if (compressor.CompressorValues == null)
            {
                return;
            }

            try
            {
                for (var i = 0; i < 7; i++)
                {
                    LibraryData.AddData(new SetCompressor(id, i, compressor.CompressorValues));
                }
            }
            catch (Exception e)
            {
                Debug.WriteLine("Failed to upload compressor: " + e);
            }
        }