private void NewWHLRulebutton_Click(object sender, RoutedEventArgs e) { StaticGlobal.editflag = false; WHLConfigurationDetail fwcd = new WHLConfigurationDetail(); fwcd.ShowDialog(); }
private void WHLeditclick(object sender, MouseButtonEventArgs e) { WHLConfigurationDetail fw = new WHLConfigurationDetail(); string[] dst_ip = (WHLdataGrid.SelectedItem as WHLRuleDataTable).dst_IP.ToString().Split('.'); string[] src_IP = (WHLdataGrid.SelectedItem as WHLRuleDataTable).src_IP.ToString().Split('.'); string dst_port = (WHLdataGrid.SelectedItem as WHLRuleDataTable).dst_port.ToString(); string src_port = (WHLdataGrid.SelectedItem as WHLRuleDataTable).src_port.ToString(); fw.srcStarttextBox_1.Text = src_IP[0]; fw.srcStarttextBox_2.Text = src_IP[1]; fw.srcStarttextBox_3.Text = src_IP[2]; fw.srcStarttextBox_4.Text = src_IP[3]; fw.dstStarttextBox_1.Text = dst_ip[0]; fw.dstStarttextBox_2.Text = dst_ip[1]; fw.dstStarttextBox_3.Text = dst_ip[2]; fw.dstStarttextBox_4.Text = dst_ip[3]; fw.sportBox.Text = src_port; fw.dportBox.Text = dst_port; fw.logcheckBox.IsChecked = (WHLdataGrid.SelectedItem as WHLRuleDataTable).log; StaticGlobal.selectedindex = StaticGlobal.FireWalldevices[StaticGlobal.firewallindex].getWHLRule_list().IndexOf(WHLdataGrid.SelectedItem as WHLRuleDataTable); StaticGlobal.editflag = true; fw.ShowDialog(); }
/*白名单选项卡*/ private void NewWHLRulebutton_Click(object sender, RoutedEventArgs e) { WHLConfigurationDetail fw = new WHLConfigurationDetail(); fw.ShowDialog(); }