public AdvanceSearchWindow(LocalDataManager Data, SortPage sortPage) { this.Parent_Page = sortPage; InitializeComponent(); LocalData = Data; Request = new SQL_Review_REQUEST(); IncludedTagRequest = new List <List <TagObject> >(); ExcludedTagRequest = new List <List <TagObject> >(); IncludedTagRequest.Add(null); ExcludedTagRequest.Add(null); SB = new StringBuilder(); }
public LocalDataManager() { ReviewPage = null; SortPage = null; StatPage = null; TagPage = null; //Generate all of the tags upon construction. DBManager = new DatabaseManager(); InstrumentTags = new List <TagObject>(); LanguageTags = new List <TagObject>(); GenreTags = new List <TagObject>(); Tags = DBManager.GetAllTags(); foreach (TagObject Tag in Tags) { switch (Tag.Type) { case TagType.Genre: GenreTags.Add(Tag); break; case TagType.Instrument: InstrumentTags.Add(Tag); break; case TagType.Language: LanguageTags.Add(Tag); break; } } //Sort in Alphabetical Order: GenreTags.Sort((r1, r2) => r1.Name.CompareTo(r2.Name)); LanguageTags.Sort((r1, r2) => r1.Name.CompareTo(r2.Name)); InstrumentTags.Sort((r1, r2) => r1.Name.CompareTo(r2.Name)); }
private Page createNewPage(PageTypes type) { switch (type) { case PageTypes.ReviewPage: this.ReviewPage = new ReviewPage(this); return(this.ReviewPage); case PageTypes.SortPage: this.SortPage = new SortPage(this); return(this.SortPage); case PageTypes.StatPage: this.StatPage = new StatPage(this); return(this.StatPage); case PageTypes.TagPage: this.TagPage = new TagPage(this); return(this.TagPage); } return(null); }