示例#1
0
        public void SetViewImage(IImage img, GDMFileReferenceWithTitle fileRef)
        {
            var imageCtl = new GKUI.Components.ImageView();

            imageCtl.OpenImage(img);

            fController.ProcessPortraits(imageCtl, fileRef);

            SetViewControl(imageCtl);
        }
示例#2
0
        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);
        }
示例#3
0
        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();
        }