Inheritance: AccountDataKey
Ejemplo n.º 1
0
        private void AddOrder(SmartQuant.AccountData data)
        {
            Dictionary <string, ListViewItem> dictionary = this.orders[data.Account];
            string       key          = new OrderKey(data).ToString();
            ListViewItem listViewItem = (ListViewItem)null;

            if (!dictionary.TryGetValue(key, out listViewItem))
            {
                listViewItem                  = new ListViewItem(new string[8]);
                listViewItem.Name             = key;
                listViewItem.SubItems[0].Text = key;
                dictionary.Add(key, listViewItem);
            }
            this.UpdateSubItem(listViewItem, 1, data, "Symbol");
            this.UpdateSubItem(listViewItem, 2, data, "OrderSide");
            this.UpdateSubItem(listViewItem, 3, data, "OrderType");
            this.UpdateSubItem(listViewItem, 4, data, "Qty");
            this.UpdateSubItem(listViewItem, 5, data, "Price");
            this.UpdateSubItem(listViewItem, 6, data, "StopPx");
            this.UpdateSubItem(listViewItem, 7, data, "OrderStatus");
            if (!(data.Account == this.cbxAccount.SelectedItem as string))
            {
                return;
            }
            this.UpdateListView(data.Account, AccountDataViewer.ListType.Orders);
        }
Ejemplo n.º 2
0
 private void AddOrder(SmartQuant.AccountData data)
 {
     Dictionary<string, ListViewItem> dictionary = this.orders[data.Account];
     string key = new OrderKey(data).ToString();
     ListViewItem listViewItem = (ListViewItem)null;
     if (!dictionary.TryGetValue(key, out listViewItem))
     {
         listViewItem = new ListViewItem(new string[8]);
         listViewItem.Name = key;
         listViewItem.SubItems[0].Text = key;
         dictionary.Add(key, listViewItem);
     }
     this.UpdateSubItem(listViewItem, 1, data, "Symbol");
     this.UpdateSubItem(listViewItem, 2, data, "OrderSide");
     this.UpdateSubItem(listViewItem, 3, data, "OrderType");
     this.UpdateSubItem(listViewItem, 4, data, "Qty");
     this.UpdateSubItem(listViewItem, 5, data, "Price");
     this.UpdateSubItem(listViewItem, 6, data, "StopPx");
     this.UpdateSubItem(listViewItem, 7, data, "OrderStatus");
     if (!(data.Account == this.cbxAccount.SelectedItem as string))
         return;
     this.UpdateListView(data.Account, AccountDataViewer.ListType.Orders);
 }