private GpsViewNET.Label make_label(string text) { GpsViewNET.Label objLabel = map1.NewLabel(); objLabel.Width = 10; objLabel.Height = 10; GpsViewNET.TextFont font = new GpsViewNET.TextFont(); font.Size = 8; font.Bold = true; //font.Color.Blue = 255; objLabel.TextFont = font; objLabel.Text = text; return(objLabel); }
private GpsViewNET.Label make_label(string text) { GpsViewNET.Label objLabel = map1.NewLabel(); objLabel.Width = 100; objLabel.Height = 10; GpsViewNET.TextFont font = new GpsViewNET.TextFont(); font.Size = 10; font.Bold = true; font.Color.Blue = 255; objLabel.TextFont = font; objLabel.Text = text; return objLabel; }
private void Croqui_Load(object sender, EventArgs e) { // TODO: This line of code loads data into the 'lptDataSet.ponto_sangria' table. You can move, or remove it, as needed. this.ponto_sangriaTableAdapter.Fill(this.lptDataSet.ponto_sangria, Poste.ProjetoId); // TODO: This line of code loads data into the 'lptDataSet.faixa_servidao' table. You can move, or remove it, as needed. this.faixa_servidaoTableAdapter.Fill(this.lptDataSet.faixa_servidao, Poste.ProjetoId); // TODO: This line of code loads data into the 'lptDataSet.ponto_significativo' table. You can move, or remove it, as needed. this.ponto_significativoTableAdapter.Fill(this.lptDataSet.ponto_significativo, Poste.ProjetoId); // TODO: This line of code loads data into the 'lptDataSet.cliente' table. You can move, or remove it, as needed. this.clienteTableAdapter.Fill(this.lptDataSet.cliente, Poste.ProjetoId); // TODO: This line of code loads data into the 'eletrocadDataSet.poste' table. You can move, or remove it, as needed. //this.posteTableAdapter.Fill(this.eletrocadDataSet.poste); // TODO: This line of code loads data into the 'cadredeDataSet.ILUM' table. You can move, or remove it, as needed. //this.iLUMTableAdapter.Fill(this.cadredeDataSet.ILUM); //if (openFileDialog1.ShowDialog() == DialogResult.OK) //{ Cursor.Current = Cursors.WaitCursor; Application.DoEvents(); //shapefilepath = openFileDialog1.FileName; //display_shape_file(); //datum nodeDatumGrid.Datum = GpsToolsNET.Datum.WGS_84; // Create a new shape object. objShapeTransformadores = new GpsShapeNET.Shape(); objShapePoste = new GpsShapeNET.Shape(); objShapeResidencia = new GpsShapeNET.Shape(); objShapeTrack = new GpsShapeNET.Shape(); objShapePontoSig = new GpsShapeNET.Shape(); objShapePontoSangria = new GpsShapeNET.Shape(); objShapeFaixaServ = new GpsShapeNET.Shape(); objShapeLabels = new GpsShapeNET.Shape(); objShapeTransformadores.DatumGridTemplate = nodeDatumGrid; objShapePoste.DatumGridTemplate = nodeDatumGrid; objShapeResidencia.DatumGridTemplate = nodeDatumGrid; objShapeTrack.DatumGridTemplate = nodeDatumGrid; objShapePontoSig.DatumGridTemplate = nodeDatumGrid; objShapePontoSangria.DatumGridTemplate = nodeDatumGrid; objShapeFaixaServ.DatumGridTemplate = nodeDatumGrid; objShapeLabels.DatumGridTemplate = nodeDatumGrid; mapShapeTransformadores = map1.NewMapShape(objShapeTransformadores); mapShapePoste = map1.NewMapShape(objShapePoste); mapShapeResidencia = map1.NewMapShape(objShapeResidencia); mapShapeTrack = map1.NewMapShape(objShapeTrack); mapShapePontoSig = map1.NewMapShape(objShapePontoSig); mapShapeFaixaServ = map1.NewMapShape(objShapeFaixaServ); mapShapePontoSangria = map1.NewMapShape(objShapePontoSangria); mapShapeLabels = map1.NewMapShape(objShapeLabels); //labels objLabel = map1.NewLabel(); objLabel.Width = 100; objLabel.Height = 10; GpsViewNET.TextFont font = new GpsViewNET.TextFont(); font.Size = 12; objLabel.TextFont = font; objLabel.Pen.Width = 2; objLabel.Pen.Blue = 255; mapShapeLabels.NodeTemplate = objLabel; objTrackPontoSangria = map1.NewIcon("faixa_serv"); mapShapePontoSangria.NodeTemplate = objTrackPontoSangria; //track faixa serv objTrackFaixaServ = map1.NewIcon("faixa_serv"); mapShapeFaixaServ.NodeTemplate = objTrackFaixaServ; //track ponto significativo objTrackPontoSig = map1.NewEllipse(); objTrackPontoSig.Height = 1; objTrackPontoSig.Width = 1; mapShapePontoSig.NodeTemplate = objTrackPontoSig; //track residencia objTrackResidencia = map1.NewEllipse(); objTrackResidencia.Height = 1; objTrackResidencia.Width = 1; mapShapeResidencia.NodeTemplate = objTrackResidencia; //track poste objTrackPoste = map1.NewIcon("light"); mapShapePoste.NodeTemplate = objTrackPoste; //track objTrack = map1.NewRectangle(); objTrack.Brush.Blue = 200; objTrack.Brush.Transparent = true; objTrack.Width = 1; objTrack.Height = 1; mapShapeTrack.NodeTemplate = objTrack; //track transformadores objTrackTransformadores = map1.NewRectangle(); objTrackTransformadores.Brush.Blue = 255; objTrackTransformadores.Width = 6; objTrackTransformadores.Height = 6; objTrackTransformadores.Pen.Width = 1; objTrackTransformadores.Pen.Blue = 255; mapShapeTransformadores.NodeTemplate = objTrackTransformadores; //mapShapeTransformadores.Background.Transparent = true; //mapShapeTransformadores.Border.Width = 0; // Unset border object. //objLabel = map1.NewLabel(); //mapShapeLabel.NodeTemplate = objLabel; //ConectarTrimble(); //} map1.Update(); // Use ellipse to mark clicked position //objEllipseMark = map1.NewEllipse(); objEllipseMark = make_ellipseMark(); //preencher lista de transformadores //DataTable transf = iLUMTableAdapter.GetDataUTransf(); //cbTransf.Items.Clear(); //foreach (DataRow row in transf.Rows) //{ // object trans = row["UTRANSF"]; // cbTransf.Items.Add(trans); //} //se houver residencia plota elas no mapa if (this.lptDataSet.cliente.Rows.Count > 0) { refreshResidenciaShape(); } //se houver pontos plota eles no mapa if (this.eletrocadDataSet.poste.Rows.Count > 0) { refreshPostesShape(); } if (this.lptDataSet.ponto_significativo.Rows.Count > 0) { refreshPontoSigShape(); } if (this.lptDataSet.faixa_servidao.Rows.Count > 0) { refreshFaixaServidaoShape(); } if (this.lptDataSet.ponto_sangria.Rows.Count > 0) { refreshPontoSangria(); } //if ((MessageBox.Show("Conectar GPS Trimble", "", MessageBoxButtons.OKCancel, // MessageBoxIcon.Question, MessageBoxDefaultButton.Button1) == DialogResult.OK)) { //ConectarTrimbleSimulacao(); this.ConectarTrimble(); txtGPSStatus.Text = gpsTrimbleStatus; base.coletarSSFLpt("obra-" + Poste.ObraLpt + " " + DateTime.Now.Day + DateTime.Now.Month + DateTime.Now.Year + DateTime.Now.Hour + DateTime.Now.Minute); //} Cursor.Current = Cursors.Default; Application.DoEvents(); }