public static void Main() { //Form1 用户窗口1 Form2 登陆界面 //窗口2的引用 IOStream my_iostream = new IOStream(); //csv 读写 string filepath = "..\\..\\rule.csv"; if (!File.Exists(filepath)) //没有规则文件 通过关联规则生成规则文件 { //string path = System.Environment.CurrentDirectory;当前工作路径 string path = "..\\..\\fp.exe"; first_use first_Use = new first_use(); Process p = Process.Start(path); Application.Run(first_Use); p.WaitForExit();//关键,等待外部程序退出后才能往下执行 //first_Use.Dispose(); } my_iostream.Get_hang(); //读取挂起 my_iostream.Get_rule(); //读取规则 my_iostream.Get_query(); // 读取访问记录 my_iostream.Get_user(); Sign_in sign_In = new Sign_in(); Application.Run(sign_In); }
private void button4_Click(object sender, EventArgs e) { string path = "..\\..\\fp.exe"; first_use first_Use = new first_use(); Process p = Process.Start(path); p.WaitForExit();//关键,等待外部程序退出后才能往下执行 Static.rule_index.Clear(); //ad_ch_success form = new ad_ch_success(); IOStream iO = new IOStream(); iO.Get_rule(); this.dataGridView1.Rows.Clear(); //Query_history_operation query_History_Operation = new Query_history_operation(); //查询操作类 for (int i = Static.rule_index.Count - 1; i >= 40; i--) { Rule query_out_his = (Rule)Static.rule_index[i]; if (query_out_his.ACTION == 1) { int index = this.dataGridView1.Rows.Add(); this.dataGridView1.Rows[index].Cells[1].Value = query_out_his.ACTION; //授权结果 this.dataGridView1.Rows[index].Cells[2].Value = query_out_his.TARGET_NAME; //资源名称 //this.dataGridView1.Rows[index].Cells[3].Value = query_out_his.REQUEST_DATE; this.dataGridView1.Rows[index].Cells[3].Value = query_out_his.PERSON_BUSINESS_TITLE; this.dataGridView1.Rows[index].Cells[4].Value = query_out_his.PERSON_BUSINESS_TITLE_DETAIL; this.dataGridView1.Rows[index].Cells[5].Value = query_out_his.PERSON_COMPANY; this.dataGridView1.Rows[index].Cells[6].Value = query_out_his.PERSON_DEPTNAME; this.dataGridView1.Rows[index].Cells[7].Value = query_out_his.PERSON_JOB_CODE; this.dataGridView1.Rows[index].Cells[8].Value = query_out_his.PERSON_JOB_FAMILY; this.dataGridView1.Rows[index].Cells[9].Value = query_out_his.PERSON_LOCATION; this.dataGridView1.Rows[index].Cells[10].Value = query_out_his.PERSON_MGR_ID; this.dataGridView1.Rows[index].Cells[11].Value = query_out_his.PERSON_ROLLUP_1; this.dataGridView1.Rows[index].Cells[12].Value = query_out_his.PERSON_ROLLUP_2; this.dataGridView1.Rows[index].Cells[13].Value = query_out_his.PERSON_ROLLUP_3; } } accept_change form = new accept_change(); form.Show(); }