/// <summary>
        /// Special initializing of wizard pages.
        /// </summary>
        protected override void PostInit()
        {
            base.PostInit();

            foreach (WizardPageBase page in Pages)
            {
                FleetSetupWizardImportObjectsPage importObjectsPage = page as FleetSetupWizardImportObjectsPage;
                if (importObjectsPage != null)
                {
                    ImportProfile profile = CommonHelpers.GetOneTimeProfile(ImportType.Orders);
                    importObjectsPage.PostInit(profile);
                }
            }
        }
예제 #2
0
        private void _onFlyCreatingProfilePage_Unloaded(object sender, RoutedEventArgs e)
        {
            Debug.Assert(null != _onFlyCreatingProfilePage);

            // unsubscribe events
            _onFlyCreatingProfilePage.EditOK -= _onFlyCreatingProfilePage_EditOK;
            _onFlyCreatingProfilePage.EditCancel -= _onFlyCreatingProfilePage_EditCancel;
            _onFlyCreatingProfilePage.Unloaded -= _onFlyCreatingProfilePage_Unloaded;
            _onFlyCreatingProfilePage = null;

            App.Current.MainWindow.ToggleWidgetsState(ParentPage, IGNORED_WIDGETS, true);
        }
예제 #3
0
        ///////////////////////////////////////////////////////////////////////////////////////////
        ///////////////////////////////////////////////////////////////////////////////////////////
        ///////////////////////////////////////////////////////////////////////////////////////////
        /// <summary>
        /// Internal execute.
        /// </summary>
        /// <param name="args">Commnad arguments.</param>
        protected override void _Execute(params object[] args)
        {
            _ClearGridSelectionOnParentPage();

            ImportProfilesKeeper importProfileKeeper = _Application.ImportProfilesKeeper;
            ImportProfile profile = importProfileKeeper.GetDefaultProfile(Type);
            if (null != profile)
                // start import with default profile
                _DoImport(profile);
            else
            {   // default profile absent - use on fly profile

                // create page to on fly creating profile
                Type type = typeof(FleetSetupWizardImportObjectsPage);
                _onFlyCreatingProfilePage =
                    (FleetSetupWizardImportObjectsPage)Activator.CreateInstance(type);
                _onFlyCreatingProfilePage.Loaded +=
                    new RoutedEventHandler(_onFlyCreatingProfilePage_Loaded);

                // create empty profile
                _doesNewProfile = (null == importProfileKeeper.GetOneTimeProfile(Type));
                ImportProfile onFlyProfile = CommonHelpers.GetOneTimeProfile(Type);

                // init page state
                _onFlyCreatingProfilePage.PostInit(onFlyProfile);

                // show page
                App.Current.MainWindow.PageFrame.Navigate(_onFlyCreatingProfilePage);
            }
        }