public void Open_File() { try { string file = FileSelector.BrowseFile(FileType.Excel97); DirectoryTabcontrol RanString = tabControl as DirectoryTabcontrol; int name = file.LastIndexOf("\\"); string _nametab = file.Substring(name + 1); try { RanString.duongdan.Add(_nametab, file); RanString.nameoftab = _nametab; RanString.Dir = file; RanString.Run(); } catch { RanString.nameoftab = _nametab; RanString.Dir = file; RanString.Run(); } counttabpage(); } catch (Exception ex) { MessageBox.Show(ex.ToString()); } }
private void Open_File_Click(object sender, EventArgs e) { string file = FileSelector.BrowseFile(FileType.Excel97); DirectoryTabcontrol RanString = tabControl as DirectoryTabcontrol; RanString.Dir = file; RanString.Run(); }
private void toolStripButtonOpen_Click(object sender, EventArgs e) { string file = FileSelector.BrowseFile(); if (file != null) { richTextBoxSource.Text = File.ReadAllText(file); } }
private void Open_File_Click(object sender, EventArgs e) { string file = FileSelector.BrowseFile(FileType.Excel97); DirectoryTabcontrol RanString = tabControl as DirectoryTabcontrol; int name = file.LastIndexOf("\\"); string _nametab = file.Substring(name + 1); RanString.duongdan.Add(_nametab, file); RanString.nameoftab = _nametab; RanString.Dir = file; RanString.Run(); counttabpage(); }
private void openOToolStripMenuItem_Click(object sender, EventArgs e) { try { string xlsfilter = "Excel files(*.xls)|*.xls|All files (*.*)|*.*"; string file = FileSelector.BrowseFile(xlsfilter); if (file == null) { return; } doc = CompoundDocument.Open(file); IsOpened = true; PopulateTreeview(file); } catch (Exception error) { MessageBox.Show(error.Message); } }