public TcpViewModelDataType(TcpRow data) { Data = data; ProccessIcon = new Image(); ImageName = "Skipped"; FullPath = "Skipped"; }
public TcpViewModelDataType(TcpRow data, Image icon, string name, string path) { Data = data; ProccessIcon = icon; ImageName = name; FullPath = path; }
public TaskItemDetailed(string processName, Int32 pid, TcpRow data, string processPath, Image processIcon) { ProcessName = processName; ProcessId = pid; InnerData = data; ProcessPath = processPath; ProcessIcon = processIcon; }
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]); }
public void AddItem(TcpRow item) { _tcpRows.Add(item.GetHashCode(), item); }