Exemplo n.º 1
0
        /// <summary>
        /// Write metadata common to all value representations, like properties and method parameters.
        /// </summary>
        private void WriteValueCommonMetadata(TypeScriptCodeBuilder b, IValueViewModel value)
        {
            b.StringProp("name", value.JsVariable);
            b.StringProp("displayName", value.DisplayName);

            WriteTypeCommonMetadata(b, value.Type);
        }
Exemplo n.º 2
0
 void AdjustMinToAvailableMinValues()
 {
     // Check if current min is contained in available min values -> if not select largest available
     _min = AvailableMinItems.FirstOrDefault(item => item.Value.Equals(Min.Value)) ??
            AvailableMinItems.Last();
     RaisePropertyChanged(() => Min);
 }
Exemplo n.º 3
0
 void AdjustMaxToAvailableMaxItems()
 {
     // Check if current max is contained in available max values -> if not select smallest available
     _max = AvailableMaxItems.FirstOrDefault(item => item.Value.Equals(Max.Value)) ??
            AvailableMaxItems.First();
     RaisePropertyChanged(() => Max);
 }
Exemplo n.º 4
0
        public IValueViewModel MakeValue(Value value)
        {
            IValueViewModel valueViewModel = IoC.Get <IValueViewModel>();

            valueViewModel.Initialise(value);

            return(valueViewModel);
        }
Exemplo n.º 5
0
        void DetermineMinAndMaxValuesFrom(GenericRangeFilter <T> genericRangeFilter)
        {
            _min = AvailableMinItems.FirstOrDefault(item => item.Value.Equals(genericRangeFilter.Range.MinValue)) ??
                   AvailableMinItems.First();

            _max = AvailableMaxItems.FirstOrDefault(item => item.Value.Equals(genericRangeFilter.Range.MaxValue)) ??
                   AvailableMaxItems.Last();
        }
Exemplo n.º 6
0
 public int CompareTo(IValueViewModel<T> other)
 {
     return Value.CompareTo(other.Value);
 }
Exemplo n.º 7
0
 internal ValueDeletedEventArgs(IValueViewModel deleted)
 {
     Deleted = deleted;
 }