using System.Diagnostics; using System.Text.RegularExpressions; namespace AiQ_GUI { internal class Helper { // ***** Allows moving GUI by grab and dragging ***** [System.Runtime.InteropServices.DllImport("user32.dll")] public static extern int SendMessage(IntPtr hWnd, int Msg, int wParam, int lParam); [System.Runtime.InteropServices.DllImport("user32.dll")] public static extern bool ReleaseCapture(); public static void RestartApp() { Application.Restart(); Process.GetCurrentProcess().Kill(); // To make sure no execution on other threads occurs eg. making a test record. } public static int[] Shuffle() // Generates random order for visual test { Random random = new(); int[] result = new int[4]; for (int i = 0; i < 4; i++) { int j = random.Next(0, i + 1); if (i != j) result[i] = result[j]; result[j] = i; } return result; } // Generates a string that is a combination fo labels thats are red and Only RHS of the =. As well as the text in the Actions rich text box. public static string GetOverriddenActions(Panel pnlLbls, RichTextBox rhTxBxActions) { List redValues = pnlLbls.Controls .OfType