Exemplo n.º 1
0
    protected void OpenFile(object sender, EventArgs e)
    {
        FileChooserDialog fc = new FileChooserDialog("Choose the directory containing the hives to open",
                                                     this,
                                                     FileChooserAction.Open,
                                                     "Cancel", ResponseType.Cancel,
                                                     "Open", ResponseType.Accept);

        if (fc.Run() == (int)ResponseType.Accept)
        {
            string filename = fc.Filename;
            fc.Destroy();

            _currentStrs = null;

            new Thread(new ThreadStart(delegate {
                _pagefile    = new PageFile(filename);
                _strs        = _pagefile.GetASCIIStrings(6);
                _currentStrs = _pagefile.GetPossibleEnvironmentVariables(_strs, 10);
            })).Start();

            new Thread(new ThreadStart(delegate {
                Populate();
            })).Start();
        }
        else
        {
            fc.Destroy();
        }
    }