Пример #1
0
        public AnnotationsWindow(IAnnotationsController annotationsController,
                                 ISourceCodeController sourceCodeController)
        {
            this.annotationsController = annotationsController;
            this.sourceCodeController  = sourceCodeController;

            InitializeComponent();

            annotationsController.PropertyChanged += (s, e) =>
            {
                if (e.PropertyName == "Annotations")
                {
                    PopulateListView();
                }
            };

            showErrorsToolStripButton.Click += (s, e) => annotationsController.ShowErrors(showErrorsToolStripButton.Checked);
            showErrorsToolStripButton.DataBindings.Add("Text", annotationsController, "ErrorsText");

            showWarningsToolStripButton.Click += (s, e) => annotationsController.ShowWarnings(showWarningsToolStripButton.Checked);
            showWarningsToolStripButton.DataBindings.Add("Text", annotationsController, "WarningsText");

            showInfoToolStripButton.Click += (s, e) => annotationsController.ShowInfos(showInfoToolStripButton.Checked);
            showInfoToolStripButton.DataBindings.Add("Text", annotationsController, "InfoText");
        }
Пример #2
0
        public void SetUp()
        {
            windowManager = MockRepository.GenerateStub <IWindowManager>();
            windowManager.Stub(wm => wm.Register(Arg <string> .Is.Anything, Arg <Action> .Is.Anything, Arg <Location> .Is.Anything))
            .Do((Action <string, Action, Location>)((i, a, l) => a()));

            menuManager = MockRepository.GenerateStub <IMenuManager>();
            windowManager.Stub(wm => wm.MenuManager).Return(menuManager);

            annotationsController = MockRepository.GenerateStub <IAnnotationsController>();

            sourceCodeController = MockRepository.GenerateStub <ISourceCodeController>();

            annotationsPackage = new AnnotationsPackage(windowManager, annotationsController, sourceCodeController);
        }
        public void SetUp()
        {
            windowManager = MockRepository.GenerateStub<IWindowManager>();
            windowManager.Stub(wm => wm.Register(Arg<string>.Is.Anything, Arg<Action>.Is.Anything, Arg<Location>.Is.Anything))
                .Do((Action<string, Action, Location>)((i, a, l) => a()));

            menuManager = MockRepository.GenerateStub<IMenuManager>();
            windowManager.Stub(wm => wm.MenuManager).Return(menuManager);

            annotationsController = MockRepository.GenerateStub<IAnnotationsController>();

            sourceCodeController = MockRepository.GenerateStub<ISourceCodeController>();

            annotationsPackage = new AnnotationsPackage(windowManager, annotationsController, sourceCodeController);
        }
Пример #4
0
        public AnnotationsWindow(IAnnotationsController annotationsController, 
            ISourceCodeController sourceCodeController)
        {
            this.annotationsController = annotationsController;
            this.sourceCodeController = sourceCodeController;
            
            InitializeComponent();

            annotationsController.PropertyChanged += (s, e) =>
            {
                if (e.PropertyName == "Annotations")
                    PopulateListView();
            };

            showErrorsToolStripButton.Click += (s, e) => annotationsController.ShowErrors(showErrorsToolStripButton.Checked);
            showErrorsToolStripButton.DataBindings.Add("Text", annotationsController, "ErrorsText");

            showWarningsToolStripButton.Click += (s, e) => annotationsController.ShowWarnings(showWarningsToolStripButton.Checked);
            showWarningsToolStripButton.DataBindings.Add("Text", annotationsController, "WarningsText");

            showInfoToolStripButton.Click += (s, e) => annotationsController.ShowInfos(showInfoToolStripButton.Checked);
            showInfoToolStripButton.DataBindings.Add("Text", annotationsController, "InfoText");
        }
Пример #5
0
     public AnnotationsPackage(IWindowManager windowManager, IAnnotationsController annotationsController, ISourceCodeController sourceCodeController)
 	{
 	    this.windowManager = windowManager;
 	    this.annotationsController = annotationsController;
 	    this.sourceCodeController = sourceCodeController;
 	}
Пример #6
0
 public AnnotationsPackage(IWindowManager windowManager, IAnnotationsController annotationsController, ISourceCodeController sourceCodeController)
 {
     this.windowManager         = windowManager;
     this.annotationsController = annotationsController;
     this.sourceCodeController  = sourceCodeController;
 }