void Clear()
        {
            SelectDataSourceViewModel sdsv = (SelectDataSourceViewModel)_selectDataSource;

            sdsv.DataSourceViewModel.DownloadedData.Clear();
            sdsv.DataSourceViewModel.TagManagers.Clear();
        }
        void ShowPiDataView()
        {
            if (_selectDataSource != null)
            {
                SelectDataSourceViewModel        sdsv = (SelectDataSourceViewModel )_selectDataSource;
                ObservableCollection <DataTable> data = sdsv.DataSourceViewModel.DownloadedData;

                Workspace = new ViewPiDataViewModel(data);
            }
        }
        void ShowDataInventory()
        {
            SelectDataSourceViewModel sdsv = (SelectDataSourceViewModel)_selectDataSource;

            ObservableCollection <ViewModelBase> vmCol = new ObservableCollection <ViewModelBase>();

            foreach (TagManager tm in sdsv.DataSourceViewModel.TagManagers)
            {
                //add a view model to a collection
                DataInventoryViewModel divm = new DataInventoryViewModel(tm.Tags);
                divm.DisplayName = tm.SetName;
                vmCol.Add(divm);
            }
            Workspace = new MultipleDataSetViewModel(vmCol);
        }
        bool CanClear()
        {
            if (_selectDataSource == null)
            {
                return(false);
            }
            SelectDataSourceViewModel sdsv = (SelectDataSourceViewModel)_selectDataSource;

            if (sdsv.DataSourceViewModel == null)
            {
                return(false);
            }
            if (sdsv.DataSourceViewModel.DownloadedData == null)
            {
                return(false);
            }

            return(true);
        }
        void ShowTimeSeries()
        {
            SelectDataSourceViewModel            sdsv  = (SelectDataSourceViewModel)_selectDataSource;
            ObservableCollection <ViewModelBase> vmCol = new ObservableCollection <ViewModelBase>();



            if (sdsv.DataSourceViewModel  is HoustonOpsServerViewModel)
            {
                HoustonOpsServerViewModel hsvm = (HoustonOpsServerViewModel)sdsv.DataSourceViewModel;
                foreach (SelectionItem <ProjectViewModel> pvm in hsvm.ProjectList.AllItems)
                {
                    foreach (TagManager tm in pvm.SelectedItem.TagManagers)
                    {
                        //add a view model to a collection
                        TimeSeriesViewModel divm = new TimeSeriesViewModel(tm.Tags);
                        vmCol.Add(divm);
                    }
                }
            }
            else
            {
                foreach (TagManager tm in sdsv.DataSourceViewModel.TagManagers)
                {
                    //add a view model to a collection
                    TimeSeriesViewModel divm = new TimeSeriesViewModel(tm.Tags, new List <int>()
                    {
                        4, 6, 8
                    });
                    divm.DisplayName = tm.SetName;
                    vmCol.Add(divm);
                }
            }

            Workspace = new MultipleDataSetViewModel(vmCol);
        }