Esempio n. 1
0
        //--- This class allows us to render the design time mode with custom HTML ---'
        public override string GetDesignTimeHtml()
        {
            // Component is the instance of the component or control that
            // this designer object is associated with. This property is
            // inherited from System.ComponentModel.ComponentDesigner.
            DNNMenu objMenu = (DNNMenu)Component;

            if (objMenu.ID.Length > 0)
            {
                StringWriter   sw      = new StringWriter();
                HtmlTextWriter tw      = new HtmlTextWriter(sw);
                Label          objText = new Label();

                objText.CssClass = objMenu.MenuBarCssClass + " " + objMenu.DefaultNodeCssClass;
                objText.Text     = objMenu.ID;

                if (objMenu.Orientation == Orientation.Horizontal)
                {
                    objText.Width = new Unit("100%");
                }
                //objText.Height = New Unit(objMenu)
                else
                {
                    objText.Height = new Unit(500);
                    //---not sure why 100% doesn't work here ---' 'Unit("100%")
                    //objText.Width = Unit.Empty
                }
                objText.RenderControl(tw);
                return(sw.ToString());
            }
            else
            {
                return(null);
            }
        }
Esempio n. 2
0
 public void Click()
 {
     this.Selected = !this.Selected;
     if (DNNMenu.IsDownLevel)
     {
         foreach (MenuNode objNode in DNNMenu.SelectedMenuNodes)
         {
             if (objNode.Level > this.Level)
             {
                 objNode.Selected = false;
             }
         }
     }
     DNNMenu.OnNodeClick(new DNNMenuNodeClickEventArgs(this));
 }
Esempio n. 3
0
 internal MenuNode( XmlNode objXmlNode, Control ctlOwner ) : base( objXmlNode )
 {
     m_objDNNMenu = (DNNMenu)ctlOwner;
 }
Esempio n. 4
0
 internal void SetDNNMenu( DNNMenu objMenu )
 {
     m_objDNNMenu = objMenu;
 }
Esempio n. 5
0
 /// -----------------------------------------------------------------------------
 /// <summary>
 ///
 /// </summary>
 /// <param name="writer"></param>
 /// <param name="Menu"></param>
 /// <remarks>
 /// </remarks>
 /// <history>
 ///     [jbrinkman]	5/6/2004	Created
 /// </history>
 /// -----------------------------------------------------------------------------
 public void RenderMenu(HtmlTextWriter writer, DNNMenu Menu)
 {
     m_objMenu = Menu;
     RenderControl(writer);
 }
Esempio n. 6
0
 /// -----------------------------------------------------------------------------
 /// <summary>
 /// Constructor for all nodes that are not the root.
 /// </summary>
 /// <param name="objXmlNode">Node whose children will be exposed by this class</param>
 /// <param name="objControl">DNN Menu control</param>
 /// <remarks>
 /// </remarks>
 /// <history>
 ///     [Jon Henning]	12/22/2004	Created
 /// </history>
 /// -----------------------------------------------------------------------------
 public MenuNodeCollection(XmlNode objXmlNode, DNNMenu objControl) : base(objXmlNode)
 {
     //, ByVal objControl As Control)
     m_objDNNMenu = objControl;
 }
Esempio n. 7
0
 /// -----------------------------------------------------------------------------
 /// <summary>
 /// Loads node collection based off of XML string
 /// </summary>
 /// <param name="strXML">XML String</param>
 /// <param name="strXSLFile">XSL FileName.  Leave empty if no transform needed</param>
 /// <param name="objControl">DNN Menu control</param>
 /// <remarks>
 /// </remarks>
 /// <history>
 ///     [Jon Henning]	12/22/2004	Created
 /// </history>
 /// -----------------------------------------------------------------------------
 public MenuNodeCollection(string strXML, string strXSLFile, DNNMenu objControl) : base(strXML, strXSLFile)
 {
     m_objDNNMenu = objControl;
 }
        //Private m_strNamespace As String

        /// <summary>
        /// Constructor to call when creating a Root Node
        /// </summary>
        /// <param name="strNamespace">Namespace of node hierarchy</param>
        /// <param name="objControl">DnnMenu control associated to MenuNodeCollection</param>
        /// <remarks>
        /// </remarks>
        /// <history>
        /// 	[Jon Henning]	12/22/2004	Created
        /// </history>
        public MenuNodeCollection( string strNamespace, DNNMenu objControl ) : base( strNamespace )
        {
            m_objDNNMenu = objControl;
        }
 public override void Initialize()
 {
     m_objMenu = new DNNMenu();
     Menu.ID = m_strControlID;
     Menu.EnableViewState = false;
     Menu.NodeClick += DNNMenu_NodeClick;
     Menu.PopulateOnDemand += DNNMenu_PopulateOnDemand;
 }
 public MenuNodeEnumerator( XmlNode objRoot, DNNMenu objControl )
 {
     m_objXMLNode = objRoot;
     m_objDNNMenu = objControl;
     m_intCursor = -1;
 }
