Example #1
0
        private void SetSortModes(ref SortMode mode, ref HMode hMode, ref VMode vMode)
        {
            if (Mode.ToLower().Equals("row-wise"))
            {
                mode = SortMode.R;
            }
            else if (Mode.ToLower().Equals("column-wise"))
            {
                mode = SortMode.C;
            }
            else
            {
                throw new ArgumentException("Invalid value for Mode " + Mode + ". Use either row-wise or column-wise");
            }

            if (Horizontal.ToLower().Equals("left-to-right"))
            {
                hMode = HMode.L2R;
            }
            else if (Horizontal.ToLower().Equals("right-to-left"))
            {
                hMode = HMode.R2L;
            }
            else
            {
                throw new ArgumentException("Invalid value for Mode " + Horizontal + ". Use either left-to-right or right-to-left");
            }

            if (Vertical.ToLower().Equals("top-down"))
            {
                vMode = VMode.TD;
            }
            else if (Vertical.ToLower().Equals("bottom-up"))
            {
                vMode = VMode.BU;
            }
            else
            {
                throw new ArgumentException("Invalid value for Mode " + Horizontal + ". Use either top-down orbottom-up");
            }
        }