C# Класс DataServer.BaseContent

Наследование: PropertyChangedBase, IContent, IComparable, IConvertibleGeoJson, ITextSearchable
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
CalloutActions List
UpdateSensorData bool

Private Properties

Свойство Тип Описание
AppendPropertyToGeoJson void
CheckIcon void
LookupPropertyPoiTypeInPoITypes void
TriggerDeleted void
UppercaseFirst XName
allMedia_CollectionChanged void

Открытые методы

Метод Описание
AddFilter ( string title, string label, string stringvalue = "", double numbervalue ) : Highlight
AddHighlighter ( string title, string label, string stringvalue = "" ) : Highlight

Create a highlighter. Note that you still need to add it to the Style.Analysis.

AddLocalMediaItem ( string pId, string img ) : void
AddMetaInfo ( string title, string source, MetaTypes type = MetaTypes.text, bool searchable = false, bool visibleInCallout = true, string section = "Info", List options = null, double minvalue = Double.NaN, double maxvalue = Double.NaN, string format = null, bool editActive = false, bool canEdit = true ) : MetaInfo

Add meta info to the PoIType.

AddMetaInfo ( string title, MetaTypes type = MetaTypes.text, bool searchable = false, bool callout = true, string section = "Info", List options = null, double minvalue = Double.NaN, double maxvalue = Double.NaN, string format = null, bool editActive = false, bool canEdit = true ) : void

Add meta info to the PoIType.

AddPosition ( Position myPosition, System.DateTime date, bool track = true ) : void
AddSensorData ( string sensor, System.DateTime date, double value, string description = "", bool trigger = true ) : void
CalculateVisible ( double p ) : void
CompareTo ( object obj ) : int
ForceUpdate ( bool triggerLabelChanged = false, bool triggerUpdatePosition = false ) : void

Update the effective style, optionally triggering a label changed and position changed.

FromGeoJson ( Newtonsoft.Json.Linq.JObject geoJsonObject, bool newObject = true ) : IConvertibleGeoJson
FromGeoJson ( string geoJson, bool newObject ) : IConvertibleGeoJson
FromXml ( System.Xml.Linq.XElement element ) : void
FromXml ( System.Xml.Linq.XElement element, string directoryName ) : void
FromXmlBase ( System.Xml.Linq.XElement &res, string directoryName ) : void
GetEffectiveAnalysis ( BaseContent p, AnalysisMetaInfo &a ) : void
GetMetaLabels ( ) : ObservableCollection
IconImageReceived ( string anId, byte content, Service s ) : void
IsVisibleInExtent ( BoundingBox t ) : bool
OnDataChanged ( string key, string old = "", string newvalue = "" ) : void
OnLabelChanged ( string key, string old = "", string newvalue = "" ) : void
Select ( ) : void
SetPosition ( double pLongitude, double pLatitude ) : void
StartRotation ( ) : void
ToGeoJson ( ) : string

Convert the PoI to a GeoJSON string.

ToXml ( ) : XElement
ToXml ( ServiceSettings settings ) : XElement
ToXmlBase ( ServiceSettings settings ) : XElement
TriggerChanged ( ) : void
TriggerItemsLeft ( ) : void
TriggerLabelChanged ( string key, string oldValue = "", string newValue = "" ) : void
TriggerPositionChanged ( ) : void
TriggerUpdated ( bool visibility = true ) : void
TypeFromGeoJson ( JProperty json ) : void
TypeToGeoJson ( ) : string

Convert the type information to JSON format.

UpdateAnalysisStyle ( ) : bool

Recalculate analysis style based on filters. Also resets the effective style.

UpdateEffectiveStyle ( ) : void
UpdateStyle ( BaseContent poiType, bool triggerLabelChanged = false, bool triggerUpdatePosition = false ) : void

Update the PoI's style, optionally triggering a label changed and position changed.

Защищенные методы

Метод Описание
HasChanged ( ) : void

triggers changed event, for syncing content

