예제 #1
0
        public static PictureView InsertIntoPanel(Panel panel)
        {
            PictureView pv = new PictureView();

            GuiUtil.InsertIntoPanel(pv, panel);
            return(pv);
        }
예제 #2
0
        private void AddFullFrameListener()
        {
            this.MouseDoubleClick += new MouseEventHandler(delegate(object sender, MouseEventArgs e) {
                if (e.Button == MouseButtons.Middle && AllowMaximization)
                {
                    Form f = new Form();
                    f.Size = new Size(1000, 1000);

                    PictureView pv = new PictureView();
                    pv.Location    = new Point(0, 0);
                    pv.Size        = new Size(984, 962);
                    pv.Anchor      = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Bottom;
                    foreach (var mouseListener in DoubleClickListeners)
                    {
                        pv.AddDoubleClickListener(mouseListener);
                    }
                    pv._Image = _Image;
                    pv.ZoomToFit();
                    pv.AllowMaximization = false;
                    f.Controls.Add(pv);

                    f.ShowDialog();
                }
            });
        }