예제 #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();
        }
예제 #2
0
 protected Department GetDepartmentTreeSync()
 {
     serviceClient = GetServiceClient();
     if (serviceClient == null)
     {
         return(null);
     }
     lock (serviceClient)//1
     {
         Department dep = serviceClient.GetDepartmentTree();
         return(dep);
     }
 }
예제 #3
0
    public void GetDepTree()
    {
        Debug.Log("->GetDepTree");
        client = GetLocationServiceClient();
        Department dep = client.GetDepartmentTree();

        if (dep == null)
        {
            Debug.LogError("Dep == null");
        }
        else
        {
            string txt = ShowDep(dep, 0);
            Debug.Log(txt);
        }
    }