public void SetHeader(ADIFHeader header) { _header = header; // This library only writes one version, so we need to change the header just in case. _header.Version = _ADIF_VER; }
public ADIWriter(string filepath, bool append, ADIFHeader header) { Initialize(); Open(filepath, append); _header = header; // This library only writes one version, so we need to change the header just in case. _header.Version = _ADIF_VER; }
private void Initialize() { ADIF_VERSION = _ADIF_VER; _header = new ADIFHeader(); _header.ProgramId = string.Empty; _header.ProgramVersion = string.Empty; _header.TimeStamp = null; _header.Version = _ADIF_VER; _header.InitialComment = string.Empty; _streamer = null; }
private void ExportADIFile(string path) { ADIWriter writer = new ADIWriter(path, false); ADIFHeader header = new ADIFHeader(); // This should be counted by the writer. int num = _qsoLog.QSOs.Count; header.InitialComment = Constants.ADIF_HEADER_COMMENT; header.ProgramId = Constants.APPLICATION_NAME; header.TimeStamp = DateTime.Now; writer.SetHeader(header); writer.WriteHeader(); writer.WriteQSOLinkedList(_qsoLog.QSOs); writer.Close(); MessageBox.Show(string.Format("Records exported: {0}", num), "ADIF Export", MessageBoxButton.OK, MessageBoxImage.Information); }