Esempio n. 1
0
 // Confirma Fence
 private void btn_fence_Click(object sender, EventArgs e)
 {
     if (statusFence.Equals(STATUS_GUI.ADD_POINTS))
     {
         add(fence);
         statusFence     = STATUS_GUI.CONFIRM_FENCE;
         button5.Enabled = true;
     }
 }
Esempio n. 2
0
        /*************************************************************************
        *                          Set's                                        *
        *************************************************************************/

        /*
         * Processa o selecionamento dos pontos para montagem da cerca
         */
        private void setFencePoint(PointLatLng point)
        {
            txtLat.Text = point.Lat.ToString();
            txtLng.Text = point.Lng.ToString();

            addPositionFence(point);
            statusFence       = STATUS_GUI.ADD_POINTS;
            btn_fence.Enabled = true;
        }
Esempio n. 3
0
 // Inicia nova fence
 private void button5_Click(object sender, EventArgs e)
 {
     if (!statusFence.Equals(STATUS_GUI.NEW_FENCE))
     {
         fence.clear();
         statusFence     = STATUS_GUI.NEW_FENCE;
         button5.Enabled = false;
     }
 }
Esempio n. 4
0
        /*
         * Set a posicao inicial da rota
         */
        private void setStartPoint(PointLatLng point)
        {
            route.startAddress(point);

            txtLatStart.Text = point.Lat.ToString();
            txtLngStart.Text = point.Lng.ToString();

            txtLatStart.BackColor = Color.FromArgb(61, 120, 165);
            txtLngStart.BackColor = Color.FromArgb(61, 120, 165);

            layerRoute.add(point, GMarkerGoogleType.blue);

            txtLatStop.Focus();

            statusTrip = STATUS_GUI.END_POINT;
        }
Esempio n. 5
0
        /*************************************************************************
        *                          Painel                                       *
        *************************************************************************/

        /*
         * Seleciona (expande) o painel
         */
        void expandPanel(Panel p)
        {
            if (p != null)
            {
                bool show = !p.Visible;

                if (show)
                {
                    collapseAllPanel();
                }

                p.Visible = show;

                statusFence = STATUS_GUI.INIT;
                statusTrip  = STATUS_GUI.INIT;
            }
        }
Esempio n. 6
0
        /*
         * Set a posicao final da rota
         */
        private void setEndPoint(PointLatLng point)
        {
            if (point != null)
            {
                route.stopAddress(point);

                txtLatStop.Text = point.Lat.ToString();
                txtLngStop.Text = point.Lng.ToString();

                txtLatStop.BackColor = Color.FromArgb(61, 120, 165);
                txtLngStop.BackColor = Color.FromArgb(61, 120, 165);

                layerRoute.add(point, GMarkerGoogleType.blue);

                statusTrip = STATUS_GUI.INIT_OK;

                add(route);
            }
        }
Esempio n. 7
0
        private void initSelectRoute()
        {
            txtLatStop.BackColor  = Color.White;
            txtLngStop.BackColor  = Color.White;
            txtLatStart.BackColor = Color.White;
            txtLngStart.BackColor = Color.White;

            statusTrip = STATUS_GUI.START_POINT;

            txtLatStart.Text  = "";
            txtLngStart.Text  = "";
            txtLatStop.Text   = "";
            txtLngStop.Text   = "";
            startAddress.Text = "";
            endAddress.Text   = "";

            txtLatStart.Focus();
            tvBehavior.Nodes.Clear();

            removeRoute(route);
        }
Esempio n. 8
0
 private void groupBox2_Click(object sender, System.EventArgs e)
 {
     statusTrip = STATUS_GUI.END_POINT;
 }
Esempio n. 9
0
 // Cancel fence
 private void btn_cancel_Click(object sender, EventArgs e)
 {
     statusFence     = STATUS_GUI.INIT_OK;
     button5.Enabled = true;
     fence.clear();
 }