Esempio n. 1
0
        /*static void dumpKeyFrame(AutomationKeyframe kf, string zp) {
         *      Console.WriteLine("					" + zp + "{'Value':'" + kf.Value + "'"
         + ", 'Position':'" + kf.Position + "'"
         + ", 'Tension':'" + kf.Tension + "'}");
         + }*/
        static void dumpAutomationData(AutomationData aut)
        {
            Console.WriteLine("			,'automation': {");
            if (aut.Channel == null)
            {
                Console.WriteLine("				'Channel': null");
            }
            else
            {
                Console.WriteLine("				'Channel': '"+ aut.Channel.Id + "'");
            }
            Console.WriteLine("				,'InsertId': '"+ aut.InsertId + "'");
            //Console.WriteLine("				,'Keyframes': [");
            string zp    = "";
            string txtkf = "";

            for (int kk = 0; kk < aut.Keyframes.Length; kk++)
            {
                //dumpKeyFrame(aut.Keyframes[kk], zp);
                txtkf = txtkf + zp + "{'Value':'" + aut.Keyframes[kk].Value + "'"
                        + ", 'Position':'" + aut.Keyframes[kk].Position + "'"
                        + ", 'Tension':'" + aut.Keyframes[kk].Tension + "'}";
                zp = ", ";
            }
            //Console.WriteLine("					]");
            Console.WriteLine("				,'Keyframes': ["+ txtkf + "]");
            Console.WriteLine("				,'Parameter': '"+ aut.Parameter + "'");
            Console.WriteLine("				,'SlotId': '"+ aut.SlotId + "'");
            Console.WriteLine("				,'VstParameter': '"+ aut.VstParameter + "'");
            Console.WriteLine("				}");
        }
Esempio n. 2
0
        private static AutomationData GetAccountAutomationData(int profileId)
        {
            AutomationData result = new AutomationData();

            result.AutomationProfileCustomXml = string.Empty;
            result.AutomaticRetrievalPossible = false;
            result.AutomationProfileId        = profileId;
            result.AutomationEnabled          = (profileId != 0);

            if (result.AutomationEnabled)
            {
                result.Profile = FinancialAccountAutomationProfile.FromIdentity(profileId);
                result.AutomationCurrencyCode = Currency.FromIdentity(result.Profile.CurrencyId).Code;
                // the "NonpresentationCurrency" field can't be set here, because we don't know the presentation currency
            }

            return(result);
        }
Esempio n. 3
0
 static void dumpChannel(Channel singleChan, string dlmtr)
 {
     Console.WriteLine("		"+ dlmtr + "{'Id': '" + singleChan.Id + "', 'Name': '" + singleChan.ChannelName + "' ,'Color':'" + singleChan.Color + "'");
     if (singleChan.Data.GetType() == typeof(GeneratorData))
     {
         dumpGenerator((GeneratorData)singleChan.Data);
         Console.WriteLine("			,'automation': null");
     }
     else
     {
         if (singleChan.Data.GetType() == typeof(AutomationData))
         {
             AutomationData aut = (AutomationData)singleChan.Data;
             Console.WriteLine("			,'generator': null");
             dumpAutomationData(aut);
         }
         else
         {
             Console.WriteLine("			,'generator': null, 'automation': null");
         }
     }
     Console.WriteLine("			}");
 }