public void closeScene() { //If the attempt at calling this function was flagged as invalid due to a cross-thread call, allow the call if (InvokeRequired) { Invoke(new MethodInvoker(closeScene)); } scene = null; disableComponents(); //Try to close the sceneThread try { sceneThread.Abort(); } catch { //If the sceneThread can't be closed, it already is closed } }
private void initScene(object obj) { InputPanel ip = (InputPanel)obj; scene = new Scene(ip); }