public async Task <string> AskAsync() { //try guess it PathTextBox.Text = SystemPaths.GetAndroidSdkPath(); if (ShowModal() == true) { return(PathTextBox.Text); } return(null); }
public FileSequenceProvider(ulong start, ILogger logger = null) { Logger = logger ?? Log.Default; SystemPaths paths = SystemPaths.Get(DataProvider.Current); File = new FileInfo(Path.Combine(paths.Data.AppFiles, $"{nameof(FileSequenceProvider)}.txt")); _current = start; if (File.Exists) { _current = File.FullName.SafeReadFile().ToUlong(start); } }
/// <summary> /// Gets file cache system path /// </summary> /// <returns></returns> static public string GetFileCachePath() { string cache_path; cache_path = Path.Combine(SystemPaths.GetApplicationDataPath(), "Cache"); if (!Directory.Exists(cache_path)) { Directory.CreateDirectory(cache_path); } return(cache_path); }
/// <summary> /// Gets configuration file name /// </summary> /// <returns>File name</returns> static public string GetConfigFileName() { string application_name = SystemPaths.GetExecutableName(); RegistryKey software = Registry.CurrentUser.OpenSubKey("Software"); RegistryKey cygnus_ground_station = software.OpenSubKey(application_name); if (cygnus_ground_station != null && cygnus_ground_station.GetValue("SettingsFile") != null) { return(cygnus_ground_station.GetValue("SettingsFile").ToString()); } else { string cygnus_directory = SystemPaths.GetApplicationDataPath(); return(Path.Combine(cygnus_directory, application_name + ".config")); } }
private static async void MainAsync() { var androidSdk = SystemPaths.GetAndroidSdkPath(); string repositoriesDir; if (!Gradle.HasLocalRepositories(androidSdk, out repositoriesDir)) { throw new Exception("Android SDK path is invalid or repositories are not installed via Android SDK Manager."); } //Let's test: resolve all recommended dependencies! var deps = await new RecommendedDpendenciesService().GetAsync(); var failed = deps.Where(dep => !ResolveAndPrintDependencies(dep.DependencyId, androidSdk)).ToList(); System.Console.WriteLine("Done. Failed: {0}\n{1}", failed.Count, string.Join("\n", failed.Select(f => f.DependencyId))); }