예제 #1
0
        public GroupTreeStructureChangedEventArg(IGroupTreeItem item, RegistryActionEnum action)
        {
            Action = action;
            switch (item)
            {
            case IGroup group:
                Item = new GroupProjection(group);
                break;

            case IContainer container:
                Item = new ContainerProjection(container);
                break;

            default:
                throw new ArgumentException("Unknown type");
            }
        }
예제 #2
0
        public GroupTreeItemNameChangedEventArg(IGroupTreeItem item, string oldName, string newName)
        {
            switch (item)
            {
            case IGroup group:
                Item = new GroupProjection(group);
                break;

            case IContainer container:
                Item = new ContainerProjection(container);
                break;

            default:
                throw new ArgumentException("Unknown type");
            }
            OldName = oldName;
            NewName = newName;
        }