public InvestmentScreen() { _instance = this; InitializeComponent(); Communication.Instance.StockGroups.ForEach( sg => _stockGroupComponents.Add(new StockGroupComponent(this, sg))); text_sumOfAllSliders.Text = "Total investment percentage: " + SumOfAllSliders + "%"; }
public StockGroupComponent(InvestmentScreen invScreen, String stockGroupName) { Contract.Requires(!ReferenceEquals(stockGroupName, null)); _investmentScreen = invScreen; _stockGroupName = stockGroupName; _investmentPercentage = Communication.Instance.Investments(stockGroupName); _dataPoints = Communication.Instance.StockGroupData(_stockGroupName); CreatePanel(); CreateGraphComponent(); }