private void listTagNote_DoubleClick(object sender, EventArgs e) { mtag = new ListViewItem(); string selectedFile = listTagNote.SelectedItems[0].Text; string[] notes; string tag = (string)listTagNote.SelectedItems[0].Tag; string notepath = String.Concat(tag, "\\"); string path = Path.Combine(tag, selectedFile); if (File.Exists(path)) { try { fNote opf = new fNote(2, path); opf.Show(); } catch (Exception ex) { throw ex; } } else if(Directory.Exists(notepath)) { listTagNote.Clear(); notes = Directory.GetFiles(notepath); foreach (string note in notes) { mtag.Text = Path.GetFileName(note); mtag.Tag = new FileInfo(tag).FullName; listTagNote.Items.Add((ListViewItem)mtag.Clone()); mtag.ImageIndex++; } } }
private void button4_Click(object sender, EventArgs e) { fNote newnote = new fNote(1); newnote.Show(); }
private void NewNote_Click(object sender, EventArgs e) { fNote newnote = new fNote(0); newnote.Show(); }