Thứ Bảy, 18 tháng 5, 2024

Ví dụ đơn giản về DrawJig trong AutoCAD dotNet | DrawJig sample in AutoCAD dotNet

Ứng dụng được phát triển bởi đội ngũ AutoLISP Thật là đơn giản

    

Thông tin thêm: 👉👉👉

Một Solution ví dụ về DrawJig cho người mới làm quen:




1 Thêm RectangArraySecond.cs

(Copy nội dung sau)
Code:
using Autodesk.AutoCAD.ApplicationServices;
using Autodesk.AutoCAD.DatabaseServices;
using Autodesk.AutoCAD.EditorInput;
using Autodesk.AutoCAD.Geometry;
using Autodesk.AutoCAD.GraphicsInterface;
using System.Collections.Generic;
using System.Linq;

namespace QAR
{
    public class RectangArraySecond : DrawJig
    {
        private DBObjectCollection[,] ArrayedEntities;
        private double unitwidth;
        private double unitheight;
        private Point3d basePoint, dragPoint;
        private string arraytype;
        private Matrix3d xform;
        private JigPromptPointOptions moptions;
        private Entity[] entities;

        public Matrix3d Transform
        { get { return xform; } }

        public Matrix3d UCS = Application.DocumentManager.MdiActiveDocument.Editor.CurrentUserCoordinateSystem;

        public RectangArraySecond(IEnumerable<Entity> in_ents, Point3d basePt, JigPromptPointOptions options, string arrayType)
        {
            this.entities = in_ents.ToArray();
            this.basePoint = basePt.TransformBy(Application.DocumentManager.MdiActiveDocument.Editor.CurrentUserCoordinateSystem);
            this.moptions = options;
            this.arraytype = arrayType;
            this.ArrayedEntities = new DBObjectCollection[2, 2];

            for (int i = 0; i < 2; i++)
            {
                for (int j = 0; j < 2; j++)
                {
                    DBObjectCollection ents = new DBObjectCollection();
                    if (!(i == 0 && j == 0)) foreach (Entity e in entities) ents.Add(e.Clone() as Entity);
                    ArrayedEntities[i, j] = ents;
                }
            }
        }

        public Matrix3d ArrayMatrix(int row, int col)
        {
            Vector3d vec = new Vector3d(unitwidth * col, unitheight * row, 0);
            Matrix3d mat = Matrix3d.Displacement(vec.TransformBy(UCS));
            return mat;
        }

        protected override bool WorldDraw(Autodesk.AutoCAD.GraphicsInterface.WorldDraw draw)
        {
            Editor ed = Application.DocumentManager.MdiActiveDocument.Editor;
            WorldGeometry geo = draw.Geometry;
            if (geo != null)
            {
                if (arraytype == "Array")
                {
                    for (int i = 0; i < 2; i++)
                    {
                        for (int j = 0; j < 2; j++)
                        {
                            if (i == 0 && j == 0) continue;
                            geo.PushModelTransform(ArrayMatrix(i, j));
                            for (int k = 0; k < ArrayedEntities[i, j].Count; ++k) geo.Draw(ArrayedEntities[i, j][k].Drawable);
                            geo.PopModelTransform();
                        }
                    }
                }
                else if (arraytype == "Rotation")
                {
                    geo.PushModelTransform(ArrayMatrix(1, 1));
                    for (int k = 0; k < ArrayedEntities[1, 1].Count; ++k) geo.Draw(ArrayedEntities[1, 1][k].Drawable);
                    geo.PopModelTransform();
                }
            }
            return true;
        }

        protected override SamplerStatus Sampler(JigPrompts prompts)
        {
            PromptPointResult prResult1 = prompts.AcquirePoint(this.moptions);
            if (prResult1.Status != PromptStatus.OK) return SamplerStatus.Cancel;

            dragPoint = prResult1.Value;
            Vector3d v3d = basePoint.TransformBy(UCS.Inverse()).GetVectorTo(dragPoint.TransformBy(UCS.Inverse()));
            if (unitwidth == v3d.X && unitheight == v3d.Y || v3d.Length == 0) return SamplerStatus.NoChange;
            unitwidth = v3d.X;
            unitheight = v3d.Y;
            xform = Matrix3d.Displacement(v3d);
            return SamplerStatus.OK;
        }
    }
}


2 Thêm class RectangArrayThird.cs

(Copy nội dung sau)
Code:
using Autodesk.AutoCAD.ApplicationServices;
using Autodesk.AutoCAD.DatabaseServices;
using Autodesk.AutoCAD.EditorInput;
using Autodesk.AutoCAD.Geometry;
using Autodesk.AutoCAD.GraphicsInterface;
using lhBasic;
using System;
using System.Collections.Generic;
using System.Linq;

namespace QAR
{
    public class RectangArrayThird : DrawJig
    {
        public Matrix3d UCS = Application.DocumentManager.MdiActiveDocument.Editor.CurrentUserCoordinateSystem;

        private static PICTURE Picture = PICTURE.LogoEN;
        public double unitwidth;
        public double unitheight;
        private Point3d basePoint, dragPoint;
        private Matrix3d xform;
        private string arraytype;
        private JigPromptPointOptions options;
        private List<Entity> entities = new List<Entity>();

        public Matrix3d Transform
        { get { return xform; } }

        public RectangArrayThird(IEnumerable<Entity> input_ents, Point3d basePt, ref Point3d secondPt, JigPromptPointOptions options, string arrayType)
        {
            this.entities = input_ents.Select(x => x.Clone() as Entity).ToList();
            this.basePoint = basePt.TransformBy(Application.DocumentManager.MdiActiveDocument.Editor.CurrentUserCoordinateSystem);
            this.options = options;
            this.arraytype = arrayType;

            Vector3d v3d = basePt.GetVectorTo(secondPt);
            this.unitwidth = v3d.X;
            this.unitheight = v3d.Y;
            oldNumberRow = 0;
            oldNumberCol = 0;

            //ArrayedEntities = new List<DBObjectCollection>();
            //for (int i = 0; i < oldNumberRow * oldNumberCol; ++i)
            //{
            //    DBObjectCollection ents = new DBObjectCollection();
            //    foreach (Entity e in entities)
            //        ents.Add(e.Clone() as Entity);

            //    ArrayedEntities.Add(ents);
            //}
            if (Picture == PICTURE.LogoEN) Picture = PICTURE.Mario;
            else if (Picture == PICTURE.Mario) Picture = PICTURE.Coin;
            else Picture = PICTURE.LogoEN;
        }

        public int NumberRow, NumberCol, oldNumberRow, oldNumberCol;

        public Matrix3d ArrayMatrix(int row, int col)
        {
            Vector3d vec = new Vector3d(unitwidth * col, unitheight * row, 0);
            Matrix3d mat = Matrix3d.Displacement(vec.TransformBy(UCS));
            return mat;
        }

        protected override bool WorldDraw(Autodesk.AutoCAD.GraphicsInterface.WorldDraw draw)
        {
            WorldGeometry geo = draw.Geometry;
            if (geo == null) return false;

            if (arraytype == "Array")
            {
                for (int i = 0; i <= NumberRow; i++)
                {
                    for (int j = 0; j <= NumberCol; j++)
                    {
                        if (i == 0 && j == 0) continue;
                        geo.PushModelTransform(ArrayMatrix(i, j));

                        Autodesk.AutoCAD.Colors.Color col = LOGO_TK_EN.GetColor(Math.Abs(i), Math.Abs(j), Math.Abs(NumberRow), Math.Abs(NumberCol), Picture);
                        foreach (Entity e in entities)
                        {
                            e.Color = col;
                            geo.Draw(e.Drawable);
                        }
                        geo.PopModelTransform();
                    }
                }
            }
            else if (arraytype == "Rotation")
            {
                for (int j = Math.Min(NumberCol, 0); j <= Math.Max(NumberCol, 0); j++)
                {
                    Autodesk.AutoCAD.Colors.Color col = LOGO_TK_EN.GetColor(1, 1, 1, 1, Picture);
                    if (j == 0) continue;
                    geo.PushModelTransform(ArrayMatrix(j, j));
                    foreach (Entity e in entities)
                    {
                        e.Color = col;
                        geo.Draw(e);
                    }
                    geo.PopModelTransform();
                }
            }
            return true;
        }

        protected override SamplerStatus Sampler(JigPrompts prompts)
        {
            PromptPointResult prResult1 = prompts.AcquirePoint(this.options);
            if (prResult1.Status != PromptStatus.OK) return SamplerStatus.Cancel;

            dragPoint = prResult1.Value;
            Vector3d v3d = basePoint.TransformBy(UCS.Inverse()).GetVectorTo(dragPoint.TransformBy(UCS.Inverse()));
            double a = unitwidth == 0 ? 0 : (int)(v3d.X / unitwidth);
            double b = unitheight == 0 ? 0 : (int)(v3d.Y / unitheight);
            if (a > 1000) a = 1000;
            if (b > 1000) b = 1000;
            if (a < -1000) a = -1000;
            if (b < -1000) b = -1000;
            int newNumberCol = (int)a;
            int newNumberRow = 0;
            if (arraytype == "Array")
                newNumberRow = (int)b;
            else if (arraytype == "Rotation")
                newNumberRow = 0;
            xform = Matrix3d.Displacement(v3d);
            bool forceChange = false;
            if (newNumberCol < 0)
            {
                newNumberCol = Math.Abs(newNumberCol);
                unitwidth = -unitwidth;
                forceChange = true;
            }
            if (newNumberRow < 0)
            {
                newNumberRow = Math.Abs(newNumberRow);
                if (newNumberRow != 0) unitheight = -unitheight;
                forceChange = true;
            }
            if (!forceChange && NumberRow == newNumberRow && NumberCol == newNumberCol) return SamplerStatus.NoChange;

            NumberRow = newNumberRow;
            NumberCol = newNumberCol;
            return SamplerStatus.OK;
        }
    }
}


3 Thêm hoặc chỉnh sửa QARJig.cs

(Copy nội dung sau)
Code:
using Autodesk.AutoCAD.ApplicationServices;
using Autodesk.AutoCAD.DatabaseServices;
using Autodesk.AutoCAD.EditorInput;
using Autodesk.AutoCAD.Geometry;

