本文整理汇总了C#中PluginManager.SearchPlugin方法的典型用法代码示例。如果您正苦于以下问题:C# PluginManager.SearchPlugin方法的具体用法?C# PluginManager.SearchPlugin怎么用?C# PluginManager.SearchPlugin使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PluginManager
的用法示例。
在下文中一共展示了PluginManager.SearchPlugin方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Form1_Load
//.........这里部分代码省略.........
columnData.TextAlign = HorizontalAlignment.Right;
columnData.Text = "距離(km)";
columnData.Width = 120;
ColumnHeader columnName = new ColumnHeader();
columnName.Text = "ID";
columnName.Width = 180;
ColumnHeader columnType = new ColumnHeader();
columnType.Text = "ニックネーム";
columnType.Width = 180;
//ColumnHeader columnDetail = new ColumnHeader();
//columnDetail.Text = "移動";
//columnDetail.Width = 30;
ColumnHeader[] colHeaderRegValue = { columnData, columnName, columnType /*, columnDetail*/ };
listView1.Columns.AddRange(colHeaderRegValue);
listView1.SmallImageList = new ImageList();
for (int i = 0; i < 360; i++)
{
string resource = string.Format("PCGPS.Resources.dir-{0}.png", i);
listView1.SmallImageList.Images.Add(new Bitmap(mainAssembly.GetManifestResourceStream(resource)));
}
// プラグインの読み込み
try
{
pluginManager = new PluginManager(typeof(ImacocoNowPlugin));
Assembly myAssembly = Assembly.GetEntryAssembly();
string path = Path.GetDirectoryName(myAssembly.Location);
pluginManager.SearchPlugin(path);
pluginManager.SearchPlugin(path + @"\plugin");
cbPlugin.Items.Clear();
foreach (PluginBase p in pluginManager.LoadedPlugins)
{
ImacocoNowPlugin plugin = (ImacocoNowPlugin)p;
cbPlugin.Items.Add(plugin.PluginName());
}
if (cbPlugin.Items.Count > 0)
{
cbPlugin.SelectedIndex = 0;
}
}
catch (Exception)
{
}
Microsoft.Win32.SystemEvents.PowerModeChanged += new Microsoft.Win32.PowerModeChangedEventHandler(SystemEvents_PowerModeChanged);
t = new Thread(this.ThreadEntry);
t.IsBackground = true;
t.Start();
t2 = new Thread(this.AutoPostThreadEntry);
t2.IsBackground = true;
t2.Start();
t3 = new Thread(this.AutoTwitThreadEntry);
t3.IsBackground = true;
t3.Start();
if (Properties.Settings.Default.SaveWindowLocation)
{
this.StartPosition = FormStartPosition.Manual;