public void ClientCallback_ExitWindows(string str) { Debug.WriteLine("ClientCallback_ExitWindows"); ClientCallback_RawPrint(str); if (str != null && str != "") { Thread.Sleep(1100); } lock (_ghWindowsLock) { for (int winHandle = 0; winHandle <= _lastWindowHandle; winHandle++) { GHWindow ghwin = _ghWindows[winHandle]; if (ghwin == null) { continue; } if (ghwin.WindowType == GHWinType.Map) { MapWindowId = 0; } ghwin.Destroy(); _ghWindows[winHandle] = null; } _lastWindowHandle = -1; } }
public GHResponse(ClientGame clientgame, GHRequestType requesttype, GHWindow window, List <GHMenuItem> responselist) { RequestingClientGame = clientgame; RequestType = requesttype; RequestingGHWindow = window; SelectedMenuItems = responselist; }
public GHRequest(ClientGame clientgame, GHRequestType requesttype, GHWindow requestingGHWindow, GHMenuInfo menuinfo) { RequestingClientGame = clientgame; RequestType = requesttype; RequestingGHWindow = requestingGHWindow; RequestMenuInfo = menuinfo; }
public void ClientCallback_DestroyGHWindow(int winHandle) { lock (_ghWindowsLock) { GHWindow ghwin = _ghWindows[winHandle]; if (ghwin != null) { ghwin.Destroy(); } if (ghwin.WindowType == GHWinType.Map) { MapWindowId = 0; } _ghWindows[winHandle] = null; } }
public int ClientCallback_CreateGHWindow(int wintype) { if (_lastWindowHandle >= GHConstants.MaxGHWindows) /* Should not happen, but paranoid */ { _lastWindowHandle = GHConstants.MaxGHWindows - 1; } while (_lastWindowHandle > 0 && _ghWindows[_lastWindowHandle] == null) { _lastWindowHandle--; } if (_ghWindows[_lastWindowHandle] != null) { _lastWindowHandle++; } if (_lastWindowHandle >= GHConstants.MaxGHWindows) { return(0); } int handle = _lastWindowHandle; GHWindow ghwin = new GHWindow((GHWinType)wintype, ClientGamePage, handle); lock (_ghWindowsLock) { _ghWindows[handle] = ghwin; ghwin.Create(); if (wintype == (int)GHWinType.Map) { MapWindowId = handle; } else if (wintype == (int)GHWinType.Message) { MessageWindowId = handle; } else if (wintype == (int)GHWinType.Status) { StatusWindowId = handle; } } return(handle); }