namespace QAR
{
    internal class QARJig
    {
        //Third Point
        public static PromptStatus RectangArrayGetThirdPoint(ObjectIdCollection source, ref Point3d bspt, Point3d sept, string kword, ref string retkword, ref int NumberRow, ref int NumberCol,
            ref double unitWidth, ref double unitHeight)
        {
            Database db = HostApplicationServices.WorkingDatabase;
            Editor ed = Application.DocumentManager.MdiActiveDocument.Editor;
            PromptStatus ps = PromptStatus.None;
            using (Transaction tr = db.TransactionManager.StartTransaction())
            {
                Entity[] entities = new Entity[source.Count];
                for (int i = 0; i < source.Count; i++) entities[i] = (Entity)tr.GetObject(source[i], OpenMode.ForRead);
                JigPromptPointOptions jppo = new JigPromptPointOptions("\nSpecify third point");
                jppo.BasePoint = bspt.TransformBy(ed.CurrentUserCoordinateSystem);
                jppo.UseBasePoint = true;
                if (kword != "")
                {
                    jppo.Keywords.Add(kword);
                    jppo.AppendKeywordsToMessage = true;
                }
                jppo.Cursor = CursorType.RubberBand;
                jppo.UserInputControls = UserInputControls.Accept3dCoordinates;
                jppo.UserInputControls = UserInputControls.NullResponseAccepted;

                RectangArrayThird jigger = new RectangArrayThird(entities, bspt, ref sept, jppo, "Array");

                PromptResult jigRes = Application.DocumentManager.MdiActiveDocument.Editor.Drag(jigger);
                ps = jigRes.Status;
                if (jigRes.Status == PromptStatus.OK)
                {
                    NumberRow = jigger.NumberRow + 1;
                    NumberCol = jigger.NumberCol + 1;
                    unitWidth = jigger.unitwidth;
                    unitHeight = jigger.unitheight;
                    bspt = bspt.TransformBy(jigger.Transform);
                }
                else if (jigRes.Status == PromptStatus.Keyword)
                    retkword = jigRes.StringResult;
                tr.Commit();
            }
            return ps;
        }

        //Second Point
        public static PromptStatus RectangArrayGetSecondPoint(ObjectIdCollection source, ref Point3d bspt, string kword, ref string retkword)
        {
            Database db = HostApplicationServices.WorkingDatabase;
            Editor ed = Application.DocumentManager.MdiActiveDocument.Editor;
            PromptStatus ps = PromptStatus.None;
            using (Transaction tr = db.TransactionManager.StartTransaction())
            {
                Entity[] entities = new Entity[source.Count];
                for (int i = 0; i < source.Count; i++) entities[i] = (Entity)tr.GetObject(source[i], OpenMode.ForRead);
                JigPromptPointOptions jppo = new JigPromptPointOptions("\nSpecify second point");
                jppo.BasePoint = bspt.TransformBy(ed.CurrentUserCoordinateSystem);
                jppo.UseBasePoint = true;
                if (kword != "")
                {
                    jppo.Keywords.Add(kword);
                    jppo.AppendKeywordsToMessage = true;
                }
                jppo.Cursor = CursorType.RubberBand;
                jppo.UserInputControls = UserInputControls.Accept3dCoordinates;
                jppo.UserInputControls = UserInputControls.NullResponseAccepted;

                RectangArraySecond jigger = new RectangArraySecond(entities, bspt, jppo, "Array");

                PromptResult jigRes = Application.DocumentManager.MdiActiveDocument.Editor.Drag(jigger);
                ps = jigRes.Status;
                if (jigRes.Status == PromptStatus.OK)
                    bspt = bspt.TransformBy(jigger.Transform);
                else if (jigRes.Status == PromptStatus.Keyword)
                    retkword = jigRes.StringResult;
                tr.Commit();
            }
            return ps;
        }
    }
}


4 Thêm hoặc chỉnh sửa MapImage.cs (Không bắt buộc)

(Copy nội dung sau)
Code:
using Autodesk.AutoCAD.Colors;
using System;
using System.Linq;

namespace lhBasic
{
    public enum PICTURE
    { Coin, Mario, LogoEN };

    public class LOGO_TK_EN
    {
        private static Random rnd = new Random();

        public static Color GetColor(int x, int y, int colCount, int rowCount, PICTURE pic = PICTURE.LogoEN)
        {
            if ((int)pic >= ImageSizes.Count() - 1) pic = (PICTURE)ImageSizes.Count() - 1;
            int NumberCol = ImageSizes[(int)pic].Width;
            int NumberRow = ImageSizes[(int)pic].Height;
            Color col = Color.FromColorIndex(ColorMethod.ByColor, (short)rnd.Next(1, 11));
            try
            {
                if (rowCount > 5 && colCount > 5)
                {
                    double j = (double)y * (double)NumberRow / (double)rowCount;
                    double i = (double)NumberCol - (double)x * (double)NumberCol / (double)colCount;
                    switch (pic)
                    {
                        case PICTURE.Coin:
                            col = Coin[(int)i, (int)j];
                            break;

                        case PICTURE.Mario:
                            col = Mario[(int)i, (int)j];
                            break;

                        default:
                            col = LogoEn[(int)i, (int)j];
                            break;
                    }
                }
            }
            catch (Exception ee)
            {
                //System.Windows.Forms.MessageBox.Show(ee.Message + "_" + x * NumberCol / colCount + "_" + x * NumberCol / colCount + "/" + mapBit.GetLength(0) + "_" + mapBit.GetLength(0));
            }

            return col;
        }

        private static ImageSize[] ImageSizes = { new ImageSize(16, 16), new ImageSize(16, 12), new ImageSize(32, 32) };

        private class ImageSize
        {
            public ImageSize(int w, int h)
            {
                this.Height = h;
                this.Width = w;
            }

            public int Height, Width;
        }

        private static Color[,] Random = new Color[,]
        {
        };

