public ConnectionManagerControl(IServiceContainer services)
        {
            InitializeComponent();

            _theme = services.GetService <IThemeUtilities>();
            var ui = services.UI();

            ui.UIThemeChanged += OnThemeChanged;
            SetImageBackground();

            ViewModel = new ConnectionManagerViewModel(services);
            _disposable
            .Add(ViewModel)
            .Add(() => ui.UIThemeChanged -= OnThemeChanged);
            DataContext = ViewModel;
        }
Beispiel #2
0
 public ConnectionManagerViewModelTest(IServiceContainer services)
 {
     _workflow = services.GetService <IRInteractiveWorkflowProvider>().GetOrCreate();
     _cmvc     = UIThreadHelper.Instance.Invoke(() => _workflow.Connections.GetOrCreateVisualComponent());
     _cmvm     = UIThreadHelper.Instance.Invoke(() => (ConnectionManagerViewModel)_cmvc.Control.DataContext);
 }
Beispiel #3
0
 public ConnectionManager(List <CrmConnection> connections)
 {
     InitializeComponent();
     this._viewModel = LayoutRoot.Resources["viewModel"] as ConnectionManagerViewModel;
     _viewModel.Initialize(this, connections);
 }
 public ConnectionManagerViewModelTest(IExportProvider exportProvider)
 {
     _workflow = exportProvider.GetExportedValue <IRInteractiveWorkflowProvider>().GetOrCreate();
     _cmvc     = UIThreadHelper.Instance.Invoke(() => _workflow.Connections.GetOrCreateVisualComponent());
     _cmvm     = UIThreadHelper.Instance.Invoke(() => (ConnectionManagerViewModel)_cmvc.Control.DataContext);
 }
Beispiel #5
0
 public ConnectionManagerViewModelTest(IServiceContainer services)
 {
     _workflow = services.GetService <IRInteractiveWorkflowProvider>().GetOrCreate();
     _cmvc     = (TestToolWindow)UIThreadHelper.Instance.Invoke(() => ((IRInteractiveWorkflowVisual)_workflow).ToolWindows.Connections());
     _cmvm     = (ConnectionManagerViewModel)_cmvc.ViewModel;
 }