示例#1
0
 public TcpViewModelDataType(TcpRow data)
 {
     Data = data;
     ProccessIcon = new Image();
     ImageName = "Skipped";
     FullPath = "Skipped";
 }
示例#2
0
 public TcpViewModelDataType(TcpRow data, Image icon, string name, string path)
 {
     Data = data;
     ProccessIcon = icon;
     ImageName = name;
     FullPath = path;
 }
示例#3
0
 public TaskItemDetailed(string processName, Int32 pid, TcpRow data, string processPath, Image processIcon)
 {
     ProcessName = processName;
     ProcessId = pid;
     InnerData = data;
     ProcessPath = processPath;
     ProcessIcon = processIcon;
 }
示例#4
0
        public TcpDataType(TcpRow data)
        {
            State          = data.State.ToString();
            LocalAddress   = data.LocalEndPoint.ToString();
            ForeignAddress = data.RemoteEndPoint.ToString();

            Pid = data.ProcessId;

            //try to get ImageName
            ImageName = "Skipped";
            try
            {
                //Process process = Process.GetProcessById(data.ProcessId);
                //ImageName = process.MainModule.FileName;
            }
            catch (Exception)
            {
                Debug.WriteLine("Oops! Something went wrong brother :D");
            }
        }
 public bool IsObDataContains(TcpRow tcpRow)
 {
     return ObData.Any(taskItemDetailed => taskItemDetailed.InnerData.Equals(tcpRow));
 }
 public void RemoveTcpRowItemFromObData(TcpRow tcpRow)
 {
     int removeIndex = 0;
     bool isfinded = false;
     for (int i = 0; i < ObData.Count; i++)
     {
         if (ObData[i].InnerData.Equals(tcpRow))
         {
             isfinded = true;
             removeIndex = i;
             break;
         }
     }
     if (isfinded)
         ObData.Remove(ObData[removeIndex]);
 }
示例#7
0
        public TcpDataType(TcpRow data)
        {
            State = data.State.ToString();
            LocalAddress = data.LocalEndPoint.ToString();
            ForeignAddress = data.RemoteEndPoint.ToString();

            Pid = data.ProcessId;

            //try to get ImageName
            ImageName = "Skipped";
            try
            {
                //Process process = Process.GetProcessById(data.ProcessId);
                //ImageName = process.MainModule.FileName;
            }
            catch (Exception)
            {
                Debug.WriteLine("Oops! Something went wrong brother :D");
            }
        }
示例#8
0
 public void AddItem(TcpRow item)
 {
     _tcpRows.Add(item.GetHashCode(), item);
 }