private void doUpdateUI(BaseWizardPage selectedPage)
 {
     if (selectedPage == optionsWizardPage)
     {
         selectedPage.AllowNext =
             exportLocalSettingsCheckEdit.Checked ||
             exportProjectFileCheckEdit.Checked ||
             exportResourceFilesCheckEdit.Checked;
     }
     else if (selectedPage == receiversWizardPage)
     {
         selectedPage.AllowNext =
             string.Compare(zulReceiversTextEdit.Text.Trim(), SendProjectController.VendorReceiverGuiName,
                            StringComparison.OrdinalIgnoreCase) == 0 ||
             StringHelper.IsValidEMailAddress(zulReceiversTextEdit.Text.Trim());
     }
     else if (selectedPage == progressWizardPage)
     {
         selectedPage.AllowBack = false;
         selectedPage.AllowNext = false;
     }
     else if (selectedPage == errorOccurredWizardPage)
     {
     }
     else if (selectedPage == successWizardPage)
     {
     }
     else
     {
         throw new Exception();
     }
 }
Beispiel #2
0
        protected override bool SetSelectedPageCore(BaseWizardPage prevPage, BaseWizardPage value, Direction direction)
        {
            bool result = base.SetSelectedPageCore(prevPage, value, direction);

            UpdateLinksStatus();
            return(result);
        }
Beispiel #3
0
        /// <summary>
        /// Sets the current view and updates the viewsitepanel
        /// </summary>
        /// <param name="page">current WizardPage</param>
        private void UpdateCurrentView(BaseWizardPage page)
        {
            if (page is XafWizardPage)
            {
                var wizardPage = page as XafWizardPage;
                if (wizardPage.View != null)
                {
                    wizardPage.View.SaveModel();
                    wizardPage.View.Dispose();
                    OnWizardPageDetailViewCreating();
                    wizardPage.View = Application.CreateDetailView(ObjectSpace, wizardPage.View.Id, false);
                    OnWizardPageDetailViewCreated();
                    wizardPage.View.CurrentObject = View.CurrentObject;

                    wizardPage.View.ErrorMessages.Clear();
                    ((Control)((IViewSiteTemplate)Frame.Template).ViewSiteControl).Parent = page;

                    UpdateControllers(wizardPage.View);

                    Frame.Template.SetView(wizardPage.View);
                    if (!View.ErrorMessages.IsEmpty)
                    {
                        wizardPage.View.ErrorMessages.LoadMessages(View.ErrorMessages);
                    }
                }
            }
        }
Beispiel #4
0
 private Rectangle GetInteriorHeaderBounds(bool useCached, BaseWizardPage page)
 {
     if (!useCached || interiorHeaderBounds == null)
     {
         interiorHeaderBounds = GetInteriorHeaderBoundsCore(page);
     }
     return(interiorHeaderBounds);
 }
Beispiel #5
0
        public override Rectangle GetInteriorPageBounds(BaseWizardPage page)
        {
            var r = base.GetInteriorPageBounds(page);

            r.X     -= WizardAeroConsts.ContentLeftMargin - WizardAeroConsts.ContentRightMargin;
            r.Width += WizardAeroConsts.ContentLeftMargin - WizardAeroConsts.ContentRightMargin;

            return(r);
        }
Beispiel #6
0
        public override Rectangle GetInteriorPageBounds(BaseWizardPage page)
        {
            Rectangle result = GetContentBounds();
            int       h      = GetInteriorHeaderBounds(false, page).Height + ((MyWizardViewInfo)ViewInfo).GetDividerSizeInternal();

            result.Y      += h;
            result.Height -= h;
            if (Wizard.AllowPagePadding)
            {
                result.Inflate(-Wizard97Consts.ContentMargin, -Wizard97Consts.ContentMargin);
            }
            return(result);
        }
Beispiel #7
0
        private Rectangle GetInteriorHeaderBoundsCore(BaseWizardPage page)
        {
            Rectangle result = GetContentBounds();

            if (page == null)
            {
                page = (WizardPage)Wizard.SelectedPage;
            }
            if (!(page is WizardPage))
            {
                return(base.GetInteriorHeaderBounds());
            }
            WizardAppearanceCollection appearances = ((MyWizardViewInfo)ViewInfo).AppearancesInternal;

            result.Height = CalcTextSize(page.Text, appearances.PageTitle, result.Width).Height;
            int descriptionWidth = result.Width - (8 * Wizard97Consts.ContentMargin);

            result.Height += CalcTextSize(((WizardPage)page).DescriptionText, appearances.Page, descriptionWidth).Height;
            result.Height += 2 * Wizard97Consts.ContentMargin;
            return(result);
        }
Beispiel #8
0
        /// <summary>
        /// Sets the current view and updates the viewsitepanel
        /// </summary>
        /// <param name="page">current WizardPage</param>
        private void UpdateCurrentView(BaseWizardPage page) {
            if (page is XafWizardPage) {
                var wizardPage = page as XafWizardPage;
                if (wizardPage.View != null) {
                    wizardPage.View.SaveModel();
                    wizardPage.View.Dispose();
                    OnWizardPageDetailViewCreating();
                    wizardPage.View = Application.CreateDetailView(ObjectSpace, wizardPage.View.Id, false);
                    OnWizardPageDetailViewCreated();
                    wizardPage.View.CurrentObject = View.CurrentObject;

                    wizardPage.View.ErrorMessages.Clear();
                    ((Control)((IViewSiteTemplate)Frame.Template).ViewSiteControl).Parent = page;

                    UpdateControllers(wizardPage.View);

                    Frame.Template.SetView(wizardPage.View);
                    if (!View.ErrorMessages.IsEmpty) {
                        wizardPage.View.ErrorMessages.LoadMessages(View.ErrorMessages);
                    }
                }

                
            }
        }
