Пример #1
0
        private void ReloadData()
        {
            ressourceTypeDataGridView.Rows.Clear();
            storageTypeDataGridView.Rows.Clear();
            storageDataGridView.Rows.Clear();

            ReloadStorageDetailData(-1);

            foreach (RPN_API_Json.Storage data in web.GetStorages())
            {
                storageDataGridView.Rows.Add(data.Id, data.Name);
            }

            foreach (RPN_API_Json.RessourceTypeData data in web.GetRessourceType())
            {
                if (data.Icon != null)
                {
                    ressourceTypeDataGridView.Rows.Add(web.Base64ToImage(data.Icon), data.Id, data.Name, data.Mass, data.Price);
                }
                else
                {
                    ressourceTypeDataGridView.Rows.Add(Resources.package_tracking, data.Id, data.Name, data.Mass, data.Price);
                }
            }

            foreach (RPN_API_Json.StorageTypeData data in web.GetStorageType())
            {
                storageTypeDataGridView.Rows.Add(data.Id, data.Name, data.Size);
            }

            ressourceTypeDataGridView.Refresh();
            storageTypeDataGridView.Refresh();
            storageDataGridView.Refresh();
        }