예제 #1
0
        internal frmMapIt CreateGoogleMapWindow()
        {
            EventHandler method = null;

            if (!base.IsDisposed)
            {
                if (this.comm != null)
                {
                    if (method == null)
                    {
                        method = delegate {
                            string str = this.comm.sourceDeviceName + ": GoogleMap";
                            if ((this._SiRFMap == null) || this._SiRFMap.IsDisposed)
                            {
                                this._SiRFMap           = new frmMapIt(this.comm);
                                this._SiRFMap.MdiParent = base.MdiParent;
                                this._SiRFMap.Show();
                            }
                            this._SiRFMap.Text = str;
                            this._SiRFMap.BringToFront();
                        };
                    }
                    base.Invoke(method);
                }
                else
                {
                    MessageBox.Show("COM window not initialized!", "Information");
                }
            }
            return(this._SiRFMap);
        }
예제 #2
0
 private void button_MapIt_Click(object sender, EventArgs e)
 {
     if (!InternetCS.IsConnectedToInternet())
     {
         MessageBox.Show("No internet connection!", "Info", MessageBoxButtons.OK);
     }
     else if (this.comm.dataGui.Positions.PositionList.Count >= 1)
     {
         if (MessageBox.Show("\"Location data\" is about to be sent to Google Maps... Proceed?", "Information", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
         {
             this._SiRFMap = this.CreateGoogleMapWindow();
         }
     }
 }