static ImageQueue GetQueue() { // Read SlideSaver config from the registry and init the ImageQueue for the slide show Config config = Utils.LoadConfig(); ImageQueue queue = new ImageQueue(config.BasePath, config.IncludeSubdirectories, config.SequenceMode, 10); return(queue); }
static void Preview(IntPtr handle) { // For preview mode we need to set a single form using the handle of the parent window making the call ImageQueue queue = GetQueue(); SlideShowForm form = new SlideShowForm(queue); form.SetPreviewMode(handle); queue.ForceEnqueue(1); RunSlideShow(new List <Form>() { form }); }
static void FullScreen() { // For full screen we need to init a form for each screen; all forms can read from a single queue ImageQueue queue = GetQueue(); List <Form> forms = new List <Form>(); foreach (Screen screen in Screen.AllScreens) { SlideShowForm form = new SlideShowForm(queue); forms.Add(form); form.Bounds = screen.Bounds; } queue.ForceEnqueue(Screen.AllScreens.Count()); RunSlideShow(forms); }
/// <summary> /// Creates a new SlideShowForm instance which will pull from the specified image queue /// </summary> public SlideShowForm(ImageQueue queue) { InitializeComponent(); Queue = queue; KeyPreview = true; }