public void FreeFloatRenderWindow(string deviceName) { if (renderHost == null) { this.Controls.Remove(this.renderWindow); int id = 0; int foundId = -1; foreach (Screen screen in Screen.AllScreens) { if (deviceName.StartsWith(screen.DeviceName)) { foundId = id; break; } id++; } if (foundId > -1) { renderHost = new RenderHost(); renderHost.Show(); renderHost.Controls.Add(renderWindow); UiTools.ShowFullScreen(renderHost, false, id); RenderContext11.Resize(renderWindow); } } }
public void AttachRenderWindow() { if (renderHost != null) { renderHost.Controls.Remove(renderWindow); this.Controls.Add(renderWindow); renderHost.Hide(); renderHost.Close(); renderHost = null; } }
public void FreeFloatRenderWindow(int targetMonitor) { if (renderHost == null) { this.Controls.Remove(this.renderWindow); renderHost = new RenderHost(); renderHost.Show(); renderHost.Controls.Add(renderWindow); int id = 0; if (Screen.FromControl(this).DeviceName == Screen.AllScreens[0].DeviceName) { id = targetMonitor; } if (id == 0 && targetMonitor > 1) { if (Screen.FromControl(this).DeviceName == Screen.AllScreens[1].DeviceName) { id = targetMonitor; } } UiTools.ShowFullScreen(renderHost, false, id); RenderContext11.Resize(renderWindow); } }