using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SharpDX;


namespace Framefield.Core.ID10ab0fc1_38b3_4dc9_b225_d97b9c8692a4
{
    public class Class_ValueToTimeStamp : OperatorPart.Function
    {
        //>>> _inputids
        private enum InputId
        {
            Value = 0,
            Format = 1
        }
        //<<< _inputids



        public override OperatorPartContext Eval(OperatorPartContext context, List<OperatorPart> inputs, int outputIdx) {
            //>>> _params
            var Value = inputs[(int)InputId.Value].Eval(context).Value;
            var Format = inputs[(int)InputId.Format].Eval(context).Text;
            //<<< _params            
            
            string s="?";
            try {
                s= ((int) (Value / 60 % 60)).ToString("D2") + ":" +
                       ((int) (Value      % 60)).ToString("D2") + ":" +
                       ((int) (Value * 30 % 30)).ToString("D2");

                //s= String.Format(Format, Value);
            }
            catch {
                //Logger.Info(this,"Can't convert value to string.");
            }
            context.Text= s;
            
            return context;
        }
    }
}