OnDeleted ( ) : void

Приватные методы

Метод Описание
AppendPropertyToGeoJson ( StringBuilder builder, PropertyInfo property, bool startWithComma = true ) : void
CheckIcon ( ) : void

Check if Icon exists, if not request it from service

LookupPropertyPoiTypeInPoITypes ( ) : void

Look up PoiTypeId in the Service.PoITypes (if found, property PoiType is set)

TriggerDeleted ( ) : void
UppercaseFirst ( XName x ) : XName
allMedia_CollectionChanged ( object sender, NotifyCollectionChangedEventArgs e ) : void

Описание методов

AddFilter() публичный Метод

public AddFilter ( string title, string label, string stringvalue = "", double numbervalue ) : Highlight
title string
label string
stringvalue string
numbervalue double
Результат PoiServer.PoI.Highlight

AddHighlighter() публичный Метод

Create a highlighter. Note that you still need to add it to the Style.Analysis.
public AddHighlighter ( string title, string label, string stringvalue = "" ) : Highlight
title string
label string
stringvalue string
Результат PoiServer.PoI.Highlight

AddLocalMediaItem() публичный Метод

public AddLocalMediaItem ( string pId, string img ) : void
pId string
img string
Результат void

AddMetaInfo() публичный Метод

Add meta info to the PoIType.
public AddMetaInfo ( string title, string source, MetaTypes type = MetaTypes.text, bool searchable = false, bool visibleInCallout = true, string section = "Info", List options = null, double minvalue = Double.NaN, double maxvalue = Double.NaN, string format = null, bool editActive = false, bool canEdit = true ) : MetaInfo
title string Display title
source string Source label
type MetaTypes
searchable bool
visibleInCallout bool
section string
options List
minvalue double
maxvalue double
format string
editActive bool
canEdit bool
Результат MetaInfo

AddMetaInfo() публичный Метод

Add meta info to the PoIType.
public AddMetaInfo ( string title, MetaTypes type = MetaTypes.text, bool searchable = false, bool callout = true, string section = "Info", List options = null, double minvalue = Double.NaN, double maxvalue = Double.NaN, string format = null, bool editActive = false, bool canEdit = true ) : void
title string
type MetaTypes
searchable bool
callout bool
section string
options List
minvalue double
maxvalue double
format string
editActive bool
canEdit bool
Результат void

AddPosition() публичный Метод

public AddPosition ( Position myPosition, System.DateTime date, bool track = true ) : void
myPosition Position
date System.DateTime
track bool
Результат void

AddSensorData() публичный Метод

public AddSensorData ( string sensor, System.DateTime date, double value, string description = "", bool trigger = true ) : void
sensor string
date System.DateTime
value double
description string
trigger bool
Результат void

CalculateVisible() публичный Метод

public CalculateVisible ( double p ) : void
p double
Результат void

CompareTo() публичный Метод

public CompareTo ( object obj ) : int
obj object
Результат int

ForceUpdate() публичный Метод

Update the effective style, optionally triggering a label changed and position changed.
public ForceUpdate ( bool triggerLabelChanged = false, bool triggerUpdatePosition = false ) : void
triggerLabelChanged bool
triggerUpdatePosition bool
Результат void

FromGeoJson() публичный Метод

public FromGeoJson ( Newtonsoft.Json.Linq.JObject geoJsonObject, bool newObject = true ) : IConvertibleGeoJson
geoJsonObject Newtonsoft.Json.Linq.JObject
newObject bool
Результат IConvertibleGeoJson

FromGeoJson() публичный Метод

public FromGeoJson ( string geoJson, bool newObject ) : IConvertibleGeoJson
geoJson string
newObject bool
Результат IConvertibleGeoJson

FromXml() публичный Метод

public FromXml ( System.Xml.Linq.XElement element ) : void
element System.Xml.Linq.XElement
Результат void

FromXml() публичный Метод

