private void InitCreaters() { creaters = new ColumnTreeItemCreater[rules.Count]; for (int i = 0; i < creaters.Length; i++) { creaters[i] = new ColumnTreeItemCreater(rules[i]); var index = i + 1; creaters[i].onChoise = (type) => { OnItemClicked(index, type); }; } }
private void OpenSelect(ColumnTreeItemCreater creater, TreeNode node) { if (creater != null) { var options = node.childern.ConvertAll <string>(x => x.name).ToArray(); creater.OpenSelect(options); if (options.Length > 0) { creater.SetActiveItem(options[0], true); } } }