| | |
| | | { |
| | | _ExchangerVmo = new Vmo.AssetsExchangerMainVmo(); |
| | | _ExchangerVmo.SeriesID = SeriesID; |
| | | var allCaliber = await new Yw.BLL.SysDictData().GetByTypeCode("1"); |
| | | if (allCaliber != null) |
| | | { |
| | | foreach (var item in allCaliber) |
| | | { |
| | | var imageItem = new ImageComboBoxItem(item.Name, item.ID); |
| | | TextEditCaliber.Properties.Items.Add(imageItem); |
| | | } |
| | | } |
| | | var allMaterial = await new Yw.BLL.SysDictData().GetByTypeCode("3"); |
| | | if (allMaterial != null) |
| | | { |
| | |
| | | TextEditMaterial.Properties.Items.Add(imageItem); |
| | | } |
| | | } |
| | | TextEditCaliber.SelectedIndex = 0; |
| | | TextEditMaterial.SelectedIndex = 0; |
| | | } |
| | | |
| | |
| | | { |
| | | _ExchangerVmo.MaterialName = TextEditMaterial.Text.Trim(); |
| | | } |
| | | if (double.TryParse(TextEditCoefficient.Text, out double Coefficient)) |
| | | { |
| | | _ExchangerVmo.Coefficient = Coefficient; |
| | | } |
| | | if (await this.ReloadDataEvent.Invoke(_ExchangerVmo)) |
| | | if (double.TryParse(TextEditCoefficient.Text, out double Coefficient)) |
| | | { |
| | | _ExchangerVmo.Coefficient = Coefficient; |
| | | } |
| | | if (await this.ReloadDataEvent.Invoke(_ExchangerVmo)) |
| | | { |
| | | TipFormHelper.ShowSucceed("添加成功!"); |
| | | } |
| | |
| | | public async void SetBindingData(Vmo.AssetsExchangerMainVmo ExchangerVmo) |
| | | { |
| | | _ExchangerVmo = ExchangerVmo; |
| | | var allCaliber = await new Yw.BLL.SysDictData().GetByTypeCode("1"); |
| | | if (allCaliber != null) |
| | | { |
| | | foreach (var item in allCaliber) |
| | | { |
| | | var imageItem = new ImageComboBoxItem(item.Name, item.Name); |
| | | TextEditCaliber.Properties.Items.Add(imageItem); |
| | | } |
| | | } |
| | | var allMaterial = await new Yw.BLL.SysDictData().GetByTypeCode("3"); |
| | | if (allMaterial != null) |
| | | { |
| | |
| | | { |
| | | _CompressorVmo = new Vmo.AssetsCompressorMainVmo(); |
| | | _CompressorVmo.SeriesID = SeriesID; |
| | | var allCaliber = await new Yw.BLL.SysDictData().GetByTypeCode("1"); |
| | | if (allCaliber != null) |
| | | { |
| | | foreach (var item in allCaliber) |
| | | { |
| | | var imageItem = new ImageComboBoxItem(item.Name, item.ID); |
| | | TextEditCaliber.Properties.Items.Add(imageItem); |
| | | } |
| | | } |
| | | var allMaterial = await new Yw.BLL.SysDictData().GetByTypeCode("3"); |
| | | if (allMaterial != null) |
| | | { |
| | |
| | | TextEditMaterial.Properties.Items.Add(imageItem); |
| | | } |
| | | } |
| | | TextEditCaliber.SelectedIndex = 0; |
| | | TextEditMaterial.SelectedIndex = 0; |
| | | } |
| | | |
| | |
| | | public async void SetBindingData(Vmo.AssetsCompressorMainVmo CompressorVmo) |
| | | { |
| | | _CompressorVmo = CompressorVmo; |
| | | var allCaliber = await new Yw.BLL.SysDictData().GetByTypeCode("1"); |
| | | if (allCaliber != null) |
| | | { |
| | | foreach (var item in allCaliber) |
| | | { |
| | | var imageItem = new ImageComboBoxItem(item.Name, item.Name); |
| | | TextEditCaliber.Properties.Items.Add(imageItem); |
| | | } |
| | | } |
| | | |
| | | var allMaterial = await new Yw.BLL.SysDictData().GetByTypeCode("3"); |
| | | if (allMaterial != null) |
| | | { |
| | |
| | | layoutView1.OptionsView.ViewMode = DevExpress.XtraGrid.Views.Layout.LayoutViewMode.Row; |
| | | layoutView1.TemplateCard = layoutViewCard1; |
| | | layoutView1.FieldValueClick += layoutView1_FieldValueClick; |
| | | layoutView1.MouseMove += layoutView1_MouseMove; |
| | | layoutView1.MouseEnter += layoutView1_MouseEnter; |
| | | layoutView1.MouseLeave += layoutView1_MouseLeave; |
| | | // |
| | | // |
| | | // colName |
| | | // |
| | | colName.AppearanceCell.Font = new Font("Tahoma", 13F, FontStyle.Regular, GraphicsUnit.Point); |
| | |
| | | } |
| | | } |
| | | |
| | | private void layoutView1_MouseMove(object sender, MouseEventArgs e) |
| | | { |
| | | var info = layoutView1.CalcHitInfo(e.X, e.Y); |
| | | if (info.Column == null) |
| | | return; |
| | | if (info.Column.Caption == "名称") |
| | | { |
| | | Cursor.Current = Cursors.Help; |
| | | } |
| | | else |
| | | { |
| | | } |
| | | } |
| | | #region 鼠标事件 |
| | | |
| | | private void layoutView1_MouseEnter(object sender, EventArgs e) |
| | | /* private void layoutView1_MouseMove(object sender, MouseEventArgs e) |
| | | { |
| | | var info = layoutView1.CalcHitInfo(e.X, e.Y); |
| | | if (info.Column == null) |
| | | return; |
| | | if (info.Column.Caption == "名称") |
| | | { |
| | | var info = layoutView1.CalcHitInfo(Cursor.Position.X, Cursor.Position.Y); |
| | | if (info.Column != null && info.Column.Caption == "名称") |
| | | { |
| | | Cursor.Current = Cursors.Help; |
| | | } |
| | | Cursor.Current = Cursors.Help; |
| | | } |
| | | else |
| | | { |
| | | } |
| | | }*/ |
| | | |
| | | private void layoutView1_MouseLeave(object sender, EventArgs e) |
| | | { |
| | | Cursor.Current = Cursors.Default; |
| | | } |
| | | /* private void layoutView1_MouseEnter(object sender, EventArgs e) |
| | | { |
| | | var info = layoutView1.CalcHitInfo(Cursor.Position.X, Cursor.Position.Y); |
| | | if (info.Column != null && info.Column.Caption == "名称") |
| | | { |
| | | Cursor.Current = Cursors.Help; |
| | | } |
| | | }*/ |
| | | |
| | | #endregion 鼠标事件 |
| | | } |
| | | } |
| | |
| | | /// </summary> |
| | | public event Action<ImportXhsProjectViewModel> ImportProjectCompletedEvent; |
| | | |
| | | private List<HomeXhsProjectTreeViewModel> _allBindingList = null;//当前绑定列表 |
| | | private List<HomeXhsProjectTreeViewModel> _allBindingList = new List<HomeXhsProjectTreeViewModel>();//当前绑定列表 |
| | | |
| | | /// <summary> |
| | | /// 绑定数据 |
| | |
| | | public async void SetBindingData(List<XhsProjectVmo> allProjectList) |
| | | { |
| | | _allBindingList = new List<HomeXhsProjectTreeViewModel>(); |
| | | if (allProjectList == null) |
| | | return; |
| | | foreach (var item in allProjectList) |
| | | if (allProjectList != null) |
| | | { |
| | | if (await IsHaveBimFace(item.ID)) |
| | | foreach (var item in allProjectList) |
| | | { |
| | | var vm = new HomeXhsProjectTreeViewModel(item, true); |
| | | _allBindingList.Add(vm); |
| | | } |
| | | else |
| | | { |
| | | var vm = new HomeXhsProjectTreeViewModel(item, false); |
| | | _allBindingList.Add(vm); |
| | | if (await IsHaveBimFace(item.ID)) |
| | | { |
| | | var vm = new HomeXhsProjectTreeViewModel(item, true); |
| | | _allBindingList.Add(vm); |
| | | } |
| | | else |
| | | { |
| | | var vm = new HomeXhsProjectTreeViewModel(item, false); |
| | | _allBindingList.Add(vm); |
| | | } |
| | | } |
| | | } |
| | | this.treeList1.DataSource = _allBindingList; |
| | |
| | | public ImportXhsProjectDlg() |
| | | { |
| | | InitializeComponent(); |
| | | this.IconOptions.Icon = Yw.WinFrmUI.GlobalParas.AppIcon; |
| | | } |
| | | |
| | | private readonly ImportXhsProjectViewModel _vm = new(); |
| | |
| | | public async void InitialPage(ImportXhsProjectViewModel vm) |
| | | { |
| | | _vm = vm; |
| | | this.txtAddress.EditValue = _vm.Address; |
| | | this.txtAddress.Text = _vm.Address; |
| | | this.mapSetSimpleMarkerContainer1.LoadCompletedEvent += MapSetSimpleMarkerContainer1_LoadCompletedEvent; |
| | | await this.mapSetSimpleMarkerContainer1.InitialContainer(); |
| | | xhsProjectInfoCtrl1.SetBindingData(_vm); |
| | |
| | | |
| | | public void SetBindingData(Model.RevitModel revitModel) |
| | | { |
| | | if (revitModel == null) |
| | | return; |
| | | _allBindingList = new List<XhsProjectSimulationAnalysisViewModel>(); |
| | | this.xhsProjectSimulationAnalysisViewModelBindingSource.DataSource = _allBindingList; |
| | | var allRevitParterList = revitModel.GetAllParters(); |