Пример #1
0
        private static void OnResolumeValueChanged(string oscPath, ResolumeValue value)
        {
            switch (oscPath)
            {
            default:

                break;
            }
            if (value.UpdateCount < 10)
            {
                Console.ForegroundColor = ConsoleColor.Magenta;
                Console.WriteLine($"{oscPath} > {value}");
            }
        }
Пример #2
0
 private static void UpdateExistingResolumeValue(object argument, ResolumeValue oldValue)
 {
     if (argument is String)
     {
         (oldValue as ResolumeValue <String>).Value = (string)argument;
     }
     else if (argument is Int32)
     {
         (oldValue as ResolumeValue <Int32>).Value = (int)argument;
     }
     else if (argument is Single)
     {
         (oldValue as ResolumeValue <Single>).Value = (float)argument;
     }
     else
     {
         throw new ApplicationException($"Type not supported: {argument.GetType().FullName}");
     }
 }
Пример #3
0
        private static ResolumeValue GenerateNewResolumeValue(object argument)
        {
            ResolumeValue generatedResolumeValue;

            if (argument is String)
            {
                generatedResolumeValue = new ResolumeValue <String>((string)argument);
            }
            else if (argument is Int32)
            {
                generatedResolumeValue = new ResolumeValue <Int32>((int)argument);
            }
            else if (argument is Single)
            {
                generatedResolumeValue = new ResolumeValue <Single>((float)argument);
            }
            else
            {
                throw new ApplicationException($"Type not supported: {argument.GetType().FullName}");
            }
            return(generatedResolumeValue);
        }