public bool Init()
        {
            _value = Singleton.Instance<SavedData>().GetVariableData(_operationData.Value);
            if (Singleton.Instance<SavedData>().Variables.ContainsKey(_sourceVar.GetName()))
            {
                _sourceVar = Singleton.Instance<SavedData>().Variables[_sourceVar.GetName()];
                return true;
            }

            return false;
        }
        public VariablesAction(VariablesActionType type, IVariableData variableData, OperationData operationData)
            : base(Enums.ActionTypeId.VariablesOperations)
        {
            _value = operationData.Value;
            _sourceVar = variableData;
            _operationData = operationData;
            _type = type;

            Details.Add(type.ToString());
            Details.Add(_operationData.TargetVar);//1
            Details.Add(_operationData.FileName);//2
            Details.Add(_operationData.Value);//3
            Details.Add(variableData.GetName());//4
            // Details.Add(variableData.GetValue());//5
            Details.Add(variableData.IsPermanent().ToString(CultureInfo.InvariantCulture));//5 (not used)
        }
 public override void Construct()
 {
     _type = (VariablesActionType)Enum.Parse(typeof(VariablesActionType), Details[0]);
     _operationData = new OperationData { TargetVar = Details[1], FileName = Details[2], Value = Details[3] };
     // _sourceVar = new SavedData.VariableData(Details[4], Details[5], Convert.ToBoolean(Details[6));
     _sourceVar = new SavedData.VariableData(Details[4], Details[3], Convert.ToBoolean(Details[5]));
 }