Exemple #1
0
 public MtQuoteEventArgs(MtQuote quote)
 {
     Quote = quote;
 }
Exemple #2
0
 private void removeQuote(MtQuote quote)
 {
     if (quote != null
         && string.IsNullOrEmpty(quote.Instrument) == false
         && listViewQuotes.Items.ContainsKey(quote.Instrument) == true)
     {
         var item = listViewQuotes.Items[quote.Instrument];
         int feedCount = 0;
         int.TryParse(item.SubItems[3].Text, out feedCount);
         feedCount--;
         if (feedCount <= 0)
         {
             listViewQuotes.Items.RemoveByKey(quote.Instrument);
         }
         else
         {
             item.SubItems[3].Text = feedCount.ToString();
         }
     }
 }
Exemple #3
0
 public MtQuoteEventArgs(MtQuote quote)
 {
     Quote = quote;
 }
Exemple #4
0
 private void addNewQuote(MtQuote quote)
 {
     if (quote != null
         && string.IsNullOrEmpty(quote.Instrument) == false
         && listViewQuotes.Items.ContainsKey(quote.Instrument) == false)
     {
         var item = new ListViewItem(quote.Instrument);
         item.Name = quote.Instrument;
         item.SubItems.Add(quote.Bid.ToString());
         item.SubItems.Add(quote.Ask.ToString());
         item.SubItems.Add("1");
         listViewQuotes.Items.Add(item);
     }
     else
     {
         var item = listViewQuotes.Items[quote.Instrument];
         int feedCount = 0;
         int.TryParse(item.SubItems[3].Text, out feedCount);
         feedCount++;
         item.SubItems[3].Text = feedCount.ToString();
     }
 }