Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
 public void AddSplitScreenLayoutModel(SplitScreenLayoutModel model)
 {
     if (model != null)
     {
         if (model != HandSetIcon && model.SplitType == SplitScreenType.自定义)
         {
             model.DeleteCommand = new DelegateCommand(_ => removeLayoutModel(model));
         }
         _listLayout.Insert(_listLayout.Count - 1, model);
     }
 }
Exemplo n.º 3
0
        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);
        }
Exemplo n.º 4
0
        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);
        }
Exemplo n.º 5
0
        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);
        }
Exemplo n.º 6
0
 void removeLayoutModel(SplitScreenLayoutModel model)
 {
     _listLayout.Remove(model);
     CustomLayoutScheme.Instance.Remove(model.SplitScreenInfom as CustomLayout);
 }