public SetupViewModel(DisplayPreviewModuleDataModel dataModel)
 {
     _dataModel = dataModel;
     AddElementCommand = new RelayCommand(x => AddElement());
     EditElementCommand = new RelayCommand(x => EditDisplayElement(), x => CanEditDisplayElement());
     DeleteElementCommand = new RelayCommand(x => DeleteDisplayElement(), x => CanDeleteDisplayElement());
     SetBackgroundCommand = new RelayCommand(x => SetBackground());
     MoveUpCommand = new RelayCommand(x => MoveUp(), x => CanMoveUp());
     MoveDownCommand = new RelayCommand(x => MoveDown(), x => CanMoveDown());
 }
 public static void StartVisualizer(DisplayPreviewModuleDataModel dataModel)
 {
     if (_view != null)
     {
         _view.Focus();
     }
     else
     {
         _visualizerViewModel = new VisualizerViewModel(dataModel);
         _view = new VisualizerView { DataContext = _visualizerViewModel };
         _view.Closed += VisualizerViewClosed;
         _view.Show();
     }
 }
 public VisualizerViewModel(DisplayPreviewModuleDataModel displayPreviewModuleDataModel)
 {
     _dataModel = displayPreviewModuleDataModel;
 }
 public static void DisplaySetupView(DisplayPreviewModuleDataModel dataModel)
 {
     var setupViewModel = new SetupViewModel(dataModel);
     var setupView = new SetupView { DataContext = setupViewModel };
     setupView.ShowDialog();
 }
 public static void DisplayPreferences(DisplayPreviewModuleDataModel dataModel)
 {
     var viewModel = new PreferencesViewModel(dataModel);
     var view = new PreferencesView { DataContext = viewModel };
     view.ShowDialog();
 }
 public PreferencesViewModel(DisplayPreviewModuleDataModel displayPreviewModuleDataModel)
 {
     _dataModel = displayPreviewModuleDataModel;
 }