Exemplo n.º 1
0
 internal static void OnLicenseAgreed()
 {
     // Release notes only if not launched with document
     if (ApplicationCenter.WaitingDocument == null && isNewVersion)
     {
         // Release Notes
         Screen = new ReleaseNotesPage(MainVM.Current.ReleaseNotes);
     }
     else
     {
         isBriefingComplete = true;
         OnRequiredComplete();
     }
 }
Exemplo n.º 2
0
        // [Test]
        public void TcCheckForRelease()
        {
            if (driver is null)
            {
                Assert.Fail("Driver not initialized");
                return;
            }

            ReleaseNotesPage releaseNotesPage = new ReleaseNotesPage(driver);
            DatabaseHelper   databaseHelper   = new DatabaseHelper();
            KeywordChecker   keywordChecker   = new KeywordChecker();
            ReportHelper     reportHelper     = new ReportHelper();

            var newRelease    = new List <List <string> >();
            var foundKeywords = new List <string>();


            releaseNotesPage.ValidatePageType();

            if (releaseNotesPage.CheckForNewRelease())
            {
                newRelease = releaseNotesPage.GetNewReleaseNotes();
                databaseHelper.UpdateDatabase(newRelease);

                if (!checkKeywords)
                {
                    reportHelper.CreateReport(keywordChecker.keywords, databaseHelper.GetLastReleaseNotes(), checkKeywords);
                    Assert.Fail("Found Release of Ranorex differs from the archived: \n" +
                                "Archived Release: \t" + databaseHelper.GetLastRelease() + "\n" +
                                "Found Release: \t" + newRelease[0][0] + "\n\n" +
                                "Actions are needed!");
                }
                else
                {
                    foundKeywords = keywordChecker.checkReleaseNotes(newRelease);
                }
                if (foundKeywords.Count > 0)
                {
                    reportHelper.CreateReport(foundKeywords, databaseHelper.GetLastReleaseNotes(), checkKeywords);
                    Assert.Fail("New Release contains keywords. Actions needed");
                }
                else
                {
                    Assert.Pass("There is a new release of Ranorex, but no keywords were matched");
                }
            }
            Assert.Pass("There is no new release of Ranorex");
        }
Exemplo n.º 3
0
        public static void Main(String[] args)
        {
            try {
                Application.EnableVisualStyles();
                Application.SetCompatibleTextRenderingDefault(false);

                InstallerResources.CurrentLanguageChanged += new EventHandler(InstallerResources_CurrentLanguageChanged);

                InstallationInfo.ProgramMode = ProgramMode.None;

                #region Initial PackageInfo Options

                // set this here because there's nowhere else to put it
                // HACK: Devise a shortlist of known languages that have this problem
                // also, does this affect Vista?
                if (Environment.OSVersion.Version.Major == 5)
                {
                    PackageInfo.LiteMode = System.Globalization.CultureInfo.InstalledUICulture.DisplayName.IndexOf("English", StringComparison.OrdinalIgnoreCase) == -1;
                }

                if (InstallerResources.IsCustomized)
                {
                    PackageInfo.IgnoreCondition = InstallerResources.CustomizedSettings.DisablePackageCheck;
                }

                PackageInfo.SystemRestore = true;

                InstallationInfo.FeedbackSend = true;

                #endregion

                if (args.Length > 0)
                {
                    //////////////////////////////////////////
                    // Pause
                    if (args.IndexOf("/pause") > -1)
                    {
                        MessageBox.Show("Paused", "Anolis Installer", MessageBoxButtons.OK, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1);
                    }

                    //////////////////////////////////////////
                    // Package Condition
                    if (args.IndexOf("/ignoreCondition") > -1)
                    {
                        PackageInfo.IgnoreCondition = true;
                    }

                    //////////////////////////////////////////
                    // Uninstall Mode
                    String uninstall = GetUninstallation(args);
                    if (uninstall != null)
                    {
                        InstallationInfo.UninstallPackage = new FileInfo(uninstall);
                        InstallationInfo.ProgramMode      = ProgramMode.UninstallPackage;
                    }

                    //////////////////////////////////////////
                    // Jump-to-Package
//
//					String filename = args[0];
//					if( File.Exists( filename ) ) {
//
//						String ext = Path.GetExtension( filename ).ToUpperInvariant();
//						if(ext == ".ANOP") { // package archive
//
//						} else if( ext == ".XML") { // package definition
//
//						}
//
//					}
                }



                // preload resources
                System.Drawing.Image
                    image = InstallerResources.GetImage("Background");
                image = InstallerResources.GetImage("Banner");

                // Set up the wizard

                // create the pages
                PageAWelcome    = new WelcomePage();
                PageBMainAction = new MainActionPage();

                PageCASelectPackage  = new SelectPackagePage();
                PageCBExtracting     = new ExtractingPage();
                PageCCUpdatePackage  = new UpdatePackagePage();
                PageCDReleaseNotes   = new ReleaseNotesPage();
                PageCE1Selector      = new SelectorPage();
                PageCE2ModifyPackage = new ModifyPackagePage();
                PageCFInstallOpts    = new InstallationOptionsPage();
                PageCFInstallOptForm = new InstallationOptionsForm();
                PageCGInstalling     = new InstallingPage();

                PageDADestination = new DestinationPage();
                PageDBDownloading = new DownloadingPage();

                PageEASelectBackup = new SelectBackupPage();

                PageFFinished = new FinishedPage();

                WizardForm = InstallationInfo.CreateWizard();

                WizardForm.CancelClicked += new EventHandler(wiz_CancelClicked);
                WizardForm.HasHelp        = false;
                WizardForm.Title          = InstallationInfo.InstallerTitle;
                WizardForm.Icon           = InstallerResources.GetIcon("Package");

                WizardForm.NextText   = InstallerResources.GetString("Wiz_Next");
                WizardForm.BackText   = InstallerResources.GetString("Wiz_Prev");
                WizardForm.CancelText = InstallerResources.GetString("Wiz_Cancel");

                InstallerResources.ForceLocalize();
            } catch (Exception ex) {
                StringBuilder sb = new StringBuilder();
                while (ex != null)
                {
                    sb.Append(ex.Message);
                    sb.Append("\r\n");
                    sb.Append(ex.StackTrace);

                    if (ex.InnerException != null)
                    {
                        sb.Append("\r\n\r\n");
                    }

                    ex = ex.InnerException;
                }

                MessageBox.Show(sb.ToString(), "Anolis Installer - Initialisation Exception", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1);
                return;
            }

            switch (InstallationInfo.ProgramMode)
            {
            case ProgramMode.UninstallPackage:
                WizardForm.LoadPage(PageEASelectBackup);
                break;

            case ProgramMode.None:
            default:
                WizardForm.LoadPage(PageAWelcome);
                break;
            }

            WizardForm.Run();


            // Clean-up
            if (PackageInfo.Package != null && (PackageInfo.Source == PackageSource.Embedded || PackageInfo.Source == PackageSource.Archive))
            {
                PackageInfo.Package.DeleteFiles();
            }
        }