        private static Color[,] Coin = new Color[,]
        {
            {Color.FromRgb(255,255,255),
            Color.FromRgb(255,255,255),
            Color.FromRgb(255,255,255),
            Color.FromRgb(255,255,255),
            Color.FromRgb(255,255,255),
            Color.FromRgb(255,255,255),
            Color.FromRgb(0,0,0),
            Color.FromRgb(0,0,0),
            Color.FromRgb(0,0,0),
            Color.FromRgb(0,0,0),
            Color.FromRgb(255,255,255),
            Color.FromRgb(255,255,255),
            Color.FromRgb(255,255,255),
            Color.FromRgb(255,255,255),
            Color.FromRgb(255,255,255),
            Color.FromRgb(255,255,255),},
            {Color.FromRgb(255,255,255),
            Color.FromRgb(255,255,255),
            Color.FromRgb(255,255,255),
            Color.FromRgb(255,255,255),
            Color.FromRgb(0,0,0),
            Color.FromRgb(0,0,0),
            Color.FromRgb(255,255,255),
            Color.FromRgb(255,255,255),
            Color.FromRgb(255,255,255),
            Color.FromRgb(255,255,255),
            Color.FromRgb(5,5,5),
            Color.FromRgb(0,0,0),
            Color.FromRgb(255,255,255),
            Color.FromRgb(255,255,255),
            Color.FromRgb(255,255,255),
            Color.FromRgb(255,255,255),},
            {Color.FromRgb(255,255,255),
            Color.FromRgb(255,255,255),
            Color.FromRgb(255,255,255),
            Color.FromRgb(6,6,6),
            Color.FromRgb(255,255,255),
            Color.FromRgb(255,255,255),
            Color.FromRgb(236,217,122),
            Color.FromRgb(240,216,82),
            Color.FromRgb(240,216,82),
            Color.FromRgb(240,216,82),
            Color.FromRgb(236,213,75),
            Color.FromRgb(201,162,69),
            Color.FromRgb(10,0,0),
            Color.FromRgb(255,255,255),
            Color.FromRgb(255,255,255),
            Color.FromRgb(255,255,255),},
            {Color.FromRgb(255,255,255),
            Color.FromRgb(255,255,255),
            Color.FromRgb(255,255,255),
            Color.FromRgb(0,0,0),
            Color.FromRgb(255,255,255),
            Color.FromRgb(236,217,122),
            Color.FromRgb(252,240,34),
            Color.FromRgb(255,255,172),
            Color.FromRgb(255,255,212),
            Color.FromRgb(247,239,53),
            Color.FromRgb(245,219,21),
            Color.FromRgb(213,162,37),
            Color.FromRgb(13,0,0),
            Color.FromRgb(255,255,255),
            Color.FromRgb(255,255,255),
            Color.FromRgb(255,255,255),},
            {Color.FromRgb(255,255,255),
            Color.FromRgb(255,255,255),
            Color.FromRgb(0,0,0),
            Color.FromRgb(255,255,255),
            Color.FromRgb(236,217,122),
            Color.FromRgb(252,240,34),
            Color.FromRgb(255,255,163),
            Color.FromRgb(238,237,84),
            Color.FromRgb(237,219,73),
            Color.FromRgb(14,7,0),
            Color.FromRgb(245,240,50),
            Color.FromRgb(246,216,34),
            Color.FromRgb(204,162,62),
            Color.FromRgb(10,0,0),
            Color.FromRgb(255,255,255),
            Color.FromRgb(255,255,255),},
            {Color.FromRgb(255,255,255),
            Color.FromRgb(255,255,255),
            Color.FromRgb(0,0,0),
            Color.FromRgb(255,255,255),
            Color.FromRgb(241,217,85),
            Color.FromRgb(252,244,13),
            Color.FromRgb(255,255,200),
            Color.FromRgb(241,241,55),
            Color.FromRgb(243,220,20),
            Color.FromRgb(11,3,0),
            Color.FromRgb(241,241,55),
            Color.FromRgb(243,220,20),
            Color.FromRgb(213,162,37),
            Color.FromRgb(13,0,0),
            Color.FromRgb(255,255,255),
            Color.FromRgb(255,255,255),},
            {Color.FromRgb(255,255,255),
            Color.FromRgb(255,255,255),
            Color.FromRgb(0,0,0),
            Color.FromRgb(255,255,255),
            Color.FromRgb(241,217,85),
            Color.FromRgb(252,244,13),
            Color.FromRgb(255,255,200),
            Color.FromRgb(241,241,55),
            Color.FromRgb(243,220,20),
            Color.FromRgb(11,3,0),
            Color.FromRgb(241,241,55),
            Color.FromRgb(243,220,20),
            Color.FromRgb(213,162,37),
            Color.FromRgb(13,0,0),
            Color.FromRgb(255,255,255),
            Color.FromRgb(255,255,255),},
            {Color.FromRgb(255,255,255),
            Color.FromRgb(255,255,255),
            Color.FromRgb(0,0,0),
            Color.FromRgb(255,255,255),
            Color.FromRgb(241,217,85),
            Color.FromRgb(252,244,13),
            Color.FromRgb(255,255,200),
            Color.FromRgb(241,241,55),
            Color.FromRgb(243,220,20),
            Color.FromRgb(11,3,0),
            Color.FromRgb(241,241,55),
            Color.FromRgb(243,220,20),
            Color.FromRgb(213,162,37),
            Color.FromRgb(13,0,0),
            Color.FromRgb(255,255,255),
            Color.FromRgb(255,255,255),},
            {Color.FromRgb(255,255,255),
            Color.FromRgb(255,255,255),
            Color.FromRgb(0,0,0),
            Color.FromRgb(255,255,255),
            Color.FromRgb(241,217,85),
            Color.FromRgb(252,244,13),
            Color.FromRgb(255,255,200),
            Color.FromRgb(241,241,55),
            Color.FromRgb(243,220,20),
            Color.FromRgb(11,3,0),
            Color.FromRgb(241,241,55),
            Color.FromRgb(243,220,20),
            Color.FromRgb(213,162,37),
            Color.FromRgb(13,0,0),
            Color.FromRgb(255,255,255),
            Color.FromRgb(255,255,255),},
            {Color.FromRgb(255,255,255),
            Color.FromRgb(255,255,255),
            Color.FromRgb(0,0,0),
            Color.FromRgb(255,255,255),
            Color.FromRgb(241,217,85),
            Color.FromRgb(252,244,13),
            Color.FromRgb(255,255,200),
            Color.FromRgb(241,241,55),
            Color.FromRgb(243,220,20),
            Color.FromRgb(11,3,0),
            Color.FromRgb(241,241,55),
            Color.FromRgb(243,220,20),
            Color.FromRgb(213,162,37),
            Color.FromRgb(13,0,0),
            Color.FromRgb(255,255,255),
            Color.FromRgb(255,255,255),},
            {Color.FromRgb(255,255,255),
            Color.FromRgb(255,255,255),
            Color.FromRgb(0,0,0),
            Color.FromRgb(255,255,255),
            Color.FromRgb(241,217,85),
            Color.FromRgb(252,244,13),
            Color.FromRgb(255,255,200),
            Color.FromRgb(238,220,74),
            Color.FromRgb(246,217,29),
            Color.FromRgb(11,3,0),
            Color.FromRgb(241,241,55),
            Color.FromRgb(243,220,20),
            Color.FromRgb(213,162,37),
            Color.FromRgb(13,0,0),
            Color.FromRgb(255,255,255),
            Color.FromRgb(255,255,255),},
            {Color.FromRgb(255,255,255),
            Color.FromRgb(255,255,255),
            Color.FromRgb(0,0,0),
            Color.FromRgb(255,255,255),
            Color.FromRgb(241,217,85),
            Color.FromRgb(252,244,13),
            Color.FromRgb(255,255,200),
            Color.FromRgb(241,217,85),
            Color.FromRgb(247,216,30),
            Color.FromRgb(11,3,0),
            Color.FromRgb(241,241,55),
            Color.FromRgb(243,220,20),
            Color.FromRgb(213,162,37),
            Color.FromRgb(13,0,0),
            Color.FromRgb(255,255,255),
            Color.FromRgb(255,255,255),},
            {Color.FromRgb(255,255,255),
            Color.FromRgb(255,255,255),
            Color.FromRgb(255,255,255),
            Color.FromRgb(5,5,5),
            Color.FromRgb(236,213,75),
            Color.FromRgb(252,244,13),
            Color.FromRgb(242,243,41),
            Color.FromRgb(14,7,0),
            Color.FromRgb(11,3,0),
            Color.FromRgb(238,237,85),
            Color.FromRgb(239,221,23),
            Color.FromRgb(211,166,23),
            Color.FromRgb(28,5,0),
            Color.FromRgb(255,255,248),
            Color.FromRgb(255,255,255),
            Color.FromRgb(255,255,255),},
            {Color.FromRgb(255,255,255),
            Color.FromRgb(255,255,255),
            Color.FromRgb(255,255,255),
            Color.FromRgb(0,0,0),
            Color.FromRgb(236,213,75),
            Color.FromRgb(245,219,21),
            Color.FromRgb(243,220,20),
            Color.FromRgb(239,214,60),
            Color.FromRgb(236,213,75),
            Color.FromRgb(242,218,32),
            Color.FromRgb(211,166,23),
            Color.FromRgb(215,159,50),
            Color.FromRgb(19,5,0),
            Color.FromRgb(255,255,255),
            Color.FromRgb(255,255,255),
            Color.FromRgb(255,255,255),},
            {Color.FromRgb(255,255,255),
            Color.FromRgb(255,255,255),
            Color.FromRgb(255,255,255),
            Color.FromRgb(255,255,255),
            Color.FromRgb(8,2,0),
            Color.FromRgb(11,3,0),
            Color.FromRgb(204,163,58),
            Color.FromRgb(213,162,37),
            Color.FromRgb(213,162,37),
            Color.FromRgb(213,162,37),
            Color.FromRgb(22,0,0),
            Color.FromRgb(13,0,0),
            Color.FromRgb(255,255,248),
            Color.FromRgb(255,255,255),
            Color.FromRgb(255,255,255),
            Color.FromRgb(255,255,255),},
            {Color.FromRgb(255,255,255),
            Color.FromRgb(255,255,255),
            Color.FromRgb(255,255,255),
            Color.FromRgb(255,255,255),
            Color.FromRgb(255,255,255),
            Color.FromRgb(255,255,255),
            Color.FromRgb(10,0,0),
            Color.FromRgb(13,0,0),
            Color.FromRgb(13,0,0),
            Color.FromRgb(13,0,0),
            Color.FromRgb(255,255,248),
            Color.FromRgb(255,255,255),
            Color.FromRgb(255,255,255),
            Color.FromRgb(255,255,255),
            Color.FromRgb(255,255,255),
            Color.FromRgb(255,255,255),},
        };

