| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172 |
- using DevExpress.Data;
- using DevExpress.Xpo;
- using DevExpress.XtraEditors;
- using DevExpress.XtraGrid.Views.Base;
- using Ips.Library.Basic;
- 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 Ips.Sps.TskResults.Pases
- {
- public partial class PasGridListCtrl : DevExpress.XtraEditors.XtraUserControl
- {
- public PasGridListCtrl()
- {
- InitializeComponent();
- }
- public void SetResourceList(XPCollection satList, XPCollection emtList)
- {
- bsSatList.DataSource = satList;
- bsEmtList.DataSource = emtList;
- }
- public void SetDataSource(object obj)
- {
- if (obj is System.Collections.IList)
- {
- bsPasList.DataSource = obj;
- }
- else
- {
- grdPasList.DataSource = obj;
- }
- grdPasList.RefreshDataSource();
- gvPasList.BestFitColumns();
- }
- private void gvPssList_CustomColumnDisplayText(object sender, CustomColumnDisplayTextEventArgs e)
- {
- if (e.Value == NotLoadedObject.Instance) return;
- if (e.Column == colSigFreq)
- {
- e.DisplayText = ((long)e.Value).E6m().ToString("F3");
- }
- else if (e.Column == colBandWidth)
- {
- e.DisplayText = ((int)e.Value).E3m().ToString();
- }
- else if (e.Column == colEmtId)
- {
- if (Convert.ToInt32(e.Value) == 0)
- {
- e.DisplayText = "未知";
- }
- }
- else if (e.Column == colSatId)
- {
- if (Convert.ToInt32(e.Value) == 0)
- {
- e.DisplayText = "无";
- }
- }
- }
- }
- }
|