private void ReopenPanel() { if (MotherControl != null) { MotherControl.Hide(); } MainForm.OpenItem(User, MotherItem); }
private void cmdItemClickedExit_Click(object sender, EventArgs e) { if (MotherControl != null) { MotherControl.Show(); } Hide(); //MainForm.CloseControl(this); }
private void cmdAccept_Click(object sender, EventArgs e) { string result = RecievedItem.PutInInventory(User, RecievedFrom, RecievedItem, MotherControl, MainForm); if (result == "Yes") { MainForm.PlayerThinking(User.PlayerResponse(true, RecievedItem.Name)); MotherControl.Hide(); this.Hide(); } else if (result == "No slots") { MainForm.PlayerThinking("I dont have any space in my inventory"); MotherControl.Hide(); this.Hide(); } }
private void cmdAccept_Click(object sender, EventArgs e) { string result = RecievedItem.PutInInventory(User, RecievedFrom, RecievedItem, MotherControl, MainForm); if (result == "Yes") { MessageBox.Show("Got it"); MotherControl.Hide(); this.Hide(); } else { MessageBox.Show("Didnt get it"); MotherControl.Hide(); this.Hide(); } }
private void cmdYes_Click(object sender, EventArgs e) { var giveItem = ClickedItem.GiveToCharacter(User, ClickedCharacter, ClickedItem); MainForm.CharacterReaction(giveItem.Item1, ClickedCharacter); this.Hide(); if (giveItem.Item2) { MotherControl.Hide(); this.Hide(); ucRecieveItem recieveItemControl = new ucRecieveItem(User, ClickedCharacter, this, MainForm); ClickedCharacter.IsSatisfied = true; MainForm.Controls.Add(recieveItemControl); recieveItemControl.Show(); recieveItemControl.BringToFront(); } }
private void cmdNo_Click(object sender, EventArgs e) { MotherControl.Show(); this.Hide(); }
private void cmdAddToInventory_Click(object sender, EventArgs e) { // // ADDING ITEM TO INVENTORY // if (!IsBackpacked) { if (!User.HasBriefcase) { MainForm.PlayerThinking("If i only had somewhere to put it."); } // if item is in container item else if (MotherControl != null) { MotherControl.Hide(); if (ClickedItem.PutInInventory(User, MotherItem, ClickedItem) == "Yes") { MainForm.PlayerThinking(User.PlayerResponse(true, ClickedItem.Name)); Hide(); //MainForm.CloseControl(this); ReopenPanel(); } else { MainForm.PlayerThinking("My briefcase is full"); Hide(); //MainForm.CloseControl(this); } } // if item is not in container item else { string isAdded = ClickedItem.PutInInventory(User, ActiveRoom, ClickedItem); switch (isAdded) { case "Yes": MainForm.PlayerThinking(User.PlayerResponse(true, ClickedItem.Name)); MainForm.OpenRoom(ActiveRoom); Hide(); //MainForm.CloseControl(this); break; case "Not backpackable": MainForm.PlayerThinking(User.PlayerResponse(false, ClickedItem.Name)); break; case "No slots": MainForm.PlayerThinking("Briefcase is full"); break; } } } // // DROPPING ITEM FROM INVENTORY // else { ClickedItem.DropFromInventory(User, ActiveRoom, ClickedItem, MainForm); MainForm.OpenRoom(ActiveRoom); if (MotherControl != null) { MotherControl.Hide(); } Hide(); //MainForm.CloseControl(this); } }