Пример #1
0
        public void loadFile(string filename)
        {
            StreamReader streamReader = new StreamReader(filename);
            string fileText = streamReader.ReadToEnd();
            streamReader.Close();

            Database db = new Database(filename);

            string[] lines = fileText.Split(new char[] { '\n' });

            parseList(lines);
        }
Пример #2
0
        private void loadFile()
        {
            using (FolderBrowserDialog browser = new FolderBrowserDialog())
            {
                if (browser.ShowDialog() == DialogResult.OK)
                {
                    //MessageBox.Show("Folder: " + browser.SelectedPath);
                    Database db = new Database();
                    db.indexDirectory(browser.SelectedPath);
                }
            }
            /*using (OpenFileDialog openFileDialog = new OpenFileDialog())
            {
                openFileDialog.Filter = "Directory List |*.txt| All files |*.*";
                //openFileDialog.FilterIndex = 1;
                openFileDialog.RestoreDirectory = true;

                if (openFileDialog.ShowDialog() == DialogResult.OK)
                {
                    updateTitle("Loading " + openFileDialog.FileName);

                    Database db = new Database(openFileDialog.FileName);
                    db.loadFile(openFileDialog.FileName);

                    mDB.Add(db);

                    updateTitle(openFileDialog.FileName);
                }
            }*/
        }
Пример #3
0
 public SearchResult(string result, int matches, Database db)
 {
     this.result = result;
     this.matches = matches;
     this.db = db;
 }
Пример #4
0
 public SearchResult()
 {
     result = null;
     matches = -1;
     db = null;
 }