| | |
| | | public event Action PageStateChangedEvent; |
| | | |
| | | private ImportXhsProjectViewModel _vm = null;//操作对象 |
| | | private bool _isInitialize = false;//是否初始化 |
| | | private bool _importResult = false;//导入结果 |
| | | |
| | | |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// 初始化页面 |
| | | /// </summary> |
| | | public async Task InitialPage(ImportXhsProjectViewModel vm) |
| | | public async void InitialPage(ImportXhsProjectViewModel vm) |
| | | { |
| | | if (vm == null) |
| | | { |
| | | return; |
| | | } |
| | | _vm = vm; |
| | | _isInitialize = false; |
| | | _importResult = false; |
| | | this.listBoxControl1.Items.Clear(); |
| | | _importResult = await ImportXhsProjectHelper.Import(vm, (msg, color) => |
| | |
| | | this.progressBarControl1.Position = 0; |
| | | this.itemForProgress.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never; |
| | | } |
| | | _isInitialize = true; |
| | | this.PageStateChangedEvent?.Invoke(); |
| | | } |
| | | |
| | |
| | | { |
| | | get |
| | | { |
| | | if (_isInitialize) |
| | | { |
| | | if (!_importResult) |
| | | { |
| | | return true; |
| | | } |
| | | } |
| | | return false; |
| | | } |
| | |
| | | { |
| | | get |
| | | { |
| | | if (_isInitialize) |
| | | { |
| | | if (_importResult) |
| | | { |
| | | return true; |
| | | } |
| | | } |
| | | return false; |
| | | } |
| | |
| | | { |
| | | get |
| | | { |
| | | if (_isInitialize) |
| | | { |
| | | if (!_importResult) |
| | | { |
| | | return true; |
| | | } |
| | | } |
| | | return false; |
| | | } |