コード例 #1
0
        public ManualSelectionDriversPage(MainWindow window, WinRaspItem raspItem, dynamic lang)
        {
            InitializeComponent();

            this.window   = window;
            this.raspItem = raspItem;
            this.langjson = lang;

            if (langjson != null && langjson.pages.manualSelectionDriversPage != null)
            {
                titleTextBlock.Text         = langjson.pages.manualSelectionDriversPage.title;
                driverListTextBlock.Text    = langjson.pages.manualSelectionDriversPage.driverVersionComboBoxLabel;
                isDebugModeCheckbox.Content = langjson.pages.manualSelectionDriversPage.debugModeLabel;

                cancelButton.Content = langjson.common_elements.cancel_button;
                backButton.Content   = langjson.common_elements.back_button;
                nextButton.Content   = langjson.common_elements.next_button;
            }

            this.window.isLockdownMode = false;
            this.window.forceCleanUp   = true;
            this.window.raspItem       = raspItem;

            loadDriverPaths();
        }
コード例 #2
0
        public CompletedSetupPage(MainWindow window, WinRaspItem raspItem, dynamic lang, bool wasSuccess, bool willClose = false)
        {
            InitializeComponent();

            this.window     = window;
            this.raspItem   = raspItem;
            this.wasSuccess = wasSuccess;
            this.langjson   = lang;

            if (langjson != null && langjson.pages.completedSetupPage != null)
            {
                subtitleTextBlock.Content = langjson.pages.completedSetupPage.subtitle;
                exitButton.Content        = langjson.common_elements.exit_button;
            }

            this.window.isLockdownMode = false;
            this.window.forceCleanUp   = false;

            if (wasSuccess)
            {
                if (langjson != null && langjson.pages.completedSetupPage != null)
                {
                    titleTextBlock.Text = langjson.pages.completedSetupPage.title_successful;
                }
                else
                {
                    titleTextBlock.Text = "Successfully Completed Windows Setup";
                }

                if (raspItem != null)
                {
                    SuccessStack.Visibility   = Visibility.Visible;
                    installUEFIButton.Content = raspItem.appFolderPath + "/SignWindows.cmd";
                    //signUEFIButton.Content = raspItem.appFolderPath + "/SignUEFIFiles.cmd";
                }
                else
                {
                    SuccessStack.Visibility = Visibility.Collapsed;
                }
            }
            else
            {
                if (langjson != null && langjson.pages.completedSetupPage != null)
                {
                    titleTextBlock.Text = langjson.pages.completedSetupPage.title_unsuccessful;
                }
                else
                {
                    titleTextBlock.Text = "Unsuccessfully Completed Windows Setup";
                }
                SuccessStack.Visibility = Visibility.Collapsed;
            }

            if (willClose)
            {
                window.Close();
            }
        }
コード例 #3
0
        public FormatSDCardPage(MainWindow window, WinRaspItem raspItem, dynamic lang)
        {
            InitializeComponent();

            this.window   = window;
            this.raspItem = raspItem;
            this.langjson = lang;

            if (langjson != null && langjson.pages.formattingSDDrivePage != null)
            {
                titleTextBlock.Text = langjson.pages.formattingSDDrivePage.title;
            }

            this.window.isLockdownMode = true;
            this.window.forceCleanUp   = false;

            FormatSDDrive();
        }
        public DownloadingWindowsISOFilePage(MainWindow window, WinRaspItem raspItem, dynamic lang)
        {
            InitializeComponent();

            this.window   = window;
            this.raspItem = raspItem;
            this.langjson = lang;

            if (langjson != null && langjson.pages.downloadingWindowsISOFilePage != null)
            {
                titleTextBlock.Text    = langjson.pages.downloadingWindowsISOFilePage.title;
                subtitleTextBlock.Text = langjson.pages.downloadingWindowsISOFilePage.subtitle;
            }

            this.window.isLockdownMode = true;
            this.window.forceCleanUp   = false;

            DownloadWindows();
        }
        public SigningWindowsFilesPage(MainWindow window, WinRaspItem raspItem, dynamic lang)
        {
            InitializeComponent();

            this.window   = window;
            this.raspItem = raspItem;

            this.window.isLockdownMode = true;
            this.window.forceCleanUp   = true;
            this.window.raspItem       = raspItem;
            this.langjson = lang;

            if (langjson != null && langjson.pages.signingWindowsFilesPage != null)
            {
                titleTextBlock.Text    = langjson.pages.signingWindowsFilesPage.title;
                subtitleTextBlock.Text = langjson.pages.signingWindowsFilesPage.subtitle;
            }

            SignWindowsFiles();
        }
        public ModifingInstallWimPage(MainWindow window, WinRaspItem raspItem, dynamic lang)
        {
            InitializeComponent();

            this.window   = window;
            this.raspItem = raspItem;
            this.langjson = lang;

            if (langjson != null && langjson.pages.modifingInstallWimPage != null)
            {
                titleTextBlock.Text    = langjson.pages.modifingInstallWimPage.title;
                subtitleTextBlock.Text = langjson.pages.modifingInstallWimPage.subtitle;
            }

            this.window.isLockdownMode = true;
            this.window.forceCleanUp   = true;
            this.window.raspItem       = raspItem;

            ModifingInstallWim();
        }
