| | |
| | | using DevExpress.XtraEditors; |
| | | using HStation.Vmo; |
| | | 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; |
| | | using Yw; |
| | | |
| | | namespace HStation.WinFrmUI |
| | |
| | | this.phartDiagramRelationListCtrl1.SelectedChangedEvent += PhartDiagramRelationListCtrl1_SelectedChangedEvent; |
| | | } |
| | | |
| | | |
| | | |
| | | private AssetsExchangerMainVmo _vmo = null; |
| | | private List<PhartDiagramRelationVmo> _allBindingList = null; |
| | | private PhartDiagramRelationVmo _relation = null; |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// |
| | | /// </summary> |
| | | public async void SetBindingData(AssetsExchangerMainVmo vmo) |
| | | { |
| | |
| | | //excel |
| | | private void Excel() |
| | | { |
| | | if (_vmo == null) |
| | | { |
| | | return; |
| | | } |
| | | var dlg = new ImportAssetsExchangerCurveQLByExcelDlg(); |
| | | dlg.ReloadDataEvent += (rhs) => |
| | | { |
| | | _allBindingList.Add(rhs); |
| | | this.phartDiagramRelationListCtrl1.SetBindingData(_allBindingList); |
| | | }; |
| | | dlg.SetBindingData(); |
| | | dlg.SetBindingData(_vmo); |
| | | dlg.ShowDialog(); |
| | | } |
| | | |
| | | //图片 |
| | | private void Picture() |
| | | { |
| | | if (_vmo == null) |
| | | { |
| | | return; |
| | | } |
| | | var vm = GetCurrentViewModel(); |
| | | if (vm == null) |
| | | { |
| | |
| | | _allBindingList.Add(rhs); |
| | | this.phartDiagramRelationListCtrl1.SetBindingData(_allBindingList); |
| | | }; |
| | | dlg.SetBindingData(); |
| | | dlg.SetBindingData(_vmo); |
| | | dlg.ShowDialog(); |
| | | } |
| | | |
| | |
| | | return; |
| | | } |
| | | _allBindingList.Remove(vm); |
| | | this.universalChartViewCtrl1.ClearBindingData(); |
| | | this.phartDiagramRelationListCtrl1.SetBindingData(_allBindingList); |
| | | TipFormHelper.ShowSucceed("删除成功!"); |
| | | } |
| | | |
| | | |
| | | #region 当前 |
| | | |
| | |
| | | return _relation; |
| | | } |
| | | |
| | | #endregion |
| | | #endregion 当前 |
| | | |
| | | //Excel导入 |
| | | private void barBtnImportByExcel_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) |
| | |
| | | var vmo = await BLLFactory<Yw.BLL.PhartDiagramExtensions>.Instance.GetByID(relation.DiagramID); |
| | | this.universalChartViewCtrl1.SetBindingData(vmo); |
| | | } |
| | | |
| | | } |
| | | } |
| | | } |