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(); }
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; } } }
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; } } }
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; } } }
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; } } }
private void BackButtomAdding_Click(object sender, EventArgs e) { BasePanel.BringToFront(); }
public void AddPanelAct(BasePanel panel) { tabPageGame.Controls.Add(panel); panel.BringToFront(); }