Class LogControl
Графический компонент для отображения логов.
Namespace: StockSharp.Xaml
Assembly: StockSharp.Xaml.dll
Syntax
public class LogControl : UserControl, IComponentConnector, IDisposable, ILogListener, IPersistable, IDisposable
Constructors
LogControl()
Создать LogControl.
Declaration
public LogControl()
Fields
AutoResizeProperty
Declaration
public static readonly DependencyProperty AutoResizeProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
AutoScrollProperty
Declaration
public static readonly DependencyProperty AutoScrollProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
ClearCommandProperty
Declaration
public static readonly DependencyProperty ClearCommandProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
LogAutoResizeProperty
Declaration
public static readonly DependencyProperty LogAutoResizeProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
LogAutoScrollProperty
Declaration
public static readonly DependencyProperty LogAutoScrollProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
LogMaxItemsCountProperty
Declaration
public static readonly DependencyProperty LogMaxItemsCountProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
LogShowSourceNameColumnProperty
Declaration
public static readonly DependencyProperty LogShowSourceNameColumnProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
MaxItemsCountProperty
Declaration
public static readonly DependencyProperty MaxItemsCountProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
MessagesProperty
Declaration
public static readonly DependencyProperty MessagesProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
ShowDebugProperty
Declaration
public static readonly DependencyProperty ShowDebugProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
ShowErrorProperty
Declaration
public static readonly DependencyProperty ShowErrorProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
ShowInfoProperty
Declaration
public static readonly DependencyProperty ShowInfoProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
ShowSourceNameColumnProperty
Declaration
public static readonly DependencyProperty ShowSourceNameColumnProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
ShowVerboseProperty
Declaration
public static readonly DependencyProperty ShowVerboseProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
ShowWarningProperty
Declaration
public static readonly DependencyProperty ShowWarningProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
TimeFormatProperty
Declaration
public static readonly DependencyProperty TimeFormatProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
Properties
AutoResize
Автоматически выравнивать ширину колонок по содержимому. По умолчанию выключено.
Declaration
public bool AutoResize { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
AutoScroll
Автоматически скроллировать контрол на последнюю добавленную строку. По умолчанию выключено.
Declaration
public bool AutoScroll { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
ClearCommand
Команда на очистку лога.
Declaration
public ICommand ClearCommand { get; set; }
Property Value
Type | Description |
---|---|
ICommand |
Like
Текстовый фильтр для лог сообщений.
Declaration
public string Like { get; set; }
Property Value
Type | Description |
---|---|
String |
MaxItemsCount
Максимальное число записей для отображения. Значение -1 обозначает бесконечный объем записей. По умолчанию отображается последние 10000 записей для 64 битного процесса и 1000 записей для 32 битного процесса.
Declaration
public int MaxItemsCount { get; set; }
Property Value
Type | Description |
---|---|
Int32 |
Messages
Коллекция лог-записей.
Declaration
public LogMessageCollection Messages { get; set; }
Property Value
Type | Description |
---|---|
LogMessageCollection |
ShowDebug
Показывать сообщения типа Debug. По умолчанию включено.
Declaration
public bool ShowDebug { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
ShowError
Показывать сообщения типа Error. По умолчанию включено.
Declaration
public bool ShowError { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
ShowInfo
Показывать сообщения типа Info. По умолчанию включено.
Declaration
public bool ShowInfo { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
ShowSourceNameColumn
Показывать столбец с названием источника. По умолчанию включено.
Declaration
public bool ShowSourceNameColumn { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
ShowVerbose
Показывать сообщения типа Verbose. По умолчанию включено.
Declaration
public bool ShowVerbose { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
ShowWarning
Показывать сообщения типа Warning. По умолчанию включено.
Declaration
public bool ShowWarning { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
TimeFormat
Формат конвертирования времени в строку. По умолчанию формат равен yy/MM/dd HH:mm:ss.fff.
Declaration
public string TimeFormat { get; set; }
Property Value
Type | Description |
---|---|
String |
Methods
GetLogAutoResize(UIElement)
Получить значение для AutoResize.
Declaration
public static bool GetLogAutoResize(UIElement element)
Parameters
Type | Name | Description |
---|---|---|
UIElement | element | Объект LogControl. |
Returns
Type | Description |
---|---|
Boolean | Значение AutoResize. |
GetLogAutoScroll(UIElement)
Получить значение для AutoScroll.
Declaration
public static bool GetLogAutoScroll(UIElement element)
Parameters
Type | Name | Description |
---|---|---|
UIElement | element | Объект LogControl. |
Returns
Type | Description |
---|---|
Boolean | Значение AutoScroll. |
GetLogMaxItemsCount(UIElement)
Получить значение для MaxItemsCount.
Declaration
public static int GetLogMaxItemsCount(UIElement element)
Parameters
Type | Name | Description |
---|---|---|
UIElement | element | Объект LogControl. |
Returns
Type | Description |
---|---|
Int32 | Значение MaxItemsCount. |
GetLogShowSourceNameColumn(UIElement)
Получить значение для ShowSourceNameColumn.
Declaration
public static bool GetLogShowSourceNameColumn(UIElement element)
Parameters
Type | Name | Description |
---|---|---|
UIElement | element | Объект LogControl. |
Returns
Type | Description |
---|---|
Boolean | Значение ShowSourceNameColumn. |
InitializeComponent()
InitializeComponent
Declaration
public void InitializeComponent()
Load(SettingsStorage)
Загрузить настройки.
Declaration
public void Load(SettingsStorage storage)
Parameters
Type | Name | Description |
---|---|---|
Ecng.Serialization.SettingsStorage | storage | Хранилище настроек. |
Save(SettingsStorage)
Сохранить настройки.
Declaration
public void Save(SettingsStorage storage)
Parameters
Type | Name | Description |
---|---|---|
Ecng.Serialization.SettingsStorage | storage | Хранилище настроек. |
SetLogAutoResize(UIElement, Boolean)
Установить значение для AutoResize.
Declaration
public static void SetLogAutoResize(UIElement element, bool value)
Parameters
Type | Name | Description |
---|---|---|
UIElement | element | Объект LogControl. |
Boolean | value | Новое значение для AutoResize. |
SetLogAutoScroll(UIElement, Boolean)
Установить значение для AutoScroll.
Declaration
public static void SetLogAutoScroll(UIElement element, bool value)
Parameters
Type | Name | Description |
---|---|---|
UIElement | element | Объект LogControl. |
Boolean | value | Новое значение для AutoScroll. |
SetLogMaxItemsCount(UIElement, Int32)
Установить значение для MaxItemsCount.
Declaration
public static void SetLogMaxItemsCount(UIElement element, int value)
Parameters
Type | Name | Description |
---|---|---|
UIElement | element | Объект LogControl. |
Int32 | value | Новое значение для MaxItemsCount. |
SetLogShowSourceNameColumn(UIElement, Boolean)
Установить значение для ShowSourceNameColumn.
Declaration
public static void SetLogShowSourceNameColumn(UIElement element, bool value)
Parameters
Type | Name | Description |
---|---|---|
UIElement | element | Объект LogControl. |
Boolean | value | Новое значение для ShowSourceNameColumn. |
Events
LayoutChanged
Событие изменения разметки.
Declaration
public event Action LayoutChanged
Event Type
Type | Description |
---|---|
Action |