private void InternalSplit(PaneDivision.IPane view, IViewFactory factory, PaneDivision.Direction direction) { PaneDivision.IPane t = CreateNewPane(factory, direction == PaneDivision.Direction.LR? DockStyle.Left : DockStyle.Top); Form form = _parent.AsForm(); form.SuspendLayout(); _paneDivision.SplitPane(view, t, direction); _singlePane = null; FireOnSplit(); form.ResumeLayout(true); view.AsDotNet().Focus(); }
private int Parse(char[] format, int index) { char dir = format[index++]; if (dir == 'H') { _direction = PaneDivision.Direction.TB; } else if (dir == 'V') { _direction = PaneDivision.Direction.LR; } else { throw new FormatException(); } VerifyChar(format[index++], '('); Node prev = null; double remain_ratio = 1.0; do { Node t = new Node(); index = t.Parse(format, index); remain_ratio -= t.Ratio; if (remain_ratio < 0) { throw new FormatException("ratio overflow"); } if (prev == null) { _firstTag = t; } else { prev.Next = t; } prev = t; if (format[index] == ')') { break; //end of content } VerifyChar(format[index++], ','); } while (true); VerifyChar(format[index++], ')'); return(index); }
private int Parse(char[] format, int index) { char dir = format[index++]; if (dir == 'H') _direction = PaneDivision.Direction.TB; else if (dir == 'V') _direction = PaneDivision.Direction.LR; else throw new FormatException(); VerifyChar(format[index++], '('); Node prev = null; double remain_ratio = 1.0; do { Node t = new Node(); index = t.Parse(format, index); remain_ratio -= t.Ratio; if (remain_ratio < 0) throw new FormatException("ratio overflow"); if (prev == null) _firstTag = t; else prev.Next = t; prev = t; if (format[index] == ')') break; //end of content VerifyChar(format[index++], ','); } while (true); VerifyChar(format[index++], ')'); return index; }
public SplitFormat(PaneDivision.Direction dir, Node first) { _direction = dir; _firstTag = first; }