本文整理汇总了C#中Framework.GetPlugin方法的典型用法代码示例。如果您正苦于以下问题:C# Framework.GetPlugin方法的具体用法?C# Framework.GetPlugin怎么用?C# Framework.GetPlugin使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Framework
的用法示例。
在下文中一共展示了Framework.GetPlugin方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: InitializeAsync
public async virtual Task<bool> InitializeAsync(Framework.Interfaces.ICore core, string[] actions)
{
bool result = false;
_core = core;
if (actions != null && actions.Length > 0)
{
_actions.AddRange(actions);
}
if (_actions != null && _actions.Count > 0)
{
foreach (string s in _actions)
{
string[] parts = s.Split(new char[] { SubActionSep });
_core.LanguageItems.AddTextRange(parts.ToList());
}
}
_core.LanguageItems.AddText(FriendlyName);
if (RequiredCoreVersion <= core.Version)
{
List<Framework.Interfaces.IPlugin> p = core.GetPlugin(Framework.PluginType.UIMainWindow);
if (p != null)
{
foreach (Framework.Interfaces.IPluginUIMainWindow mwp in p)
{
await InitUIMainWindowAsync(mwp);
}
}
core.PluginAdded += new Framework.EventArguments.PluginEventHandler(_core_PluginAdded);
result = true;
}
return result;
}
示例2: UpdateLanguageSupportPlugins
public virtual void UpdateLanguageSupportPlugins(Framework.Interfaces.ICore core)
{
if (_core == null)
{
core.LanguageItems.Add(new Framework.Data.LanguageItem(Dialogs.GetLocationForm.STR_GET_LOCATION));
core.LanguageItems.Add(new Framework.Data.LanguageItem(Dialogs.GetLocationForm.STR_LOCATION));
core.LanguageItems.Add(new Framework.Data.LanguageItem(Dialogs.GetLocationForm.STR_OK));
core.LanguageItems.Add(new Framework.Data.LanguageItem(Dialogs.GetLocationForm.STR_MAP));
core.LanguageItems.Add(new Framework.Data.LanguageItem(Dialogs.GetLocationForm.STR_FROMHOMELOC));
core.LanguageItems.Add(new Framework.Data.LanguageItem(Dialogs.GetLocationForm.STR_FROMCENTERLOC));
core.LanguageItems.Add(new Framework.Data.LanguageItem(Dialogs.LiveAPICachesLeftForm.STR_INFO));
core.LanguageItems.Add(new Framework.Data.LanguageItem(Dialogs.LiveAPICachesLeftForm.STR_LEFT));
core.LanguageItems.Add(new Framework.Data.LanguageItem(Dialogs.LiveAPICachesLeftForm.STR_MAX));
core.LanguageItems.Add(new Framework.Data.LanguageItem(Dialogs.LiveAPICachesLeftForm.STR_TITLE));
core.LanguageItems.Add(new Framework.Data.LanguageItem(API.GeocachingLiveV6.STR_ERROR));
core.LanguageItems.Add(new Framework.Data.LanguageItem(API.GeocachingLiveV6.STR_MUSTAUTHORIZE));
core.LanguageItems.Add(new Framework.Data.LanguageItem(API.GeocachingLiveV6.STR_PMREQUIRED));
core.LanguageItems.Add(new Framework.Data.LanguageItem(BasePlugin.BaseUIChildWindowForm.STR_DECOUPLE_WINDOW));
core.LanguageItems.Add(new Framework.Data.LanguageItem(BasePlugin.BaseUIChildWindowForm.STR_DOCK_WINDOW));
core.LanguageItems.Add(new Framework.Data.LanguageItem(BasePlugin.BaseUIChildWindowForm.STR_NOTTOPMOST_WINDOW));
core.LanguageItems.Add(new Framework.Data.LanguageItem(BasePlugin.BaseUIChildWindowForm.STR_TOPMOST_WINDOW));
core.LanguageItems.Add(new Framework.Data.LanguageItem(BasePlugin.BaseUIChildWindowForm.STR_OPAQUEWHENIACTIVE));
core.LanguageItems.Add(new Framework.Data.LanguageItem(BasePlugin.BaseUIChildWindowTransparencyForm.STR_TITLE));
core.LanguageItems.Add(new Framework.Data.LanguageItem(BasePlugin.BaseUIChildWindowTransparencyForm.STR_OPACITY));
core.LanguageItems.Add(new Framework.Data.LanguageItem(Dialogs.GeocachesIgnoredMessageForm.STR_ACTION_EDIT));
core.LanguageItems.Add(new Framework.Data.LanguageItem(Dialogs.GeocachesIgnoredMessageForm.STR_OK));
core.LanguageItems.Add(new Framework.Data.LanguageItem(Dialogs.GeocachesIgnoredMessageForm.STR_WARNING));
core.LanguageItems.Add(new Framework.Data.LanguageItem(Dialogs.GeocachesIgnoredMessageForm.STR_XIGNORED));
foreach (var c in core.LogTypes)
{
core.LanguageItems.Add(new Framework.Data.LanguageItem(c.Name));
}
}
_core = core;
List<Framework.Interfaces.IPlugin> p = core.GetPlugin(Framework.PluginType.LanguageSupport);
if (p != null)
{
foreach (Framework.Interfaces.ILanguageSupport mwp in p)
{
if (!_languageModules.Contains(mwp))
{
_languageModules.Add(mwp);
}
}
foreach (Framework.Interfaces.IPlugin mwp in _languageModules)
{
if (!p.Contains(mwp))
{
_languageModules.Remove(mwp as Framework.Interfaces.ILanguageSupport);
}
}
}
}
示例3: SaveSettings
public void SaveSettings(Framework.Interfaces.ICore core)
{
GeocachingComAccount = new Framework.Data.GeocachingComAccountInfo();
GeocachingComAccount.AccountName = core.GeocachingComAccount.AccountName;
GeocachingComAccount.APIToken = core.GeocachingComAccount.APIToken;
GeocachingComAccount.MemberType = core.GeocachingComAccount.MemberType;
GeocachingComAccount.MemberTypeId = core.GeocachingComAccount.MemberTypeId;
Framework.Interfaces.IPluginInternalStorage storage = (from Framework.Interfaces.IPluginInternalStorage a in core.GetPlugin(Framework.PluginType.InternalStorage) select a).FirstOrDefault();
InternalStorageInfo = storage.ActiveStorageDestination;
}
示例4: RestoreSettings
public void RestoreSettings(Framework.Interfaces.ICore core)
{
if (SwitchGeocachingComAccount && GeocachingComAccount != null)
{
core.GeocachingComAccount.AccountName = GeocachingComAccount.AccountName;
core.GeocachingComAccount.APIToken = GeocachingComAccount.APIToken;
core.GeocachingComAccount.MemberType = GeocachingComAccount.MemberType;
core.GeocachingComAccount.MemberTypeId = GeocachingComAccount.MemberTypeId;
}
if (SwitchDatabase && InternalStorageInfo != null)
{
Framework.Interfaces.IPluginInternalStorage storage = (from Framework.Interfaces.IPluginInternalStorage a in core.GetPlugin(Framework.PluginType.InternalStorage) select a).FirstOrDefault();
if (!InternalStorageInfo.SameDestination(storage.ActiveStorageDestination))
{
storage.SetStorageDestination(InternalStorageInfo);
}
}
}
示例5: UpdateGeometrySupportPlugins
public virtual void UpdateGeometrySupportPlugins(Framework.Interfaces.ICore core)
{
_core = core;
List<Framework.Interfaces.IPlugin> p = core.GetPlugin(Framework.PluginType.Geometry);
if (p != null)
{
foreach (Framework.Interfaces.IGeometry mwp in p)
{
if (!_geometryPlugins.Contains(mwp))
{
_geometryPlugins.Add(mwp);
}
}
foreach (Framework.Interfaces.IPlugin mwp in _geometryPlugins)
{
if (!p.Contains(mwp))
{
_geometryPlugins.Remove(mwp as Framework.Interfaces.IGeometry);
}
}
}
}
示例6: UpdateIgnoreGeocachesCollectionPlugins
public virtual void UpdateIgnoreGeocachesCollectionPlugins(Framework.Interfaces.ICore core)
{
_core = core;
List<Framework.Interfaces.IPlugin> p = core.GetPlugin(Framework.PluginType.GeocacheCollection);
if (p != null)
{
foreach (Framework.Interfaces.IPluginGeocacheCollection mwp in p)
{
if (!_gcCollectionPlugins.Contains(mwp))
{
_gcCollectionPlugins.Add(mwp);
}
}
foreach (Framework.Interfaces.IPlugin mwp in _gcCollectionPlugins)
{
if (!p.Contains(mwp))
{
_gcCollectionPlugins.Remove(mwp as Framework.Interfaces.IPluginGeocacheCollection);
}
}
}
}
示例7: UpdateImageSupportPlugins
public virtual void UpdateImageSupportPlugins(Framework.Interfaces.ICore core)
{
_core = core;
List<Framework.Interfaces.IPlugin> p = core.GetPlugin(Framework.PluginType.ImageResource);
if (p != null)
{
foreach (Framework.Interfaces.IImageResource mwp in p)
{
if (!_imageResourcePlugins.Contains(mwp))
{
_imageResourcePlugins.Add(mwp);
}
}
foreach (Framework.Interfaces.IPlugin mwp in _imageResourcePlugins)
{
if (!p.Contains(mwp))
{
_imageResourcePlugins.Remove(mwp as Framework.Interfaces.IImageResource);
}
}
}
}