Ejemplo n.º 1
0
 private void BtnGetAreaStatistics_OnClick(object sender, RoutedEventArgs e)
 {
     AreaStatistics recv             = client.GetAreaStatistics(1);
     int            PersonNum        = recv.PersonNum;
     int            DevNum           = recv.DevNum;
     int            LocationAlarmNum = recv.LocationAlarmNum;
     int            DevAlarmNum      = recv.DevAlarmNum;
 }
Ejemplo n.º 2
0
 /// <summary>
 /// 园区信息统计
 /// </summary>
 /// <param name="Id"></param>
 /// <returns></returns>
 protected AreaStatistics GetAreaStatisticsSync(int Id)
 {
     serviceClient = GetServiceClient();
     if (serviceClient == null)
     {
         return(null);
     }
     lock (serviceClient)                                        //1
     {
         return(serviceClient.GetAreaStatistics(Id));
     }
 }
Ejemplo n.º 3
0
        private void BtnGetAreaStatistics_OnClick(object sender, RoutedEventArgs e)
        {
            try
            {
                DateTime       start            = DateTime.Now;
                AreaStatistics recv             = client.GetAreaStatistics(Convert.ToInt32(TbStatisticArea.Text));
                int            PersonNum        = recv.PersonNum;
                int            DevNum           = recv.DevNum;
                int            LocationAlarmNum = recv.LocationAlarmNum;
                int            DevAlarmNum      = recv.DevAlarmNum;
                TimeSpan       time             = DateTime.Now - start;

                MessageBox.Show(string.Format("PersonNum:{0};DevNum:{1};LocationAlarmNum:{2};DevAlarmNum:{3}.Time:{4}", PersonNum, DevNum, LocationAlarmNum, DevAlarmNum, time));
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
        }