C# Class csGeoLayers.Plugins.DemoScript.DemoScript

Inheritance: Caliburn.Micro.PropertyChangedBase, IPlugin
Exibir arquivo Open project: TNOCS/csTouch Class Usage Examples

Public Properties

Property Type Description
DisableClose bool
KeepScriptActive bool
ZoomBack bool

Public Methods

Method Description
AnimateOpacityWindowId ( string id, double posX, double posY, int duration = 2000 ) : void
AnimateWindowId ( string id, double posX, double posY, int duration = 2000 ) : void
AnimateWindowRef ( object vm, double posX, double posY, int duration = 2000 ) : void
CallMethod ( object vm, string method ) : void

Call a method on a viewmodel using reflection

CallMethod ( object vm, string method, object args ) : void

Call a method on a viewmodel using reflection

ChangeMapType ( string maptype ) : void

Change map type

CloseAll ( ) : void

Closes all Floating elements and plugins

CloseAllText ( ) : void

Closes all Floating elements and plugins

CloseOwn ( ) : void

Closes only the floating elements that were created by this app

CloseWindow ( string title ) : void

Closes the window

CloseWindowId ( string id ) : void
CloseWindowRef ( object vm ) : void
DisableCloseAll ( ) : void
DisableTouch ( ) : void

Disable touch / mouse responsiveness to application

DisableZoomBack ( ) : void
EnableCloseAll ( ) : void
EnableTouch ( ) : void

Enable touch / mouse responsiveness to application

EnableZoomBack ( ) : void
GetXResolution ( ) : double
GetYResolution ( ) : double
HidePlugin ( string pluginName ) : void

Hide plugin so it sits on the border again

Init ( ) : void
IsActive ( ) : bool
LockMap ( ) : void
MoveWindowRef ( object vm, double posX, double posY ) : void
OpenImage ( string source, object args = null, string title = "Window", string filetype = "image", double sizeX = 600, double sizeY = 400, double posX = 500, double posY = 500, string id = "", bool border = false, double opacity = 1 ) : object

Tries to open a Floating element by looking in all referenced assemblies for the full namespace of the viewmodel

OpenTemplate ( string text, string image1, string image2, string image3 ) : void

Tries to open a text and accompanying images in a preset way to create uniformity

OpenWebpage ( string source, object args = null, string title = "Window", double sizeX = 600, double sizeY = 400, double posX = 500, double posY = 500, string id = "", bool border = false ) : object

Tries to open a Floating element by looking in all referenced assemblies for the full namespace of the viewmodel

OpenWindow ( string modelName, object args = null, string title = "Window", double sizeX = 600, double sizeY = 400, double posX = 500, double posY = 500, string id = "", bool border = true ) : object

Tries to open a Floating element by looking in all referenced assemblies for the full namespace of the viewmodel

PanTo ( double xmin, double ymin, double xmax, double ymax, int animTime = 3000 ) : void

Zoom to extent

PanToAnimate ( double posX, double posY, int animTime = 3000 ) : void

Zoom to extent

Pause ( ) : void
Pause ( int msecs ) : void

Pause a while

RemoveMapConstraint ( ) : void
SetMapConstraint ( double topleftX = -180, double topleftY = -90, double bottomrightX = 180, double bottomrightY = 90, bool setExtent = false ) : void
SetMapMax ( double maxresolution ) : void
SetMapMin ( double minresolution ) : void
ShowPlugin ( string pluginName, double sizeX = 600, double sizeY = 500, double posX = 500, double posY = 500 ) : void

Shows an already present plugin by changing width / height / position

ShowText ( string text, double margin, double marginLeft = double.NaN, double marginTop = double.NaN, double marginRight = double.NaN, double marginBottom = double.NaN, string background = "#FF641946", string foreground = "White", string horAlign = "Left", string verAlign = "Top", double sizex = double.NaN, double sizey = double.NaN, double fontSize = 40, string fontFamily = "Segoe UI", string textAlignment = "Left", double duration = 5000, bool canbedeleted = true, string script = "" ) : void
Start ( ) : void
StartScript ( ) : void
StartScript ( string file, bool notifyHandler = true ) : void
StartScriptNoNotify ( ) : void
Stop ( ) : void
TriggerScriptCommand ( string command ) : void
WaitForInteraction ( string name, int timeout ) : bool
WaitForInteraction ( int timeout ) : string
ZoomTo ( double xmin, double ymin, double xmax, double ymax, int animTime = 1000, bool effect = false, bool webMercator = false ) : void

