public frmInfoNote(string LiteratureTitle) { RefreshInMain = false; InitializeComponent(); note = new CNote(); noteLogs = new List <RNoteLog>(); noteColors = new List <RNoteColor>(); topicGUID = Guid.NewGuid().ToString(); List <RLiteratureOutSource> litOutSources = G.glb.lstLiteratureOutSource.FindAll(o => o.Title == LiteratureTitle).ToList(); for (int i = 0; i < litOutSources.Count; i++) { RNoteOutsource noteOutsource = new RNoteOutsource(); noteOutsource.TagTime = DateTime.Today.Date; noteOutsource.Topic = litOutSources[i].Title; noteOutsource.Outsourcepath = litOutSources[i].OutsourcePath; noteOutsources.Add(noteOutsource); } LoadNoteColor(); LoadNoteLog(); LoadNoteOutsource(); txtTopic.Text = LiteratureTitle; dtpDate.Value = DateTime.Today.Date; btnSave.Enabled = true; }
private void tsmAddOutsource_Click(object sender, EventArgs e) { string newOutsourcePath = Interaction.InputBox("Add outsource", "Add outsource", "Add outsource", 300, 300); RNoteOutsource newNoteOutsource = new RNoteOutsource(); newNoteOutsource.Topic = note.Topic; newNoteOutsource.TagTime = dtpDate.Value; newNoteOutsource.Outsourcepath = newOutsourcePath; noteOutsources.Add(newNoteOutsource); LoadNoteOutsource(); btnSave.Enabled = true; }