Exemplo n.º 1
0
    public void Create()
    {
      scsYearly.Create();
      scsRecent.Create();
      scsQuarterly.Create();
      scsHistVsCurrent.Create();
      EventHistChart.Create();
      EventHistChart.ShowStats = false;

      viewModel = new SeasonalityChartModel();
      viewModel.View = this;
      m_optionsControl = new SharedChartOptionsControl();
      m_optionsControl.Create(m_displayOptions);
      LookFeel.ProcessControl(m_optionsControl);

      cmbYearlyProb.Bind(m_displayOptions, "ProbabilityOption");
      checkBoxEvents.Bind(m_displayOptions, m => m.EventSeriesVisible);
      checkBoxStats.Bind(m_displayOptions, m => m.StatsVisible);
      m_displayOptions.EventSeriesVisible = true;
      comboCharts.AddItems(typeof(SeasonalityChartOption));
      comboCharts.Bind(m_displayOptions, "ChartToShow", new Validators.EnumDescValidator(SeasonalityChartOption.Recent));

      m_displayOptions.PropertyChanged += (a, b) =>
      {
        if (!m_reloadingCombo && String.CompareOrdinal(b.PropertyName, "ProbabilityOption") == 0)
          reloadYearlyProbability();
        if (!m_reloadingCombo && (String.CompareOrdinal(b.PropertyName, "EventSeriesVisible") == 0
            || String.CompareOrdinal(b.PropertyName, "StatsVisible") == 0))
            updateRecentChartSeries();
          if (!m_reloadingCombo && String.CompareOrdinal(b.PropertyName, "ChartToShow") == 0)
              ShowCorrectTopChart();

      };
    }
 protected override void SubscribeLiveData(SeasonalityChartModel VM)
 {
     VM.Subscribe(m_args.Ticker, m_args.Field);
 }
 protected virtual void SubscribeLiveData(SeasonalityChartModel VM)
 {
     VM.Reset();
 }