Beispiel #1
0
 // region for interface selection
 #region interface selection
 //################################################################### interface selection
 /// <summary>
 /// selects the inface with the given index
 /// </summary>
 /// <param name="i">index of the interface</param>
 public void SelectInterface(int i)
 {
     if (i < Interfaces.Count)
     {
         IOController.Log(this, "SelectInterface called index:" + i, IOController.Flag.debug);
         HostNIC nic = (HostNIC)Interfaces[i];
         this.HostIP                 = nic.IPAddress;
         this.HostSubnetMask         = nic.SubnetMask;
         this.HostSubnet             = nic.SubnetIdentifier;
         this.HostHasStaticIp        = nic.StaticIPAddress;
         this.HostGateway            = nic.Gateway;
         this.SelectedInterfaceIndex = i;
         this.SelectedInterfaceID    = nic.Id;
         IOController.Log(this, "SelectInterface ID" + nic.Id, IOController.Flag.debug);
         this.OverviewSelectedInterfaceName = nic.Name;
         IOController.Log(this, nic.ToString(), IOController.Flag.status);
     }
     else
     {
         IOController.Log(this, "SelectInterface IndexOutOfRange index:" + i, IOController.Flag.error);
     }
 }
Beispiel #2
0
 /// <summary>
 /// adds a new HoatNIC to the arraylist
 /// </summary>
 /// <param name="nic">interface as HostNIC</param>
 public void AddInterface(HostNIC nic)
 {
     this.interfaces.Add(nic);
     IOController.Log(this, "Added Interface at " + (this.interfaces.Count - 1) + ":\n" + nic.ToString() + "\n", IOController.Flag.status);
     if (InterfaceAddedEvt != null)
     {
         InterfaceAddedEvt(this.interfaces, new PropertyChangedEventArgs("InterfaceAdded"));
     }
 }