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