private void Checkout_Click(object sender, RoutedEventArgs e) { room j = new room(); currentroom.empty(); rooming[currentroom.roomNum] = j; tempButton.Background = new SolidColorBrush(Color.FromArgb(30, 0, 0, 1)); }
private void Button_Click_19(object sender, RoutedEventArgs e) { currentroom.empty(); int roomNumber = 17; currentroom = rooming[roomNumber]; currentroom.roomNum = roomNumber; PrintHelper(currentroom); }
public void fillArray(room[] r) { room x = new room(); for (int i = 0; i < 20; i++) { x.empty(); r[i] = x; } }
public void Button_Click_17(object sender, RoutedEventArgs e) { tempButton = _17; currentroom.empty(); int roomNumber = 15; currentroom = rooming[roomNumber]; currentroom.roomNum = roomNumber; PrintHelper(currentroom); }
public room MakeCopy() { room k = new room(); k.roomNum = roomNum; k.name = name; k.people = people; k.pet = pet; return(k); }
public void PrintHelper(room current) { Display.Text = "Name: " + current.name + "\n" + "People: " + Convert.ToString(current.people) + "\n" + "Pet: "; if (current.pet) { Display.Text += "Yes"; } else { Display.Text += "No"; } Display.Text += "\nPrice: " + PriceHelper(currentroom).ToString("0." + new string('0', 2)); }
public double PriceHelper(room current) { double price = 0; if (current.roomNum < 11) { price = 60; } else { price = 50; } if (current.people > 2) { price += (10 * (current.people - 2)); } if (current.pet) { price += 10; } return(price + (price * .1475)); }