コード例 #1
0
ファイル: ASCII_Shape.cs プロジェクト: KeyboardMatt/Grafix
        /// <summary>
        /// INITIALIZER 2 : For custom size textbox objects
        /// </summary>
        /// <param name="textBoxString"></param>
        /// <param name="widthOfTextBox"></param>
        /// <param name="listOfColors"></param>
        public ASCII_Shape(string textBoxString, int widthOfTextBox, List <string> listOfColors = null)
        {
            Left      = 0;
            Top       = 0;
            ShapeType = DrawTool.ShapeTypes.Custom;

            List <string> listOfStrings = TestStuff.CTools.GetTextBox_Single(textBoxString, widthOfTextBox);

            lStrings = listOfStrings;

            shapeHeight = lStrings.Count();
            shapeWidth  = lStrings[0].Length;

            if (listOfColors == null)
            {
                lColors = lStrings;
            }
            else
            {
                lColors = listOfColors;
            }

            IDnumber = PUBV.GetNextShapeIndex();
            PUBV.Initialize_NewShape(this);
        }
コード例 #2
0
ファイル: ASCII_Shape.cs プロジェクト: KeyboardMatt/Grafix
        /// <summary>
        /// INITIALIZER 1 : For predefined objects
        /// </summary>
        /// <param name="shapeType"></param>
        public ASCII_Shape(DrawTool.ShapeTypes shapeType)
        {
            Left      = 0;
            Top       = 0;
            ShapeType = shapeType;

            shapeHeight = PredefinedShapes.Get_Height(shapeType);
            shapeWidth  = PredefinedShapes.Get_Width(shapeType);
            lStrings    = PredefinedShapes.Get_ListStrings(shapeType);
            lColors     = PredefinedShapes.Get_ListColors(shapeType);

            IDnumber = PUBV.GetNextShapeIndex();
            PUBV.Initialize_NewShape(this);
        }