public async override void OnNavigatingTo(NavigationParameters parameters) { if (CrossConnectivity.Current.IsConnected) { LocationFinder finder = new LocationFinder(); _position = await finder.GetCurrentLocation(); } }
public void Setup() { _sut = new LocationFinder(new LocationCollection { new Location("one"), new Location("Place that exists"), new Location("two") }); }
private void ShotLocation() { LocationFinder frmZlf = new LocationFinder(); frmZlf.Latitude = _MyBallisticsCalculator.ShooterLat; frmZlf.Longitude = _MyBallisticsCalculator.ShooterLon; frmZlf.NavigateTo(); frmZlf.Mode = "Shot"; frmZlf.DataContext = this; frmZlf.Show(); }
private static ServiceInfo[] GetAllAmagnoServices(string[] args) { var serviceInfos = GetInstalledServices(); var amagnoServices = FindAmagnoServices(args); var amagnoServiceInfos = amagnoServices .Select(e => new ServiceInfo { PathName = e, Name = Path.GetFileName(e), Location = LocationFinder.GetLocationByCommandLine(e) }) .OrderBy(e => e.Name) .Select(e => TakeBestInfo(e, serviceInfos)) .ToArray(); //TODO: // Select the correct services and add some infos for not yet installed services. return(serviceInfos); }
private static ServiceInfo[] GetInstalledServices() { var result = new List <ServiceInfo>(); var wmiInfos = FindWmiServiceInfos(); var services = ServiceController.GetServices(); foreach (var service in services) { var wmiInfo = wmiInfos.FirstOrDefault(e => e["Name"] as string == service.ServiceName); var pathName = NormalizePath(wmiInfo["PathName"] as string); var description = wmiInfo["Description"] as string; var processId = Convert.ToUInt32(wmiInfo["ProcessId"]); var serviceInfo = new ServiceInfo { Name = service.ServiceName, DisplayName = service.DisplayName, Status = service.Status, PathName = pathName, Location = LocationFinder.GetLocationByCommandLine(pathName), Description = description, StartType = service.StartType, ServiceType = service.ServiceType, ProcessId = processId, IsInstalled = true }; result.Add(serviceInfo); } return(result .OrderBy(e => e.Name, StringComparer.OrdinalIgnoreCase) .ToArray()); }
private void OpenRangeFinder() { LocationFinder lLF = new LocationFinder(); lLF.Show(); }
IList <PartialMatch> ILocationQuery.FindPartialMatchedPostalSuburbs(Country country, string location, int maximum) { return(LocationFinder.FindPartialMatchedPostalSuburbs(country, location, maximum)); }