Exemple #1
0
		private void VisualizerViewClosed(object sender, EventArgs e)
		{
			if (_view != null) {
				_view.Closed -= VisualizerViewClosed;
				_view = null;
				_visualizerViewModel = null;
			}
		}
Exemple #2
0
 private void VisualizerViewClosed(object sender, EventArgs e)
 {
     if (_view != null)
     {
         _view.Closed        -= VisualizerViewClosed;
         _view                = null;
         _visualizerViewModel = null;
     }
 }
Exemple #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();
			}
		}
Exemple #4
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();
     }
 }