Ejemplo n.º 1
0
        /// <summary>
        /// Creates and returns a content for a GraphViz (.gv) file (using DOT language), for the visualisation of types that are in the storage.
        /// For this purpose, a Context is created only for this purpose, and cannot be used for any other.
        /// </summary>
        /// <param name="storage">Storage from where the types are extracted</param>
        /// <returns>content for the GraphViz file</returns>
        public String GetGraphVizContentFromStorage(IKeyValueStorage <Guid, object> storage)
        {
            String graphVizContent;
            IDictionary <String, TypeVisualUnit> typeUnits = GetTypeVisualUnits(GetRootTypeId());
            GVTemplate template = new GVTemplate(typeUnits);

            graphVizContent = template.TransformText();
            return(graphVizContent);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Creates and returns a content for a GraphViz (.gv) file (using DOT language), for the visualisation of types that are in the storage.
        /// <para>For this purpose, a Context is created only for this purpose, and cannot be used for any other.</para>
        /// </summary>
        /// <param name="storage">Storage from where the types are extracted</param>
        /// <returns>content for the GraphViz file</returns>
        public String GetGraphVizContentFromStorage(string typeName, IKeyValueStorage <Guid, object> storage)
        {
            String graphVizContent;
            Guid   typeId = GetIdFromTypeName(typeName);

            if (typeId.Equals(Guid.Empty))
            {
                throw new Exception("Type with the following name : " + typeName + " doesn't exist in this Context");
            }
            IDictionary <String, TypeVisualUnit> typeUnits = GetTypeVisualUnits(typeId);
            GVTemplate template = new GVTemplate(typeUnits);

            graphVizContent = template.TransformText();
            return(graphVizContent);
        }
Ejemplo n.º 3
0
        protected void LinkBtnTemplate_Click(object sender, EventArgs e)
        {
            if (Frame.UserTypeList.SelectedValue == "" && Frame.UserList.SelectedValue == "")
            {
                return;
            }

            VisibleButtonSaveTemplate(true);

            if (Frame.UserTypeList.SelectedValue != "" || Frame.UserList.SelectedValue != "")
            {
                VisibleImage_LinkButton(true);
            }

            if (Frame.EntityList.SelectedValue != "")
            {
                Frame.EntityList.SelectedIndex = 0;

                SetCss(Frame.EntityList, "default_border");
            }

            if (Frame.UserTypeList.SelectedValue != "" && Frame.UserList.SelectedValue != "")
            {
                GVTemplate.DataSource = QueryToDB(string.Format(@"SELECT * FROM [Permission].[IUTemplatePermission]({0}) order by name", Frame.UserList.SelectedValue));
                GVTemplate.DataBind();
                MView.ActiveViewIndex = 2;
                return;
            }
            else if (Frame.UserTypeList.SelectedValue != "" && Frame.UserList.SelectedValue == "")
            {
                GVTemplate.DataSource = QueryToDB(string.Format(@"SELECT * FROM [Permission].[IUTTemplatePermission]({0}) order by name", Frame.UserTypeList.SelectedValue));
                GVTemplate.DataBind();
                MView.ActiveViewIndex = 2;
                return;
            }
        }