public MessageNavigatorToolWindowControlViewModel(MessageNavigatorToolWindowState state) { try { MyPackage.CmmnEventAggregator.Subscribe(this); ToolWindowState = state; Status = "Ready"; Errors = null; ErrorList = new List <string>(); _scriptGlobals = new ScriptGlobals(ResetCancellationToken()); if (_scriptGlobals.IsSolutionReady) { Initialize(); } else { _scriptGlobals.SolutionReady += OnSolutionReady; } Publications = new ObservableCollection <ItemViewModel>(); Handlers = new ObservableCollection <ItemViewModel>(); } catch (Exception ex) { HandleError(ex); throw; } }
public MessageNavigatorToolWindowControl(MessageNavigatorToolWindowState state) { DataContext = new MessageNavigatorToolWindowControlViewModel(state); InitializeComponent(); }