private void ToggleSearchView(SearchViews currentView) { int height; Graphics graphics; if (this.SelectedDownloadOptions == null) { height = 0; } else { height = this.SelectedDownloadOptions.Height; } switch (currentView) { case SearchViews.Basic: this.gpgLabelSearchType.Text = Loc.Get("<LOC>Basic Search"); using (graphics = base.CreateGraphics()) { this.gpgLabelSearchType.Left = this.skinButtonSearchType.Left - (((int) DrawUtil.MeasureString(graphics, this.gpgLabelSearchType.Text, this.gpgLabelSearchType.Font).Width) + 6); } if (this.SelectedDownloadOptions != null) { this.SelectedDownloadOptions.Visible = true; } this.gpgGroupBoxCriteria.Height += height; this.gpgGroupBoxResults.Top += height; this.gpgGroupBoxResults.Height -= height; this.skinButtonSearchType.Tag = SearchViews.Advanced; this.CurrentSearchView = SearchViews.Advanced; this.skinButtonSearchType.SkinBasePath = @"Dialog\ContentManager\BtnBasicSearch"; break; case SearchViews.Advanced: this.gpgLabelSearchType.Text = Loc.Get("<LOC>Advanced Search"); using (graphics = base.CreateGraphics()) { this.gpgLabelSearchType.Left = this.skinButtonSearchType.Left - (((int) DrawUtil.MeasureString(graphics, this.gpgLabelSearchType.Text, this.gpgLabelSearchType.Font).Width) + 6); } if (this.SelectedDownloadOptions != null) { this.SelectedDownloadOptions.Visible = false; } this.gpgGroupBoxCriteria.Height -= height; this.gpgGroupBoxResults.Top -= height; this.gpgGroupBoxResults.Height += height; this.skinButtonSearchType.Tag = SearchViews.Basic; this.CurrentSearchView = SearchViews.Basic; this.skinButtonSearchType.SkinBasePath = @"Dialog\ContentManager\BtnAdvancedSearch"; break; } }
public SearchDataSource() { _enablePaging = true; _currentPage = 0; _category = ""; _folderId = 0; _languageId = 1033; _orderby = WebSearchOrder.Rank; _orderbyDir = WebSearchOrderByDirection.Descending; _recursive = true; _searchFor = SearchDocumentType.all; _resultType = WebSearchResultType.html; _searchText = ""; _viewName = SearchViews.Simple ; }