public static SplitScreenLayoutModel Get等分屏(int split) { SplitScreenInfo info = new SplitScreenInfo() { Split = split }; SplitScreenNode[] nodes = new SplitScreenNode[split * split]; int index = 0; for (int i = 0; i < split; i++) { for (int j = 0; j < split; j++) { nodes[index++] = new SplitScreenNode() { Row = i, Column = j, RowSpan = 1, ColumnSpan = 1 }; } } info.Nodes = nodes; SplitScreenLayoutModel model = new SplitScreenLayoutModel() { Header = string.Format("{0}×{0}", split), SplitScreenInfom = info, SplitType = SplitScreenType.等分屏 }; return(model); }
public void UpdateSelectedLayout() { if (SelectedSplitLayout != null) { if (SelectedSplitLayout != HandSetIcon) { CurrentSplitLayout = SelectedSplitLayout.SplitScreenInfom.Clone(); } else { addUserDefinedLayoutDesign(); } SelectedSplitLayout = null; } }
public static SplitScreenLayoutModel Get三大多小(int split) { int smallCount = (split / 2) * (split / 2); SplitScreenInfo info = new SplitScreenInfo() { Split = split }; SplitScreenNode[] nodes = new SplitScreenNode[3 + smallCount]; int index = 0; nodes[index++] = new SplitScreenNode() { Row = 0, Column = 0, RowSpan = split / 2, ColumnSpan = split / 2 }; nodes[index++] = new SplitScreenNode() { Row = 0, Column = split / 2, RowSpan = split / 2, ColumnSpan = split / 2 }; nodes[index++] = new SplitScreenNode() { Row = split / 2, Column = 0, RowSpan = split / 2, ColumnSpan = split / 2 }; for (int i = split / 2; i < split; i++) { for (int j = split / 2; j < split; j++) { nodes[index++] = new SplitScreenNode() { Row = i, Column = j, RowSpan = 1, ColumnSpan = 1 }; } } info.Nodes = nodes; SplitScreenLayoutModel model = new SplitScreenLayoutModel() { Header = string.Format("3+{0}", smallCount), SplitScreenInfom = info, SplitType = SplitScreenType.自定义, IsValibleCloseButton = false }; return(model); }
public static SplitScreenLayoutModel Get一大多小(int split) { SplitScreenInfo info = new SplitScreenInfo() { Split = split }; SplitScreenNode[] nodes = new SplitScreenNode[split * 2]; int index = 0; nodes[index++] = new SplitScreenNode() { Row = 0, Column = 0, RowSpan = split - 1, ColumnSpan = split - 1 }; for (int i = 0; i < split - 1; i++) { nodes[index++] = new SplitScreenNode() { Row = i, Column = split - 1, RowSpan = 1, ColumnSpan = 1 } } ; for (int j = 0; j < split; j++) { nodes[index++] = new SplitScreenNode() { Row = split - 1, Column = j, RowSpan = 1, ColumnSpan = 1 } } ; info.Nodes = nodes; SplitScreenLayoutModel model = new SplitScreenLayoutModel() { Header = string.Format("1+{0}", split * 2 - 1), SplitScreenInfom = info, SplitType = SplitScreenType.一大多小 }; return(model); }
public static SplitScreenLayoutModel Get两大多小左侧(int split) { SplitScreenInfo info = new SplitScreenInfo() { Split = split }; SplitScreenNode[] nodes = new SplitScreenNode[split * split / 2 + 2]; int index = 0; nodes[index++] = new SplitScreenNode() { Row = 0, Column = 0, RowSpan = split / 2, ColumnSpan = split / 2 }; nodes[index++] = new SplitScreenNode() { Row = split / 2, Column = 0, RowSpan = split / 2, ColumnSpan = split / 2 }; for (int i = 0; i < split; i++) { for (int j = split / 2; j < split; j++) { nodes[index++] = new SplitScreenNode() { Row = i, Column = j, RowSpan = 1, ColumnSpan = 1 }; } } info.Nodes = nodes; SplitScreenLayoutModel model = new SplitScreenLayoutModel() { Header = string.Format("2+{0}", split * split / 2), SplitScreenInfom = info, SplitType = SplitScreenType.两大多小 }; return(model); }