• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# PluginInitContext类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中PluginInitContext的典型用法代码示例。如果您正苦于以下问题:C# PluginInitContext类的具体用法?C# PluginInitContext怎么用?C# PluginInitContext使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



PluginInitContext类属于命名空间,在下文中一共展示了PluginInitContext类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: SettingsControl

 public SettingsControl(PluginInitContext context, SettingsViewModel viewModel)
 {
     InitializeComponent();
     _context = context;
     _settings = viewModel.Settings;
     DataContext = viewModel;
 }
开发者ID:cxfksword,项目名称:Wox,代码行数:7,代码来源:SettingsControl.xaml.cs


示例2: ProgramSuffixes

 public ProgramSuffixes(PluginInitContext context, Settings settings)
 {
     this.context = context;
     InitializeComponent();
     _settings = settings;
     tbSuffixes.Text = string.Join(ProgramSource.SuffixSeperator.ToString(), _settings.ProgramSuffixes);
 }
开发者ID:danisein,项目名称:Wox,代码行数:7,代码来源:ProgramSuffixes.xaml.cs


示例3: Init

        public void Init(PluginInitContext context)
        {
            var dir = new DirectoryInfo(@"Plugins\Wox.Plugin.ServerCodes\Codes");	// папка с файлами
			
			// получаем полный путь к файлу и потом вычищаем ненужное, оставляем только имя файла. 
			_files = dir.GetFiles("*.txt").Select(file => Path.GetFileNameWithoutExtension(file.FullName)).ToList();
        }
开发者ID:caaatpro,项目名称:Wox.Plugin.ServerCodes,代码行数:7,代码来源:Main.cs


