Ejemplo n.º 1
0
 /// <summary>
 /// Tears down a crop control.
 /// </summary>
 /// <param name="photoCropControl">The photo crop control.</param>
 private void TearDownCropControl(CropPhotoControl photoCropControl)
 {
     photoCropControl.ContinueEvent -= this.ContinueCrop;
     photoCropControl.CancelEvent -= this.CancelCrop;
     photoCropControl.ContinueBlackAndWhiteEvent -= this.ContinueBlackAndWhite;
     photoCropControl.Hide();
     photoCropControl.Dispose();
     this.ViewPhotoTableLayoutPanel.Show();
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Handles the Click event of the RenamePhotoButton control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
        private void HandleEditButtonClick(object sender, EventArgs e)
        {
            this.StopTimer();
            //// stop slide show
            this.SuspendLayout();
            this.ViewPhotoTableLayoutPanel.Hide();

            var photoControl = new CropPhotoControl();
            photoControl.Image = this.ViewPhotoBox.Image;
            photoControl.CancelEvent += this.CancelCrop;
            photoControl.ContinueEvent += this.ContinueCrop;
            photoControl.ContinueBlackAndWhiteEvent += this.ContinueBlackAndWhite;
            photoControl.ContinueRotateEvent += this.ContinueRotate;
            this.Controls.Add(photoControl);
            photoControl.Dock = DockStyle.Fill;

            photoControl.Show();
            this.ResumeLayout();
        }