예제 #1
0
        protected void MainForm_TabSelected(object sender, TitleBarTabEventArgs e)
        {
            if (!_addingWindow && SelectedTabIndex != -1)
                TaskbarManager.Instance.TabbedThumbnail.SetActiveTab((RDCWindow)SelectedTab.Content);

            _previousActiveDocument = (RDCWindow)SelectedTab.Content;
        }
예제 #2
0
		/// <summary>
		/// Callback for the <see cref="TabSelected" /> event.  Called when a <see cref="TitleBarTab" /> gains focus.  Sets the active window in Aero Peek via a
		/// call to <see cref="TabbedThumbnailManager.SetActiveTab(Control)" />.
		/// </summary>
		/// <param name="e">Arguments associated with the event.</param>
		protected void OnTabSelected(TitleBarTabEventArgs e)
		{
			if (SelectedTabIndex != -1 && _previews.ContainsKey(SelectedTab.Content) && AeroPeekEnabled)
				TaskbarManager.Instance.TabbedThumbnail.SetActiveTab(SelectedTab.Content);

			_previousActiveTab = SelectedTab;

			if (TabSelected != null)
				TabSelected(this, e);
		}
예제 #3
0
		/// <summary>Callback for the <see cref="TabClicked" /> event.</summary>
		/// <param name="e">Arguments associated with the event.</param>
		protected internal void OnTabClicked(TitleBarTabEventArgs e)
		{
			if (TabClicked != null)
				TabClicked(this, e);
		}
예제 #4
0
		/// <summary>Callback for the <see cref="TabDeselected" /> event.</summary>
		/// <param name="e">Arguments associated with the event.</param>
		protected void OnTabDeselected(TitleBarTabEventArgs e)
		{
			if (TabDeselected != null)
				TabDeselected(this, e);
		}
예제 #5
0
        /// <summary>
        /// Handler method that's called when a tab is clicked on.  This is different from the <see cref="TitleBarTabs.TabSelected"/> event handler in that 
        /// this is called even if the tab is currently active.  This is used to show the toolbar for <see cref="ConnectionWindow"/> instances that 
        /// automatically hide their toolbars when the connection's UI is focused on.
        /// </summary>
        /// <param name="sender">Object from which this event originated.</param>
        /// <param name="e">Arguments associated with this event.</param>
        private void MainForm_TabClicked(object sender, TitleBarTabEventArgs e)
        {
            // Only show the toolbar if the user clicked on an already-selected tab
            if (e.Tab.Content is ConnectionWindow && e.Tab == _previouslyClickedTab && !e.WasDragging)
                (e.Tab.Content as ConnectionWindow).ShowToolbar();

            _previouslyClickedTab = e.Tab;
        }