private static void AddLine(IPropertyList list, int cliloc, string line) { if (line != null) { list.Add(cliloc, line); } }
public override void GetProperties(IPropertyList list) { base.GetProperties(list); // This is half a prize ticket! Double-click this ticket and target any other ticket marked NEW PLAYER and get a prize! This ticket will only work for YOU, so don't give it away! list.Add(1041492); }
public override void GetProperties(IPropertyList list) { base.GetProperties(list); list.Add(1074502); // It looks explosive. list.Add(1075085); // Requirement: Mondain's Legacy }
/// <summary> /// Converts row/column data into a list of sizes. /// </summary> /// <param name="properties">Contains the info.</param> /// <param name="dataName">The name of the property containing the info.</param> /// <param name="defaultValue">The default size.</param> /// <param name="size">The actual size if a number of items is given rather than a list of sizes.</param> /// <returns>List of sizes.</returns> private static List<string> GetGridData(IPropertyList properties, string dataName, string defaultValue, string size) { IList<IProperty> property = properties.Find(dataName); List<string> columnList = null; if (property != null && property.Count > 0) { columnList = new List<string>(); if (property.Count > 1) { columnList.AddRange(property.Select(item => string.IsNullOrWhiteSpace(item.StringValue) ? defaultValue : item.StringValue)); } else if (property[0].IsInt) { int fieldCount = property[0].IntValue; for (int i = 0; i < fieldCount; i++) columnList.Add(size); } else { string[] fieldData = property[0].StringValue.Split('|'); columnList.AddRange(fieldData.Select(item => string.IsNullOrWhiteSpace(item) ? defaultValue : item)); } } return columnList; }
List <ToolStripItem> CreateToolstripItems(IPropertyList obj) { List <ToolStripItem> list = null; if (obj != null) { var pnames = obj.PropertyNames; if (pnames != null) { list = new List <ToolStripItem>(); list.Add(new ToolStripLabel(obj.ToString() + ":") { Font = new Font(Control.DefaultFont, FontStyle.Bold) }); foreach (var pname in pnames) { var pi = obj.GetType().GetProperty(pname); if (pi != null) { var item = CreateToolstrpItem(obj, pi); list.Add(item); } } list.Add(new ToolStripSeparator()); } } return(list); }
public override void AddNameProperties(IPropertyList list) { base.AddNameProperties(list); var index = CraftResources.GetIndex(Resource); if (index >= 1 && index <= 8) { return; } if (!CraftResources.IsStandard(Resource)) { var num = CraftResources.GetLocalizationNumber(Resource); if (num > 0) { list.Add(num); } else { list.Add(CraftResources.GetName(Resource)); } } }
public override void GetProperties(IPropertyList list) { base.GetProperties(list); list.Add(1070881, Dipper); // Hand Dipped by ~1_name~ list.Add(1070880); // Winter 2004 }
public override void GetProperties(IPropertyList list) { base.GetProperties(list); if (_guild?.Disbanded == false) { string name; string abbr; if ((name = _guild.Name) == null || (name = name.Trim()).Length <= 0) { name = "(unnamed)"; } if ((abbr = _guild.Abbreviation) == null || (abbr = abbr.Trim()).Length <= 0) { abbr = ""; } // list.Add( 1060802, Utility.FixHtml( name ) ); // Guild name: ~1_val~ list.Add(1060802, $"{Utility.FixHtml(name)} [{Utility.FixHtml(abbr)}]"); } else if (_guildName != null && _guildAbbrev != null) { list.Add(1060802, $"{Utility.FixHtml(_guildName)} [{Utility.FixHtml(_guildAbbrev)}]"); } }
public override void GetProperties(IPropertyList list) { base.GetProperties(list); // NOTE: OSI does not list uses remaining; intentional difference list.Add(1060584, $"{Charges}"); // uses remaining: ~1_val~ }
public override void GetProperties(IPropertyList list) { base.GetProperties(list); var remaining = CreationTime + LifeSpan - Core.Now; list.Add(1072517, $"{(int)remaining.TotalSeconds}"); // Lifespan: ~1_val~ seconds }
public override void AddNameProperties(IPropertyList list) { base.AddNameProperties(list); if (IsShipwreckedItem) { list.Add(1041645); // recovered from a shipwreck } }
public override void GetProperties(IPropertyList list) { base.GetProperties(list); if (Core.ML && _isRewardItem) { list.Add(1076217); // 1st Year Veteran Reward } }
public override void GetProperties(IPropertyList list) { base.GetProperties(list); list.Add(GetDescription()); if (!Dead && _timerToken.Running) { list.Add(1074507); // Gasping for air } }
/// <summary> /// Asynchronously sends a message to the remote lockdown client. /// </summary> /// <param name="message"> /// The message to send. /// </param> /// <param name="cancellationToken"> /// A <see cref="CancellationToken"/> which can be used to cancel the asynchronous operation. /// </param> /// <returns> /// A <see cref="Task"/> which represents the asynchronous operation. /// </returns> public virtual Task WriteMessageAsync(IPropertyList message, CancellationToken cancellationToken) { Verify.NotDisposed(this); if (message == null) { throw new ArgumentNullException(nameof(message)); } return(this.WriteMessageAsync(message.ToDictionary(), cancellationToken)); }
public override void AddNameProperty(IPropertyList list) { if (m_Boat?.ShipName != null) { list.Add(1042884, m_Boat.ShipName); // the tiller man of the ~1_SHIP_NAME~ } else { base.AddNameProperty(list); } }
public override void AddNameProperties(IPropertyList list) { base.AddNameProperties(list); AddQuestItemProperty(list); if (CanGiveMLQuest) { list.Add(1072269); // Quest Giver } }
public override void AddNameProperty(IPropertyList list) { if (Amount > 1) { list.Add(1050039, $"{Amount}\t{1024216:#}"); // ~1_NUMBER~ ~2_ITEMNAME~ } else { list.Add(1024216); // pile of hides } }
public override void AddNameProperty(IPropertyList list) { if (_owner != null) { list.Add(1042887, _owner.Name); // a strong box owned by ~1_OWNER_NAME~ } else { base.AddNameProperty(list); } }
/// <summary> /// Constructor. /// </summary> /// <param name="children">The children that need to be included in the grid.</param> /// <param name="columnWidth">The width of each column.</param> public GridData(IPropertyList children, string columnWidth) { List<string> columns = GridCalculations.GetColumnData(children, columnWidth); List<string> rows = GridCalculations.GetRowData(children); if (rows != null && columns == null) columns = new List<string> {columnWidth}; Rows = rows; Columns = columns; ColumnCount = Columns?.Count ?? 1; }
public override void AddNameProperty(IPropertyList list) { if (Amount > 1) { list.Add(1050039, $"{Amount}\t{1024199:#}"); // ~1_NUMBER~ ~2_ITEMNAME~ } else { list.Add(1024199); // cut leather } }
public override void AddNameProperty(IPropertyList list) { if (!string.IsNullOrEmpty(_title)) { list.Add(_title); } else { base.AddNameProperty(list); } }
public override void AddNameProperty(IPropertyList list) { if (Name != null) { list.Add(1075257, Name); // Contents of ~1_PETNAME~'s pack. } else { base.AddNameProperty(list); } }
public override void AddNameProperty(IPropertyList list) { if (Amount > 1) { list.Add(1050039, $"{Amount}\t{1027154:#}"); // ~1_NUMBER~ ~2_ITEMNAME~ } else { list.Add(1027154); // ingots } }
public override void AddNameProperty(IPropertyList list) { if (ItemID == 0x2006) // Corpse form { list.Add("a human corpse"); list.Add(1049318, Name); // the remains of ~1_NAME~ the militia fighter } else { list.Add(1049319); // the remains of a militia fighter } }
public override void AddNameProperty(IPropertyList list) { if (ItemID == 0x2006) // Corpse form { list.Add("a human corpse"); list.Add(1049144, Name); // the remains of ~1_NAME~ the apprentice } else { list.Add(1049145); // the remains of a wizard's apprentice } }
public override void GetProperties(IPropertyList list) { base.GetProperties(list); switch (_wandEffect) { case WandEffect.Clumsiness: list.Add(1017326, $"{_charges}"); break; // clumsiness charges: ~1_val~ case WandEffect.Identification: list.Add(1017350, $"{_charges}"); break; // identification charges: ~1_val~ case WandEffect.Healing: list.Add(1017329, $"{_charges}"); break; // healing charges: ~1_val~ case WandEffect.Feeblemindedness: list.Add(1017327, $"{_charges}"); break; // feeblemind charges: ~1_val~ case WandEffect.Weakness: list.Add(1017328, $"{_charges}"); break; // weakness charges: ~1_val~ case WandEffect.MagicArrow: list.Add(1060492, $"{_charges}"); break; // magic arrow charges: ~1_val~ case WandEffect.Harming: list.Add(1017334, $"{_charges}"); break; // harm charges: ~1_val~ case WandEffect.Fireball: list.Add(1060487, $"{_charges}"); break; // fireball charges: ~1_val~ case WandEffect.GreaterHealing: list.Add(1017330, $"{_charges}"); break; // greater healing charges: ~1_val~ case WandEffect.Lightning: list.Add(1060491, $"{_charges}"); break; // lightning charges: ~1_val~ case WandEffect.ManaDraining: list.Add(1017339, $"{_charges}"); break; // mana drain charges: ~1_val~ } }
public override void AddNameProperties(IPropertyList list) { base.AddNameProperties(list); if (!Empty) { var fish = Fish; if (fish != null) { list.AddLocalized(1074494, fish.LabelNumber); // Contains: ~1_CREATURE~ } } }
public override void GetProperties(IPropertyList list) { base.GetProperties(list); if (Weight >= 20) { if (_fisher != null) { list.Add(1070857, _fisher.Name); // Caught by ~1_fisherman~ } list.Add(1070858, $"{(int)Weight}"); // ~1_weight~ stones } }
public override void GetProperties(IPropertyList list) { base.GetProperties(list); if (_isRewardItem) { // X Year Veteran Reward list.Add( RewardSystem.GetRewardYearLabel( this, new object[] { Hue, _number } ) ); } }
public override void AddNameProperty(IPropertyList list) { if (_owner != null) { list.Add(1150295, _owner); // ~1_NAME~'s St. Valentine Bear } else { list.Add(1150294); // St. Valentine Bear } AddLine(list, 1150301, _line1); // [ ~1_LINE0~ ] AddLine(list, 1150302, _line2); // [ ~1_LINE1~ ] AddLine(list, 1150303, _line3); // [ ~1_LINE2~ ] }
public override void GetProperties(IPropertyList list) { base.GetProperties(list); if (ItemName != null) { if (ItemName.Number > 0) { list.Add(1070998, ItemName.Number); // Use this to redeem<br>your ~1_PROMO~ } else { list.Add(1070998, ItemName.String); // Use this to redeem<br>your ~1_PROMO~ } } }
public override void GetProperties(IPropertyList list) { base.GetProperties(list); if (Commodity != null) { var args = Commodity.Name == null ? $"#{(Commodity as ICommodity)?.DescriptionNumber ?? Commodity.LabelNumber}\t{Commodity.Amount}" : $"{Commodity.Name}\t{Commodity.Amount}"; list.Add(1060658, args); // ~1_val~: ~2_val~ } else { list.Add(1060748); // unfilled } }
/// <summary> /// Creates a new property syntax reader to /// read the properties of a provided class declaration. /// All properties will be stored in the given list of properties /// </summary> /// <param name="semantic">Semantic Model is used /// to resolve type syntax into TypeSymbols.</param> /// <param name="propertyList">list where the found /// properties should be stored in</param> public PropertySyntaxReader(IPropertyList propertyList,SemanticModel semantic):base(semantic) { _properties = propertyList; }
/// <summary> /// Gets the grid columns sizes. /// </summary> /// <param name="properties">Holds the columns sizing information.</param> /// <param name="columnWidth">The default column width.</param> /// <returns>List of column widths.</returns> public static List<string> GetColumnData(IPropertyList properties, string columnWidth) { return GetGridData(properties, "Columns", "*", columnWidth); }
public PropertySymbolReader(IPropertyList properties) { _properties = properties; }
/// <summary> /// Gets the grid row sizes. /// </summary> /// <param name="properties">Holds the row sizing information.</param> /// <returns>List of row heights.</returns> public static List<string> GetRowData(IPropertyList properties) { return GetGridData(properties, "Rows", "Auto", "Auto"); }