public void ShowTrack(List<ProccessedTrack> pTracks, int start, int end, int skip) { this.skip = skip; this.start = start; this.end = end; Track track = new Track(); foreach (ProccessedTrackItem pi in pTracks[0].ProccessedTrackItems) { track.AddTrackItem(new TrackItem(pi.OriginalLatitude, pi.OriginalLongitude, pi.MeasureDate)); } FormRoutesInScreenSetting friss = new FormRoutesInScreenSetting(track, pTracks); friss.ShowDialog(); RouteManager manager = friss.RouteManager; StringBuilder sb = new StringBuilder(File.ReadAllText(@"DisplayPlugins\HTML\start.txt")); foreach (Route route in manager.Routes) { sb.Append(CreateFragmentFromRoute(route)); } sb.AppendLine("map.setView([" + pTracks[0].ProccessedTrackItems[start].OriginalLatitude.ToString().Replace(',', '.') + "," + pTracks[0].ProccessedTrackItems[start].OriginalLongitude.ToString().Replace(',','.') + "]);"); sb.Append(File.ReadAllText(@"DisplayPlugins\HTML\end.txt")); String fileName = @"DisplayPlugins\HTML\temp.html"; File.WriteAllText(fileName, sb.ToString().Replace("<title></title>","<title>Сравнение моделей</title>")); Process.Start(fileName); }
public void ShowSequencedTrack(SequencedTrack track, int pos) { FormRoutesInScreenSetting friss = new FormRoutesInScreenSetting(track, pos); friss.ShowDialog(); RouteManager manager = friss.RouteManager; StringBuilder sb = new StringBuilder(File.ReadAllText(@"DisplayPlugins\HTML\start.txt")); foreach (Route route in manager.Routes) { sb.Append(CreateFragmentFromRoute(route)); } sb.AppendLine("map.setView([" + track.Track.TrackItems[pos].Latitude.ToString().Replace(',', '.') + "," + track.Track.TrackItems[pos].Longitude.ToString().Replace(',', '.') + "]);"); sb.Append(File.ReadAllText(@"DisplayPlugins\HTML\end.txt")); String fileName = @"DisplayPlugins\HTML\temp.html"; File.WriteAllText(fileName, sb.ToString().Replace("<title></title>", "<title>"+track.MethodName+"</title>")); Process.Start(fileName); }
public void ShowTrack(Track track, int start, int end, int skip) { this.skip = skip; this.start = start; this.end = end; FormRoutesInScreenSetting friss = new FormRoutesInScreenSetting(track, new List<ProccessedTrack>()); friss.ShowDialog(); RouteManager manager = friss.RouteManager; StringBuilder sb = new StringBuilder(File.ReadAllText(@"DisplayPlugins\HTML\start.txt")); foreach (Route route in manager.Routes) { sb.Append(CreateFragmentFromRoute(route)); } sb.AppendLine("map.setView([" + track.TrackItems[start].Latitude.ToString().Replace(',', '.') + "," + track.TrackItems[start].Longitude.ToString().Replace(',', '.') + "]);"); sb.Append(File.ReadAllText(@"DisplayPlugins\HTML\end.txt")); String fileName = @"DisplayPlugins\HTML\temp.html"; File.WriteAllText(fileName, sb.ToString().Replace("<title></title>", "<title>Исходный трек</title>")); Process.Start(fileName); }