Esempio n. 11
0
 internal MenuNode(Control ctlOwner) : base()
 {
     m_objDNNMenu = (DNNMenu)ctlOwner;
 }
Esempio n. 12
0
 internal MenuNode(System.Xml.XmlNode objXmlNode, Control ctlOwner) : base(objXmlNode)
 {
     m_objDNNMenu = (DNNMenu)ctlOwner;
 }
Esempio n. 13
0
 internal void SetDNNMenu(DNNMenu objMenu)
 {
     m_objDNNMenu = objMenu;
 }
 /// <summary>
 /// Constructor for all nodes that are not the root.
 /// </summary>
 /// <param name="objXmlNode">Node whose children will be exposed by this class</param>
 /// <param name="objControl">DNN Menu control</param>
 /// <remarks>
 /// </remarks>
 /// <history>
 /// 	[Jon Henning]	12/22/2004	Created
 /// </history>
 public MenuNodeCollection( XmlNode objXmlNode, DNNMenu objControl ) : base( objXmlNode ) //, ByVal objControl As Control)
 {
     m_objDNNMenu = objControl;
 }
 /// <summary>
 /// Loads node collection based off of XML string
 /// </summary>
 /// <param name="strXML">XML String</param>
 /// <param name="strXSLFile">XSL FileName.  Leave empty if no transform needed</param>
 /// <param name="objControl">DNN Menu control</param>
 /// <remarks>
 /// </remarks>
 /// <history>
 /// 	[Jon Henning]	12/22/2004	Created
 /// </history>
 public MenuNodeCollection( string strXML, string strXSLFile, DNNMenu objControl ) : base( strXML, strXSLFile )
 {
     m_objDNNMenu = objControl;
 }
Esempio n. 16
0
 internal MenuNode( Control ctlOwner )
 {
     m_objDNNMenu = (DNNMenu)ctlOwner;
 }
		/// -----------------------------------------------------------------------------
		/// <summary>
		/// 
		/// </summary>
		/// <param name="writer"></param>
		/// <param name="Menu"></param>
		/// <remarks>
		/// </remarks>
		/// <history>
		/// 	[jbrinkman]	5/6/2004	Created
		/// </history>
		/// -----------------------------------------------------------------------------
		public void RenderMenu(HtmlTextWriter writer, DNNMenu Menu)
		{

			m_objMenu = Menu;
			RenderControl(writer);
		}
Esempio n. 18
0
 public MenuNodeEnumerator(XmlNode objRoot, DNNMenu objControl)
 {
     m_objXMLNode = objRoot;
     m_objDNNMenu = objControl;
     m_intCursor  = -1;
 }
Esempio n. 19
0
        //Private m_strNamespace As String
        #endregion

        #region "Constructors"
        /// -----------------------------------------------------------------------------
        /// <summary>
        /// Constructor to call when creating a Root Node
        /// </summary>
        /// <param name="strNamespace">Namespace of node hierarchy</param>
        /// <param name="objControl">DnnMenu control associated to MenuNodeCollection</param>
        /// <remarks>
        /// </remarks>
        /// <history>
        ///     [Jon Henning]	12/22/2004	Created
        /// </history>
        /// -----------------------------------------------------------------------------
        public MenuNodeCollection(string strNamespace, DNNMenu objControl) : base(strNamespace)
        {
            m_objDNNMenu = objControl;
        }
 public override void Initialize()
 {
     m_objMenu = new DNNMenu();
     Menu.ID = m_strControlID;
     Menu.EnableViewState = false;
     Menu.NodeClick += new DNNMenu.DNNMenuNodeClickHandler( DNNMenu_NodeClick );
     Menu.PopulateOnDemand += new DNNMenu.DNNMenuEventHandler( DNNMenu_PopulateOnDemand );
 }