private void BuscarCliente()
 {
     this.Cursor = Cursors.WaitCursor;
     Catalogo.cCliente cCliente = new Catalogo.cCliente(2, this._Cliente);
     if (((SqlDataReader)((Catalogo.ConsultaBase)cCliente).drReader).Read())
     {
         this.lblNombre.Text  = StringType.FromObject(((SqlDataReader)((Catalogo.ConsultaBase)cCliente).drReader)[1]);
         this.lblCliente.Text = StringType.FromInteger(this._Cliente);
         ((ComboBase)this.cboZonaEconomica).PosicionaCombo((int)ShortType.FromObject(((SqlDataReader)((Catalogo.ConsultaBase)cCliente).drReader)[2]));
         ((ComboBase)this.cboRuta).PosicionaCombo((int)ShortType.FromObject(((SqlDataReader)((Catalogo.ConsultaBase)cCliente).drReader)[3]));
         ((TextBox)this.txtClientePortatil).Text = "";
         this.lblNombrePortatil.Text             = "";
         if (!Information.IsDBNull(RuntimeHelpers.GetObjectValue(((SqlDataReader)((Catalogo.ConsultaBase)cCliente).drReader)[4])))
         {
             ((TextBox)this.txtClientePortatil).Text = StringType.FromObject(((SqlDataReader)((Catalogo.ConsultaBase)cCliente).drReader)[4]);
             this.lblNombrePortatil.Text             = StringType.FromObject(((SqlDataReader)((Catalogo.ConsultaBase)cCliente).drReader)[5]);
         }
     }
     this.Cursor = Cursors.Default;
 }
示例#2
0
        public static String Oct(Object Number)
        {
            if (Number == null)
            {
                throw new ArgumentNullException("Number");
            }
            switch (ObjectType.GetTypeCode(Number))
            {
            case TypeCode.Byte:
                return(Oct(ByteType.FromObject(Number)));

            case TypeCode.Int16:
                return(Oct(ShortType.FromObject(Number)));

            case TypeCode.Boolean:
            case TypeCode.Char:
            case TypeCode.SByte:
            case TypeCode.UInt16:
            case TypeCode.Int32:
                return(Oct(IntegerType.FromObject(Number)));

            case TypeCode.Int64:
                return(Oct(LongType.FromObject(Number)));

            case TypeCode.UInt32:
            case TypeCode.UInt64:
            case TypeCode.Single:
            case TypeCode.Double:
            case TypeCode.Decimal:
                return(Oct(LongType.FromObject(Number)));

            case TypeCode.String:
                return(Oct(LongType.FromString
                               (StringType.FromObject(Number))));
            }
            throw new ArgumentException(S._("VB_InvalidNumber"), "Number");
        }
        public StaticTileCollection Get_StaticTile(TreeNodeCollection iTreeNode)
        {
            IEnumerator          enumerator           = null;
            StaticTileCollection staticTileCollection = new StaticTileCollection();

            staticTileCollection.Clear();
            try
            {
                enumerator = iTreeNode.GetEnumerator();
                while (enumerator.MoveNext())
                {
                    TreeNode current = (TreeNode)enumerator.Current;
                    staticTileCollection.Add(new Transition.StaticTile(ShortType.FromObject(current.Tag), 0));
                }
            }
            finally
            {
                if (enumerator is IDisposable)
                {
                    ((IDisposable)enumerator).Dispose();
                }
            }
            return(staticTileCollection);
        }
示例#4
0
 public void FromObject_ThrowsOverflowException(object value)
 {
     Assert.Throws <OverflowException>(() => ShortType.FromObject(value));
 }
示例#5
0
 public void FromObject_ThrowsInvalidCastException(object value)
 {
     Assert.Throws <InvalidCastException>(() => ShortType.FromObject(value));
 }
