Exemplo n.º 1
0
 private void ResetProcess(AdvancedProcessInfo advancedProcessInfo)
 {
     advancedProcessInfo.ViewChildProcesses.Clear();
     foreach (var childProcess in advancedProcessInfo.ChildProcesses)
     {
         advancedProcessInfo.ViewChildProcesses.Add(childProcess);
         ResetProcess(childProcess);
     }
 }
Exemplo n.º 2
0
        private static bool MatchSearchPattern(string searchPattern, AdvancedProcessInfo advancedProcessInfo)
        {
            if (string.IsNullOrWhiteSpace(searchPattern))
            {
                return(true);
            }

            if (advancedProcessInfo.Name.IndexOf(searchPattern, StringComparison.OrdinalIgnoreCase) > -1)
            {
                return(true);
            }

            return(advancedProcessInfo.ChildProcesses.Any(x => MatchSearchPattern(searchPattern, x)));
        }
Exemplo n.º 3
0
 public ProcessPropertiesViewModel(AdvancedProcessInfo processInfo, AdvancedProcessInfo parentProcessInfo)
 {
     if (parentProcessInfo == null && processInfo.Id == 0)
     {
         ParentProcess = (string)Application.Current.Resources["None"];
     }
     else if (parentProcessInfo == null)
     {
         ParentProcess = $"<{Application.Current.Resources["NonExistentProcess"]}> ({processInfo.ParentProcess})";
     }
     else
     {
         ParentProcess = $"{parentProcessInfo.Name} ({parentProcessInfo.Id})";
     }
     Icon = processInfo.Icon ??
            new BitmapImage(new Uri(@"pack://application:,,,/Resources/Images/VisualStudio/Property.ico",
                                    UriKind.Absolute));
     ProcessInfo = processInfo;
 }