private void menuFileOpen_Click(object sender, EventArgs e)
        {
            if (_openFileDialog.ShowDialog() != DialogResult.OK)
                return;

            using (WaitCursor())
            using (var fileStream = (FileStream)_openFileDialog.OpenFile())
            {
                _analyser = fileStream.Name.EndsWith(".sln")
                                ? (DependencyAnalyserBase)new SolutionFileAnalyser(fileStream)
                                : new AssemblyAnalyser(Assembly.LoadFrom(fileStream.Name));

                _filterPreferences.SetAssemblyNames(_analyser.DependencyGraph.GetNodes());
                EnableAndDisableMenuItems();
                UpdateImage();
            }
        }
Exemplo n.º 2
0
        private void menuFileOpen_Click(object sender, EventArgs e)
        {
            if (_openFileDialog.ShowDialog() != DialogResult.OK)
            {
                return;
            }

            using (WaitCursor())
                using (var fileStream = (FileStream)_openFileDialog.OpenFile())
                {
                    _analyser = fileStream.Name.EndsWith(".sln")
                                ? (DependencyAnalyserBase) new SolutionFileAnalyser(fileStream)
                                : new AssemblyAnalyser(Assembly.LoadFrom(fileStream.Name));

                    _filterPreferences.SetAssemblyNames(_analyser.DependencyGraph.GetNodes());
                    EnableAndDisableMenuItems();
                    UpdateImage();
                }
        }