Beispiel #1
0
        private void CNCeditclick(object sender, MouseButtonEventArgs e)
        {
            CNCConfigurationDetail fw = new CNCConfigurationDetail();
            int connlimit             = (CNCdataGrid.SelectedItem as CNCRuleDataTable).connlimit;

            string[] srcIP = (CNCdataGrid.SelectedItem as CNCRuleDataTable).srcIP.ToString().Split('.');
            string[] dstIP = (CNCdataGrid.SelectedItem as CNCRuleDataTable).dstIP.ToString().Split('.');
            string   sport = (CNCdataGrid.SelectedItem as CNCRuleDataTable).sport;
            string   dport = (CNCdataGrid.SelectedItem as CNCRuleDataTable).dport;
            bool     log   = (CNCdataGrid.SelectedItem as CNCRuleDataTable).log;

            if (srcIP[0] != "")
            {
                fw.srcStarttextBox_1.Text = srcIP[0]; fw.srcStarttextBox_2.Text = srcIP[1];
                fw.srcStarttextBox_3.Text = srcIP[2]; fw.srcStarttextBox_4.Text = srcIP[3];
            }
            if (dstIP[0] != "")
            {
                fw.dstStarttextBox_1.Text = dstIP[0]; fw.dstStarttextBox_2.Text = dstIP[1];
                fw.dstStarttextBox_3.Text = dstIP[2]; fw.dstStarttextBox_4.Text = dstIP[3];
            }
            fw.sportBox.Text           = sport; fw.dportBox.Text = dport;
            fw.logcheckBox.IsChecked   = log;
            StaticGlobal.selectedindex = StaticGlobal.FireWalldevices[StaticGlobal.firewallindex].getCNCRule_list().IndexOf(CNCdataGrid.SelectedItem as CNCRuleDataTable);
            StaticGlobal.editflag      = true;
            fw.ShowDialog();
        }
Beispiel #2
0
        /*连接数控制CNC选项卡*/
        private void NewCNCRulebutton_Click(object sender, RoutedEventArgs e)
        {
            StaticGlobal.editflag = false;
            CNCConfigurationDetail fw = new CNCConfigurationDetail();

            fw.ShowDialog();
        }