Пример #1
0
        public void setFireUnitInfo(GMarker marker, GMarkerRect rect)
        {
            this.getmarker = marker;
            this.getrect   = rect;
            if (getmarker != null)
            {
                clearField();
                lbBatteryID.Text = main.detailMarkers[getmarker].GetFireUnitBatteryID();
                lbDetail.Text    = main.detailMarkers[getmarker].GetFireUnitDetail();
                lbNumber.Text    = main.detailMarkers[getmarker].GetFireUnitNumber();
                lbPosition.Text  = PositionConverter.ParsePointToString(main.detailMarkers[getmarker].GetFireUnitPoint(), cmbPosition.Text);
                lbType.Text      = main.detailMarkers[getmarker].GetFireUnitType();
                lbStatus.Text    = main.detailMarkers[getmarker].GetFireUnitStatus();

                //if (main.detailMarkers[getmarker].GetFireUnitStatus() == "OP")
                //{
                //    lbStatus.Text = "OP";
                //}
                //else if (main.detailMarkers[getmarker].GetFireUnitStatus() == "Limited")
                //{
                //    lbStatus.Text = "Limited";
                //}
                //else if (main.detailMarkers[getmarker].GetFireUnitStatus() == "NonOP")
                //{
                //    lbStatus.Text = "NonOP";
                //}
            }
        }
Пример #2
0
 public void setFireUnitInfo(GMarker marker, GMarkerRect rect)
 {
     this.getmarker = marker;
     this.getrect   = rect;
     if (getmarker != null)
     {
         clearField();
         txtBatteryID.Text = main.detailMarkers[getmarker].GetFireUnitBatteryID();
         txtDetail.Text    = main.detailMarkers[getmarker].GetFireUnitDetail();
         txtNumber.Text    = main.detailMarkers[getmarker].GetFireUnitNumber();
         txtPosition.Text  = PositionConverter.ParsePointToString(main.detailMarkers[getmarker].GetFireUnitPoint(), cmbPosition.Text);
         cmbType.Text      = main.detailMarkers[getmarker].GetFireUnitType();
         if (main.detailMarkers[getmarker].GetFireUnitStatus() == "OP")
         {
             radioButton3.Checked = true;
         }
         else if (main.detailMarkers[getmarker].GetFireUnitStatus() == "Limited")
         {
             radioButton2.Checked = true;
         }
         else if (main.detailMarkers[getmarker].GetFireUnitStatus() == "NonOP")
         {
             radioButton1.Checked = true;
         }
     }
 }
