private void saveBtn_Click(object sender, RoutedEventArgs e)
        {
            var id = (VariablesAction.VariablesActionType)Enum.Parse(typeof(VariablesAction.VariablesActionType), operationCmb.Text);
            IVariableData iv = new SavedData.VariableData(varCmb.Text, valueTxb.Text);
            var op = new OperationData { FileName = fileNameCmb.Text, TargetVar = targetVarCmb.Text, Value = valueTxb.Text };//we use the same valueTxb.Text field for both setting value to variable and performing operations (depands on the action)

            var variable = new VariablesAction(id, iv, op);
            var entity = new StepEntity(variable);
            entity.Comment = string.Format("Variables {0} - {1}", operationCmb.Text, varCmb.Text);
            Singleton.Instance<SaveData>().AddStepEntity(entity);

            if ((id == VariablesAction.VariablesActionType.Create) || (id == VariablesAction.VariablesActionType.LoadVariableFile))
                variable.Execute();
        }
        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]));
 }