Extensions

StockSharp.Xaml

扩展课。

方法

ConfigureAsync
public static Task<ConnectorConfigurationResult> ConfigureAsync(BasketMessageAdapter adapter, Window owner, bool autoConnect, SettingsStorage windowSettings, CancellationToken cancellationToken)
result = Extensions.ConfigureAsync(adapter, owner, autoConnect, windowSettings, cancellationToken)

Configure connection using ConnectorWindow.

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

返回值: What the editing ended with: the auto connect value and the ConnectorWindow settings as the window left them.

ConfigureAsync
public static Task<bool> ConfigureAsync(BasketMessageAdapter adapter, Window owner, CancellationToken cancellationToken)
result = Extensions.ConfigureAsync(adapter, owner, cancellationToken)

Configure connection using ConnectorWindow.

adapter
The connection.
owner
UI thread owner.
cancellationToken
CancellationToken

返回值: if the specified connection was configured, otherwise, .

ConfigureAsync
public static Task<bool> ConfigureAsync(Connector connector, Window owner, CancellationToken cancellationToken)
result = Extensions.ConfigureAsync(connector, owner, cancellationToken)

Configure connection using ConnectorWindow.

connector
The connection.
owner
UI thread owner.
cancellationToken
CancellationToken

返回值: 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)

获取指定文件扩展名的图标 。

fileExt
扩展名 。

返回值: 名入道场.

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

装入设置 。

storage
设置存储 。
window
窗口实例 。
GetPriceTextFormat
public static string GetPriceTextFormat(Security security)
result = Extensions.GetPriceTextFormat(security)

生成指定金融工具的价格格式.

security
金融工具。

返回值: 价格格式。

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

Get icon for ProcessState.

strategy
战略。

返回值: 图标名称。

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

Get icon for ProcessStates.

state
ProcessStates.

返回值: 图标名称。

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

生成指定的金融工具的量格式。

security
金融工具。

返回值: 卷出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出出

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

初始化 .

window
命令创建的窗口 。
connector
与交易系统建立联系的阶级.

返回值: 命令创建的窗口 。

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

Load DevExpress control settings.

obj
控制中心 控制中心 控制中心
settings
设置。
LoadLayout
public static void LoadLayout(DockLayoutManager manager, string layout)
Extensions.LoadLayout(manager, layout)

恢复布局状态 。

manager
代表码头和布局物品的容器。
layout
布局编码为字符串 。
RestartAsync
public static Task RestartAsync(Window owner, CancellationToken cancellationToken)
result = Extensions.RestartAsync(owner, cancellationToken)

Restarts the application: closes its main window and starts the application again.

owner
Main window.
cancellationToken
CancellationToken

返回值: Task

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

Save DevExpress control settings.

obj
控制中心 控制中心 控制中心

返回值: 设置。

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

保存布局状态 。

manager
代表码头和布局物品的容器。

返回值: 布局编码为字符串 。

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)

共享文件 。

owner
拥有者.
isNew
是新文件或更新的文件 。
expiresIn
过期时间跨度.
fileName
档案名.
getBody
档案体.
token
取消的代币。
ShowSettingsWindowAsync
public static Task<bool> ShowSettingsWindowAsync(IAsyncPersistable settings, DependencyObject owner, string docUrl, CancellationToken cancellationToken)
result = Extensions.ShowSettingsWindowAsync(settings, owner, docUrl, cancellationToken)

Show SettingsWindow to edit settings.

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

返回值: , if settings were changed, otherwise, .

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

保存设置 。

window
窗口实例 。

返回值: 设置存储 。