public override void ImageChanged() { if (xImage != null) { xImage.Dispose(); xImage = null; } if (base.image != null) { xImage = new Xsharp.Image (screen, base.image.GetFrame(base.frame)); } }
// Set this window's icon. void IToolkitTopLevelWindow.SetIcon(Icon icon) { DotGNU.Images.Frame frame = ToolkitManager.GetImageFrame(icon); Xsharp.Image origIcon = Icon; if (frame != null) { Icon = new Xsharp.Image(Screen, frame); } else { Icon = null; } if (origIcon != null) { origIcon.Dispose(); } }