/// <summary>
 /// Constructor.
 /// </summary>
 public SearchEventArgs(string searchText, List<ModelElement> source, SearchCriteria criteria)
     : base(null)
 {
     this.searchText = searchText;
     this.selectedSearchSource = new SearchSource(SearchSourceEnum.Custom, "Custom");
     this.selectedSearchSourceElements = source;
     this.selectedSearchCriteria = criteria;
 }
 /// <summary>
 /// Constructor.
 /// </summary>
 public SearchEventArgs(string searchText, SearchSource source, SearchCriteria criteria)
     : base(null)
 {
     this.searchText = searchText;
     this.selectedSearchSource = source;
     this.selectedSearchSourceElements = null;
     this.selectedSearchCriteria = criteria;
 }
        /// <summary>
        /// Initializes the  search criteria list.
        /// </summary>
        protected virtual void InitializeSearchOptions()
        {
            // initiliaze search sources
            searchSource = new List<SearchSource>();

            searchSource.Add(new SearchSource(SearchSourceEnum.Elements, PDEResources.Resources.SearchSourceEnum_Elements));
            searchSource.Add(new SearchSource(SearchSourceEnum.ReferenceRelationships, PDEResources.Resources.SearchSourceEnum_ReferenceRelationships));
            searchSource.Add(new SearchSource(SearchSourceEnum.ElementsAndReferenceRelationships, PDEResources.Resources.SearchSourceEnum_ElementsAndReferenceRelationships));

            selectedSearchSource = searchSource[0];

            // initiliaze serach criteria
            searchCriteria = new List<SearchCriteria>();

            searchCriteria.Add(new SearchCriteria(SearchCriteriaEnum.Name, PDEResources.Resources.SearchCriteriaEnum_Name));
            searchCriteria.Add(new SearchCriteria(SearchCriteriaEnum.Type, PDEResources.Resources.SearchCriteriaEnum_Type));
            searchCriteria.Add(new SearchCriteria(SearchCriteriaEnum.NameAndType, PDEResources.Resources.SearchCriteriaEnum_NameAndType));
            searchCriteria.Add(new SearchCriteria(SearchCriteriaEnum.Properties, PDEResources.Resources.SearchCriteriaEnum_Properties));
            searchCriteria.Add(new SearchCriteria(SearchCriteriaEnum.PropertiesWithoutName, PDEResources.Resources.SearchCriteriaEnum_PropertiesWithoutName));
            searchCriteria.Add(new SearchCriteria(SearchCriteriaEnum.Roles, PDEResources.Resources.SearchCriteriaEnum_Roles));
            searchCriteria.Add(new SearchCriteria(SearchCriteriaEnum.All, PDEResources.Resources.SearchCriteriaEnum_All));

            selectedSearchCriteria = searchCriteria[0];
            selectedSearchCriteriaInResult = searchCriteria[0];

        }