Пример #1
0
        private void Reload()
        {
            groupManagerFlatButton.Enabled = false;

            LoadGroup();

            if (web.GetPermission(web.GetUsername()) >= RPN_API_Web.Permission.Med)
            {
                groupManagerFlatButton.Enabled = true;
            }

            int groupStockMoney = 0;

            foreach (RPN_API_Json.StorageData storageData in web.GetStorageData())
            {
                groupStockMoney += storageData.Quantity * web.GetRessourceTypeFromId(storageData.RessourceType).Price;
            }

            int groupMoney = 0;

            foreach (RPN_API_Json.MoneyData moneyData in web.GetAllMoney())
            {
                groupMoney += moneyData.MoneyGroup;
            }

            stockMoneyFlatLabel.Text = "Stock du Groupe : " + groupStockMoney.ToString("C0");
            groupMoneyFlatLabel.Text = "Argent du Groupe : " + groupMoney.ToString("C0");
        }