本文整理汇总了C#中Plugin.getName方法的典型用法代码示例。如果您正苦于以下问题:C# Plugin.getName方法的具体用法?C# Plugin.getName怎么用?C# Plugin.getName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Plugin
的用法示例。
在下文中一共展示了Plugin.getName方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: PluginInfo
public PluginInfo(PluginManagerDialog baseDialog, PluginManager baseManager, Plugin p)
{
InitializeComponent();
this.baseDialog = baseDialog;
this.baseManager = baseManager;
lblTitle.Text = p.getName() + " - Information";
lblName.Text += p.getName();
try {
lblDev.Text += p.getAuthor();
}
catch {
lblDev.Text += "Not specified";
}
try {
lblVersion.Text += p.getVersion();
}
catch {
lblVersion.Text += "Not specified";
}
if (p is Updatable) {
lblSupportsUpdates.Text = "Plugin supports automatic updates";
Updatable u = (Updatable)p;
lblCur.Text += u.getCurrentVersion();
using (var wc = new WebClient()) {
lblLatest.Text += wc.DownloadString(u.getCheckURL());
}
UpdateType t = u.getUpdateType();
if (t == UpdateType.Ask) {
lblType.Text += "Plugin asks before updating";
lblNotes.Text += "Not supported";
lblRestart.Text += "Not supported";
}
else if (t == UpdateType.Auto_Notify) {
lblType.Text += "Plugin updates automatically";
lblNotes.Text += "Yes";
lblRestart.Text += "No";
}
else if (t == UpdateType.Auto_Notify_Restart) {
lblType.Text += "Plugin updates automatically";
lblNotes.Text += "Yes";
lblRestart.Text += "Yes";
}
else if (t == UpdateType.Auto_Silent) {
lblType.Text += "Plugin updates automatically";
lblNotes.Text += "No";
lblRestart.Text += "No";
}
else if (t == UpdateType.Auto_Silent_Restart) {
lblType.Text += "Plugin updates automatically";
lblNotes.Text += "No";
lblRestart.Text += "Yes";
}
}
else {
lblCur.Text += "Not supported";
lblLatest.Text += "Not supported";
lblType.Text += "Not supported";
lblNotes.Text += "Not supported";
lblRestart.Text += "Not supported";
}
}