📄 knowledgedetailform.cs
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using CallCenter.BusinessInterfaces.BaseForms.Models;
using CallCenter.BusinessInterfaces;
using CallCenter.BusinessLayer;
using CallCenter.Modules;
namespace CallCenter.BusinessInterfaces.BaseForms {
/// <summary>
/// KnowledgeDetailForm 的摘要说明。
/// author:yanqingxi
/// </summary>
public class KnowledgeDetailForm : System.Windows.Forms.Form {
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label13;
private string m_ktype = string.Empty;
private KnowledgeInfo m_KnowledgeInfo =null;
private System.Windows.Forms.RichTextBox tbKcontent;
private DevExpress.XtraEditors.PanelControl panelControl1;
private DevExpress.XtraEditors.TextEdit txtktitle;
private DevExpress.XtraEditors.TextEdit txtkkeywords;
private DevExpress.XtraEditors.SimpleButton btnClose;
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.Container components = null;
#region properties
public string KType{
set{
this.m_ktype = value;
}
get{
return this.m_ktype;
}
}
#endregion
public KnowledgeDetailForm() {
//
// Windows 窗体设计器支持所必需的
//
InitializeComponent();
//
// TODO: 在 InitializeComponent 调用后添加任何构造函数代码
//
}
public KnowledgeDetailForm(KnowledgeInfo KInfo):this(){
this.m_KnowledgeInfo = KInfo;
DownLoadKnowledgeInfo();
}
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
protected override void Dispose( bool disposing ) {
if( disposing ) {
if(components != null) {
components.Dispose();
}
}
base.Dispose( disposing );
}
#region Windows 窗体设计器生成的代码
/// <summary>
/// 设计器支持所需的方法 - 不要使用代码编辑器修改
/// 此方法的内容。
/// </summary>
private void InitializeComponent() {
this.label3 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.label13 = new System.Windows.Forms.Label();
this.tbKcontent = new System.Windows.Forms.RichTextBox();
this.panelControl1 = new DevExpress.XtraEditors.PanelControl();
this.txtktitle = new DevExpress.XtraEditors.TextEdit();
this.txtkkeywords = new DevExpress.XtraEditors.TextEdit();
this.btnClose = new DevExpress.XtraEditors.SimpleButton();
((System.ComponentModel.ISupportInitialize)(this.panelControl1)).BeginInit();
this.panelControl1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.txtktitle.Properties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.txtkkeywords.Properties)).BeginInit();
this.SuspendLayout();
//
// label3
//
this.label3.BackColor = System.Drawing.Color.Transparent;
this.label3.Location = new System.Drawing.Point(88, 48);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(80, 23);
this.label3.TabIndex = 32;
this.label3.Text = "关 键 字";
this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// label1
//
this.label1.BackColor = System.Drawing.Color.Transparent;
this.label1.Location = new System.Drawing.Point(88, 16);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(80, 23);
this.label1.TabIndex = 30;
this.label1.Text = "知识标题";
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// label13
//
this.label13.BackColor = System.Drawing.Color.Transparent;
this.label13.Location = new System.Drawing.Point(16, 224);
this.label13.Name = "label13";
this.label13.TabIndex = 55;
this.label13.Text = "知识内容";
//
// tbKcontent
//
this.tbKcontent.BackColor = System.Drawing.Color.White;
this.tbKcontent.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.tbKcontent.Location = new System.Drawing.Point(104, 80);
this.tbKcontent.Name = "tbKcontent";
this.tbKcontent.Size = new System.Drawing.Size(688, 512);
this.tbKcontent.TabIndex = 58;
this.tbKcontent.Text = "";
//
// panelControl1
//
this.panelControl1.Controls.Add(this.btnClose);
this.panelControl1.Dock = System.Windows.Forms.DockStyle.Fill;
this.panelControl1.Location = new System.Drawing.Point(0, 0);
this.panelControl1.Name = "panelControl1";
this.panelControl1.Size = new System.Drawing.Size(806, 635);
this.panelControl1.TabIndex = 59;
this.panelControl1.Text = "panelControl1";
//
// txtktitle
//
this.txtktitle.EditValue = "";
this.txtktitle.Location = new System.Drawing.Point(168, 16);
this.txtktitle.Name = "txtktitle";
//
// txtktitle.Properties
//
this.txtktitle.Properties.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.Default;
this.txtktitle.Size = new System.Drawing.Size(512, 21);
this.txtktitle.TabIndex = 0;
//
// txtkkeywords
//
this.txtkkeywords.EditValue = "";
this.txtkkeywords.Location = new System.Drawing.Point(168, 49);
this.txtkkeywords.Name = "txtkkeywords";
//
// txtkkeywords.Properties
//
this.txtkkeywords.Properties.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.Default;
this.txtkkeywords.Size = new System.Drawing.Size(512, 21);
this.txtkkeywords.TabIndex = 1;
//
// btnClose
//
this.btnClose.Location = new System.Drawing.Point(672, 600);
this.btnClose.Name = "btnClose";
this.btnClose.TabIndex = 0;
this.btnClose.Text = "关闭";
this.btnClose.Click += new System.EventHandler(this.btnClose_Click);
//
// KnowledgeDetailForm
//
this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
this.BackColor = System.Drawing.Color.FromArgb(((System.Byte)(131)), ((System.Byte)(194)), ((System.Byte)(231)));
this.ClientSize = new System.Drawing.Size(806, 635);
this.panelControl1.Controls.Add(this.txtktitle);
this.panelControl1.Controls.Add(this.txtkkeywords);
this.panelControl1.Controls.Add(this.tbKcontent);
this.panelControl1.Controls.Add(this.label3);
this.panelControl1.Controls.Add(this.label1);
this.panelControl1.Controls.Add(this.label13);
this.Controls.Add(this.panelControl1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Fixed3D;
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "KnowledgeDetailForm";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "知识信息明细";
((System.ComponentModel.ISupportInitialize)(this.panelControl1)).EndInit();
this.panelControl1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.txtktitle.Properties)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.txtkkeywords.Properties)).EndInit();
this.ResumeLayout(false);
}
#endregion
private void DownLoadKnowledgeInfo(){
if(m_KnowledgeInfo!=null){
//this.txtktype.Text=KType;
this.txtktitle.Text = m_KnowledgeInfo.ktitle;
this.txtkkeywords.Text=m_KnowledgeInfo.kkeywords;
this.tbKcontent.Rtf=m_KnowledgeInfo.kcontent;
//this.txtkwid.Text=m_KnowledgeInfo.kwid;
//this.txtkwname.Text=m_KnowledgeInfo.kwname;
//this.txtkwdate.Text=m_KnowledgeInfo.kwdate;
//this.Cboamark = m_KnowledgeInfo.oamark;
//this.txtkaid.Text=m_KnowledgeInfo.kaid;
//this.txtkaname.Text=m_KnowledgeInfo.kaname;
//this.txtoamount.Text=m_KnowledgeInfo.oamount.ToString();
//this.txtiamount.Text=m_KnowledgeInfo.iamount.ToString();
//this.txtcamount.Text=m_KnowledgeInfo.camount.ToString();
}
}
private void btnClose_Click(object sender, System.EventArgs e) {
this.Close();
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -