static void OnPropertyChanged(DependencyObject sender, DependencyPropertyChangedEventArgs e) { TimelineModel model = sender as TimelineModel; string propertyName = e.Property.Name; OnPropertyChanged(model, propertyName); }
private static void OnPropertyChanged(TimelineModel model, string propertyName) { if (propertyName == TimelineModel.SelectionStartPropertyName && model.mainModel.StartTime != model.SelectionStart) { model.mainModel.StartTime = model.SelectionStart; } else if (propertyName == TimelineModel.SelectionEndPropertyName && model.mainModel.StopTime != model.SelectionEnd) { model.mainModel.StopTime = model.SelectionEnd; } if (model.PropertyChanged != null) { model.PropertyChanged(model, new PropertyChangedEventArgs(propertyName)); } }
public MainWindow() { Application.Current.DispatcherUnhandledException += new DispatcherUnhandledExceptionEventHandler(ExceptionHelper.HanldeUnhandledException); this.Model = new MainModel(App.CommandLineArgs, SynchronizationContext.Current); this.logwindow = new LogViewer(); this.logwindow.DataContext = this.Model; ExceptionHelper.logviewer = this.logwindow; this.EventsModel = new EventsModel(); this.FilterModel = new FilterModel(); this.TimelineModel = new TimelineModel(this.Model); this.EventStatsModel = new EventStatsModel(); Instance = this; InitializeComponent(); SystemCommandHandler.Bind(this); this.DataContext = this.Model; this.Loaded += MainWindow_Loaded; }
private static void OnPropertyChanged(TimelineModel model, string propertyName) { if (propertyName == TimelineModel.SelectionStartPropertyName && model.mainModel.StartTime != model.SelectionStart) { model.mainModel.StartTime = model.SelectionStart; } else if (propertyName == TimelineModel.SelectionEndPropertyName && model.mainModel.StopTime != model.SelectionEnd) { model.mainModel.StopTime = model.SelectionEnd; } if (model.PropertyChanged != null) { model.PropertyChanged(model, new PropertyChangedEventArgs(propertyName)); } }