예제 #1
0
        private DlgPhotoFullSize()
        {
            if (isUp)
            {
                // duplicate for this instance stays true, so that all functions are disabled
                // and the form will be closed on load.
                this.duplicate = true;
                this.Load     += new System.EventHandler(this.DlgPhotoFullSize_Load);                   // we will close this instance on load
            }
            else
            {
                This      = this;
                duplicate = false;
                InitializeComponent();

                //
                // photoViewerControl
                //
                this.photoViewerControl = new LibSys.PhotoViewerControl();
                this.viewerPanel.Controls.AddRange(new System.Windows.Forms.Control[] { this.photoViewerControl });
                this.photoViewerControl.Dock       = System.Windows.Forms.DockStyle.Fill;
                this.photoViewerControl.Name       = "photoViewerControl";
                this.photoViewerControl.photoDescr = m_photoDescr;
                this.photoViewerControl.TabIndex   = 1;
                this.photoViewerControl.Cursor     = Cursors.Hand;
                this.photoViewerControl.Click     += new System.EventHandler(this.photoViewerControl_Click);

                photoPropertiesPopup = new PhotoPropertiesPopup();

                setPhotoDetail();

                fitToSizeCheckBox.Checked  = Project.photoFitToSize;
                keepInViewCheckBox.Checked = m_keepInView;

                if (Project.fitsScreen(Project.photoFullSizeX, Project.photoFullSizeY, Project.photoFullSizeWidth, Project.photoFullSizeHeight))
                {
                    inResize        = true;
                    this.Location   = new Point(Project.photoFullSizeX, Project.photoFullSizeY);
                    this.ClientSize = new System.Drawing.Size(Project.photoFullSizeWidth, Project.photoFullSizeHeight);                                 // causes Resize()
                }

                setupButtons();

                Project.setDlgIcon(this);
            }
        }
예제 #2
0
        private DlgPhotoFullSize()
        {
            if(isUp)
            {
                // duplicate for this instance stays true, so that all functions are disabled
                // and the form will be closed on load.
                this.duplicate = true;
                this.Load += new System.EventHandler(this.DlgPhotoFullSize_Load);	// we will close this instance on load
            }
            else
            {
                This = this;
                duplicate = false;
                InitializeComponent();

                //
                // photoViewerControl
                //
                this.photoViewerControl = new LibSys.PhotoViewerControl();
                this.viewerPanel.Controls.AddRange(new System.Windows.Forms.Control[] { this.photoViewerControl});
                this.photoViewerControl.Dock = System.Windows.Forms.DockStyle.Fill;
                this.photoViewerControl.Name = "photoViewerControl";
                this.photoViewerControl.photoDescr = m_photoDescr;
                this.photoViewerControl.TabIndex = 1;
                this.photoViewerControl.Cursor = Cursors.Hand;
                this.photoViewerControl.Click += new System.EventHandler(this.photoViewerControl_Click);

                photoPropertiesPopup = new PhotoPropertiesPopup();

                setPhotoDetail();

                fitToSizeCheckBox.Checked = Project.photoFitToSize;
                keepInViewCheckBox.Checked = m_keepInView;

                if(Project.fitsScreen(Project.photoFullSizeX, Project.photoFullSizeY, Project.photoFullSizeWidth, Project.photoFullSizeHeight))
                {
                    inResize = true;
                    this.Location = new Point(Project.photoFullSizeX, Project.photoFullSizeY);
                    this.ClientSize = new System.Drawing.Size(Project.photoFullSizeWidth, Project.photoFullSizeHeight);		// causes Resize()
                }

                setupButtons();

                Project.setDlgIcon(this);
            }
        }