public bool InstanceAlreadyRunning(string instanceName) { foreach (var process in Process.GetProcessesByName("Nox")) { DebugForm.Log("Opened Nox Instance: \n" + GetCommandLine(process)); return(GetCommandLine(process).Contains(instanceName)); } DebugForm.ErrorLog(instanceName + " is not running!"); return(false); }
public Bitmap ADBScreenshot() { var timer = new Stopwatch(); timer.Start(); var debug = RunADB("shell screencap -p /mnt/shared/Image/ADBCapture_" + DebugForm.SelectedEmuInstance.Text + ".png"); DebugForm.Log(debug); timer.Stop(); DebugForm.WarningLog("ADB Screencap done after " + timer.ElapsedMilliseconds + "ms!"); Bitmap tempBitmap; using(var image = new Bitmap(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile) + @"\Nox_share\Image\ADBCapture_" + DebugForm.SelectedEmuInstance.Text + ".png")) { tempBitmap = new Bitmap(image); } return tempBitmap; }