private static String GetString(StoredPropertyValueModel Value, String StringFormat, IDictionary<object, string> DictionaryValues)
 {
     return Value.IsValid
                ? GetString(Value.Value, StringFormat, DictionaryValues)
                : string.Format("{0} / {1}",
                                GetString(Value.ValueA, StringFormat, DictionaryValues),
                                GetString(Value.ValueB, StringFormat, DictionaryValues));
 }
Exemple #2
0
 /// <summary>Обновляет значение всех присоединённых свойств</summary>
 /// <param name="NewValue">Новое значение ячейки памяти</param>
 public void UpdateValue(StoredValue NewValue)
 {
     Value = NewValue;
     foreach (PropertyModel property in AttachedProperties.Where(p => p.Placement != null && p.Encoder != null))
     {
         var val =
             new StoredPropertyValueModel(
                 NewValue.ValueA != null ? property.Encoder.Decode(property.Placement.Eject((int)NewValue.ValueA)) : null,
                 NewValue.ValueB != null ? property.Encoder.Decode(property.Placement.Eject((int)NewValue.ValueB)) : null,
                 NewValue.Error);
         property.CurrentValue = val;
     }
 }