Beispiel #1
0
 public DebuggerHook(DTE2 applicationObject, AddinController controller, IViewAdapter viewAdapter, IDsmSettingsManager settingsManager)
 {
     _settingsManager = settingsManager;
       _viewAdapter = viewAdapter;
       _controller = controller;
       _applicationObject = applicationObject;
 }
Beispiel #2
0
        public AddinController(ISessionManager sessionManager, IDsmSettingsManager settingsManager, IViewAdapter viewAdapter, IDteAdapter dteAdapter, 
            IExceptionManager exceptionManager)
        {
            _exceptionManager = exceptionManager;
              _viewAdapter = viewAdapter;
              _settingsManager = settingsManager;
              _dteAdapter = dteAdapter;
              _sessionManager = sessionManager;

              if (_sessionManager.CurrentSession != null)
            _selectedSessionName = _sessionManager.CurrentSession.Name;
        }
        /// <summary>
        /// When a change occurs, which is not a property change on a collection item,
        /// but changes the result of a Where() filter
        /// </summary>
        /// <typeparam name="TSource"></typeparam>
        /// <param name="source"></param>
        public static void ReEvaluate <TSource>(this ReadOnlyContinuousCollection <TSource> source)
        {
            LinqContinuousCollection <TSource> collection = source as LinqContinuousCollection <TSource>;

            if (collection == null)
            {
                return;
            }
            List <IViewAdapter> adapterCollection = new List <IViewAdapter>();
            IViewAdapter        adapter           = collection.SourceAdapter;

            while (adapter != null)
            {
                adapterCollection.Add(adapter);
                adapter = adapter.PreviousAdapter;
            }
            adapterCollection.Reverse();
            adapterCollection.ForEach(a => a.ReEvaluate());
        }
Beispiel #4
0
 public DemoWindowWithParamsViewModel(IViewAdapter viewAdapter, DateTime dateTime) : base(viewAdapter)
 {
     this.Title       = "Demo window with params";
     this.WelcomeText = $"Parameter passed to view model: {dateTime.ToString("HH:mm:ss")}";
 }
 public DemoWindowViewModel(IViewAdapter viewAdapter) : base(viewAdapter)
 {
     this.Title       = "Demo window";
     this.WelcomeText = $"Text from view model {DateTime.Now.ToString("HH:mm:ss")}";
 }
        public DemoHandleWindowLoadingViewModel(IViewAdapter viewAdapter, IDateTimeService dateTimeService) : base(viewAdapter)
        {
            this._dateTimeService = dateTimeService;

            this.Title = "Handle window loaded";
        }
 public DemoDialogViewModel(IViewAdapter viewAdapter) : base(viewAdapter)
 {
     this.Title            = "Test dialog";
     this.SetResultCommand = new RelayCommand(this.SetResult, this.CanSetResult);
 }
Beispiel #8
0
 protected DialogViewModelBase(IViewAdapter viewAdapter) : base(viewAdapter)
 {
 }
Beispiel #9
0
        public IViewAdapter GetIViewAdapter(DTE2 dteApplicationObject)
        {
            if (_viewAdapter == null)
            _viewAdapter = new ViewAdapter(GetIDteAdapter(dteApplicationObject), GetIDsmSettingsManager(), GetIExceptionManager());

              return _viewAdapter;
        }
Beispiel #10
0
 /// <summary>
 /// Initializes the <see cref="UIContext"/>.
 /// </summary>
 /// <param name="viewAdapter">The adapter to interact with view elements.</param>
 public static void Initialize(IViewAdapter viewAdapter)
 {
     Initialize(viewAdapter, Environment.CurrentManagedThreadId, SynchronizationContext.Current, TaskScheduler.FromCurrentSynchronizationContext());
 }
Beispiel #11
0
 public DemoHandleWindowClosingViewModel(IViewAdapter viewAdapter) : base(viewAdapter)
 {
     this.Title = "Prevent closing window demo";
 }
 protected ClosableViewModelBase(IViewAdapter viewAdapter) : base(viewAdapter)
 {
     this.State        = ViewModelState.Open;
     this.CloseCommand = new RelayCommand(this.Close, this.CanClose);
 }
Beispiel #13
0
 public void SetAdapter(IViewAdapter adapter)
 {
     _adapter = adapter;
 }
Beispiel #14
0
        public AddinController(ISessionManager sessionManager, IDsmSettingsManager settingsManager, IViewAdapter viewAdapter, IDteAdapter dteAdapter,
                               IExceptionManager exceptionManager)
        {
            _exceptionManager = exceptionManager;
            _viewAdapter      = viewAdapter;
            _settingsManager  = settingsManager;
            _dteAdapter       = dteAdapter;
            _sessionManager   = sessionManager;

            if (_sessionManager.CurrentSession != null)
            {
                _selectedSessionName = _sessionManager.CurrentSession.Name;
            }
        }
Beispiel #15
0
 protected WindowViewModelBase(IViewAdapter viewAdapter) : base(viewAdapter)
 {
 }