Exemplo n.º 1
0
    public void ClearData(string gbText_=null)
    {
      if (m_livePnlConsolidated != null)
      {
        subscribeToPnl(false);
        m_livePnlConsolidated.Dispose();
        m_livePnlConsolidated = null;
      }

      simpleWtsColumnChart1.ClearData();
      ultraGroupBox1.Text = gbText_ ?? string.Empty;
    }
Exemplo n.º 2
0
    public async Task BindToLive(string text_, LivePortfolioPnl pnl_, CarbonClient cc_)
    {
      ClearData(text_);

      if (pnl_ == null || !pnl_.InnerList.Any())
        return;

      m_livePnlConsolidated = new LivePortfolioPnlConsolidated(pnl_);
      await m_livePnlConsolidated.Populate(cc_,m_overrides);

      simpleWtsColumnChart1.Create(Helper.StripBbgEndings(m_livePnlConsolidated.List.Select(x => x.PnlName).ToArray()),
        m_livePnlConsolidated.List.Select(x => x.Pnl).ToArray());

      subscribeToPnl();

      simpleWtsColumnChart1.SetYAxixTickStyle(Infragistics.UltraChart.Shared.Styles.AxisTickStyle.Smart);
      m_yAxisFormat = "#,###;(#,###);-";
      simpleWtsColumnChart1.SetYAxisFormat(m_yAxisFormat,false);
    }