コード例 #1
0
        public void Test_Image()
        {
            Assert.AreEqual(null, fDialog.FileRef);
            fDialog.FileRef = fileRef;
            Assert.AreEqual(fileRef, fDialog.FileRef);

            Bitmap img           = new Bitmap(TestUtils.LoadResourceStream("shaytan_plant.jpg"));
            IImage portableImage = new ImageHandler(img);

            fDialog.SetViewImage(portableImage, fileRef);
            fDialog.Refresh();

            ClickToolStripButton("btnZoomIn", fDialog);
            ClickToolStripButton("btnZoomOut", fDialog);
            ClickToolStripButton("btnSizeToFit", fDialog);

            KeyDownForm(fDialog.Name, Keys.Escape);
        }
コード例 #2
0
        public void Test_Image()
        {
            Assert.AreEqual(null, fDialog.FileRef);
            fDialog.FileRef = fileRef;
            Assert.AreEqual(fileRef, fDialog.FileRef);

            Assembly assembly      = typeof(CoreTests).Assembly;
            Bitmap   img           = new Bitmap(assembly.GetManifestResourceStream("GKTests.Resources.shaytan_plant.jpg"));
            IImage   portableImage = new ImageHandler(img);

            fDialog.SetViewImage(portableImage, fileRef);
            fDialog.Refresh();

            ClickToolStripButton("btnZoomIn", fDialog);
            ClickToolStripButton("btnZoomOut", fDialog);
            ClickToolStripButton("btnSizeToFit", fDialog);

            KeyDownForm(fDialog.Name, Keys.Escape);
        }