public string ToScript() { var builder = new StringBuilder(); builder.AppendLine(Matlab.CommentLine("Setting controller " + Name + " parameters.")); builder.AppendLine(UIModel.SetParameterCommand(this, ControllerProperties.Attack, Attack.ToStringValue())); builder.AppendLine(UIModel.SetParameterCommand(this, ControllerProperties.AttackMode, Mode.ToStringValue())); builder.AppendLine(UIModel.SetParameterCommand(this, ControllerProperties.IntegrityAtackValue, IntegrityAttackValue.ToString(new NumberFormatInfo { NumberDecimalSeparator = "." }))); builder.AppendLine(UIModel.SetParameterCommand(this, ControllerProperties.Start, Start)); builder.AppendLine(UIModel.SetParameterCommand(this, ControllerProperties.Duration, Duration)); return(builder.ToString()); }