Exemplo n.º 1
0
        public PageTreeNode(AnnContainer annContainer, AutomationObjectsListControl tree) : base(tree)
        {
            InitializeComponent();

            if (annContainer == null)
            {
                throw new ArgumentNullException("annContainer");
            }
            _annContainer = annContainer;

            Width      = Tree.TreeRootNode.Width;
            IsExpanded = false;
            UpdateTitle();
        }
Exemplo n.º 2
0
        public ReviewTreeNode(AnnObject annObject, IList <AnnReview> reviews, AnnReview reply, AutomationTreeNode treeParentNode, AnnAutomation automation, AutomationObjectsListControl tree) : base(tree)
        {
            InitializeComponent();
            if (annObject == null)
            {
                throw new ArgumentNullException("annObject");
            }
            if (annObject.Id == AnnObject.SelectObjectId || annObject.Id == AnnObject.None)
            {
                throw new ArgumentException("Cannot create this item with a selection or none annotation object", "annObject");
            }
            if (reviews == null)
            {
                throw new ArgumentNullException("reviews");
            }
            if (reply == null)
            {
                throw new ArgumentNullException("reply");
            }
            if (automation == null)
            {
                throw new ArgumentNullException("automation");
            }
            _annObject  = annObject;
            _automation = automation;
            _reviews    = reviews;
            _reply      = reply;
            AnnAutomationObject automationObject = _automation.Manager.FindObjectById(_annObject.Id);

            if (automationObject != null)
            {
                _lblObjectName.Text = automationObject.Name;
            }
            else
            {
                _lblObjectName.Text = _annObject.FriendlyName;
            }
            _pbObjetIcon.Image = _replyImage;

            if (!String.IsNullOrEmpty(_reply.Author))
            {
                _lblAuthor.Text = _reply.Author;
            }

            string date = _reply.Date.ToString();

            if (!String.IsNullOrEmpty(date))
            {
                _lblDate.Text = date;
            }

            string status = _reply.Status;

            if (!String.IsNullOrEmpty(status))
            {
                _lblDate.Text = status + ": " + _lblDate.Text;
            }

            foreach (ToolStripMenuItem item in _miSetStatus.DropDownItems)
            {
                item.Checked = (item.Text == status);
            }

            if (!String.IsNullOrEmpty(_reply.Comment))
            {
                _tbComment.Text = _reply.Comment;
            }

            _cbChecked.Checked = _reply.IsChecked;

            TreeParentNode = treeParentNode;
            IsExpanded     = false;
            Width          = Tree.TreeRootNode.Width - Margin.Left;
        }
Exemplo n.º 3
0
        public AnnObjectTreeNode(AnnObject annObject, AutomationTreeNode treeParentNode, AnnAutomation automation, AutomationObjectsListControl tree) : base(tree)
        {
            InitializeComponent();

            if (annObject == null)
            {
                throw new ArgumentNullException("annObject");
            }
            if (annObject.Id == AnnObject.SelectObjectId || annObject.Id == AnnObject.None)
            {
                throw new ArgumentException("Cannot create this item with a selection or none annotation object", "annObject");
            }

            if (treeParentNode == null)
            {
                throw new ArgumentNullException("treeParentNode");
            }
            if (automation == null)
            {
                throw new ArgumentNullException("automation");
            }

            _annObject  = annObject;
            _automation = automation;

            _tbComment.Visible = _annObject.SupportsContent;

            AnnAutomationObject automationObject = _automation.Manager.FindObjectById(_annObject.Id);

            if (automationObject != null)
            {
                _lblObjectName.Text = automationObject.Name;
                _pbObjetIcon.Image  = automationObject.ToolBarImage as Image;
            }
            else
            {
                _lblObjectName.Text = _annObject.FriendlyName;
                _pbObjetIcon.Image  = null;
            }

            UpdateMetadata();

            Width          = Tree.TreeRootNode.Width - Margin.Left;
            TreeParentNode = treeParentNode;
            IsExpanded     = false;
            GetReviews(AnnObject, this, AnnObject.Reviews);
        }
Exemplo n.º 4
0
 public AutomationTreeNode(AutomationObjectsListControl tree)
 {
     _tree       = tree;
     ChildNodes  = new List <AutomationTreeNode>();
     _isSelected = false;
 }