//public static string ModelRoot //{ // get { return "gcr"; } //} //public static string ControllerPath(Controller controller) //{ // var number = controller.Number; // var name = controller.Name.Substring(0, // controller.Name.IndexOf( // number.ToString(CultureInfo.InvariantCulture), StringComparison.Ordinal)); // return string.Join("/", new[] { ModelRoot, // "TE Plant", // name + " atk block", // controller.Name + " attack controller"}); //} public static string SetParameterCommand(Controller controller, ControllerProperties property, object value) { var number = controller.Number; var name = controller.Name.Substring(0, controller.Name.IndexOf( number.ToString(CultureInfo.InvariantCulture), StringComparison.Ordinal)); return string.Format("set_{0}_ctrl_param({1}, {2}, {3});", name, number, property.ToStringValue(), value); }
//public static string ModelRoot //{ // get { return "gcr"; } //} //public static string ControllerPath(Controller controller) //{ // var number = controller.Number; // var name = controller.Name.Substring(0, // controller.Name.IndexOf( // number.ToString(CultureInfo.InvariantCulture), StringComparison.Ordinal)); // return string.Join("/", new[] { ModelRoot, // "TE Plant", // name + " atk block", // controller.Name + " attack controller"}); //} public static string SetParameterCommand(Controller controller, ControllerProperties property, object value) { var number = controller.Number; var name = controller.Name.Substring(0, controller.Name.IndexOf( number.ToString(CultureInfo.InvariantCulture), StringComparison.Ordinal)); return(string.Format("set_{0}_ctrl_param({1}, {2}, {3});", name, number, property.ToStringValue(), value)); }