public Notes_TextContainer(Notes_TextContainer copy, Notes_Archive_Container n) { notes = copy.notes; archive_Root = n; vessel = null; archived = true; }
public Notes_Archive_Container(Guid gid, string name, double time, double m, VesselType t) { id = gid; vesselName = name; recoveryTime = time; met = m; vtype = t; container = this; log = new Notes_VesselLog(container); notes = new Notes_TextContainer(container); checkList = new Notes_CheckListContainer(container); contracts = new Notes_ContractContainer(container); data = new Notes_DataContainer(container); crew = new Notes_Archived_Crew_Container(container); }
private void saveTextNotes(ConfigNode node, Notes_TextContainer text) { ConfigNode textNotes = new ConfigNode("VESSEL_TEXT_NOTES"); for (int j = 0; j < text.noteCount; j++) { Notes_TextItem t = text.getNote(j); if (t == null) continue; ConfigNode textNote = new ConfigNode("NOTE"); textNote.AddValue("KEY", t.ID); textNote.AddValue("CREATE_TIME", t.CreateTime); textNote.AddValue("EDIT_TIME", t.EditTime); textNote.AddValue("TITLE", t.Title); textNote.AddValue("NOTE", t.Text); textNotes.AddNode(textNote); } node.AddNode(textNotes); }
private Notes_TextContainer loadTextNotes(ConfigNode node) { Notes_TextContainer t = new Notes_TextContainer(); for (int j = 0; j < node.GetNodes("NOTE").Length; j++) { ConfigNode note = node.GetNodes("NOTE")[j]; if (note == null) continue; if (!note.HasValue("TITLE")) continue; if (!note.HasValue("NOTE")) continue; string title = note.GetValue("TITLE"); string text = note.GetValue("NOTE"); Guid id = note.parse("KEY", Guid.NewGuid()); DateTime create = note.parse("CREATE_TIME", new DateTime()); DateTime edit = note.parse("EDIT_TIME", new DateTime()); Notes_TextItem newNote = new Notes_TextItem(text, title, id, create, edit, t); t.addNote(newNote); } return t; }
public void loadTextNotes(Notes_TextContainer t) { notes = new Notes_TextContainer(t, this); }
public Notes_TextContainer(Notes_TextContainer copy, Notes_Container n) { notes = copy.notes; root = n; vessel = n.NotesVessel; }
public Notes_TextItem(string note, string t, Guid id, DateTime create, DateTime edit, Notes_TextContainer r) { text = note; title = t; key = id; createTime = create; editTime = edit; rootContainer = r; }
public Notes_TextItem(DateTime time, Notes_TextContainer r) { createTime = time; editTime = time; key = Guid.NewGuid(); rootContainer = r; }