private static void _tasksTreeView_AfterLabelEdit(object sender, ResourceItemEditEventArgs e) { IResource task = e.Resource; if (task == null || task.Type != "Task" || e.Text == null || e.Text.Length == 0) { e.CancelEdit = true; } else { ResourceProxy proxy = new ResourceProxy(task); proxy.SetProp(Core.Props.Subject, e.Text); } }
private static void _tasksTreeView_BeforeLabelEdit(object sender, ResourceItemEditEventArgs e) { e.CancelEdit = (e.Resource == null || e.Resource.Type != "Task"); }