lixiaojun
2024-10-25 1e18310601b076d26329bb0a0e070afeb61d12f4
WinFrmUI/HStation.WinFrmUI.Xhs.Core/02-project/01-import/00-core/ImportXhsProjectDlg.cs
@@ -1,4 +1,7 @@
using DevExpress.XtraLayout.Utils;
using DevExpress.XtraEditors;
using DevExpress.XtraLayout.Utils;
using HStation.WinFrmUI.Xhs;
using HStation.WinFrmUI.Xhs.Core.Properties;
namespace HStation.WinFrmUI
{
@@ -9,12 +12,13 @@
            InitializeComponent();
        }
        private readonly ImportXhsProjectViewModel _vm = new();
        private ImportXhsProjectManager _wizard;
        private static bool IsAddItem = true;
        /// <summary>
        ///
        ///
        /// </summary>
        public ImportXhsProjectViewModel ViewModel
        {
@@ -22,7 +26,7 @@
        }
        /// <summary>
        ///
        ///
        /// </summary>
        public void SetBindingData()
        {
@@ -30,12 +34,23 @@
            _wizard.SelectedPageChangedEvent += _wizard_SelectedPageChangedEvent;
            _wizard.SelectedPageStateChangedEvent += _wizard_SelectedPageStateChangedEvent; ;
            _wizard.InitialManager(new IWizardPage<ImportXhsProjectViewModel>[] {
                this.selectXhsProjectModelFileWizardPage,
                this.inputXhsProjectInfoWizardPage,
                this.setXhsProjectMapLocationWizardPage,
                this.generateXhsProjectWizardPage,
                this.importXhsProjectCompletedWizardPage
                 this.projectResultShowPanel1
            });
        }
        //删除导航条item
        private void DeleteItem()
        {
            if (stepProgressBar1.Items.Count >= 5)
            {
                for (int i = 0; i < 3; i++)
                {
                    stepProgressBar1.Items.RemoveAt(2);
                }
            }
        }
        //选择页面改变
@@ -111,10 +126,10 @@
            {
                if (this.DialogResult == DialogResult.OK)
                {
                    if (!_wizard.Complete())
                    {
                        e.Cancel = true;
                    }
                    /*  if (!_wizard.Complete())
                      {
                          e.Cancel = true;
                      }*/
                }
                else if (this.DialogResult == DialogResult.Cancel)
                {
@@ -127,7 +142,6 @@
                {
                    e.Cancel = true;
                }
            }
        }
    }