示例#1
0
 public PortStatus(PortStatus inPort)
 {
     this.Port    = inPort.Port;
     this.Ip      = inPort.Ip;
     this.Name    = inPort.Name;
     this.Process = inPort.Process;
     this.Link    = inPort.Link;
     this.Conf    = inPort.Conf;
 }
示例#2
0
        //Загрузка файла
        public void LoadSomeFile(string path)
        {
            StreamReader reader = new StreamReader(path);
            PortStatus   port   = new PortStatus();

            rep = 0;
            while (!reader.EndOfStream)
            {
                string line = reader.ReadLine();
                this.Pars(line);
            }
        }
示例#3
0
 private void PortToWinList(PortStatus.PortStatus port)         //заполнение строки в таблице
 {
     TekIndex = lstPorts.Items.Add(port.Port.ToString()).Index;
     lstPorts.Items[TekIndex].SubItems.Add(port.Link);
     lstPorts.Items[TekIndex].SubItems.Add(port.Conf);
     if (port.Name == "Can not obtain ownership information")
     {
         lstPorts.Items[TekIndex].SubItems.Add("Нет данных");
     }
     else
     {
         lstPorts.Items[TekIndex].SubItems.Add(port.Name + " [" + port.Process + "]");
     }
     lstPorts.Items[TekIndex].BackColor = Color.LightGreen;
 }
示例#4
0
 //Добавление в список
 public void AddPort(PortStatus newPort)
 {
     this.portList.Add(new PortStatus(newPort));
 }