Ejemplo n.º 1
0
        public void ResetButton_Clicked(HSCounter hsc)
        {
            DefaultCounter dfc = new DefaultCounter();
            dfc.WriteWins(dfc.Wins - wins);
            dfc.WriteLosses(dfc.Losses - losses);
            WriteWins(0, 0);
            WriteLosses(0, 0);

            wins = losses = 0;
            hsc.label1.Text = "Won: 0";
            hsc.lostLabel.Text = "Lost: 0";
            CalculateWinPercentage(hsc);
        }
Ejemplo n.º 2
0
        private void AddDefaultWins(int wins)
        {
            DefaultCounter dfc = new DefaultCounter();

            dfc.AddWins(wins, hsc);
        }
Ejemplo n.º 3
0
        private void AddDefaultLosses(int losses)
        {
            DefaultCounter dfc = new DefaultCounter();

            dfc.AddLosses(losses, hsc);
        }
Ejemplo n.º 4
0
        private void ResetWholeScore(HSCounter hsc)
        {
            DefaultCounter dfc = new DefaultCounter();

            DialogResult dialogResult = MessageBox.Show("Are you sure that you want to reset your score to 0?", "Reset Score", MessageBoxButtons.YesNo);
            if (dialogResult == DialogResult.Yes)
            {
                dfc.ResetButton_Clicked(hsc);
            }
        }