public void appendMenu(ccl.ShaderNodes.ColorBand.Interpolations it, ToolStripDropDown menu) { var u = this; Menu_AppendItem( menu, it.ToString().Replace("_", "-"), ((_, __) => { u.Interpolation = it; u.ExpireSolution(true); }), true, u.Interpolation == it); }
public override bool Read(GH_IReader reader) { if (reader.ItemExists("Interpolation")) { if (Enum.TryParse(reader.GetString("Interpolation"), out ccl.ShaderNodes.ColorBand.Interpolations ip)) { Interpolation = ip; } else { Interpolation = ccl.ShaderNodes.ColorBand.Interpolations.Linear; } } return(base.Read(reader)); }