예제 #1
0
        public bool Equals(ProcessToMonitor other)
        {
            if (other == null)
            {
                return(false);
            }

            return(this.GetHashCode() == other.GetHashCode());
        }
예제 #2
0
        public override bool Equals(object obj)
        {
            if (obj == null || GetType() != obj.GetType())
            {
                return(false);
            }

            ProcessToMonitor other = obj as ProcessToMonitor;

            return(this.Equals(other));
        }
예제 #3
0
        private CheckSuspendResult CheckProcess(ProcessToMonitor process)
        {
            var p = Process.GetProcesses();

            for (int i = 0; i < p.Length; i++)
            {
                if (p[i].ProcessName.ToLower() == process.ProcessName.ToLower())
                {
                    return(new CheckSuspendResult(true, String.Format(Resources.Wsapm_Core.ProcessCheck_ProcessFoundReason, p[i].ProcessName)));
                }
            }

            return(new CheckSuspendResult(false, String.Empty));
        }