Example #1
0
        // Constructor with slide show
        public SlideShowEditor(SlideShow aSlideShow) : this()
        {
            iSlideShow     = aSlideShow;
            iWorkingFolder = Path.GetDirectoryName(iSlideShow.GetFilePath());

            // Load picture boxes for start of show
            iCurrentPosition = 0;
            iSlideShow.Reset();
            toolStripProgressBar.Value = 0;
            InitialiseShow();
        }
Example #2
0
        void InitialiseShow()
        {
            // Load picture boxes for start of show
            iCurrentPosition = 0;
            iSlideShow.Reset();
            toolStripProgressBar.Minimum = 0;
            toolStripProgressBar.Maximum = iSlideShow.Count - 1;
            toolStripProgressBar.Value   = 0;
            LoadPictures();

            // Show how many pictures are currently in the slide show
            toolStripCountLabel.Text = string.Format("{0} pictures", iSlideShow.Count);

            // We have loaded just the pictures defined in the slideshow.
            // Check if there are any additional pictures in the folder.
            toolStripDropDownButton.Visible = (iSlideShow.GetUnincludedPictures().Count > 0);
        }
Example #3
0
        private void playButton_Click(object sender, EventArgs e)
        {
            // Get the slide show for the current event
            SlideShow selectedShow = iEventList.GetSlideShow(eventsListBox.SelectedIndex);

            if (selectedShow == null)
            {
                int    choice     = eventsListBox.SelectedIndex;
                string choiceName = eventsListBox.Items[choice].ToString();
                MessageBox.Show("Slide show for <" + choiceName + "> event cannot be played");
            }
            else
            {
                selectedShow.Reset();
                SlideViewerForm slideScreen = new SlideViewerForm(selectedShow, iSlideParameters);
                slideScreen.Show();
            }
        }