From 61f13137f1a7f1b0410fc6666ceeee0f04576943 Mon Sep 17 00:00:00 2001 From: lixiaojun <1287241240@qq.com> Date: 星期三, 24 七月 2024 21:29:32 +0800 Subject: [PATCH] 新增Yw.WinFrmUI.Hydro.Q3d.Core --- WinFrmUI/HStation.WinFrmUI.Xhs.Core/02-project/01-import/04-GeneralProject/GenerateXhsProjectWizardPage.cs | 146 +++++++++++++++++++++++++++++++++++++++--------- 1 files changed, 117 insertions(+), 29 deletions(-) diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/02-project/01-import/04-GeneralProject/GenerateXhsProjectWizardPage.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/02-project/01-import/04-GeneralProject/GenerateXhsProjectWizardPage.cs index df7cfe9..0cac22f 100644 --- a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/02-project/01-import/04-GeneralProject/GenerateXhsProjectWizardPage.cs +++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/02-project/01-import/04-GeneralProject/GenerateXhsProjectWizardPage.cs @@ -1,56 +1,144 @@ -锘縰sing DevExpress.XtraEditors; -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows.Forms; - -namespace HStation.WinFrmUI +锘縩amespace HStation.WinFrmUI { public partial class GenerateXhsProjectWizardPage : DevExpress.XtraEditors.XtraUserControl, IWizardPage<ImportXhsProjectViewModel> { public GenerateXhsProjectWizardPage() { InitializeComponent(); + this.layoutControl1.SetupLayoutControl(); } - public bool AllowPrev => throw new NotImplementedException(); + /// <summary> + /// 鐘舵�佹敼鍙樹簨浠� + /// </summary> + public event Action PageStateChangedEvent; + private bool _isInitialize = false;//鏄惁鍒濆鍖� + private bool _importResult = false;//瀵煎叆缁撴灉 + private ImportXhsProjectViewModel _vm = null;//鎿嶄綔瀵硅薄 - public bool AllowNext => throw new NotImplementedException(); - public bool AllowCancel => throw new NotImplementedException(); - - public bool AllowComplete => throw new NotImplementedException(); - - public bool IsInitialize => throw new NotImplementedException(); - - public bool CanCancel() + /// <summary> + /// + /// </summary> + public async void InitialPage(ImportXhsProjectViewModel vm) { - throw new NotImplementedException(); + _vm = vm; + _isInitialize = false; + _importResult = false; + _importResult = await ImportXhsProjectHelper.Import(vm, (msg) => + { + this.listBoxControl1.Items.Add(msg); + }, (max, current) => + { + this.progressBarControl1.Properties.Maximum = max; + this.progressBarControl1.Position = current; + //鏇夸唬鏂规 + // this.progressBarControl1.Properties.Step = current; + // this.progressBarControl1.PerformStep(); + }); + _isInitialize = true; + this.PageStateChangedEvent?.Invoke(); } - public bool CanComplete() + /// <summary> + /// 鍏佽涓婁竴姝� + /// </summary> + public bool AllowPrev { - throw new NotImplementedException(); + get + { + if (_isInitialize) + { + if (!_importResult) + { + return true; + } + } + return false; + } } - public bool CanNext() + /// <summary> + /// 鍏佽涓嬩竴姝� + /// </summary> + public bool AllowNext { - throw new NotImplementedException(); + get + { + if (_isInitialize) + { + if (_importResult) + { + return true; + } + } + return false; + } } + /// <summary> + /// 鍏佽鍙栨秷 + /// </summary> + public bool AllowCancel + { + get + { + if (_isInitialize) + { + if (!_importResult) + { + return true; + } + } + return false; + } + } + + /// <summary> + /// 鍏佽瀹屾垚 + /// </summary> + public bool AllowComplete + { + get { return false; } + } + + /// <summary> + /// 鑳藉惁涓婁竴姝� + /// </summary> + /// <returns></returns> public bool CanPrev() { - throw new NotImplementedException(); + return this.AllowPrev; } - public void InitialPage(ImportXhsProjectViewModel t) + /// <summary> + /// 鑳藉惁涓嬩竴姝� + /// </summary> + public bool CanNext() { - throw new NotImplementedException(); + return this.AllowNext; } + + /// <summary> + /// 鑳藉惁鍙栨秷 + /// </summary> + public bool CanCancel() + { + return this.AllowCancel; + } + + /// <summary> + /// 鑳藉惁瀹屾垚 + /// </summary> + public bool CanComplete() + { + return false; + } + + + + + + } } -- Gitblit v1.9.3