示例#6
0
 public void FromObject(object value, short expected)
 {
     Assert.Equal(expected, ShortType.FromObject(value));
 }
        private void Panel2_Paint(object sender, PaintEventArgs e)
        {
            string   name = null;
            string   str  = null;
            Point    point;
            Graphics graphics = e.Graphics;

            graphics.DrawPolygon(new Pen(Color.Blue), this.GetPoints(5, 125));
            graphics.DrawPolygon(new Pen(Color.Blue), this.GetPoints(197, 125));
            graphics.DrawPolygon(new Pen(Color.Blue), this.GetPoints(101, 29));
            graphics.DrawPolygon(new Pen(Color.Blue), this.GetPoints(101, 221));
            graphics.DrawPolygon(new Pen(Color.Blue), this.GetPoints(101, 79));
            graphics.DrawPolygon(new Pen(Color.Blue), this.GetPoints(78, 102));
            graphics.DrawPolygon(new Pen(Color.Blue), this.GetPoints(124, 102));
            graphics.DrawPolygon(new Pen(Color.Blue), this.GetPoints(55, 125));
            graphics.DrawPolygon(new Pen(Color.Blue), this.GetPoints(101, 125));
            graphics.DrawPolygon(new Pen(Color.Blue), this.GetPoints(147, 125));
            graphics.DrawPolygon(new Pen(Color.Blue), this.GetPoints(78, 148));
            graphics.DrawPolygon(new Pen(Color.Blue), this.GetPoints(124, 148));
            graphics.DrawPolygon(new Pen(Color.Blue), this.GetPoints(101, 171));
            if (!this.ViewTiles)
            {
                if (this.iMapOuterTopLeft.GetNodeCount(true) > 0)
                {
                    Bitmap land = Art.GetLand(IntegerType.FromObject(this.iMapOuterTopLeft.Nodes[0].Tag));
                    point = new Point(101, 29);
                    graphics.DrawImage(land, point);
                }
                if (this.iMapInnerTopLeft.GetNodeCount(true) > 0)
                {
                    Bitmap bitmap = Art.GetLand(IntegerType.FromObject(this.iMapInnerTopLeft.Nodes[0].Tag));
                    point = new Point(101, 79);
                    graphics.DrawImage(bitmap, point);
                }
                if (this.iMapInnerTop.GetNodeCount(true) > 0)
                {
                    Bitmap land1 = Art.GetLand(IntegerType.FromObject(this.iMapInnerTop.Nodes[0].Tag));
                    point = new Point(124, 102);
                    graphics.DrawImage(land1, point);
                }
                if (this.iMapInnerTopRight.GetNodeCount(true) > 0)
                {
                    Bitmap bitmap1 = Art.GetLand(IntegerType.FromObject(this.iMapInnerTopRight.Nodes[0].Tag));
                    point = new Point(147, 125);
                    graphics.DrawImage(bitmap1, point);
                }
                if (this.iMapOuterTopRight.GetNodeCount(true) > 0)
                {
                    Bitmap land2 = Art.GetLand(IntegerType.FromObject(this.iMapOuterTopRight.Nodes[0].Tag));
                    point = new Point(197, 125);
                    graphics.DrawImage(land2, point);
                }
                if (this.iMapInnerLeft.GetNodeCount(true) > 0)
                {
                    Bitmap bitmap2 = Art.GetLand(IntegerType.FromObject(this.iMapInnerLeft.Nodes[0].Tag));
                    point = new Point(78, 102);
                    graphics.DrawImage(bitmap2, point);
                }
                if (this.iMapInnerRight.GetNodeCount(true) > 0)
                {
                    Bitmap land3 = Art.GetLand(IntegerType.FromObject(this.iMapInnerRight.Nodes[0].Tag));
                    point = new Point(124, 148);
                    graphics.DrawImage(land3, point);
                }
                if (this.iMapOuterBottomLeft.GetNodeCount(true) > 0)
                {
                    Bitmap bitmap3 = Art.GetLand(IntegerType.FromObject(this.iMapOuterBottomLeft.Nodes[0].Tag));
                    point = new Point(5, 125);
                    graphics.DrawImage(bitmap3, point);
                }
                if (this.iMapInnerBottomLeft.GetNodeCount(true) > 0)
                {
                    Bitmap land4 = Art.GetLand(IntegerType.FromObject(this.iMapInnerBottomLeft.Nodes[0].Tag));
                    point = new Point(55, 125);
                    graphics.DrawImage(land4, point);
                }
                if (this.iMapInnerBottom.GetNodeCount(true) > 0)
                {
                    Bitmap bitmap4 = Art.GetLand(IntegerType.FromObject(this.iMapInnerBottom.Nodes[0].Tag));
                    point = new Point(78, 148);
                    graphics.DrawImage(bitmap4, point);
                }
                if (this.iMapInnerBottomRight.GetNodeCount(true) > 0)
                {
                    Bitmap land5 = Art.GetLand(IntegerType.FromObject(this.iMapInnerBottomRight.Nodes[0].Tag));
                    point = new Point(101, 171);
                    graphics.DrawImage(land5, point);
                }
                if (this.iMapOuterBottomRight.GetNodeCount(true) > 0)
                {
                    Bitmap bitmap5 = Art.GetLand(IntegerType.FromObject(this.iMapOuterBottomRight.Nodes[0].Tag));
                    point = new Point(101, 221);
                    graphics.DrawImage(bitmap5, point);
                }
            }
            else
            {
                if (this.iStaticOuterTopLeft.GetNodeCount(true) > 0)
                {
                    this.DrawStatic(ShortType.FromObject(this.iStaticOuterTopLeft.Nodes[0].Tag), 101, 29, e);
                }
                if (this.iStaticInnerTopLeft.GetNodeCount(true) > 0)
                {
                    this.DrawStatic(ShortType.FromObject(this.iStaticInnerTopLeft.Nodes[0].Tag), 101, 79, e);
                }
                if (this.iStaticInnerTop.GetNodeCount(true) > 0)
                {
                    this.DrawStatic(ShortType.FromObject(this.iStaticInnerTop.Nodes[0].Tag), 124, 102, e);
                }
                if (this.iStaticInnerTopRight.GetNodeCount(true) > 0)
                {
                    this.DrawStatic(ShortType.FromObject(this.iStaticInnerTopRight.Nodes[0].Tag), 147, 125, e);
                }
                if (this.iStaticOuterTopRight.GetNodeCount(true) > 0)
                {
                    this.DrawStatic(ShortType.FromObject(this.iStaticOuterTopRight.Nodes[0].Tag), 197, 125, e);
                }
                if (this.iStaticInnerLeft.GetNodeCount(true) > 0)
                {
                    this.DrawStatic(ShortType.FromObject(this.iStaticInnerLeft.Nodes[0].Tag), 78, 102, e);
                }
                if (this.iStaticInnerRight.GetNodeCount(true) > 0)
                {
                    this.DrawStatic(ShortType.FromObject(this.iStaticInnerRight.Nodes[0].Tag), 124, 148, e);
                }
                if (this.iStaticOuterBottomLeft.GetNodeCount(true) > 0)
                {
                    this.DrawStatic(ShortType.FromObject(this.iStaticOuterBottomLeft.Nodes[0].Tag), 5, 125, e);
                }
                if (this.iStaticInnerBottomLeft.GetNodeCount(true) > 0)
                {
                    this.DrawStatic(ShortType.FromObject(this.iStaticInnerBottomLeft.Nodes[0].Tag), 55, 125, e);
                }
                if (this.iStaticInnerBottom.GetNodeCount(true) > 0)
                {
                    this.DrawStatic(ShortType.FromObject(this.iStaticInnerBottom.Nodes[0].Tag), 78, 148, e);
                }
                if (this.iStaticInnerBottomRight.GetNodeCount(true) > 0)
                {
                    this.DrawStatic(ShortType.FromObject(this.iStaticInnerBottomRight.Nodes[0].Tag), 101, 171, e);
                }
                if (this.iStaticOuterBottomRight.GetNodeCount(true) > 0)
                {
                    this.DrawStatic(ShortType.FromObject(this.iStaticOuterBottomRight.Nodes[0].Tag), 101, 221, e);
                }
            }
            Pen pen = new Pen(Color.Red);

            if (this.iMapOuterTopLeft.IsSelected)
            {
                graphics.DrawPolygon(pen, this.GetPoints(101, 29));
            }
            if (this.iMapInnerTopLeft.IsSelected)
            {
                graphics.DrawPolygon(pen, this.GetPoints(101, 79));
            }
            if (this.iMapInnerTop.IsSelected)
            {
                graphics.DrawPolygon(pen, this.GetPoints(124, 102));
            }
            if (this.iMapInnerTopRight.IsSelected)
            {
                graphics.DrawPolygon(pen, this.GetPoints(147, 125));
            }
            if (this.iMapOuterTopRight.IsSelected)
            {
                graphics.DrawPolygon(pen, this.GetPoints(197, 125));
            }
            if (this.iMapInnerLeft.IsSelected)
            {
                graphics.DrawPolygon(pen, this.GetPoints(78, 102));
            }
            if (this.iMapInnerRight.IsSelected)
            {
                graphics.DrawPolygon(pen, this.GetPoints(124, 148));
            }
            if (this.iMapOuterBottomLeft.IsSelected)
            {
                graphics.DrawPolygon(pen, this.GetPoints(5, 125));
            }
            if (this.iMapInnerBottomLeft.IsSelected)
            {
                graphics.DrawPolygon(pen, this.GetPoints(55, 125));
            }
            if (this.iMapInnerBottom.IsSelected)
            {
                graphics.DrawPolygon(pen, this.GetPoints(78, 148));
            }
            if (this.iMapInnerBottomRight.IsSelected)
            {
                graphics.DrawPolygon(pen, this.GetPoints(101, 171));
            }
            if (this.iMapOuterBottomRight.IsSelected)
            {
                graphics.DrawPolygon(pen, this.GetPoints(101, 221));
            }
            pen = new Pen(Color.Magenta);
            if (this.iStaticOuterTopLeft.IsSelected)
            {
                graphics.DrawPolygon(pen, this.GetPoints(101, 29));
            }
            if (this.iStaticInnerTopLeft.IsSelected)
            {
                graphics.DrawPolygon(pen, this.GetPoints(101, 79));
            }
            if (this.iStaticInnerTop.IsSelected)
            {
                graphics.DrawPolygon(pen, this.GetPoints(124, 102));
            }
            if (this.iStaticInnerTopRight.IsSelected)
            {
                graphics.DrawPolygon(pen, this.GetPoints(147, 125));
            }
            if (this.iStaticOuterTopRight.IsSelected)
            {
                graphics.DrawPolygon(pen, this.GetPoints(197, 125));
            }
            if (this.iStaticInnerLeft.IsSelected)
            {
                graphics.DrawPolygon(pen, this.GetPoints(78, 102));
            }
            if (this.iStaticInnerRight.IsSelected)
            {
                graphics.DrawPolygon(pen, this.GetPoints(124, 148));
            }
            if (this.iStaticOuterBottomLeft.IsSelected)
            {
                graphics.DrawPolygon(pen, this.GetPoints(5, 125));
            }
            if (this.iStaticInnerBottomLeft.IsSelected)
            {
                graphics.DrawPolygon(pen, this.GetPoints(55, 125));
            }
            if (this.iStaticInnerBottom.IsSelected)
            {
                graphics.DrawPolygon(pen, this.GetPoints(78, 148));
            }
            if (this.iStaticInnerBottomRight.IsSelected)
            {
                graphics.DrawPolygon(pen, this.GetPoints(101, 171));
            }
            if (this.iStaticOuterBottomRight.IsSelected)
            {
                graphics.DrawPolygon(pen, this.GetPoints(101, 221));
            }
            ClsTerrain selectedItem = (ClsTerrain)this.Select_Group_A.SelectedItem;

            if (selectedItem != null)
            {
                Bitmap land6 = Art.GetLand(selectedItem.TileID);
                point = new Point(5, 242);
                graphics.DrawImage(land6, point);
                Bitmap bitmap6 = Art.GetLand(selectedItem.TileID);
                point = new Point(101, 125);
                graphics.DrawImage(bitmap6, point);
                name = selectedItem.Name;
            }
            selectedItem = (ClsTerrain)this.Select_Group_B.SelectedItem;
            if (selectedItem != null)
            {
                Bitmap land7 = Art.GetLand(selectedItem.TileID);
                point = new Point(55, 242);
                graphics.DrawImage(land7, point);
                str = selectedItem.Name;
            }
            this.TextBox1.Text = string.Format("{0} To {1}", name, str);
            graphics           = null;
        }