コード例 #7
0
        public SelectAUUPPackageFilePage(MainWindow window, WinRaspItem raspItem, dynamic lang)
        {
            InitializeComponent();

            this.window   = window;
            this.raspItem = raspItem;
            this.langjson = lang;

            if (langjson != null && langjson.pages.selectAUUPPackageFilePage != null)
            {
                titleTextBlock.Text      = langjson.pages.selectAUUPPackageFilePage.title;
                uupPackageTextBlock.Text = langjson.pages.selectAUUPPackageFilePage.uupPackageTextFieldLabel;

                cancelButton.Content = langjson.common_elements.cancel_button;
                backButton.Content   = langjson.common_elements.back_button;
                nextButton.Content   = langjson.common_elements.next_button;
            }

            this.window.isLockdownMode = false;
            this.window.forceCleanUp   = false;
        }
コード例 #8
0
        public CleanUpPage(MainWindow window, WinRaspItem raspItem, dynamic lang, bool wasSuccess, bool willClose = false)
        {
            InitializeComponent();

            this.window     = window;
            this.raspItem   = raspItem;
            this.wasSuccess = wasSuccess;
            this.willClose  = willClose;
            this.langjson   = lang;

            if (langjson != null && langjson.pages.cleanUpPage != null)
            {
                titleTextBlock.Text    = langjson.pages.cleanUpPage.title;
                subtitleTextBlock.Text = langjson.pages.cleanUpPage.subtitle;
            }

            this.window.isLockdownMode = true;
            this.window.forceCleanUp   = false;

            cleanUp();
        }
コード例 #9
0
        public SelectPackagesPage(MainWindow window, WinRaspItem raspItem, dynamic lang)
        {
            InitializeComponent();

            this.window   = window;
            this.raspItem = raspItem;
            this.langjson = lang;

            if (langjson != null && langjson.pages.selectingRaspiPackagesPage != null)
            {
                titleTextBlock.Text          = langjson.pages.selectingRaspiPackagesPage.title;
                raspberryPiPkgTextBlock.Text = langjson.pages.selectingRaspiPackagesPage.raspPiPkgTextFieldLabel;
                windowsOnRaspiTextBlock.Text = langjson.pages.selectingRaspiPackagesPage.winOnRaspTextFieldLabel;

                cancelButton.Content = langjson.common_elements.cancel_button;
                nextButton.Content   = langjson.common_elements.next_button;
            }

            this.window.isLockdownMode = false;
            this.window.forceCleanUp   = false;
        }
