Пример #1
0
        /// <summary>
        /// 下拉框选项发生改变时触发的事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Cbb_geshi_SelectedIndexChanged(object sender, EventArgs e)
        {
            string str_setting = cbb_geshi.Text;
            var    dic_setting = _mycontroller.GetSetting(str_setting);

            cb_leijiredu.Checked          = Setting._zhengwenchachong = Convert.ToBoolean(dic_setting["正文查重"]);
            cb_shanchu100.Checked         = Setting._shanchu100 = Convert.ToBoolean(dic_setting["删除100"]);
            cbb_zhengwenchachongbiao.Text = Setting._zhengwenchachongbiao = dic_setting["正文查重表"].ToString();
            cb_zhengwenruku.Checked       = Setting._zhengwenruku = Convert.ToBoolean(dic_setting["正文入库"]);
            cbb_zhengwenbiao.Text         = Setting._zhengwenrukubiao = dic_setting["正文入库表"].ToString();
            tb_rizhilujing.Text           = Setting._rizhilujing = dic_setting["日志路径"].ToString();
            Setting._currentformat        = str_setting;
            //添加数据库ucdatabase
            string str_shujukushai = dic_setting["数据库筛"].ToString();

            Setting.list_ucdb.Clear();
            flp_db.Controls.Clear();
            if (str_shujukushai.Trim().Equals(string.Empty))
            {
                return;
            }
            List <string> list_db = str_shujukushai.Split(new char[] { ',' }).ToList();

            //循环实例化UC
            foreach (string item in list_db)
            {
                var myuc = new UCDatabase(item)
                {
                    Dock = DockStyle.Top
                };
                uihelper.AddControl(flp_db, myuc);
            }
        }
Пример #2
0
        /// <summary>
        /// 点击添加任务按钮时出发的事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void lbl_addtask_Click(object sender, EventArgs e)
        {
            /*弹出选择任务窗体,根据选择的结果再任务panel中显示所有任务*/
            WinForm.WinFromAddTask mywinform = new WinForm.WinFromAddTask();
            if (mywinform.ShowDialog() == DialogResult.OK)
            {
                dgv_task.Rows.Clear();
                List <string> list_files = mywinform.outvalue;
                UCTask        myuc       = null;
                //将list_files形成任务列表中的控件
                for (int i = 0; i < list_files.Count; i++)
                {
                    string item = list_files[i];
                    myuc = new UCTask(item)
                    {
                        Dock = DockStyle.Top
                    };
                    uihelper.AddControl(panel_task, myuc);
                    _startall += myuc.ZhengwenChachong;
                    _stopall  += myuc.StopResearch;


                    //int index = dgv_task.Rows.Add();
                    //dgv_task.Rows[index].Cells["wendangming"].Value = item;
                    //dgv_task.Rows[index].Cells["xuhao"].Value = i + 1;
                }
            }
        }
Пример #3
0
 private void lbl_shujuku_Click(object sender, EventArgs e)
 {
     panel_bottom.Controls.Clear();
     UC.UCShujuku myuc = new UC.UCShujuku()
     {
         Dock = DockStyle.Fill
     };
     uihelper.AddControl(panel_bottom, myuc);
 }
Пример #4
0
 private void lbl_shujuku_Click(object sender, EventArgs e)
 {
     panel_bottom.Controls.Clear();
     if (ucshujuku == null)
     {
         ucshujuku = new UC.UCShujuku()
         {
             Dock = DockStyle.Fill
         };
     }
     uihelper.AddControl(panel_bottom, ucshujuku);
 }