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

📄 form1.cs

📁 c#编的CSDN离线助手
💻 CS
📖 第 1 页 / 共 5 页
字号:
																																																														new System.Windows.Forms.TreeNode("WinNT/2000/XP", new System.Windows.Forms.TreeNode[] {
																																																																																				   new System.Windows.Forms.TreeNode("非技术区"),
																																																																																				   new System.Windows.Forms.TreeNode("技术区"),
																																																																																				   new System.Windows.Forms.TreeNode("已解决区"),
																																																																																				   new System.Windows.Forms.TreeNode("精华区")}),
																																																														new System.Windows.Forms.TreeNode("DOS", new System.Windows.Forms.TreeNode[] {
																																																																																		 new System.Windows.Forms.TreeNode("非技术区"),
																																																																																		 new System.Windows.Forms.TreeNode("技术区"),
																																																																																		 new System.Windows.Forms.TreeNode("已解决区"),
																																																																																		 new System.Windows.Forms.TreeNode("精华区")}),
																																																														new System.Windows.Forms.TreeNode("Linux", new System.Windows.Forms.TreeNode[] {
																																																																																		   new System.Windows.Forms.TreeNode("非技术区"),
																																																																																		   new System.Windows.Forms.TreeNode("技术区"),
																																																																																		   new System.Windows.Forms.TreeNode("已解决区"),
																																																																																		   new System.Windows.Forms.TreeNode("精华区")}),
																																																														new System.Windows.Forms.TreeNode("Apache", new System.Windows.Forms.TreeNode[] {
																																																																																			new System.Windows.Forms.TreeNode("非技术区"),
																																																																																			new System.Windows.Forms.TreeNode("技术区"),
																																																																																			new System.Windows.Forms.TreeNode("已解决区"),
																																																																																			new System.Windows.Forms.TreeNode("精华区")})}),
																																									  new System.Windows.Forms.TreeNode("扩充话题", new System.Windows.Forms.TreeNode[] {
																																																														new System.Windows.Forms.TreeNode("程序人生", new System.Windows.Forms.TreeNode[] {
																																																																																		  new System.Windows.Forms.TreeNode("非技术区"),
																																																																																		  new System.Windows.Forms.TreeNode("技术区"),
																																																																																		  new System.Windows.Forms.TreeNode("已解决区"),
																																																																																		  new System.Windows.Forms.TreeNode("精华区")}),
																																																														new System.Windows.Forms.TreeNode("程序员考试", new System.Windows.Forms.TreeNode[] {
																																																																																		   new System.Windows.Forms.TreeNode("非技术区"),
																																																																																		   new System.Windows.Forms.TreeNode("技术区"),
																																																																																		   new System.Windows.Forms.TreeNode("已解决区"),
																																																																																		   new System.Windows.Forms.TreeNode("精华区")}),
																																																														new System.Windows.Forms.TreeNode("人才热线", new System.Windows.Forms.TreeNode[] {
																																																																																		  new System.Windows.Forms.TreeNode("非技术区"),
																																																																																		  new System.Windows.Forms.TreeNode("技术区"),
																																																																																		  new System.Windows.Forms.TreeNode("已解决区"),
																																																																																		  new System.Windows.Forms.TreeNode("精华区")}),
																																																														new System.Windows.Forms.TreeNode("建议和意见", new System.Windows.Forms.TreeNode[] {
																																																																																		   new System.Windows.Forms.TreeNode("非技术区"),
																																																																																		   new System.Windows.Forms.TreeNode("技术区"),
																																																																																		   new System.Windows.Forms.TreeNode("已解决区"),
																																																																																		   new System.Windows.Forms.TreeNode("精华区")}),
																																																														new System.Windows.Forms.TreeNode("灌水乐园", new System.Windows.Forms.TreeNode[] {
																																																																																		  new System.Windows.Forms.TreeNode("非技术区"),
																																																																																		  new System.Windows.Forms.TreeNode("技术区"),
																																																																																		  new System.Windows.Forms.TreeNode("已解决区"),
																																																																																		  new System.Windows.Forms.TreeNode("精华区")}),
																																																														new System.Windows.Forms.TreeNode("租房信息", new System.Windows.Forms.TreeNode[] {
																																																																																		  new System.Windows.Forms.TreeNode("非技术区"),
																																																																																		  new System.Windows.Forms.TreeNode("技术区"),
																																																																																		  new System.Windows.Forms.TreeNode("已解决区"),
																																																																																		  new System.Windows.Forms.TreeNode("精华区")})})})});
			this.treeView1.SelectedImageIndex = -1;
			this.treeView1.Size = new System.Drawing.Size(152, 427);
			this.treeView1.TabIndex = 1;
			this.treeView1.DoubleClick += new System.EventHandler(this.treeView1_DoubleClick);
			this.treeView1.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.treeView1_AfterSelect);
			// 
			// splitter1
			// 
			this.splitter1.Location = new System.Drawing.Point(152, 0);
			this.splitter1.Name = "splitter1";
			this.splitter1.Size = new System.Drawing.Size(3, 427);
			this.splitter1.TabIndex = 2;
			this.splitter1.TabStop = false;
			// 
			// listView1
			// 
			this.listView1.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
																						this.question,
																						this.poster,
																						this.point,
																						this.replynum,
																						this.replytime});
			this.listView1.Cursor = System.Windows.Forms.Cursors.Hand;
			this.listView1.Dock = System.Windows.Forms.DockStyle.Top;
			this.listView1.FullRowSelect = true;
			this.listView1.Location = new System.Drawing.Point(155, 0);
			this.listView1.Name = "listView1";
			this.listView1.Size = new System.Drawing.Size(693, 160);
			this.listView1.TabIndex = 6;
			this.listView1.View = System.Windows.Forms.View.Details;
			this.listView1.SelectedIndexChanged += new System.EventHandler(this.listView1_SelectedIndexChanged);
			// 
			// question
			// 
			this.question.Text = "问题";
			this.question.Width = 320;
			// 
			// poster
			// 
			this.poster.Text = "发贴人";
			this.poster.Width = 52;
			// 
			// point
			// 
			this.point.Text = "点数";
			this.point.Width = 39;
			// 
			// replynum
			// 
			this.replynum.Text = "回复数";
			this.replynum.Width = 52;
			// 
			// replytime
			// 
			this.replytime.Text = "最后回复时间";
			this.replytime.Width = 125;
			// 
			// splitter2
			// 
			this.splitter2.Dock = System.Windows.Forms.DockStyle.Top;
			this.splitter2.Location = new System.Drawing.Point(155, 160);
			this.splitter2.Name = "splitter2";
			this.splitter2.Size = new System.Drawing.Size(693, 3);
			this.splitter2.TabIndex = 9;
			this.splitter2.TabStop = false;
			// 
			// richTextBox1
			// 
			this.richTextBox1.BackColor = System.Drawing.Color.FromArgb(((System.Byte)(192)), ((System.Byte)(255)), ((System.Byte)(192)));
			this.richTextBox1.Dock = System.Windows.Forms.DockStyle.Fill;
			this.richTextBox1.Location = new System.Drawing.Point(155, 163);
			this.richTextBox1.Name = "richTextBox1";
			this.richTextBox1.ReadOnly = true;
			this.richTextBox1.Size = new System.Drawing.Size(693, 264);
			this.richTextBox1.TabIndex = 10;
			this.richTextBox1.Text = "";
			// 
			// imageList1
			// 
			this.imageList1.ColorDepth = System.Windows.Forms.ColorDepth.Depth8Bit;
			this.imageList1.ImageSize = new System.Drawing.Size(16, 16);
			this.imageList1.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageList1.ImageStream")));
			this.imageList1.TransparentColor = System.Drawing.Color.Transparent;
			// 
			// Form1
			// 
			this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
			this.ClientSize = new System.Drawing.Size(848, 449);
			this.Controls.AddRange(new System.Windows.Forms.Control[] {
																		  this.richTextBox1,
																		  this.splitter2,
																		  this.listView1,
																		  this.splitter1,
																		  this.treeView1,
																		  this.statusBar1});
			this.Menu = this.mainMenu1;
			this.Name = "Form1";
			this.Text = "CSDN助手.Net";
			this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
			this.Closing += new System.ComponentModel.CancelEventHandler(this.Form1_Closing);
			((System.ComponentModel.ISupportInitialize)(this.statusBarPanel1)).EndInit();
			((System.ComponentModel.ISupportInitialize)(this.statusBarPanel2)).EndInit();
			this.ResumeLayout(false);

		}
		#endregion

		/// <summary>
		/// 应用程序的主入口点。
		/// </summary>
		[STAThread]
		static void Main() 
		{
			Application.Run(new Form1());
		}

		private void menuItem2_Click(object sender, System.EventArgs e)
		{
			Close();
		}

		private void ShowTopic()
		{
			int Index = this.listViewIndex;
			string buff = "";
			try
			{
				Topic topic = core.GetTopic(topicid);
				if(topic != null)
				{
					string text = "";

					text += "主题:";
					text += topic.TopicName;
					text += "\n所属论坛:";
					text += topic.RoomName;
					text += "    发贴时间:";
					text += topic.PostDateTime.ToString();
					text += "\n发贴人:";
					text += topic.TopicPoster.PostUserName;
					text += "(";
					text += topic.TopicPoster.PostUserNickName;
					text += ")";
					text += "    级别:";
					text += topic.TopicPoster.Rank;
					text += "    信誉度:";
					text += topic.TopicPoster.Credit.ToString();
					buff += text;

					buff += "\n内容:\n";
					buff += topic.Content;

					for(int i = 0; i < topic.ReplyIndex.Length; i++)
					{
				
						buff += "\n----------------------------------------------------------------------------------------------\n";
						buff += "\n回复人:";
						buff += topic.ReplyIndex[i].ReplyPoster.PostUserName;
						buff += "(";
						buff += topic.ReplyIndex[i].ReplyPoster.PostUserNickName;
						buff += ")";
						buff += "    级别:";
						buff += topic.ReplyIndex[i].ReplyPoster.Rank;
						buff += "    信誉度:";
						buff += topic.ReplyIndex[i].ReplyPoster.Credit.ToString();
						buff += "\n回复时间:";
						buff += topic.ReplyIndex[i].PostDateTime.ToString();
						buff += "\n内容:\n";
						buff += topic.ReplyIndex[i].Content;
					}
					this.richTextBox1.Text = buff;
					this.listView1.Items[Index].ImageIndex = 0;
				}
				else
				{
					buff = "该帖子已经被损坏";
					this.richTextBox1.Text = buff;
					this.listView1.Items[Index].ImageIndex = 3;
				}
			}
			catch
			{
				statusBar1.Text = "网络连接不成功,请确定您已经连上Internet网络!";
				this.richTextBox1.Text = "请看状态栏!";
			}
			

⌨️ 快捷键说明

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