public override void Render(MyWindow window) { if (ObjectsBank.ParallelThread != null) { ObjectsBank.ParallelThread.Abort(); } if (ObjectsBank.MovingThread != null) { ObjectsBank.MovingThread.Abort(); } window.Close();// just close the window }
private void Onclose(object sender, EventArgs e)//need to add warning and save window { MyWindow window = (MyWindow)sender; if (ObjectsBank.ParallelThread != null) { ObjectsBank.ParallelThread.Abort(); } if (ObjectsBank.MovingThread != null) { ObjectsBank.MovingThread.Abort(); } window.Close(); }