예제 #1
0
 //TODO: Implement
 public decimal getPrice(Boat.boatType boat, Boat.packageType package)
 {
     if (boat == Boat.boatType.NONE)
     {
         if (package == Boat.packageType.ACRYLIC_ADDON)
         {
             return addOnAcrylVal;
         }
     }
     else if (boat == Boat.boatType.Saint)
     {
         switch (package)
         {
             case Boat.packageType.ALL_IN:
                 return saintAllInVal;
             case Boat.packageType.BASE_ONLY:
                 return saintBaseVal;
             case Boat.packageType.ACRYLIC_ONLY:
                 return saintAcrylOnlyVal;
         }
     }
     else
     {
         switch (package)
         {
             case Boat.packageType.ALL_IN:
                 return minmoAllInVal;
             case Boat.packageType.BASE_ONLY:
                 return minmoBaseVal;;
             case Boat.packageType.ACRYLIC_ONLY:
                 return minmoAcrylOnlyVal;
         }
     }
     return -999.0m;
 }
예제 #2
0
        public static void SerializeBoat(string filename, Boat boatToSave)
        {
            Stream stream = File.Open(filename, FileMode.Create);

            var bFormatter = new BinaryFormatter();
            bFormatter.Serialize(stream, boatToSave);

            stream.Close();
        }
예제 #3
0
        public AddCC(Boat in_currBoat, string name)
        {
            InitializeComponent();
            currBoat = in_currBoat;
            lblAddTo.Text = "Add To: " + name;
            this.name = name;
            switch (name)
            {
                case "Amex":
                    card = currBoat.amEx;
                    break;
                case "Visa":
                    card = currBoat.visa;
                    break;
                case "Mastercard":
                    card = currBoat.mastercard;
                    break;
                case "Discover":
                    card = currBoat.discover;
                    break;
                case "Direct Bill to Host":
                    card = currBoat.directBill;
                    break;
                case "Personal Check":
                    card = currBoat.personalCheck;
                    break;
            }

            price_AllIn.Text = String.Format("{0:C}", currBoat.AllInVal);
            price_Base.Text = String.Format("{0:C}", currBoat.BaseVal);
            price_AcrylicOnly.Text = String.Format("{0:C}", currBoat.AcrylOnlyVal);
            price_AcrylicAddOn.Text = String.Format("{0:C}", Settings.GlobalSettings.addOnAcrylVal);

            getStartValues();

            if (currBoat.isLocked)
                toggleLock();
        }
예제 #4
0
 public void setPrice(Boat.boatType boat, Boat.packageType package, decimal price)
 {
     if(boat == Boat.boatType.NONE)
     {
         if(package == Boat.packageType.ACRYLIC_ADDON)
         {
             addOnAcrylVal = price;
         }
     }
     else if (boat == Boat.boatType.Saint)
     {
         switch(package)
         {
             case Boat.packageType.ALL_IN:
                 saintAllInVal = price;
                 break;
             case Boat.packageType.BASE_ONLY:
                 saintBaseVal = price;
                 break;
             case Boat.packageType.ACRYLIC_ONLY:
                 saintAcrylOnlyVal = price;
                 break;
         }
     }
     else
     {
         switch (package)
         {
             case Boat.packageType.ALL_IN:
                 minmoAllInVal = price;
                 break;
             case Boat.packageType.BASE_ONLY:
                 minmoBaseVal = price;
                 break;
             case Boat.packageType.ACRYLIC_ONLY:
                 minmoAcrylOnlyVal = price;
                 break;
         }
     }
 }
예제 #5
0
        public Deposit(Boat in_currBoat)
        {
            this.InitializeComponent();
            currBoat = in_currBoat;
            depBank = currBoat.depositBank;

            disp_cashToPull.Text = String.Format("{0:C}", currBoat.getCashProfit());
            dep_Total.Text = String.Format("{0:C}", depBank.getTotal());

            next_Total.Text = String.Format("{0:C}", currBoat.inBank.getTotal() - depBank.getTotal());

            for(int i = 0; i < 15; i++)
            {
                switch((Bank.Denomination)i)
                {
                    case Bank.Denomination.QUARTERS_LOOSE:
                        loadDisplay((Bank.Denomination)i, next_Ls_Quarters, dep_Ls_Quarters);
                        break;
                    case Bank.Denomination.QUARTER_ROLLS:
                        loadDisplay((Bank.Denomination)i, next_Rl_Quarters, dep_Rl_Quarters);
                        break;
                    case Bank.Denomination.NICKELS_LOOSE:
                        loadDisplay((Bank.Denomination)i, next_Ls_Nickels, dep_Ls_Nickels);
                        break;
                    case Bank.Denomination.NICKEL_ROLLS:
                        loadDisplay((Bank.Denomination)i, next_Rl_Nickels, dep_Rl_Nickels);
                        break;
                    case Bank.Denomination.DIMES_LOOSE:
                        loadDisplay((Bank.Denomination)i, next_Ls_Dimes, dep_Ls_Dimes);
                        break;
                    case Bank.Denomination.DIME_ROLLS:
                        loadDisplay((Bank.Denomination)i, next_Rl_Dimes, dep_Rl_Dimes);
                        break;
                    case Bank.Denomination.PENNIES_LOOSE:
                        loadDisplay((Bank.Denomination)i, next_Ls_Pennies, dep_Ls_Pennies);
                        break;
                    case Bank.Denomination.PENNY_ROLLS:
                        loadDisplay((Bank.Denomination)i, next_Rl_Pennies, dep_Rl_Pennies);
                        break;
                    case Bank.Denomination.ONES:
                        loadDisplay((Bank.Denomination)i, next_Ones, dep_Ones);
                        break;
                    case Bank.Denomination.FIVES:
                        loadDisplay((Bank.Denomination)i, next_Fives, dep_Fives);
                        break;
                    case Bank.Denomination.TENS:
                        loadDisplay((Bank.Denomination)i, next_Tens, dep_Tens);
                        break;
                    case Bank.Denomination.TWENTIES:
                        loadDisplay((Bank.Denomination)i, next_Twenties, dep_Twenties);
                        break;
                    case Bank.Denomination.FIFTIES:
                        loadDisplay((Bank.Denomination)i, next_Fifties, dep_Fifties);
                        break;
                    case Bank.Denomination.HUNDREDS:
                        loadDisplay((Bank.Denomination)i, next_Hundreds, dep_Hundreds);
                        break;
                }//End DEnom Switch

                if(currBoat.isLocked)
                {
                    toggleLock();
                }
            }//End For loop
        }