Esempio n. 1
0
 private void DlgPhotoFullSize_Closing(object sender, System.ComponentModel.CancelEventArgs e)
 {
     if (!duplicate)
     {
         This = null;
     }
 }
Esempio n. 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);
            }
        }
Esempio n. 3
0
        /// <summary>
        /// Clean up any resources being used. Can be called multiple times
        /// </summary>
        protected override void Dispose(bool disposing)
        {
            if (!duplicate)
            {
                This = null;
            }
            if (disposing)
            {
                if (components != null)
                {
                    components.Dispose();
                }
            }
            photoViewerControl.Dispose();
            photoPropertiesPopup.canClose = true;
            photoPropertiesPopup.Dispose();

            base.Dispose(disposing);

            GC.Collect();
        }
Esempio n. 4
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);
            }
        }
Esempio n. 5
0
 private void DlgPhotoFullSize_Closing(object sender, System.ComponentModel.CancelEventArgs e)
 {
     if(!duplicate)
     {
         This = null;
     }
 }
Esempio n. 6
0
        /// <summary>
        /// Clean up any resources being used. Can be called multiple times
        /// </summary>
        protected override void Dispose( bool disposing )
        {
            if(!duplicate)
            {
                This = null;
            }
            if( disposing )
            {
                if(components != null)
                {
                    components.Dispose();
                }
            }
            photoViewerControl.Dispose();
            photoPropertiesPopup.canClose = true;
            photoPropertiesPopup.Dispose();

            base.Dispose( disposing );

            GC.Collect();
        }