Zoom to extent

ZoomToAnimate ( double xmin, double ymin, double xmax, double ymax, int animTime = 200, double nrSteps = 20d ) : void

Private Methods

Method Description
AnimateOpacityWindow ( FloatingElement fe, double posX, double posY, long duration = 2000 ) : void
AnimateWindow ( FloatingElement fe, double posX, double posY, long duration = 2000 ) : void
AppState_InteractionOccurred ( object sender, string name, string command ) : void
AppState_SomeInteractionOccurred ( object sender, string name, string command ) : void

Method Details

AnimateOpacityWindowId() public method

public AnimateOpacityWindowId ( string id, double posX, double posY, int duration = 2000 ) : void
id string
posX double
posY double
duration int
return void

AnimateWindowId() public method

public AnimateWindowId ( string id, double posX, double posY, int duration = 2000 ) : void
id string
posX double
posY double
duration int
return void

AnimateWindowRef() public method

public AnimateWindowRef ( object vm, double posX, double posY, int duration = 2000 ) : void
vm object
posX double
posY double
duration int
return void

CallMethod() public method

Call a method on a viewmodel using reflection
public CallMethod ( object vm, string method ) : void
vm object
method string
return void

CallMethod() public method

Call a method on a viewmodel using reflection
public CallMethod ( object vm, string method, object args ) : void
vm object
method string
args object Arguments of the method
return void

ChangeMapType() public method

Change map type
public ChangeMapType ( string maptype ) : void
maptype string
return void

CloseAll() public method

Closes all Floating elements and plugins
public CloseAll ( ) : void
return void

CloseAllText() public method

Closes all Floating elements and plugins
public CloseAllText ( ) : void
return void

CloseOwn() public method

Closes only the floating elements that were created by this app
public CloseOwn ( ) : void
return void

CloseWindow() public method

Closes the window
public CloseWindow ( string title ) : void
title string
return void

CloseWindowId() public method

public CloseWindowId ( string id ) : void
id string
return void

CloseWindowRef() public method

public CloseWindowRef ( object vm ) : void
vm object
return void

DisableCloseAll() public method

public DisableCloseAll ( ) : void
return void

DisableTouch() public method

Disable touch / mouse responsiveness to application
public DisableTouch ( ) : void
return void

DisableZoomBack() public method

public DisableZoomBack ( ) : void
return void

EnableCloseAll() public method

public EnableCloseAll ( ) : void
return void

EnableTouch() public method

Enable touch / mouse responsiveness to application
public EnableTouch ( ) : void
return void

EnableZoomBack() public method

public EnableZoomBack ( ) : void
return void

GetXResolution() public method

public GetXResolution ( ) : double
return double

GetYResolution() public method

public GetYResolution ( ) : double
return double

HidePlugin() public method

Hide plugin so it sits on the border again
public HidePlugin ( string pluginName ) : void
pluginName string
return void

Init() public method

public Init ( ) : void
return void

IsActive() public method

public IsActive ( ) : bool
return bool

LockMap() public method

public LockMap ( ) : void
return void

MoveWindowRef() public method

public MoveWindowRef ( object vm, double posX, double posY ) : void
vm object
posX double
posY double
return void

OpenImage() public method

Tries to open a Floating element by looking in all referenced assemblies for the full namespace of the viewmodel
public OpenImage ( string source, object args = null, string title = "Window", string filetype = "image", double sizeX = 600, double sizeY = 400, double posX = 500, double posY = 500, string id = "", bool border = false, double opacity = 1 ) : object
source string
args object
title string
filetype string
sizeX double
sizeY double
posX double
posY double
id string
border bool
opacity double
return object

OpenTemplate() public method

Tries to open a text and accompanying images in a preset way to create uniformity
public OpenTemplate ( string text, string image1, string image2, string image3 ) : void
text string
image1 string
image2 string
image3 string
return void

OpenWebpage() public method

