示例#1
0
        public Form1()
        {
            InitializeComponent();
            cmbDrawShape.SelectedIndex = 0;
            KeyPreview  = true;
            this.KeyUp += Form1_KeyUp;
            Directory.CreateDirectory(m_baseDir);

            MapControlCallback     p  = new MapControlCallback(MapControlCallbackMsg);
            MapControlZoomCallback p1 = new MapControlZoomCallback(MapControlZoomCallbackMsg);
            MapMsgCallack          p2 = new MapMsgCallack(MapMsgCallackFunc);

            mapControl1.SetCallback(p, p1, p2);

            mapControl1.LoadControl(m_baseDir);
            mapControl1.LoadHistory(m_historyFileName);
            this.MouseEnter += Form1_MouseEnter;
            this.MouseLeave += Form1_MouseLeave;
            this.AllowDrop   = true;

            if (AppSettings.Instance.Load("DownloadOSMTiles.json") == true)
            {
                mapControl1.LineColor = AppSettings.Instance.Config.lineColor;
                linkLabel1.LinkColor  = AppSettings.Instance.Config.lineColor;
            }
        }
示例#2
0
 public void SetCallback(MapControlCallback p, MapControlZoomCallback p1, MapMsgCallack p2)
 {
     pMapControlCallback     = p;
     pMapControlZoomCallback = p1;
     pMapMsgCallack          = p2;
 }