public HttpService(HttpServiceConfig _config, Tnxlog _rdaLog) { config = _config; tnxlog = _rdaLog; unsentFilePath = Path.Combine(tnxlog.dataPath, "unsent"); List <QSO> unsentQSOs = QSOFactory.ReadList <List <QSO> >(unsentFilePath + ".qso"); if (unsentQSOs != null && unsentQSOs.Count > 0) { Task.Run(async() => { await postQso(unsentQSOs.ToArray()); }); } List <QsoDeleteData> unsentDels = ProtoBufSerialization.Read <List <QsoDeleteData> >(unsentFilePath + ".del"); if (unsentDels != null && unsentDels.Count > 0) { Task.Run(async() => { foreach (QsoDeleteData del in unsentDels) { if (!await _postDeleteQso(del)) { addToQueue(del); } } }); } }
public override void initialize() { if (formMain == null) { formMain = new FormMainConfig(this); } else { formMain.parent = this; } if (formLog == null) { formLog = new FormLogConfig(this); } else { formLog.parent = this; } if (httpService == null) { httpService = new HttpServiceConfig(this); } else { httpService.parent = this; } if (transceiverController == null) { transceiverController = new TransceiverControllerConfig(this); } else { transceiverController.parent = this; } if (cwMacros == null) { cwMacros = new List <string[]>(); } for (int co = cwMacros.Count; co < CwMacrosDefaults.Count; co++) { cwMacros.Add(new string[] { CwMacrosDefaults[co].Item1, CwMacrosDefaults[co].Item2 }); } if (serMainFormPanels != null) { _mainFormPanels = serMainFormPanels.ToDictionary(item => item.name, item => item.enabled); } else { _mainFormPanels = new Dictionary <string, bool>(); } foreach (string panel in MainFormPanels) { if (!_mainFormPanels.ContainsKey(panel)) { _mainFormPanels[panel] = true; } } base.initialize(); }
public StatusData(HttpServiceConfig _config) : base(_config) { qth = new StatusDataQth((TnxlogConfig)_config.parent); }
internal FreqData(HttpServiceConfig _config, string _freq) : base(_config) { freq = _freq; }
internal QsoDeleteRequest(HttpServiceConfig _config, QsoDeleteData qdd) : base(_config) { delete = qdd.delete; }
internal QsoDeleteRequest(HttpServiceConfig _config, QSO qso) : base(_config) { delete = qso.serverTs; }
internal QSOtoken(HttpServiceConfig _config, QSO[] _qso) : base(_config) { qso = _qso; }
public JSONToken(HttpServiceConfig _config) { config = _config; }