Added pausing/resuming for interpolation, async (background) web checks

This commit is contained in:
N00MKRAD
2021-04-29 22:57:00 +02:00
parent abc9817c66
commit d64e81c866
17 changed files with 332 additions and 46 deletions

View File

@@ -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;
}
}
}