Esempio n. 1
0
        /// <summary>
        /// Starts a color flow asynchronously
        /// </summary>
        /// <param name="flow"></param>
        /// <returns></returns>
        public async Task <bool> StartColorFlow(ColorFlow flow)
        {
            List <object> parameters = new List <object>()
            {
                flow.RepetitionCount *flow.Count, (int)flow.EndAction, flow.GetColorFlowExpression()
            };

            CommandResult <List <string> > result = await ExecuteCommandWithResponse <List <string> >(
                method : METHODS.StartColorFlow,
                parameters : parameters);

            return(result.IsOk());
        }
Esempio n. 2
0
        /// <summary>
        /// Starts a background color flow
        /// </summary>
        /// <param name="flow"></param>
        /// <param name="action"></param>
        /// <param name="count"></param>
        /// <returns></returns>
        public async Task <bool> BackgroundStartColorFlow(ColorFlow flow)
        {
            List <object> parameters = new List <object>()
            {
                flow.RepetitionCount, (int)flow.EndAction, flow.GetColorFlowExpression()
            };

            CommandResult result = await ExecuteCommandWithResponse(
                method : METHODS.StartBackgroundLightColorFlow,
                id : (int)METHODS.StartBackgroundLightColorFlow,
                parameters : parameters);

            return(result.IsOk());
        }