public void SetViewImage(IImage img, GDMFileReferenceWithTitle fileRef) { var imageCtl = new GKUI.Components.ImageView(); imageCtl.OpenImage(img); fController.ProcessPortraits(imageCtl, fileRef); SetViewControl(imageCtl); }
public void SetViewImage(IImage img, GEDCOMFileReferenceWithTitle fileRef) { var imageCtl = new GKUI.Components.ImageView(); imageCtl.OpenImage(img); fController.ProcessPortraits(imageCtl, fileRef); fTimer = AppHost.Instance.CreateTimer(100.0f, InitViewer_Tick); fTimer.Start(); SetViewControl(imageCtl); }
public void TestMethod() { IImage image1 = null; fImageView.OpenImage(image1); // return without exceptions Image image2 = null; fImageView.OpenImage(image2); // return without exceptions Assembly assembly = typeof(CoreTests).Assembly; Bitmap img = new Bitmap(assembly.GetManifestResourceStream("GKTests.Resources.shaytan_plant.jpg")); fImageView.OpenImage(img); fForm.Show(); fImageView.ShowToolbar = false; Assert.IsFalse(fImageView.ShowToolbar); fImageView.ShowToolbar = true; Assert.IsTrue(fImageView.ShowToolbar); fImageView.SelectionMode = ImageBoxSelectionMode.Zoom; Assert.AreEqual(ImageBoxSelectionMode.Zoom, fImageView.SelectionMode); fImageView.SelectionRegion = ExtRect.Empty; Assert.AreEqual(ExtRect.Empty, fImageView.SelectionRegion); ClickToolStripButton("btnZoomIn", fForm); ClickToolStripButton("btnZoomOut", fForm); ClickToolStripButton("btnSizeToFit", fForm); var tscbZoomLevels = new ToolStripComboBoxTester("zoomLevelsToolStripComboBox", fForm); tscbZoomLevels.Enter("500"); fForm.Close(); }