protected override void OnLoad(EventArgs e) { if (BaseWizardPresenter != null) { ProtectionType = BaseWizardPresenter.OnDocumentLoaded(); Control[] coverPageLabel = Controls.Find("lblCoverPageTitle", true); if (coverPageLabel.Length == 1) { string selectedCoverPage = BaseWizardPresenter.ReadDocumentProperty(Constants.WordDocumentProperties.CoverPageTitle); coverPageLabel[0].Text = (String.IsNullOrEmpty(selectedCoverPage) ? coverPageLabel[0].Text : selectedCoverPage); } Control[] titleLabel = Controls.Find("lblLogoTitle", true); if (titleLabel.Length == 1) { string selectedLogo = BaseWizardPresenter.ReadDocumentProperty(Constants.WordDocumentProperties.LogoTitle); titleLabel[0].Text = (String.IsNullOrEmpty(selectedLogo) ? titleLabel[0].Text : selectedLogo); } BaseWizardPresenter.CloseInformationPanel(true); } CenterToScreen(); CenterToParent(); //Task.Factory.StartNew(() => Thread.Sleep(3000)).ContinueWith(task => this.Activate(), TaskScheduler.FromCurrentSynchronizationContext()); base.OnLoad(e); }
protected override void OnLoad(EventArgs e) { if (BaseWizardPresenter != null) { ProtectionType = BaseWizardPresenter.OnDocumentLoaded(); Control[] coverPageLabel = Controls.Find("lblCoverPageTitle", true); if (coverPageLabel.Length == 1) { string selectedCoverPage = BaseWizardPresenter.ReadDocumentProperty(Constants.WordDocumentProperties.CoverPageTitle); //catch all document upgrades. //in october 2014 oamps renamed to author j gall //to ensure no document was left upgraded the below business rules catches any document missed if (selectedCoverPage != null && selectedCoverPage.Equals("boulder opal", StringComparison.OrdinalIgnoreCase)) { selectedCoverPage = "Cover Woodshed"; } coverPageLabel[0].Text = (String.IsNullOrEmpty(selectedCoverPage) ? coverPageLabel[0].Text : selectedCoverPage); } Control[] titleLabel = Controls.Find("lblLogoTitle", true); if (titleLabel.Length == 1) { string selectedLogo = BaseWizardPresenter.ReadDocumentProperty(Constants.WordDocumentProperties.LogoTitle); //catch all document upgrades. //in october 2014 oamps renamed to author j gall //to ensure no document was left upgraded the below business rules catches any document missed if (selectedLogo != null && selectedLogo.Equals("oamps insurance brokers ltd", StringComparison.OrdinalIgnoreCase)) { selectedLogo = "Arthur J. Gallagher & Co (Aus) Limited"; } titleLabel[0].Text = (String.IsNullOrEmpty(selectedLogo) ? titleLabel[0].Text : selectedLogo); } BaseWizardPresenter.CloseInformationPanel(true); } CenterToScreen(); CenterToParent(); //Task.Factory.StartNew(() => Thread.Sleep(3000)).ContinueWith(task => this.Activate(), TaskScheduler.FromCurrentSynchronizationContext()); base.OnLoad(e); }