public void ShouldShowHistSeriesView()
 {
     var histSeriesVM = new HistSeriesViewModel();
     var histSeriesView = new HistSeriesView { ViewModel = histSeriesVM };            
     var histseriesForm = histSeriesView.DisplayInShowForm("Hist Series");
     Application.Run(histseriesForm);
 }
    public async Task Create(SeasonalityAnalysisType componentsToHave_)
    {
      // already called create...
      if (_addedEvents) return;

      addInDynamicEvents();
      eventSelector1.Create(getCC());
      seasonalityChart1.Create();

      #region CalendarSpan

      if (componentsToHave_.Has(SeasonalityAnalysisType.CalendarSpan))
      {
        calendarMovesControl1 = new CalendarMovesControl {Dock = DockStyle.Fill};
        ultraTabControl2.Tabs["KEY_BETWEEN_DATES"].TabPage.Controls.Add(calendarMovesControl1);
        calendarMovesControl1.Create();

      }
      else
      {
        ultraTabControl2.Tabs.Remove(ultraTabControl2.Tabs["KEY_BETWEEN_DATES"]);
      }

      #endregion

      #region Between Events

      if (componentsToHave_.Has(SeasonalityAnalysisType.BetweenEvents))
      {
        interEventControl1 = new InterEventControl {Dock = DockStyle.Fill};
        ultraTabControl2.Tabs["KEY_INTER_EVENTS"].TabPage.Controls.Add(interEventControl1);
        await interEventControl1.Create(getCC());
      }
      else
      {
        ultraTabControl2.Tabs.Remove(ultraTabControl2.Tabs["KEY_INTER_EVENTS"]);
      }

      #endregion

      #region Multi Instruments Charting

      if (componentsToHave_.Has(SeasonalityAnalysisType.StatsGrid))
      {
        multiInstrumentsView = new MultiInstrumentsView {Dock = DockStyle.Fill};
        multiInstrumentsView.Create(m_cc);
        ultraTabControl2.Tabs["KEY_MULTI_INST"].TabPage.Controls.Add(multiInstrumentsView);

        var multiInstrumentVM = new MultiInstrumentsViewModel(m_cc);
        multiInstrumentsView.ViewModel = multiInstrumentVM;

      }
      else
      {
        ultraTabControl2.Tabs.Remove(ultraTabControl2.Tabs["KEY_MULTI_INST"]);
      }

      if (componentsToHave_.Has(SeasonalityAnalysisType.MarketView))
      {
          marketView = new MarketView { Dock = DockStyle.Fill };
          ultraTabControl2.Tabs["KEY_MARKET"].TabPage.Controls.Add(marketView);

          var marketVM = new MarketViewModel();
          marketView.ViewModel = marketVM;

      }
      else
      {
          ultraTabControl2.Tabs.Remove(ultraTabControl2.Tabs["KEY_MARKET"]);
      }

      #endregion

      #region HistSeriesView

      if (componentsToHave_.Has(SeasonalityAnalysisType.HistSeriesView))
      {
        histSeriesView1 = new HistSeriesView {Dock = DockStyle.Fill};
        ultraTabControl2.Tabs["KEY_HIST_SERIES"].TabPage.Controls.Add(histSeriesView1);

        var histSeriesVM = new HistSeriesViewModel();
        histSeriesView1.ViewModel = histSeriesVM;
      }
      else
      {
        ultraTabControl2.Tabs.Remove(ultraTabControl2.Tabs["KEY_HIST_SERIES"]);
      }



      #endregion



      #region CompositeView

      if (componentsToHave_.Has(SeasonalityAnalysisType.CompositeView))
      {
          compositeView1 = new CompositeView() { Dock = DockStyle.Fill };
          ultraTabControl2.Tabs["KEY_COMPO"].TabPage.Controls.Add(compositeView1);

          var compositeVM = new CompositeViewModel();
          compositeView1.ViewModel = compositeVM;
      }
      else
      {
          ultraTabControl2.Tabs.Remove(ultraTabControl2.Tabs["KEY_COMPO"]);
      }



      #endregion

    }