/// <summary> /// Updates the journal data from the StatsBuffer. /// </summary> private void UpdateJournalData() { if (!Data.IsResult) { return; } journalData = new string[orders, columns]; orderIcons = new Image[orders]; int[] ordNumbers = ArrangeOrderNumbers(); for (int ord = firstOrd; ord < firstOrd + shownOrd; ord++) { int row = ord - firstOrd; Order order = StatsBuffer.OrdFromNumb(ordNumbers[ord]); journalData[row, 0] = (order.OrdNumb + 1).ToString(CultureInfo.InvariantCulture); journalData[row, 1] = Language.T(order.OrdDir.ToString()); journalData[row, 2] = Language.T(order.OrdType.ToString()); journalData[row, 3] = Configs.AccountInMoney ? (order.OrdDir == OrderDirection.Sell ? "-" : "") + (order.OrdLots * Data.InstrProperties.LotSize) : order.OrdLots.ToString(CultureInfo.InvariantCulture); journalData[row, 4] = order.OrdPrice.ToString(Data.Ff); journalData[row, 5] = (order.OrdPrice2 > 0 ? order.OrdPrice2.ToString(Data.Ff) : "-"); journalData[row, 6] = Language.T(order.OrdStatus.ToString()); journalData[row, 7] = order.OrdNote; // Icons orderIcons[row] = Order.OrderIconImage(order.OrderIcon); } }