Ejemplo n.º 1
0
        /// <summary>
        /// Refreshes the node information. This Method can be overridden in derived classes. The Method
        /// should be called, if the CAEX-Elements Data has changed and the Changes should be visible in any
        /// View, that has a binding to this ViewModel.
        /// </summary>
        public override void RefreshNodeInformation(bool expand)
        {
            base.RefreshNodeInformation(expand);

            if (CAEXNode != null && CAEXNode.HasAttribute(ClassPathReferenceAttribute))
            {
                var reference = CAEXNode.GetAttributeValue(ClassPathReferenceAttribute);
                if (!string.IsNullOrEmpty(reference))
                {
                    ClassReference = System.IO.Path.GetFileNameWithoutExtension(reference);
                }
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Refreshes the node information. This Method can be overridden in derived
        /// classes. The Method should be called, if the CAEX-Elements Data has changed
        /// and the Changes should be visible in any View, that has a binding to this ViewModel.
        /// </summary>
        public override void RefreshNodeInformation(bool expand)
        {
            base.RefreshNodeInformation(expand);

            if (CAEXNode != null && CAEXNode.HasChildNodes)
            {
                var role = CAEXNode.ChildElements(CAEX_CLASSModel_TagNames.ROLEREQUIREMENTS_STRING).FirstOrDefault();
                if (role != null)
                {
                    var reference = role.RoleReference();
                    if (!string.IsNullOrEmpty(reference))
                    {
                        this.RoleReference = System.IO.Path.GetFileNameWithoutExtension(reference);
                    }
                }
            }
        }