duheng
2024-10-23 e1b779122eae7002f1d512bd1e8135ea8080c95f
WinFrmUI/HStation.WinFrmUI.Xhs.Core/02-project/01-import/00-core/ImportXhsProjectDlg.cs
@@ -1,5 +1,7 @@
using DevExpress.XtraEditors;
using DevExpress.XtraLayout.Utils;
using HStation.WinFrmUI.Xhs;
using HStation.WinFrmUI.Xhs.Core.Properties;
namespace HStation.WinFrmUI
{
@@ -31,35 +33,12 @@
            _wizard = new ImportXhsProjectManager(_vm);
            _wizard.SelectedPageChangedEvent += _wizard_SelectedPageChangedEvent;
            _wizard.SelectedPageStateChangedEvent += _wizard_SelectedPageStateChangedEvent; ;
            InputXhsProjectInfoWizardPage.AutoAddItem += AutoAddItem;
            InputXhsProjectInfoWizardPage.DeleteItem += DeleteItem;
            _wizard.InitialManager(new IWizardPage<ImportXhsProjectViewModel>[] {
                this.inputXhsProjectInfoWizardPage,
                this.setXhsProjectMapLocationWizardPage,
                this.generateXhsProjectWizardPage,
                this.importXhsProjectCompletedWizardPage
                 this.projectResultShowPanel1
            });
        }
        //增加导航条item
        private void AutoAddItem()
        {
            if (stepProgressBar1.Items.Count >= 5)
            {
                for (int i = 0; i < 3; i++)
                {
                    stepProgressBar1.Items.RemoveAt(2);
                }
            }
            StepProgressBarItem stepPbInputProjectInfo = new StepProgressBarItem();
            stepPbInputProjectInfo.ContentBlock2.Caption = "自动生成项目";
            StepProgressBarItem stepPbImportComleted = new StepProgressBarItem();
            stepPbImportComleted.ContentBlock2.Caption = "项目导入完成";
            StepProgressBarItem stepGenerateProject = new StepProgressBarItem();
            stepGenerateProject.ContentBlock2.Caption = "项目展示结果";
            this.stepProgressBar1.Items.Add(stepPbInputProjectInfo);
            this.stepProgressBar1.Items.Add(stepPbImportComleted);
            this.stepProgressBar1.Items.Add(stepGenerateProject);
        }
        //删除导航条item