private void StoreUncommittedNote() { if (_uncommittedNoteHistoryEntry != null) { _uncommittedNoteHistoryEntry.CommitSystemNote(); if (EDCommander.Current.SyncToEdsm && _uncommittedNoteHistoryEntry.IsFSDJump) // only send on FSD jumps { EDSMSync.SendComments(_uncommittedNoteHistoryEntry.snc.Name, _uncommittedNoteHistoryEntry.snc.Note, _uncommittedNoteHistoryEntry.snc.EdsmId); } _uncommittedNoteHistoryEntry = null; } }
public void SetJournalSystemNoteText(string text, bool commit, bool sendtoedsm) { if (snc == null || snc.Journalid == 0) // if no system note, or its one on a system, from now on we assign journal system notes only from this IF { snc = SystemNoteClass.MakeSystemNote("", DateTime.Now, System.name, Journalid, System.id_edsm, IsFSDJump); } snc = snc.UpdateNote(text, commit, DateTime.Now, snc.EdsmId, IsFSDJump); // and update info, and update our ref in case it has changed or gone null // remember for EDSM send purposes if its an FSD entry if (snc != null && commit && sendtoedsm && snc.FSDEntry) // if still have a note, and commiting, and send to esdm, and FSD jump { EDSMSync.SendComments(snc.SystemName, snc.Note, snc.EdsmId); } }