public TextManipulationAction(TextActionType type, TextActionData actionData)
            : base(Enums.ActionTypeId.TextOperations)
        {
            _textActionData = actionData;
            _type = type;

            Details.Add(type.ToString());
            Details.Add(_textActionData.SourceVar); //1
            Details.Add(_textActionData.TargetVar); //2
            Details.Add(_textActionData.Value); //3
            Details.Add(_textActionData.Length); //4
        }
        private void saveBtn_Click(object sender, RoutedEventArgs e)
        {
            if (string.IsNullOrEmpty(targetCmb.Text))
                HelperClass.ShowMessageBox("Info", "Target Variable is empty");

            var type = (TextManipulationAction.TextActionType)Enum.Parse(typeof(TextManipulationAction.TextActionType), operationCmb.Text);
            var data = new TextActionData() { SourceVar = srcCmb.Text, TargetVar = targetCmb.Text, Value = valueTxb.Text, Length = lengthTxb.Text };
            var textMaipulationAction = new TextManipulationAction(type, data);
            var entity = new StepEntity(textMaipulationAction);
            entity.Comment = string.Format("Text Operations {0}", operationCmb.Text);
            Singleton.Instance<SaveData>().AddStepEntity(entity);
        }
 public override void Construct()
 {
     _type = (TextActionType)Enum.Parse(typeof(TextActionType), Details[0]);
     _textActionData = new TextActionData() { SourceVar = Details[1], TargetVar = Details[2], Value = Details[3], Length = Details.Count > 4 ? Details[4] : null };
 }