Skip to content
This repository has been archived by the owner on Jan 27, 2019. It is now read-only.

Commit

Permalink
Load plugins when project loaded
Browse files Browse the repository at this point in the history
  • Loading branch information
yck1509 committed Dec 20, 2014
1 parent a8d57bd commit a7c0140
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions ConfuserEx/ViewModel/UI/AppVM.cs
Original file line number Diff line number Diff line change
Expand Up @@ -145,5 +145,21 @@ private void OnProjectPropertyChanged(object sender, PropertyChangedEventArgs e)
OnPropertyChanged("Title");
}

protected override void OnPropertyChanged(string property) {
base.OnPropertyChanged(property);
if (property == "Project")
LoadPlugins();
}

private void LoadPlugins() {
foreach (var plugin in Project.Plugins) {
try {
ComponentDiscovery.LoadComponents(Project.Protections, Project.Packers, plugin.Item);
}
catch {
MessageBox.Show("Failed to load plugin '" + plugin + "'.");
}
}
}
}
}

0 comments on commit a7c0140

Please sign in to comment.