public override bool Equals(object obj) { if (obj == null) { return(false); } if (obj == this) { return(true); } return(obj is CatalogItem other && ((Name == null && other.Name == null) || (Name?.Equals(other.Name) == true)) && ((Description == null && other.Description == null) || (Description?.Equals(other.Description) == true)) && ((Abbreviation == null && other.Abbreviation == null) || (Abbreviation?.Equals(other.Abbreviation) == true)) && ((LabelColor == null && other.LabelColor == null) || (LabelColor?.Equals(other.LabelColor) == true)) && ((AvailableOnline == null && other.AvailableOnline == null) || (AvailableOnline?.Equals(other.AvailableOnline) == true)) && ((AvailableForPickup == null && other.AvailableForPickup == null) || (AvailableForPickup?.Equals(other.AvailableForPickup) == true)) && ((AvailableElectronically == null && other.AvailableElectronically == null) || (AvailableElectronically?.Equals(other.AvailableElectronically) == true)) && ((CategoryId == null && other.CategoryId == null) || (CategoryId?.Equals(other.CategoryId) == true)) && ((TaxIds == null && other.TaxIds == null) || (TaxIds?.Equals(other.TaxIds) == true)) && ((ModifierListInfo == null && other.ModifierListInfo == null) || (ModifierListInfo?.Equals(other.ModifierListInfo) == true)) && ((Variations == null && other.Variations == null) || (Variations?.Equals(other.Variations) == true)) && ((ProductType == null && other.ProductType == null) || (ProductType?.Equals(other.ProductType) == true)) && ((SkipModifierScreen == null && other.SkipModifierScreen == null) || (SkipModifierScreen?.Equals(other.SkipModifierScreen) == true)) && ((ItemOptions == null && other.ItemOptions == null) || (ItemOptions?.Equals(other.ItemOptions) == true))); }
/// <summary> /// Filters a <see cref="BoardLabelCollection"/> for a given <see cref="CardFilter"/>. /// </summary> /// <param name="labels">The <see cref="BoardLabelCollection"/></param> /// <param name="filter">The new <see cref="CardFilter"/> by which to filter.</param> /// <returns>The filtered collection.</returns> public static BoardLabelCollection Filter(this BoardLabelCollection labels, LabelColor filter) { var collection = new BoardLabelCollection(labels, labels.Auth); collection.SetFilter(filter); return(collection); }
public EllipseBuilder SetBorder(LabelColor color, int thickness) { Context.BorderColor = color; Context.BorderThickness = thickness; return(this); }
/// <summary> /// Adds a filter to the collection. /// </summary> /// <param name="labelColor">The filter value.</param> public void Filter(LabelColor labelColor) { if (_additionalParameters == null) { _additionalParameters = new Dictionary <string, object>(); } _additionalParameters["filter"] = labelColor.GetDescription(); }
/// <summary> /// Initializes a new instance of the <see cref="Label"/> class. /// </summary> /// <param name="jsonData"> /// The JSON data for the new label. /// </param> internal Label(string jsonData) { var o = JObject.Parse(jsonData); _name = (string)o.SelectToken("name"); _color = (LabelColor)(int)o.SelectToken("color"); _jsonData = jsonData; }
public RectangleBuilder SetBorder(LabelColor color, int thickness, int cornerRounding) { Context.BorderColor = color; Context.BorderThickness = thickness; Context.CornerRounding = cornerRounding; return(this); }
internal static ILabel CheckLabel(this Board board, string labelName, LabelColor labelColor) { TrelloRequestCounter.TrelloPostCount += 3; var label = board.Labels.FirstOrDefault(l => l.Name == labelName); var task = board.Labels.Add(labelName, labelColor); task.RunSynchronously(); return(task.Result); }
void OnSerializingMethod(StreamingContext sc) { Images = new string[] { Image }; sLabelColor = LabelColor.ToString(); sLineColor = LineColor.ToString(); FontFamily = TextFormat.FontFamily.ToString(); FontStyle = TextFormat.FontStyle.ToString(); FontWeight = TextFormat.FontWeight.ToString(); }
/// <summary> /// Creates a new drop down option. /// </summary> /// <param name="text">The text.</param> /// <param name="color">(Optional) The label color.</param> /// <returns>A new drop down option.</returns> /// <remarks>This object will not update. It is intended for adding new options to custom drop down fields.</remarks> public static IDropDownOption Create(string text, LabelColor color = LabelColor.None) { var json = TrelloConfiguration.JsonFactory.Create <IJsonCustomDropDownOption>(); json.Text = text; json.Color = color; json.ValidForMerge = true; return(new DropDownOption(json, null, true)); }
public override int GetHashCode() { unchecked { int hashCode = (Value != null ? Value.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Label != null ? Label.GetHashCode() : 0); hashCode = (hashCode * 397) ^ LabelColor.GetHashCode(); hashCode = (hashCode * 397) ^ CanEdit.GetHashCode(); hashCode = (hashCode * 397) ^ CanDelete.GetHashCode(); hashCode = (hashCode * 397) ^ Highlight.GetHashCode(); return(hashCode); } }
public async Task RemoveLabelColorFromCardAsync(Card card, LabelColor labelColor) { try { var foundCard = await FindAndCheckNullabilityHelper <Card> .InDatabaseAsync(context.Cards, card, "Card not found!", false); var foundLabeColor = await FindAndCheckNullabilityHelper <LabelColor> .InCollectionAsync(foundCard.LabelColors, labelColor, "Label color was not found!", false); foundCard.LabelColors.Remove(foundLabeColor); } catch (Exception ex) { throw ex; } }
/// <summary> /// Create a new label. /// </summary> /// <param name="labelName"> /// The name of the new label. /// </param> /// <param name="color"> /// The color. /// </param> public void CreateLabel(string labelName, LabelColor color) { this.CheckLoginStatus(); // Validation if (string.IsNullOrWhiteSpace(labelName)) { throw new ArgumentNullException("labelName"); } Core.GetJsonData( Core.ConstructUri( "addLabel?", string.Format("token={0}&name={1}&color={2}", this.apiToken, labelName, color.GetHashCode()), false)); }
public async Task AddLabelColorToCardAsync(Card card, LabelColor labelColor) { try { var foundCard = await FindAndCheckNullabilityHelper <Card> .InDatabaseAsync(context.Cards, card, "Card not found!", false); var foundLabeColor = await FindAndCheckNullabilityHelper <LabelColor> .InCollectionAsync(foundCard.LabelColors, labelColor, "Such label color is already assigned to this card!", true); labelColor.Cards.Add(foundCard); context.Set <LabelColor>().Add(labelColor); } catch (Exception ex) { throw ex; } }
/// <summary> /// Update the color of a specified label. /// </summary> /// <param name="name"> /// The name of the label to update. /// </param> /// <param name="color"> /// The new color. /// </param> public void UpdateLabelColor(string name, LabelColor color) { CheckLoginStatus(); // Validation if (string.IsNullOrWhiteSpace(name)) { throw new ArgumentNullException("name"); } Core.GetJsonData( Core.ConstructUri( "updateLabelColor?", string.Format("token={0}&name={1}&color={2}", ApiToken, name, color.GetHashCode()), false)); }
public static Vector2 DrawGenericDraggable(RectangleF rect, string title) { if (BackgroundNineslice == null) { NoRegisterError("BackgroundNineSlice"); return(Vector2.Zero); } if (!LabelColor.HasValue) { NoRegisterError("LabelColor"); return(Vector2.Zero); } Vector2 dragPos = IMGUI.StartDraggable(new IMGuiDraggableContent(rect, new Size(rect.width, 24), BackgroundNineslice, Color.White, 1) .SetTitle(title, LabelColor.GetValueOrDefault(), LabelFont), true); return(dragPos); }
public override JsonCollection BuildParams() { var options = new JsonCollection(false); if (Clickable.HasValue) { options.Add <bool>("clickable", Clickable.Value); } if (SuppressInfoWindows.HasValue) { options.Add <bool>("supressInfoWindows", SuppressInfoWindows.Value); } options.Add("labelColor", "google.maps.weather.LabelColor." + LabelColor.ToString().ToUpperInvariant(), LabelColor != WeatherLayer.LabelColor.Auto); options.Add("temperatureUnits", "google.maps.weather.TemperatureUnit." + TemperatureUnits.ToString().ToUpperInvariant(), TemperatureUnits != WeatherLayer.TemperatureUnit.Default); options.Add("windSpeedUnits", "google.maps.weather.WindSpeedUnit." + WindSpeedUnits.ToString().ToUpperInvariant(), WindSpeedUnits != WeatherLayer.WindSpeedUnit.Default); return(options); }
public override int GetHashCode() { int hashCode = -419430818; if (Name != null) { hashCode += Name.GetHashCode(); } if (DiscountType != null) { hashCode += DiscountType.GetHashCode(); } if (Percentage != null) { hashCode += Percentage.GetHashCode(); } if (AmountMoney != null) { hashCode += AmountMoney.GetHashCode(); } if (PinRequired != null) { hashCode += PinRequired.GetHashCode(); } if (LabelColor != null) { hashCode += LabelColor.GetHashCode(); } if (ModifyTaxBasis != null) { hashCode += ModifyTaxBasis.GetHashCode(); } return(hashCode); }
public override bool Equals(object obj) { if (obj == null) { return(false); } if (obj == this) { return(true); } return(obj is CatalogDiscount other && ((Name == null && other.Name == null) || (Name?.Equals(other.Name) == true)) && ((DiscountType == null && other.DiscountType == null) || (DiscountType?.Equals(other.DiscountType) == true)) && ((Percentage == null && other.Percentage == null) || (Percentage?.Equals(other.Percentage) == true)) && ((AmountMoney == null && other.AmountMoney == null) || (AmountMoney?.Equals(other.AmountMoney) == true)) && ((PinRequired == null && other.PinRequired == null) || (PinRequired?.Equals(other.PinRequired) == true)) && ((LabelColor == null && other.LabelColor == null) || (LabelColor?.Equals(other.LabelColor) == true)) && ((ModifyTaxBasis == null && other.ModifyTaxBasis == null) || (ModifyTaxBasis?.Equals(other.ModifyTaxBasis) == true))); }
public void SetEnabled(bool enabled) { if (enabled) { TitleLabel.TextColor = LabelColor; } else { LabelColor = TitleLabel.TextColor; nfloat r, g, b, a; LabelColor.GetRGBA(out r, out g, out b, out a); r = NMath.Floor((nfloat)(r * 100.0 + 0.5)) / (nfloat)100.0; g = NMath.Floor((nfloat)(g * 100.0 + 0.5)) / (nfloat)100.0; b = NMath.Floor((nfloat)(b * 100.0 + 0.5)) / (nfloat)100.0; TitleLabel.TextColor = UIColor.FromRGBA( (r + (nfloat)0.4), (g + (nfloat)0.4), (b + (nfloat)0.4), (nfloat)1); } Enabled = enabled; CheckView.SetNeedsDisplay(); }
/// <summary> /// Creates a new <see cref="ISearchQuery"/> specifying a label color search parameter. /// </summary> /// <param name="labelColor">The label color to search for.</param> /// <returns>A new <see cref="ISearchQuery"/> parameter list.</returns> public ISearchQuery Label(LabelColor labelColor) { _parameters.Add(new LabelSearchParameter(labelColor)); return(this); }
/// <summary> /// Creates a new <see cref="SearchFor"/> appending a label color search parameter. /// </summary> /// <param name="search">The current search</param> /// <param name="labelColor">The label color to search for.</param> /// <returns>A new <see cref="SearchFor"/> parameter list.</returns> public static SearchFor AndLabel(this SearchFor search, LabelColor labelColor) { return(new SearchFor(search, new LabelSearchParameter(labelColor))); }
public static ZPLCommand GE(int width, int height, int borderThickness, LabelColor lineColor) => new ZPLCommand("^GE", width, height, borderThickness, (char)lineColor);
public static ZPLCommand GD(int width, int height, int borderThickness, LabelColor lineColor, bool inverseDirection = false) => new ZPLCommand("^GD", width, height, borderThickness, (char)lineColor, inverseDirection ? 'L' : 'R');
public static ZPLCommand GB(int width, int height, int borderThickness, LabelColor lineColor, int cornerRounding) => new ZPLCommand("^GB", width, height, borderThickness, (char)lineColor, cornerRounding);
/// <summary> /// Adds a filter to the collection. /// </summary> /// <param name="labelColor">The filter value.</param> public void Filter(LabelColor labelColor) { AdditionalParameters["filter"] = labelColor.GetDescription(); }
/// <summary> /// Creates a new <see cref="SearchFor"/> specifying a label color search parameter. /// </summary> /// <param name="labelColor">The label color to search for.</param> /// <returns>A new <see cref="SearchFor"/> parameter list.</returns> public static SearchFor Label(LabelColor labelColor) { return(new SearchFor(new LabelSearchParameter(labelColor))); }
public override int GetHashCode() { int hashCode = -268666674; if (Name != null) { hashCode += Name.GetHashCode(); } if (Description != null) { hashCode += Description.GetHashCode(); } if (Abbreviation != null) { hashCode += Abbreviation.GetHashCode(); } if (LabelColor != null) { hashCode += LabelColor.GetHashCode(); } if (AvailableOnline != null) { hashCode += AvailableOnline.GetHashCode(); } if (AvailableForPickup != null) { hashCode += AvailableForPickup.GetHashCode(); } if (AvailableElectronically != null) { hashCode += AvailableElectronically.GetHashCode(); } if (CategoryId != null) { hashCode += CategoryId.GetHashCode(); } if (TaxIds != null) { hashCode += TaxIds.GetHashCode(); } if (ModifierListInfo != null) { hashCode += ModifierListInfo.GetHashCode(); } if (Variations != null) { hashCode += Variations.GetHashCode(); } if (ProductType != null) { hashCode += ProductType.GetHashCode(); } if (SkipModifierScreen != null) { hashCode += SkipModifierScreen.GetHashCode(); } if (ItemOptions != null) { hashCode += ItemOptions.GetHashCode(); } return(hashCode); }
public static LabelColorDTO GetLabelColorDTOFromEntity(LabelColor labelColor) { return(MapperHelper.GetEntityFromDTO <LabelColor, LabelColorDTO>(labelColor)); }
/// <summary> /// Initializes a new instance of the <see cref="Label"/> class. /// </summary> /// <param name="jsonData"> /// The JSON data for the new label. /// </param> internal Label(string jsonData) { var o = JObject.Parse(jsonData); this.name = (string)o.SelectToken("name"); this.color = (LabelColor)(int)o.SelectToken("color"); this.jsonData = jsonData; }
public LabelSearchParameter(LabelColor color) { Query = $"#{color.ToLowerString()}"; }
public bool Equals(ToolbarEntry other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return(String.Equals(Value, other.Value) && String.Equals(Label, other.Label) && LabelColor.Equals(other.LabelColor) && CanEdit.Equals(other.CanEdit) && CanDelete.Equals(other.CanDelete) && Highlight.Equals(other.Highlight)); }
/// <summary> /// Create a new label. /// </summary> /// <param name="labelName"> /// The name of the new label. /// </param> /// <param name="color"> /// The color. /// </param> public void CreateLabel(string labelName, LabelColor color) { this.CheckLoginStatus(); // Validation if (string.IsNullOrWhiteSpace(labelName)) { throw new ArgumentNullException("labelName"); } Core.GetJsonData( Core.ConstructUri( "addLabel?", string.Format("token={0}&name={1}&color={2}", this.apiToken, labelName, color.GetHashCode()), false)); }