コード例 #1
0
        public UdpDataType(UdpRow data)
        {
            if (data.LocalEndPoint != null)
            {
                LocalAddress = data.LocalEndPoint.ToString();
                Pid          = data.ProcessId;
            }
            else
            {
                LocalAddress = "x:Null";
                Pid          = 0;
            }

            //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");
            }
        }
コード例 #2
0
ファイル: DataType.cs プロジェクト: tailored/netwatch
        public UdpDataType(UdpRow data)
        {
            if (data.LocalEndPoint != null)
            {
                LocalAddress = data.LocalEndPoint.ToString();
                Pid = data.ProcessId;
            }
            else
            {
                LocalAddress = "x:Null";
                Pid = 0;
            }

            //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");
            }
        }