예제 #1
0
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);

            var database = BACnetSession.Current.GetProcess<NetworkDatabase>();
            this._devices = new DeviceTreeStore(Application.Instance);
            this._devicesSubscription = database.Subscribe(new DescriptorQuery(objectType: 8), this._devices);
            _tree.DataStore = this._devices;

            _refreshTimer = new UITimer();
            _refreshTimer.Interval = .5;
            _refreshTimer.Elapsed += _refreshTimerElapsed;
            _refreshTimer.Start();
        }
예제 #2
0
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);

            var database = BACnetSession.Current.GetProcess <NetworkDatabase>();

            this._devices             = new DeviceTreeStore(Application.Instance);
            this._devicesSubscription = database.Subscribe(new DescriptorQuery(objectType: 8), this._devices);
            _tree.DataStore           = this._devices;

            _refreshTimer          = new UITimer();
            _refreshTimer.Interval = .5;
            _refreshTimer.Elapsed += _refreshTimerElapsed;
            _refreshTimer.Start();
        }
예제 #3
0
        protected override void OnUnLoad(EventArgs e)
        {
            base.OnUnLoad(e);

            if (this._devicesSubscription != null)
            {
                this._devicesSubscription.Dispose();
                this._devicesSubscription = null;
            }

            if (_refreshTimer != null)
            {
                _refreshTimer.Dispose();
                _refreshTimer = null;
            }

            this._devices = null;
            this.Content  = null;
        }
예제 #4
0
        protected override void OnUnLoad(EventArgs e)
        {
            base.OnUnLoad(e);

            if (this._devicesSubscription != null)
            {
                this._devicesSubscription.Dispose();
                this._devicesSubscription = null;
            }

            if(_refreshTimer != null)
            {
                _refreshTimer.Dispose();
                _refreshTimer = null;
            }

            this._devices = null;
            this.Content = null;
        }