private void EnlistTraceItem(object sender, TraceItemReceivedEventArgs e) { if (!e.SenderAddress.ToString().Equals(_controllerClient.Address)) { return; } if (e.TraceItem.Severity == TraceItemSeverity.Verbose && !ShowVerboseMessages.Value) { return; } if (e.TraceItem.Severity == TraceItemSeverity.Info && !ShowInformations.Value) { return; } if (e.TraceItem.Severity == TraceItemSeverity.Warning && !ShowWarnings.Value) { return; } if (e.TraceItem.Severity == TraceItemSeverity.Error && !ShowErrors.Value) { return; } Application.Current.Dispatcher.Invoke(() => TraceItems.Insert(0, e.TraceItem)); }
private void DoLogout() { var result = MessageBox.Show("Sunteți sigur/ă ca doriți să vă deconectați de la aplicație ?", "Confirmare", MessageBoxButton.YesNo, MessageBoxImage.Question); if (result == MessageBoxResult.Yes) { TraceItems.Clear(); ManageUserLogout(); SetupLayout(UiState.LoggedOut); } }
private void Clear() { TraceItems.Clear(); }