public frmItemDetailed() { InitializeComponent(); this.Text = "New Item"; mode = Common.Mode.New; btnActionItem.Text = "Save"; }
public static ExchangeMappingProperties GetDefaultExchangeMapping(Common.Mode mode, ResourceId resourceId, int mappingId = 0) { string resourceName = resourceId == ResourceId.Person ? "candidate" : resourceId.ToString().ToLower(); return(mode == Common.Mode.Import ? ExchangeMappingProperties.GetMappingContent(mode.ToString().ToLower(), mappingId, "label", "name", resourceName, resourceName, Common.GetDefaultKeys(resourceId), Common.GetDefaultImportLabels(), Common.GetDefaultImportGroups(resourceId), Common.GetDefaultImportItems(), Common.GetDefaultImportConverters()) : ExchangeMappingProperties.GetMappingContent(mode.ToString().ToLower(), mappingId, "label", "name", resourceName, resourceName, new List <string> { }, Common.GetDefaultExportLabels(), Common.GetDefaultExportGroups(resourceId), Common.GetDefaultExportItems(resourceId), Common.GetDefaultExportConverters())); }
public frmLocation(int IdLocation) { InitializeComponent(); mode = Common.Mode.Edit; this.location = Game.Instance.world.LocationByID(IdLocation); lbLocation.Text = this.location.Name; if (!string.IsNullOrEmpty(location.Picture)) { Bitmap bitmap; using (var ms = new MemoryStream(Convert.FromBase64String(location.Picture))) { bitmap = new Bitmap(ms); this.Picture.Image = bitmap; } } txtDescription.Text = this.location.Description; //this.location.HasItemRequiredToEnter //this.location.HasAMonster //this.location.HasAQuest }
public frmItemDetailed(int Id) { this.ItemId = Id; InitializeComponent(); mode = Common.Mode.Edit; btnActionItem.Text = "Delete"; this.Text = "Item Id : " + this.ItemId.ToString(); Item item = Game.Instance.world.ItemByID(this.ItemId); txtName.Text = item.Name; txtNamePlural.Text = item.NamePlural; txtID.Text = item.ID.ToString(); txtPrice.Text = item.Price.ToString(); gpIsWeapon.Visible = item.IsWeapon(); gpIsHealingPotion.Visible = item.IsHealingPotion(); if (item.IsWeapon()) { Weapon weapon = (Weapon)Game.Instance.world.ItemByID(this.ItemId); txtMinimumDamage.Text = weapon.MinimumDamage.ToString(); txtMaximumDamage.Text = weapon.MaximumDamage.ToString(); } txtAmountToHeal.Visible = item.IsHealingPotion(); if (item.IsHealingPotion()) { HealingPotion healingPotion = (HealingPotion)Game.Instance.world.ItemByID(this.ItemId); txtAmountToHeal.Text = healingPotion.AmountToHeal.ToString(); } }
public frmLocation() { InitializeComponent(); mode = Common.Mode.New; }