Tries to open a Floating element by looking in all referenced assemblies for the full namespace of the viewmodel
public OpenWebpage ( string source, object args = null, string title = "Window", double sizeX = 600, double sizeY = 400, double posX = 500, double posY = 500, string id = "", bool border = false ) : object
source string
args object
title string
sizeX double
sizeY double
posX double
posY double
id string
border bool
return object

OpenWindow() public method

Tries to open a Floating element by looking in all referenced assemblies for the full namespace of the viewmodel
public OpenWindow ( string modelName, object args = null, string title = "Window", double sizeX = 600, double sizeY = 400, double posX = 500, double posY = 500, string id = "", bool border = true ) : object
modelName string
args object
title string
sizeX double
sizeY double
posX double
posY double
id string
border bool
return object

PanTo() public method

Zoom to extent
public PanTo ( double xmin, double ymin, double xmax, double ymax, int animTime = 3000 ) : void
xmin double
ymin double
xmax double
ymax double
animTime int
return void

PanToAnimate() public method

Zoom to extent
public PanToAnimate ( double posX, double posY, int animTime = 3000 ) : void
posX double
posY double
animTime int
return void

Pause() public method

public Pause ( ) : void
return void

Pause() public method

Pause a while
public Pause ( int msecs ) : void
msecs int
return void

RemoveMapConstraint() public method

public RemoveMapConstraint ( ) : void
return void

SetMapConstraint() public method

public SetMapConstraint ( double topleftX = -180, double topleftY = -90, double bottomrightX = 180, double bottomrightY = 90, bool setExtent = false ) : void
topleftX double
topleftY double
bottomrightX double
bottomrightY double
setExtent bool
return void

SetMapMax() public method

public SetMapMax ( double maxresolution ) : void
maxresolution double
return void

SetMapMin() public method

public SetMapMin ( double minresolution ) : void
minresolution double
return void

ShowPlugin() public method

Shows an already present plugin by changing width / height / position
public ShowPlugin ( string pluginName, double sizeX = 600, double sizeY = 500, double posX = 500, double posY = 500 ) : void
pluginName string
sizeX double
sizeY double
posX double
posY double
return void

ShowText() public method

public ShowText ( string text, double margin, double marginLeft = double.NaN, double marginTop = double.NaN, double marginRight = double.NaN, double marginBottom = double.NaN, string background = "#FF641946", string foreground = "White", string horAlign = "Left", string verAlign = "Top", double sizex = double.NaN, double sizey = double.NaN, double fontSize = 40, string fontFamily = "Segoe UI", string textAlignment = "Left", double duration = 5000, bool canbedeleted = true, string script = "" ) : void
text string
margin double
marginLeft double
marginTop double
marginRight double
marginBottom double
background string
foreground string
horAlign string
verAlign string
sizex double
sizey double
fontSize double
fontFamily string
textAlignment string
duration double
canbedeleted bool
script string
return void

Start() public method

public Start ( ) : void
return void

StartScript() public method

public StartScript ( ) : void
return void

StartScript() public method

public StartScript ( string file, bool notifyHandler = true ) : void
file string
notifyHandler bool
return void

StartScriptNoNotify() public method

public StartScriptNoNotify ( ) : void
return void

Stop() public method

public Stop ( ) : void
return void

TriggerScriptCommand() public method

public TriggerScriptCommand ( string command ) : void
command string
return void

WaitForInteraction() public method

public WaitForInteraction ( string name, int timeout ) : bool
name string
timeout int
return bool

WaitForInteraction() public method

public WaitForInteraction ( int timeout ) : string
timeout int
return string

ZoomTo() public method

Zoom to extent
public ZoomTo ( double xmin, double ymin, double xmax, double ymax, int animTime = 1000, bool effect = false, bool webMercator = false ) : void
xmin double
ymin double
xmax double
ymax double
animTime int
effect bool
webMercator bool
return void

ZoomToAnimate() public method

public ZoomToAnimate ( double xmin, double ymin, double xmax, double ymax, int animTime = 200, double nrSteps = 20d ) : void
xmin double
ymin double
xmax double
ymax double
animTime int
nrSteps double
return void

Property Details

DisableClose public_oe property

public bool DisableClose
return bool

KeepScriptActive public_oe property

public bool KeepScriptActive
return bool

ZoomBack public_oe property

public bool ZoomBack
return bool