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


C# PluginInitContext类代码示例

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


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


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