        private static Color[,] Mario = new Color[,]
        {
            {Color.FromRgb(255,255,255),
            Color.FromRgb(255,255,255),
            Color.FromRgb(255,255,255),
            Color.FromRgb(216,0,0),
            Color.FromRgb(216,0,0),
            Color.FromRgb(216,0,0),
            Color.FromRgb(216,0,0),
            Color.FromRgb(216,0,0),
            Color.FromRgb(255,255,255),
            Color.FromRgb(255,255,255),
            Color.FromRgb(255,255,255),
            Color.FromRgb(255,255,255),},
            {Color.FromRgb(255,255,255),
            Color.FromRgb(255,255,255),
            Color.FromRgb(216,0,0),
            Color.FromRgb(216,0,0),
            Color.FromRgb(216,0,0),
            Color.FromRgb(216,0,0),
            Color.FromRgb(216,0,0),
            Color.FromRgb(216,0,0),
            Color.FromRgb(216,0,0),
            Color.FromRgb(216,0,0),
            Color.FromRgb(216,0,0),
            Color.FromRgb(255,255,255),},
            {Color.FromRgb(255,255,255),
            Color.FromRgb(255,255,255),
            Color.FromRgb(112,104,0),
            Color.FromRgb(112,104,0),
            Color.FromRgb(112,104,0),
            Color.FromRgb(248,171,0),
            Color.FromRgb(248,171,0),
            Color.FromRgb(112,104,0),
            Color.FromRgb(248,171,0),
            Color.FromRgb(255,255,255),
            Color.FromRgb(255,255,255),
            Color.FromRgb(255,255,255),},
            {Color.FromRgb(255,255,255),
            Color.FromRgb(112,104,0),
            Color.FromRgb(248,171,0),
            Color.FromRgb(112,104,0),
            Color.FromRgb(248,171,0),
            Color.FromRgb(248,171,0),
            Color.FromRgb(248,171,0),
            Color.FromRgb(112,104,0),
            Color.FromRgb(248,171,0),
            Color.FromRgb(248,171,0),
            Color.FromRgb(248,171,0),
            Color.FromRgb(255,255,255),},
            {Color.FromRgb(255,255,255),
            Color.FromRgb(112,104,0),
            Color.FromRgb(248,171,0),
            Color.FromRgb(112,104,0),
            Color.FromRgb(112,104,0),
            Color.FromRgb(248,171,0),
            Color.FromRgb(248,171,0),
            Color.FromRgb(248,171,0),
            Color.FromRgb(112,104,0),
            Color.FromRgb(248,171,0),
            Color.FromRgb(248,171,0),
            Color.FromRgb(248,171,0),},
            {Color.FromRgb(255,255,255),
            Color.FromRgb(112,104,0),
            Color.FromRgb(112,104,0),
            Color.FromRgb(248,171,0),
            Color.FromRgb(248,171,0),
            Color.FromRgb(248,171,0),
            Color.FromRgb(248,171,0),
            Color.FromRgb(112,104,0),
            Color.FromRgb(112,104,0),
            Color.FromRgb(112,104,0),
            Color.FromRgb(112,104,0),
            Color.FromRgb(255,255,255),},
            {Color.FromRgb(255,255,255),
            Color.FromRgb(255,255,255),
            Color.FromRgb(255,255,255),
            Color.FromRgb(248,171,0),
            Color.FromRgb(248,171,0),
            Color.FromRgb(248,171,0),
            Color.FromRgb(248,171,0),
            Color.FromRgb(248,171,0),
            Color.FromRgb(248,171,0),
            Color.FromRgb(248,171,0),
            Color.FromRgb(255,255,255),
            Color.FromRgb(255,255,255),},
            {Color.FromRgb(255,255,255),
            Color.FromRgb(255,255,255),
            Color.FromRgb(112,104,0),
            Color.FromRgb(112,104,0),
            Color.FromRgb(216,0,0),
            Color.FromRgb(112,104,0),
            Color.FromRgb(112,104,0),
            Color.FromRgb(216,0,0),
            Color.FromRgb(255,255,255),
            Color.FromRgb(255,255,255),
            Color.FromRgb(255,255,255),
            Color.FromRgb(255,255,255),},
            {Color.FromRgb(255,255,255),
            Color.FromRgb(112,104,0),
            Color.FromRgb(112,104,0),
            Color.FromRgb(112,104,0),
            Color.FromRgb(216,0,0),
            Color.FromRgb(112,104,0),
            Color.FromRgb(112,104,0),
            Color.FromRgb(216,0,0),
            Color.FromRgb(112,104,0),
            Color.FromRgb(112,104,0),
            Color.FromRgb(112,104,0),
            Color.FromRgb(255,255,255),},
            {Color.FromRgb(112,104,0),
            Color.FromRgb(112,104,0),
            Color.FromRgb(112,104,0),
            Color.FromRgb(112,104,0),
            Color.FromRgb(216,0,0),
            Color.FromRgb(216,0,0),
            Color.FromRgb(216,0,0),
            Color.FromRgb(216,0,0),
            Color.FromRgb(112,104,0),
            Color.FromRgb(112,104,0),
            Color.FromRgb(112,104,0),
            Color.FromRgb(112,104,0),},
            {Color.FromRgb(248,171,0),
            Color.FromRgb(248,171,0),
            Color.FromRgb(112,104,0),
            Color.FromRgb(216,0,0),
            Color.FromRgb(248,171,0),
            Color.FromRgb(216,0,0),
            Color.FromRgb(216,0,0),
            Color.FromRgb(248,171,0),
            Color.FromRgb(216,0,0),
            Color.FromRgb(112,104,0),
            Color.FromRgb(248,171,0),
            Color.FromRgb(248,171,0),},
            {Color.FromRgb(248,171,0),
            Color.FromRgb(248,171,0),
            Color.FromRgb(248,171,0),
            Color.FromRgb(216,0,0),
            Color.FromRgb(216,0,0),
            Color.FromRgb(216,0,0),
            Color.FromRgb(216,0,0),
            Color.FromRgb(216,0,0),
            Color.FromRgb(216,0,0),
            Color.FromRgb(248,171,0),
            Color.FromRgb(248,171,0),
            Color.FromRgb(248,171,0),},
            {Color.FromRgb(248,171,0),
            Color.FromRgb(248,171,0),
            Color.FromRgb(216,0,0),
            Color.FromRgb(216,0,0),
            Color.FromRgb(216,0,0),
            Color.FromRgb(216,0,0),
            Color.FromRgb(216,0,0),
            Color.FromRgb(216,0,0),
            Color.FromRgb(216,0,0),
            Color.FromRgb(216,0,0),
            Color.FromRgb(248,171,0),
            Color.FromRgb(248,171,0),},
            {Color.FromRgb(255,255,255),
            Color.FromRgb(255,255,255),
            Color.FromRgb(216,0,0),
            Color.FromRgb(216,0,0),
            Color.FromRgb(216,0,0),
            Color.FromRgb(255,255,255),
            Color.FromRgb(255,255,255),
            Color.FromRgb(216,0,0),
            Color.FromRgb(216,0,0),
            Color.FromRgb(216,0,0),
            Color.FromRgb(255,255,255),
            Color.FromRgb(255,255,255),},
            {Color.FromRgb(255,255,255),
            Color.FromRgb(112,104,0),
            Color.FromRgb(112,104,0),
            Color.FromRgb(112,104,0),
            Color.FromRgb(255,255,255),
            Color.FromRgb(255,255,255),
            Color.FromRgb(255,255,255),
            Color.FromRgb(255,255,255),
            Color.FromRgb(112,104,0),
            Color.FromRgb(112,104,0),
            Color.FromRgb(112,104,0),
            Color.FromRgb(255,255,255),},
            {Color.FromRgb(112,104,0),
            Color.FromRgb(112,104,0),
            Color.FromRgb(112,104,0),
            Color.FromRgb(112,104,0),
            Color.FromRgb(255,255,255),
            Color.FromRgb(255,255,255),
            Color.FromRgb(255,255,255),
            Color.FromRgb(255,255,255),
            Color.FromRgb(112,104,0),
            Color.FromRgb(112,104,0),
            Color.FromRgb(112,104,0),
            Color.FromRgb(112,104,0),}
        };

