コード例 #1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void thisSystemToolStripMenuItem_Click(object sender, EventArgs e)
        {
            List <Tuple <String, String> > lTargetList = new List <Tuple <String, String> >();
            String lIP  = String.Empty;
            String lMAC = String.Empty;

            try
            {
                lIP  = DGV_Targets.SelectedRows[0].Cells["IP"].Value.ToString();
                lMAC = DGV_Targets.SelectedRows[0].Cells["MAC"].Value.ToString();
                lTargetList.Add(new Tuple <String, String>(lMAC, lIP));
            }
            catch (Exception lEx)
            { }

            try
            {
                ScanMultipleSystems.getInstance(lTargetList).ShowDialog();
                reloadDGVValues();
            }
            catch (Exception lEx)
            {
                String lMsg = lEx.Message;
            }
        }
コード例 #2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void unscanedSystemsToolStripMenuItem_Click(object sender, EventArgs e)
        {
            List <Tuple <String, String> > lTargetList = new List <Tuple <String, String> >();
            String lIP  = String.Empty;
            String lMAC = String.Empty;

            foreach (DataGridViewRow lTmp in DGV_Targets.Rows)
            {
                try
                {
                    if (lTmp.Cells["LastScanDate"] == null || lTmp.Cells["LastScanDate"].Value == null || lTmp.Cells["LastScanDate"].Value.ToString().Length <= 0)
                    {
                        lIP  = lTmp.Cells["IP"].Value.ToString();
                        lMAC = lTmp.Cells["MAC"].Value.ToString();
                        lTargetList.Add(new Tuple <String, String>(lMAC, lIP));
                    } // if (lTmp...
                }
                catch (Exception)
                {
                }
            } // foreach (DataGri...

            ScanMultipleSystems.getInstance(lTargetList).ShowDialog();
            reloadDGVValues();
        }