public void SetPanePosition(ConnectionTag tag, PanePosition pos) { lock (this) { _connection = tag.Connection; _destinationPanePosition = pos; SendMessageCore(CService.SetPanePosition); } }
/// <summary> /// 查找停靠位置的Tabs /// </summary> /// <param name="p_dockState"></param> /// <returns></returns> Tabs FindPinSect(PanePosition p_dockState) { Tabs sect = null; Pane item = (from dockItem in Items.OfType <Pane>() where dockItem.Pos == p_dockState select dockItem).FirstOrDefault(); if (item != null) { sect = (from obj in item.GetAllTabs() select obj).FirstOrDefault(); } return(sect); }
/// <summary> /// 将内部所有的Tab转移到两侧隐藏 /// </summary> /// <param name="p_items"></param> /// <param name="p_state"></param> void MoveToAutoHide(IPaneList p_items, PanePosition p_state) { foreach (var item in p_items.Items) { if (item is Tabs tabs) { int index = 0; while (index < tabs.Items.Count) { Tab si = tabs.Items[index] as Tab; if (si != null) { tabs.Items.RemoveAt(index); if (p_state == PanePosition.Left) { if (_owner.LeftAutoHide == null) { _owner.CreateLeftAutoHideTab(); } _owner.LeftAutoHide.Unpin(si); } else if (p_state == PanePosition.Right) { if (_owner.RightAutoHide == null) { _owner.CreateRightAutoHideTab(); } _owner.RightAutoHide.Unpin(si); } } else { index++; } } } else if (item is IPaneList child) { MoveToAutoHide(child, p_state); } } }
public bool BeforeInsertAnchorable(LayoutRoot layout, LayoutAnchorable anchorableToShow, ILayoutContainer destinationContainer) { if (destinationContainer?.FindParent <LayoutFloatingWindow>() != null) { return(false); } PanePosition targetPosition = anchorableToShow.Content is PaneModel model ? model.DefaultPosition : PanePosition.Document; switch (targetPosition) { case PanePosition.Top: case PanePosition.Bottom: case PanePosition.Left: case PanePosition.Right: var pane = GetOrCreatePane(layout, targetPosition.ToString()); if (pane == null) { return(false); } anchorableToShow.CanDockAsTabbedDocument = false; pane.Children.Add(anchorableToShow); return(true); case PanePosition.Document: var documentPane = GetOrCreateDocumentPane(layout); if (documentPane == null) { return(false); } documentPane.Children.Add(anchorableToShow); return(true); default: throw new NotSupportedException($"Enum value {targetPosition} is not supported"); } }
void ISheet.CreateSplitPane(int xSplitPos, int ySplitPos, int leftmostColumn, int topRow, PanePosition activePane) { throw new System.NotImplementedException(); }
public void CreateSplitPane(int xSplitPos, int ySplitPos, int leftmostColumn, int topRow, PanePosition activePane) { _sh.CreateSplitPane(xSplitPos, ySplitPos, leftmostColumn, topRow, activePane); }
/// <summary> /// ���̐ڑ���A�N�e�B�u�ɂ��A�őO�ʂɎ����Ă����܂��B�����Ńy�C���̈ʒu��w��ł��܂��B /// </summary> /// <param name="pos">�y�C���̈ʒu��w�肵�܂��B���̈����̓t���[�����㉺�܂��͍��E�ɕ�������Ă���Ƃ��݈̂Ӗ�������܂��B</param> public abstract void Activate(PanePosition pos);
public void SplitPane(string SheetName, int xSplitPos, int ySplitPos, int leftmostColumn, int topRow, PanePosition activePane) { this.hssworkbook.GetSheet(SheetName).CreateSplitPane(xSplitPos, ySplitPos, leftmostColumn, topRow, activePane); }
/** * Creates a split pane. Any existing freezepane or split pane is overwritten. * @param xSplitPos Horizonatal position of split (in 1/20th of a point). * @param ySplitPos Vertical position of split (in 1/20th of a point). * @param topRow Top row visible in bottom pane * @param leftmostColumn Left column visible in right pane. * @param activePane Active pane. One of: PANE_LOWER_RIGHT, * PANE_UPPER_RIGHT, PANE_LOWER_LEFT, PANE_UPPER_LEFT * @see NPOI.SS.usermodel.Sheet#PANE_LOWER_LEFT * @see NPOI.SS.usermodel.Sheet#PANE_LOWER_RIGHT * @see NPOI.SS.usermodel.Sheet#PANE_UPPER_LEFT * @see NPOI.SS.usermodel.Sheet#PANE_UPPER_RIGHT */ public void CreateSplitPane(int xSplitPos, int ySplitPos, int leftmostColumn, int topRow, PanePosition activePane) { CreateFreezePane(xSplitPos, ySplitPos, leftmostColumn, topRow); GetPane().state = (ST_PaneState.split); GetPane().activePane = (ST_Pane)(activePane); }
public void SetPanePosition(ConnectionTag tag, PanePosition pos) { lock(this) { _connection = tag.Connection; _destinationPanePosition = pos; SendMessageCore(CService.SetPanePosition); } }
public override void Activate(PanePosition pos) { GApp.InterThreadUIService.SetPanePosition(_tag, pos); }
internal void OnPinChange(Tab item) { if (item.IsPinned) { AutoHideTab autoHide = item.Owner as AutoHideTab; if (autoHide != null) { autoHide.Pin(item); PanePosition dockState = GetDockState(autoHide.TabStripPlacement); Tabs sect = FindPinSect(dockState); if (sect != null) { // 直接停靠 sect.Items.Add(item); } else { Pane dockItem = new Pane(); dockItem.Pos = dockState; sect = new Tabs(); dockItem.Items.Add(sect); sect.Items.Add(item); Items.Add(dockItem); } } } else { Tabs sect = item.Owner as Tabs; Pane dockItem; if (sect != null && (dockItem = sect.OwnWinItem) != null) { switch (dockItem.Pos) { case PanePosition.Left: if (LeftAutoHide == null) { CreateLeftAutoHideTab(); } LeftAutoHide.Unpin(item); break; case PanePosition.Bottom: if (BottomAutoHide == null) { CreateBottomAutoHideTab(); } BottomAutoHide.Unpin(item); break; case PanePosition.Right: if (RightAutoHide == null) { CreateRightAutoHideTab(); } RightAutoHide.Unpin(item); break; case PanePosition.Top: if (TopAutoHide == null) { CreateTopAutoHideTab(); } TopAutoHide.Unpin(item); break; } } } OnLayoutChanged(); }
/// <summary> /// この接続をアクティブにし、最前面に持っていきます。引数でペインの位置を指定できます。 /// </summary> /// <param name="pos">ペインの位置を指定します。この引数はフレームが上下または左右に分割されているときのみ意味を持ちます。</param> public abstract void Activate(PanePosition pos);