LogControl
O componente gráfico para a exibição de logs.
Herda de: UserControl
Implementa: ILogListener, IPersistable, IDisposable, IComponentConnector
Construtores
public LogControl()
logControl = LogControl()
Inicializa uma nova instância do LogControl.
Propriedades
public bool AutoResize { get; set; }
value = logControl.AutoResize
logControl.AutoResize = value
Automaticamente para alinhar a largura das colunas pelo conteúdo. O padrão está desligado.
public bool AutoScroll { get; set; }
value = logControl.AutoScroll
logControl.AutoScroll = value
Automaticamente para rolar o controle na última linha adicionada. O padrão está desligado.
public ICommand ClearCommand { get; set; }
value = logControl.ClearCommand
logControl.ClearCommand = value
O comando para limpar os itens de registo.
public string Like { get; set; }
value = logControl.Like
logControl.Like = value
Filtro de texto para as mensagens de registo.
public int MaxItemsCount { get; set; }
value = logControl.MaxItemsCount
logControl.MaxItemsCount = value
O número máximo de entradas a mostrar. O valor - 1 significa uma quantidade ilimitada de registros. Por padrão, os últimos 10000 registros para o processo de 64 bits e 1000 registros para o processo de 32 bits são exibidos.
public LogMessageCollection Messages { get; set; }
value = logControl.Messages
logControl.Messages = value
A colecção de entradas de registo.
public bool ShowDebug { get; set; }
value = logControl.ShowDebug
logControl.ShowDebug = value
Para mostrar mensagens do tipo Depuração. Activado por omissão.
public bool ShowError { get; set; }
value = logControl.ShowError
logControl.ShowError = value
Para mostrar as mensagens do tipo Erro. Activado por omissão.
public bool ShowInfo { get; set; }
value = logControl.ShowInfo
logControl.ShowInfo = value
Para mostrar mensagens do tipo Informação. Activado por omissão.
public bool ShowSourceNameColumn { get; set; }
value = logControl.ShowSourceNameColumn
logControl.ShowSourceNameColumn = value
Para mostrar a coluna com o nome de origem. Activada por omissão.
public bool ShowVerbose { get; set; }
value = logControl.ShowVerbose
logControl.ShowVerbose = value
Para mostrar mensagens do tipo Verbose. Activado por omissão.
public bool ShowWarning { get; set; }
value = logControl.ShowWarning
logControl.ShowWarning = value
Para mostrar mensagens do tipo Aviso. Activado por omissão.
public string TimeFormat { get; set; }
value = logControl.TimeFormat
logControl.TimeFormat = value
Formato para o tempo de conversão em uma string. O formato padrão é yy/MM/dd HH:mm:ss.fff.
Métodos
public static bool GetLogAutoResize(UIElement element)
result = LogControl.GetLogAutoResize(element)
Para obter o valor de AutoResize.
- element
- Objeto LogControl.
Retorna: O valor de AutoResize.
public static bool GetLogAutoScroll(UIElement element)
result = LogControl.GetLogAutoScroll(element)
Para obter o valor de AutoScroll.
- element
- Objeto LogControl.
Retorna: O valor de AutoScroll.
public static int GetLogMaxItemsCount(UIElement element)
result = LogControl.GetLogMaxItemsCount(element)
Para obter o valor de MaxItemsCount.
- element
- Objeto LogControl.
Retorna: O valor de MaxItemsCount.
public static bool GetLogShowSourceNameColumn(UIElement element)
result = LogControl.GetLogShowSourceNameColumn(element)
Para obter o valor de ShowSourceNameColumn.
- element
- Objeto LogControl.
Retorna: O valor de ShowSourceNameColumn.
public void InitializeComponent()
logControl.InitializeComponent()
InitializeComponent
public void Load(SettingsStorage storage)
logControl.Load(storage)
Carregar as configurações.
- storage
- Configuração do armazenamento.
public void Save(SettingsStorage storage)
logControl.Save(storage)
Gravar as definições.
- storage
- Configuração do armazenamento.
public static void SetLogAutoResize(UIElement element, bool value)
LogControl.SetLogAutoResize(element, value)
Para definir o valor para AutoResize.
- element
- Objeto LogControl.
- value
- Novo valor para AutoResize.
public static void SetLogAutoScroll(UIElement element, bool value)
LogControl.SetLogAutoScroll(element, value)
Para definir o valor para AutoScroll.
- element
- Objeto LogControl.
- value
- Novo valor para AutoScroll.
public static void SetLogMaxItemsCount(UIElement element, int value)
LogControl.SetLogMaxItemsCount(element, value)
Para definir o valor para MaxItemsCount.
- element
- Objeto LogControl.
- value
- Novo valor para MaxItemsCount.
public static void SetLogShowSourceNameColumn(UIElement element, bool value)
LogControl.SetLogShowSourceNameColumn(element, value)
Para definir o valor para ShowSourceNameColumn.
- element
- Objeto LogControl.
- value
- Novo valor para ShowSourceNameColumn.
Eventos
public event Action LayoutChanged
logControl.LayoutChanged += handler
O layout mudou o evento.
Campos
public static readonly DependencyProperty AutoResizeProperty
value = LogControl.AutoResizeProperty
DependencyProperty@ para AutoResize.
public static readonly DependencyProperty AutoScrollProperty
value = LogControl.AutoScrollProperty
DependencyProperty@ para AutoScroll.
public static readonly DependencyProperty ClearCommandProperty
value = LogControl.ClearCommandProperty
DependencyProperty@ para ClearCommand.
public static readonly DependencyProperty LogAutoResizeProperty
value = LogControl.LogAutoResizeProperty
DependencyProperty@ para AutoResize.
public static readonly DependencyProperty LogAutoScrollProperty
value = LogControl.LogAutoScrollProperty
DependencyProperty@ para AutoScroll.
public static readonly DependencyProperty LogMaxItemsCountProperty
value = LogControl.LogMaxItemsCountProperty
DependencyProperty@ para MaxItemsCount.
public static readonly DependencyProperty LogShowSourceNameColumnProperty
value = LogControl.LogShowSourceNameColumnProperty
DependencyProperty@ para ShowSourceNameColumn.
public static readonly DependencyProperty MaxItemsCountProperty
value = LogControl.MaxItemsCountProperty
DependencyProperty@ para MaxItemsCount.
public static readonly DependencyProperty MessagesProperty
value = LogControl.MessagesProperty
DependencyProperty para Mensagens.
public static readonly DependencyProperty ShowDebugProperty
value = LogControl.ShowDebugProperty
DependencyProperty@ para ShowDebug.
public static readonly DependencyProperty ShowErrorProperty
value = LogControl.ShowErrorProperty
DependencyProperty@ para ShowError.
public static readonly DependencyProperty ShowInfoProperty
value = LogControl.ShowInfoProperty
DependencyProperty@ para ShowInfo.
public static readonly DependencyProperty ShowSourceNameColumnProperty
value = LogControl.ShowSourceNameColumnProperty
DependencyProperty@ para ShowSourceNameColumn.
public static readonly DependencyProperty ShowVerboseProperty
value = LogControl.ShowVerboseProperty
DependencyProperty@ para ShowVerbose.
public static readonly DependencyProperty ShowWarningProperty
value = LogControl.ShowWarningProperty
DependencyProperty@ para ShowWarning.
public static readonly DependencyProperty TimeFormatProperty
value = LogControl.TimeFormatProperty
DependencyProperty@ para TimeFormat.