private static bool Fits( MaskValue maskValue, KnownProperty fieldValue, int remainingCount) => maskValue == MaskValue.Unknown && fieldValue == KnownProperty.Unknown || maskValue == MaskValue.Anything || maskValue == MaskValue.NotUnknown && fieldValue != KnownProperty.Unknown || (int)maskValue == remainingCount;
public PropertyViewModel <T> GetKnownPropertyViewModel <T> (KnownProperty <T> property) { if (property == null) { throw new ArgumentNullException(nameof(property)); } if (this.knownEditors == null) { throw new InvalidOperationException("Querying for known properties before they've been setup"); } if (!this.knownEditors.TryGetValue(property, out EditorViewModel model)) { throw new KeyNotFoundException(); } var vm = model as PropertyViewModel <T>; if (vm == null) { throw new InvalidOperationException("KnownProperty doesn't return expected property view model type"); } return(vm); }
public void Set(int i, KnownProperty property) => Field [i] = property;
public void Set(int x, int y, KnownProperty property) => Set(x + y * SizeX, property);
public virtual string GetKnownPropName(KnownProperty kp) { return(string.Empty); }
public override string GetKnownPropName(KnownProperty kp) { return(knownMap.ContainsKey(kp) ? knownMap [kp] : base.GetKnownPropName(kp)); }