Esempio n. 1
0
        private void saveUnsent()
        {
            List <QSO> qsoList = new List <QSO>();

            foreach (QSO[] qsoBatch in logQueue.Where(item => item.qso != null).Select(item => item.qso).ToList())
            {
                qsoList.AddRange(qsoBatch);
            }
            ProtoBufSerialization.Write <List <QSO> >(unsentFilePath + ".qso", qsoList);
            ProtoBufSerialization.Write <List <QsoDeleteData> >(unsentFilePath + ".del", logQueue.Where(item => item.delete != null).Select(item => item.delete).ToList());
        }
Esempio n. 2
0
        private async void UDPDataReceived(object sender, DataReceivedArgs e)
        {
            string data = Encoding.UTF8.GetString(e.data);

            System.Diagnostics.Trace.TraceInformation(data);
            QSO qso = qsoFactory.create(data);

            if (qso == null)
            {
                return;
            }
            //System.Diagnostics.Trace.TraceInformation(qso.toJSON());
            dgvQSOInsert(qso);
            ProtoBufSerialization.Write <QSO>(qsoFilePath, qso, true);
            await http.postQso(qso);
        }
Esempio n. 3
0
 private void saveUnsent()
 {
     ProtoBufSerialization.Write <List <QSO> >(unsentFilePath, qsoQueue.ToList());
 }
Esempio n. 4
0
 public void writeQsoList()
 {
     ProtoBufSerialization.Write <BindingList <QSO> >(qsoFilePath, qsoList);
 }