コード例 #10
0
        public HasSDFormatedProperlyPage(MainWindow window, WinRaspItem raspItem, dynamic lang)
        {
            InitializeComponent();

            this.window   = window;
            this.raspItem = raspItem;
            this.langjson = lang;

            if (langjson != null && langjson.pages.hasSDFormatedProperlyPage != null)
            {
                titleTextBlock.Text      = langjson.pages.hasSDFormatedProperlyPage.title;
                subtitle_1TextBlock.Text = langjson.pages.hasSDFormatedProperlyPage.subtitle_1;
                subtitle_2TextBlock.Text = langjson.pages.hasSDFormatedProperlyPage.subtitle_2;
                subtitle_3TextBlock.Text = langjson.pages.hasSDFormatedProperlyPage.subtitle_3;

                cancelButton.Content = langjson.common_elements.cancel_button;
                noButton.Content     = langjson.common_elements.no_button;
                yesButton.Content    = langjson.common_elements.yes_button;
            }

            this.window.isLockdownMode = false;
            this.window.forceCleanUp   = false;
        }
        public SelectedRecommendedDriversPage(MainWindow window, WinRaspItem raspItem, dynamic lang)
        {
            InitializeComponent();

            this.window   = window;
            this.raspItem = raspItem;
            this.langjson = lang;

            if (langjson != null && langjson.pages.selectedRecommendedDriversPage != null)
            {
                titleTextBlock.Text = langjson.pages.selectedRecommendedDriversPage.title;

                useRecommendDriversRadioButton.Content   = langjson.pages.selectedRecommendedDriversPage.option_1;
                manuallySelectDriversRadioButton.Content = langjson.pages.selectedRecommendedDriversPage.option_2;

                cancelButton.Content = langjson.common_elements.cancel_button;
                nextButton.Content   = langjson.common_elements.next_button;
            }

            this.window.isLockdownMode = false;
            this.window.forceCleanUp   = true;
            this.window.raspItem       = raspItem;
        }
        public ISOFiIeSourceOptionsPage(MainWindow window, WinRaspItem raspItem, dynamic lang)
        {
            InitializeComponent();

            this.window   = window;
            this.raspItem = raspItem;
            this.langjson = lang;

            if (langjson != null && langjson.pages.isoSelectionOptionsPage != null)
            {
                titleTextBlock.Text = langjson.pages.isoSelectionOptionsPage.title;

                selectAWindowsISOFilePathRadioButton.Content = langjson.pages.isoSelectionOptionsPage.option_1;
                downloadUsingUUPMethodRadioButton.Content    = langjson.pages.isoSelectionOptionsPage.option_2;

                cancelButton.Content = langjson.common_elements.cancel_button;
                backButton.Content   = langjson.common_elements.back_button;
                nextButton.Content   = langjson.common_elements.next_button;
            }

            this.window.isLockdownMode = false;
            this.window.forceCleanUp   = false;
            this.window.raspItem       = raspItem;
        }
コード例 #13
0
        public SettingUpTempFilesPage(MainWindow window, WinRaspItem raspItem, dynamic lang)
        {
            InitializeComponent();

            raspItem.appFolderPath = System.IO.Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), "WinOnRaspi-Media-Creator-Tool");
            raspItem.tempFolders   = new string[5];

            this.window   = window;
            this.raspItem = raspItem;

            this.window.isLockdownMode = true;
            this.window.forceCleanUp   = true;
            this.window.raspItem       = raspItem;
            this.langjson = lang;

            if (langjson != null && langjson.pages.settingUpTempFilesPage != null)
            {
                titleTextBlock.Text    = langjson.pages.settingUpTempFilesPage.title;
                subtitleTextBlock.Text = langjson.pages.settingUpTempFilesPage.subtitle;
            }
            //this.window.SetPage(new CleanUpPage(this.window, raspItem, false));

            SetupTempFiles();
        }
コード例 #14
0
        public SelectSDCardPage(MainWindow window, dynamic lang)
        {
            InitializeComponent();

            this.window   = window;
            this.langjson = lang;
            raspItem      = new WinRaspItem();

            if (langjson != null && langjson.pages.selectDrivePage != null)
            {
                titleTextBlock.Text       = langjson.pages.selectDrivePage.title;
                selectDriveTextBlock.Text = langjson.pages.selectDrivePage.selectDriveTextFieldLabel;

                cancelButton.Content  = langjson.common_elements.cancel_button;
                backButton.Content    = langjson.common_elements.back_button;
                nextButton.Content    = langjson.common_elements.next_button;
                refreshButton.Content = langjson.common_elements.refresh_button;
            }

            this.window.isLockdownMode = false;
            this.window.forceCleanUp   = false;

            RefreshDisks();
        }