Esempio n. 1
0
        public void showtooltip(Streets street, System.Drawing.Point mouse)
        {
            //create a new tool tip to be used
            tt = new ToolTip();
            IWin32Window win = Map;

            string[] ForSale = street._forsale.Split(':');
            string   sale    = "";
            string   price   = "";

            //set the price
            if (ForSale[0] == "T")
            {
                sale = "Yes.";
                decimal value = 0;
                decimal.TryParse(ForSale[1], out value);
                price = String.Format("{0:C0}", value);
            }
            else
            {
                sale  = "No.";
                price = "N/A";
            }
            //show the TT for 3 seconds
            tt.Show("Address: " + street._streetaddr + "\r\n" + "City: " + street._city + "\r\n" + "Zipcode: " + street._zip + "\r\n" + "For sale: " + sale + "\r\n" + "Price: " + price, win, mouse, 3000);
            popup = true;
        }
Esempio n. 2
0
        //finding the posititons of the mouse
        //finding the posititons of the mouse
        private void CalculatePositions(int X, int Y, System.Drawing.Point mouse)
        {
            //build the communitieis
            if (listbuilt == false)
            {
                buildlist(DekalbCommunity);
                buildlist(SycamoreCommunity);
                listbuilt = true;
            }

            if (listbuilt == true)
            {
                if (popup == true)
                {
                    foreach (var street in StreetstoSearchpoints)
                    {
                        if ((X) >= (street._x) - (TopLeftCorner.X - CurrentMapTopLeftCorner.X) && (X) <= ((street._x) - (TopLeftCorner.X - CurrentMapTopLeftCorner.X) + 10))
                        {
                            if ((Y) >= (street._y) - (TopLeftCorner.Y - CurrentMapTopLeftCorner.Y) && (Y) <= (street._y) - (TopLeftCorner.Y - CurrentMapTopLeftCorner.Y) + 10)
                            {
                                if (streetfound != street)
                                {
                                    streetfound = street;
                                    showtooltip(street, mouse);
                                }
                            }
                        }
                    }
                }
            }
        }