public void SetUp() {
     dataLayerMock = mockRepository.StrictMock<IDataLayer>();
     assetCacheMock = mockRepository.StrictMock<IAssetCache>();
     settingsMock = mockRepository.StrictMock<ISettings>();
     viewMock = mockRepository.StrictMock<IWorkitemTreeView>();
     waitCursorStub = mockRepository.Stub<IWaitCursor>();
     eventDispatcherMock = mockRepository.Stub<IEventDispatcher>();
     loggerFactoryMock = mockRepository.DynamicMock<ILoggerFactory>();
     effortTrackingMock = mockRepository.StrictMock<IEffortTracking>();
     loggerFactoryMock.Stub(x => x.GetLogger(null)).IgnoreArguments().Return(mockRepository.Stub<ILogger>());
     configuration = new Configuration();
     Container.Rebind<IDataLayer>().ToConstant(dataLayerMock);
     controller = new WorkitemTreeController(loggerFactoryMock, dataLayerMock, configuration, settingsMock, eventDispatcherMock);
 }
        public ProjectTreeControl(Configuration configuration, ISettings settings, IDataLayer dataLayer, [Named("Projects")] ComponentResolver<IParentWindow> parentWindowResolver) 
                : base(parentWindowResolver, dataLayer) {
            InitializeComponent();

            this.configuration = configuration;
            this.settings = settings;
            this.parentWindowResolver = parentWindowResolver;

            tvProjects.AfterSelect += tvProjects_AfterSelect;
            btnRefresh.Click += btnRefresh_Click;
            
            VisibleChanged += (sender, e) => RefreshProperties();
            CursorChanged += (sender, e) => RefreshProperties();
            Enter += (sender, e) => RefreshProperties();
        }
        public WorkitemTreeControl(Configuration configuration, ISettings settings, IDataLayer dataLayer, [Named("Workitems")] ComponentResolver<IParentWindow> parentWindowResolver) 
                : base(parentWindowResolver, dataLayer) {
            InitializeComponent();

            this.configuration = configuration;
            this.settings = settings;

            btnOnlyMyTasks.Checked = settings.ShowMyTasks;

            tvWorkitems.SelectionChanged += tvWorkitems_SelectionChanged;
            btnSave.Click += toolBtnSave_Click;
            btnRefresh.Click += toolBtnRefresh_Click;
            btnOnlyMyTasks.CheckedChanged += btnShowMyTasks_CheckedChanged;
            
            miSave.Click += miSave_Click;
            miRevert.Click += miRevert_Click;
            miSignup.Click += miSignup_Click;
            miQuickClose.Click += miQuickClose_Click;
            miClose.Click += miClose_Click;
            miNewTask.Click += AddTask_Click;
            miNewDefect.Click += AddDefect_Click;
            miNewTest.Click += AddTest_Click;
            miProperties.Click += miProperties_Click;
            miOpenInVersionOne.Click += miOpenInVersionOne_Click;
            tvWorkitems.ContextMenu.Popup += ContextMenu_Popup;

            btnAddTask.Click += AddTask_Click;
            btnAddDefect.Click += AddDefect_Click;
            btnAddTest.Click += AddTest_Click;

            VisibleChanged += (sender, e) => RefreshProperties();
            CursorChanged += (sender, e) => RefreshProperties();
            Enter += (sender, e) => RefreshProperties();

            waitCursor = GetWaitCursor();

            tvWorkitems.AsyncExpanding = true;
            tvWorkitems.LoadOnDemand = true;
            tvWorkitems.Expanding += tvWorkitems_Expanding;
            tvWorkitems.Expanded += tvWorkitems_Expanded;

            tvWorkitems.KeyDown += tvWorkitems_KeyDown;
        }
 internal TestWorkitemTreeController(ILoggerFactory loggerFactory, IDataLayer dataLayer, Configuration configuration, ISettings settings, IEventDispatcher eventDispatcher)
     : base(loggerFactory, dataLayer, configuration, settings, eventDispatcher) { }
 public WorkitemTreeController(ILoggerFactory loggerFactory, IDataLayer dataLayer, Configuration configuration, ISettings settings, IEventDispatcher eventDispatcher) 
         : base(loggerFactory, dataLayer, settings, eventDispatcher) {
     this.configuration = configuration;
 }
 public StoryTreeModel(WorkitemTreeController controller, Configuration configuration) {
     this.controller = controller;
     this.configuration = configuration;
 }