        private static Color[,] LogoEn = new Color[,]
        {
            {Color.FromRgb(0,0,0),
            Color.FromRgb(0,0,0),
            Color.FromRgb(0,0,0),
            Color.FromRgb(0,0,0),
            Color.FromRgb(0,0,0),
            Color.FromRgb(0,0,0),
            Color.FromRgb(0,0,0),
            Color.FromRgb(0,0,0),
            Color.FromRgb(0,0,0),
            Color.FromRgb(0,0,0),
            Color.FromRgb(0,0,0),
            Color.FromRgb(177,219,251),
            Color.FromRgb(140,202,248),
            Color.FromRgb(134,200,248),
            Color.FromRgb(122,194,247),
            Color.FromRgb(123,196,248),
            Color.FromRgb(123,196,248),
            Color.FromRgb(122,194,247),
            Color.FromRgb(134,200,248),
            Color.FromRgb(140,202,248),
            Color.FromRgb(177,219,251),
            Color.FromRgb(0,0,0),
            Color.FromRgb(0,0,0),
            Color.FromRgb(0,0,0),
            Color.FromRgb(0,0,0),
            Color.FromRgb(0,0,0),
            Color.FromRgb(0,0,0),
            Color.FromRgb(0,0,0),
            Color.FromRgb(0,0,0),
            Color.FromRgb(0,0,0),
            Color.FromRgb(0,0,0),
            Color.FromRgb(0,0,0)},
            {Color.FromRgb(0,0,0),
            Color.FromRgb(0,0,0),
            Color.FromRgb(0,0,0),
            Color.FromRgb(0,0,0),
            Color.FromRgb(0,0,0),
            Color.FromRgb(0,0,0),
            Color.FromRgb(0,0,0),
            Color.FromRgb(0,0,0),
            Color.FromRgb(165,216,250),
            Color.FromRgb(161,213,249),
            Color.FromRgb(124,196,247),
            Color.FromRgb(75,174,246),
            Color.FromRgb(63,169,245),
            Color.FromRgb(63,169,245),
            Color.FromRgb(63,169,245),
            Color.FromRgb(63,169,245),
            Color.FromRgb(63,169,245),
            Color.FromRgb(63,169,245),
            Color.FromRgb(63,169,245),
            Color.FromRgb(63,169,245),
            Color.FromRgb(75,174,246),
            Color.FromRgb(124,196,247),
            Color.FromRgb(161,213,249),
            Color.FromRgb(165,216,250),
            Color.FromRgb(0,0,0),
            Color.FromRgb(0,0,0),
            Color.FromRgb(0,0,0),
            Color.FromRgb(0,0,0),
            Color.FromRgb(0,0,0),
            Color.FromRgb(0,0,0),
            Color.FromRgb(0,0,0),
            Color.FromRgb(0,0,0)},
            {Color.FromRgb(0,0,0),
            Color.FromRgb(0,0,0),
            Color.FromRgb(0,0,0),
            Color.FromRgb(0,0,0),
            Color.FromRgb(0,0,0),
            Color.FromRgb(0,0,0),
            Color.FromRgb(0,0,0),
            Color.FromRgb(168,215,250),
            Color.FromRgb(111,191,248),
            Color.FromRgb(63,169,245),
            Color.FromRgb(63,169,245),
            Color.FromRgb(63,169,245),
            Color.FromRgb(63,169,245),
            Color.FromRgb(63,169,245),
            Color.FromRgb(63,169,245),
            Color.FromRgb(63,169,245),
            Color.FromRgb(63,169,245),
            Color.FromRgb(63,169,245),
            Color.FromRgb(63,169,245),
            Color.FromRgb(63,169,245),
            Color.FromRgb(63,169,245),
            Color.FromRgb(63,169,245),
            Color.FromRgb(63,169,245),
            Color.FromRgb(124,196,247),
            Color.FromRgb(168,215,250),
            Color.FromRgb(0,0,0),
            Color.FromRgb(0,0,0),
            Color.FromRgb(0,0,0),
            Color.FromRgb(0,0,0),
            Color.FromRgb(0,0,0),
            Color.FromRgb(0,0,0),
            Color.FromRgb(0,0,0)},
            {Color.FromRgb(0,0,0),
            Color.FromRgb(0,0,0),
            Color.FromRgb(0,0,0),
            Color.FromRgb(0,0,0),
            Color.FromRgb(0,0,0),
            Color.FromRgb(165,216,250),
            Color.FromRgb(157,210,250),
            Color.FromRgb(75,174,246),
            Color.FromRgb(63,169,245),
            Color.FromRgb(63,169,245),
            Color.FromRgb(63,169,245),
            Color.FromRgb(63,169,245),
            Color.FromRgb(63,169,245),
            Color.FromRgb(63,169,245),
            Color.FromRgb(75,174,246),
            Color.FromRgb(111,191,248),
            Color.FromRgb(111,191,248),
            Color.FromRgb(75,174,246),
            Color.FromRgb(63,169,245),
            Color.FromRgb(63,169,245),
            Color.FromRgb(63,169,245),
            Color.FromRgb(63,169,245),
            Color.FromRgb(63,169,245),
            Color.FromRgb(63,169,245),
            Color.FromRgb(75,174,246),
            Color.FromRgb(157,210,250),
            Color.FromRgb(165,216,250),
            Color.FromRgb(0,0,0),
            Color.FromRgb(0,0,0),
            Color.FromRgb(0,0,0),
            Color.FromRgb(0,0,0),
            Color.FromRgb(0,0,0)},
            {Color.FromRgb(0,0,0),
            Color.FromRgb(0,0,0),
            Color.FromRgb(0,0,0),
            Color.FromRgb(0,0,0),
            Color.FromRgb(169,216,252),
            Color.FromRgb(124,196,247),
            Color.FromRgb(63,169,245),
            Color.FromRgb(63,169,245),
            Color.FromRgb(63,169,245),
            Color.FromRgb(63,169,245),
            Color.FromRgb(63,169,245),
            Color.FromRgb(123,196,248),
            Color.FromRgb(123,196,248),
            Color.FromRgb(123,196,248),
            Color.FromRgb(111,191,248),
            Color.FromRgb(63,169,245),
            Color.FromRgb(64,169,245),
            Color.FromRgb(111,191,248),
            Color.FromRgb(123,196,248),
            Color.FromRgb(123,196,248),
            Color.FromRgb(123,196,248),
            Color.FromRgb(63,169,245),
            Color.FromRgb(63,169,245),
            Color.FromRgb(63,169,245),
            Color.FromRgb(63,169,245),
            Color.FromRgb(63,169,245),
            Color.FromRgb(137,203,248),
            Color.FromRgb(169,216,252),
            Color.FromRgb(0,0,0),
            Color.FromRgb(0,0,0),
            Color.FromRgb(0,0,0),
            Color.FromRgb(0,0,0)},
            {Color.FromRgb(0,0,0),
            Color.FromRgb(0,0,0),
            Color.FromRgb(0,0,0),
            Color.FromRgb(165,216,250),
            Color.FromRgb(124,196,247),
            Color.FromRgb(63,169,245),
            Color.FromRgb(63,169,245),
            Color.FromRgb(63,169,245),
            Color.FromRgb(63,169,245),
            Color.FromRgb(123,196,248),
            Color.FromRgb(135,201,249),
            Color.FromRgb(75,174,246),
            Color.FromRgb(69,172,245),
            Color.FromRgb(74,174,246),
            Color.FromRgb(77,175,246),
            Color.FromRgb(79,176,246),
            Color.FromRgb(80,176,246),
            Color.FromRgb(79,176,246),
            Color.FromRgb(77,175,246),
            Color.FromRgb(74,174,246),
            Color.FromRgb(81,177,246),
            Color.FromRgb(135,201,249),
            Color.FromRgb(111,191,248),
            Color.FromRgb(63,169,245),
            Color.FromRgb(63,169,245),
            Color.FromRgb(63,169,245),
            Color.FromRgb(63,169,245),
            Color.FromRgb(124,196,247),
            Color.FromRgb(165,216,250),
            Color.FromRgb(0,0,0),
            Color.FromRgb(0,0,0),
            Color.FromRgb(0,0,0)},
            {Color.FromRgb(0,0,0),
            Color.FromRgb(0,0,0),
            Color.FromRgb(0,0,0),
            Color.FromRgb(157,210,250),
            Color.FromRgb(63,169,245),
            Color.FromRgb(63,169,245),
            Color.FromRgb(63,169,245),
            Color.FromRgb(75,174,246),
            Color.FromRgb(147,207,249),
            Color.FromRgb(75,174,246),
            Color.FromRgb(70,172,245),
            Color.FromRgb(77,175,246),
            Color.FromRgb(83,178,246),
            Color.FromRgb(89,180,246),
            Color.FromRgb(81,174,240),
            Color.FromRgb(63,159,227),
            Color.FromRgb(96,184,247),
            Color.FromRgb(95,183,247),
            Color.FromRgb(92,182,247),
            Color.FromRgb(89,180,246),
            Color.FromRgb(83,178,246),
            Color.FromRgb(77,175,246),
            Color.FromRgb(92,182,246),
            Color.FromRgb(147,207,249),
            Color.FromRgb(75,174,246),
            Color.FromRgb(63,169,245),
            Color.FromRgb(63,169,245),
            Color.FromRgb(63,169,245),
            Color.FromRgb(157,210,250),
            Color.FromRgb(0,0,0),
            Color.FromRgb(0,0,0),
            Color.FromRgb(0,0,0)},
            {Color.FromRgb(0,0,0),
            Color.FromRgb(0,0,0),
            Color.FromRgb(168,215,250),
            Color.FromRgb(75,174,246),
            Color.FromRgb(63,169,245),
            Color.FromRgb(63,169,245),
            Color.FromRgb(75,174,246),
            Color.FromRgb(147,207,249),
            Color.FromRgb(64,169,245),
            Color.FromRgb(74,174,246),
            Color.FromRgb(83,178,246),
            Color.FromRgb(91,181,246),
            Color.FromRgb(98,185,247),
            Color.FromRgb(91,178,240),
            Color.FromRgb(37,135,199),
            Color.FromRgb(255,255,255),
            Color.FromRgb(93,168,219),
            Color.FromRgb(110,190,247),
            Color.FromRgb(108,189,247),
            Color.FromRgb(104,187,247),
            Color.FromRgb(98,185,247),
            Color.FromRgb(91,181,246),
            Color.FromRgb(83,178,246),
            Color.FromRgb(74,174,246),
            Color.FromRgb(147,207,249),
            Color.FromRgb(75,174,246),
            Color.FromRgb(63,169,245),
            Color.FromRgb(63,169,245),
            Color.FromRgb(75,174,246),
            Color.FromRgb(168,215,250),
            Color.FromRgb(0,0,0),
            Color.FromRgb(0,0,0)},
            {Color.FromRgb(0,0,0),
            Color.FromRgb(165,216,250),
            Color.FromRgb(111,191,248),
            Color.FromRgb(63,169,245),
            Color.FromRgb(55,162,238),
            Color.FromRgb(32,141,217),
            Color.FromRgb(55,148,210),
            Color.FromRgb(24,134,209),
            Color.FromRgb(28,135,210),
            Color.FromRgb(32,138,210),
            Color.FromRgb(41,143,213),
            Color.FromRgb(59,155,221),
            Color.FromRgb(75,164,228),
            Color.FromRgb(67,159,222),
            Color.FromRgb(85,160,210),
            Color.FromRgb(255,255,255),
            Color.FromRgb(64,150,208),
            Color.FromRgb(126,197,248),
            Color.FromRgb(82,167,228),
            Color.FromRgb(67,159,222),
            Color.FromRgb(64,156,222),
            Color.FromRgb(58,155,221),
            Color.FromRgb(63,160,227),
            Color.FromRgb(86,179,246),
            Color.FromRgb(66,166,239),
            Color.FromRgb(83,165,222),
            Color.FromRgb(35,144,220),
            Color.FromRgb(35,144,220),
            Color.FromRgb(35,144,220),
            Color.FromRgb(62,156,222),
            Color.FromRgb(104,178,227),
            Color.FromRgb(0,0,0)},
            {Color.FromRgb(0,0,0),
            Color.FromRgb(157,210,249),
            Color.FromRgb(63,169,245),
            Color.FromRgb(23,134,209),
            Color.FromRgb(87,162,212),
            Color.FromRgb(153,198,228),
            Color.FromRgb(255,255,255),
            Color.FromRgb(255,255,255),
            Color.FromRgb(255,255,255),
            Color.FromRgb(255,255,255),
            Color.FromRgb(255,255,255),
            Color.FromRgb(255,255,255),
            Color.FromRgb(255,255,255),
            Color.FromRgb(255,255,255),
            Color.FromRgb(204,227,242),
            Color.FromRgb(102,170,215),
            Color.FromRgb(19,125,195),
            Color.FromRgb(122,181,221),
            Color.FromRgb(187,217,237),
            Color.FromRgb(255,255,255),
            Color.FromRgb(255,255,255),
            Color.FromRgb(255,255,255),
            Color.FromRgb(51,144,206),
            Color.FromRgb(98,185,247),
            Color.FromRgb(19,127,200),
            Color.FromRgb(170,208,233),
            Color.FromRgb(255,255,255),
            Color.FromRgb(255,255,255),
            Color.FromRgb(255,255,255),
            Color.FromRgb(238,246,251),
            Color.FromRgb(44,141,206),
            Color.FromRgb(0,0,0)},
            {Color.FromRgb(0,0,0),
            Color.FromRgb(109,185,239),
            Color.FromRgb(9,120,196),
            Color.FromRgb(187,217,237),
            Color.FromRgb(170,208,233),
            Color.FromRgb(85,160,210),
            Color.FromRgb(0,113,188),
            Color.FromRgb(0,113,188),
            Color.FromRgb(51,141,201),
            Color.FromRgb(255,255,255),
            Color.FromRgb(153,198,228),
            Color.FromRgb(0,113,188),
            Color.FromRgb(0,113,188),
            Color.FromRgb(0,113,188),
            Color.FromRgb(0,113,188),
            Color.FromRgb(36,133,198),
            Color.FromRgb(221,236,246),
            Color.FromRgb(153,198,228),
            Color.FromRgb(85,160,210),
            Color.FromRgb(34,132,197),
            Color.FromRgb(255,255,255),
            Color.FromRgb(204,227,242),
            Color.FromRgb(34,136,204),
            Color.FromRgb(108,189,247),
            Color.FromRgb(22,129,202),
            Color.FromRgb(0,113,188),
            Color.FromRgb(119,179,219),
            Color.FromRgb(238,246,251),
            Color.FromRgb(119,179,219),
            Color.FromRgb(8,120,196),
            Color.FromRgb(87,171,230),
            Color.FromRgb(0,0,0)},
            {Color.FromRgb(177,219,251),
            Color.FromRgb(25,133,207),
            Color.FromRgb(153,198,228),
            Color.FromRgb(85,160,210),
            Color.FromRgb(6,117,191),
            Color.FromRgb(28,135,210),
            Color.FromRgb(40,145,218),
            Color.FromRgb(29,135,207),
            Color.FromRgb(102,170,215),
            Color.FromRgb(255,255,255),
            Color.FromRgb(102,170,215),
            Color.FromRgb(46,143,208),
            Color.FromRgb(57,149,211),
            Color.FromRgb(68,156,214),
            Color.FromRgb(15,123,194),
            Color.FromRgb(221,236,246),
            Color.FromRgb(51,141,201),
            Color.FromRgb(32,132,200),
            Color.FromRgb(41,138,203),
            Color.FromRgb(102,170,215),
            Color.FromRgb(255,255,255),
            Color.FromRgb(119,179,219),
            Color.FromRgb(73,161,222),
            Color.FromRgb(118,194,248),
            Color.FromRgb(29,134,204),
            Color.FromRgb(119,179,219),
            Color.FromRgb(204,227,242),
            Color.FromRgb(39,135,200),
            Color.FromRgb(35,144,220),
            Color.FromRgb(63,169,245),
            Color.FromRgb(75,174,246),
            Color.FromRgb(177,219,251)},
            {Color.FromRgb(103,178,230),
            Color.FromRgb(85,160,210),
            Color.FromRgb(170,208,233),
            Color.FromRgb(9,120,196),
            Color.FromRgb(94,177,233),
            Color.FromRgb(69,172,245),
            Color.FromRgb(84,178,246),
            Color.FromRgb(37,140,210),
            Color.FromRgb(153,198,228),
            Color.FromRgb(255,255,255),
            Color.FromRgb(39,135,200),
            Color.FromRgb(153,209,250),
            Color.FromRgb(165,215,250),
            Color.FromRgb(98,172,223),
            Color.FromRgb(102,170,215),
            Color.FromRgb(170,208,233),
            Color.FromRgb(40,137,202),
            Color.FromRgb(189,226,252),
            Color.FromRgb(68,154,211),
            Color.FromRgb(153,198,228),
            Color.FromRgb(255,255,255),
            Color.FromRgb(73,154,208),
            Color.FromRgb(123,192,241),
            Color.FromRgb(17,125,196),
            Color.FromRgb(187,217,237),
            Color.FromRgb(170,208,233),
            Color.FromRgb(12,123,197),
            Color.FromRgb(96,177,233),
            Color.FromRgb(63,169,245),
            Color.FromRgb(63,169,245),
            Color.FromRgb(63,169,245),
            Color.FromRgb(149,206,249)},
            {Color.FromRgb(45,143,210),
            Color.FromRgb(153,198,228),
            Color.FromRgb(119,179,219),
            Color.FromRgb(32,141,217),
            Color.FromRgb(123,196,248),
            Color.FromRgb(74,174,246),
            Color.FromRgb(89,181,246),
            Color.FromRgb(19,127,199),
            Color.FromRgb(221,236,246),
            Color.FromRgb(221,236,246),
            Color.FromRgb(32,133,201),
            Color.FromRgb(162,214,250),
            Color.FromRgb(175,219,251),
            Color.FromRgb(70,155,211),
            Color.FromRgb(136,189,224),
            Color.FromRgb(221,236,246),
            Color.FromRgb(48,141,203),
            Color.FromRgb(205,232,252),
            Color.FromRgb(37,135,200),
            Color.FromRgb(221,236,246),
            Color.FromRgb(238,246,251),
            Color.FromRgb(12,120,193),
            Color.FromRgb(40,135,200),
            Color.FromRgb(204,227,242),
            Color.FromRgb(102,170,215),
            Color.FromRgb(14,123,196),
            Color.FromRgb(78,172,239),
            Color.FromRgb(131,199,249),
            Color.FromRgb(63,169,245),
            Color.FromRgb(63,169,245),
            Color.FromRgb(63,169,245),
            Color.FromRgb(122,194,247)},
            {Color.FromRgb(46,142,208),
            Color.FromRgb(204,227,242),
            Color.FromRgb(119,179,219),
            Color.FromRgb(62,160,229),
            Color.FromRgb(99,185,247),
            Color.FromRgb(77,175,246),
            Color.FromRgb(93,182,247),
            Color.FromRgb(34,132,197),
            Color.FromRgb(255,255,255),
            Color.FromRgb(153,198,228),
            Color.FromRgb(64,153,214),
            Color.FromRgb(169,217,251),
            Color.FromRgb(184,223,251),
            Color.FromRgb(131,189,230),
            Color.FromRgb(85,160,210),
            Color.FromRgb(238,246,251),
            Color.FromRgb(35,132,197),
            Color.FromRgb(219,239,253),
            Color.FromRgb(34,132,197),
            Color.FromRgb(255,255,255),
            Color.FromRgb(187,217,237),
            Color.FromRgb(119,179,219),
            Color.FromRgb(187,217,237),
            Color.FromRgb(34,132,197),
            Color.FromRgb(34,136,204),
            Color.FromRgb(108,189,247),
            Color.FromRgb(93,182,247),
            Color.FromRgb(111,190,248),
            Color.FromRgb(87,180,246),
            Color.FromRgb(63,169,245),
            Color.FromRgb(63,169,245),
            Color.FromRgb(131,200,249)},
            {Color.FromRgb(46,146,213),
            Color.FromRgb(187,217,237),
            Color.FromRgb(238,246,251),
            Color.FromRgb(40,139,206),
            Color.FromRgb(64,169,245),
            Color.FromRgb(80,176,246),
            Color.FromRgb(63,160,227),
            Color.FromRgb(102,170,215),
            Color.FromRgb(255,255,255),
            Color.FromRgb(102,170,215),
            Color.FromRgb(89,168,222),
            Color.FromRgb(174,219,251),
            Color.FromRgb(189,226,252),
            Color.FromRgb(205,232,252),
            Color.FromRgb(75,156,210),
            Color.FromRgb(39,136,199),
            Color.FromRgb(144,195,228),
            Color.FromRgb(130,187,225),
            Color.FromRgb(102,170,215),
            Color.FromRgb(255,255,255),
            Color.FromRgb(255,255,255),
            Color.FromRgb(255,255,255),
            Color.FromRgb(119,179,219),
            Color.FromRgb(60,152,213),
            Color.FromRgb(127,198,248),
            Color.FromRgb(111,191,248),
            Color.FromRgb(95,184,247),
            Color.FromRgb(80,176,246),
            Color.FromRgb(111,191,248),
            Color.FromRgb(63,169,245),
            Color.FromRgb(63,169,245),
            Color.FromRgb(111,191,248)},
            {Color.FromRgb(73,164,228),
            Color.FromRgb(102,170,215),
            Color.FromRgb(255,255,255),
            Color.FromRgb(55,145,204),
            Color.FromRgb(65,170,245),
            Color.FromRgb(80,177,246),
            Color.FromRgb(40,143,213),
            Color.FromRgb(153,198,228),
            Color.FromRgb(255,255,255),
            Color.FromRgb(68,151,206),
            Color.FromRgb(159,212,250),
            Color.FromRgb(176,220,251),
            Color.FromRgb(192,227,252),
            Color.FromRgb(208,234,253),
            Color.FromRgb(223,241,253),
            Color.FromRgb(239,248,254),
            Color.FromRgb(255,255,255),
            Color.FromRgb(89,163,213),
            Color.FromRgb(153,198,228),
            Color.FromRgb(255,255,255),
            Color.FromRgb(136,189,224),
            Color.FromRgb(255,255,255),
            Color.FromRgb(238,246,251),
            Color.FromRgb(61,150,211),
            Color.FromRgb(128,198,248),
            Color.FromRgb(112,191,248),
            Color.FromRgb(96,184,247),
            Color.FromRgb(80,177,246),
            Color.FromRgb(112,191,248),
            Color.FromRgb(63,169,245),
            Color.FromRgb(63,169,245),
            Color.FromRgb(111,191,248)},
            {Color.FromRgb(128,198,248),
            Color.FromRgb(26,136,212),
            Color.FromRgb(6,118,193),
            Color.FromRgb(40,144,215),
            Color.FromRgb(100,185,247),
            Color.FromRgb(80,176,246),
            Color.FromRgb(22,129,201),
            Color.FromRgb(221,236,246),
            Color.FromRgb(238,246,251),
            Color.FromRgb(26,130,199),
            Color.FromRgb(159,212,250),
            Color.FromRgb(174,219,251),
            Color.FromRgb(189,226,252),
            Color.FromRgb(205,232,252),
            Color.FromRgb(220,239,253),
            Color.FromRgb(233,245,254),
            Color.FromRgb(239,248,254),
            Color.FromRgb(43,138,200),
            Color.FromRgb(221,236,246),
            Color.FromRgb(238,246,251),
            Color.FromRgb(0,113,188),
            Color.FromRgb(170,208,233),
            Color.FromRgb(255,255,255),
            Color.FromRgb(122,181,221),
            Color.FromRgb(127,198,248),
            Color.FromRgb(111,191,248),
            Color.FromRgb(95,184,247),
            Color.FromRgb(113,191,248),
            Color.FromRgb(87,180,246),
            Color.FromRgb(63,169,245),
            Color.FromRgb(63,169,245),
            Color.FromRgb(131,200,249)},
            {Color.FromRgb(122,194,247),
            Color.FromRgb(63,169,245),
            Color.FromRgb(63,169,245),
            Color.FromRgb(63,169,245),
            Color.FromRgb(123,196,248),
            Color.FromRgb(77,175,246),
            Color.FromRgb(37,135,199),
            Color.FromRgb(255,255,255),
            Color.FromRgb(187,217,237),
            Color.FromRgb(52,147,210),
            Color.FromRgb(155,210,250),
            Color.FromRgb(170,217,251),
            Color.FromRgb(184,223,251),
            Color.FromRgb(198,229,252),
            Color.FromRgb(211,235,253),
            Color.FromRgb(220,239,253),
            Color.FromRgb(223,241,253),
            Color.FromRgb(34,132,197),
            Color.FromRgb(255,255,255),
            Color.FromRgb(170,208,233),
            Color.FromRgb(39,136,201),
            Color.FromRgb(85,160,210),
            Color.FromRgb(255,255,255),
            Color.FromRgb(187,217,237),
            Color.FromRgb(64,156,219),
            Color.FromRgb(108,189,247),
            Color.FromRgb(93,182,247),
            Color.FromRgb(133,200,249),
            Color.FromRgb(63,169,245),
            Color.FromRgb(63,169,245),
            Color.FromRgb(63,169,245),
            Color.FromRgb(122,194,247)},
            {Color.FromRgb(149,206,249),
            Color.FromRgb(63,169,245),
            Color.FromRgb(63,169,245),
            Color.FromRgb(63,169,245),
            Color.FromRgb(135,201,249),
            Color.FromRgb(49,154,226),
            Color.FromRgb(102,170,215),
            Color.FromRgb(255,255,255),
            Color.FromRgb(119,179,219),
            Color.FromRgb(76,162,222),
            Color.FromRgb(149,207,249),
            Color.FromRgb(162,214,250),
            Color.FromRgb(176,220,251),
            Color.FromRgb(188,225,252),
            Color.FromRgb(198,229,252),
            Color.FromRgb(205,233,252),
            Color.FromRgb(107,175,222),
            Color.FromRgb(119,179,219),
            Color.FromRgb(255,255,255),
            Color.FromRgb(102,170,215),
            Color.FromRgb(116,184,229),
            Color.FromRgb(22,127,196),
            Color.FromRgb(221,236,246),
            Color.FromRgb(238,246,251),
            Color.FromRgb(48,143,207),
            Color.FromRgb(104,188,247),
            Color.FromRgb(89,181,246),
            Color.FromRgb(129,198,249),
            Color.FromRgb(63,169,245),
            Color.FromRgb(63,169,245),
            Color.FromRgb(63,169,245),
            Color.FromRgb(149,206,249)},
            {Color.FromRgb(177,219,251),
            Color.FromRgb(63,169,245),
            Color.FromRgb(63,169,245),
            Color.FromRgb(63,169,245),
            Color.FromRgb(123,196,248),
            Color.FromRgb(29,138,212),
            Color.FromRgb(170,208,233),
            Color.FromRgb(255,255,255),
            Color.FromRgb(68,151,206),
            Color.FromRgb(127,198,248),
            Color.FromRgb(141,204,249),
            Color.FromRgb(153,209,250),
            Color.FromRgb(165,215,250),
            Color.FromRgb(176,220,251),
            Color.FromRgb(184,223,251),
            Color.FromRgb(189,226,252),
            Color.FromRgb(63,150,209),
            Color.FromRgb(187,217,237),
            Color.FromRgb(255,255,255),
            Color.FromRgb(40,135,200),
            Color.FromRgb(165,215,250),
            Color.FromRgb(64,153,214),
            Color.FromRgb(136,189,224),
            Color.FromRgb(255,255,255),
            Color.FromRgb(105,172,217),
            Color.FromRgb(98,185,247),
            Color.FromRgb(84,178,246),
            Color.FromRgb(125,197,248),
            Color.FromRgb(63,169,245),
            Color.FromRgb(63,169,245),
            Color.FromRgb(75,174,246),
            Color.FromRgb(177,219,251)},
            {Color.FromRgb(164,213,246),
            Color.FromRgb(124,196,247),
            Color.FromRgb(63,169,245),
            Color.FromRgb(63,169,245),
            Color.FromRgb(50,154,226),
            Color.FromRgb(125,183,222),
            Color.FromRgb(255,255,255),
            Color.FromRgb(255,255,255),
            Color.FromRgb(30,132,200),
            Color.FromRgb(119,194,248),
            Color.FromRgb(87,171,229),
            Color.FromRgb(143,205,249),
            Color.FromRgb(153,209,250),
            Color.FromRgb(162,214,250),
            Color.FromRgb(170,217,251),
            Color.FromRgb(153,206,243),
            Color.FromRgb(123,181,221),
            Color.FromRgb(255,255,255),
            Color.FromRgb(238,246,251),
            Color.FromRgb(30,132,199),
            Color.FromRgb(153,209,250),
            Color.FromRgb(109,183,234),
            Color.FromRgb(68,151,206),
            Color.FromRgb(255,255,255),
            Color.FromRgb(170,208,233),
            Color.FromRgb(52,152,220),
            Color.FromRgb(143,205,249),
            Color.FromRgb(75,174,246),
            Color.FromRgb(63,169,245),
            Color.FromRgb(63,169,245),
            Color.FromRgb(124,196,247),
            Color.FromRgb(0,0,0)},
            {Color.FromRgb(0,0,0),
            Color.FromRgb(157,210,249),
            Color.FromRgb(63,169,245),
            Color.FromRgb(43,140,205),
            Color.FromRgb(255,255,255),
            Color.FromRgb(255,255,255),
            Color.FromRgb(255,255,255),
            Color.FromRgb(255,255,255),
            Color.FromRgb(255,255,255),
            Color.FromRgb(255,255,255),
            Color.FromRgb(153,198,228),
            Color.FromRgb(87,171,229),
            Color.FromRgb(141,204,249),
            Color.FromRgb(149,207,249),
            Color.FromRgb(84,163,217),
            Color.FromRgb(255,255,255),
            Color.FromRgb(255,255,255),
            Color.FromRgb(255,255,255),
            Color.FromRgb(255,255,255),
            Color.FromRgb(255,255,255),
            Color.FromRgb(138,190,225),
            Color.FromRgb(101,179,234),
            Color.FromRgb(16,124,196),
            Color.FromRgb(221,236,246),
            Color.FromRgb(238,246,251),
            Color.FromRgb(26,132,204),
            Color.FromRgb(125,197,248),
            Color.FromRgb(63,169,245),
            Color.FromRgb(63,169,245),
            Color.FromRgb(63,169,245),
            Color.FromRgb(157,210,249),
            Color.FromRgb(0,0,0)},
            {Color.FromRgb(0,0,0),
            Color.FromRgb(165,216,250),
            Color.FromRgb(111,191,248),
            Color.FromRgb(0,113,188),
            Color.FromRgb(0,113,188),
            Color.FromRgb(0,113,188),
            Color.FromRgb(0,113,188),
            Color.FromRgb(0,113,188),
            Color.FromRgb(0,113,188),
            Color.FromRgb(0,113,188),
            Color.FromRgb(5,117,190),
            Color.FromRgb(91,175,233),
            Color.FromRgb(127,198,248),
            Color.FromRgb(135,201,249),
            Color.FromRgb(0,113,188),
            Color.FromRgb(0,113,188),
            Color.FromRgb(0,113,188),
            Color.FromRgb(0,113,188),
            Color.FromRgb(0,113,188),
            Color.FromRgb(0,113,188),
            Color.FromRgb(0,113,188),
            Color.FromRgb(91,175,233),
            Color.FromRgb(51,149,216),
            Color.FromRgb(119,179,219),
            Color.FromRgb(255,255,255),
            Color.FromRgb(123,182,221),
            Color.FromRgb(55,162,238),
            Color.FromRgb(63,169,245),
            Color.FromRgb(63,169,245),
            Color.FromRgb(47,147,213),
            Color.FromRgb(25,128,196),
            Color.FromRgb(0,0,0)},
            {Color.FromRgb(0,0,0),
            Color.FromRgb(0,0,0),
            Color.FromRgb(168,215,250),
            Color.FromRgb(35,144,220),
            Color.FromRgb(35,144,220),
            Color.FromRgb(35,144,220),
            Color.FromRgb(42,147,220),
            Color.FromRgb(83,165,222),
            Color.FromRgb(43,147,220),
            Color.FromRgb(48,150,220),
            Color.FromRgb(73,167,233),
            Color.FromRgb(105,188,247),
            Color.FromRgb(113,192,248),
            Color.FromRgb(119,194,248),
            Color.FromRgb(58,152,216),
            Color.FromRgb(47,144,210),
            Color.FromRgb(73,161,222),
            Color.FromRgb(71,161,222),
            Color.FromRgb(70,159,222),
            Color.FromRgb(67,159,222),
            Color.FromRgb(75,165,228),
            Color.FromRgb(105,188,247),
            Color.FromRgb(84,176,240),
            Color.FromRgb(8,119,194),
            Color.FromRgb(221,236,246),
            Color.FromRgb(221,236,246),
            Color.FromRgb(32,136,206),
            Color.FromRgb(55,162,238),
            Color.FromRgb(35,141,215),
            Color.FromRgb(119,179,219),
            Color.FromRgb(221,236,246),
            Color.FromRgb(0,112,187)},
            {Color.FromRgb(0,0,0),
            Color.FromRgb(0,0,0),
            Color.FromRgb(164,213,246),
            Color.FromRgb(144,205,249),
            Color.FromRgb(63,169,245),
            Color.FromRgb(63,169,245),
            Color.FromRgb(63,169,245),
            Color.FromRgb(75,174,246),
            Color.FromRgb(148,207,249),
            Color.FromRgb(85,179,247),
            Color.FromRgb(83,178,246),
            Color.FromRgb(92,182,246),
            Color.FromRgb(99,185,247),
            Color.FromRgb(104,188,247),
            Color.FromRgb(109,190,247),
            Color.FromRgb(111,191,248),
            Color.FromRgb(112,191,248),
            Color.FromRgb(111,191,248),
            Color.FromRgb(109,190,247),
            Color.FromRgb(104,188,247),
            Color.FromRgb(98,185,247),
            Color.FromRgb(92,182,246),
            Color.FromRgb(94,183,247),
            Color.FromRgb(100,176,229),
            Color.FromRgb(53,144,204),
            Color.FromRgb(238,246,251),
            Color.FromRgb(187,217,237),
            Color.FromRgb(39,136,201),
            Color.FromRgb(23,126,193),
            Color.FromRgb(204,227,242),
            Color.FromRgb(170,208,233),
            Color.FromRgb(0,112,188)},
            {Color.FromRgb(0,0,0),
            Color.FromRgb(0,0,0),
            Color.FromRgb(0,0,0),
            Color.FromRgb(169,216,252),
            Color.FromRgb(124,196,247),
            Color.FromRgb(63,169,245),
            Color.FromRgb(63,169,245),
            Color.FromRgb(63,169,245),
            Color.FromRgb(63,169,245),
            Color.FromRgb(135,201,249),
            Color.FromRgb(128,198,248),
            Color.FromRgb(77,175,246),
            Color.FromRgb(84,178,246),
            Color.FromRgb(89,181,246),
            Color.FromRgb(93,182,247),
            Color.FromRgb(95,184,247),
            Color.FromRgb(96,184,247),
            Color.FromRgb(95,184,247),
            Color.FromRgb(93,182,247),
            Color.FromRgb(89,181,246),
            Color.FromRgb(84,178,246),
            Color.FromRgb(132,200,249),
            Color.FromRgb(137,202,249),
            Color.FromRgb(63,169,245),
            Color.FromRgb(45,152,228),
            Color.FromRgb(37,135,200),
            Color.FromRgb(187,217,237),
            Color.FromRgb(255,255,255),
            Color.FromRgb(255,255,255),
            Color.FromRgb(187,217,237),
            Color.FromRgb(20,124,193),
            Color.FromRgb(0,0,0)},
            {Color.FromRgb(0,0,0),
            Color.FromRgb(0,0,0),
            Color.FromRgb(0,0,0),
            Color.FromRgb(0,0,0),
            Color.FromRgb(169,216,252),
            Color.FromRgb(124,196,247),
            Color.FromRgb(63,169,245),
            Color.FromRgb(63,169,245),
            Color.FromRgb(63,169,245),
            Color.FromRgb(63,169,245),
            Color.FromRgb(75,174,246),
            Color.FromRgb(123,196,248),
            Color.FromRgb(127,197,248),
            Color.FromRgb(131,199,249),
            Color.FromRgb(99,185,247),
            Color.FromRgb(80,176,246),
            Color.FromRgb(80,177,246),
            Color.FromRgb(102,186,247),
            Color.FromRgb(133,200,249),
            Color.FromRgb(129,199,249),
            Color.FromRgb(125,197,248),
            Color.FromRgb(75,174,246),
            Color.FromRgb(63,169,245),
            Color.FromRgb(63,169,245),
            Color.FromRgb(63,169,245),
            Color.FromRgb(41,150,225),
            Color.FromRgb(46,144,211),
            Color.FromRgb(12,119,192),
            Color.FromRgb(0,113,188),
            Color.FromRgb(0,113,187),
            Color.FromRgb(0,0,0),
            Color.FromRgb(0,0,0)},
            {Color.FromRgb(0,0,0),
            Color.FromRgb(0,0,0),
            Color.FromRgb(0,0,0),
            Color.FromRgb(0,0,0),
            Color.FromRgb(0,0,0),
            Color.FromRgb(169,216,252),
            Color.FromRgb(144,205,249),
            Color.FromRgb(63,169,245),
            Color.FromRgb(63,169,245),
            Color.FromRgb(63,169,245),
            Color.FromRgb(63,169,245),
            Color.FromRgb(63,169,245),
            Color.FromRgb(63,169,245),
            Color.FromRgb(63,169,245),
            Color.FromRgb(99,185,247),
            Color.FromRgb(111,191,248),
            Color.FromRgb(112,191,248),
            Color.FromRgb(99,185,247),
            Color.FromRgb(63,169,245),
            Color.FromRgb(63,169,245),
            Color.FromRgb(63,169,245),
            Color.FromRgb(63,169,245),
            Color.FromRgb(63,169,245),
            Color.FromRgb(63,169,245),
            Color.FromRgb(63,169,245),
            Color.FromRgb(157,210,250),
            Color.FromRgb(165,216,250),
            Color.FromRgb(0,0,0),
            Color.FromRgb(0,0,0),
            Color.FromRgb(0,0,0),
            Color.FromRgb(0,0,0),
            Color.FromRgb(0,0,0)},
            {Color.FromRgb(0,0,0),
            Color.FromRgb(0,0,0),
            Color.FromRgb(0,0,0),
            Color.FromRgb(0,0,0),
            Color.FromRgb(0,0,0),
            Color.FromRgb(0,0,0),
            Color.FromRgb(164,213,246),
            Color.FromRgb(161,213,249),
            Color.FromRgb(111,191,248),
            Color.FromRgb(63,169,245),
            Color.FromRgb(63,169,245),
            Color.FromRgb(63,169,245),
            Color.FromRgb(63,169,245),
            Color.FromRgb(63,169,245),
            Color.FromRgb(63,169,245),
            Color.FromRgb(63,169,245),
            Color.FromRgb(63,169,245),
            Color.FromRgb(63,169,245),
            Color.FromRgb(63,169,245),
            Color.FromRgb(63,169,245),
            Color.FromRgb(63,169,245),
            Color.FromRgb(63,169,245),
            Color.FromRgb(63,169,245),
            Color.FromRgb(111,191,248),
            Color.FromRgb(168,215,250),
            Color.FromRgb(164,213,246),
            Color.FromRgb(0,0,0),
            Color.FromRgb(0,0,0),
            Color.FromRgb(0,0,0),
            Color.FromRgb(0,0,0),
            Color.FromRgb(0,0,0),
            Color.FromRgb(0,0,0)},
            {Color.FromRgb(0,0,0),
            Color.FromRgb(0,0,0),
            Color.FromRgb(0,0,0),
            Color.FromRgb(0,0,0),
            Color.FromRgb(0,0,0),
            Color.FromRgb(0,0,0),
            Color.FromRgb(0,0,0),
            Color.FromRgb(0,0,0),
            Color.FromRgb(165,216,250),
            Color.FromRgb(157,210,249),
            Color.FromRgb(124,196,247),
            Color.FromRgb(63,169,245),
            Color.FromRgb(63,169,245),
            Color.FromRgb(63,169,245),
            Color.FromRgb(63,169,245),
            Color.FromRgb(63,169,245),
            Color.FromRgb(63,169,245),
            Color.FromRgb(63,169,245),
            Color.FromRgb(63,169,245),
            Color.FromRgb(63,169,245),
            Color.FromRgb(63,169,245),
            Color.FromRgb(124,196,247),
            Color.FromRgb(157,210,249),
            Color.FromRgb(165,216,250),
            Color.FromRgb(0,0,0),
            Color.FromRgb(0,0,0),
            Color.FromRgb(0,0,0),
            Color.FromRgb(0,0,0),
            Color.FromRgb(0,0,0),
            Color.FromRgb(0,0,0),
            Color.FromRgb(0,0,0),
            Color.FromRgb(0,0,0)},
            {Color.FromRgb(0,0,0),
            Color.FromRgb(0,0,0),
            Color.FromRgb(0,0,0),
            Color.FromRgb(0,0,0),
            Color.FromRgb(0,0,0),
            Color.FromRgb(0,0,0),
            Color.FromRgb(0,0,0),
            Color.FromRgb(0,0,0),
            Color.FromRgb(0,0,0),
            Color.FromRgb(0,0,0),
            Color.FromRgb(164,213,246),
            Color.FromRgb(177,219,251),
            Color.FromRgb(149,206,249),
            Color.FromRgb(122,194,247),
            Color.FromRgb(128,198,248),
            Color.FromRgb(111,191,248),
            Color.FromRgb(111,191,248),
            Color.FromRgb(128,198,248),
            Color.FromRgb(122,194,247),
            Color.FromRgb(149,206,249),
            Color.FromRgb(177,219,251),
            Color.FromRgb(164,213,246),
            Color.FromRgb(0,0,0),
            Color.FromRgb(0,0,0),
            Color.FromRgb(0,0,0),
            Color.FromRgb(0,0,0),
            Color.FromRgb(0,0,0),
            Color.FromRgb(0,0,0),
            Color.FromRgb(0,0,0),
            Color.FromRgb(0,0,0),
            Color.FromRgb(0,0,0),
            Color.FromRgb(0,0,0)}
        };
    }
}