public FromXml ( System.Xml.Linq.XElement element, string directoryName ) : void
element System.Xml.Linq.XElement
directoryName string
Результат void

FromXmlBase() публичный Метод

public FromXmlBase ( System.Xml.Linq.XElement &res, string directoryName ) : void
res System.Xml.Linq.XElement
directoryName string
Результат void

GetEffectiveAnalysis() публичный статический Метод

public static GetEffectiveAnalysis ( BaseContent p, AnalysisMetaInfo &a ) : void
p BaseContent
a PoiServer.PoI.AnalysisMetaInfo
Результат void

GetMetaLabels() публичный Метод

public GetMetaLabels ( ) : ObservableCollection
Результат ObservableCollection

HasChanged() защищенный Метод

triggers changed event, for syncing content
protected HasChanged ( ) : void
Результат void

IconImageReceived() публичный Метод

public IconImageReceived ( string anId, byte content, Service s ) : void
anId string
content byte
s Service
Результат void

IsVisibleInExtent() публичный Метод

public IsVisibleInExtent ( BoundingBox t ) : bool
t BoundingBox
Результат bool

OnDataChanged() публичный Метод

public OnDataChanged ( string key, string old = "", string newvalue = "" ) : void
key string
old string
newvalue string
Результат void

OnDeleted() защищенный Метод

protected OnDeleted ( ) : void
Результат void

OnLabelChanged() публичный Метод

public OnLabelChanged ( string key, string old = "", string newvalue = "" ) : void
key string
old string
newvalue string
Результат void

Select() публичный Метод

public Select ( ) : void
Результат void

SetPosition() публичный Метод

public SetPosition ( double pLongitude, double pLatitude ) : void
pLongitude double
pLatitude double
Результат void

StartRotation() публичный Метод

public StartRotation ( ) : void
Результат void

ToGeoJson() публичный Метод

Convert the PoI to a GeoJSON string.
public ToGeoJson ( ) : string
Результат string

ToXml() публичный Метод

public ToXml ( ) : XElement
Результат XElement

ToXml() публичный Метод

public ToXml ( ServiceSettings settings ) : XElement
settings ServiceSettings
Результат XElement

ToXmlBase() публичный Метод

public ToXmlBase ( ServiceSettings settings ) : XElement
settings ServiceSettings
Результат XElement

TriggerChanged() публичный Метод

public TriggerChanged ( ) : void
Результат void

TriggerItemsLeft() публичный Метод

public TriggerItemsLeft ( ) : void
Результат void

TriggerLabelChanged() публичный Метод

public TriggerLabelChanged ( string key, string oldValue = "", string newValue = "" ) : void
key string
oldValue string
newValue string
Результат void

TriggerPositionChanged() публичный Метод

public TriggerPositionChanged ( ) : void
Результат void

TriggerUpdated() публичный Метод

public TriggerUpdated ( bool visibility = true ) : void
visibility bool
Результат void

TypeFromGeoJson() публичный Метод

public TypeFromGeoJson ( JProperty json ) : void
json JProperty
Результат void

TypeToGeoJson() публичный Метод

Convert the type information to JSON format.
public TypeToGeoJson ( ) : string
Результат string

UpdateAnalysisStyle() публичный Метод

Recalculate analysis style based on filters. Also resets the effective style.
public UpdateAnalysisStyle ( ) : bool
Результат bool

UpdateEffectiveStyle() публичный Метод

public UpdateEffectiveStyle ( ) : void
Результат void

UpdateStyle() публичный Метод

Update the PoI's style, optionally triggering a label changed and position changed.
public UpdateStyle ( BaseContent poiType, bool triggerLabelChanged = false, bool triggerUpdatePosition = false ) : void
poiType BaseContent
triggerLabelChanged bool
triggerUpdatePosition bool
Результат void

Описание свойств

CalloutActions публичное свойство

public List CalloutActions
Результат List

UpdateSensorData публичное свойство

public bool UpdateSensorData
Результат bool