コード例 #1
0
ファイル: Database.cs プロジェクト: oguzhankiyar/old-projects
        internal static void RemoveFactory(Factory factory)
        {
            DataSaver <byte[]> .Remove("factory" + factory.Id);

            SavedData.Factories.RemoveAll(x => x.Id == factory.Id);
            Update();
        }
コード例 #2
0
ファイル: Database.cs プロジェクト: oguzhankiyar/old-projects
        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();
        }