⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 miscstyles.cs

📁 微软的.NET论坛的源代码(COOL!!!)
💻 CS
📖 第 1 页 / 共 2 页
字号:
        /// </summary>
        public int ReasonsTextBoxRows {
            get {
                if (ViewState["deletePostStyleTextBoxRows"] == null) return _defaultReasonsTextBoxRows;
                return (int) ViewState["deletePostStyleTextBoxRows"];
            }
            set { ViewState["deletePostStyleTextBoxRows"] = value; }
        }
        /********************************************************/
    }


    /*********************** ReplyToPostStyle Class ***********************
            This class represents the style and miscellaneous options for the pane
            that displays the post being replied to.
         *********************************************************************/
    /// <summary>
    /// This class represents the style and miscellaneous options for the pane
    /// that displays the post being replied to.
    /// </summary>
	
    [ ToolboxItemAttribute(false) ]
    public class ReplyToPostStyle : Style {
        /********** DECLARE PRIVATE CONSTANTS **************/
        const int _defaultCellPadding = 3;						// the default cell padding for the reply-to table
        const int _defaultCellSpacing = 0;						// the default cell spacing for the reply-to table
        /***************************************************/

        /************ PROPERTY SET/GET STATEMENTS **************/
        /// <summary>
        /// Indicates how the reply-to panel will be horizontally aligned.  The default is to
        /// have the pane Center aligned.
        /// </summary>
        public HorizontalAlign HorizontalAlign {
            get {
                if (ViewState["previewPostStyleHZ"] == null) return HorizontalAlign.Center;
                return (HorizontalAlign) ViewState["previewPostStyleHZ"];
            }
            set {  ViewState["previewPostStyleHZ"] = value;  }
        }

        /// <summary>
        /// Specifies the cellpadding for the HTML table; the default is 3 pixels.
        /// </summary>
        public int CellPadding {
            get {
                if (ViewState["previewPostStyleCellPadding"] == null) return _defaultCellPadding;
                return (int) ViewState["previewPostStyleCellPadding"];
            }
            set {  ViewState["previewPostStyleCellPadding"] = value;  }
        }

        /// <summary>
        /// Specifies the cellspacing for the HTML table; the default is zero pixels..
        /// </summary>
        public int CellSpacing {
            get {
                if (ViewState["previewPostStyleCellSpacing"] == null) return _defaultCellSpacing;
                return (int) ViewState["previewPostStyleCellSpacing"];
            }
            set {  ViewState["previewPostStyleCellSpacing"] = value;  }
        }
        /********************************************************/
    }

    /********************* PostNewMessageStyle Class **********************
        This class represents the style and text for the Post a New Message
        table in the upper right hand corner.  It is utilized in the ForumView
        control via the _postNewMessageStyle member variable.
     *********************************************************************/
    /// <summary>
    /// This class defines the style for the PostNewMessage label Web control.
    /// This class extends the base Style class to include a Text property, which
    /// specifies the text message to display in the PostNewMessage label (defaults
    /// to a value of "Post a New Message").
    /// <seealso cref="PostNewMessageLabel"/>
    /// <seealso cref="Text"/>
    /// <seealso cref="ShowPostNewMessage"/>
    /// </summary>
    /// <remarks>This Post a New Message label is only displayed if the
    /// ShowPostNewMessage property of the ForumView class is set to true.</remarks>
	
    [ ToolboxItemAttribute(false) ]
    public class PostNewMessageStyle : Style {
        /********** DECLARE PRIVATE CONSTANTS **************/
        const String _defaultText = "Post a New Message";			// the default text message
        /***************************************************/
	
		
        /************ PROPERTY SET/GET STATEMENTS **************/
        /// <summary>
        /// Specifies the text label to use when displaying the Post a New Message
        /// label.
        /// </summary>
        public String Text {
            get {
                if (ViewState["postNewMessageStyleText"] == null) return _defaultText;
                return (String) ViewState["postNewMessageStyleText"];
            }
            set {  ViewState["postNewMessageStyleText"] = value;  }
        }
        /********************************************************/
    }
    /**********************************************************************/





    /********************* NextPrevMessagesStyle Class ********************
        This class represents the style and text for the next and previous
        messages links.  This class allows the user to customize the placement
        and look and feel of these options
     *********************************************************************/
    /// <summary>
    /// This class defines the style for the Next and Previous page links.
    /// This class extends the base Style class, providing four additional properties:
    /// Position, HorizontalAlign, UpArrowImageUrl, DownArrowImageUrl.  These properties
    /// allow you to specify the position and UI elements of the links for the next and previous
    /// pages.
    /// <seealso cref="Position"/>
    /// <seealso cref="UpArrowImageUrl"/>
    /// <seealso cref="DownArrowImageUrl"/>
    /// <seealso cref="HorizontalAlign"/>
    /// </summary>
	
    [ ToolboxItemAttribute(false) ]
    public class NextPrevMessagesStyle : Style {
        /********** DECLARE PRIVATE CONSTANTS **************/
        const NextPrevMessagesPosition _defaultPosition = NextPrevMessagesPosition.Bottom;
        const String _defaultUpArrow = "up.gif";					// the default filename of the up arrow
        const String _defaultDownArrow = "dn.gif";					// the default filename of the down arrow
        /***************************************************/

		
        /************ PROPERTY SET/GET STATEMENTS **************/
        /// <summary>
        /// Indicates the position the next/previous page links should be replaced.  Available options
        /// must be members of the NextPrevMessagesPosition enumeration, and are: Top, Bottom, or Both.
        /// The default is Bottom.
        /// <seealso cref="NextPrevMessagesPosition"/>
        /// </summary>		
        public NextPrevMessagesPosition Position {
            get {
                if (ViewState["nextPrevPosition"] == null) return _defaultPosition;
                return (NextPrevMessagesPosition) ViewState["nextPrevPosition"];
            }
            set {  ViewState["nextPrevPosition"] = value;  }
        }

        /// <summary>
        /// Indicates the Url for the image of an up-arrow, to display next to the link that
        /// shows posts in the future.
        /// </summary>
        /// <remarks>This setting should specify the image's Url path relative to the imagesPath
        /// setting in Web.config.</remarks>
        public String UpArrowImageUrl {
            get {
                if (ViewState["nextprevMessagesStyleUpArrowUrl"] == null) return Globals.ImagePath + _defaultUpArrow;
                return (String) ViewState["nextprevMessagesStyleUpArrowUrl"];
            }
            set { ViewState["nextprevMessagesStyleUpArrowUrl"] = value; }
        }

        /// <summary>
        /// Indicates the Url for the image of a down-arrow, to display next to the link that
        /// shows past posts.
        /// </summary>
        /// <remarks>This setting should specify the image's Url path relative to the imagesPath
        /// setting in Web.config.</remarks>
        public String DownArrowImageUrl {
            get {
                if (ViewState["nextprevMessagesStyleDownArrowUrl"] == null) return Globals.ImagePath + _defaultDownArrow;
                return (String) ViewState["nextprevMessagesStyleDownArrowUrl"];
            }
            set { ViewState["nextprevMessagesStyleDownArrowUrl"] = value; }
        }

        /// <summary>
        /// Specifies how the next/previous page links should be horizontally aligned.  The
        /// default is Right aligned.
        /// </summary>
        public HorizontalAlign HorizontalAlign {
            get {
                if (ViewState["nextprevMessagesStyleAlign"] == null) return HorizontalAlign.Right;
                return (HorizontalAlign) ViewState["nextprevMessagesStyleAlign"];
            }
            set { ViewState["nextprevMessagesStyleAlign"] = value; }
        }
        /********************************************************/
    }
    /**********************************************************************/
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -