/// <summary> /// Default ctor /// </summary> internal Checker(string path, FrameworkInfo framework, Action<MessageTypes, string, IMetadataScope, string> log, Action<int, int> setProgress) { this.path = path; this.framework = framework; this.log = log; this.setProgress = setProgress; var localFolder = Path.GetDirectoryName(path); resolver = new AssemblyResolver(localFolder, framework.Folder); }
/// <summary> /// Default ctor /// </summary> public MainForm() { InitializeComponent(); miSelectAssembly.Image = Icons24.Check; miFrameworkFolder.Image = Icons24.Folder; miCopy.Image = Icons24.Copy; var folder = UserPreferences.Preferences.AssemblyCheckFrameworkFolder; framework = (string.IsNullOrEmpty(folder) || !Directory.Exists(folder)) ? Frameworks.Instance.GetNewestVersion() : new FrameworkInfo(folder); UpdateMenu(); miCopy.Enabled = false; }
/// <summary> /// Change the current framework folder. /// </summary> private void miChangeFrameworkFolder_Click(object sender, EventArgs e) { using (var dialog = new FolderBrowserDialog()) { dialog.SelectedPath = Frameworks.Root; if (dialog.ShowDialog(this) != DialogResult.OK) return; framework = new FrameworkInfo(dialog.SelectedPath); UpdateMenu(); UserPreferences.Preferences.AssemblyCheckFrameworkFolder = dialog.SelectedPath; UserPreferences.SaveNow(); } }