コード例 #1
0
ファイル: TabControlHost.cs プロジェクト: gitter-badger/reko
 public IWindowFrame Add(IWindowPane pane, string tabCaption)
 {
     var tabPage = new TabPage(tabCaption);
     tabCtrl.TabPages.Add(tabPage);
     var frame = new TabControlWindowFrame(tabCtrl, tabPage, pane, services);
     return frame;
 }
コード例 #2
0
 public void Setup()
 {
     this.tabCtrl = new TabControl();
     this.mr = new MockRepository();
     this.pane = mr.Stub<IWindowPane>();
     this.services = mr.Stub<IServiceProvider>();
 }
コード例 #3
0
ファイル: ViewService.cs プロジェクト: gh0std4ncer/reko
 protected void ShowWindow(string windowType, string windowTitle, IWindowPane innerPane)
 {
     var windowFrame = shellUiSvc.FindWindow(windowType);
     if (windowFrame == null)
     {
         windowFrame = shellUiSvc.CreateWindow(windowType, windowTitle, innerPane);
     }
     windowFrame.Show();
 }
コード例 #4
0
ファイル: ViewService.cs プロジェクト: nemerle/reko
 protected IWindowFrame ShowWindow(string windowType, string windowTitle, object docItem, IWindowPane innerPane)
 {
     var windowFrame = shellUiSvc.FindDocumentWindow(windowType, docItem);
     if (windowFrame == null)
     {
         windowFrame = shellUiSvc.CreateDocumentWindow(windowType, docItem, windowTitle, innerPane);
     }
     windowFrame.Show();
     return windowFrame;
 }
コード例 #5
0
 public TabControlWindowFrame(TabControl ctrl, TabPage page, IWindowPane pane, IServiceProvider services)
 {
     this.ctrl = ctrl;
     this.page = page;
     this.Pane = pane;
     this.sc = new ServiceContainer(services);
     sc.AddService(typeof(IWindowFrame), this);
     page.Tag = this;
     pane.SetSite(sc);
 }
コード例 #6
0
 public IWindowFrame CreateDocumentWindow(string documentType, object docItem, string documentTitle, IWindowPane pane)
 {
     var tabPage = new TabPage
     {
         Text = documentTitle,
         ImageIndex = 7,
     };
     WindowFrame frame = new WindowFrame(this, documentType, docItem, tabPage, pane);
     framesByTab.Add(tabPage, frame);
     this.form.DocumentTabs.TabPages.Add(tabPage);
     this.form.DocumentTabs.SelectedTab = tabPage;
     pane.SetSite(services);
     return frame;   
 }
コード例 #7
0
 public WindowFrame(DecompilerShellUiService svc, string key, TabPage tabPage, IWindowPane pane)
 {
     this.svc = svc;
     this.key = key;
     this.tabPage = tabPage;
     this.pane = pane;
 }
コード例 #8
0
ファイル: TabControlHost.cs プロジェクト: gitter-badger/reko
 public IWindowFrame Attach(IWindowPane pane, TabPage tabPage)
 {
     var frame = new TabControlWindowFrame(tabCtrl, tabPage, pane, services);
     return frame;
 }
コード例 #9
0
ファイル: FakeUiService.cs プロジェクト: mmyydd/reko
 public IWindowFrame CreateWindow(string windowType, string windowTitle, IWindowPane pane)
 {
     throw new NotImplementedException();
 }
コード例 #10
0
ファイル: FakeUiService.cs プロジェクト: gitter-badger/reko
 public IWindowFrame CreateWindow(string windowType, string windowTitle, IWindowPane pane)
 {
     throw new NotImplementedException();
 }
コード例 #11
0
 public IWindowFrame CreateDocumentWindow(string documentType, string documentTitle, object docItem, IWindowPane pane)
 {
     throw new NotImplementedException();
 }
コード例 #12
0
        protected IWindowFrame ShowWindow(string windowType, string windowTitle, object docItem, IWindowPane innerPane)
        {
            var windowFrame = shellUiSvc.FindDocumentWindow(windowType, docItem);

            if (windowFrame == null)
            {
                windowFrame = shellUiSvc.CreateDocumentWindow(windowType, docItem, windowTitle, innerPane);
            }
            windowFrame.Show();
            return(windowFrame);
        }
コード例 #13
0
ファイル: FakeUiService.cs プロジェクト: mmyydd/reko
 public IWindowFrame CreateDocumentWindow(string documentType, string documentTitle, object docItem, IWindowPane pane)
 {
     throw new NotImplementedException();
 }
コード例 #14
0
 public WindowFrame(DecompilerShellUiService svc, string key, object docItem, TabPage tabPage, IWindowPane pane)
 {
     this.svc = svc;
     this.key = key;
     this.DocumentItem = docItem;
     this.tabPage = tabPage;
     this.pane = pane;
 }
コード例 #15
0
 public WindowFrame(DecompilerShellUiService svc, string key, TabPage tabPage, IWindowPane pane)
 {
     this.svc     = svc;
     this.key     = key;
     this.tabPage = tabPage;
     this.pane    = pane;
 }
コード例 #16
0
        public IWindowFrame CreateDocumentWindow(string documentType, object docItem, string documentTitle, IWindowPane pane)
        {
            var tabPage = new TabPage
            {
                Text       = documentTitle,
                ImageIndex = 8,
            };
            WindowFrame frame = new WindowFrame(this, documentType, docItem, tabPage, pane);

            framesByTab.Add(tabPage, frame);
            this.form.DocumentTabs.TabPages.Add(tabPage);
            this.form.DocumentTabs.SelectedTab = tabPage;
            pane.SetSite(services);
            return(frame);
        }
コード例 #17
0
 public WindowFrame(DecompilerShellUiService svc, string key, object docItem, TabPage tabPage, IWindowPane pane)
 {
     this.svc          = svc;
     this.key          = key;
     this.DocumentItem = docItem;
     this.tabPage      = tabPage;
     this.pane         = pane;
 }
コード例 #18
0
ファイル: TabControlHost.cs プロジェクト: fengjixuchui/reko
        public IWindowFrame Attach(IWindowPane pane, object tabPage)
        {
            var frame = new TabControlWindowFrame(tabCtrl, (TabPage)tabPage, pane, services);

            return(frame);
        }
コード例 #19
0
 public IWindowFrame CreateWindow(string windowType, string windowTitle, IWindowPane pane)
 {
     var tabPage = new TabPage
     {
         Text = windowTitle,
         ImageIndex = 7,
     };
     WindowFrame frame = new WindowFrame(this, windowType, tabPage, pane);
     framesByName.Add(windowType, frame);
     framesByTab.Add(tabPage, frame);
     this.form.DocumentTabs.TabPages.Add(tabPage);
     this.form.DocumentTabs.SelectedTab = tabPage;
     pane.SetSite(services);
     return frame;
 }
コード例 #20
0
ファイル: ViewService.cs プロジェクト: nemerle/reko
        protected IWindowFrame ShowWindow(string windowType, string windowTitle, object docItem, IWindowPane innerPane)
        {
            var shellUiSvc  = sp.RequireService <IDecompilerShellUiService>();
            var windowFrame = shellUiSvc.FindDocumentWindow(windowType, docItem);

            if (windowFrame == null)
            {
                windowFrame = shellUiSvc.CreateDocumentWindow(windowType, docItem, windowTitle, innerPane);
            }
            windowFrame.Show();
            return(windowFrame);
        }