public VMassign(MyAssign root, VMfunction parent) : base(root, parent) { this.CommandOpen = new DelegateCommand(() => new AssignWindow() { DataContext = this }.ShowDialog()); this.CommandSetVariable = new DelegateCommand(() => this.Variable = this.Parent.SelectVar()); this.CommandSetValue = new DelegateCommand(() => this.Value = this.Parent.SelectVar()); }
private static string Convert(MyAssign input, Function f, ref int i) { var variable = ConvertOutput(input.Variable.Output); var value = ConvertOutput(input.Value.Output); if (input.Value.Value.Alias == string.Empty) { value = string.Format("factory.NewResource('namespace','{0}');", input.Value.Value.ObjectName); } if (input.Value.Value.Alias == "#currentUser") { value = "me.getIdentifier()"; } if (input.Value.Value.Alias == "#currentDateTime") { value = "tx.timestamp"; } return(string.Format("{0}{1} = {2};", BlockConverter.Indent(i), variable, value)); }
public MyCreation() : base() { this.myObject = new MyAssign(); this.modifications = new MyModification(); }