예제 #1
0
 private void cb_List_SelectedIndexChanged(object sender, EventArgs e) //Updating which scratch off is selected from the drop down
 {
     foreach (ScratchOff scratchOff in ScratchOffs)
     {
         if (scratchOff.Name == cb_List.Text)
         {
             SelectedScratchOff = scratchOff;
         }
     }
     UpdateStatsDisplay();
 }
예제 #2
0
        public void AddSomeScratchData() //Data input for a couple scratch offs - Normally should be done with a .txt or .xml file, but this is just a demo
        {
            ScratchOff FiveTimesTheMoney = new ScratchOff("5X THE MONEY", 5, "https://www.palottery.state.pa.us/uploadedfiles/PA-1437_5X-the-Money_DATA.pdf");

            FiveTimesTheMoney.PayoutsList.Add(new Payout(5, 9));
            FiveTimesTheMoney.PayoutsList.Add(new Payout(10, 20));
            FiveTimesTheMoney.PayoutsList.Add(new Payout(25, 30));
            FiveTimesTheMoney.PayoutsList.Add(new Payout(50, 55));
            FiveTimesTheMoney.PayoutsList.Add(new Payout(100, 333));
            FiveTimesTheMoney.PayoutsList.Add(new Payout(250, 1600));
            FiveTimesTheMoney.PayoutsList.Add(new Payout(500, 7500));
            FiveTimesTheMoney.PayoutsList.Add(new Payout(1000, 12000));
            FiveTimesTheMoney.PayoutsList.Add(new Payout(5000, 270000));
            FiveTimesTheMoney.PayoutsList.Add(new Payout(100000, 1080000));
            ScratchOffs.Add(FiveTimesTheMoney);

            ScratchOff OhWhatFun = new ScratchOff("Oh, What Fun", 1, "https://www.palottery.state.pa.us/uploadedfiles/PA-1431_Oh-What-Fun_DATA.pdf");

            OhWhatFun.PayoutsList.Add(new Payout(1, 8));
            OhWhatFun.PayoutsList.Add(new Payout(2, 25));
            OhWhatFun.PayoutsList.Add(new Payout(4, 59));
            OhWhatFun.PayoutsList.Add(new Payout(5, 111));
            OhWhatFun.PayoutsList.Add(new Payout(8, 250));
            OhWhatFun.PayoutsList.Add(new Payout(10, 83));
            OhWhatFun.PayoutsList.Add(new Payout(15, 1000));
            OhWhatFun.PayoutsList.Add(new Payout(20, 250));
            OhWhatFun.PayoutsList.Add(new Payout(30, 960));
            OhWhatFun.PayoutsList.Add(new Payout(50, 1500));
            OhWhatFun.PayoutsList.Add(new Payout(60, 12000));
            OhWhatFun.PayoutsList.Add(new Payout(100, 6000));
            OhWhatFun.PayoutsList.Add(new Payout(150, 120000));
            OhWhatFun.PayoutsList.Add(new Payout(300, 690000));
            OhWhatFun.PayoutsList.Add(new Payout(5000, 1380000));
            ScratchOffs.Add(OhWhatFun);

            ScratchOff ThreeMillionLimited = new ScratchOff("$3 Million Limited", 30, "https://www.palottery.state.pa.us/uploadedfiles/PA-1432_$3M-Limited_DATA.pdf");

            ThreeMillionLimited.PayoutsList.Add(new Payout(30, 8));
            ThreeMillionLimited.PayoutsList.Add(new Payout(40, 12));
            ThreeMillionLimited.PayoutsList.Add(new Payout(50, 20));
            ThreeMillionLimited.PayoutsList.Add(new Payout(100, 43));
            ThreeMillionLimited.PayoutsList.Add(new Payout(150, 38));
            ThreeMillionLimited.PayoutsList.Add(new Payout(300, 125));
            ThreeMillionLimited.PayoutsList.Add(new Payout(500, 571));
            ThreeMillionLimited.PayoutsList.Add(new Payout(1000, 1250));
            ThreeMillionLimited.PayoutsList.Add(new Payout(10000, 200000));
            ThreeMillionLimited.PayoutsList.Add(new Payout(300000, 600000));
            ThreeMillionLimited.PayoutsList.Add(new Payout(3000000, 1200000));
            ScratchOffs.Add(ThreeMillionLimited);
        }