C# Class DataServer.BaseContent

Inheritance: PropertyChangedBase, IContent, IComparable, IConvertibleGeoJson, ITextSearchable
Afficher le fichier Open project: TNOCS/csTouch Class Usage Examples

Méthodes publiques

Свойство Type Description
CalloutActions List
UpdateSensorData bool

Private Properties

Свойство Type Description
AppendPropertyToGeoJson void
CheckIcon void
LookupPropertyPoiTypeInPoITypes void
TriggerDeleted void
UppercaseFirst XName
allMedia_CollectionChanged void

Méthodes publiques

Méthode Description
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.

Méthodes protégées

Méthode Description
HasChanged ( ) : void

triggers changed event, for syncing content

OnDeleted ( ) : void

Private Methods

Méthode Description
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

Method Details

AddFilter() public méthode

public AddFilter ( string title, string label, string stringvalue = "", double numbervalue ) : Highlight
title string
label string
stringvalue string
numbervalue double
Résultat PoiServer.PoI.Highlight

AddHighlighter() public méthode

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
Résultat PoiServer.PoI.Highlight

AddLocalMediaItem() public méthode

public AddLocalMediaItem ( string pId, string img ) : void
pId string
img string
Résultat void

AddMetaInfo() public méthode

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
Résultat MetaInfo

AddMetaInfo() public méthode

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
Résultat void

AddPosition() public méthode

public AddPosition ( Position myPosition, System.DateTime date, bool track = true ) : void
myPosition Position
date System.DateTime
track bool
Résultat void

AddSensorData() public méthode

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
Résultat void

CalculateVisible() public méthode

public CalculateVisible ( double p ) : void
p double
Résultat void

CompareTo() public méthode

public CompareTo ( object obj ) : int
obj object
Résultat int

ForceUpdate() public méthode

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
Résultat void

FromGeoJson() public méthode

public FromGeoJson ( Newtonsoft.Json.Linq.JObject geoJsonObject, bool newObject = true ) : IConvertibleGeoJson
geoJsonObject Newtonsoft.Json.Linq.JObject
newObject bool
Résultat IConvertibleGeoJson

FromGeoJson() public méthode

public FromGeoJson ( string geoJson, bool newObject ) : IConvertibleGeoJson
geoJson string
newObject bool
Résultat IConvertibleGeoJson

FromXml() public méthode

public FromXml ( System.Xml.Linq.XElement element ) : void
element System.Xml.Linq.XElement
Résultat void

FromXml() public méthode

public FromXml ( System.Xml.Linq.XElement element, string directoryName ) : void
element System.Xml.Linq.XElement
directoryName string
Résultat void

FromXmlBase() public méthode

public FromXmlBase ( System.Xml.Linq.XElement &res, string directoryName ) : void
res System.Xml.Linq.XElement
directoryName string
Résultat void

GetEffectiveAnalysis() public static méthode

public static GetEffectiveAnalysis ( BaseContent p, AnalysisMetaInfo &a ) : void
p BaseContent
a PoiServer.PoI.AnalysisMetaInfo
Résultat void

GetMetaLabels() public méthode

public GetMetaLabels ( ) : ObservableCollection
Résultat ObservableCollection

HasChanged() protected méthode

triggers changed event, for syncing content
protected HasChanged ( ) : void
Résultat void

IconImageReceived() public méthode

public IconImageReceived ( string anId, byte content, Service s ) : void
anId string
content byte
s Service
Résultat void

IsVisibleInExtent() public méthode

public IsVisibleInExtent ( BoundingBox t ) : bool
t BoundingBox
Résultat bool

OnDataChanged() public méthode

public OnDataChanged ( string key, string old = "", string newvalue = "" ) : void
key string
old string
newvalue string
Résultat void

OnDeleted() protected méthode

protected OnDeleted ( ) : void
Résultat void

OnLabelChanged() public méthode

public OnLabelChanged ( string key, string old = "", string newvalue = "" ) : void
key string
old string
newvalue string
Résultat void

Select() public méthode

public Select ( ) : void
Résultat void

SetPosition() public méthode

public SetPosition ( double pLongitude, double pLatitude ) : void
pLongitude double
pLatitude double
Résultat void

StartRotation() public méthode

public StartRotation ( ) : void
Résultat void

ToGeoJson() public méthode

Convert the PoI to a GeoJSON string.
public ToGeoJson ( ) : string
Résultat string

ToXml() public méthode

public ToXml ( ) : XElement
Résultat XElement

ToXml() public méthode

public ToXml ( ServiceSettings settings ) : XElement
settings ServiceSettings
Résultat XElement

ToXmlBase() public méthode

public ToXmlBase ( ServiceSettings settings ) : XElement
settings ServiceSettings
Résultat XElement

TriggerChanged() public méthode

public TriggerChanged ( ) : void
Résultat void

TriggerItemsLeft() public méthode

public TriggerItemsLeft ( ) : void
Résultat void

TriggerLabelChanged() public méthode

public TriggerLabelChanged ( string key, string oldValue = "", string newValue = "" ) : void
key string
oldValue string
newValue string
Résultat void

TriggerPositionChanged() public méthode

public TriggerPositionChanged ( ) : void
Résultat void

TriggerUpdated() public méthode

public TriggerUpdated ( bool visibility = true ) : void
visibility bool
Résultat void

TypeFromGeoJson() public méthode

public TypeFromGeoJson ( JProperty json ) : void
json JProperty
Résultat void

TypeToGeoJson() public méthode

Convert the type information to JSON format.
public TypeToGeoJson ( ) : string
Résultat string

UpdateAnalysisStyle() public méthode

Recalculate analysis style based on filters. Also resets the effective style.
public UpdateAnalysisStyle ( ) : bool
Résultat bool

UpdateEffectiveStyle() public méthode

public UpdateEffectiveStyle ( ) : void
Résultat void

UpdateStyle() public méthode

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
Résultat void

Property Details

CalloutActions public_oe property

public List CalloutActions
Résultat List

UpdateSensorData public_oe property

public bool UpdateSensorData
Résultat bool