using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace sinema
{
///
/// Interaction logic for MainWindow.xaml
///
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
}
Sinema salon;
private void Olusturbtn(object sender,RoutedEventArgs e){
try{
salon= new Sinema(salonTxt.Text, Convert.ToInt32(kisisayisiTxt.Text));
mesajLbl.Content="Salon oluşturuldu. Koltuk sayısı : "+salon.BosKoltukOgren();
salon.ilk=salon.BosKoltukOgren();
}
catch
{
mesajLbl.Content="Salon oluşturulamadı.";
}
}
private void sat(object sender,RoutedEventArgs e){
salon.sayi=salon.BosKoltukOgren();
salon.sayi--;
if(salon.sayi>=0 ){
salon.BiletSat(secim.IsChecked==true);
mesajLbl.Content="Bilet satıldı. Kalan koltuk sayısı :" +salon.BosKoltukOgren();
}
else{
mesajLbl.Content="Kalmadı.";
salon.sayi++;
}
}
private void iptal(object sender,RoutedEventArgs e){
salon.sayi=salon.BosKoltukOgren();
salon.sayi++;
if(!(salon.ilk