public static string ToString(PossibleValues enumPos) { switch ((int)enumPos) { case 0: return("-"); break; case 1: return("Left end"); break; case 2: return("Middle left"); break; case 3: return("Middle"); break; case 4: return("Middle right"); break; case 5: return("Right end"); break; } return("-"); }
public bool Equals(CustomField other) { if (other == null) { return(false); } return(Id == other.Id && IsFilter == other.IsFilter && IsRequired == other.IsRequired && Multiple == other.Multiple && Searchable == other.Searchable && Visible == other.Visible && CustomizedType.Equals(other.CustomizedType) && DefaultValue.Equals(other.DefaultValue) && FieldFormat.Equals(other.FieldFormat) && MaxLength == other.MaxLength && MinLength == other.MinLength && Name.Equals(other.Name) && Regexp.Equals(other.Regexp) && PossibleValues.Equals(other.PossibleValues) && Roles.Equals(other.Roles) && Trackers.Equals(other.Trackers)); }
/// <summary> /// /// </summary> /// <param name="other"></param> /// <returns></returns> public bool Equals(CustomField other) { if (other == null) { return(false); } return(Id == other.Id && IsFilter == other.IsFilter && IsRequired == other.IsRequired && Multiple == other.Multiple && Searchable == other.Searchable && Visible == other.Visible && string.Equals(CustomizedType, other.CustomizedType, StringComparison.OrdinalIgnoreCase) && string.Equals(DefaultValue, other.DefaultValue, StringComparison.OrdinalIgnoreCase) && string.Equals(FieldFormat, other.FieldFormat, StringComparison.OrdinalIgnoreCase) && MaxLength == other.MaxLength && MinLength == other.MinLength && string.Equals(Name, other.Name, StringComparison.OrdinalIgnoreCase) && string.Equals(Regexp, other.Regexp, StringComparison.OrdinalIgnoreCase) && PossibleValues.Equals(other.PossibleValues) && Roles.Equals(other.Roles) && Trackers.Equals(other.Trackers)); }
public static string ToString(PossibleValues enumPos) { switch ((int)enumPos) { case 0: return("-"); break; case 1: return("Orange"); break; case 2: return("Blue"); break; case 3: return("Green"); break; case 4: return("Purple"); break; case 5: return("Red"); break; } return("-"); }
public ArgumentUsageInfo(PropertyInfo toAutoGen) : this() { Property = toAutoGen; Name = "-" + NameTranslators.CombineByPascalCase(toAutoGen.Name, "-").ToLower(); Aliases.Add("-" + Property.Name); if (Aliases.Count == 0) { Aliases.Add("-" + Name.ToLower()); } var argAliases = Property.HasAttr <ArgAliasAttribute>() ? Property.Attr <ArgAliasAttribute>().Aliases : null; if (argAliases != null) { Aliases.AddRange(argAliases.Select(x => "-" + NameTranslators.CombineByPascalCase(x, "-"))); } Description = Property.HasAttr <ArgDescriptionAttribute>() ? Property.Attr <ArgDescriptionAttribute>().Description : ""; Group = Property.HasAttr <ArgDescriptionAttribute>() ? Property.Attr <ArgDescriptionAttribute>().Group : ""; if (Property.PropertyType.IsEnum) { foreach (var val in toAutoGen.PropertyType.GetFields().Where(v => v.IsSpecialName == false)) { var description = val.HasAttr <ArgDescriptionAttribute>() ? " - " + val.Attr <ArgDescriptionAttribute>().Description : ""; var valText = val.Name; PossibleValues.Add(valText + description); } } }
public override string ToString() { return(string.Format("Name={0};Order={1};Values={2};DependsOn={3}", Name, Order, PossibleValues.Print <string>(), DependsOn.Print <SnippetProperty>())); }
public override object GetXslOutput() { return(PossibleValues.IndexOf(textValue)); }
/// <summary> /// Creates a deep copy of this heuristic. Requires <c>rules</c> to contain an /// <see cref="IMissingBoxValuesTracker"/>, an <see cref="IMissingColumnValuesTracker"/>, /// and an <see cref="IMissingRowValuesTracker"/>. /// </summary> public ISudokuHeuristic CopyWithNewReferences( IReadOnlyPuzzle puzzle, PossibleValues possibleValues, IReadOnlyList <ISudokuRule> rules) => new StandardHeuristic(this, puzzle, possibleValues, rules);
public Slot(char v, bool confirmed = false) { Value = v; Confirmed = confirmed; PossibleValues.Remove(v); }
/// <summary> /// Remove possible value from a set (if present). /// </summary> /// <param name="value">Value removed from set of possible values.</param> public void RemovePossibleValue(byte value) { PossibleValues.Remove(value); }
/// <summary> /// Intersect cell's possible values with given set (i.e. set of possible values from region). /// </summary> /// <param name="set">Set to intersect with instance's possible values.</param> public void IntersectPossibleValues(IEnumerable <byte> set) { PossibleValues.IntersectWith(set); }