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

📄 topic.cs

📁 c#编的CSDN离线助手
💻 CS
字号:
/// <Copyright>
/// This Program Written By Luyan(5drush)
/// 2002/4/23
/// Email:nluyan@163.net
/// QQ:5743345
/// </Copyright>
using System;
using System.Collections;

namespace CSDN
{
	/// <summary>
	/// Topic 的摘要说明。
	/// </summary>
	public class Topic
	{
		private string topicId;
		private string roomName;
		private int    replyNum;
		private DateTime postDateTime;
		private int    point;
		private int    readNum;
		private string roomId;
		private bool   endState;
		private string content;
		private string topicName;

		private Poster poster;

		private ReplyIndex replyIndex;

		public Topic(Poster TopicPoster,string TopicId, string TopicName, string RoomName, int ReplyNum, DateTime PostDateTime, int Point, int ReadNum, string RoomId, bool EndState, string Content, ReplyIndex PostReplyIndex)
		{
			poster = TopicPoster;
			topicId = TopicId;
			topicName = TopicName;
			roomName = RoomName;
			replyNum = ReplyNum;
			postDateTime = PostDateTime;
			point = Point;
			readNum = ReadNum;
			roomId = RoomId;
			endState = EndState;
			content = Content;
			replyIndex = PostReplyIndex;
		}

		public string TopicId
		{
			get
			{
				return topicId;
			}
		}

		public bool EndState
		{
			get
			{
				return endState;
			}
		}

		public string RoomId
		{
			get
			{
				return roomId;
			}
		}

		public int ReadNum
		{
			get
			{
				return readNum;
			}
		}

		public int Point
		{
			get
			{
				return point;
			}
		}

		public DateTime PostDateTime
		{
			get
			{
				return postDateTime;
			}
		}

		public int ReplyNum
		{
			get
			{
				return replyNum;
			}
		}

		public string RoomName
		{
			get
			{
				return roomName;
			}
		}

		public Poster TopicPoster
		{
			get
			{
				return poster;
			}
		}

		public ReplyIndex ReplyIndex
		{
			get
			{
				return replyIndex;
			}
		}

		/// <summary>
		/// 帖子名称
		/// </summary>
		public string TopicName
		{
			get
			{
				return topicName;
			}
		}

		/// <summary>
		/// 帖子内容
		/// </summary>
		public string Content
		{
			get
			{
				return content;
			}
		}

		/// <summary>
		/// 帖子字数
		/// </summary>
		public int ContentCount
		{
			get
			{
				return 0;
			}
		}
	}

	public class TopicItem
	{
		private string topicId;
		private string topicName;
		private string postUserName;
		private int    replyNum;
		private DateTime replyDateTime;
		private int    point;
		private bool   endState;
		private int    topicStatus;

		public TopicItem(string TopicId, string TopicName, string PostUserName, int ReplyNum, DateTime ReplyDateTime, int Point, bool EndState)
		{
			topicId       = TopicId;
			topicName     = TopicName;
			postUserName  = PostUserName;
			replyNum      = ReplyNum;
			replyDateTime = ReplyDateTime;
			point         = Point;
			endState      = EndState;
		}

		public string TopicId
		{
			get
			{
				return topicId;
			}
			set
			{
				topicId = value;
			}
		}

		public int TopicStatus
		{
			get
			{
				return topicStatus;
			}
			set
			{
				topicStatus = value;
			}
		}

		public string TopicName
		{
			get
			{
				return topicName;
			}
			set
			{
				topicName = value;
			}
		}

		public string PostUserName
		{
			get
			{
				return postUserName;
			}
			set
			{
				postUserName = value;
			}
		}

		public int ReplyNum
		{
			get
			{
				return replyNum;
			}
			set
			{
				replyNum = value;
			}
		}

		public DateTime ReplyDateTime
		{
			get
			{
				return replyDateTime;
			}
			set
			{
				replyDateTime = value;
			}
		}

		public int Point
		{
			get
			{
				return point;
			}
			set
			{
				point  = value;
			}
		}

		public bool EndState
		{
			get
			{
				return endState;
			}
			set
			{
				endState = value;
			}
		}
	}

	public class TopicItemIndex
	{
		ArrayList topicItemIndex = new ArrayList();
		
		public TopicItemIndex()
		{
		}

		public int Length
		{
			get
			{
				return topicItemIndex.Count;
			}
		}

		public TopicItem this[int index]
		{
			get
			{
				if(index > -1 && index < topicItemIndex.Count)
				{
					return (TopicItem)topicItemIndex[index];
				}
				else
				{
					throw new IndexOutOfRangeException();
				}
			}
			set
			{
				if(index > -1 && index < topicItemIndex.Count)
				{
					topicItemIndex[index] = value;
				}
				else if(index == topicItemIndex.Count)
				{
					topicItemIndex.Add(value);
				}
				else
				{
					throw new IndexOutOfRangeException();
				}
			}
		}
	}
}

⌨️ 快捷键说明

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