protected override void doStatusCycleOverrides() { try { if (su.TimeElapsed < TwoSeconds) // give it some time to start up, otherwise MainWindowHandle remains null { return; } if (ptr == IntPtr.Zero) { ptr = proc.MainWindowHandle; } string text = WindowUtil.GetText(ptr); Match m = DGPercent.Match(text); if (m.Success) { su.PercentageDoneExact = int.Parse(m.Groups["num"].Value); } } catch (Exception) { } }
protected override void doStatusCycleOverrides() { try { string text = WindowUtil.GetText(windowHandle); Match m = DGPercent.Match(text); if (m.Success) { su.PercentageDoneExact = int.Parse(m.Groups["num"].Value); } } catch (Exception) { } }