Example #1
0
        public WITQueryNodeViewModel(StoredQueryCollection collection, string displayName)
        {
            DisplayName = displayName;
            Type        = NodeType.Root;

            IEnumerable <StoredQuery> myQueries   = collection.Cast <StoredQuery>().Where(x => x.QueryScope == QueryScope.Private);
            IEnumerable <StoredQuery> teamQueries = collection.Cast <StoredQuery>().Where(x => x.QueryScope == QueryScope.Public);

            WITQueryNodeViewModel myQueriesNode   = new WITQueryNodeViewModel(myQueries, "My Queries");
            WITQueryNodeViewModel teamQueriesNode = new WITQueryNodeViewModel(teamQueries, "Team Queries");

            Children.Add(myQueriesNode);
            Children.Add(teamQueriesNode);
        }
Example #2
0
 void m_worker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
 {
     if (m_disposeRequested)
     {
         Dispose();
         return;
     }
     if (e.Error == null)
     {
         WITQueryNodeViewModel root = e.Result as WITQueryNodeViewModel;
         RootList.Add(root);
         IsLoading = false;
     }
 }