Ejemplo n.º 1
0
        private void viewButton_Click(object sender, EventArgs e)
        {
            if (snapshotsListBox.SelectedItem == null)
            {
                MessageBox.Show("Please select the snapshot to view.", this.Text, MessageBoxButtons.OK,
                                MessageBoxIcon.Information);
            }
            else
            {
                RegistrySnapshot snapshot;
                string           fileName;

                this.SetStatus("Loading snapshot...");

                fileName = ((FileInfo)snapshotsListBox.SelectedItem).FullPath;

                snapshot = RegistrySnapshot.LoadFromFile(fileName);

                this.SetStatus(null);

                using (ViewDialog dialog = new ViewDialog(snapshot))
                {
                    dialog.ShowDialog(this);
                }
            }
        }
Ejemplo n.º 2
0
        private void viewButton_Click(object sender, EventArgs e)
        {
            if (snapshotsListBox.SelectedItem == null)
              {
            MessageBox.Show("Please select the snapsnot to view.", this.Text, MessageBoxButtons.OK,
                        MessageBoxIcon.Information);
              }
              else
              {
            RegistrySnapshot snapshot;
            string fileName;

            this.SetStatus("Loading snapshot...");

            fileName = ((FileInfo)snapshotsListBox.SelectedItem).FullPath;

            snapshot = RegistrySnapshot.LoadFromFile(fileName);

            this.SetStatus(null);

            using (ViewDialog dialog = new ViewDialog(snapshot))
            {
              dialog.ShowDialog(this);
            }
              }
        }