Ejemplo n.º 1
0
        /// <summary>
        /// Disposes resources used by the control.
        /// </summary>
        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing)
            {
                if (components != null)
                {
                    components.Dispose();
                }

                for (int i = capturedFiles.Count - 1; i >= 0; i--)
                {
                    CapturedFile capturedFile = capturedFiles[i];
                    Control      control      = capturedFileViews[capturedFile.Time];

                    this.Controls.Remove(control);
                    control.Dispose();

                    capturedFileViews.Remove(capturedFile.Time);

                    capturedFiles.Remove(capturedFile);
                    capturedFile.Dispose();
                }
            }

            base.Dispose(disposing);
        }
Ejemplo n.º 2
0
        private void HideCapturedFileView(CapturedFile capturedFile)
        {
            bool alignedToFirst = first == capturedFileViews.Count - 1;

            this.Controls.Remove(capturedFileViews[capturedFile.Time]);
            capturedFileViews.Remove(capturedFile.Time);

            capturedFiles.Remove(capturedFile);
            capturedFile.Dispose();

            if (alignedToFirst)
            {
                first--;
            }

            RecomputeSpots();
            LayoutThumbnails();
            Invalidate();
        }