当前位置: 首页>>代码示例>>C#>>正文


C# Framework.GetPlugin方法代码示例

本文整理汇总了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;
 }
开发者ID:gahadzikwa,项目名称:GAPP,代码行数:32,代码来源:Plugin.cs

示例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);
                    }
                }
            }
        }
开发者ID:gahadzikwa,项目名称:GAPP,代码行数:60,代码来源:LanguageSupport.cs

示例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;
 }
开发者ID:gahadzikwa,项目名称:GAPP,代码行数:10,代码来源:AccountInfo.cs

示例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);
         }
     }
 }
开发者ID:gahadzikwa,项目名称:GAPP,代码行数:18,代码来源:AccountInfo.cs

示例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);
             }
         }
     }
 }
开发者ID:gahadzikwa,项目名称:GAPP,代码行数:22,代码来源:GeometrySupport.cs

示例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);
             }
         }
     }
 }
开发者ID:gahadzikwa,项目名称:GAPP,代码行数:22,代码来源:GeocacheCollectionSupport.cs

示例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);
             }
         }
     }
 }
开发者ID:gahadzikwa,项目名称:GAPP,代码行数:22,代码来源:ImageSupport.cs


注:本文中的Framework.GetPlugin方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。