コード例 #1
0
        private void btnIndex_Click(object sender, EventArgs e)
        {
            if (dataGridView1.SelectedRows.Count == 0)
            {
                MessageBox.Show(string.Format("请选择要标引的数据库"), "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }
            DataGridViewRow datarow = dataGridView1.SelectedRows[0];
            string          name    = (datarow.Cells["name"].Value == null ? "" : datarow.Cells["name"].Value.ToString());
            string          des     = (datarow.Cells["des"].Value == null ? "" : datarow.Cells["des"].Value.ToString());
            string          type    = (datarow.Cells["type"].Value == null ? "CPRS" : datarow.Cells["type"].Value.ToString());
            int             id      = Convert.ToInt32(datarow.Cells["id"].Value.ToString());
            frmPtList       frmdbin = new frmPtList(name, id, type);

            frmdbin.MdiParent = this.MdiParent;
            frmdbin.Show();
        }
コード例 #2
0
ファイル: MDIMain.cs プロジェクト: xy19xiaoyu/PatSI
 private void 人工标引RToolStripMenuItem_Click(object sender, EventArgs e)
 {
     foreach (Form form in this.MdiChildren)
     {
         if (form is frmPtList)
         {
             form.Show();
             return;
         }
     }
     if (MDIMain.Ztname != null)
     {
         frmPtList frm = new frmPtList(MDIMain.Ztname, MDIMain.Ztid, MDIMain.Dbtype);
         frm.Show();
     }
     else
     {
         MessageBox.Show("请先选择专题库", "提示");
     }
 }
コード例 #3
0
ファイル: MDIMain.cs プロジェクト: XiaoyYuChen/PIS
        private void 人工标引RToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmPtList frm = new frmPtList();

            frm.Show();
        }
コード例 #4
0
ファイル: ZTListNew.cs プロジェクト: xy19xiaoyu/PatSI
        private void btnIndex_Click(object sender, EventArgs e)
        {
            if (dataGridView1.SelectedRows.Count == 0)
            {
                MessageBox.Show(string.Format("请选择要标引的数据库"), "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }
            DataGridViewRow datarow = dataGridView1.SelectedRows[0];
            string name = (datarow.Cells["name"].Value == null ? "" : datarow.Cells["name"].Value.ToString());
            string des = (datarow.Cells["des"].Value == null ? "" : datarow.Cells["des"].Value.ToString());
            string type = (datarow.Cells["type"].Value == null ? "CPRS" : datarow.Cells["type"].Value.ToString());
            int id = Convert.ToInt32(datarow.Cells["Id"].Value.ToString());


            if (MDIMain.Ztid != id && MDIMain.Ztid != 0)
            {
                if (MessageBox.Show(string.Format("您正在使用专题库:【{0}】,{1}是:关闭现有专题库,打开新专题库【{2}】{1}否:继续使用当前专题库:【{0}】", MDIMain.Ztname, Environment.NewLine, name), "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == System.Windows.Forms.DialogResult.Yes)
                {
                    //关闭所有页面
                    foreach (Form form in ((MDIMain)this.Parent.Parent).MdiChildren)
                    {
                        if (form is ZTListNew)
                        {
                            continue;
                        }
                        else
                        {
                            form.Close();
                        }
                    }
                    //inifilter(id);
                    //切换专题库
                    MDIMain.Ztid = id;
                    MDIMain.Ztname = name;
                    MDIMain.Dbtype = type;
                    ((MDIMain)this.MdiParent).tssZTName.Text = "当前选择专题库:" + MDIMain.Ztname;
                }
            }
            else
            {
                //inifilter(id);
                MDIMain.Ztid = id;
                MDIMain.Ztname = name;
                MDIMain.Dbtype = type;
                ((MDIMain)this.MdiParent).tssZTName.Text = "当前选择专题库:" + MDIMain.Ztname;
            }

            foreach (Form form in ((MDIMain)this.Parent.Parent).MdiChildren)
            {
                if (form is frmPtList)
                {

                    form.Activate();
                    this.Close();
                    return;

                }
            }


            frmPtList frmdbin = new frmPtList(MDIMain.Ztname, MDIMain.Ztid, MDIMain.Dbtype);
            frmdbin.MdiParent = this.MdiParent;
            frmdbin.Show();
            this.Close();


        }
コード例 #5
0
        private void ShowProcess(object sneder, int value, int skip, int overwirte, string status)
        {
            System.Windows.Forms.MethodInvoker invoker = () =>
            {
                this.tssProcess.Value = value;
                this.tssMsg.Text      = (((float)value) / this.tssProcess.Maximum).ToString("0.00%");
                this.StatusMsg.Text   = value + "/" + this.tssProcess.Maximum;
                this.tssStatus.Text   = status;
                if (status == "导入完毕")
                {
                    BLL.DBLinq.ZTHelper.UpdataSum(ztid);
                    string message;
                    if (rbSkip.Checked)
                    {
                        message = string.Format("导入完毕,共:[{0}] 条记录,成功:[{1}]条,跳过:{2}条,\n是否进行专利浏览", this.tssProcess.Maximum, value, skip);
                    }
                    else
                    {
                        message = string.Format("导入完毕,共:[{0}] 条记录,成功:[{1}]条,覆盖:{2}条,\n是否进行专利浏览", this.tssProcess.Maximum, value, overwirte);
                    }
                    if (MessageBox.Show(this, message, "导入完毕", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == System.Windows.Forms.DialogResult.Yes)
                    {
                        //inifilter(ztid);

                        try
                        {
                            frmPtList frmdbin = new frmPtList(strname, ztid, type);
                            frmdbin.MdiParent = this.MdiParent;
                            frmdbin.Show();
                            this.Close();
                        }
                        catch (Exception)
                        {
                        }
                    }
                    else
                    {
                        if (value == this.tssProcess.Maximum)
                        {
                            System.Windows.Forms.MethodInvoker invoker1 = () =>
                            {
                                this.btnImport.Enabled = true;
                            };
                            if (this.btnImport.InvokeRequired)
                            {
                                this.btnImport.Invoke(invoker1);
                            }
                            else
                            {
                                invoker1();
                            }
                        }
                    }
                }
            };
            if (this.statusStrip1.InvokeRequired)
            {
                this.statusStrip1.Invoke(invoker);
            }
            else
            {
                invoker();
            }
        }
コード例 #6
0
ファイル: DBIN.cs プロジェクト: xy19xiaoyu/PatSI
        private void ShowProcess(object sneder, int value, int skip, int overwirte, string status)
        {

            System.Windows.Forms.MethodInvoker invoker = () =>
            {
                this.tssProcess.Value = value;
                this.tssMsg.Text = (((float)value) / this.tssProcess.Maximum).ToString("0.00%");
                this.StatusMsg.Text = value + "/" + this.tssProcess.Maximum;
                this.tssStatus.Text = status;
                if (status == "导入完毕")
                {
                    BLL.DBLinq.ZTHelper.UpdataSum(ztid);
                    string message;
                    if (rbSkip.Checked)
                    {
                        message = string.Format("导入完毕,共:[{0}] 条记录,成功:[{1}]条,跳过:{2}条,\n是否进行专利浏览", this.tssProcess.Maximum, value, skip);
                    }
                    else
                    {
                        message = string.Format("导入完毕,共:[{0}] 条记录,成功:[{1}]条,覆盖:{2}条,\n是否进行专利浏览", this.tssProcess.Maximum, value, overwirte);
                    }
                    if (MessageBox.Show(this, message, "导入完毕", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == System.Windows.Forms.DialogResult.Yes)
                    {

                        //inifilter(ztid);

                        try
                        {
                            frmPtList frmdbin = new frmPtList(strname, ztid, type);
                            frmdbin.MdiParent = this.MdiParent;
                            frmdbin.Show();
                            this.Close();
                        }
                        catch (Exception)
                        {

                        }
                    }
                    else
                    {
                        if (value == this.tssProcess.Maximum)
                        {
                            System.Windows.Forms.MethodInvoker invoker1 = () =>
                            {
                                this.btnImport.Enabled = true;
                            };
                            if (this.btnImport.InvokeRequired)
                            {
                                this.btnImport.Invoke(invoker1);
                            }
                            else
                            {
                                invoker1();
                            }
                        }
                    }
                }
            };
            if (this.statusStrip1.InvokeRequired)
            {
                this.statusStrip1.Invoke(invoker);
            }
            else
            {
                invoker();
            }
        }
コード例 #7
0
ファイル: ZTListNew.cs プロジェクト: xy19xiaoyu/PatSI
        private void btnIndex_Click(object sender, EventArgs e)
        {
            if (dataGridView1.SelectedRows.Count == 0)
            {
                MessageBox.Show(string.Format("请选择要标引的数据库"), "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }
            DataGridViewRow datarow = dataGridView1.SelectedRows[0];
            string          name    = (datarow.Cells["name"].Value == null ? "" : datarow.Cells["name"].Value.ToString());
            string          des     = (datarow.Cells["des"].Value == null ? "" : datarow.Cells["des"].Value.ToString());
            string          type    = (datarow.Cells["type"].Value == null ? "CPRS" : datarow.Cells["type"].Value.ToString());
            int             id      = Convert.ToInt32(datarow.Cells["Id"].Value.ToString());


            if (MDIMain.Ztid != id && MDIMain.Ztid != 0)
            {
                if (MessageBox.Show(string.Format("您正在使用专题库:【{0}】,{1}是:关闭现有专题库,打开新专题库【{2}】{1}否:继续使用当前专题库:【{0}】", MDIMain.Ztname, Environment.NewLine, name), "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == System.Windows.Forms.DialogResult.Yes)
                {
                    //关闭所有页面
                    foreach (Form form in ((MDIMain)this.Parent.Parent).MdiChildren)
                    {
                        if (form is ZTListNew)
                        {
                            continue;
                        }
                        else
                        {
                            form.Close();
                        }
                    }
                    //inifilter(id);
                    //切换专题库
                    MDIMain.Ztid   = id;
                    MDIMain.Ztname = name;
                    MDIMain.Dbtype = type;
                    ((MDIMain)this.MdiParent).tssZTName.Text = "当前选择专题库:" + MDIMain.Ztname;
                }
            }
            else
            {
                //inifilter(id);
                MDIMain.Ztid   = id;
                MDIMain.Ztname = name;
                MDIMain.Dbtype = type;
                ((MDIMain)this.MdiParent).tssZTName.Text = "当前选择专题库:" + MDIMain.Ztname;
            }

            foreach (Form form in ((MDIMain)this.Parent.Parent).MdiChildren)
            {
                if (form is frmPtList)
                {
                    form.Activate();
                    this.Close();
                    return;
                }
            }


            frmPtList frmdbin = new frmPtList(MDIMain.Ztname, MDIMain.Ztid, MDIMain.Dbtype);

            frmdbin.MdiParent = this.MdiParent;
            frmdbin.Show();
            this.Close();
        }
コード例 #8
0
ファイル: MDIMain.cs プロジェクト: xy19xiaoyu/PatSI
 private void 人工标引RToolStripMenuItem_Click(object sender, EventArgs e)
 {
     foreach (Form form in this.MdiChildren)
     {
         if (form is frmPtList)
         {
             form.Show();
             return;
         }
     }
     if (MDIMain.Ztname != null)
     {
         frmPtList frm = new frmPtList(MDIMain.Ztname, MDIMain.Ztid, MDIMain.Dbtype);
         frm.Show();
     }
     else
     {
         MessageBox.Show("请先选择专题库", "提示");
     }
 }