www.pudn.com > netCS.rar > sysmain.cs
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.Data.SqlClient;
namespace netCS
{
///
/// sysmain 的摘要说明。
///
public class sysmain : System.Windows.Forms.Form
{
private System.Windows.Forms.TabControl tabControl1;
private System.Windows.Forms.TabPage tabPage1;
private System.Windows.Forms.TabPage tabPage2;
private System.Windows.Forms.TabPage tabPage3;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Button button3;
private System.Windows.Forms.Button button4;
private System.Windows.Forms.ListBox listBox3;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.ListBox listBox4;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.TextBox textBox1;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.TabPage tabPage4;
private System.Windows.Forms.Button button2;
private System.Windows.Forms.DataGrid dataGrid1;
private System.Windows.Forms.DataGridTableStyle dataGridTableStyle2;
private System.Windows.Forms.DataGridTextBoxColumn dataGridTextBoxColumn1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.TextBox textBox2;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.TextBox textBox3;
private System.Windows.Forms.Button button5;
private System.Windows.Forms.Button button6;
private System.Windows.Forms.Button button7;
private System.Windows.Forms.Button button8;
private System.Windows.Forms.Label label8;
private System.Windows.Forms.Label label9;
private System.Windows.Forms.TextBox textBox4;
private System.Windows.Forms.Label label10;
private System.Windows.Forms.Button button9;
private System.Windows.Forms.ComboBox comboBox1;
private System.Windows.Forms.Label label11;
private System.Windows.Forms.TextBox textBox5;
private System.Windows.Forms.Button button10;
private System.Windows.Forms.TextBox textBox6;
private System.Windows.Forms.Label label12;
private System.Windows.Forms.Button button11;
private System.Windows.Forms.Label label13;
private System.Windows.Forms.Label label14;
private System.Windows.Forms.DataGrid dataGrid2;
private System.Windows.Forms.Label label15;
private System.Windows.Forms.DataGrid dataGrid3;
private System.Windows.Forms.PictureBox pictureBox1;
private System.Windows.Forms.Button button12;
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.Label label16;
private System.Windows.Forms.ComboBox comboBox2;
private System.Windows.Forms.ListBox listBox1;
private System.Windows.Forms.Label label17;
private System.Windows.Forms.Label label18;
private System.Windows.Forms.TextBox textBox7;
private System.Windows.Forms.Button button13;
private System.Windows.Forms.ListBox listBox2;
private System.Windows.Forms.ListBox listBox5;
private System.Windows.Forms.Button button14;
private System.Windows.Forms.Button button15;
private System.Windows.Forms.Label label19;
private System.Windows.Forms.ListBox listBox6;
private System.Windows.Forms.Label label20;
private System.Windows.Forms.TextBox textBox8;
private System.Windows.Forms.GroupBox groupBox2;
private System.Windows.Forms.Button button16;
private System.Windows.Forms.Label label21;
private System.Windows.Forms.TextBox textBox9;
private System.Windows.Forms.ListBox listBox7;
private System.Windows.Forms.Label label22;
private System.Windows.Forms.TextBox textBox10;
private System.Windows.Forms.Button button17;
private System.Windows.Forms.ComboBox comboBox3;
private System.Windows.Forms.Button button18;
private System.Windows.Forms.GroupBox groupBox3;
private System.Windows.Forms.Label label23;
private System.Windows.Forms.ComboBox comboBox4;
private System.Windows.Forms.Button button19;
///
/// 必需的设计器变量。
///
private System.ComponentModel.Container components = null;
public sysmain()
{
//
// Windows 窗体设计器支持所必需的
//
InitializeComponent();
SqlConnection cn=new SqlConnection(conn.con);
SqlCommand com=new SqlCommand("select * from fact where factpos=0",cn);
SqlCommand comt=new SqlCommand("select * from fact",cn);
SqlCommand comtt=new SqlCommand("select * from rules",cn);
SqlCommand com2=new SqlCommand("select distinct ruleno from rules",cn);
SqlCommand com3=new SqlCommand("select * from fact where factpos=1",cn);
SqlDataAdapter adp=new SqlDataAdapter(com);
DataTable dt=new DataTable("mydt");
adp.Fill(dt);
adp.SelectCommand=comt;
DataTable dtt=new DataTable("mydt1");
adp.Fill(dtt);
adp.SelectCommand=comtt;
DataTable dttt=new DataTable("mydt2");
adp.Fill(dttt);
adp.SelectCommand=com2;
DataTable dt1=new DataTable("mydt3");
adp.Fill(dt1);
adp.SelectCommand=com3;
DataTable dt2=new DataTable("mydt4");
adp.Fill(dt2);
int i;
for(i=0;i
/// 清理所有正在使用的资源。
///
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#region Windows Form Designer generated code
///
/// 设计器支持所需的方法 - 不要使用代码编辑器修改
/// 此方法的内容。
///
private void InitializeComponent()
{
this.tabControl1 = new System.Windows.Forms.TabControl();
this.tabPage1 = new System.Windows.Forms.TabPage();
this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.button2 = new System.Windows.Forms.Button();
this.label1 = new System.Windows.Forms.Label();
this.tabPage2 = new System.Windows.Forms.TabPage();
this.textBox1 = new System.Windows.Forms.TextBox();
this.button1 = new System.Windows.Forms.Button();
this.label4 = new System.Windows.Forms.Label();
this.button3 = new System.Windows.Forms.Button();
this.button4 = new System.Windows.Forms.Button();
this.listBox3 = new System.Windows.Forms.ListBox();
this.label5 = new System.Windows.Forms.Label();
this.label6 = new System.Windows.Forms.Label();
this.listBox4 = new System.Windows.Forms.ListBox();
this.tabPage3 = new System.Windows.Forms.TabPage();
this.button11 = new System.Windows.Forms.Button();
this.label12 = new System.Windows.Forms.Label();
this.textBox6 = new System.Windows.Forms.TextBox();
this.button10 = new System.Windows.Forms.Button();
this.textBox5 = new System.Windows.Forms.TextBox();
this.label11 = new System.Windows.Forms.Label();
this.comboBox1 = new System.Windows.Forms.ComboBox();
this.button9 = new System.Windows.Forms.Button();
this.label10 = new System.Windows.Forms.Label();
this.textBox4 = new System.Windows.Forms.TextBox();
this.label9 = new System.Windows.Forms.Label();
this.label8 = new System.Windows.Forms.Label();
this.button8 = new System.Windows.Forms.Button();
this.button7 = new System.Windows.Forms.Button();
this.button6 = new System.Windows.Forms.Button();
this.button5 = new System.Windows.Forms.Button();
this.textBox3 = new System.Windows.Forms.TextBox();
this.label7 = new System.Windows.Forms.Label();
this.textBox2 = new System.Windows.Forms.TextBox();
this.label3 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.dataGrid1 = new System.Windows.Forms.DataGrid();
this.dataGridTableStyle2 = new System.Windows.Forms.DataGridTableStyle();
this.dataGridTextBoxColumn1 = new System.Windows.Forms.DataGridTextBoxColumn();
this.tabPage4 = new System.Windows.Forms.TabPage();
this.groupBox3 = new System.Windows.Forms.GroupBox();
this.button19 = new System.Windows.Forms.Button();
this.comboBox4 = new System.Windows.Forms.ComboBox();
this.label23 = new System.Windows.Forms.Label();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.button18 = new System.Windows.Forms.Button();
this.comboBox3 = new System.Windows.Forms.ComboBox();
this.button17 = new System.Windows.Forms.Button();
this.textBox10 = new System.Windows.Forms.TextBox();
this.label22 = new System.Windows.Forms.Label();
this.listBox7 = new System.Windows.Forms.ListBox();
this.textBox9 = new System.Windows.Forms.TextBox();
this.label21 = new System.Windows.Forms.Label();
this.button16 = new System.Windows.Forms.Button();
this.button15 = new System.Windows.Forms.Button();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.textBox8 = new System.Windows.Forms.TextBox();
this.label20 = new System.Windows.Forms.Label();
this.listBox6 = new System.Windows.Forms.ListBox();
this.label19 = new System.Windows.Forms.Label();
this.button14 = new System.Windows.Forms.Button();
this.listBox5 = new System.Windows.Forms.ListBox();
this.listBox2 = new System.Windows.Forms.ListBox();
this.button13 = new System.Windows.Forms.Button();
this.textBox7 = new System.Windows.Forms.TextBox();
this.label18 = new System.Windows.Forms.Label();
this.label17 = new System.Windows.Forms.Label();
this.listBox1 = new System.Windows.Forms.ListBox();
this.comboBox2 = new System.Windows.Forms.ComboBox();
this.label16 = new System.Windows.Forms.Label();
this.button12 = new System.Windows.Forms.Button();
this.dataGrid3 = new System.Windows.Forms.DataGrid();
this.label15 = new System.Windows.Forms.Label();
this.dataGrid2 = new System.Windows.Forms.DataGrid();
this.label14 = new System.Windows.Forms.Label();
this.label13 = new System.Windows.Forms.Label();
this.tabControl1.SuspendLayout();
this.tabPage1.SuspendLayout();
this.tabPage2.SuspendLayout();
this.tabPage3.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dataGrid1)).BeginInit();
this.tabPage4.SuspendLayout();
this.groupBox3.SuspendLayout();
this.groupBox2.SuspendLayout();
this.groupBox1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dataGrid3)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.dataGrid2)).BeginInit();
this.SuspendLayout();
//
// tabControl1
//
this.tabControl1.Controls.AddRange(new System.Windows.Forms.Control[] {
this.tabPage1,
this.tabPage2,
this.tabPage3,
this.tabPage4});
this.tabControl1.Location = new System.Drawing.Point(0, 8);
this.tabControl1.Name = "tabControl1";
this.tabControl1.SelectedIndex = 0;
this.tabControl1.Size = new System.Drawing.Size(816, 712);
this.tabControl1.TabIndex = 0;
//
// tabPage1
//
this.tabPage1.Controls.AddRange(new System.Windows.Forms.Control[] {
this.pictureBox1,
this.button2,
this.label1});
this.tabPage1.Font = new System.Drawing.Font("宋体", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.tabPage1.Location = new System.Drawing.Point(4, 21);
this.tabPage1.Name = "tabPage1";
this.tabPage1.Size = new System.Drawing.Size(808, 687);
this.tabPage1.TabIndex = 0;
this.tabPage1.Text = "欢迎界面";
//
// pictureBox1
//
this.pictureBox1.Location = new System.Drawing.Point(8, 56);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(752, 376);
this.pictureBox1.TabIndex = 2;
this.pictureBox1.TabStop = false;
//
// button2
//
this.button2.Location = new System.Drawing.Point(344, 8);
this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(152, 32);
this.button2.TabIndex = 1;
this.button2.Text = "波形显示界面";
//
// label1
//
this.label1.Font = new System.Drawing.Font("楷体_GB2312", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.label1.Location = new System.Drawing.Point(8, 8);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(336, 48);
this.label1.TabIndex = 0;
this.label1.Text = "欢迎进入故障诊断专家系统";
//
// tabPage2
//
this.tabPage2.Controls.AddRange(new System.Windows.Forms.Control[] {
this.textBox1,
this.button1,
this.label4,
this.button3,
this.button4,
this.listBox3,
this.label5,
this.label6,
this.listBox4});
this.tabPage2.Location = new System.Drawing.Point(4, 21);
this.tabPage2.Name = "tabPage2";
this.tabPage2.Size = new System.Drawing.Size(808, 687);
this.tabPage2.TabIndex = 1;
this.tabPage2.Text = "正向推理";
this.tabPage2.Click += new System.EventHandler(this.tabPage2_Click);
//
// textBox1
//
this.textBox1.BackColor = System.Drawing.SystemColors.InactiveCaptionText;
this.textBox1.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.textBox1.Location = new System.Drawing.Point(112, 408);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(400, 14);
this.textBox1.TabIndex = 16;
this.textBox1.Text = "textBox1";
//
// button1
//
this.button1.Location = new System.Drawing.Point(536, 416);
this.button1.Name = "button1";
this.button1.TabIndex = 15;
this.button1.Text = "数据刷新";
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// label4
//
this.label4.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.label4.Location = new System.Drawing.Point(16, 400);
this.label4.Name = "label4";
this.label4.TabIndex = 14;
this.label4.Text = "推理结果:";
//
// button3
//
this.button3.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.button3.Location = new System.Drawing.Point(536, 480);
this.button3.Name = "button3";
this.button3.TabIndex = 13;
this.button3.Text = "退出";
this.button3.Click += new System.EventHandler(this.button3_Click);
//
// button4
//
this.button4.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.button4.Location = new System.Drawing.Point(536, 448);
this.button4.Name = "button4";
this.button4.TabIndex = 12;
this.button4.Text = "推理";
this.button4.Click += new System.EventHandler(this.button4_Click_1);
//
// listBox3
//
this.listBox3.ItemHeight = 12;
this.listBox3.Location = new System.Drawing.Point(16, 424);
this.listBox3.Name = "listBox3";
this.listBox3.Size = new System.Drawing.Size(504, 112);
this.listBox3.TabIndex = 11;
//
// label5
//
this.label5.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.label5.Location = new System.Drawing.Point(8, 56);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(120, 23);
this.label5.TabIndex = 10;
this.label5.Text = "选择前提:";
//
// label6
//
this.label6.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.label6.Location = new System.Drawing.Point(8, 8);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(272, 40);
this.label6.TabIndex = 9;
this.label6.Text = "正向推理界面";
//
// listBox4
//
this.listBox4.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.listBox4.ItemHeight = 14;
this.listBox4.Location = new System.Drawing.Point(8, 88);
this.listBox4.Name = "listBox4";
this.listBox4.SelectionMode = System.Windows.Forms.SelectionMode.MultiSimple;
this.listBox4.Size = new System.Drawing.Size(584, 298);
this.listBox4.TabIndex = 8;
//
// tabPage3
//
this.tabPage3.Controls.AddRange(new System.Windows.Forms.Control[] {
this.button11,
this.label12,
this.textBox6,
this.button10,
this.textBox5,
this.label11,
this.comboBox1,
this.button9,
this.label10,
this.textBox4,
this.label9,
this.label8,
this.button8,
this.button7,
this.button6,
this.button5,
this.textBox3,
this.label7,
this.textBox2,
this.label3,
this.label2,
this.dataGrid1});
this.tabPage3.Location = new System.Drawing.Point(4, 21);
this.tabPage3.Name = "tabPage3";
this.tabPage3.Size = new System.Drawing.Size(808, 687);
this.tabPage3.TabIndex = 2;
this.tabPage3.Text = "事实编辑";
//
// button11
//
this.button11.Location = new System.Drawing.Point(96, 176);
this.button11.Name = "button11";
this.button11.TabIndex = 23;
this.button11.Text = "刷新列表";
this.button11.Click += new System.EventHandler(this.button11_Click);
//
// label12
//
this.label12.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.label12.Location = new System.Drawing.Point(8, 176);
this.label12.Name = "label12";
this.label12.Size = new System.Drawing.Size(80, 23);
this.label12.TabIndex = 22;
this.label12.Text = "事实列表:";
//
// textBox6
//
this.textBox6.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.textBox6.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.textBox6.Location = new System.Drawing.Point(520, 152);
this.textBox6.Name = "textBox6";
this.textBox6.TabIndex = 21;
this.textBox6.Text = "textBox6";
//
// button10
//
this.button10.Location = new System.Drawing.Point(432, 144);
this.button10.Name = "button10";
this.button10.TabIndex = 20;
this.button10.Text = "查找";
this.button10.Click += new System.EventHandler(this.button10_Click);
//
// textBox5
//
this.textBox5.Location = new System.Drawing.Point(192, 144);
this.textBox5.Name = "textBox5";
this.textBox5.Size = new System.Drawing.Size(224, 21);
this.textBox5.TabIndex = 19;
this.textBox5.Text = "textBox5";
//
// label11
//
this.label11.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.label11.Location = new System.Drawing.Point(8, 144);
this.label11.Name = "label11";
this.label11.Size = new System.Drawing.Size(184, 23);
this.label11.TabIndex = 18;
this.label11.Text = "模糊查找您要编辑的事实: ";
//
// comboBox1
//
this.comboBox1.Location = new System.Drawing.Point(184, 112);
this.comboBox1.Name = "comboBox1";
this.comboBox1.Size = new System.Drawing.Size(56, 20);
this.comboBox1.TabIndex = 17;
this.comboBox1.Text = "comboBox1";
//
// button9
//
this.button9.Location = new System.Drawing.Point(248, 112);
this.button9.Name = "button9";
this.button9.TabIndex = 15;
this.button9.Text = "显示";
this.button9.Click += new System.EventHandler(this.button9_Click);
//
// label10
//
this.label10.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.label10.Location = new System.Drawing.Point(8, 112);
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(184, 23);
this.label10.TabIndex = 13;
this.label10.Text = "请选择您要编辑的事实号:";
//
// textBox4
//
this.textBox4.Location = new System.Drawing.Point(88, 80);
this.textBox4.Name = "textBox4";
this.textBox4.Size = new System.Drawing.Size(512, 21);
this.textBox4.TabIndex = 12;
this.textBox4.Text = "textBox4";
//
// label9
//
this.label9.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.label9.Location = new System.Drawing.Point(8, 80);
this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(80, 23);
this.label9.TabIndex = 11;
this.label9.Text = "事实内容:";
//
// label8
//
this.label8.Location = new System.Drawing.Point(536, 16);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(216, 23);
this.label8.TabIndex = 10;
this.label8.Text = "注:删除操作将对规则表进行相应修改";
//
// button8
//
this.button8.Location = new System.Drawing.Point(680, 48);
this.button8.Name = "button8";
this.button8.TabIndex = 9;
this.button8.Text = "删除";
this.button8.Click += new System.EventHandler(this.button8_Click);
//
// button7
//
this.button7.Location = new System.Drawing.Point(600, 48);
this.button7.Name = "button7";
this.button7.TabIndex = 8;
this.button7.Text = "插入";
this.button7.Click += new System.EventHandler(this.button7_Click);
//
// button6
//
this.button6.Location = new System.Drawing.Point(520, 48);
this.button6.Name = "button6";
this.button6.TabIndex = 7;
this.button6.Text = "编辑";
this.button6.Click += new System.EventHandler(this.button6_Click);
//
// button5
//
this.button5.Location = new System.Drawing.Point(440, 48);
this.button5.Name = "button5";
this.button5.TabIndex = 6;
this.button5.Text = "修改";
this.button5.Click += new System.EventHandler(this.button5_Click);
//
// textBox3
//
this.textBox3.Location = new System.Drawing.Point(368, 48);
this.textBox3.Name = "textBox3";
this.textBox3.Size = new System.Drawing.Size(64, 21);
this.textBox3.TabIndex = 5;
this.textBox3.Text = "textBox3";
//
// label7
//
this.label7.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.label7.Location = new System.Drawing.Point(144, 48);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(224, 23);
this.label7.TabIndex = 4;
this.label7.Text = "事实类型(0为前提,1为结论):";
//
// textBox2
//
this.textBox2.Location = new System.Drawing.Point(72, 48);
this.textBox2.Name = "textBox2";
this.textBox2.Size = new System.Drawing.Size(64, 21);
this.textBox2.TabIndex = 3;
this.textBox2.Text = "textBox2";
//
// label3
//
this.label3.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.label3.Location = new System.Drawing.Point(8, 48);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(64, 23);
this.label3.TabIndex = 2;
this.label3.Text = "事实号:";
//
// label2
//
this.label2.Font = new System.Drawing.Font("楷体_GB2312", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.label2.Location = new System.Drawing.Point(8, 8);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(232, 32);
this.label2.TabIndex = 1;
this.label2.Text = "事实编辑页面";
//
// dataGrid1
//
this.dataGrid1.DataMember = "";
this.dataGrid1.HeaderForeColor = System.Drawing.SystemColors.ControlText;
this.dataGrid1.Location = new System.Drawing.Point(8, 208);
this.dataGrid1.Name = "dataGrid1";
this.dataGrid1.Size = new System.Drawing.Size(664, 440);
this.dataGrid1.TabIndex = 0;
this.dataGrid1.TableStyles.AddRange(new System.Windows.Forms.DataGridTableStyle[] {
this.dataGridTableStyle2});
//
// dataGridTableStyle2
//
this.dataGridTableStyle2.DataGrid = this.dataGrid1;
this.dataGridTableStyle2.GridColumnStyles.AddRange(new System.Windows.Forms.DataGridColumnStyle[] {
this.dataGridTextBoxColumn1});
this.dataGridTableStyle2.HeaderForeColor = System.Drawing.SystemColors.ControlText;
this.dataGridTableStyle2.MappingName = "";
//
// dataGridTextBoxColumn1
//
this.dataGridTextBoxColumn1.Format = "";
this.dataGridTextBoxColumn1.FormatInfo = null;
this.dataGridTextBoxColumn1.MappingName = "";
this.dataGridTextBoxColumn1.Width = 75;
//
// tabPage4
//
this.tabPage4.Controls.AddRange(new System.Windows.Forms.Control[] {
this.groupBox3,
this.groupBox2,
this.button15,
this.groupBox1,
this.dataGrid3,
this.label15,
this.dataGrid2,
this.label14,
this.label13});
this.tabPage4.Location = new System.Drawing.Point(4, 21);
this.tabPage4.Name = "tabPage4";
this.tabPage4.Size = new System.Drawing.Size(808, 687);
this.tabPage4.TabIndex = 3;
this.tabPage4.Text = "规则编辑";
this.tabPage4.Click += new System.EventHandler(this.tabPage4_Click);
//
// groupBox3
//
this.groupBox3.Controls.AddRange(new System.Windows.Forms.Control[] {
this.button19,
this.comboBox4,
this.label23});
this.groupBox3.Location = new System.Drawing.Point(392, 512);
this.groupBox3.Name = "groupBox3";
this.groupBox3.Size = new System.Drawing.Size(376, 168);
this.groupBox3.TabIndex = 9;
this.groupBox3.TabStop = false;
this.groupBox3.Text = "规则删除:";
//
// button19
//
this.button19.Location = new System.Drawing.Point(288, 128);
this.button19.Name = "button19";
this.button19.TabIndex = 2;
this.button19.Text = "删除";
this.button19.Click += new System.EventHandler(this.button19_Click);
//
// comboBox4
//
this.comboBox4.Location = new System.Drawing.Point(8, 48);
this.comboBox4.Name = "comboBox4";
this.comboBox4.Size = new System.Drawing.Size(104, 20);
this.comboBox4.TabIndex = 1;
this.comboBox4.Text = "comboBox4";
//
// label23
//
this.label23.Location = new System.Drawing.Point(8, 24);
this.label23.Name = "label23";
this.label23.Size = new System.Drawing.Size(128, 23);
this.label23.TabIndex = 0;
this.label23.Text = "确定要删除的规则号:";
//
// groupBox2
//
this.groupBox2.Controls.AddRange(new System.Windows.Forms.Control[] {
this.button18,
this.comboBox3,
this.button17,
this.textBox10,
this.label22,
this.listBox7,
this.textBox9,
this.label21,
this.button16});
this.groupBox2.Location = new System.Drawing.Point(8, 504);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(376, 176);
this.groupBox2.TabIndex = 8;
this.groupBox2.TabStop = false;
this.groupBox2.Text = "规则插入:";
//
// button18
//
this.button18.Location = new System.Drawing.Point(288, 144);
this.button18.Name = "button18";
this.button18.TabIndex = 8;
this.button18.Text = "插入";
this.button18.Click += new System.EventHandler(this.button18_Click);
//
// comboBox3
//
this.comboBox3.ItemHeight = 12;
this.comboBox3.Location = new System.Drawing.Point(152, 80);
this.comboBox3.Name = "comboBox3";
this.comboBox3.Size = new System.Drawing.Size(80, 20);
this.comboBox3.TabIndex = 7;
this.comboBox3.Text = "comboBox3";
//
// button17
//
this.button17.Location = new System.Drawing.Point(152, 48);
this.button17.Name = "button17";
this.button17.TabIndex = 6;
this.button17.Text = "选择结论";
//
// textBox10
//
this.textBox10.Location = new System.Drawing.Point(232, 24);
this.textBox10.Name = "textBox10";
this.textBox10.Size = new System.Drawing.Size(64, 21);
this.textBox10.TabIndex = 5;
this.textBox10.Text = "textBox10";
//
// label22
//
this.label22.Location = new System.Drawing.Point(160, 24);
this.label22.Name = "label22";
this.label22.Size = new System.Drawing.Size(64, 23);
this.label22.TabIndex = 4;
this.label22.Text = "可信度:";
//
// listBox7
//
this.listBox7.ItemHeight = 12;
this.listBox7.Location = new System.Drawing.Point(8, 80);
this.listBox7.Name = "listBox7";
this.listBox7.SelectionMode = System.Windows.Forms.SelectionMode.MultiSimple;
this.listBox7.Size = new System.Drawing.Size(120, 88);
this.listBox7.TabIndex = 3;
//
// textBox9
//
this.textBox9.Location = new System.Drawing.Point(72, 24);
this.textBox9.Name = "textBox9";
this.textBox9.Size = new System.Drawing.Size(72, 21);
this.textBox9.TabIndex = 2;
this.textBox9.Text = "textBox9";
//
// label21
//
this.label21.Location = new System.Drawing.Point(16, 24);
this.label21.Name = "label21";
this.label21.Size = new System.Drawing.Size(56, 23);
this.label21.TabIndex = 1;
this.label21.Text = "规则号:";
//
// button16
//
this.button16.Location = new System.Drawing.Point(8, 48);
this.button16.Name = "button16";
this.button16.TabIndex = 0;
this.button16.Text = "选择前提 ";
//
// button15
//
this.button15.Location = new System.Drawing.Point(104, 224);
this.button15.Name = "button15";
this.button15.TabIndex = 7;
this.button15.Text = "刷新";
this.button15.Click += new System.EventHandler(this.button15_Click);
//
// groupBox1
//
this.groupBox1.Controls.AddRange(new System.Windows.Forms.Control[] {
this.textBox8,
this.label20,
this.listBox6,
this.label19,
this.button14,
this.listBox5,
this.listBox2,
this.button13,
this.textBox7,
this.label18,
this.label17,
this.listBox1,
this.comboBox2,
this.label16,
this.button12});
this.groupBox1.Location = new System.Drawing.Point(392, 256);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(376, 232);
this.groupBox1.TabIndex = 6;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "规则编辑:";
//
// textBox8
//
this.textBox8.Location = new System.Drawing.Point(144, 200);
this.textBox8.Name = "textBox8";
this.textBox8.TabIndex = 19;
this.textBox8.Text = "textBox8";
//
// label20
//
this.label20.Location = new System.Drawing.Point(144, 176);
this.label20.Name = "label20";
this.label20.Size = new System.Drawing.Size(144, 23);
this.label20.TabIndex = 18;
this.label20.Text = "当前可信度:(可修改)";
//
// listBox6
//
this.listBox6.ItemHeight = 12;
this.listBox6.Location = new System.Drawing.Point(208, 24);
this.listBox6.Name = "listBox6";
this.listBox6.Size = new System.Drawing.Size(72, 16);
this.listBox6.TabIndex = 17;
//
// label19
//
this.label19.Location = new System.Drawing.Point(248, 56);
this.label19.Name = "label19";
this.label19.TabIndex = 16;
this.label19.Text = "新前提号:";
//
// button14
//
this.button14.Location = new System.Drawing.Point(288, 200);
this.button14.Name = "button14";
this.button14.TabIndex = 15;
this.button14.Text = "提交";
this.button14.Click += new System.EventHandler(this.button14_Click);
//
// listBox5
//
this.listBox5.ItemHeight = 12;
this.listBox5.Location = new System.Drawing.Point(248, 80);
this.listBox5.Name = "listBox5";
this.listBox5.Size = new System.Drawing.Size(104, 88);
this.listBox5.TabIndex = 14;
//
// listBox2
//
this.listBox2.ItemHeight = 12;
this.listBox2.Location = new System.Drawing.Point(128, 80);
this.listBox2.Name = "listBox2";
this.listBox2.SelectionMode = System.Windows.Forms.SelectionMode.MultiSimple;
this.listBox2.Size = new System.Drawing.Size(104, 88);
this.listBox2.TabIndex = 13;
//
// button13
//
this.button13.Location = new System.Drawing.Point(128, 48);
this.button13.Name = "button13";
this.button13.Size = new System.Drawing.Size(75, 24);
this.button13.TabIndex = 12;
this.button13.Text = "选择新前提";
this.button13.Click += new System.EventHandler(this.button13_Click);
//
// textBox7
//
this.textBox7.Location = new System.Drawing.Point(8, 200);
this.textBox7.Name = "textBox7";
this.textBox7.TabIndex = 11;
this.textBox7.Text = "textBox7";
//
// label18
//
this.label18.Location = new System.Drawing.Point(8, 176);
this.label18.Name = "label18";
this.label18.Size = new System.Drawing.Size(144, 23);
this.label18.TabIndex = 10;
this.label18.Text = "当前结论号:(可修改)";
//
// label17
//
this.label17.Location = new System.Drawing.Point(8, 56);
this.label17.Name = "label17";
this.label17.TabIndex = 9;
this.label17.Text = "当前前提号:";
//
// listBox1
//
this.listBox1.ItemHeight = 12;
this.listBox1.Location = new System.Drawing.Point(8, 80);
this.listBox1.Name = "listBox1";
this.listBox1.Size = new System.Drawing.Size(104, 88);
this.listBox1.TabIndex = 8;
//
// comboBox2
//
this.comboBox2.Location = new System.Drawing.Point(80, 24);
this.comboBox2.Name = "comboBox2";
this.comboBox2.Size = new System.Drawing.Size(121, 20);
this.comboBox2.TabIndex = 7;
this.comboBox2.Text = "comboBox2";
//
// label16
//
this.label16.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.label16.Location = new System.Drawing.Point(8, 24);
this.label16.Name = "label16";
this.label16.Size = new System.Drawing.Size(72, 23);
this.label16.TabIndex = 6;
this.label16.Text = "现有规则:";
//
// button12
//
this.button12.Location = new System.Drawing.Point(296, 24);
this.button12.Name = "button12";
this.button12.TabIndex = 5;
this.button12.Text = "选择规则号";
this.button12.Click += new System.EventHandler(this.button12_Click);
//
// dataGrid3
//
this.dataGrid3.AllowDrop = true;
this.dataGrid3.DataMember = "";
this.dataGrid3.HeaderForeColor = System.Drawing.SystemColors.ControlText;
this.dataGrid3.Location = new System.Drawing.Point(8, 256);
this.dataGrid3.Name = "dataGrid3";
this.dataGrid3.Size = new System.Drawing.Size(376, 232);
this.dataGrid3.TabIndex = 4;
//
// label15
//
this.label15.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.label15.Location = new System.Drawing.Point(8, 224);
this.label15.Name = "label15";
this.label15.Size = new System.Drawing.Size(96, 23);
this.label15.TabIndex = 3;
this.label15.Text = "规则表内容:";
//
// dataGrid2
//
this.dataGrid2.DataMember = "";
this.dataGrid2.HeaderForeColor = System.Drawing.SystemColors.ControlText;
this.dataGrid2.Location = new System.Drawing.Point(8, 88);
this.dataGrid2.Name = "dataGrid2";
this.dataGrid2.Size = new System.Drawing.Size(624, 136);
this.dataGrid2.TabIndex = 2;
//
// label14
//
this.label14.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.label14.Location = new System.Drawing.Point(8, 48);
this.label14.Name = "label14";
this.label14.Size = new System.Drawing.Size(120, 23);
this.label14.TabIndex = 1;
this.label14.Text = "事实表内容参考:";
//
// label13
//
this.label13.Font = new System.Drawing.Font("楷体_GB2312", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.label13.Location = new System.Drawing.Point(8, 8);
this.label13.Name = "label13";
this.label13.Size = new System.Drawing.Size(184, 32);
this.label13.TabIndex = 0;
this.label13.Text = "规则编辑页面";
//
// sysmain
//
this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
this.ClientSize = new System.Drawing.Size(776, 717);
this.Controls.AddRange(new System.Windows.Forms.Control[] {
this.tabControl1});
this.Name = "sysmain";
this.Text = "sysmain";
this.tabControl1.ResumeLayout(false);
this.tabPage1.ResumeLayout(false);
this.tabPage2.ResumeLayout(false);
this.tabPage3.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.dataGrid1)).EndInit();
this.tabPage4.ResumeLayout(false);
this.groupBox3.ResumeLayout(false);
this.groupBox2.ResumeLayout(false);
this.groupBox1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.dataGrid3)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.dataGrid2)).EndInit();
this.ResumeLayout(false);
}
#endregion
private void tabPage1_Click(object sender, System.EventArgs e)
{
}
private void tabControl1_SelectedIndexChanged(object sender, System.EventArgs e)
{
}
private void tabPage2_Click(object sender, System.EventArgs e)
{
}
private void button4_Click_1(object sender, System.EventArgs e)
{
listBox3.Items.Clear();
int j;
SqlConnection cn1=new SqlConnection(conn.con);
if(listBox4.SelectedItems.Count!=0)
{
for(j=0;j