Наследование: VixenModules.Preview.DisplayPreview.ViewModels.ViewModelBase
Пример #1
0
 private void VisualizerViewClosed(object sender, EventArgs e)
 {
     if (_view != null)
     {
         _view.Closed -= VisualizerViewClosed;
         _view = null;
         _visualizerViewModel = null;
     }
 }
Пример #2
0
		public void DisplaySetupView(DisplayPreviewModuleDataModel dataModel)
		{
			var setupViewModel = new SetupViewModel(dataModel);
			var setupView = new SetupView {DataContext = setupViewModel};
			setupView.ShowDialog();
			if (_view != null) {
				//Ensure current view is using this datamodel
				_visualizerViewModel = new VisualizerViewModel(dataModel.Clone() as DisplayPreviewModuleDataModel);
				_view.DataContext = _visualizerViewModel;
				_view.Focus();
			}
		}
Пример #3
0
		public void StartVisualizer(DisplayPreviewModuleDataModel dataModel)
		{
			if (_view != null) {
				//Ensure current view is using this datamodel
				_visualizerViewModel = new VisualizerViewModel(dataModel.Clone() as DisplayPreviewModuleDataModel);
				_view.DataContext = _visualizerViewModel;
				_view.Focus();
			}
			else {
				_visualizerViewModel = new VisualizerViewModel(dataModel.Clone() as DisplayPreviewModuleDataModel);
				_view = new VisualizerView {DataContext = _visualizerViewModel};
				_view.Closed += VisualizerViewClosed;
				_view.Show();
			}
		}