private Dictionary <TreeNode, object> GetTypeTree() { return (Enum.GetValues(typeof(VeloType)) .Cast <VeloType>() .ToDictionary <VeloType, TreeNode, object>(type => new TreeNode(VeloTypeStrings.GetString(type)), type => type)); }
public VeloObjectEditView(VeloObject veloobject, IVeloObjectManager soManager) { InitializeComponent(); cB_Type.DataSource = Enum.GetValues(typeof(VeloType)).Cast <VeloType>() .Select(t => VeloTypeStrings.GetString(t)).ToList(); /* cB_View.DataSource = Enum.GetValues(typeof(VeloView)).Cast<VeloView>() * .Select(t => VeloViewStrings.GetString(t)).ToList(); */ /* cB_Status.DataSource = Enum.GetValues(typeof(VeloObjectStatus)).Cast<VeloObjectStatus>() * .Select(t => VeloObjectStatusStrings.GetStatusName(t)).ToList(); */ _veloobjectManager = soManager; VeloObject = veloobject; _isEdit = !VeloObject.IsTransient(); }