Beispiel #1
0
        public override bool Convert(object val, Type targetType, object parameter, CultureInfo culture, out object result)
        {
            ItemsList      mediaList  = val as ItemsList;
            VisibilityEnum visibility = mediaList != null && mediaList.Count > 0 ? VisibilityEnum.Visible : VisibilityEnum.Collapsed;

            result = TypeConverter.Convert(visibility, targetType);
            return(true);
        }
Beispiel #2
0
 public bool Equals(VisibilityEnum obj)
 {
     if ((object)obj == null)
     {
         return(false);
     }
     return(StringComparer.OrdinalIgnoreCase.Equals(this.Value, obj.Value));
 }
            public static dynamic GetTSObject(VisibilityEnum dynEnum)
            {
                var tsType = TSActivator.CreateInstance("Tekla.Structures.Model.ReferenceModel.VisibilityEnum").GetType();

                switch (dynEnum)
                {
                case VisibilityEnum.HIDDEN:
                    return(System.Enum.Parse(tsType, "HIDDEN"));

                case VisibilityEnum.VISIBLE:
                    return(System.Enum.Parse(tsType, "VISIBLE"));

                default:
                    throw new DynamicAPIException(dynEnum.ToString() + "- enum value is not implemented");
                }
            }
Beispiel #4
0
 public void setVisibility(VisibilityEnum visibility)
 {
     throw new global::System.NotImplementedException("Variable.SetVisibility");
 }