示例4: Init

        public void Init(PluginInitContext context)
        {
            this.context = context;
            controlPanelItems = ControlPanelList.Create(48);
            iconFolder = Path.Combine(context.CurrentPluginMetadata.PluginDirectory, @"Images\ControlPanelIcons\");
            fileType = ".bmp";

            if (!Directory.Exists(iconFolder))
            {
                Directory.CreateDirectory(iconFolder);
            }

            foreach (ControlPanelItem item in controlPanelItems)
            {
                if (!File.Exists(iconFolder + item.GUID + fileType) && item.Icon != null)
                {
                    item.Icon.ToBitmap().Save(iconFolder + item.GUID + fileType);
                }
            }

            Task.Run(() =>
            {
                var characters = controlPanelItems.Select(i => i.LocalizedString)
                    .Concat(controlPanelItems.Select(i => i.InfoTip));

                Parallel.ForEach(characters, c =>
                {
                    if (!string.IsNullOrWhiteSpace(c) && Alphabet.ContainsChinese(c))
                    {
                        Alphabet.PinyinComination(c);
                    }
                });
            });
        }
开发者ID:Wox-launcher,项目名称:Wox,代码行数:34,代码来源:Main.cs


示例5: InitInternal

        protected override void InitInternal(PluginInitContext context)
        {
            this.context = context;

            if (UserSettingStorage.Instance.WebSearches == null)
                UserSettingStorage.Instance.WebSearches = UserSettingStorage.Instance.LoadDefaultWebSearches();
        }
开发者ID:ZhangHongJi,项目名称:Wox,代码行数:7,代码来源:WebSearchPlugin.cs


示例6: ProgramSuffixes

        public ProgramSuffixes(PluginInitContext context)
        {
            this.context = context;
            InitializeComponent();

            tbSuffixes.Text = ProgramStorage.Instance.ProgramSuffixes;
        }
开发者ID:dstiert,项目名称:bloop,代码行数:7,代码来源:ProgramSuffixes.xaml.cs


示例7: Init

        public void Init(PluginInitContext context)
        {
            this.Context = context;

            if (WebSearchStorage.Instance.WebSearches == null)
                WebSearchStorage.Instance.WebSearches = WebSearchStorage.Instance.LoadDefaultWebSearches();
        }
开发者ID:kayone,项目名称:Wox,代码行数:7,代码来源:WebSearchPlugin.cs


示例8: ProgramSetting

 public ProgramSetting(PluginInitContext context, Settings settings)
 {
     this.context = context;
     InitializeComponent();
     Loaded += Setting_Loaded;
     _settings = settings;
 }
开发者ID:zlphoenix,项目名称:Wox,代码行数:7,代码来源:ProgramSetting.xaml.cs


示例9: InitInternal

 protected override void InitInternal(PluginInitContext context)
 {
     availableResults.Add(new Result
     {
         Title = "Shutdown",
         SubTitle = "Shutdown Computer",
         Score = 100,
         IcoPath = "Images\\exit.png",
         Action = (c) => Process.Start("shutdown","/s /t 0")
     });
     availableResults.Add(new Result
     {
         Title = "Log off",
         SubTitle = "Log off current user",
         Score = 20,
         IcoPath = "Images\\logoff.png",
         Action = (c) => ExitWindowsEx(EWX_LOGOFF, 0)
     });
     availableResults.Add(new Result
     {
         Title = "Lock",
         SubTitle = "Lock this computer",
         Score = 20,
         IcoPath = "Images\\lock.png",
         Action = (c) => LockWorkStation()
     });
     availableResults.Add(new Result
     {
         Title = "Exit",
         SubTitle = "Close this app",
         Score = 110,
         IcoPath = "Images\\app.png",
         Action = (c) => context.CloseApp()
     });
 }
开发者ID:pluto92,项目名称:Wox,代码行数:35,代码来源:Sys.cs


示例10: WebSearchesSetting

        public WebSearchesSetting(PluginInitContext context)
        {
            this.context = context;

            InitializeComponent();

            Loaded += Setting_Loaded;
        }
开发者ID:dstiert,项目名称:bloop,代码行数:8,代码来源:WebSearchesSetting.xaml.cs


示例11: Init

 public void Init( PluginInitContext context )
 {
     if ( !SimpleIoc.Default.IsRegistered<IMessageService>() )
     {
         SimpleIoc.Default.Register<IMessageService>( () => new MessageService() );
     }
     initContext = context;
 }
开发者ID:jessebarocio,项目名称:Wox.Plugin.Runner,代码行数:8,代码来源:Runner.cs


示例12: JrnlService

        public JrnlService(SettingElements settings, PluginInitContext context)
        {
            if (settings == null)
                throw new ArgumentNullException("settings", "settings is null.");
            if (context == null)
                throw new ArgumentNullException("context", "context is null.");

            _settings = settings;
        }
开发者ID:Plasma-Paris,项目名称:Wox.Plugins,代码行数:9,代码来源:JrnlService.cs


示例13: Init

 public void Init( PluginInitContext context )
 {
     if ( !SimpleIoc.Default.IsRegistered<IMessageService>() )
     {
         SimpleIoc.Default.Register<IMessageService>( () => new MessageService() );
     }
     initContext = context;
     commands = RunnerConfiguration.GetCommands();
 }
开发者ID:jondcoleman,项目名称:Wox.Plugin.Runner,代码行数:9,代码来源:Runner.cs


示例14: Init

        public void Init(PluginInitContext context)
        {
            this.context = context;
            PluginDirectory = context.CurrentPluginMetadata.PluginDirectory;

            weibo = new Weibo();
            keepLoginTimer = new System.Threading.Timer(new TimerCallback(this.KeepLoginCallBack), null, Timeout.Infinite, Timeout.Infinite);

        }
开发者ID:cxfksword,项目名称:Wox.Plugin.WeiboPicBed,代码行数:9,代码来源:Main.cs


示例15: InitInternal

        protected override void InitInternal(PluginInitContext context)
        {
            this.context = context;

            if (UserSettingStorage.Instance.FolderLinks == null) {
                UserSettingStorage.Instance.FolderLinks = new List<FolderLink>();
                UserSettingStorage.Instance.Save();
            }
        }
开发者ID:ZhangHongJi,项目名称:Wox,代码行数:9,代码来源:FileSystemPlugin.cs


示例16: Init

        public void Init(PluginInitContext context)
        {
            if (context == null)
                throw new ArgumentNullException("context", "context is null.");

            _context = context;
            _settings = JsonConvert.DeserializeObject<SettingElements>(
                File.ReadAllText(Path.Combine(context.CurrentPluginMetadata.PluginDirectory, "setting.json")));
            CustomResult.DefaultIcoPath = context.CurrentPluginMetadata.IcoPath;
        }
开发者ID:Plasma-Paris,项目名称:Wox.Plugins,代码行数:10,代码来源:Main.cs


示例17: InitInternal

        protected override void InitInternal(PluginInitContext context)
        {
            indexDirectory.Add(Environment.GetFolderPath(Environment.SpecialFolder.Programs));

            StringBuilder commonStartMenuPath = new StringBuilder(560);
            SHGetSpecialFolderPath(IntPtr.Zero, commonStartMenuPath, CSIDL_COMMON_PROGRAMS, false);
            indexDirectory.Add(commonStartMenuPath.ToString());

            GetAppFromStartMenu();
        }
开发者ID:pluto92,项目名称:Wox,代码行数:10,代码来源:Programs.cs


示例18: Init

 public void Init(PluginInitContext context)
 {
     this.context = context;
     this.context.API.ResultItemDropEvent += API_ResultItemDropEvent;
     Stopwatch.Debug("Preload programs", () =>
     {
         programs = ProgramCacheStorage.Instance.Programs;
     });
     Log.Info($"Preload {programs.Count} programs from cache");
     Stopwatch.Debug("Program Index", IndexPrograms);
 }
开发者ID:WELL-E,项目名称:Wox,代码行数:11,代码来源:Programs.cs


示例19: InitInternal

 protected override void InitInternal(PluginInitContext context)
 {
     this.context = context;
     this.context.API.BackKeyDownEvent += ApiBackKeyDownEvent;
     InitialDriverList();
     if (UserSettingStorage.Instance.FolderLinks == null)
     {
         UserSettingStorage.Instance.FolderLinks = new List<FolderLink>();
         UserSettingStorage.Instance.Save();
     }
 }
开发者ID:Jackie-Innover,项目名称:Wox,代码行数:11,代码来源:FolderPlugin.cs


示例20: Init

        public void Init(PluginInitContext context)
        {
            this.context = context;
            ContextMenuStorage.Instance.API = context.API;

            LoadLibrary(Path.Combine(
                Path.Combine(context.CurrentPluginMetadata.PluginDirectory, (IntPtr.Size == 4) ? "x86" : "x64"),
                "Everything.dll"
            ));

            StartEverything();
        }
开发者ID:hdchina2010,项目名称:Wox,代码行数:12,代码来源:Main.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# PluginManager类代码示例发布时间:2022-05-24
下一篇:
C# PluginFinder类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap