Skip to content

Commit

Permalink
- [PluginManager] fix bug: when remove plugin success, the ui will crash
Browse files Browse the repository at this point in the history
- [PluginManager] update version to 1.4.2.1
  • Loading branch information
keepwn committed Jul 19, 2015
1 parent 299c369 commit 3912c78
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 15 deletions.
30 changes: 16 additions & 14 deletions Source/Plugin_PluginManager/Interface/PanelPluginManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -99,20 +99,22 @@ void _buttonRemove_Click(object sender, EventArgs e)
MessageBoxType.Error);
if (result == DialogResult.Yes)
{
for (var i = 0; i < items.Count; i++)
{
var item = items[i];
if (item.Checked)
{
var plugin = item.Plugin;
//删除插件所在文件夹
var dirPath = Path.Combine(_host.App.AppPluginDir, plugin.PluginInfo.Name);
if (Directory.Exists(dirPath))
Directory.Delete(dirPath, true);
items.Remove(item);
}
}
_labelMsg.Visible = true;
var delItems = new List<PluginModel>();
foreach (var item in items.Where(r => r.Checked))
{
var plugin = item.Plugin;
//删除插件所在文件夹
var dirPath = Path.Combine(_host.App.AppPluginDir, plugin.PluginInfo.Name);
if (Directory.Exists(dirPath))
Directory.Delete(dirPath, true);
delItems.Add(item);
}
foreach (var item in delItems)
{
items.Remove(item);
}
_gridViewInstalled.DataStore = items;
_labelMsg.Visible = true;
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion Source/Plugin_PluginManager/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@
// 可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值,
// 方法是按如下所示使用“*”:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.4.2.0")]
[assembly: AssemblyVersion("1.4.2.1")]

0 comments on commit 3912c78

Please sign in to comment.