private void srcList_SelectionChanged(object sender, SelectionChangedEventArgs e) { MyFileInfo mfi=new MyFileInfo(); mfi = (MyFileInfo)srcList.SelectedItem; FlowDocument doc = new FlowDocument(); doc = GetFlowDocument.getFlowDocument(mfi.fileName); richTextBox.Document = doc; }
public void updata() { fileList.Clear(); for (int i = 0; i < Program.fl.Count; i++) { MyFileInfo mfi = new MyFileInfo(); mfi.ID = i; mfi.Name = Program.fl[i].Name; mfi.fileName = Program.fl[i].FullName; fileList.Add(mfi); } }