private void CIPFormGPS_Closing(object sender, System.ComponentModel.CancelEventArgs e) { timerCoordenada.Enabled = false; if (ssfWriter != null) { if (ssfWriter.IsFeatureInProgress()) { ssfWriter.CancelFeature(); } if (ssfWriter.IsSSFFileInProgress()) { ssfWriter.EndSSFFile(); } ssfWriter = null; } if (gpsTrimble != null) { if (gpsTrimble.IsTracking()) { gpsTrimble.StopTracking(); } gpsTrimble = null; } }
public void coletarSSF() { ssfWriter = new SSFWriter(); ssfWriter.LogCarrier = true; ssfWriter.PointLoggingInterval = 1f; ssfWriter.SetAntennaSettings("interna", AntennaMeasurementMethod.pfAntennaMeasurementMethodNone, 1.5f); String ssfFile = Usuario.Cidade + "-" + Usuario.Chave + ".ssf"; String ssfPath = Library.appDir + "\\ssf"; this.errorCode = ssfWriter.AttachToGPSReceiverObject(gpsTrimble); if (System.IO.File.Exists(ssfPath + "\\" + ssfFile)) { //System.Windows.Forms.MessageBox.Show("Arquivo SSF já existe"); this.errorCode = ssfWriter.AppendSSFFile(ssfPath, ssfFile); //System.Windows.Forms.MessageBox.Show("Append: " + errorCode.ToString()); } else { //System.Windows.Forms.MessageBox.Show("Arquivo SSF não existe e será criado"); this.errorCode = ssfWriter.StartSSFFile(ssfPath, ssfFile); //System.Windows.Forms.MessageBox.Show("Start: " + errorCode.ToString()); } }
public void coletarSSFLpt(string filename) { ssfWriter = new SSFWriter(); ssfWriter.LogCarrier = true; ssfWriter.PointLoggingInterval = 1f; ssfWriter.SetAntennaSettings("interna", AntennaMeasurementMethod.pfAntennaMeasurementMethodNone, 1.5f); String ssfFile = filename + ".ssf"; String ssfPath = Library.appDir + "\\ssf"; this.errorCode = ssfWriter.AttachToGPSReceiverObject(gpsTrimble); if (System.IO.File.Exists(ssfPath + "\\" + ssfFile)) { //System.Windows.Forms.MessageBox.Show("Arquivo SSF já existe"); this.errorCode = ssfWriter.AppendSSFFile(ssfPath, ssfFile); //System.Windows.Forms.MessageBox.Show("Append: " + errorCode.ToString()); } else { //System.Windows.Forms.MessageBox.Show("Arquivo SSF não existe e será criado"); this.errorCode = ssfWriter.StartSSFFile(ssfPath, ssfFile); //System.Windows.Forms.MessageBox.Show("Start: " + errorCode.ToString()); } }