Beispiel #9
0
 protected override void OnPageRemoved(BaseWizardPage page)
 {
     base.OnPageRemoved(page);
     UpdateLinks();
 }
Beispiel #10
0
        /// <summary>
        /// Sets the current view and updates the viewsitepanel
        /// </summary>
        /// <param name="page">current WizardPage</param>
        private void UpdateCurrentView(BaseWizardPage page){
            ((XafWizardPage) page).View.ErrorMessages.Clear();
            ((Control) ((IViewSiteTemplate) Frame.Template).ViewSiteControl).Parent = page;

            UpdateControllers(((XafWizardPage) page).View);
            Frame.Template.SetView(((XafWizardPage) page).View);
            if (!View.ErrorMessages.IsEmpty){
                ((XafWizardPage) page).View.ErrorMessages.LoadMessages(View.ErrorMessages);
            }
        }
		private void doUpdateUI(BaseWizardPage selectedPage)
		{
			if (selectedPage == optionsWizardPage)
			{
				selectedPage.AllowNext =
					exportLocalSettingsCheckEdit.Checked ||
					exportProjectFileCheckEdit.Checked ||
					exportResourceFilesCheckEdit.Checked;
			}
			else if (selectedPage == receiversWizardPage)
			{
				selectedPage.AllowNext =
					string.Compare(zulReceiversTextEdit.Text.Trim(), SendProjectController.VendorReceiverGuiName,
								   StringComparison.OrdinalIgnoreCase) == 0 ||
					StringHelper.IsValidEMailAddress(zulReceiversTextEdit.Text.Trim());
			}
			else if (selectedPage == progressWizardPage)
			{
				selectedPage.AllowBack = false;
				selectedPage.AllowNext = false;
			}
			else if (selectedPage == errorOccurredWizardPage)
			{
			}
			else if (selectedPage == successWizardPage)
			{

			}
			else
			{
				throw new Exception();
			}
		}
		private void doUpdateUI(BaseWizardPage selectedPage)
		{
			if (selectedPage == fileGroupSelectionWizardPage)
			{
				invertFileGroupsButton.Enabled =
					fileGroupsListBox.Items.Count > 0;
				selectNoFileGroupsButton.Enabled =
					fileGroupsListBox.CheckedItems.Count > 0;
				selectAllFileGroupsButton.Enabled =
					fileGroupsListBox.Items.Count > 0 &&
					fileGroupsListBox.CheckedItems.Count <
					fileGroupsListBox.Items.Count;

				selectedPage.AllowNext =
					fileGroupsListBox.CheckedItems.Count > 0;
			}
			else if (selectedPage == languagesWizardPage)
			{
				invertLanguagesToExportButton.Enabled =
					languagesToExportCheckListBox.Items.Count > 0;
				selectNoLanguagesToExportButton.Enabled =
					languagesToExportCheckListBox.CheckedItems.Count > 0;
				selectAllLanguagesToExportButton.Enabled =
					languagesToExportCheckListBox.Items.Count > 0 &&
					languagesToExportCheckListBox.CheckedItems.Count <
					languagesToExportCheckListBox.Items.Count;

				selectedPage.AllowNext =
					referenceLanguageGroupBox.SelectedIndex >= 0 &&
					languagesToExportCheckListBox.CheckedItems.Count > 0;
			}
			else if (selectedPage == optionsWizardPage)
			{
				buttonResetOptions.Enabled = _canResetOptions;

				multipleFilesGroupControl.Visible =
					exportEachLanguageIntoSeparateExcelFileCheckEdit.Checked ||
					exportGroupsAsExcelFilesCheckEdit.Checked;

				buttonDecorateSimpleAutomatically.Visible =
					!(exportEachLanguageIntoSeparateExcelFileCheckEdit.Checked ||
					  exportGroupsAsExcelFilesCheckEdit.Checked);

				selectedPage.AllowNext = true;
			}
			else if (selectedPage == advancedOptionsWizardPage)
			{
				buttonResetOptions.Enabled = _canResetAdvancedOptions;

				// Must at least have one of those two.
				selectedPage.AllowNext =
					exportNameColumnCheckEdit.Checked ||
					exportReferenceLanguageColumnCheckEdit.Checked;
			}
			else if (selectedPage == destinationFileWizardPage)
			{
				selectedPage.AllowNext =
					destinationFileTextEdit.Text.Trim().Length > 0 &&
					ZlpPathHelper.GetExtension(destinationFileTextEdit.Text.Trim().ToLowerInvariant()) == @".xls";
			}
			else if (selectedPage == sendWithZetaUploaderWizardPage)
			{
				zulReceiversTextEdit.Enabled =
					labelControl10.Visible =
					zulSubjectTextEdit.Visible =
					zulBodyTextEdit.Visible =
					buttonZulReset.Visible =
					sendFilesToEMailReceiversCheckEdit.Checked;

				selectedPage.AllowNext =
					!sendFilesToEMailReceiversCheckEdit.Checked ||
					StringHelper.IsValidEMailAddress(zulReceiversTextEdit.Text.Trim());
			}
			else if (selectedPage == progressWizardPage)
			{
			}
			else if (selectedPage == errorOccurredWizardPage)
			{
			}
			else if (selectedPage == successWizardPage)
			{
			}
			else
			{
				throw new Exception();
			}
		}
 public override Rectangle GetInteriorPageBounds(BaseWizardPage page)
 {
     return(GetExteriorPageBounds(page));
 }