Пример #1
0
        private void UpdateView()
        {
            this.treeView1.Nodes["Root"].Nodes.Clear();

            if (_conf != null)
            {
                foreach (EIBBusMonAddressConf addr in _conf.List)
                {
                    EIBAddressTreeNodeConf node = new EIBAddressTreeNodeConf(addr.Address, 1, 1, addr);
                    this.treeView1.Nodes["Root"].Nodes.Add(node);
                }
            }

            this.treeView1.ExpandAll();
        }
Пример #2
0
        void btnReplayLastPkt_Click(object sender, EventArgs e)
        {
            EIBAddressTreeNodeConf n = this.treeView1.SelectedNode as EIBAddressTreeNodeConf;

            if (n == null || n.Details == null)
            {
                //Error
                return;
            }
            Cursor.Current = Cursors.WaitCursor;
            if (!ConsoleAPI.SendAddrCmd(n.Details, ConsoleAPI.BlockingMode.WAIT_FOR_CONFIRM))
            {
                //Error
            }
            Cursor.Current = Cursors.Default;
        }
Пример #3
0
        void treeView1_AfterSelect(object sender, TreeViewEventArgs e)
        {
            if (e.Node.Parent == null)
            {
                //root node --> do nothing
                ShowEmptyAddressDetails();
                return;
            }
            EIBAddressTreeNodeConf addrNode = e.Node as EIBAddressTreeNodeConf;

            if (addrNode == null)
            {
                //YGYG: wierd! error ?
                ShowEmptyAddressDetails();
                return;
            }

            this.lblLastTimeSeenVal.Text  = addrNode.Details.Time;
            this.lblLastValueVal.Text     = addrNode.Details.Value;
            this.lblTotalNumSeenVal.Text  = addrNode.Details.Count.ToString();
            this.btnReplayLastPkt.Enabled = true;
        }