Extensions

StockSharp.Xaml

Extension class.

Methods

Configure
public static bool Configure(BasketMessageAdapter adapter, Window owner, bool autoConnect, SettingsStorage windowSettings)
result = Extensions.Configure(adapter, owner, autoConnect, windowSettings)

Configure connection using ConnectorWindow.

adapter
The connection.
owner
UI thread owner.
autoConnect
Auto connect.
windowSettings
ConnectorWindow settings.

Returns: if the specified connection was configured, otherwise, .

Configure
public static bool Configure(BasketMessageAdapter adapter, Window owner)
result = Extensions.Configure(adapter, owner)

Configure connection using ConnectorWindow.

adapter
The connection.
owner
UI thread owner.

Returns: if the specified connection was configured, otherwise, .

Configure
public static bool Configure(Connector connector, Window owner)
result = Extensions.Configure(connector, owner)

Configure connection using ConnectorWindow.

connector
The connection.
owner
UI thread owner.

Returns: if the specified connection was configured, otherwise, .

ExcludeAllSecurity
public static void ExcludeAllSecurity(SecurityPicker picker)
Extensions.ExcludeAllSecurity(picker)

Exclude AllSecurity.

picker
SecurityPicker.
ExtToLogo
public static string ExtToLogo(string fileExt)
result = Extensions.ExtToLogo(fileExt)

Get icon for the specified file extension.

fileExt
File extension.

Returns: Logo name.

FromStorage
public static void FromStorage(SettingsStorage storage, Window window)
Extensions.FromStorage(storage, window)

Load settings.

storage
Settings storage.
window
Window instance.
GetPriceTextFormat
public static string GetPriceTextFormat(Security security)
result = Extensions.GetPriceTextFormat(security)

Generate price format for the specified security.

security
Security.

Returns: Price format.

GetProcessStateIconName
public static string GetProcessStateIconName(Strategy strategy)
result = Extensions.GetProcessStateIconName(strategy)

Get icon for ProcessState.

strategy
Strategy.

Returns: Icon name.

GetProcessStateIconName
public static string GetProcessStateIconName(ProcessStates state)
result = Extensions.GetProcessStateIconName(state)

Get icon for ProcessStates.

state
ProcessStates.

Returns: Icon name.

GetVolumeTextFormat
public static string GetVolumeTextFormat(Security security)
result = Extensions.GetVolumeTextFormat(security)

Generate volume format for the specified security.

security
Security.

Returns: Volume format.

Init
public static OrderWindow Init(OrderWindow window, Connector connector)
result = Extensions.Init(window, connector)

Initialize .

window
The window for the order creating.
connector
The class to create connections to trading systems.

Returns: The window for the order creating.

LoadDevExpressControl
public static void LoadDevExpressControl(DependencyObject obj, string settings)
Extensions.LoadDevExpressControl(obj, settings)

Load DevExpress control settings.

obj
Control.
settings
Settings.
LoadLayout
public static void LoadLayout(DockLayoutManager manager, string layout)
Extensions.LoadLayout(manager, layout)

Restore layout state.

manager
Represents a container for dock and layout items.
layout
Layout encoded as a string.
Restart
public static void Restart(Window owner)
Extensions.Restart(owner)

Start application.

owner
Main window.
SaveDevExpressControl
public static string SaveDevExpressControl(DependencyObject obj)
result = Extensions.SaveDevExpressControl(obj)

Save DevExpress control settings.

obj
Control.

Returns: Settings.

SaveLayout
public static string SaveLayout(DockLayoutManager manager)
result = Extensions.SaveLayout(manager)

Save layout state.

manager
Represents a container for dock and layout items.

Returns: Layout encoded as a string.

ShareAsync
public static Task ShareAsync(DependencyObject owner, bool isNew, TimeSpan? expiresIn, string fileName, Func<Stream> getBody, CancellationToken token)
result = Extensions.ShareAsync(owner, isNew, expiresIn, fileName, getBody, token)

Share file.

owner
Owner.
isNew
Is file newly or updated.
expiresIn
Expiration time span.
fileName
File name.
getBody
File body.
token
Cancelation token.
ShowSettingsWindow``1
public static bool ShowSettingsWindow<TSettings>(TSettings settings, DependencyObject owner, string docUrl)
result = Extensions.ShowSettingsWindow(settings, owner, docUrl)

Show SettingsWindow to edit settings.

settings
Settings.
owner
UI thread owner.
docUrl
Documentation URL.

Returns: , if settings were changed, otherwise, .

ToStorage
public static SettingsStorage ToStorage(Window window)
result = Extensions.ToStorage(window)

Save settings.

window
Window instance.

Returns: Settings storage.