public void CanCreateWindow() { using (PlatformWindow wnd = new PlatformWindow("Test Window", 128, 128)) { Assert.IsNotNull(wnd); } }
public void ResizeCallsEvent() { using (PlatformWindow wnd = new PlatformWindow("Test Window", 128, 128)) { wnd.Resize += new EventHandler(OnEventCallback); wnd.Size = new Size(200, 100); Assert.AreEqual(1, _callbackCount); } }
public void CanResize() { using (PlatformWindow wnd = new PlatformWindow("Test Window", 128, 128)) { wnd.Size = new Size(200, 100); Assert.AreEqual(200, wnd.Width); Assert.AreEqual(100, wnd.Height); } }
private void Dispose(bool called_from_finalizer) { if (_disposed) { return; } if (!called_from_finalizer) { PlatformWindow.Dispose(); } // dispose unmanaged _disposed = true; GC.SuppressFinalize(this); }