Exemplo n.º 1
0
        private void DrawHospitalPoints()
        {
            DrawPinPoint ghalb = new DrawPinPoint { X = 51.388, Y = 35.720 };
            DrawPinPoint khom = new DrawPinPoint { X = 51.370, Y = 35.719 };
            DrawPinPoint thePharmacyLocation_1 = new DrawPinPoint { Y = 35.71557209, X = 51.4218776,
                                                                    Tag = new AccountGridObj() { CustomerName = "13آبان", DisCustomerCodes = new List<string>() { "28348" } } };
            DrawPinPoint thePharmacyLocation_2 = new DrawPinPoint { Y = 35.78382132, X = 51.38255822,
                                                                    Tag = new AccountGridObj() { CustomerName = "بیمارستان پارسیان", DisCustomerCodes = new List<string>() { "65561" } } };
            DrawPinPoint thePharmacyLocation_3 = new DrawPinPoint { Y = 35.77949766, X = 51.44915725,
                                                                    Tag = new AccountGridObj() { CustomerName = "دکتر انتخابی", DisCustomerCodes = new List<string>() { "29549" } }};
            DrawPinPoint thePharmacyLocation_4 = new DrawPinPoint { Y = 35.75648774, X = 51.39811239,
                                                                    Tag = new AccountGridObj() { CustomerName = "دکتر سالم", DisCustomerCodes = new List<string>() { "83023" } }};
            DrawPinPoint thePharmacyLocation_5 = new DrawPinPoint { Y = 35.77111884, X = 51.37927792, 
                Tag = new AccountGridObj() { CustomerName = "ستاره", DisCustomerCodes = new List<string>() { "28079"} } };
            DrawPinPoint thePharmacyLocation_6 = new DrawPinPoint { Y = 35.76843834, X = 51.4408863, 
                Tag = new AccountGridObj() { CustomerName = "شبانه روزی قلهک", DisCustomerCodes = new List<string>() { "33865" } } };
            DrawPinPoint thePharmacyLocation_7 = new DrawPinPoint { Y = 35.69706805, X = 51.26470316, 
                Tag = new AccountGridObj() { CustomerName = "قوامین", DisCustomerCodes = new List<string>() { "32929" } } };
            DrawPinPoint thePharmacyLocation_8 = new DrawPinPoint { Y = 35.74457886, X = 51.41104828, 
                Tag = new AccountGridObj() { CustomerName = "مرکز بهداشت صداو سیما", DisCustomerCodes = new List<string>() {  "85784" } } };
            ghalb.MouseLeftButtonDown += new MouseButtonEventHandler(ghalb_MouseLeftButtonDown);
            khom.MouseLeftButtonDown += new MouseButtonEventHandler(khom_MouseLeftButtonDown);
            thePharmacyLocation_1.MouseLeftButtonDown += new MouseButtonEventHandler(Pharmacy_MouseLeftButtonDown);
            thePharmacyLocation_2.MouseLeftButtonDown += new MouseButtonEventHandler(Pharmacy_MouseLeftButtonDown);
            thePharmacyLocation_3.MouseLeftButtonDown += new MouseButtonEventHandler(Pharmacy_MouseLeftButtonDown);
            thePharmacyLocation_4.MouseLeftButtonDown += new MouseButtonEventHandler(Pharmacy_MouseLeftButtonDown);
            thePharmacyLocation_5.MouseLeftButtonDown += new MouseButtonEventHandler(Pharmacy_MouseLeftButtonDown);
            thePharmacyLocation_6.MouseLeftButtonDown += new MouseButtonEventHandler(Pharmacy_MouseLeftButtonDown);
            thePharmacyLocation_7.MouseLeftButtonDown += new MouseButtonEventHandler(Pharmacy_MouseLeftButtonDown);
            thePharmacyLocation_8.MouseLeftButtonDown += new MouseButtonEventHandler(Pharmacy_MouseLeftButtonDown);

            ToolTipService.SetToolTip(ghalb, "بيمارستان قلب تهران");
            ToolTipService.SetToolTip(khom, "بیمارستان رسول اکرم");
            ToolTipService.SetToolTip(thePharmacyLocation_1, "13آبان");
            ToolTipService.SetToolTip(thePharmacyLocation_2, "بیمارستان پارسیان");
            ToolTipService.SetToolTip(thePharmacyLocation_3, "دکتر انتخابی");
            ToolTipService.SetToolTip(thePharmacyLocation_4, "دکتر سالم");
            ToolTipService.SetToolTip(thePharmacyLocation_5, "ستاره");
            ToolTipService.SetToolTip(thePharmacyLocation_6, "شبانه روزی قلهک");
            ToolTipService.SetToolTip(thePharmacyLocation_7, "قوامین");
            ToolTipService.SetToolTip(thePharmacyLocation_8, "مرکز بهداشت صداو سیما");

            //DrawControl.ImagePinLayer.Add(ghalb);
            //DrawControl.ImagePinLayer.Add(khom);
            DrawControl.ImagePinLayer.Add(thePharmacyLocation_1);
            DrawControl.ImagePinLayer.Add(thePharmacyLocation_2);
            DrawControl.ImagePinLayer.Add(thePharmacyLocation_3);
            DrawControl.ImagePinLayer.Add(thePharmacyLocation_4);
            DrawControl.ImagePinLayer.Add(thePharmacyLocation_5);
            DrawControl.ImagePinLayer.Add(thePharmacyLocation_6);
            DrawControl.ImagePinLayer.Add(thePharmacyLocation_7);
            DrawControl.ImagePinLayer.Add(thePharmacyLocation_8);
        }
Exemplo n.º 2
0
 private void DrawCurrentDistrictLocations()
 {
     if (DistrictDSIDs == null || !DistrictDSIDs.ContainsKey(DBUtils.GetDistrictId(_selectedRegionMapId)))
         return;
     foreach (DSID_PerDistrict dataItem in DistrictDSIDs[DBUtils.GetDistrictId(_selectedRegionMapId)])
     {
         if (dataItem.LatitudeT != null && dataItem.LongitudeT != null && dataItem.LatitudeT != 0 && dataItem.LongitudeT != 0)
         {
             DrawPinPoint theDrawPinPoint = new DrawPinPoint
             {
                 X = (double)dataItem.LongitudeT,
                 Y = (double)dataItem.LatitudeT,
                 Tag = new AccountGridObj() { CustomerName = dataItem.DSName, DisCustomerCodes = new List<string>() { dataItem.DSID +"" } }
             };
             theDrawPinPoint.MouseLeftButtonDown += new MouseButtonEventHandler( Pharmacy_MouseLeftButtonDown);
             ToolTipService.SetToolTip(theDrawPinPoint, dataItem.DSName);
             DrawControl.ImagePinLayer.Add(theDrawPinPoint);
         }
     }
 }