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


C# Kernel.AddConfigPanel方法代码示例

本文整理汇总了C#中Kernel.AddConfigPanel方法的典型用法代码示例。如果您正苦于以下问题:C# Kernel.AddConfigPanel方法的具体用法?C# Kernel.AddConfigPanel怎么用?C# Kernel.AddConfigPanel使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Kernel的用法示例。


在下文中一共展示了Kernel.AddConfigPanel方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Init

        /// <summary>
        /// The Init method is called when the plug-in is loaded by MediaBrowser.  You should perform all your specific initializations
        /// here - including adding your theme to the list of available themes.
        /// </summary>
        /// <param name="kernel"></param>
        public override void Init(Kernel kernel)
        {
            try
            {
                kernel.AddTheme("Diamond", "resx://Diamond/Diamond.Resources/Page#PageDiamond", "resx://Diamond/Diamond.Resources/DetailMovieView#DiamondMovieView");
                isMC = AppDomain.CurrentDomain.FriendlyName.Contains("ehExtHost");
                if (isMC)
                {
                    config = new Config();
                    kernel.AddConfigPanel("Diamond Options", "resx://Diamond/Diamond.Resources/ConfigPanel#ConfigPanel", config);
                    kernel.AddInternalIconTheme("Diamond"); //tells core that we want to use icons in our resource file
                    //Tell the log we loaded.
                    Logger.ReportInfo("Diamond Theme Loaded.");
                    //Thread t = new Thread(new ThreadStart(Display));
                    //t.Start();
                }
                else
                    Logger.ReportInfo("Not creating menus for Diamond.  Appear to not be in MediaCenter.  AppDomain is: " + AppDomain.CurrentDomain.FriendlyName);

                kernel.StringData.AddStringData(MyStrings.FromFile(MyStrings.GetFileName("Diamond-")));
                CustomResourceManager.AppendFonts("Diamond", Resources.DiamondFontsDefault, Resources.DiamondFontsSmall);
                CustomResourceManager.AppendStyles("Diamond", Resources.DiamondStylesDefault, Resources.DiamondStylesDefault);
            }
            catch (Exception ex)
            {
                Logger.ReportException("Error adding theme - probably incompatable MB version", ex);
            }
        }
开发者ID:rickbassham,项目名称:videobrowser,代码行数:33,代码来源:Plugin.cs


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