public void GivenIAmOnFOIRequestPageFor(string iaId) { var pageNavigator = new PageNavigator(); _driver = pageNavigator.GoToFOIRequestPage(iaId); Image2Path = pageNavigator.Configuration.GetValue <string>("Image2Path"); }
private void btnEditOwner_Click(object sender, RoutedEventArgs e) { ComboBox cbAirlines = new ComboBox(); cbAirlines.SetResourceReference(ComboBox.StyleProperty, "ComboBoxTransparentStyle"); cbAirlines.SetResourceReference(ComboBox.ItemTemplateProperty, "AirlineLogoItem"); cbAirlines.HorizontalAlignment = System.Windows.HorizontalAlignment.Left; cbAirlines.Width = 200; cbAirlines.Items.Add(GameObject.GetInstance().MainAirline); foreach (SubsidiaryAirline airline in GameObject.GetInstance().MainAirline.Subsidiaries) { cbAirlines.Items.Add(airline); } cbAirlines.Items.Remove(this.Airliner.Airliner.Airline); cbAirlines.SelectedIndex = 0; if (PopUpSingleElement.ShowPopUp(Translator.GetInstance().GetString("PageFleetAirliner", "1028"), cbAirlines) == PopUpSingleElement.ButtonSelected.OK && cbAirlines.SelectedItem != null) { Airline airline = (Airline)cbAirlines.SelectedItem; this.Airliner.Airliner.Airline.removeAirliner(this.Airliner); airline.addAirliner(this.Airliner); this.Airliner.Airliner.Airline = airline; PageNavigator.NavigateTo(new PageFleetAirliner(this.Airliner)); } }
public void GivenIAmOnMYCPageAndISignIn() { _driver = new PageNavigator().GoToMYCPage(); var webDriver = new PageNavigator(); webDriver.SingleSignOn(_driver); }
public void GivenIAmOnECommercePageForToUploadDeathCertificate(string iaId) { var pageNavigator = new PageNavigator(); _driver = pageNavigator.GoToDetailsPageOffsite("r", iaId); Image2Path = pageNavigator.Configuration.GetValue <string>("Image2Path"); }
private void btnCreate_Click(object sender, RoutedEventArgs e) { Slider slMoney = UIHelpers.FindChild <Slider>(this, "money"); Slider slLoan = UIHelpers.FindChild <Slider>(this, "loan"); Slider slPrice = UIHelpers.FindChild <Slider>(this, "price"); Slider slPassengers = UIHelpers.FindChild <Slider>(this, "passengers"); Slider slAI = UIHelpers.FindChild <Slider>(this, "AI"); Slider slStartData = UIHelpers.FindChild <Slider>(this, "startdata"); double money = slMoney.Value; double loan = slLoan.Value; double passengers = slPassengers.Value; double price = slPrice.Value; double AI = slAI.Value; double startData = slStartData.Value; DifficultyLevel level = new DifficultyLevel("Custom", money, loan, passengers, price, AI, startData); WPFMessageBoxResult result = WPFMessageBox.Show(Translator.GetInstance().GetString("MessageBox", "2406"), Translator.GetInstance().GetString("MessageBox", "2406", "message"), WPFMessageBoxButtons.YesNo); if (result == WPFMessageBoxResult.Yes) { DifficultyLevels.AddDifficultyLevel(level); PageNavigator.NavigateTo(new PageNewGame()); } }
private void SetBookmarkingPagination() { var pageNavigator = new PageNavigator(); ServiceHelper.InitPageNavigator(pageNavigator, ServiceHelper.GetTagsCount()); BookmarkingPaginationContainer.Controls.Add(pageNavigator); }
private void imgAirline_Click(object sender, MouseButtonEventArgs e) { Airline airline = (Airline)((Image)sender).Tag; GameObject.GetInstance().setHumanAirline(airline); PageNavigator.NavigateTo(new PageAirline(GameObject.GetInstance().HumanAirline)); }
private void btnCreateGame_Click(object sender, RoutedEventArgs e) { List <Airline> airlines = new List <Airline>(); foreach (Airline airline in this.SelectedAirlines) { airlines.Add(airline); } this.StartData.Opponents = airlines; StandardMasterPage smp = this.Content as StandardMasterPage; // SplashControl scCreating = UIHelpers.FindChild<SplashControl>(smp, "scCreating"); //scCreating.Visibility = System.Windows.Visibility.Visible; BackgroundWorker bgWorker = new BackgroundWorker(); bgWorker.DoWork += (y, x) => { GameObjectHelpers.CreateGame(this.StartData); }; bgWorker.RunWorkerCompleted += (y, x) => { // scCreating.Visibility = System.Windows.Visibility.Collapsed; PageNavigator.NavigateTo(new PageAirline(GameObject.GetInstance().HumanAirline)); PageNavigator.ClearNavigator(); }; bgWorker.RunWorkerAsync(); }
private async void OnLoaded(object sender, RoutedEventArgs e) { if (PageNavigator is null) { return; } if (App.Current.Properties.Contains(App.ArgumentsKey)) { await PageNavigator.GoToAsync <PgViewer>().ConfigureAwait(false); if (PageNavigator.CurrentPage is PgViewer pgViewer && App.Current.Properties[App.ArgumentsKey] is string[] args) { pgViewer.View(args[0]); } } else { try { await PageNavigator.GoToAsync <PgLibrary>().ConfigureAwait(false); } catch (TaskCanceledException) { // } } }
protected void Page_Load(object sender, EventArgs e) { var pageCounter = string.IsNullOrEmpty(Request["size"]) ? 20 : Convert.ToInt32(Request["size"]); var helper = BookmarkingServiceHelper.GetCurrentInstanse(); var bookmarks = helper.GetBookmarks(pageCounter); if (bookmarks == null || bookmarks.Count <= 0) { return; } var displayMode = BookmarkingBusinessFactory.GetDisplayMode(); if (BookmarkDisplayMode.SelectedBookmark.Equals(displayMode)) { SingleBookmark = true; } else { SingleBookmark = false; var pageNavigator = new PageNavigator(); helper.InitPageNavigator(pageNavigator, pageCounter); ItemCounter = pageNavigator.EntryCount; BookmarkingPaginationContainer.Controls.Add(pageNavigator); } }
//creates the airline private void createAirline() { Airline tAirline = Airlines.GetAirline(txtIATA.Text.Trim().ToUpper()); if (tAirline != null) { Airlines.RemoveAirline(tAirline); } string name = txtAirlineName.Text.Trim(); string iata = txtIATA.Text.Trim().ToUpper(); Country country = (Country)cbCountry.SelectedItem; string color = ((PropertyInfo)cbColor.SelectedItem).Name; AirlineProfile profile = new AirlineProfile(name, iata, color, "Unknown", false, 1950, 2199); profile.Countries = new List <Country>() { country }; profile.Country = country; profile.addLogo(new AirlineLogo(logoPath)); Airline airline = new Airline(profile, Airline.AirlineMentality.Aggressive, Airline.AirlineFocus.Local, Airline.AirlineLicense.Domestic, airlinerType); Airlines.AddAirline(airline); PageNavigator.NavigateTo(new PageNewGame()); }
private void btnCreateGame_Click(object sender, RoutedEventArgs e) { this.StartData.Airline = (Airline)cbAirline.SelectedItem; this.StartData.Airport = (Airport)cbAirport.SelectedItem; this.StartData.CEO = (string)txtCEO.Text; this.StartData.HomeCountry = (Country)cbCountry.SelectedItem; this.StartData.TimeZone = (GameTimeZone)cbTimeZone.SelectedItem; this.StartData.LocalCurrency = cbLocalCurrency.IsChecked.Value && this.StartData.HomeCountry.HasLocalCurrency; if (!this.StartData.RandomOpponents) { PageNavigator.NavigateTo(new PageSelectOpponents(this.StartData)); } else { SplashControl scCreating = UIHelpers.FindChild <SplashControl>(this, "scCreating"); scCreating.Visibility = System.Windows.Visibility.Visible; BackgroundWorker bgWorker = new BackgroundWorker(); bgWorker.DoWork += (y, x) => { GameObjectHelpers.CreateGame(this.StartData); }; bgWorker.RunWorkerCompleted += (y, x) => { scCreating.Visibility = System.Windows.Visibility.Collapsed; PageNavigator.NavigateTo(new PageAirline(GameObject.GetInstance().HumanAirline)); PageNavigator.ClearNavigator(); }; bgWorker.RunWorkerAsync(); } }
//converts the airliner to a cargo airliner public void convertToCargo() { FleetAirlinerHelpers.ConvertPassengerToCargoAirliner(this.Airliner); PageNavigator.NavigateTo(new PageAirline(this.Airliner.Airliner.Airline)); }
private async void ButtonCommit_Click(object sender, RoutedEventArgs e) { ButtonCommit.IsEnabled = false; var province = TextBoxProvince.Text; var city = TextBoxCity.Text; if (string.IsNullOrEmpty(province) || string.IsNullOrEmpty(city)) { State.AddMessage = "参数不能为空"; ButtonCommit.IsEnabled = true; return; } if (province.Length > 20 || city.Length > 20) { State.AddMessage = "参数太长"; ButtonCommit.IsEnabled = true; return; } await HttpClient.AddDestAsync(province, city); ButtonCommit.IsEnabled = true; await Task.Delay(3000); PageNavigator.PopupClose(); }
private void LnkAirline_Click(object sender, RoutedEventArgs e) { Airline airline = (Airline)((Hyperlink)sender).Tag; //PageNavigator.NavigateTo(new PageAirline(airline)); PageNavigator.NavigateTo(new GUIModel.PagesModel.AirlinePageModel.PageAirline(airline)); }
private void btnCreateGame_Click(object sender, RoutedEventArgs e) { List <Airline> airlines = new List <Airline>(); foreach (Airline airline in this.SelectedAirlines) { airlines.Add(airline); } this.StartData.Opponents = airlines; BackgroundWorker bgWorker = new BackgroundWorker(); bgWorker.DoWork += (y, x) => { GameObjectHelpers.CreateGame(this.StartData); }; bgWorker.RunWorkerCompleted += (y, x) => { PageNavigator.NavigateTo(new PageAirline(GameObject.GetInstance().HumanAirline)); PageNavigator.ClearNavigator(); }; bgWorker.RunWorkerAsync(); }
private void btnConvertToCargo_Click(object sender, RoutedEventArgs e) { double convertPrice = GeneralHelpers.GetInflationPrice(1000 * ((AirlinerPassengerType)this.Airliner.Airliner.Type).MaxSeatingCapacity); if (this.Airliner.Airliner.getPrice() > GameObject.GetInstance().HumanAirline.Money) { WPFMessageBox.Show(Translator.GetInstance().GetString("MessageBox", "2109"), Translator.GetInstance().GetString("MessageBox", "2109", "message"), WPFMessageBoxButtons.Ok); } else { WPFMessageBoxResult result = WPFMessageBox.Show(Translator.GetInstance().GetString("MessageBox", "2123"), string.Format(Translator.GetInstance().GetString("MessageBox", "2123", "message"), this.Airliner.Name, new ValueCurrencyConverter().Convert(convertPrice)), WPFMessageBoxButtons.YesNo); if (result == WPFMessageBoxResult.Yes) { AirlinerPassengerType currentType = this.Airliner.Airliner.Type as AirlinerPassengerType; string airlinerName = string.Format("{0} Freighter", currentType.Name); double cargoSize = AirlinerHelpers.ConvertPassengersToCargoSize(currentType); AirlinerType newCargoType = new AirlinerCargoType(currentType.Manufacturer, airlinerName, currentType.AirlinerFamily, currentType.CockpitCrew, cargoSize, currentType.CruisingSpeed, currentType.Range, currentType.Wingspan, currentType.Length, currentType.FuelConsumption, currentType.Price, currentType.MinRunwaylength, currentType.FuelCapacity, currentType.Body, currentType.RangeType, currentType.Engine, currentType.Produced, currentType.ProductionRate, false); newCargoType.BaseType = currentType; AirlinerTypes.AddType(newCargoType); this.Airliner.Airliner.Type = newCargoType; AirlineHelpers.AddAirlineInvoice(GameObject.GetInstance().HumanAirline, GameObject.GetInstance().GameTime, Invoice.InvoiceType.Airline_Expenses, -convertPrice); PageNavigator.NavigateTo(new PageFleetAirliner(this.Airliner)); } } }
public void GivenIAmOnRequestASearchOfClosedRecordsPage() { var pageNavigator = new PageNavigator(); _driver = pageNavigator.GoToFOIRegisterPage(); Image1Path = pageNavigator.Configuration.GetValue <string>("Image1Path"); }
private void CreateAccount(object sender, RoutedEventArgs e) { var path = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + "/Biletomat/Profiles"; if (!Directory.Exists(path)) { Directory.CreateDirectory(path); } if (nameFld.Text.Length == 0 || passFld.Password.Length == 0 || passReFld.Password.Length == 0 || mailFld.Text.Length == 0) { MessageBox.Show("Wszystkie pola muszą być wypełnione", "Błąd", MessageBoxButton.OK, MessageBoxImage.Error); } else if (passFld.Password != passReFld.Password) { MessageBox.Show("Podane hasła się różnią", "Błąd", MessageBoxButton.OK, MessageBoxImage.Error); } else if (nameFld.Text == "admin" || passFld.Password == "admin") { MessageBox.Show("Nie można utworzyć konta z podanymi danymi", "Błąd", MessageBoxButton.OK, MessageBoxImage.Error); } else { using (var sw = new StreamWriter(path + "/" + nameFld.Text + ".profile", false)) { sw.WriteLine("Nazwa: " + nameFld.Text); sw.WriteLine("Hasło: " + passFld.Password); sw.WriteLine("E-mail: " + mailFld.Text); } PageNavigator.Switch(new LoginView()); } }
public void WhenSignedIn() { var webDriver = new PageNavigator(); _driver.FindElement(By.Id("signin")).Click(); webDriver.SingleSignOn(_driver); }
private async void ButtonCommit_Click(object sender, RoutedEventArgs e) { ButtonCommit.IsEnabled = false; var sno = TextBoxSno.Text; var name = TextBoxName.Text; var ageStr = TextBoxAge.Text; Sex sex = (Sex)ComboBoxSex.SelectedIndex; if (string.IsNullOrEmpty(sno) || string.IsNullOrEmpty(ageStr) || string.IsNullOrEmpty(name)) { State.AddMessage = "参数不能为空"; ButtonCommit.IsEnabled = true; return; } if (sno.Length > 20) { State.AddMessage = "参数太长"; ButtonCommit.IsEnabled = true; return; } if (int.TryParse(ageStr, out int age)) { if (age < 8 || age > 120) { State.AddMessage = "年龄不是一个学生该有的年龄"; } if (SelectorViewModel.CityIndex <= 0 || SelectorViewModel.ClassIndex <= 0) { State.AddMessage = "城市或者班级必选"; ButtonCommit.IsEnabled = true; return; } var response = await HttpClient.AddStudentAsync(sno, name, sex, age, SelectorViewModel.Xclasses[SelectorViewModel.ClassIndex].Cno, SelectorViewModel.Cities[SelectorViewModel.CityIndex].Cino); if (response.Code == System.Net.HttpStatusCode.OK) { State.AddMessage = "添加成功"; ButtonCommit.IsEnabled = true; await Task.Delay(3000); PageNavigator.PopupClose(); } else { State.AddMessage = response.Msg; ButtonCommit.IsEnabled = true; } } else { State.AddMessage = "输入不符合数字"; ButtonCommit.IsEnabled = true; return; } }
public ScoreViewModel(INavigator navigator) { Debug.WriteLine("ScoreViewModel Constructor: "); _navigator = navigator; ChapterXp = PageNavigator.Xp.ToString(); ChapterResult = PageNavigator.GetChapterResult(); ResultMessage = "Gattis!"; }
public void GivenISignedInAndNavigateToDeyailsPageFor(string Iaid) { var webDriver = new PageNavigator(); _driver = webDriver.GoToDiscoveryDetailsPage("r", Iaid); _driver.FindElement(By.Id("signin")).Click(); webDriver.SingleSignOn(_driver); }
private void StudentPage_Loaded(object sender, RoutedEventArgs e) { //DataGrid1.ItemsSource = RemoteStorage.StudentOutView; //RemoteStorage.FetchStudent(); SelectorViewModel.SelectorMode = SelectorMode.StructDest; ButtonQuery.Click += (o, e) => RemoteStorage.FetchStudentsAsync(); ButtonAdd.Click += (o, e) => PageNavigator.NavigateToPopup <StudentAddPage>(); }
public void GivenIAmOnDownloadPageForOffsiteAndSignedIn(string iaId) { var webDriver = new PageNavigator(); _driver = webDriver.GoToDetailsPageOffsite("r", iaId); _driver.FindElement(By.Id("signin")).Click(); webDriver.SingleSignOn(_driver); }
public ItemsPage(ItemsViewModel model, PageNavigator pageNavigator) { _pageNavigator = pageNavigator; InitializeComponent(); BindingContext = viewModel = model; }
public void GivenIAmOnTheDetailsPageForForOffSite(string iaId) { var webDriver = new PageNavigator(); _driver = webDriver.GoToDetailsPageOffsite("r", iaId); IJavaScriptExecutor js = (IJavaScriptExecutor)_driver; js.ExecuteScript("window.scrollTo(0, 900)"); }
public void WhenUploadType(string invalidFilePath) { var pageNavigator = new PageNavigator(); var path = pageNavigator.Configuration.GetValue <string>(invalidFilePath); _driver.FindElement(By.XPath("//input[@type='file']")).SendKeys(path); _driver.FindElement(By.XPath("//input[@value='Upload']")).Click(); Thread.Sleep(2000); }
private void lnkAirlineFacility_click(object sender, RoutedEventArgs e) { AirlineFacility facility = (AirlineFacility)((Hyperlink)sender).Tag; if (facility.Shortname == "Maintenance") { PageNavigator.NavigateTo(new PageAirlineFacilityMaintenance(facility)); } }
private void Language_Click(object sender, RoutedEventArgs e) { Language language = (Language)((Hyperlink)sender).Tag; AppSettings.GetInstance().setLanguage(language); PageNavigator.NavigateTo(new PageStartMenu()); }
public TopArtists() { page_navigator = new PageNavigator <TopArtist> (list); VBox page_box = new VBox (false, 10); page_box.PackStart (box, false, false, 0); page_box.PackStart (page_navigator, false, false, 0); list.AmountToShow = 5; this.DisplayWidget = page_box; page_navigator.PageChanged += page_changed; }
public TopTracks(ArtistInfo main) { this.main = main; page_navigator = new PageNavigator <TopTrack> (top_tracks); VBox page_box = new VBox (false, 10); page_box.PackStart (box, false, false, 0); page_box.PackStart (page_navigator, false, false, 0); top_tracks.AmountToShow = 10; this.DisplayWidget = page_box; page_navigator.PageChanged += page_changed; }
public SimilarArtists(ArtistInfo main) { this.main = main; page_navigator = new PageNavigator <SimilarArtist> (similar_artists); VBox page_box = new VBox (false, 10); page_box.PackStart (box, false, false, 0); page_box.PackStart (page_navigator, false, false, 0); similar_artists.AmountToShow = 5; this.DisplayWidget = page_box; page_navigator.PageChanged += page_changed; }
public SimilarTracks() { Label title_label = new Label (); title_label.Markup = "<big><b>Similar Tracks:</b></big>"; title_label.Xalign = 0; box.PackStart (title_label, false, false, 0); box.PackStart (tracks_box, false, false, 0); page_navigator = new PageNavigator <SimilarTrack> (similar_tracks); VBox page_box = new VBox (false, 10); page_box.PackStart (box, false, false, 0); page_box.PackStart (page_navigator, false, false, 0); similar_tracks.AmountToShow = 10; this.DisplayWidget = page_box; page_navigator.PageChanged += page_changed; }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.components = new System.ComponentModel.Container(); this.c_lbResults = new System.Windows.Forms.ListBox(); this.c_msContext = new System.Windows.Forms.ContextMenuStrip(this.components); this.c_miAddLayer = new System.Windows.Forms.ToolStripMenuItem(); this.c_pBase = new System.Windows.Forms.Panel(); this.c_oPageNavigator = new GED.App.UI.Controls.PageNavigator(); this.c_tsTabToolstrip = new GED.App.UI.Controls.TabToolStrip(); this.precacheToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.c_msContext.SuspendLayout(); this.c_pBase.SuspendLayout(); this.SuspendLayout(); // // c_lbResults // this.c_lbResults.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.c_lbResults.ContextMenuStrip = this.c_msContext; this.c_lbResults.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawVariable; this.c_lbResults.FormattingEnabled = true; this.c_lbResults.HorizontalScrollbar = true; this.c_lbResults.IntegralHeight = false; this.c_lbResults.Location = new System.Drawing.Point(3, 32); this.c_lbResults.Name = "c_lbResults"; this.c_lbResults.SelectionMode = System.Windows.Forms.SelectionMode.MultiExtended; this.c_lbResults.Size = new System.Drawing.Size(192, 138); this.c_lbResults.TabIndex = 0; this.c_lbResults.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.cResultListBox_MouseDoubleClick); this.c_lbResults.DrawItem += new System.Windows.Forms.DrawItemEventHandler(this.cResultListBox_DrawItem); this.c_lbResults.MeasureItem += new System.Windows.Forms.MeasureItemEventHandler(this.cResultListBox_MeasureItem); this.c_lbResults.SelectedIndexChanged += new System.EventHandler(this.c_lbResults_SelectedIndexChanged); this.c_lbResults.MouseMove += new System.Windows.Forms.MouseEventHandler(this.cResultListBox_MouseMove); this.c_lbResults.MouseDown += new System.Windows.Forms.MouseEventHandler(this.cResultListBox_MouseDown); // // c_msContext // this.c_msContext.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.c_miAddLayer, this.precacheToolStripMenuItem}); this.c_msContext.Name = "cContextMenu"; this.c_msContext.Size = new System.Drawing.Size(168, 70); this.c_msContext.Opening += new System.ComponentModel.CancelEventHandler(this.cContextMenu_Opening); // // c_miAddLayer // this.c_miAddLayer.Image = global::GED.App.Properties.Resources.layers_add; this.c_miAddLayer.Name = "c_miAddLayer"; this.c_miAddLayer.Size = new System.Drawing.Size(167, 22); this.c_miAddLayer.Text = "Add to Data Layers"; this.c_miAddLayer.Click += new System.EventHandler(this.addLayerToolStripMenuItem_Click); // // c_pBase // this.c_pBase.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.c_pBase.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.c_pBase.Controls.Add(this.c_lbResults); this.c_pBase.Controls.Add(this.c_oPageNavigator); this.c_pBase.Location = new System.Drawing.Point(0, 0); this.c_pBase.Name = "c_pBase"; this.c_pBase.Size = new System.Drawing.Size(200, 175); this.c_pBase.TabIndex = 3; // // c_oPageNavigator // this.c_oPageNavigator.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.c_oPageNavigator.Location = new System.Drawing.Point(3, 3); this.c_oPageNavigator.Name = "c_oPageNavigator"; this.c_oPageNavigator.Size = new System.Drawing.Size(192, 23); this.c_oPageNavigator.TabIndex = 1; // // c_tsTabToolstrip // this.c_tsTabToolstrip.Dock = System.Windows.Forms.DockStyle.Bottom; this.c_tsTabToolstrip.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden; this.c_tsTabToolstrip.Location = new System.Drawing.Point(0, 175); this.c_tsTabToolstrip.Name = "c_tsTabToolstrip"; this.c_tsTabToolstrip.Size = new System.Drawing.Size(200, 25); this.c_tsTabToolstrip.TabIndex = 2; this.c_tsTabToolstrip.TabStop = true; this.c_tsTabToolstrip.Text = "tabToolbar1"; // // precacheToolStripMenuItem // this.precacheToolStripMenuItem.Name = "precacheToolStripMenuItem"; this.precacheToolStripMenuItem.Size = new System.Drawing.Size(167, 22); this.precacheToolStripMenuItem.Text = "Precache"; this.precacheToolStripMenuItem.Click += new System.EventHandler(this.precacheToolStripMenuItem_Click); // // DappleSearchList // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.Controls.Add(this.c_pBase); this.Controls.Add(this.c_tsTabToolstrip); this.Name = "DappleSearchList"; this.Size = new System.Drawing.Size(200, 200); this.c_msContext.ResumeLayout(false); this.c_pBase.ResumeLayout(false); this.ResumeLayout(false); this.PerformLayout(); }
private void SetTotalPostsCount(int count) { var pageNavigator = new PageNavigator { PageUrl = "./" + "?" + QueryString("page"), CurrentPageNumber = SelectedPage, EntryCountOnPage = BlogsPerPage, VisiblePageCount = 5, ParamName = "page", EntryCount = count }; pageNavigatorHolder.Controls.Add(pageNavigator); }
private void SetBookmarkingPagination() { var pageNavigator = new PageNavigator(); ServiceHelper.InitPageNavigator(pageNavigator); BookmarkingPaginationContainer.Controls.Add(pageNavigator); }
protected void Page_Load(object sender, EventArgs e) { ForumManager.Instance.SetCurrentPage(ForumPage.Search); var currentPageNumber = 0; if (!String.IsNullOrEmpty(Request["p"])) { try { currentPageNumber = Convert.ToInt32(Request["p"]); } catch { currentPageNumber = 0; } } if (currentPageNumber <= 0) currentPageNumber = 1; var findTopicList = new List<Topic>(); var topicCount = 0; var searchText = ""; _tagID = 0; _isFindByTag = false; var tagName = ""; if (!String.IsNullOrEmpty(Request["tag"])) { _isFindByTag = true; try { _tagID = Convert.ToInt32(Request["tag"]); } catch { _tagID = 0; } findTopicList = ForumDataProvider.SearchTopicsByTag(TenantProvider.CurrentTenantID, _tagID, currentPageNumber, ForumManager.Settings.TopicCountOnPage, out topicCount); } else if (!String.IsNullOrEmpty(Request["search"])) { searchText = Request["search"]; findTopicList = ForumDataProvider.SearchTopicsByText(TenantProvider.CurrentTenantID, searchText, currentPageNumber, ForumManager.Settings.TopicCountOnPage, out topicCount); } if (findTopicList.Count > 0) { _isFind = true; var i = 0; foreach (var topic in findTopicList) { if (i == 0) { foreach (var tag in topic.Tags) { if (tag.ID == _tagID) { tagName = tag.Name; break; } } } var topicControl = (TopicControl) LoadControl(ForumManager.Settings.UserControlsVirtualPath + "/TopicControl.ascx"); topicControl.SettingsID = ForumManager.Settings.ID; topicControl.Topic = topic; topicControl.IsShowThreadName = true; topicControl.IsEven = (i%2 == 0); topicListHolder.Controls.Add(topicControl); i++; } var pageNavigator = new PageNavigator { CurrentPageNumber = currentPageNumber, EntryCountOnPage = ForumManager.Settings.TopicCountOnPage, VisiblePageCount = 5, EntryCount = topicCount }; if (_isFindByTag) pageNavigator.PageUrl = _isFindByTag ? "search.aspx?tag=" + _tagID.ToString() : "search.aspx?search=" + HttpUtility.UrlEncode(searchText, Encoding.UTF8); bottomPageNavigatorHolder.Controls.Add(pageNavigator); } else { var emptyScreenControl = new EmptyScreenControl { ImgSrc = WebImageSupplier.GetAbsoluteWebPath("forums_icon.png", ForumManager.Settings.ModuleID), Header = Resources.ForumResource.EmptyScreenSearchCaption, Describe = Resources.ForumResource.EmptyScreenSearchText, }; topicListHolder.Controls.Add(emptyScreenControl); } var breadCrumbs = (Master as ForumMasterPage).BreadCrumbs; breadCrumbs.Add(new BreadCrumb {Caption = Resources.ForumResource.ForumsBreadCrumbs, NavigationUrl = "default.aspx"}); breadCrumbs.Add(new BreadCrumb {Caption = HeaderStringHelper.GetHTMLSearchHeader(_isFindByTag ? tagName : searchText)}); Title = HeaderStringHelper.GetPageTitle(Resources.ForumResource.AddonName, breadCrumbs); }