private void ShowPhotoBoothWindow()
        {
            PhotoBoothWindow window = new PhotoBoothWindow()
            {
                BottomVerticalText = this.CardBottomVerticalText,
                TopVerticalText    = this.CardTopVerticalText,
                BannerText         = this.CardBannerText,
                Camera             = this.camera,
                PrinterSetupTicket = this.printerSetupTicket,
                OneButtonOperation = this.OneButtonOperation
            };

            if (this.KioskMode)
            {
                window.WindowState = System.Windows.WindowState.Maximized;
                window.WindowStyle = System.Windows.WindowStyle.None;
                window.Topmost     = true;
            }

            if (!string.IsNullOrEmpty(this.SaveFileFolder))
            {
                DirectoryInfo saveFolderInfo = new DirectoryInfo(this.SaveFileFolder);
                if (saveFolderInfo.Exists)
                {
                    window.SaveCards        = true;
                    window.SaveFileLocation = saveFolderInfo;
                }
            }

            window.Image1File = Properties.Settings.Default.ImagePath1;
            window.Image2File = Properties.Settings.Default.ImagePath2;
            window.Image3File = Properties.Settings.Default.ImagePath3;
            window.Image4File = Properties.Settings.Default.ImagePath4;

            window.ShowDialog();

            if (window.ClosedAbnormally)
            {
                //MessageBox.Show("Photobooth closed abnormally");
                this.CloseCamera();
            }
        }
Ejemplo n.º 2
0
        private void ShowPhotoBoothWindow()
        {
            PhotoBoothWindow window = new PhotoBoothWindow()
            {
                Camera             = this.camera,
                PrinterSetupTicket = this.printerSetupTicket,
                PrintQueue         = this.printQueue,
                OneButtonOperation = this.OneButtonOperation,
                OneButtonMessage   = this.OneButtonMessage,
                CardTemplate       = this.SelectedTemplate,
                SaveCards          = this.SaveCards
            };

            if (this.KioskMode)
            {
                window.WindowState = System.Windows.WindowState.Maximized;
                window.WindowStyle = System.Windows.WindowStyle.None;
                window.Topmost     = true;
            }

            if (this.SaveCards && !string.IsNullOrEmpty(this.SaveFileFolder))
            {
                DirectoryInfo saveFolderInfo = new DirectoryInfo(this.SaveFileFolder);
                if (saveFolderInfo.Exists)
                {
                    window.SaveFileLocation = saveFolderInfo;
                }
            }

            window.ShowDialog();

            if (window.ClosedAbnormally)
            {
                MessageBox.Show("Photobooth closed abnormally");
                this.CloseCamera();
            }
        }
        private void ShowPhotoBoothWindow()
        {
            PhotoBoothWindow window = new PhotoBoothWindow()
            {
                Camera = this.camera,
                PrinterSetupTicket = this.printerSetupTicket,
                OneButtonOperation = this.OneButtonOperation,
                OneButtonMessage = this.OneButtonMessage,
                CardTemplate = this.SelectedTemplate,
                SaveCards = this.SaveCards
            };

            if(this.KioskMode)
            {
                window.WindowState = System.Windows.WindowState.Maximized;
                window.WindowStyle = System.Windows.WindowStyle.None;
                window.Topmost = true;
            }

            if (this.SaveCards && !string.IsNullOrEmpty(this.SaveFileFolder))
            {
                DirectoryInfo saveFolderInfo = new DirectoryInfo(this.SaveFileFolder);
                if (saveFolderInfo.Exists)
                {
                    window.SaveFileLocation = saveFolderInfo;
                }
            }

            window.ShowDialog();

            if (window.ClosedAbnormally)
            {
                MessageBox.Show("Photobooth closed abnormally");
                this.CloseCamera();
            }
        }