/// <summary> /// Show the form for the specified query /// </summary> /// <param name="qe"></param> public static void StartNewQueryExecution(Query q) { QueryEngineStatsForm i = Instance; if (i == null || i.IsDisposed) { i = Instance = new QueryEngineStatsForm(); DataTable = i.CreateDataTable(); i.Grid.DataSource = DataTable; Rectangle sr = Screen.GetWorkingArea(new Point(0, 0)); //.PrimaryScreen.Bounds; Form cf = SessionManager.Instance.ShellForm; Rectangle r = cf.Bounds; Size s = cf.Size; i.Location = new Point(r.Top, r.Left + s.Width / 2); cf.Location = new Point(0, 0); cf.Size = new Size(sr.Width / 2, sr.Height); cf.WindowState = FormWindowState.Normal; i.Show(); i.WindowState = FormWindowState.Normal; i.Location = new Point(sr.Width / 2, 0); i.Size = new Size(sr.Width / 2, sr.Height); } //if (q != i.Query) i.Initialize2(q); return; }