private async Task <bool> ReloadRankings(RankingsMode myMode) { switch (myMode) { case RankingsMode.PowerRankings: this.IsShowingAnotherSandBox = true; this.ShowingAnotherSandBox = new YuiLoadingSandbox(this); this.ShowingAnotherSandBox.Show(); this.KingdomInfo.Rankings.PowerRankings = await PowerRankings.GetPowerRankings(this.KingdomInfo); this.ShowingAnotherSandBox.ClosedByMe = true; this.ShowingAnotherSandBox.Close(); this.ShowingAnotherSandBox.Dispose(); break; case RankingsMode.LevelRankings: this.IsShowingAnotherSandBox = true; this.ShowingAnotherSandBox = new YuiLoadingSandbox(this); this.ShowingAnotherSandBox.Show(); this.KingdomInfo.Rankings.LevelRankings = await LevelRankings.GetLevelRankings(this.KingdomInfo); this.ShowingAnotherSandBox.ClosedByMe = true; this.ShowingAnotherSandBox.Close(); this.ShowingAnotherSandBox.Dispose(); break; default: return(false); } return(true); }
//--------------------------------------------------------- /// <summary> /// this is for: <see cref="LabelControlSpecies.RankingKindLabel"/> /// </summary> /// <param name="myRes"></param> /// <param name="father"></param> public RankingKindLabel(IRes myRes, SandBoxBase father, RankingsMode rankingsMode) : base(myRes, LabelControlSpecies.RankingKindLabel, father) { RankingsMode = rankingsMode; Initialize_ForRankingKind_Component(); }