Esempio n. 1
0
        delegate void AsynUpdateUI( ); //定义一个委托,使其可以更新UI控件的状态

        void checkWarn(object source, System.Timers.ElapsedEventArgs e)
        {
            if (InvokeRequired)
            {
                this.Invoke(new AsynUpdateUI(delegate()
                {
                    FishBll.Bll.WarnBll _bll = new FishBll.Bll.WarnBll( );
                    DataTable table          = _bll.getWarnInfo(FishEntity.Variable.User.id, ProgramManager.setDicItem( ));
                    if (table == null || table.Rows.Count < 1)
                    {
                        return;
                    }
                    signGroupWarn(table);
                }));
            }
        }
Esempio n. 2
0
        public FormWarn( )
        {
            InitializeComponent( );
            ReadColumnConfig(dataGridView1, "Set_148");

            _bll = new FishBll.Bll.WarnBll( );

            _model = new FishEntity.WarnEntity( );

            proDic = ProgramManager.setDicItem( );
            BindingSource bs = new BindingSource( );

            bs.DataSource           = proDic;
            comboBox1.DataSource    = bs;
            comboBox1.DisplayMember = "Value";
            comboBox1.ValueMember   = "Key";
        }