Beispiel #1
0
 public Form1()
 {
     InitializeComponent();
     StorePanel.Dock           = System.Windows.Forms.DockStyle.Fill;
     CinemaPanel.Dock          = System.Windows.Forms.DockStyle.Fill;
     RestaurantPanel.Dock      = System.Windows.Forms.DockStyle.Fill;
     RecreationalPanel.Dock    = System.Windows.Forms.DockStyle.Fill;
     BasePanel.Dock            = System.Windows.Forms.DockStyle.Fill;
     AddPanel.Dock             = System.Windows.Forms.DockStyle.Fill;
     AddPanel.Visible          = true;
     BasePanel.Visible         = true;
     StorePanel.Visible        = true;
     CinemaPanel.Visible       = true;
     RestaurantPanel.Visible   = true;
     RecreationalPanel.Visible = true;
     BasePanel.BringToFront();
 }
Beispiel #2
0
 private void OnFinalAddRecreational(string name, int id, string schedule)
 {
     if (FinalAddRecreationalClick != null)
     {
         bool result = FinalAddRecreationalClick(this, new CreateRecreationalArgs()
         {
             ownername = name, id = id, schedule = schedule
         });
         if (result)
         {
             UsedIdRecreationalLabel.Visible  = false;
             RecreationalPanel.Visible        = false;
             RecreationalNameTextBox.Text     = "";
             RecreationalScheduleTextBox.Text = "";
             RecreationalIDTextBox.Text       = "";
             BasePanel.BringToFront();
         }
         else
         {
             UsedIdRecreationalLabel.Visible = true;
         }
     }
 }
Beispiel #3
0
 private void OnFinalAddCinema(string name, int id, string schedule, int nrooms)
 {
     if (FinalAddRestaurantClick != null)
     {
         bool result = FinalAddCinemaClick(this, new CreateCinemaArgs()
         {
             ownername = name, id = id, schedule = schedule, nrooms = nrooms
         });
         if (result)
         {
             UsedIdCinemaLabel.Visible  = false;
             CinemaPanel.Visible        = false;
             CinemaIDTextBox.Text       = "";
             CinemaNameTextBox.Text     = "";
             CinemaScheduleTextBox.Text = "";
             CinemaNofRoomsLabel.Text   = "";
             BasePanel.BringToFront();
         }
         else
         {
             UsedIdCinemaLabel.Visible = true;
         }
     }
 }
Beispiel #4
0
 private void OnFinalAddRestaurant(string ownername, int id, string schedule, bool privatet)
 {
     if (FinalAddRestaurantClick != null)
     {
         bool result = FinalAddRestaurantClick(this, new CreateRestaurantArgs()
         {
             ownername = ownername, id = id, schedule = schedule, privatet = privatet
         });
         if (result)
         {
             UsedIdRestaurantLabel.Visible  = false;
             RestaurantPanel.Visible        = false;
             RestaurantIDTextBox.Text       = "";
             RestaurantNameTextBox.Text     = "";
             RestaurantPrivateTextBox.Text  = "";
             RestaurantScheduleTextBox.Text = "";
             BasePanel.BringToFront();
         }
         else
         {
             UsedIdRestaurantLabel.Visible = true;
         }
     }
 }
Beispiel #5
0
 private void OnFinalAddStore(string ownername, int id, string schedule, string category)
 {
     if (FinalAddStoreClick != null)
     {
         bool result = FinalAddStoreClick(this, new CreateStoreArgs()
         {
             ownername = ownername, id = id, schedule = schedule, category = category
         });
         if (result)
         {
             UsedIdStore.Visible     = false;
             StorePanel.Visible      = false;
             StoreNameTextBox.Text   = "";
             StoreSheduleLabel.Text  = "";
             StoreCategoryLabel.Text = "";
             StoreIDLabel.Text       = Text;
             BasePanel.BringToFront();
         }
         else
         {
             UsedIdStore.Visible = true;
         }
     }
 }
Beispiel #6
0
 private void BackButtomAdding_Click(object sender, EventArgs e)
 {
     BasePanel.BringToFront();
 }
Beispiel #7
0
 public void AddPanelAct(BasePanel panel)
 {
     tabPageGame.Controls.Add(panel);
     panel.BringToFront();
 }