Esempio n. 1
0
 private async static void downloadImage(string url, string name)
 {
     var client = new WebClient();
     var stream = await client.OpenReadTaskAsync(new Uri(url, UriKind.Absolute));
     var bytes = ReadFully(stream);
     DataSaver<byte[]>.Remove(name);
     DataSaver<byte[]>.Save(name, bytes);
     Update();
 }
Esempio n. 2
0
 internal static void RemoveFactory(Factory factory)
 {
     DataSaver<byte[]>.Remove("factory" + factory.Id);
     SavedData.Factories.RemoveAll(x => x.Id == factory.Id);
     Update();
 }