FormTestInit.cs
上传用户:zhangkuixh
上传日期:2013-09-30
资源大小:5473k
文件大小:3k
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Text;
- using System.Windows.Forms;
- using System.Collections;
- namespace XunLong.HTMLMODEL.TEST
- {
- /*
- ' 迅龙中文分类搜索引擎 v0.6
- '
- ' LGPL 许可发行
- '
- ' 宁夏大学 张冬 康彩 zd4004@163.com
- '
- ' 官网 http://blog.163.com/zd4004/
- */
- public partial class FormTestInit : Form
- {
- /// <summary>
- /// 模板匹配类
- /// </summary>
- private XunLong.ModelUserClassLibrary.ClassUserModel mxWeb = new XunLong.ModelUserClassLibrary.ClassUserModel();
- //加载到的模版数据
- ArrayList n;
- public FormTestInit(string DPATH)
- {
- InitializeComponent();
- textBox2.Text = DPATH;
- XunLong.CongifData.Config.InitConfigData(DPATH);
- }
- private void button1_Click(object sender, EventArgs e)
- {
- //button1.Enabled = false;
- int num= mxWeb.init(textBox1.Text);
- n = mxWeb.n;
- listBox1.Items.Clear();
- for (int i = 0; i < n.Count; i++)
- {
- listBox1.Items.Add(i);
- }
- MessageBox.Show("共有模版数量: "+num.ToString());
-
- }
- private void listBox1_SelectedIndexChanged(object sender, EventArgs e)
- {
- if (listBox1.Text == null)
- {
- return;
- }
- if (listBox1.Text == "")
- {
- return;
- }
- button4.Enabled = true;
- int i = Int32.Parse(listBox1.Text);
- XunLong.PublicClassLibrary.kcSearch one = (XunLong.PublicClassLibrary.kcSearch)n[i];
- textBox_a.Text = one.a;
- textBox_b.Text = one.b;
- textBox_c.Text = one.c;
- textBox_d.Text = one.d;
- textBox_e.Text = one.e;
- textBox_h.Text = one.h;
- textBox_t.Text = one.t;
- textBox_s.Text = one.s;
- label5.Text =" * = "+ one.isXnum.ToString();
- }
- private void FormTestInit_Load(object sender, EventArgs e)
- {
- // XunLong.CongifData.Config.InitConfigData("D:\XunLongRUN\xunlong.kc");
- XunLong.CongifData.Config.InitConfigData(textBox2.Text );
- comboBox1.Items.Clear();
- comboBox1.Items.Add(XunLong.CongifData.Config.ModelData);
- comboBox1.Items.Add(XunLong.CongifData.Config.NewModelData);
- comboBox1.Text = XunLong.CongifData.Config.ModelData;
- textBox1.Text = XunLong.CongifData.Config.ModelData;
- }
- private void button4_Click(object sender, EventArgs e)
- {
- if (textBox_d.Text.ToString().Length == 0)
- {
- return;
- }
- FormHTMLMODEL oneIt = new FormHTMLMODEL(textBox2.Text);
- oneIt.InitOne(textBox_a.Text, textBox_b.Text, textBox_c.Text, textBox_d.Text, textBox_e.Text, textBox_t.Text, textBox_h.Text, textBox_s.Text, textBox1.Text);
- //oneIt.ShowDialog();
- oneIt.Show();
- }
- private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
- {
- textBox1.Text = comboBox1.Text;
- }
- }
- }