Esempio n. 1
0
 private void CalculateStockValue(Company company)
 {
     if (currentStockValues.ContainsKey(company.Abbreviation))
     {
         currentStockValues[company.Abbreviation] = company.Value;
     }
     else
         currentStockValues.Add(company.Abbreviation, company.Value);
     var currentStockValue = currentStockValues.Sum(x=>x.Value);
     var falseCompany = new Company() { Abbreviation= CompanyAbbrev.WIG3, Value = currentStockValue, Time = DateTime.Now};
     Dispatcher.Invoke(()=> AppendText(StockOutput, falseCompany));
 }
Esempio n. 2
0
 private void AppendText(TextBlock block, Company avx)
 {
     block.Text += string.Format("{0:hh:mm:ss}: {1} Value={2}{3}", avx.Time, avx.Abbreviation, avx.Value, Environment.NewLine);
 }