Exemplo n.º 1
0
 /// <summary>
 /// 
 /// </summary>
 /// <returns></returns>
 public static TaskFacadeARPScan getInstance()
 {
   return cInstance ?? (cInstance = new TaskFacadeARPScan());
 }
Exemplo n.º 2
0
    public ARPScan()
    {
      InitializeComponent();

      #region Datagrid header

      DataGridViewTextBoxColumn mIPCol = new DataGridViewTextBoxColumn();
      mIPCol.DataPropertyName = "IP";
      mIPCol.Name = "IP";
      mIPCol.HeaderText = "IP address";
      mIPCol.ReadOnly = true;
      mIPCol.MinimumWidth = 130;
      DGV_Targets.Columns.Add(mIPCol);

      DataGridViewTextBoxColumn mMACCol = new DataGridViewTextBoxColumn();
      mMACCol.DataPropertyName = "MAC";
      mMACCol.Name = "MAC";
      mMACCol.HeaderText = "MAC address";
      mMACCol.ReadOnly = true;
      mMACCol.MinimumWidth = 150;
      DGV_Targets.Columns.Add(mMACCol);

      DataGridViewTextBoxColumn mVendorCol = new DataGridViewTextBoxColumn();
      mVendorCol.DataPropertyName = "vendor";
      mVendorCol.Name = "vendor";
      mVendorCol.HeaderText = "Vendor";
      mVendorCol.ReadOnly = true;
      mVendorCol.MinimumWidth = 180;
      DGV_Targets.Columns.Add(mVendorCol);


      DataGridViewCheckBoxColumn mStatusCol = new DataGridViewCheckBoxColumn();
      mStatusCol.DataPropertyName = "status";
      mStatusCol.Name = "status";
      mStatusCol.HeaderText = "Attack";
      mStatusCol.Visible = true;
      mStatusCol.Width = 72;
      DGV_Targets.Columns.Add(mStatusCol);


      DataGridViewTextBoxColumn mLastScanDateCol = new DataGridViewTextBoxColumn();
      mLastScanDateCol.DataPropertyName = "LastScanDate";
      mLastScanDateCol.Name = "LastScanDate";
      mLastScanDateCol.HeaderText = "Scan date";
      mLastScanDateCol.ReadOnly = true;
      mLastScanDateCol.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
      mLastScanDateCol.MinimumWidth = 200;
      DGV_Targets.Columns.Add(mLastScanDateCol);

      DataGridViewTextBoxColumn mNote = new DataGridViewTextBoxColumn();
      mNote.DataPropertyName = "Note";
      mNote.Name = "Note";
      mNote.HeaderText = "Note";
      mNote.ReadOnly = true;
      mNote.Visible = false;
      mNote.Width = 0;
      DGV_Targets.Columns.Add(mNote);


      mTargetRecord = new BindingList<TargetRecord>();
      DGV_Targets.DataSource = mTargetRecord;
      DGV_Targets.CurrentCellDirtyStateChanged += new EventHandler(DGV_CurrentCellDirtyStateChanged);
      DGV_Targets.CellValueChanged += new DataGridViewCellEventHandler(DGV_CellValueChanged);

      DGV_Targets.CellClick += new DataGridViewCellEventHandler(DGV_CellClick);

      #endregion

      mTargetRecord = new BindingList<TargetRecord>();
      DGV_Targets.DataSource = mTargetRecord;

      cTaskARPScan = TaskFacadeARPScan.getInstance();
    }
Exemplo n.º 3
0
        public ARPScan()
        {
            InitializeComponent();


            #region Datagrid header

            DataGridViewTextBoxColumn mIPCol = new DataGridViewTextBoxColumn();
            mIPCol.DataPropertyName = "IP";
            mIPCol.Name             = "IP";
            mIPCol.HeaderText       = "IP address";
            mIPCol.ReadOnly         = true;
            mIPCol.MinimumWidth     = 130;
            DGV_Targets.Columns.Add(mIPCol);

            DataGridViewTextBoxColumn mMACCol = new DataGridViewTextBoxColumn();
            mMACCol.DataPropertyName = "MAC";
            mMACCol.Name             = "MAC";
            mMACCol.HeaderText       = "MAC address";
            mMACCol.ReadOnly         = true;
            mMACCol.MinimumWidth     = 150;
            DGV_Targets.Columns.Add(mMACCol);

            DataGridViewTextBoxColumn mVendorCol = new DataGridViewTextBoxColumn();
            mVendorCol.DataPropertyName = "vendor";
            mVendorCol.Name             = "vendor";
            mVendorCol.HeaderText       = "Vendor";
            mVendorCol.ReadOnly         = true;
            mVendorCol.MinimumWidth     = 180;
            DGV_Targets.Columns.Add(mVendorCol);


            DataGridViewCheckBoxColumn mStatusCol = new DataGridViewCheckBoxColumn();
            mStatusCol.DataPropertyName = "status";
            mStatusCol.Name             = "status";
            mStatusCol.HeaderText       = "Attack";
            mStatusCol.Visible          = true;
            mStatusCol.Width            = 72;
            DGV_Targets.Columns.Add(mStatusCol);


            DataGridViewTextBoxColumn mLastScanDateCol = new DataGridViewTextBoxColumn();
            mLastScanDateCol.DataPropertyName = "LastScanDate";
            mLastScanDateCol.Name             = "LastScanDate";
            mLastScanDateCol.HeaderText       = "Scan date";
            mLastScanDateCol.ReadOnly         = true;
            mLastScanDateCol.AutoSizeMode     = DataGridViewAutoSizeColumnMode.Fill;
            mLastScanDateCol.MinimumWidth     = 200;
            DGV_Targets.Columns.Add(mLastScanDateCol);

            DataGridViewTextBoxColumn mNote = new DataGridViewTextBoxColumn();
            mNote.DataPropertyName = "Note";
            mNote.Name             = "Note";
            mNote.HeaderText       = "Note";
            mNote.ReadOnly         = true;
            mNote.Visible          = false;
            mNote.Width            = 0;
            DGV_Targets.Columns.Add(mNote);


            mTargetRecord          = new BindingList <TargetRecord>();
            DGV_Targets.DataSource = mTargetRecord;
            DGV_Targets.CurrentCellDirtyStateChanged += new EventHandler(DGV_CurrentCellDirtyStateChanged);
            DGV_Targets.CellValueChanged             += new DataGridViewCellEventHandler(DGV_CellValueChanged);

            DGV_Targets.CellClick += new DataGridViewCellEventHandler(DGV_CellClick);

            #endregion

            mTargetRecord          = new BindingList <TargetRecord>();
            DGV_Targets.DataSource = mTargetRecord;

            cTaskARPScan = TaskFacadeARPScan.getInstance();
        }
Exemplo n.º 4
0
 /// <summary>
 ///
 /// </summary>
 /// <returns></returns>
 public static TaskFacadeARPScan getInstance()
 {
     return(cInstance ?? (cInstance = new TaskFacadeARPScan()));
 }