예제 #1
0
        /// <summary>
        /// Starts the thumbnail download thread
        /// </summary>
        private void startingThumbnailDownload()
        {
            //Starting Thumbnail download
            tsslMessage.Text = "Thumbnail download started.";

            if (Properties.Settings.Default.SimulateCamera)
                thumbnailthread = new Thumbnails("", ref ks2.Filelist);
            else
                thumbnailthread = new Thumbnails(Properties.Settings.Default.IPAdressCamera, ref ks2.Filelist);

            thumbnailthread.NewFrame += thumbnailtread_NewFrame;
            thumbnailthread.Start();

            tbDebug.Text = ks2.Content;
        }
예제 #2
0
        /// <summary>
        /// Closing MainForm
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void FormMain_FormClosing(object sender, FormClosingEventArgs e)
        {
            //Stopping threads
            if (downloadthread != null)
            {
                downloadthread.Stop();
                downloadthread = null;
            }

            if (thumbnailthread != null)
            {
                thumbnailthread.Stop();
                thumbnailthread = null;
            }

            if (mjsource != null)
            {
                mjsource.Stop();
                mjsource = null;
            }

            Properties.Settings.Default.WindowSize = this.Size;
            Properties.Settings.Default.WindowLocation = this.Location;

            Properties.Settings.Default.splitContainerDebugPosition = splitContainerDebug.SplitterDistance;
            Properties.Settings.Default.splitContainerPictureviewPosition = splitContainerPictureview.SplitterDistance;

            Properties.Settings.Default.Save();

            log.Debug("Application closing");
        }