Ejemplo n.º 1
0
        private void SendAllItem_OnSelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            if (trackList == null || trackList.Count == 0)
            {
                return;
            }
            DbModel.Location.Work.InspectionTrackList TrackList2 = new DbModel.Location.Work.InspectionTrackList();
            TrackList2.ReviseTrack = trackList;

            InspectionTrackHub.SendInspectionTracks(TrackList2.ToTModel());//发送给客户端
        }
Ejemplo n.º 2
0
        private void SendAddByItem_OnSelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            DbModel.Location.Work.InspectionTrack it = SendAddByItem.SelectedItem as DbModel.Location.Work.InspectionTrack;
            if (it == null)
            {
                return;
            }
            DbModel.Location.Work.InspectionTrackList TrackList2 = new DbModel.Location.Work.InspectionTrackList();
            TrackList2.AddTrack.Add(it);

            InspectionTrackHub.SendInspectionTracks(TrackList2.ToTModel());//发送给客户端
        }
Ejemplo n.º 3
0
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            strIp                = AppContext.DatacaseWebApiUrl;
            port                 = AppContext.DatacaseWebApiPort;
            trackClient          = new InspectionTrackClient(strIp, port);
            trackClient.ListGot += (TrackList) =>
            {
                InspectionTrackHub.SendInspectionTracks(TrackList.ToTModel());//发送给客户端
            };

            controller = new LogTextBoxController(TbLogs, LogTags.Inspection);
            var now = DateTime.Now;

            StartTime.SelectedDate = new DateTime(now.Year, 1, 1, 0, 0, 0);
            EndTime.SelectedDate   = now;
        }
Ejemplo n.º 4
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);
            }
        }