Exemplo n.º 1
0
        private void UpdateCacheSizeText(ApiData apiData, Label label)
        {
            string text = "Not loaded";

            if (apiData != null)
            {
                FileInfo fileInfo = apiData.GetCacheFileInfo();
                text = fileInfo.Exists ? $"{fileInfo.Length / 1000.0 / 1000.0:0.00} MB" : "No file";
            }

            label.Text = text;
        }