| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980 |
- using DevExpress.Xpo;
- using DevExpress.XtraEditors;
- using DevExpress.XtraEditors.Controls;
- using Ips.Library.DxpLib;
- using Ips.Library.Entity;
- using Ips.Sps.Store;
- using Ips.Sps.Tsks;
- 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 PasListForm : DevExpress.XtraEditors.XtraForm
- {
- public PasListForm()
- {
- InitializeComponent();
- _pasStore = Stores.It.PasStore;
- _pasStore.ListSourceChanged += _pasStore_ListSourceChanged;
- }
- private void _pasStore_ListSourceChanged(object sender, EventArgs e)
- {
- pasGridListCtrl1.SetDataSource(_pasStore.ListSource);
- }
- PasStore _pasStore;
- private void PasListForm_Load(object sender, EventArgs e)
- {
- InitCtrl();
- }
- private void InitCtrl()
- {
- txtStartTime.UseTimeEdit();
- txtEndTime.UseTimeEdit();
- txtSigCategory.Properties.Items.Add("全部", null, -1);
- txtSigCategory.Properties.Items.AddEnum<SignalCategory>();
- pasGridListCtrl1.SetResourceList(xpcSatList, xpcEmtList);
- btnQuery.PerformClick();
- }
- private void txtClear_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)
- {
- if (e.Button.Kind == ButtonPredefines.Clear)
- {
- ((BaseEdit)sender).EditValue = null;
- }
- }
- private void btnQuery_Click(object sender, EventArgs e)
- {
- var model = _pasStore.QueryModel;
- model.SigCategory = txtSigCategory.EditValue == null ? null : (SignalCategory)txtSigCategory.EditValue;
- model.StartTime = txtStartTime.EditValue == null ? null : txtStartTime.DateTime;
- model.EndTime = txtEndTime.EditValue == null ? null : txtEndTime.DateTime;
- model.SatId = txtSat.EditValue == null ? null : (int)txtSat.EditValue;
- model.EmtId = txtEmt.EditValue == null ? null : (int)txtEmt.EditValue;
- _pasStore.BindList();
- }
- private void btnClear_Click(object sender, EventArgs e)
- {
- txtStartTime.EditValue = null;
- txtEndTime.EditValue = null;
- txtSigCategory.EditValue = null;
- txtSat.EditValue = null;
- txtEmt.EditValue = null;
- }
- }
- }
|