public FeatureLogViewModel(IAnalyzeService service) { Messenger.Default.Register <Exception>(this, (exception) => { var sb = new StringBuilder(); sb.AppendLine("Exception:"); sb.AppendLine(exception.Message); sb.AppendLine("Inner exception:"); sb.AppendLine(exception.InnerException != null ? exception.InnerException.Message : string.Empty); System.Windows.MessageBox.Show(sb.ToString()); }); try { _analyzeService = service; _analyzeService.PageSize = 100; Filter = new FilterViewModel(); Users = _analyzeService.GetUsers(); FeatureClasses = _analyzeService.GetFeatureClasses(); CommandApplyFilter = new RelayCommand(ApplyFilter); CommandTakeFirst = new RelayCommand(TakeFirst); CommandTakePrevious = new RelayCommand(TakePrevious); CommandTakeNext = new RelayCommand(TakeNext); CommandTakeLast = new RelayCommand(TakeLast); State = ModifyState.None; DateFrom = DateTime.Now; DateTo = DateTime.Now + new TimeSpan(1, 0, 0, 0); CurrentPage = 0; //LoadObjects(); } catch (Exception ex) { Messenger.Default.Send(ex); } }