示例#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);
        }
示例#2
0
        private void AddDefaultWins(int wins)
        {
            DefaultCounter dfc = new DefaultCounter();

            dfc.AddWins(wins, hsc);
        }
示例#3
0
        private void AddDefaultLosses(int losses)
        {
            DefaultCounter dfc = new DefaultCounter();

            dfc.AddLosses(losses, hsc);
        }
        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);
            }
        }