private static void DisplayTopTen() { Raylib.DrawText("Original Top Ten List", (Raylib.GetScreenWidth() - ("Original Top Ten List".Length * 17)) / 2, 45, 30, WHITE); Raylib.DrawText("Name", 100, 110, 30, WHITE); Raylib.DrawText("Points", 390, 110, 30, WHITE); Raylib.DrawText("Rating", 600, 110, 30, WHITE); Raylib.DrawText("Commander", 575, 160, 30, WHITE); Raylib.DrawText("Command Pilot", 575, 190, 30, WHITE); Raylib.DrawText("Command Pilot", 575, 220, 30, WHITE); Raylib.DrawText("Pilot", 575, 250, 30, WHITE); Raylib.DrawText("Pilot", 575, 280, 30, WHITE); Raylib.DrawText("Pilot", 575, 310, 30, WHITE); Raylib.DrawText("Pilot", 575, 340, 30, WHITE); Raylib.DrawText("Pilot", 575, 370, 30, WHITE); Raylib.DrawText("Pilot", 575, 400, 30, WHITE); Raylib.DrawText("Pilot", 575, 430, 30, WHITE); TopTen originalTopTen = new TopTen(); for (int i = 0; i < originalTopTen.Leaders.Count; i++) { Raylib.DrawText(originalTopTen.Leaders[i].Item1, 30, 160 + (i * 30), 30, WHITE); Raylib.DrawText(originalTopTen.Leaders[i].Item2.ToString(), 400, 160 + (i * 30), 30, WHITE); } if (PressSPACEBAR()) { MainWindow.settings.currentScreen = "Settings"; } }
public void Given_RecordsOf3SameBrokersAnd2Uniques_Returns_TableWith3Records() { // Arrange var topten = new TopTen(); topten.AddWoonObjecten(new[] { new WoonObject { Adres = "Zaanstraat 1", MakelaarId = 20043, MakelaarNaam = "Erik", }, new WoonObject { Adres = "Zaanstraat 2", MakelaarId = 20041, MakelaarNaam = "Bart", }, new WoonObject { Adres = "Bloemstraat 3", MakelaarId = 20043, MakelaarNaam = "Erik", }, new WoonObject { Adres = "Bloemstraat 100", MakelaarId = 20040, MakelaarNaam = "Brian", }, new WoonObject { Adres = "Maria Austrastraat 82", MakelaarId = 20043, MakelaarNaam = "Erik", }, }); // Act var table = topten.GetTopTen(); // Assert Assert.AreEqual(3, table.Length); }
public MainWnd() { //IntPtr SaveFilter = SetUnhandledExceptionFilter(IntPtr.Zero); InitializeComponent(); //SetUnhandledExceptionFilter(SaveFilter); //m_Player = new PlayManager(); m_PlayList = new PlayList(this); m_PriceList = new PriceList(this); m_TopTen = new TopTen(this, Properties.Settings.Default.MenuShowDelaySec); s_VideoWnd = new VideoWnd(); if (m_UseBillValidator) { BillValidatorManager.Instance.Start(); } //=================================== #if FULL this.FormBorderStyle = FormBorderStyle.None; this.WindowState = FormWindowState.Maximized; this.AutoScroll = false; #endif #if !DEBUG Cursor.Hide(); #endif //====================== this.Load += delegate { #if WW s_VideoWnd.Show(); #endif }; this.Shown += new EventHandler(MainWnd_Shown); this.FormClosing += new FormClosingEventHandler(MainWnd_FormClosing); axShockwaveFlash1.LoadMovie(0, Path.Combine(Directory.GetCurrentDirectory(), "top.swf")); /*MenuSettings.Instance.MenuInitDelayChanged += delegate * { * m_TopTen.WaitDelaySec = MenuSettings.Instance.MenuInitDelay; * };*/ //m_TopTen.SetItems(songInfoManager.GetTopTen()); m_TopTen.Delay += new EventHandler(m_TopTen_Delay); pbOrder.Click += new EventHandler(pbOrder_Click); }
/// <inheritdoc/> public async IAsyncEnumerable <TopTen> CalculateTopTenLive([EnumeratorCancellation] CancellationToken cancellationToken = default) { const string query = "/amsterdam/tuin/"; var currentPage = 1; var leaderboard = new Dictionary <(long agentId, string agentName), int>(); var currentState = new TopTen(); AanbodPage page = null; do { page = await _fundaFacade.GetAanbod(query, currentPage, cancellationToken : cancellationToken); currentState.TotalAdsToCalculate = page.TotalNumberOfAds; foreach (var ad in page.Ads) { if (!leaderboard.ContainsKey((ad.AgentId, ad.AgentName))) { leaderboard.Add((ad.AgentId, ad.AgentName), 1); } else { leaderboard[(ad.AgentId, ad.AgentName)] += 1;
public void OnEnable() { FinalScoreText.text = "Final " + m_ScoreText.text; m_Top10Script = new TopTen(); m_Top10Script.UpdateHighScoreList(int.Parse(Regex.Replace(m_ScoreText.text, @"[^\d]", ""))); }