From 98e49c0dd42840a094837f7acae532bc237a719a Mon Sep 17 00:00:00 2001
From: yangyin <1850366751@qq.com>
Date: 星期二, 20 八月 2024 15:42:37 +0800
Subject: [PATCH] Merge branch 'master' of http://47.103.154.90:83/r/HStation/XHS.V1.0

---
 WinFrmUI/HStation.WinFrmUI.Xhs.Core/02-project/01-import/00-core/ImportXhsProjectDlg.cs |   55 +++++++++++++++++++++++++++++++++++++++++++++----------
 1 files changed, 45 insertions(+), 10 deletions(-)

diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/02-project/01-import/00-core/ImportXhsProjectDlg.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/02-project/01-import/00-core/ImportXhsProjectDlg.cs
index 750e9b1..0862469 100644
--- a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/02-project/01-import/00-core/ImportXhsProjectDlg.cs
+++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/02-project/01-import/00-core/ImportXhsProjectDlg.cs
@@ -1,4 +1,5 @@
-锘縰sing DevExpress.XtraLayout.Utils;
+锘縰sing DevExpress.XtraEditors;
+using DevExpress.XtraLayout.Utils;
 
 namespace HStation.WinFrmUI
 {
@@ -9,12 +10,13 @@
             InitializeComponent();
         }
 
-
         private readonly ImportXhsProjectViewModel _vm = new();
         private ImportXhsProjectManager _wizard;
 
+        private static bool IsAddItem = true;
+
         /// <summary>
-        /// 
+        ///
         /// </summary>
         public ImportXhsProjectViewModel ViewModel
         {
@@ -22,20 +24,54 @@
         }
 
         /// <summary>
-        /// 
+        ///
         /// </summary>
         public void SetBindingData()
         {
             _wizard = new ImportXhsProjectManager(_vm);
             _wizard.SelectedPageChangedEvent += _wizard_SelectedPageChangedEvent;
             _wizard.SelectedPageStateChangedEvent += _wizard_SelectedPageStateChangedEvent; ;
+            InputXhsProjectInfoWizardPage.AutoAddItem += AutoAddItem;
+            InputXhsProjectInfoWizardPage.DeleteItem += DeleteItem;
             _wizard.InitialManager(new IWizardPage<ImportXhsProjectViewModel>[] {
-                this.selectXhsProjectModelFileWizardPage,
                 this.inputXhsProjectInfoWizardPage,
                 this.setXhsProjectMapLocationWizardPage,
                 this.generateXhsProjectWizardPage,
                 this.importXhsProjectCompletedWizardPage
             });
+        }
+
+        //澧炲姞瀵艰埅鏉tem
+        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);
+        }
+
+        //鍒犻櫎瀵艰埅鏉tem
+        private void DeleteItem()
+        {
+            if (stepProgressBar1.Items.Count >= 5)
+            {
+                for (int i = 0; i < 3; i++)
+                {
+                    stepProgressBar1.Items.RemoveAt(2);
+                }
+            }
         }
 
         //閫夋嫨椤甸潰鏀瑰彉
@@ -111,10 +147,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 +163,6 @@
                 {
                     e.Cancel = true;
                 }
-
             }
         }
     }

--
Gitblit v1.9.3