mirror of
https://github.com/n00mkrad/flowframes.git
synced 2025-12-16 16:37:48 +01:00
Added pausing/resuming for interpolation, async (background) web checks
This commit is contained in:
@@ -11,6 +11,7 @@ using Flowframes.IO;
|
||||
using DiskDetector;
|
||||
using DiskDetector.Models;
|
||||
using Microsoft.VisualBasic.Devices;
|
||||
using Flowframes.Extensions;
|
||||
|
||||
namespace Flowframes.OS
|
||||
{
|
||||
@@ -124,7 +125,7 @@ namespace Flowframes.OS
|
||||
return (Encoding.UTF8.GetByteCount(str) != str.Length);
|
||||
}
|
||||
|
||||
public static int GetFreeRamMb ()
|
||||
public static int GetFreeRamMb()
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -155,5 +156,18 @@ namespace Flowframes.OS
|
||||
|
||||
return info;
|
||||
}
|
||||
|
||||
public static IEnumerable<Process> GetChildProcesses(Process process)
|
||||
{
|
||||
List<Process> children = new List<Process>();
|
||||
ManagementObjectSearcher mos = new ManagementObjectSearcher(String.Format("Select * From Win32_Process Where ParentProcessID={0}", process.Id));
|
||||
|
||||
foreach (ManagementObject mo in mos.Get())
|
||||
{
|
||||
children.Add(Process.GetProcessById(Convert.ToInt32(mo["ProcessID"])));
|
||||
}
|
||||
|
||||
return children;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user