Ejemplo n.º 1
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="p">Coordinates of marker</param>
 /// <param name="text">Text to be drawn</param>
 /// <param name="penColor">Text oclor</param>
 /// <param name="backColor">Background color</param>
 /// <param name="offsetX">X Offset for marker coordinates in pixels</param>
 /// <param name="offsetY">Y Offset for marker coordinates in pixels</param>
 /// <param name="bBig">If true, text will be bigger</param>
 public GMapMarkerText(PointLatLng p, String text, Color penColor, Color backColor, int offsetX, int offsetY, bool bBig)
     : base(p)
 {
     img    = MyTools.CreateBitmapImage(text, penColor, backColor, bBig);
     Size   = img.Size;
     Offset = new System.Drawing.Point(-Size.Width / 2 + offsetX, -Size.Height / 2 + offsetY);
 }
Ejemplo n.º 2
0
 private void listView1_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (listView1.SelectedItems.Count != 0)
     {
         ListViewItem item = listView1.SelectedItems[0];
         String       text = allColors[(int)(item.Tag)].ToString();
         Color        c    = Color.FromName(text);
         pictureBox1.Image = MyTools.CreateBitmapImage(text, Color.Black, c);
         pictureBox2.Image = MyTools.CreateBitmapImage(text, Color.White, c);
     }
 }