Beispiel #1
0
        InspectionTrackClient trackClient;//移动巡检

        private void MenuStartReceive_Click(object sender, RoutedEventArgs e)
        {
            trackClient.days = 365;
            trackClient.Start();

            Log.Info(LogTags.Inspection, "StartGetInspectionTrack:" + strIp);
        }
Beispiel #2
0
        private void StartGetInspectionTrack()
        {
            bool EnableInspectionTrack = ConfigurationHelper.GetBoolValue("EnableInspectionTrack");

            if (EnableInspectionTrack && trackClient == null)
            {
                //Ping.
                string strIp = AppContext.DatacaseWebApiUrl;
                string port  = AppContext.DatacaseWebApiPort;
                trackClient          = new InspectionTrackClient(strIp, port);
                trackClient.ListGot += (TrackList) =>
                {
                    InspectionTrackHub.SendInspectionTracks(TrackList.ToTModel());//发送给客户端
                };
                trackClient.Start();

                WriteLog("StartGetInspectionTrack:" + strIp);
            }
        }