Exemple #1
0
 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;
 }
 public void Setup()
 {
     this.tabCtrl = new TabControl();
     this.mr = new MockRepository();
     this.pane = mr.Stub<IWindowPane>();
     this.services = mr.Stub<IServiceProvider>();
 }
Exemple #3
0
 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();
 }
Exemple #4
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;
 }
 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);
 }
 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;   
 }
 public WindowFrame(DecompilerShellUiService svc, string key, TabPage tabPage, IWindowPane pane)
 {
     this.svc = svc;
     this.key = key;
     this.tabPage = tabPage;
     this.pane = pane;
 }
Exemple #8
0
 public IWindowFrame Attach(IWindowPane pane, TabPage tabPage)
 {
     var frame = new TabControlWindowFrame(tabCtrl, tabPage, pane, services);
     return frame;
 }
Exemple #9
0
 public IWindowFrame CreateWindow(string windowType, string windowTitle, IWindowPane pane)
 {
     throw new NotImplementedException();
 }
Exemple #10
0
 public IWindowFrame CreateWindow(string windowType, string windowTitle, IWindowPane pane)
 {
     throw new NotImplementedException();
 }
 public IWindowFrame CreateDocumentWindow(string documentType, string documentTitle, object docItem, IWindowPane pane)
 {
     throw new NotImplementedException();
 }
Exemple #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);
        }
Exemple #13
0
 public IWindowFrame CreateDocumentWindow(string documentType, string documentTitle, object docItem, IWindowPane pane)
 {
     throw new NotImplementedException();
 }
 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;
 }
 public WindowFrame(DecompilerShellUiService svc, string key, TabPage tabPage, IWindowPane pane)
 {
     this.svc     = svc;
     this.key     = key;
     this.tabPage = tabPage;
     this.pane    = pane;
 }
        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);
        }
 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;
 }
Exemple #18
0
        public IWindowFrame Attach(IWindowPane pane, object tabPage)
        {
            var frame = new TabControlWindowFrame(tabCtrl, (TabPage)tabPage, pane, services);

            return(frame);
        }
 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;
 }
Exemple #20
0
        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);
        }