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(); }
protected PhysicalTopology GetTopoTreeSync() { Debug.Log("CommunicationObject->GetTopoTree..."); serviceClient = GetServiceClient(); if (serviceClient == null) { return(null); } lock (serviceClient) //1 { int view = 0; //0:基本数据; 1:设备信息; 2:人员信息; 3:设备信息 + 人员信息 if (topoRoot == null) //第二次进来就不从数据库获取了 { topoRoot = serviceClient.GetPhysicalTopologyTree(view); } else { Log.Info("GetTopoTree success 2!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"); } if (topoRoot == null) { LogError("GetTopoTree", "topoRoot == null"); } else { Log.Info("GetTopoTree success 1!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"); } //string txt = ShowTopo(topoRoot, 0); //Debug.Log(txt); return(topoRoot); } }
public void GetTopoTree() { Debug.Log("->GetTopoTree"); client = GetLocationServiceClient(); PhysicalTopology topoRoot = client.GetPhysicalTopologyTree(); string txt = ShowTopo(topoRoot, 0); Debug.Log("length:" + txt.Length); Debug.Log(txt); }
private void GetAreaBasicList_Click(object sender, RoutedEventArgs e) { PhysicalTopology pt = client.GetPhysicalTopologyTree(0); int nn = 0; }