public void SwitchView(IAttachableViewContent view)
 {
     if (subViewNotebook != null)
     {
         ShowPage(viewContents.IndexOf(view));
     }
 }
        void BeforeSave(object sender, EventArgs e)
        {
            IAttachableViewContent secondaryViewContent = ActiveViewContent as IAttachableViewContent;

            if (secondaryViewContent != null)
            {
                secondaryViewContent.BeforeSave();
            }
        }
예제 #3
0
 public void SwitchView(IAttachableViewContent view)
 {
     if (subViewNotebook != null)
     {
         // adding 1 because subviews start at the position 1 of the tab strip. Position 0 is
         // for the main view
         ShowPage(subViewContents.IndexOf(view) + 1);
     }
 }
        public void AttachViewContent(IAttachableViewContent subViewContent)
        {
            // need to create child Notebook when first IAttachableViewContent is added
            CheckCreateSubViewContents();

            subViewContents.Add(subViewContent);
            subViewContent.WorkbenchWindow = this;
            AddButton(subViewContent.TabPageLabel, subViewContent.Control);

            OnContentChanged(null, null);
        }
예제 #5
0
        public void InsertViewContent(int index, IAttachableViewContent subViewContent)
        {
            // need to create child Notebook when first IAttachableViewContent is added
            CheckCreateSubViewContents();

            viewContents.Insert(index, subViewContent);
            subViewContent.WorkbenchWindow = this;

            OnContentChanged(null, null);

            if (ViewsChanged != null)
            {
                ViewsChanged(this, EventArgs.Empty);
            }
        }
예제 #6
0
        void SetCurrentView(int newIndex)
        {
            subViewNotebook.CurrentPage = newIndex;

            if (oldIndex > 0)
            {
                IAttachableViewContent secondaryViewContent = subViewContents[oldIndex - 1] as IAttachableViewContent;
                if (secondaryViewContent != null)
                {
                    secondaryViewContent.Deselected();
                }
            }

            if (subViewNotebook.CurrentPage > 0)
            {
                IAttachableViewContent secondaryViewContent = subViewContents[subViewNotebook.CurrentPage - 1] as IAttachableViewContent;
                if (secondaryViewContent != null)
                {
                    secondaryViewContent.Selected();
                }
            }
            oldIndex = subViewNotebook.CurrentPage;
            DetachFromPathedDocument();

            MonoDevelop.Ide.Gui.Content.IPathedDocument pathedDocument;
            if (oldIndex <= 0)
            {
                pathedDocument = Document != null?Document.GetContent <MonoDevelop.Ide.Gui.Content.IPathedDocument> () : ViewContent.GetContent <MonoDevelop.Ide.Gui.Content.IPathedDocument> ();
            }
            else
            {
                pathedDocument = subViewContents[oldIndex - 1].GetContent <MonoDevelop.Ide.Gui.Content.IPathedDocument> ();
            }

            if (pathedDocument != null)
            {
                AttachToPathedDocument(pathedDocument);
            }
            OnActiveViewContentChanged(new ActiveViewContentEventArgs(this.ActiveViewContent));
        }
        protected void subViewNotebookIndexChanged(object sender, SwitchPageArgs e)
        {
            if (oldIndex > 0)
            {
                IAttachableViewContent secondaryViewContent = subViewContents[oldIndex - 1] as IAttachableViewContent;
                if (secondaryViewContent != null)
                {
                    secondaryViewContent.Deselected();
                }
            }

            if (subViewNotebook.CurrentPage > 0)
            {
                IAttachableViewContent secondaryViewContent = subViewContents[subViewNotebook.CurrentPage - 1] as IAttachableViewContent;
                if (secondaryViewContent != null)
                {
                    secondaryViewContent.Selected();
                }
            }
            oldIndex = subViewNotebook.CurrentPage;

            OnActiveViewContentChanged(new ActiveViewContentEventArgs(this.ActiveViewContent));
        }
 public void AttachViewContent(IAttachableViewContent subViewContent)
 {
     InsertViewContent(viewContents.Count, subViewContent);
 }
예제 #9
0
 public void SwitchView(IAttachableViewContent view)
 {
 }
예제 #10
0
 public void InsertViewContent(int index, IAttachableViewContent subViewContent)
 {
 }
예제 #11
0
 public void AttachViewContent(IAttachableViewContent subViewContent)
 {
 }
예제 #12
0
		public void AttachViewContent (IAttachableViewContent subViewContent)
		{
			// need to create child Notebook when first IAttachableViewContent is added
			CheckCreateSubViewContents ();
			
			subViewContents.Add (subViewContent);
			subViewContent.WorkbenchWindow = this;
			AddButton (subViewContent.TabPageLabel, subViewContent.Control);
			
			OnContentChanged (null, null);
		}
예제 #13
0
		public void AttachViewContent (IAttachableViewContent subViewContent)
		{
			
		}
예제 #14
0
		public void SwitchView (IAttachableViewContent view)
		{
			if (subViewNotebook != null)
				// adding 1 because subviews start at the position 1 of the tab strip. Position 0 is
				// for the main view
				ShowPage (subViewContents.IndexOf (view) + 1);
		}
		public void SwitchView (IAttachableViewContent view)
		{
		}
예제 #16
0
		public void SwitchView (IAttachableViewContent view)
		{
			if (subViewNotebook != null)
				ShowPage (subViewContents.IndexOf (view));
		}