Пример #3
0
        private void btnAddMarker_Click(object sender, EventArgs e)
        {
            string name = txtNumber.Text;
            PointLatLng point = PositionConverter.ParsePointFromString(txtPosition.Text);
            foreach (Control c in Controls)
            {
                if (c is TextBox)
                {
                    if (c.Text == "")
                    {
                        if (c != txtRemark)
                        {
                            MessageBox.Show("กรุณากรอกข้อมูลให้ครบถ้วน", "คำเตือน", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                            return;
                        }

                    }
                }
            }
            if (editMode == true)
            {
                main.detailMarkers.Remove(getmarker);
                main.markerOverlay.Markers.Remove(getmarker);
                main.markerOverlay.Markers.Remove(getrect);
                AutoIncrementID -= 1;
                Image image = Image.FromFile("Images/icon/FIxedPoint.png");
                GMarker marker = new GMarker(point, name, image);
                GMarkerRect rect = new GMarkerRect(marker);

                //Add Data to dictionary
                FixedPoint fixedPoint = new FixedPoint("FP" + "0" + (AutoIncrementID += 1).ToString(), txtNumber.Text, checkType, txtLabel.Text, checkSIM, txtRemark.Text, point);
                main.detailMarkers.Add(marker, fixedPoint);

                // TODO : Manage data before adding to overlay
                main.markerOverlay.Markers.Add(marker);
                main.markerOverlay.Markers.Add(rect);
                this.seteditMode(false);
                MessageBox.Show("แก้ไขสำเร็จ");
                clearField();
            }
            else
            {
                // TODO : Selecting image to display as marker
                Image image = Image.FromFile("Images/icon/FIxedPoint.png");
                GMarker marker = new GMarker(point, name, image);
                GMarkerRect rect = new GMarkerRect(marker);

                //Add Data to dictionary
                FixedPoint fixedPoint = new FixedPoint("FP" + "0" + (AutoIncrementID += 1).ToString(), txtNumber.Text, checkType, txtLabel.Text, checkSIM, txtRemark.Text, point);
                main.detailMarkers.Add(marker, fixedPoint);

                // TODO : Manage data before adding to overlay
                main.markerOverlay.Markers.Add(marker);
                main.markerOverlay.Markers.Add(rect);
                MessageBox.Show("เพิ่มมาร์คเกอร์ " + marker.Name + " บนแผนที่แล้ว", "FixedPoint Marker");
                clearField();
            }
        }
Пример #4
0
 public void setLandMarkInfo(GMarker marker, GMarkerRect rect)
 {
     this.getmarker = marker;
     this.getrect   = rect;
     if (getmarker != null)
     {
         clearField();
         txtName.Text     = main.detailMarkers[getmarker].GetLandMarkName();
         txtLabel.Text    = main.detailMarkers[getmarker].GetLandMarkLabel();
         txtPosition.Text = PositionConverter.ParsePointToString(main.detailMarkers[getmarker].GetLandmarkPoint(), cmbPosition.Text);
         txtRemark.Text   = main.detailMarkers[getmarker].GetLandMarkRemark();
         cmbType.Text     = main.detailMarkers[getmarker].GetLandMarkType();
     }
 }
Пример #5
0
        public void seCityInfo(GMarker marker, GMarkerRect rect)
        {
            this.getmarker = marker;
            this.getrect   = rect;

            if (getmarker != null)
            {
                MessageBox.Show("Not null");
                txtLabel.Text    = main.detailMarkers[getmarker].GetCityLabel().ToString();
                txtName.Text     = main.detailMarkers[getmarker].GetCityName().ToString();
                txtPosition.Text = PositionConverter.ParsePointToString(main.detailMarkers[getmarker].GetCityPoint(), cmbPosition.Text);
                txtRemark.Text   = main.detailMarkers[getmarker].GetCityRemark().ToString();
            }
            else if (getmarker == null)
            {
                MessageBox.Show("Null");
            }
        }
Пример #6
0
 public void setVitalAssetInfo(GMarker marker, GMarkerRect rect)
 {
     getmarker = marker;
     getrect   = rect;
     if (main.detailMarkers.ContainsKey(marker))
     {
         clearField();
         lbName.Text              = main.detailMarkers[getmarker].GetVitalAssetName();
         lbPosition.Text          = PositionConverter.ParsePointToString(main.detailMarkers[getmarker].GetVitalAssetPoint(), cmbPosition.Text);
         lbType.Text              = main.detailMarkers[getmarker].GetVitalAssetType();
         lbPriority.Text          = main.detailMarkers[getmarker].GetVitalAssetPriority();
         lbProvince.Text          = main.detailMarkers[getmarker].GetVitalAssetProvince();
         lbSize.Text              = main.detailMarkers[getmarker].GetVitalAssetAssetSize();
         lbResponsibleUnit.Text   = main.detailMarkers[getmarker].GetVitalAssetUnitResponsible();
         lbUnitStatus.Text        = main.detailMarkers[getmarker].GetVitalAssetUnitStatus();
         lbResponsiblePerson.Text = main.detailMarkers[getmarker].GetVitalAssetResponsePerson();
     }
 }
Пример #7
0
        public void setCityInfo(GMarker marker, GMarkerRect rect)
        {
            getmarker = marker;
            getrect   = rect;

            if (main.detailMarkers.ContainsKey(marker))
            {
                clearField();


                lbName.Text = main.detailMarkers[getmarker].GetCityName();

                lbLabel.Text = main.detailMarkers[getmarker].GetCityLabel();

                lbRemark.Text = main.detailMarkers[getmarker].GetCityRemark();

                lbPosition.Text = PositionConverter.ParsePointToString(main.detailMarkers[getmarker].GetCityPoint(), cmbPosition.Text);
            }
        }
Пример #8
0
 public void setAirportInfo(GMarker marker, GMarkerRect rect)
 {
     this.getmarker = marker;
     this.getrect   = rect;
     if (getmarker != null)
     {
         lbName.Text     = main.detailMarkers[getmarker].GetName();
         lbICAO.Text     = main.detailMarkers[getmarker].GetAirportICAO();
         lbIATA.Text     = main.detailMarkers[getmarker].GetAirportIATA();
         lbCountry.Text  = main.detailMarkers[getmarker].GetCountry();
         lbPosition.Text = PositionConverter.ParsePointToString(main.detailMarkers[getmarker].GetAirportPoint(), cmbPosition.Text);
         if (main.detailMarkers[getmarker].GetAirportInternational() == 1)
         {
             lbInternational.Text = "สนามบินนานาชาติ";
         }
         else
         {
             lbInternational.Text = "ไม่ใช่สนามบินนานาชาติ";
         }
     }
 }
Пример #9
0
 public void setFixedPointInfo(GMarker marker, GMarkerRect rect)
 {
     this.getmarker = marker;
     this.getrect = rect;
     if(getmarker != null)
     {
         txtLabel.Text = main.detailMarkers[getmarker].GetFixedPointLabel();
         txtNumber.Text = main.detailMarkers[getmarker].GetFixedPointNumber();
         txtPosition.Text = PositionConverter.ParsePointToString(main.detailMarkers[getmarker].GetFixedPoint_Point(), cmbPosition.Text);
         txtRemark.Text = main.detailMarkers[getmarker].GetFixedPointSource();
         if (main.detailMarkers[getmarker].GetFixedPointType() == rdbFRadar.Text)
         {
             rdbFRadar.Checked = true;
         }else if (main.detailMarkers[getmarker].GetFixedPointType() == rdbMRadar.Text)
         {
             rdbMRadar.Checked = true;
         }
         else if (main.detailMarkers[getmarker].GetFixedPointType() == rdbOBSPost.Text)
         {
             rdbOBSPost.Checked = true;
         }
         else if (main.detailMarkers[getmarker].GetFixedPointType() == rdbSpecial.Text)
         {
             rdbSpecial.Checked = true;
         }
         else if (main.detailMarkers[getmarker].GetFixedPointType() == rdbTactical.Text)
         {
             rdbTactical.Checked = true;
         }
         if(main.detailMarkers[getmarker].GetFixedPointLiveSIM() == 1)
         {
             checkBox1.Checked = true;
         }
         else
         {
             checkBox1.Checked = false;
         }
     }
 }
Пример #10
0
        public void setVitalAssetInfo(GMarker marker, GMarkerRect rect)
        {
            this.getmarker = marker;
            this.getrect   = rect;

            if (getmarker != null)
            {
                txtName.Text              = main.detailMarkers[getmarker].GetVitalAssetName();
                txtPosition.Text          = PositionConverter.ParsePointToString(main.detailMarkers[getmarker].GetVitalAssetPoint(), cmbPosition.Text);
                cmbType.Text              = main.detailMarkers[getmarker].GetVitalAssetType();
                txtPriority.Text          = main.detailMarkers[getmarker].GetVitalAssetPriority();
                cmbProvince.Text          = main.detailMarkers[getmarker].GetVitalAssetProvince();
                txtSize.Text              = main.detailMarkers[getmarker].GetVitalAssetAssetSize();
                cmbResponsibleUnit.Text   = main.detailMarkers[getmarker].GetVitalAssetUnitResponsible();
                txtUnitStatus.Text        = main.detailMarkers[getmarker].GetVitalAssetUnitStatus();
                cmbResponsiblePerson.Text = main.detailMarkers[getmarker].GetVitalAssetResponsePerson();
            }
            else
            {
                MessageBox.Show("Error");
            }
        }
Пример #11
0
        public void setFixedPointInfo(GMarker marker, GMarkerRect rect)
        {
            this.getmarker = marker;
            this.getrect   = rect;
            if (getmarker != null)
            {
                clearField();
                lbLabel.Text    = main.detailMarkers[getmarker].GetFixedPointLabel();
                lbNumber.Text   = main.detailMarkers[getmarker].GetFixedPointNumber();
                lbPosition.Text = PositionConverter.ParsePointToString(main.detailMarkers[getmarker].GetFixedPoint_Point(), cmbPosition.Text);
                lbRemark.Text   = main.detailMarkers[getmarker].GetFixedPointSource();
                lbType.Text     = main.detailMarkers[getmarker].GetFixedPointType();

                if (main.detailMarkers[getmarker].GetFixedPointLiveSIM() == 1)
                {
                    lbLiveSIM.Text = "Check box Checked";
                }
                else
                {
                    lbLiveSIM.Text = "Not Check";
                }
            }
        }
Пример #12
0
        public void setAirportInfo(GMarker marker, GMarkerRect rect)
        {
            this.getmarker = marker;
            this.getrect   = rect;

            if (getmarker != null)
            {
                clearField();
                txtName.Text     = main.detailMarkers[getmarker].GetName();
                txtICAO.Text     = main.detailMarkers[getmarker].GetAirportICAO();
                txtIATA.Text     = main.detailMarkers[getmarker].GetAirportIATA();
                txtCountry.Text  = main.detailMarkers[getmarker].GetCountry();
                txtPosition.Text = PositionConverter.ParsePointToString(main.detailMarkers[getmarker].GetAirportPoint(), cmbPosition.Text);
                if (main.detailMarkers[getmarker].GetAirportInternational() == 1)
                {
                    chbInternational.Checked = true;
                }
                else
                {
                    chbInternational.Checked = false;
                }
            }
        }
Пример #13
0
        private void btnAddMarker_Click(object sender, EventArgs e)
        {
            string      name  = txtName.Text;
            PointLatLng point = PositionConverter.ParsePointFromString(txtPosition.Text);
            Image       image = Image.FromFile("Images/icon/City.png");

            foreach (Control c in Controls)
            {
                if (c is TextBox)
                {
                    if (c.Text == "")
                    {
                        if (c != txtRemark)
                        {
                            MessageBox.Show("กรุณากรอกข้อมูลให้ครบถ้วน", "คำเตือน", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                            return;
                        }
                    }
                }
            }

            // TODO : Selecting image to display as marker
            if (editMode == true)
            {
                // If edit mode do this
                main.markerOverlay.Markers.Remove(getmarker);
                main.markerOverlay.Markers.Remove(getrect);
                AutoIncrementID -= 1;
                main.detailMarkers.Remove(getmarker);
                GMarker     marker = new GMarker(point, name, image);
                GMarkerRect rect   = new GMarkerRect(marker);
                City        city   = new City("CI" + "0" + (AutoIncrementID += 1).ToString(), txtName.Text, txtLabel.Text, txtRemark.Text, point);
                main.detailMarkers.Add(marker, city);
                if (MainForm.isConnected)
                {
                    city.Edit();
                }
                main.markerOverlay.Markers.Add(marker);
                main.markerOverlay.Markers.Add(rect);
                MessageBox.Show("แก้ไขสำเร็จ");
                ControlViews.CityCreation.setEditMode(false);
                clearField();
            }
            else if (editMode == false)
            {
                // If on default mode do this
                GMarker     marker = new GMarker(point, name, image);
                GMarkerRect rect   = new GMarkerRect(marker);
                City        city   = new City("CI" + "0" + (AutoIncrementID += 1).ToString(), txtName.Text, txtLabel.Text, txtRemark.Text, point);
                main.detailMarkers.Add(marker, city);

                // TODO : Manage data before adding to overlay
                if (MainForm.isConnected)
                {
                    city.Insert();
                }
                main.markerOverlay.Markers.Add(marker);
                main.markerOverlay.Markers.Add(rect);
                MessageBox.Show("เพิ่มมาร์คเกอร์ " + marker.Name + " บนแผนที่แล้ว", "City Marker");
                clearField();
            }
        }
Пример #14
0
        private void btnAddMarker_Click(object sender, EventArgs e)
        {
            string      name  = txtName.Text;
            PointLatLng point = PositionConverter.ParsePointFromString(txtPosition.Text);

            foreach (Control c in Controls)
            {
                if (c is TextBox)
                {
                    if (c.Text == "")
                    {
                        MessageBox.Show("กรุณากรอกข้อมูลให้ครบถ้วน", "คำเตือน", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                        return;
                    }
                }
            }
            if (editMode == true)
            {
                main.detailMarkers.Remove(getmarker);
                main.markerOverlay.Markers.Remove(getmarker);
                main.markerOverlay.Markers.Remove(getrect);
                AutoIncrementID -= 1;
                Image       image  = Image.FromFile("Images/icon/Airport.png");
                GMarker     marker = new GMarker(point, name, image);
                GMarkerRect rect   = new GMarkerRect(marker);

                //Add Data to Dictionary
                Airport airport = new Airport("AP" + "0" + (AutoIncrementID += 1).ToString(), txtCountry.Text, txtName.Text, checkInter, txtICAO.Text, txtIATA.Text, point);
                main.detailMarkers.Add(marker, airport);

                // TODO : Manage data before adding to overlay
                if (MainForm.isConnected)
                {
                    airport.Edit();
                }
                main.markerOverlay.Markers.Add(marker);
                main.markerOverlay.Markers.Add(rect);
                ControlViews.AirportCreation.setEditMode(false);
                MessageBox.Show("แก้ไขสำเร็จ");
                clearField();
            }
            else
            {
                Image       image  = Image.FromFile("Images/icon/Airport.png");
                GMarker     marker = new GMarker(point, name, image);
                GMarkerRect rect   = new GMarkerRect(marker);

                //Add Data to Dictionary
                Airport airport = new Airport("AP" + "0" + (AutoIncrementID += 1).ToString(), txtCountry.Text, txtName.Text, checkInter, txtICAO.Text, txtIATA.Text, point);
                main.detailMarkers.Add(marker, airport);

                // TODO : Manage data before adding to overlay
                if (MainForm.isConnected)
                {
                    airport.Insert();
                }
                main.markerOverlay.Markers.Add(marker);
                main.markerOverlay.Markers.Add(rect);
                MessageBox.Show("เพิ่มมาร์คเกอร์ " + marker.Name + " บนแผนที่แล้ว", "Airport Marker");
                clearField();
            }
        }
Пример #15
0
        private void btnCreate_Click(object sender, EventArgs e)
        {
            string      name  = txtName.Text;
            PointLatLng point = PositionConverter.ParsePointFromString(txtPosition.Text);

            foreach (Control c in Controls)
            {
                if (c is TextBox)
                {
                    if (c.Text == "")
                    {
                        MessageBox.Show("กรุณากรอกข้อมูลให้ครบถ้วน", "คำเตือน", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                        return;
                    }
                }
                else if (c is ComboBox)
                {
                    if (c.Text == "")
                    {
                        MessageBox.Show("กรุณาเลือกข้อมูลให้ครบถ้วน", "คำเตือน", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                        return;
                    }
                }
            }
            //if (String.IsNullOrWhiteSpace(txtName.Text) || String.IsNullOrWhiteSpace(cmbResponsibleUnit.Text) || String.IsNullOrWhiteSpace(cmbResponsiblePerson.Text) || String.IsNullOrWhiteSpace(txtPosition.Text)
            //    || String.IsNullOrWhiteSpace(txtPriority.Text) || String.IsNullOrWhiteSpace(cmbProvince.Text) || String.IsNullOrWhiteSpace(txtSize.Text) || String.IsNullOrWhiteSpace(txtUnitStatus.Text))
            //{
            //    MessageBox.Show("กรุณากรอกข้อมูลให้ครบทุกช่อง","คำเตือน", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            //}
            if (!int.TryParse(txtPriority.Text, out parsedValue))
            {
                MessageBox.Show("ระดับความสำคัญใส่ได้เฉพาะตัวเลขจำนวนเต็มเท่านั้น", "คำเตือน", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                return;
            }
            if (parsedValue > 99 || parsedValue <= 0)
            {
                //txtPriority.Text = txtPriority.Text.Substring(0, txtPriority.TextLength - 1);
                MessageBox.Show("ระดับความสำคัญ สามารถใส่ตัวเลขได้ระหว่าง 1-99 เท่านั้น", "ข้อผิดพลาด", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
            else
            {
                if (editMode == true)
                {
                    main.markerOverlay.Markers.Remove(getmarker);
                    main.markerOverlay.Markers.Remove(getrect);
                    AutoIncrementID -= 1;
                    main.detailMarkers.Remove(getmarker);

                    Image       image  = Image.FromFile("Images/icon/VitalAsset.png");
                    GMarker     marker = new GMarker(point, name, image);
                    GMarkerRect rect   = new GMarkerRect(marker);

                    //Add Data to dictionary
                    VitalAsset vitalAsset = new VitalAsset("VA" + "0" + (AutoIncrementID += 1).ToString(), txtName.Text, cmbType.Text, Int32.Parse(txtPriority.Text), cmbProvince.Text, txtSize.Text, cmbResponsibleUnit.Text, txtUnitStatus.Text, cmbResponsiblePerson.Text, point);
                    main.detailMarkers.Add(marker, vitalAsset);
                    // TODO : Manage data before adding to overlay
                    main.markerOverlay.Markers.Add(marker);
                    main.markerOverlay.Markers.Add(rect);

                    MessageBox.Show("แก้ไขสำเร็จ");

                    // Set edit mode to false and clearing textbox.
                    ControlViews.CityCreation.setEditMode(false);
                    clearField();
                }
                else
                {
                    // TODO : Selecting image to display as marker
                    Image       image  = Image.FromFile("Images/icon/VitalAsset.png");
                    GMarker     marker = new GMarker(point, name, image);
                    GMarkerRect rect   = new GMarkerRect(marker);

                    //Add Data to dictionary
                    VitalAsset vitalAsset = new VitalAsset("VA" + "0" + (AutoIncrementID += 1).ToString(), txtName.Text, cmbType.Text, Int32.Parse(txtPriority.Text), cmbProvince.Text, txtSize.Text, cmbResponsibleUnit.Text, txtUnitStatus.Text, cmbResponsiblePerson.Text, point);
                    main.detailMarkers.Add(marker, vitalAsset);

                    // TODO : Manage data before adding to overlay
                    main.markerOverlay.Markers.Add(marker);
                    main.markerOverlay.Markers.Add(rect);
                    MessageBox.Show("เพิ่มมาร์คเกอร์ " + marker.Name + " บนแผนที่แล้ว", "VitalAsset Marker");
                    clearField();
                }
            }
        }
Пример #16
0
        private void btnAddMarker_Click(object sender, EventArgs e)
        {
            string      name  = txtLabel.Text;
            PointLatLng point = PositionConverter.ParsePointFromString(txtPosition.Text);

            foreach (Control c in Controls)
            {
                if (c is TextBox)
                {
                    if (c.Text == "")
                    {
                        if (c != txtRemark)
                        {
                            MessageBox.Show("กรุณากรอกข้อมูลให้ครบถ้วน", "คำเตือน", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                            return;
                        }
                    }
                }
            }
            if (cmbType.Text == "")
            {
                //Check if user not seleted cmbType
                MessageBox.Show("กรุณาเลือกชนิด", "คำเตือน", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
            else
            {
                if (editMode == true)
                {
                    main.detailMarkers.Remove(getmarker);
                    main.markerOverlay.Markers.Remove(getmarker);
                    main.markerOverlay.Markers.Remove(getrect);
                    GMarker     marker = new GMarker(point, name, image);
                    GMarkerRect rect   = new GMarkerRect(marker);
                    AutoIncrementID -= 1;
                    //Add Data to Dictionary
                    LandMark landMark = new LandMark("LM" + "0" + (AutoIncrementID += 1).ToString(), txtName.Text, txtLabel.Text, point, cmbType.SelectedItem.ToString(), txtRemark.Text);
                    main.detailMarkers.Add(marker, landMark);

                    // TODO : Manage data before adding to overlay
                    if (MainForm.isConnected)
                    {
                        landMark.Edit();
                    }
                    main.markerOverlay.Markers.Add(marker);
                    main.markerOverlay.Markers.Add(rect);
                    MessageBox.Show("แก้ไขสำเร็จ");
                    ControlViews.LandmarkCreation.setEditMode(false);
                    clearField();
                }
                else
                {
                    // TODO : Selecting image to display as marker
                    GMarker     marker = new GMarker(point, name, image);
                    GMarkerRect rect   = new GMarkerRect(marker);

                    //Add Data to Dictionary
                    LandMark landMark = new LandMark("LM" + "0" + (AutoIncrementID += 1).ToString(), txtName.Text, txtLabel.Text, point, cmbType.SelectedItem.ToString(), txtRemark.Text);
                    main.detailMarkers.Add(marker, landMark);
                    // TODO : Manage data before adding to overlay
                    if (MainForm.isConnected)
                    {
                        landMark.Insert();
                    }
                    main.markerOverlay.Markers.Add(marker);
                    main.markerOverlay.Markers.Add(rect);
                    MessageBox.Show("เพิ่มมาร์คเกอร์ " + marker.Name + " บนแผนที่แล้ว", "LandMark Marker");
                    clearField();
                }
            }
        }