/SuperAdventure.Designer.cs Secret
Created
November 14, 2017 00:07
Star
You must be signed in to star a gist
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.ComponentModel; | |
using System.Data; | |
using System.Drawing; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using System.Windows.Forms; | |
using Engine; | |
namespace SuperAdventure | |
{ | |
public partial class SuperAdventureForm : Form | |
{ | |
private Player _player; | |
private Monster _currentMonster; | |
public SuperAdventureForm() | |
{ | |
InitializeComponent(); | |
_player = new Player(10, 10, 20, 0, 1); | |
MoveTo(World.LocationByID(World.LOCATION_ID_HOME)); | |
_player.Inventory.Add(new InventoryItem(World.ItemByID(World.ITEM_ID_RUSTY_SWORD), 1)); | |
lblHitPoints.Text = _player.CurrentHitPoints.ToString(); | |
lblGold.Text = _player.Gold.ToString(); | |
lblExperience.Text = _player.ExperiencePoints.ToString(); | |
lblLevel.Text = _player.Level.ToString(); | |
} | |
private void btnNorth_Click(object sender, EventArgs e) | |
{ | |
MoveTo(_player.CurrentLocation.LocationToNorth); | |
} | |
private void btnEast_Click(object sender, EventArgs e) | |
{ | |
MoveTo(_player.CurrentLocation.LocationToEast); | |
} | |
private void btnSouth_Click(object sender, EventArgs e) | |
{ | |
MoveTo(_player.CurrentLocation.LocationToSouth); | |
} | |
private void btnWest_Click(object sender, EventArgs e) | |
{ | |
MoveTo(_player.CurrentLocation.LocationToWest); | |
} | |
private void MoveTo(Location newLocation) | |
{ | |
//Does the location have any required items | |
if (!_player.HasRequiredItemToEnterThisLocation(newLocation)) | |
{ | |
rtbMessages.Text += "You must have a " + newLocation.ItemRequriedToEnter.Name + " to enter this location." + Environment.NewLine; | |
return; | |
} | |
// Update the player's current location | |
_player.CurrentLocation = newLocation; | |
// Show/hide available movement buttons | |
btnNorth.Visible = (newLocation.LocationToNorth != null); | |
btnEast.Visible = (newLocation.LocationToEast != null); | |
btnSouth.Visible = (newLocation.LocationToSouth != null); | |
btnWest.Visible = (newLocation.LocationToWest != null); | |
// Display current location name and description | |
rtbLocation.Text = newLocation.Name + Environment.NewLine; | |
rtbLocation.Text += newLocation.Description + Environment.NewLine; | |
// Completely heal the player | |
_player.CurrentHitPoints = _player.MaximumHitPoints; | |
// Update Hit Points in UI | |
lblHitPoints.Text = _player.CurrentHitPoints.ToString(); | |
// Does the location have a quest? | |
if (newLocation.QuestAvailableHere != null) | |
{ | |
// See if the player already has the quest, and if they've completed it | |
bool playerAlreadyHasQuest = _player.HasThisQuest(newLocation.QuestAvailableHere); | |
bool playerAlreadyCompletedQuest = _player.CompletedThisQuest(newLocation.QuestAvailableHere); | |
// See if the player already has the quest | |
if (playerAlreadyHasQuest) | |
{ | |
// If the player has not completed the quest yet | |
if (!playerAlreadyCompletedQuest) | |
{ | |
// See if the player has all the items needed to complete the quest | |
bool playerHasAllItemsToCompleteQuest = _player.HasAllQuestCompletionItems(newLocation.QuestAvailableHere); | |
// The player has all items required to complete the quest | |
if (playerHasAllItemsToCompleteQuest) | |
{ | |
// Display message | |
rtbMessages.Text += Environment.NewLine; | |
rtbMessages.Text += "You complete the '" + newLocation.QuestAvailableHere.Name + "' quest." + Environment.NewLine; | |
// Remove quest items from inventory | |
_player.RemoveQuestCompletionItems(newLocation.QuestAvailableHere); | |
// Give quest rewards | |
rtbMessages.Text += "You receive: " + Environment.NewLine; | |
rtbMessages.Text += newLocation.QuestAvailableHere.RewardExperiencePoints.ToString() + " experience points" + Environment.NewLine; | |
rtbMessages.Text += newLocation.QuestAvailableHere.RewardGold.ToString() + " gold" + Environment.NewLine; | |
rtbMessages.Text += newLocation.QuestAvailableHere.RewardItem.Name + Environment.NewLine; | |
rtbMessages.Text += Environment.NewLine; | |
_player.ExperiencePoints += newLocation.QuestAvailableHere.RewardExperiencePoints; | |
_player.Gold += newLocation.QuestAvailableHere.RewardGold; | |
// Add the reward item to the player's inventory | |
_player.AddItemToInventory(newLocation.QuestAvailableHere.RewardItem); | |
// Mark the quest as completed | |
_player.MarkQuestCompleted(newLocation.QuestAvailableHere); | |
} | |
} | |
} | |
else | |
{ | |
// The player does not already have the quest | |
// Display the messages | |
rtbMessages.Text += "You receive the " + newLocation.QuestAvailableHere.Name + " quest." + Environment.NewLine; | |
rtbMessages.Text += newLocation.QuestAvailableHere.Description + Environment.NewLine; | |
rtbMessages.Text += "To complete it, return with:" + Environment.NewLine; | |
foreach (QuestCompletionItem qci in newLocation.QuestAvailableHere.QuestCompletionItems) | |
{ | |
if (qci.Quantity == 1) | |
{ | |
rtbMessages.Text += qci.Quantity.ToString() + " " + qci.Details.Name + Environment.NewLine; | |
} | |
else | |
{ | |
rtbMessages.Text += qci.Quantity.ToString() + " " + qci.Details.NamePlural + Environment.NewLine; | |
} | |
} | |
rtbMessages.Text += Environment.NewLine; | |
// Add the quest to the player's quest list | |
_player.Quests.Add(new PlayerQuest(newLocation.QuestAvailableHere)); | |
} | |
} | |
// Does the location have a monster? | |
if (newLocation.MonsterLivingHere != null) | |
{ | |
rtbMessages.Text += "You see a " + newLocation.MonsterLivingHere.Name + Environment.NewLine; | |
// Make a new monster, using the values from the standard monster in the World.Monster list | |
Monster standardMonster = World.MonsterByID(newLocation.MonsterLivingHere.ID); | |
_currentMonster = new Monster(standardMonster.ID, standardMonster.Name, standardMonster.MaximumDamage, | |
standardMonster.RewardExperiencePoints, standardMonster.RewardGold, standardMonster.CurrentHitPoints, standardMonster.MaximumHitPoints); | |
foreach (LootItem lootItem in standardMonster.LootTable) | |
{ | |
_currentMonster.LootTable.Add(lootItem); | |
} | |
cboWeapons.Visible = true; | |
cboPotions.Visible = true; | |
btnUseWeapon.Visible = true; | |
btnUsePotion.Visible = true; | |
} | |
else | |
{ | |
_currentMonster = null; | |
cboWeapons.Visible = false; | |
cboPotions.Visible = false; | |
btnUseWeapon.Visible = false; | |
btnUsePotion.Visible = false; | |
} | |
// Refresh player's inventory list | |
UpdateInventoryListInUI(); | |
// Refresh player's quest list | |
UpdateQuestListInUI(); | |
// Refresh player's weapons combobox | |
UpdateWeaponListInUI(); | |
// Refresh player's potions combobox | |
UpdatePotionListInUI(); | |
} | |
private void UpdateInventoryListInUI() | |
{ | |
dgvInventory.RowHeadersVisible = false; | |
dgvInventory.ColumnCount = 2; | |
dgvInventory.Columns[0].Name = "Name"; | |
dgvInventory.Columns[0].Width = 197; | |
dgvInventory.Columns[1].Name = "Quantity"; | |
dgvInventory.Rows.Clear(); | |
foreach (InventoryItem inventoryItem in _player.Inventory) | |
{ | |
if (inventoryItem.Quantity > 0) | |
{ | |
dgvInventory.Rows.Add(new[] { inventoryItem.Details.Name, inventoryItem.Quantity.ToString() }); | |
} | |
} | |
} | |
private void UpdateQuestListInUI() | |
{ | |
dgvQuests.RowHeadersVisible = false; | |
dgvQuests.ColumnCount = 2; | |
dgvQuests.Columns[0].Name = "Name"; | |
dgvQuests.Columns[0].Width = 197; | |
dgvQuests.Columns[1].Name = "Done?"; | |
dgvQuests.Rows.Clear(); | |
foreach (PlayerQuest playerQuest in _player.Quests) | |
{ | |
dgvQuests.Rows.Add(new[] { playerQuest.Details.Name, playerQuest.IsCompleted.ToString() }); | |
} | |
} | |
private void UpdateWeaponListInUI() | |
{ | |
List<Weapon> weapons = new List<Weapon>(); | |
foreach (InventoryItem inventoryItem in _player.Inventory) | |
{ | |
if (inventoryItem.Details is Weapon) | |
{ | |
if (inventoryItem.Quantity > 0) | |
{ | |
weapons.Add((Weapon)inventoryItem.Details); | |
} | |
} | |
} | |
if (weapons.Count == 0) | |
{ | |
// The player doesn't have any weapons, so hide the weapon combobox and "Use" button | |
cboWeapons.Visible = false; | |
btnUseWeapon.Visible = false; | |
} | |
else | |
{ | |
cboWeapons.DataSource = weapons; | |
cboWeapons.DisplayMember = "Name"; | |
cboWeapons.ValueMember = "ID"; | |
cboWeapons.SelectedIndex = 0; | |
} | |
} | |
private void UpdatePotionListInUI() | |
{ | |
List<HealingPotion> healingPotions = new List<HealingPotion>(); | |
foreach (InventoryItem inventoryItem in _player.Inventory) | |
{ | |
if (inventoryItem.Details is HealingPotion) | |
{ | |
if (inventoryItem.Quantity > 0) | |
{ | |
healingPotions.Add((HealingPotion)inventoryItem.Details); | |
} | |
} | |
} | |
if (healingPotions.Count == 0) | |
{ | |
// The player doesn't have any potions, so hide the potion combobox and "Use" button | |
cboPotions.Visible = false; | |
btnUsePotion.Visible = false; | |
} | |
else | |
{ | |
cboPotions.DataSource = healingPotions; | |
cboPotions.DisplayMember = "Name"; | |
cboPotions.ValueMember = "ID"; | |
cboPotions.SelectedIndex = 0; | |
} | |
} | |
private void btnUseWeapon_Click(object sender, EventArgs e) | |
{ | |
// Get the currently selected weapon from the cboWeapons ComboBox | |
Weapon currentWeapon = (Weapon)cboWeapons.SelectedItem; | |
// Determine the amount of damage to do to the monster | |
int damageToMonster = RandomNumberGenerator.NumberBetween(currentWeapon.MinimumDamage, currentWeapon.MaximumDamage); | |
// Apply the damage to the monster's CurrentHitPoints | |
_currentMonster.CurrentHitPoints -= damageToMonster; | |
// Display message | |
rtbMessages.Text += "You hit the " + _currentMonster.Name + " for " + damageToMonster.ToString() + " points." + Environment.NewLine; | |
// Check if the monster is dead | |
if (_currentMonster.CurrentHitPoints <= 0) | |
{ | |
// Monster is dead | |
rtbMessages.Text += Environment.NewLine; | |
rtbMessages.Text += "You defeated the " + _currentMonster.Name + Environment.NewLine; | |
// Give player experience points for killing the monster | |
_player.ExperiencePoints += _currentMonster.RewardExperiencePoints; | |
rtbMessages.Text += "You receive " + _currentMonster.RewardExperiencePoints.ToString() + " experience points" + Environment.NewLine; | |
// Give player gold for killing the monster | |
_player.Gold += _currentMonster.RewardGold; | |
rtbMessages.Text += "You receive " + _currentMonster.RewardGold.ToString() + " gold" + Environment.NewLine; | |
// Get random loot items from the monster | |
List<InventoryItem> lootedItems = new List<InventoryItem>(); | |
// Add items to the lootedItems list, comparing a random number to the drop percentage | |
foreach (LootItem lootItem in _currentMonster.LootTable) | |
{ | |
if (RandomNumberGenerator.NumberBetween(1, 100) <= lootItem.DropPercentage) | |
{ | |
lootedItems.Add(new InventoryItem(lootItem.Details, 1)); | |
} | |
} | |
// If no items were randomly selected, then add the default loot item(s). | |
if (lootedItems.Count == 0) | |
{ | |
foreach (LootItem lootItem in _currentMonster.LootTable) | |
{ | |
if (lootItem.IsDefaultItem) | |
{ | |
lootedItems.Add(new InventoryItem(lootItem.Details, 1)); | |
} | |
} | |
} | |
// Add the looted items to the player's inventory | |
foreach (InventoryItem inventoryItem in lootedItems) | |
{ | |
_player.AddItemToInventory(inventoryItem.Details); | |
if (inventoryItem.Quantity == 1) | |
{ | |
rtbMessages.Text += "You loot " + inventoryItem.Quantity.ToString() + " " + inventoryItem.Details.Name + Environment.NewLine; | |
} | |
else | |
{ | |
rtbMessages.Text += "You loot " + inventoryItem.Quantity.ToString() + " " + inventoryItem.Details.NamePlural + Environment.NewLine; | |
} | |
} | |
// Refresh player information and inventory controls | |
lblHitPoints.Text = _player.CurrentHitPoints.ToString(); | |
lblGold.Text = _player.Gold.ToString(); | |
lblExperience.Text = _player.ExperiencePoints.ToString(); | |
lblLevel.Text = _player.Level.ToString(); | |
UpdateInventoryListInUI(); | |
UpdateWeaponListInUI(); | |
UpdatePotionListInUI(); | |
// Add a blank line to the messages box, just for appearance. | |
rtbMessages.Text += Environment.NewLine; | |
// Move player to current location (to heal player and create a new monster to fight) | |
MoveTo(_player.CurrentLocation); | |
} | |
else | |
{ | |
// Monster is still alive | |
// Determine the amount of damage the monster does to the player | |
int damageToPlayer = RandomNumberGenerator.NumberBetween(0, _currentMonster.MaximumDamage); | |
// Display message | |
rtbMessages.Text += "The " + _currentMonster.Name + " did " + damageToPlayer.ToString() + " points of damage." + Environment.NewLine; | |
// Subtract damage from player | |
_player.CurrentHitPoints -= damageToPlayer; | |
// Refresh player data in UI | |
lblHitPoints.Text = _player.CurrentHitPoints.ToString(); | |
if (_player.CurrentHitPoints <= 0) | |
{ | |
// Display message | |
rtbMessages.Text += "The " + _currentMonster.Name + " killed you." + Environment.NewLine; | |
// Move player to "Home" | |
MoveTo(World.LocationByID(World.LOCATION_ID_HOME)); | |
} | |
} | |
} | |
private void btnUsePotion_Click(object sender, EventArgs e) | |
{ | |
// Get the currently selected potion from the combobox | |
HealingPotion potion = (HealingPotion)cboPotions.SelectedItem; | |
// Add healing amount to the player's current hit points | |
_player.CurrentHitPoints = (_player.CurrentHitPoints + potion.AmountToHeal); | |
// CurrentHitPoints cannot exceed player's MaximumHitPoints | |
if (_player.CurrentHitPoints > _player.MaximumHitPoints) | |
{ | |
_player.CurrentHitPoints = _player.MaximumHitPoints; | |
} | |
// Remove the potion from the player's inventory | |
foreach (InventoryItem ii in _player.Inventory) | |
{ | |
if (ii.Details.ID == potion.ID) | |
{ | |
ii.Quantity--; | |
break; | |
} | |
} | |
// Display message | |
rtbMessages.Text += "You drink a " + potion.Name + Environment.NewLine; | |
// Monster gets their turn to attack | |
// Determine the amount of damage the monster does to the player | |
int damageToPlayer = RandomNumberGenerator.NumberBetween(0, _currentMonster.MaximumDamage); | |
// Display message | |
rtbMessages.Text += "The " + _currentMonster.Name + " did " + damageToPlayer.ToString() + " points of damage." + Environment.NewLine; | |
// Subtract damage from player | |
_player.CurrentHitPoints -= damageToPlayer; | |
if (_player.CurrentHitPoints <= 0) | |
{ | |
// Display message | |
rtbMessages.Text += "The " + _currentMonster.Name + " killed you." + Environment.NewLine; | |
// Move player to "Home" | |
MoveTo(World.LocationByID(World.LOCATION_ID_HOME)); | |
} | |
// Refresh player data in UI | |
lblHitPoints.Text = _player.CurrentHitPoints.ToString(); | |
UpdateInventoryListInUI(); | |
UpdatePotionListInUI(); | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
namespace SuperAdventure | |
{ | |
partial class SuperAdventureForm | |
{ | |
/// <summary> | |
/// Required designer variable. | |
/// </summary> | |
private System.ComponentModel.IContainer components = null; | |
/// <summary> | |
/// Clean up any resources being used. | |
/// </summary> | |
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> | |
protected override void Dispose(bool disposing) | |
{ | |
if (disposing && (components != null)) | |
{ | |
components.Dispose(); | |
} | |
base.Dispose(disposing); | |
} | |
#region Windows Form Designer generated code | |
/// <summary> | |
/// Required method for Designer support - do not modify | |
/// the contents of this method with the code editor. | |
/// </summary> | |
private void InitializeComponent() | |
{ | |
this.label1 = new System.Windows.Forms.Label(); | |
this.label2 = new System.Windows.Forms.Label(); | |
this.label3 = new System.Windows.Forms.Label(); | |
this.label4 = new System.Windows.Forms.Label(); | |
this.lblHitPoints = new System.Windows.Forms.Label(); | |
this.lblGold = new System.Windows.Forms.Label(); | |
this.lblLevel = new System.Windows.Forms.Label(); | |
this.lblExperience = new System.Windows.Forms.Label(); | |
this.label5 = new System.Windows.Forms.Label(); | |
this.cboWeapons = new System.Windows.Forms.ComboBox(); | |
this.cboPotions = new System.Windows.Forms.ComboBox(); | |
this.btnUseWeapon = new System.Windows.Forms.Button(); | |
this.btnUsePotion = new System.Windows.Forms.Button(); | |
this.btnNorth = new System.Windows.Forms.Button(); | |
this.btnSouth = new System.Windows.Forms.Button(); | |
this.btnEast = new System.Windows.Forms.Button(); | |
this.btnWest = new System.Windows.Forms.Button(); | |
this.rtbLocation = new System.Windows.Forms.RichTextBox(); | |
this.rtbMessages = new System.Windows.Forms.RichTextBox(); | |
this.dgvInventory = new System.Windows.Forms.DataGridView(); | |
this.dgvQuests = new System.Windows.Forms.DataGridView(); | |
((System.ComponentModel.ISupportInitialize)(this.dgvInventory)).BeginInit(); | |
((System.ComponentModel.ISupportInitialize)(this.dgvQuests)).BeginInit(); | |
this.SuspendLayout(); | |
// | |
// label1 | |
// | |
this.label1.AutoSize = true; | |
this.label1.Location = new System.Drawing.Point(18, 20); | |
this.label1.Name = "label1"; | |
this.label1.Size = new System.Drawing.Size(55, 13); | |
this.label1.TabIndex = 0; | |
this.label1.Text = "Hit Points:"; | |
// | |
// label2 | |
// | |
this.label2.AutoSize = true; | |
this.label2.Location = new System.Drawing.Point(18, 46); | |
this.label2.Name = "label2"; | |
this.label2.Size = new System.Drawing.Size(32, 13); | |
this.label2.TabIndex = 1; | |
this.label2.Text = "Gold:"; | |
// | |
// label3 | |
// | |
this.label3.AutoSize = true; | |
this.label3.Location = new System.Drawing.Point(18, 74); | |
this.label3.Name = "label3"; | |
this.label3.Size = new System.Drawing.Size(63, 13); | |
this.label3.TabIndex = 2; | |
this.label3.Text = "Experience:"; | |
// | |
// label4 | |
// | |
this.label4.AutoSize = true; | |
this.label4.Location = new System.Drawing.Point(18, 100); | |
this.label4.Name = "label4"; | |
this.label4.Size = new System.Drawing.Size(36, 13); | |
this.label4.TabIndex = 3; | |
this.label4.Text = "Level:"; | |
// | |
// lblHitPoints | |
// | |
this.lblHitPoints.AutoSize = true; | |
this.lblHitPoints.Location = new System.Drawing.Point(110, 19); | |
this.lblHitPoints.Name = "lblHitPoints"; | |
this.lblHitPoints.Size = new System.Drawing.Size(0, 13); | |
this.lblHitPoints.TabIndex = 4; | |
// | |
// lblGold | |
// | |
this.lblGold.AutoSize = true; | |
this.lblGold.Location = new System.Drawing.Point(110, 45); | |
this.lblGold.Name = "lblGold"; | |
this.lblGold.Size = new System.Drawing.Size(0, 13); | |
this.lblGold.TabIndex = 5; | |
// | |
// lblLevel | |
// | |
this.lblLevel.AutoSize = true; | |
this.lblLevel.Location = new System.Drawing.Point(110, 99); | |
this.lblLevel.Name = "lblLevel"; | |
this.lblLevel.Size = new System.Drawing.Size(0, 13); | |
this.lblLevel.TabIndex = 6; | |
// | |
// lblExperience | |
// | |
this.lblExperience.AutoSize = true; | |
this.lblExperience.Location = new System.Drawing.Point(110, 73); | |
this.lblExperience.Name = "lblExperience"; | |
this.lblExperience.Size = new System.Drawing.Size(0, 13); | |
this.lblExperience.TabIndex = 7; | |
// | |
// label5 | |
// | |
this.label5.AutoSize = true; | |
this.label5.Location = new System.Drawing.Point(617, 531); | |
this.label5.Name = "label5"; | |
this.label5.Size = new System.Drawing.Size(69, 13); | |
this.label5.TabIndex = 8; | |
this.label5.Text = "Select action"; | |
// | |
// cboWeapons | |
// | |
this.cboWeapons.FormattingEnabled = true; | |
this.cboWeapons.Location = new System.Drawing.Point(369, 559); | |
this.cboWeapons.Name = "cboWeapons"; | |
this.cboWeapons.Size = new System.Drawing.Size(121, 21); | |
this.cboWeapons.TabIndex = 9; | |
// | |
// cboPotions | |
// | |
this.cboPotions.FormattingEnabled = true; | |
this.cboPotions.Location = new System.Drawing.Point(369, 593); | |
this.cboPotions.Name = "cboPotions"; | |
this.cboPotions.Size = new System.Drawing.Size(121, 21); | |
this.cboPotions.TabIndex = 10; | |
// | |
// btnUseWeapon | |
// | |
this.btnUseWeapon.Location = new System.Drawing.Point(620, 559); | |
this.btnUseWeapon.Name = "btnUseWeapon"; | |
this.btnUseWeapon.Size = new System.Drawing.Size(75, 23); | |
this.btnUseWeapon.TabIndex = 11; | |
this.btnUseWeapon.Text = "Use"; | |
this.btnUseWeapon.UseVisualStyleBackColor = true; | |
this.btnUseWeapon.Click += new System.EventHandler(this.btnUseWeapon_Click); | |
// | |
// btnUsePotion | |
// | |
this.btnUsePotion.Location = new System.Drawing.Point(620, 593); | |
this.btnUsePotion.Name = "btnUsePotion"; | |
this.btnUsePotion.Size = new System.Drawing.Size(75, 23); | |
this.btnUsePotion.TabIndex = 12; | |
this.btnUsePotion.Text = "Use"; | |
this.btnUsePotion.UseVisualStyleBackColor = true; | |
this.btnUsePotion.Click += new System.EventHandler(this.btnUsePotion_Click); | |
// | |
// btnNorth | |
// | |
this.btnNorth.Location = new System.Drawing.Point(493, 433); | |
this.btnNorth.Name = "btnNorth"; | |
this.btnNorth.Size = new System.Drawing.Size(75, 23); | |
this.btnNorth.TabIndex = 13; | |
this.btnNorth.Text = "North"; | |
this.btnNorth.UseVisualStyleBackColor = true; | |
this.btnNorth.Click += new System.EventHandler(this.btnNorth_Click); | |
// | |
// btnSouth | |
// | |
this.btnSouth.Location = new System.Drawing.Point(493, 487); | |
this.btnSouth.Name = "btnSouth"; | |
this.btnSouth.Size = new System.Drawing.Size(75, 23); | |
this.btnSouth.TabIndex = 14; | |
this.btnSouth.Text = "South"; | |
this.btnSouth.UseVisualStyleBackColor = true; | |
this.btnSouth.Click += new System.EventHandler(this.btnSouth_Click); | |
// | |
// btnEast | |
// | |
this.btnEast.Location = new System.Drawing.Point(573, 457); | |
this.btnEast.Name = "btnEast"; | |
this.btnEast.Size = new System.Drawing.Size(75, 23); | |
this.btnEast.TabIndex = 15; | |
this.btnEast.Text = "East"; | |
this.btnEast.UseVisualStyleBackColor = true; | |
this.btnEast.Click += new System.EventHandler(this.btnEast_Click); | |
// | |
// btnWest | |
// | |
this.btnWest.Location = new System.Drawing.Point(412, 457); | |
this.btnWest.Name = "btnWest"; | |
this.btnWest.Size = new System.Drawing.Size(75, 23); | |
this.btnWest.TabIndex = 16; | |
this.btnWest.Text = "West"; | |
this.btnWest.UseVisualStyleBackColor = true; | |
this.btnWest.Click += new System.EventHandler(this.btnWest_Click); | |
// | |
// rtbLocation | |
// | |
this.rtbLocation.Location = new System.Drawing.Point(347, 19); | |
this.rtbLocation.Name = "rtbLocation"; | |
this.rtbLocation.ReadOnly = true; | |
this.rtbLocation.Size = new System.Drawing.Size(360, 105); | |
this.rtbLocation.TabIndex = 17; | |
this.rtbLocation.Text = ""; | |
// | |
// rtbMessages | |
// | |
this.rtbMessages.Location = new System.Drawing.Point(347, 130); | |
this.rtbMessages.Name = "rtbMessages"; | |
this.rtbMessages.ReadOnly = true; | |
this.rtbMessages.Size = new System.Drawing.Size(360, 286); | |
this.rtbMessages.TabIndex = 18; | |
this.rtbMessages.Text = ""; | |
// | |
// dgvInventory | |
// | |
this.dgvInventory.AllowUserToAddRows = false; | |
this.dgvInventory.AllowUserToDeleteRows = false; | |
this.dgvInventory.AllowUserToResizeRows = false; | |
this.dgvInventory.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; | |
this.dgvInventory.EditMode = System.Windows.Forms.DataGridViewEditMode.EditProgrammatically; | |
this.dgvInventory.Enabled = false; | |
this.dgvInventory.Location = new System.Drawing.Point(16, 130); | |
this.dgvInventory.MultiSelect = false; | |
this.dgvInventory.Name = "dgvInventory"; | |
this.dgvInventory.ReadOnly = true; | |
this.dgvInventory.RowHeadersVisible = false; | |
this.dgvInventory.Size = new System.Drawing.Size(312, 309); | |
this.dgvInventory.TabIndex = 19; | |
// | |
// dgvQuests | |
// | |
this.dgvQuests.AllowUserToAddRows = false; | |
this.dgvQuests.AllowUserToDeleteRows = false; | |
this.dgvQuests.AllowUserToResizeRows = false; | |
this.dgvQuests.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; | |
this.dgvQuests.EditMode = System.Windows.Forms.DataGridViewEditMode.EditProgrammatically; | |
this.dgvQuests.Location = new System.Drawing.Point(16, 446); | |
this.dgvQuests.MultiSelect = false; | |
this.dgvQuests.Name = "dgvQuests"; | |
this.dgvQuests.ReadOnly = true; | |
this.dgvQuests.RowHeadersVisible = false; | |
this.dgvQuests.Size = new System.Drawing.Size(312, 189); | |
this.dgvQuests.TabIndex = 20; | |
// | |
// SuperAdventureForm | |
// | |
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); | |
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; | |
this.ClientSize = new System.Drawing.Size(719, 651); | |
this.Controls.Add(this.dgvQuests); | |
this.Controls.Add(this.dgvInventory); | |
this.Controls.Add(this.rtbMessages); | |
this.Controls.Add(this.rtbLocation); | |
this.Controls.Add(this.btnWest); | |
this.Controls.Add(this.btnEast); | |
this.Controls.Add(this.btnSouth); | |
this.Controls.Add(this.btnNorth); | |
this.Controls.Add(this.btnUsePotion); | |
this.Controls.Add(this.btnUseWeapon); | |
this.Controls.Add(this.cboPotions); | |
this.Controls.Add(this.cboWeapons); | |
this.Controls.Add(this.label5); | |
this.Controls.Add(this.lblExperience); | |
this.Controls.Add(this.lblLevel); | |
this.Controls.Add(this.lblGold); | |
this.Controls.Add(this.lblHitPoints); | |
this.Controls.Add(this.label4); | |
this.Controls.Add(this.label3); | |
this.Controls.Add(this.label2); | |
this.Controls.Add(this.label1); | |
this.Name = "SuperAdventureForm"; | |
this.Text = "My Game"; | |
((System.ComponentModel.ISupportInitialize)(this.dgvInventory)).EndInit(); | |
((System.ComponentModel.ISupportInitialize)(this.dgvQuests)).EndInit(); | |
this.ResumeLayout(false); | |
this.PerformLayout(); | |
} | |
//private void cboPotions_SelectedIndexChanged(object sender, EventArgs e) | |
//{ | |
// throw new NotImplementedException(); | |
//} | |
//private void cboWeapons_SelectedIndexChanged(object sender, EventArgs e) | |
//{ | |
// throw new NotImplementedException(); | |
//} | |
#endregion | |
private System.Windows.Forms.Label label1; | |
private System.Windows.Forms.Label label2; | |
private System.Windows.Forms.Label label3; | |
private System.Windows.Forms.Label label4; | |
private System.Windows.Forms.Label lblHitPoints; | |
private System.Windows.Forms.Label lblGold; | |
private System.Windows.Forms.Label lblLevel; | |
private System.Windows.Forms.Label lblExperience; | |
private System.Windows.Forms.Label label5; | |
private System.Windows.Forms.ComboBox cboWeapons; | |
private System.Windows.Forms.ComboBox cboPotions; | |
private System.Windows.Forms.Button btnUseWeapon; | |
private System.Windows.Forms.Button btnUsePotion; | |
private System.Windows.Forms.Button btnNorth; | |
private System.Windows.Forms.Button btnSouth; | |
private System.Windows.Forms.Button btnEast; | |
private System.Windows.Forms.Button btnWest; | |
private System.Windows.Forms.RichTextBox rtbLocation; | |
private System.Windows.Forms.RichTextBox rtbMessages; | |
private System.Windows.Forms.DataGridView dgvInventory; | |
private System.Windows.Forms.DataGridView dgvQuests; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment