// 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; } }
/************************************************************************* * 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; }
// 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; } }
/* * 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; }
/************************************************************************* * 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; } }
/* * 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); } }
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); }
private void groupBox2_Click(object sender, System.EventArgs e) { statusTrip = STATUS_GUI.END_POINT; }
// Cancel fence private void btn_cancel_Click(object sender, EventArgs e) { statusFence = STATUS_GUI.INIT_OK; button5.Enabled = true; fence.clear(); }