示例#8
0
 public void FromObject_NotSupported(object value, short expected)
 {
     Assert.Throws <InvalidCastException>(() => ShortType.FromObject(value));
 }
示例#9
0
        // Inner version of "Print" and "Write".
        private static void Print(File file, Object[] Output,
                                  CultureInfo culture, bool print)
        {
            NumberFormatInfo nfi = culture.NumberFormat;

            if (Output == null)
            {
                return;
            }
            bool first = true;

            foreach (Object obj in Output)
            {
                if (!first && !print)
                {
                    file.Write(",");
                }
                else
                {
                    first = false;
                }
                if (obj == null)
                {
                    if (!print)
                    {
                        file.Write("#NULL#");
                    }
                    continue;
                }
                if (obj is TabInfo)
                {
                    file.Tab((TabInfo)obj);
                    continue;
                }
                else if (obj is SpcInfo)
                {
                    file.Space((SpcInfo)obj);
                    continue;
                }
                else if (obj is char[])
                {
                    file.Write(new String((char[])obj));
                    continue;
                }
                else if (obj is ErrObject)
                {
                    if (print)
                    {
                        file.Write(String.Format("Error {0}",
                                                 ((ErrObject)obj).Number));
                    }
                    else
                    {
                        file.Write(String.Format("#ERROR {0}#",
                                                 ((ErrObject)obj).Number));
                    }
                    continue;
                }
                switch (ObjectType.GetTypeCode(obj))
                {
                case TypeCode.DBNull:
                {
                    if (print)
                    {
                        file.Write("Null");
                    }
                    else
                    {
                        file.Write("#NULL#");
                    }
                }
                break;

                case TypeCode.Boolean:
                {
                    bool b = BooleanType.FromObject(obj);
                    if (print)
                    {
                        file.Write(b.ToString(culture));
                    }
                    else if (b)
                    {
                        file.Write("#TRUE#");
                    }
                    else
                    {
                        file.Write("#FALSE#");
                    }
                }
                break;

                case TypeCode.Byte:
                {
                    byte by = ByteType.FromObject(obj);
                    file.Write(by.ToString(nfi));
                }
                break;

                case TypeCode.Int16:
                {
                    short s = ShortType.FromObject(obj);
                    file.Write(s.ToString(nfi));
                }
                break;

                case TypeCode.Int32:
                {
                    int i = IntegerType.FromObject(obj);
                    file.Write(i.ToString(nfi));
                }
                break;

                case TypeCode.Int64:
                {
                    long l = LongType.FromObject(obj);
                    file.Write(l.ToString(nfi));
                }
                break;

                case TypeCode.Single:
                {
                    float f = SingleType.FromObject(obj, nfi);
                    file.Write(f.ToString(nfi));
                }
                break;

                case TypeCode.Double:
                {
                    double d = DoubleType.FromObject(obj, nfi);
                    file.Write(d.ToString(nfi));
                }
                break;

                case TypeCode.Decimal:
                {
                    Decimal dc = DecimalType.FromObject(obj, nfi);
                    file.Write(dc.ToString(nfi));
                }
                break;

                case TypeCode.DateTime:
                {
                    DateTime dt = DateType.FromObject(obj);
                    if (print)
                    {
                        file.Write(StringType.FromDate(dt) + " ");
                    }
                    else
                    {
                        String format;
                        long   dayTicks = dt.Ticks % TimeSpan.TicksPerDay;
                        if (dt.Ticks == dayTicks)
                        {
                            format = "T";
                        }
                        else if (dayTicks == 0)
                        {
                            format = "d";
                        }
                        else
                        {
                            format = "F";
                        }
                        file.Write(dt.ToString
                                       (format, culture.DateTimeFormat));
                    }
                }
                break;

                case TypeCode.String:
                {
                    file.Write(StringType.FromObject(obj));
                }
                break;

                default:
                {
                    Utils.ThrowException(5);                                            // ArgumentException.
                }
                break;
                }
            }
        }
        private void Panel2_Paint(object sender, PaintEventArgs e)
        {
            string   name = null;
            string   str  = null;
            Point    point;
            Graphics graphics = e.Graphics;

            graphics.DrawPolygon(new Pen(Color.Blue), this.GetPoints(5, 125));
            graphics.DrawPolygon(new Pen(Color.Blue), this.GetPoints(197, 125));
            graphics.DrawPolygon(new Pen(Color.Blue), this.GetPoints(101, 29));
            graphics.DrawPolygon(new Pen(Color.Blue), this.GetPoints(101, 221));
            graphics.DrawPolygon(new Pen(Color.Blue), this.GetPoints(101, 79));
            graphics.DrawPolygon(new Pen(Color.Blue), this.GetPoints(78, 102));
            graphics.DrawPolygon(new Pen(Color.Blue), this.GetPoints(124, 102));
            graphics.DrawPolygon(new Pen(Color.Blue), this.GetPoints(55, 125));
            graphics.DrawPolygon(new Pen(Color.Blue), this.GetPoints(101, 125));
            graphics.DrawPolygon(new Pen(Color.Blue), this.GetPoints(147, 125));
            graphics.DrawPolygon(new Pen(Color.Blue), this.GetPoints(78, 148));
            graphics.DrawPolygon(new Pen(Color.Blue), this.GetPoints(124, 148));
            graphics.DrawPolygon(new Pen(Color.Blue), this.GetPoints(101, 171));
            if (!this.ViewTiles)
            {
                if (this.iMapOuterTopLeft.GetNodeCount(true) > 0)
                {
                    Bitmap land = Art.GetLand(IntegerType.FromObject(this.iMapOuterTopLeft.Nodes[0].Tag));
                    point = new Point(101, 29);
                    graphics.DrawImage(land, point);
                }
                if (this.iMapInnerTopLeft.GetNodeCount(true) > 0)
                {
                    Bitmap bitmap = Art.GetLand(IntegerType.FromObject(this.iMapInnerTopLeft.Nodes[0].Tag));
                    point = new Point(101, 79);
                    graphics.DrawImage(bitmap, point);
                }
                if (this.iMapInnerTop.GetNodeCount(true) > 0)
                {
                    Bitmap land1 = Art.GetLand(IntegerType.FromObject(this.iMapInnerTop.Nodes[0].Tag));
                    point = new Point(124, 102);
                    graphics.DrawImage(land1, point);
                }
                if (this.iMapInnerTopRight.GetNodeCount(true) > 0)
                {
                    Bitmap bitmap1 = Art.GetLand(IntegerType.FromObject(this.iMapInnerTopRight.Nodes[0].Tag));
                    point = new Point(147, 125);
                    graphics.DrawImage(bitmap1, point);
                }
                if (this.iMapOuterTopRight.GetNodeCount(true) > 0)
                {
                    Bitmap land2 = Art.GetLand(IntegerType.FromObject(this.iMapOuterTopRight.Nodes[0].Tag));
                    point = new Point(197, 125);
                    graphics.DrawImage(land2, point);
                }
                if (this.iMapInnerLeft.GetNodeCount(true) > 0)
                {
                    Bitmap bitmap2 = Art.GetLand(IntegerType.FromObject(this.iMapInnerLeft.Nodes[0].Tag));
                    point = new Point(78, 102);
                    graphics.DrawImage(bitmap2, point);
                }
                if (this.iMapInnerRight.GetNodeCount(true) > 0)
                {
                    Bitmap land3 = Art.GetLand(IntegerType.FromObject(this.iMapInnerRight.Nodes[0].Tag));
                    point = new Point(124, 148);
                    graphics.DrawImage(land3, point);
                }
                if (this.iMapOuterBottomLeft.GetNodeCount(true) > 0)
                {
                    Bitmap bitmap3 = Art.GetLand(IntegerType.FromObject(this.iMapOuterBottomLeft.Nodes[0].Tag));
                    point = new Point(5, 125);
                    graphics.DrawImage(bitmap3, point);
                }
                if (this.iMapInnerBottomLeft.GetNodeCount(true) > 0)
                {
                    Bitmap land4 = Art.GetLand(IntegerType.FromObject(this.iMapInnerBottomLeft.Nodes[0].Tag));
                    point = new Point(55, 125);
                    graphics.DrawImage(land4, point);
                }
                if (this.iMapInnerBottom.GetNodeCount(true) > 0)
                {
                    Bitmap bitmap4 = Art.GetLand(IntegerType.FromObject(this.iMapInnerBottom.Nodes[0].Tag));
                    point = new Point(78, 148);
                    graphics.DrawImage(bitmap4, point);
                }
                if (this.iMapInnerBottomRight.GetNodeCount(true) > 0)
                {
                    Bitmap land5 = Art.GetLand(IntegerType.FromObject(this.iMapInnerBottomRight.Nodes[0].Tag));
                    point = new Point(101, 171);
                    graphics.DrawImage(land5, point);
                }
                if (this.iMapOuterBottomRight.GetNodeCount(true) > 0)
                {
                    Bitmap bitmap5 = Art.GetLand(IntegerType.FromObject(this.iMapOuterBottomRight.Nodes[0].Tag));
                    point = new Point(101, 221);
                    graphics.DrawImage(bitmap5, point);
                }
            }
            else
            {
                if (this.iStaticOuterTopLeft.GetNodeCount(true) > 0)
                {
                    this.DrawStatic(ShortType.FromObject(this.iStaticOuterTopLeft.Nodes[0].Tag), 101, 29, e);
                }
                if (this.iStaticInnerTopLeft.GetNodeCount(true) > 0)
                {
                    this.DrawStatic(ShortType.FromObject(this.iStaticInnerTopLeft.Nodes[0].Tag), 101, 79, e);
                }
                if (this.iStaticInnerTop.GetNodeCount(true) > 0)
                {
                    this.DrawStatic(ShortType.FromObject(this.iStaticInnerTop.Nodes[0].Tag), 124, 102, e);
                }
                if (this.iStaticInnerTopRight.GetNodeCount(true) > 0)
                {
                    this.DrawStatic(ShortType.FromObject(this.iStaticInnerTopRight.Nodes[0].Tag), 147, 125, e);
                }
                if (this.iStaticOuterTopRight.GetNodeCount(true) > 0)
                {
                    this.DrawStatic(ShortType.FromObject(this.iStaticOuterTopRight.Nodes[0].Tag), 197, 125, e);
                }
                if (this.iStaticInnerLeft.GetNodeCount(true) > 0)
                {
                    this.DrawStatic(ShortType.FromObject(this.iStaticInnerLeft.Nodes[0].Tag), 78, 102, e);
                }
                if (this.iStaticInnerRight.GetNodeCount(true) > 0)
                {
                    this.DrawStatic(ShortType.FromObject(this.iStaticInnerRight.Nodes[0].Tag), 124, 148, e);
                }
                if (this.iStaticOuterBottomLeft.GetNodeCount(true) > 0)
                {
                    this.DrawStatic(ShortType.FromObject(this.iStaticOuterBottomLeft.Nodes[0].Tag), 5, 125, e);
                }
                if (this.iStaticInnerBottomLeft.GetNodeCount(true) > 0)
                {
                    this.DrawStatic(ShortType.FromObject(this.iStaticInnerBottomLeft.Nodes[0].Tag), 55, 125, e);
                }
                if (this.iStaticInnerBottom.GetNodeCount(true) > 0)
                {
                    this.DrawStatic(ShortType.FromObject(this.iStaticInnerBottom.Nodes[0].Tag), 78, 148, e);
                }
                if (this.iStaticInnerBottomRight.GetNodeCount(true) > 0)
                {
                    this.DrawStatic(ShortType.FromObject(this.iStaticInnerBottomRight.Nodes[0].Tag), 101, 171, e);
                }
                if (this.iStaticOuterBottomRight.GetNodeCount(true) > 0)
                {
                    this.DrawStatic(ShortType.FromObject(this.iStaticOuterBottomRight.Nodes[0].Tag), 101, 221, e);
                }
            }
            Pen pen = new Pen(Color.Red);

            if (this.iMapOuterTopLeft.IsSelected)
            {
                graphics.DrawPolygon(pen, this.GetPoints(101, 29));
            }
            if (this.iMapInnerTopLeft.IsSelected)
            {
                graphics.DrawPolygon(pen, this.GetPoints(101, 79));
            }
            if (this.iMapInnerTop.IsSelected)
            {
                graphics.DrawPolygon(pen, this.GetPoints(124, 102));
            }
            if (this.iMapInnerTopRight.IsSelected)
            {
                graphics.DrawPolygon(pen, this.GetPoints(147, 125));
            }
            if (this.iMapOuterTopRight.IsSelected)
            {
                graphics.DrawPolygon(pen, this.GetPoints(197, 125));
            }
            if (this.iMapInnerLeft.IsSelected)
            {
                graphics.DrawPolygon(pen, this.GetPoints(78, 102));
            }
            if (this.iMapInnerRight.IsSelected)
            {
                graphics.DrawPolygon(pen, this.GetPoints(124, 148));
            }
            if (this.iMapOuterBottomLeft.IsSelected)
            {
                graphics.DrawPolygon(pen, this.GetPoints(5, 125));
            }
            if (this.iMapInnerBottomLeft.IsSelected)
            {
                graphics.DrawPolygon(pen, this.GetPoints(55, 125));
            }
            if (this.iMapInnerBottom.IsSelected)
            {
                graphics.DrawPolygon(pen, this.GetPoints(78, 148));
            }
            if (this.iMapInnerBottomRight.IsSelected)
            {
                graphics.DrawPolygon(pen, this.GetPoints(101, 171));
            }
            if (this.iMapOuterBottomRight.IsSelected)
            {
                graphics.DrawPolygon(pen, this.GetPoints(101, 221));
            }
            pen = new Pen(Color.Magenta);
            if (this.iStaticOuterTopLeft.IsSelected)
            {
                graphics.DrawPolygon(pen, this.GetPoints(101, 29));
            }
            if (this.iStaticInnerTopLeft.IsSelected)
            {
                graphics.DrawPolygon(pen, this.GetPoints(101, 79));
            }
            if (this.iStaticInnerTop.IsSelected)
            {
                graphics.DrawPolygon(pen, this.GetPoints(124, 102));
            }
            if (this.iStaticInnerTopRight.IsSelected)
            {
                graphics.DrawPolygon(pen, this.GetPoints(147, 125));
            }
            if (this.iStaticOuterTopRight.IsSelected)
            {
                graphics.DrawPolygon(pen, this.GetPoints(197, 125));
            }
            if (this.iStaticInnerLeft.IsSelected)
            {
                graphics.DrawPolygon(pen, this.GetPoints(78, 102));
            }
            if (this.iStaticInnerRight.IsSelected)
            {
                graphics.DrawPolygon(pen, this.GetPoints(124, 148));
            }
            if (this.iStaticOuterBottomLeft.IsSelected)
            {
                graphics.DrawPolygon(pen, this.GetPoints(5, 125));
            }
            if (this.iStaticInnerBottomLeft.IsSelected)
            {
                graphics.DrawPolygon(pen, this.GetPoints(55, 125));
            }
            if (this.iStaticInnerBottom.IsSelected)
            {
                graphics.DrawPolygon(pen, this.GetPoints(78, 148));
            }
            if (this.iStaticInnerBottomRight.IsSelected)
            {
                graphics.DrawPolygon(pen, this.GetPoints(101, 171));
            }
            if (this.iStaticOuterBottomRight.IsSelected)
            {
                graphics.DrawPolygon(pen, this.GetPoints(101, 221));
            }
            ClsTerrain selectedItem = (ClsTerrain)this.Select_Group_A.SelectedItem;

            if (selectedItem != null)
            {
                Bitmap land6 = Art.GetLand(selectedItem.TileID);
                point = new Point(5, 242);
                graphics.DrawImage(land6, point);
                Bitmap bitmap6 = Art.GetLand(selectedItem.TileID);
                point = new Point(101, 125);
                graphics.DrawImage(bitmap6, point);
                name = selectedItem.Name;
            }
            selectedItem = (ClsTerrain)this.Select_Group_B.SelectedItem;
            if (selectedItem != null)
            {
                Bitmap land7 = Art.GetLand(selectedItem.TileID);
                point = new Point(55, 242);
                graphics.DrawImage(land7, point);
                str = selectedItem.Name;
            }

            #region Label Formatting

            //Edit The '↔' To Change How You Want Your Labels To Look
            //Original 'To' Was The Transition Keyword For The Labels
            //This Keyword Was Changed To Arrows To Show The Back And Forth Between Transitions
            this.TextBox1.Text = string.Format("{0} ↔ {1}", name, str);

            #endregion

            graphics = null;

            #endregion
        }