Exemplo n.º 1
0
        private void toolStripButtonRank_Click(object sender, EventArgs e)
        {
            using (RankDlog dlog = new RankDlog())
            {
                dlog.Rank  = sessionData.CurrentRank.Rank;
                dlog.Level = sessionData.CurrentRank.Level;
                dlog.Wins  = sessionData.CurrentRank.Wins;

                if (dlog.ShowDialog() != DialogResult.OK)
                {
                    return;
                }

                sessionData.CurrentRank.Rank  = dlog.Rank;
                sessionData.CurrentRank.Level = dlog.Level;
                sessionData.CurrentRank.Wins  = dlog.Wins;

                DisplayRank();
            }
        }
Exemplo n.º 2
0
        private void ResetRank(bool resetSeason)
        {
            SaveUndoBuffer();

            if (resetSeason)
            {
                RankData newRank = GetStartingRank();

                using (RankDlog dlog = new RankDlog())
                {
                    dlog.Text        = "Select Starting Rank";
                    dlog.WinsVisible = false;
                    dlog.Rank        = newRank.Rank;
                    dlog.Level       = newRank.Level;
                    dlog.Wins        = 0;

                    if (dlog.ShowDialog() != DialogResult.OK)
                    {
                        return;
                    }

                    sessionData.CurrentRank.Rank  = dlog.Rank;
                    sessionData.CurrentRank.Level = dlog.Level;
                    sessionData.CurrentRank.Wins  = 0;
                }

                sessionData.Season.Win  = 0;
                sessionData.Season.Loss = 0;

                seasonGamesStart = GetGamesRemaining();
            }

            sessionData.Session.Win  = 0;
            sessionData.Session.Loss = 0;
            sessionData.Streak       = 0;

            sessionStart      = DateTime.Now;
            sessionGamesStart = GetGamesRemaining();

            DisplayRank();
        }