5 Thêm hoặc chỉnh sửa myCommands.cs

(Copy nội dung sau)
Code:
// (C) Copyright 2024 by
//
using Autodesk.AutoCAD.DatabaseServices;
using Autodesk.AutoCAD.EditorInput;
using Autodesk.AutoCAD.Geometry;
using Autodesk.AutoCAD.Runtime;
using QAR;

// This line is not mandatory, but improves loading performances
[assembly: CommandClass(typeof(Simple_DrawJig_by_AJS.MyCommands))]

namespace Simple_DrawJig_by_AJS
{
    public partial class MyCommands
    {
        [CommandMethod("Mario", CommandFlags.Modal)]
        public void MyCommand()
        {
            Editor ed = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.Editor;
            PromptSelectionOptions pso = new PromptSelectionOptions();
            pso.RejectObjectsOnLockedLayers = true;
            PromptSelectionResult result = ed.GetSelection(pso);
            if (result.Status != PromptStatus.OK) return;

            ObjectIdCollection ids = new ObjectIdCollection(result.Value.GetObjectIds());
            PromptPointOptions ppo = new PromptPointOptions("\nSpecify base point");
            PromptPointResult ppr = ed.GetPoint(ppo);
            if (ppr.Status != PromptStatus.OK) return;

            Point3d bspt = ppr.Value;

            //Second point
            Point3d input_bspt = bspt;

            string retkword = "";
            PromptStatus ps = QARJig.RectangArrayGetSecondPoint(ids, ref input_bspt, "", ref retkword);
            if (ps != PromptStatus.OK || bspt.DistanceTo(input_bspt) < 0.0000001) return;

            Point3d pt = input_bspt;

            //Third point
            Point3d sept = input_bspt;
            input_bspt = bspt;

            int NumberRow = 1;
            int NumberCol = 1;
            double unitWidth = pt.X - bspt.X;
            double unitHeight = pt.Y - bspt.Y;
            ps = QARJig.RectangArrayGetThirdPoint(ids, ref input_bspt, sept, "", ref retkword, ref NumberRow, ref NumberCol, ref unitWidth, ref unitHeight);

            ed.WriteMessage("\nwww.lisp.vn");
        }
    }
}



Link tải Solution




---------------------------------------------------------------------------------------------

Cộng đồng AutoCAD dotNet

Tham gia cộng đồng AutoCAD dotNet trên Zalo để chia sẻ nhiều hơn


Link tham gia http://dnz.lisp.vn

---------------------------------------------------------------------------------------------
Ứng dụng được phát triển bởi đội ngũ AutoLISP Thật là đơn giản - Tác giả ứng dụng in D2P

    

Mọi thông tin xin liên hệ Fanpage AutoLISP Thật là đơn giản!
Cảm ơn bạn đã theo dõi!

Không có nhận xét nào:

Đăng nhận xét

Vẽ tường cửa kiến trúc | Lên mô hình 3D sxCAD | AutoLISP Reviewer

Ứng dụng được phát triển bởi đội ngũ AutoLISP Thật là đơn giản       Thông tin thêm: 👉👉👉