Exemple #1
0
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            client = AppContext.Instance.Client.InnerClient;
            var treeRoot1 = client.GetPhysicalTopologyTree(0);
            var treeRoot2 = client.GetDepartmentTree();

            ResourceTreeView1.LoadData(treeRoot1, treeRoot2);
            ResourceTreeView1.TopoTree.Tree.SelectedItemChanged += Tree_SelectedItemChanged;

            var devList = client.GetDevInfos(null);

            DeviceListBox1.LoadData(devList);

            var personList = client.GetPersonList();

            PersonListBox1.LoadData(personList);

            var tagList = client.GetTags();

            TagListBox1.LoadData(tagList);

            var archorList = client.GetArchors();

            AchorListBox1.LoadData(archorList);

            AppContext.Instance.CallbackClient.LocAlarmsReceved += CallbackClient_LocAlarmsReceved;

            DeviceAlarm[] devAlarms = client.GetDeviceAlarms(new AlarmSearchArg());
            ShowDeviceAlarms(devAlarms);

            LocationAlarm[] locAlarms = client.GetLocationAlarms(new AlarmSearchArg());
            ShowLocationAlarms(locAlarms);

            InitAlarmHub();
        }