public TableBaseM(AbsM.IDataRepositoryM source, object id, int?srid, AbsM.ETableType type) { _source = source; _id = id; _type = type; _srid = srid; _isLayer = srid.HasValue; }
public object Convert(object value, Type targetType, object parameter, CultureInfo culture) { bool isVisible = false; AbsM.ETableType tType = (AbsM.ETableType)(value); switch (parameter.ToString()) { case "GeometryType": { isVisible = (tType == AbsM.ETableType.MapLayer || tType == AbsM.ETableType.View); break; } case "MinObjectSize": { isVisible = (tType == AbsM.ETableType.MapLayer || tType == AbsM.ETableType.View); break; } case "UseBounds": { isVisible = (tType == AbsM.ETableType.MapLayer || tType == AbsM.ETableType.View); break; } case "MinScale": { isVisible = (tType == AbsM.ETableType.MapLayer || tType == AbsM.ETableType.View); break; } case "MaxScale": { isVisible = (tType == AbsM.ETableType.MapLayer || tType == AbsM.ETableType.View); break; } case "UseGraphicUnits": { isVisible = (tType == AbsM.ETableType.MapLayer || tType == AbsM.ETableType.View); break; } case "DefaultVisible": { isVisible = (tType == AbsM.ETableType.MapLayer || tType == AbsM.ETableType.View); break; } case "IsMapStyle": { isVisible = (tType == AbsM.ETableType.Interval || tType == AbsM.ETableType.Catalog); break; } } return(isVisible ? Visibility.Visible : Visibility.Collapsed); }
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { PgM.PgTableBaseM table = (PgM.PgTableBaseM)value; if (table == null) { return(Visibility.Collapsed); } AbsM.ETableType tabletype = table.Type; String par = parameter.ToString(); switch (par) { case "Структура": case "Свойства": { return(Visibility.Visible); } case "Группы": case "Подписи": case "Стили": { if (tabletype == AbsM.ETableType.MapLayer || tabletype == AbsM.ETableType.View) { return(Visibility.Visible); } else { return(Visibility.Collapsed); } } case "Права": { PgM.PgUserM user = (table.Source as PgVM.PgDataRepositoryVM).CurrentUser; if (user == null || user.Type == PgM.UserType.User) { return(Visibility.Collapsed); } else { return(Visibility.Visible); } } case "Индекс": { return(Visibility.Visible); } default: { return(Visibility.Collapsed); } } }
public RastTableBaseM(AbsM.IDataRepositoryM source, int id, string filePath, AbsM.ETableType type) : base(source, id, Convert.ToInt32(Program.srid), type) { FilePath = filePath; ConnectType = FileExtensionConnectTypeBehavior.GetConnectType(filePath); }
public RastTableBaseM(AbsM.IDataRepositoryM source, AbsM.ETableType type) : base(source, Convert.ToInt32(Program.srid), type) { }
public TableBaseM(AbsM.IDataRepositoryM source, int?srid, AbsM.ETableType type) : this(source, 0, srid, type) { _isNewTable = true; }
public VMPTableBaseModel(AbsM.IDataRepositoryM source, String id, AbsM.ETableType type) : base(source, id, Convert.ToInt32(((AbsVM.DataRepositoryVM)source).MapViewer.SRID), type) { }
public PgTableBaseM(AbsM.IDataRepositoryM source, Int32 id, int?srid, AbsM.ETableType type) : base(source, id, srid, type) { _id = id; }
public PgTableBaseM(AbsM.IDataRepositoryM source, int?srid, AbsM.ETableType type) : base(source, srid, type) { }