Exemplo n.º 1
0
 private void listView1_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (listView1.SelectedItems.Count > 0)
     {
         int              Index = listView1.SelectedItems[0].Index;
         String           aa    = listView1.Items[Index].Text;
         ReportDetailForm f     = new ReportDetailForm(aa, dp1, dp2, dp3);
         f.Show();
     }
 }
Exemplo n.º 2
0
        private void listView1_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            ListViewHitTestInfo info = listView1.HitTest(e.X, e.Y);

            if (info.Item != null)
            {
                if (listView1.SelectedItems.Count > 0)
                {
                    int              Index = listView1.SelectedItems[0].Index;
                    String           aa    = listView1.Items[Index].Text;
                    ReportDetailForm f     = new ReportDetailForm(aa, dp1, dp2, dp3);
                    f.Show();
                }
            }
        }
Exemplo n.º 3
0
        private void reporter(string path)
        {
            string exc = "以下论文的报告导出失败,请检查:";

            DirectoryInfo sourceFolder = new DirectoryInfo(report);

            if (!sourceFolder.Exists)
            {
                MessageBox.Show(this, "report文件夹丢失!导出失败!");
                return;
            }
            FileInfo[] fileInfo = sourceFolder.GetFiles();
            for (int i = 0; i < fileInfo.Length; i++)
            {
                try
                {
                    ReportDetailForm f = new ReportDetailForm(fileInfo[i].Name.Substring(0, fileInfo[i].Name.Length - 4), to_check_txt_paper, report, report_data);
                    f.richTextBox1.SaveFile(path + "\\" + fileInfo[i].Name.Substring(0, fileInfo[i].Name.Length - 4) + ".rtf");
                }
                catch
                {
                    exc += fileInfo[i].Name + "、";
                }
            }
            if (checkBox7.Checked)
            {
                export_table_report(path);
            }
            TopMost = true;
            MessageBox.Show(this, "导出完成!");
            if (exc != "以下论文的报告导出失败,请检查:")
            {
                MessageBox.Show(this, exc);
            }
            TopMost        = false;
            ReportSavePath = "";
        }