Пример #1
0
        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());
            }
        }
Пример #2
0
        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();
        }
Пример #3
0
        private void toolStripButtonOpen_Click(object sender, EventArgs e)
        {
            string file = FileSelector.BrowseFile();

            if (file != null)
            {
                richTextBoxSource.Text = File.ReadAllText(file);
            }
        }
Пример #4
0
        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();
        }
Пример #5
0
 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);
     }
 }