public void Setup()
        {
            mr              = new MockRepository();
            services        = new ServiceContainer();
            declarationForm = mr.Stub <IDeclarationForm>();
            textBox         = new FakeTextBox();
            declarationForm.Stub(f => f.TextBox).Return(textBox);
            declarationForm.Stub(f => f.ShowAt(new Point()));
            declarationForm.Stub(f => f.Hide());
            declarationForm.Stub(f => f.Dispose());
            var dlgFactory = mr.Stub <IDialogFactory>();

            dlgFactory.Stub(f => f.CreateDeclarationForm()).Return(declarationForm);
            services.AddService <IDialogFactory>(dlgFactory);
            mr.ReplayAll();
            interactor = new DeclarationFormInteractor(services);
            var mem        = new MemoryArea(Address32.Ptr32(0x10), new byte[40]);
            var seg        = new ImageSegment(".text", mem, AccessMode.ReadWrite);
            var segmentMap = new SegmentMap(Address32.Ptr32(0x05), seg);
            var arch       = new X86ArchitectureFlat32();
            var platform   = new Win32Platform(null, arch);

            program          = new Program(segmentMap, arch, platform);
            program.ImageMap = segmentMap.CreateImageMap();
        }
Beispiel #2
0
        private void CreateCommentForm()
        {
            var dlgFactory = services.RequireService <IDialogFactory>();

            this.commentForm = dlgFactory.CreateCommentForm();

            commentForm.TextBox.LostFocus += Text_LostFocus;
            commentForm.TextBox.KeyDown   += Text_KeyDown;
        }
        private void CreateDeclarationForm()
        {
            var dlgFactory = services.RequireService<IDialogFactory>();
            this.declarationForm = dlgFactory.CreateDeclarationForm();

            declarationForm.TextBox.LostFocus += text_LostFocus;
            declarationForm.TextBox.TextChanged += text_TextChanged;
            declarationForm.TextBox.KeyDown += text_KeyDown;
        }
Beispiel #4
0
        private void CreateDeclarationForm()
        {
            var dlgFactory = services.RequireService <IDialogFactory>();

            this.declarationForm = dlgFactory.CreateDeclarationForm();

            declarationForm.TextBox.LostFocus   += text_LostFocus;
            declarationForm.TextBox.TextChanged += text_TextChanged;
            declarationForm.TextBox.KeyDown     += text_KeyDown;
        }
        public void Setup()
        {
            mr          = new MockRepository();
            services    = new ServiceContainer();
            commentForm = mr.Stub <IDeclarationForm>();
            textBox     = new FakeTextBox();
            commentForm.Stub(f => f.TextBox).Return(textBox);
            commentForm.Stub(f => f.ShowAt(new Point()));
            commentForm.Stub(f => f.Hide());
            commentForm.Stub(f => f.Dispose());
            var dlgFactory = mr.Stub <IDialogFactory>();

            dlgFactory
            .Stub(f => f.CreateCommentForm())
            .Return(commentForm);
            services.AddService <IDialogFactory>(dlgFactory);
            mr.ReplayAll();
            interactor = new CommentFormInteractor(services);
            program    = new Program();
        }
Beispiel #6
0
 public void HideControls()
 {
     declarationForm.Hide();
     declarationForm.Dispose();
     declarationForm = null;
 }
Beispiel #7
0
 public void HideControls()
 {
     commentForm.Hide();
     commentForm.Dispose();
     commentForm = null;
 }
 public void HideControls()
 {
     declarationForm.Hide();
     declarationForm.Dispose();
     declarationForm = null;
 }