本文整理汇总了C#中MediaPortal类的典型用法代码示例。如果您正苦于以下问题:C# MediaPortal类的具体用法?C# MediaPortal怎么用?C# MediaPortal使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
MediaPortal类属于命名空间,在下文中一共展示了MediaPortal类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: DoSpell
private void DoSpell(MediaPortal.GUI.Library.Action.ActionType remoteNum)
{
switch (remoteNum)
{
case MediaPortal.GUI.Library.Action.ActionType.REMOTE_2:
GetSortChar("ABC");
break;
case MediaPortal.GUI.Library.Action.ActionType.REMOTE_3:
GetSortChar("DEF");
break;
case MediaPortal.GUI.Library.Action.ActionType.REMOTE_4:
GetSortChar("GHI");
break;
case MediaPortal.GUI.Library.Action.ActionType.REMOTE_5:
GetSortChar("JKL");
break;
case MediaPortal.GUI.Library.Action.ActionType.REMOTE_6:
GetSortChar("MNO");
break;
case MediaPortal.GUI.Library.Action.ActionType.REMOTE_7:
GetSortChar("PQRS");
break;
case MediaPortal.GUI.Library.Action.ActionType.REMOTE_8:
GetSortChar("TUV");
break;
case MediaPortal.GUI.Library.Action.ActionType.REMOTE_9:
GetSortChar("WXYZ");
break;
}
doFacadeSort();
}
示例2: OnClicked
protected override void OnClicked(int controlId, GUIControl control, MediaPortal.GUI.Library.Action.ActionType actionType)
{
if (control == serverListGUI)
{
onServerListGUI();
}
}
示例3: OnClicked
protected override void OnClicked(int controlId, GUIControl control, MediaPortal.GUI.Library.Action.ActionType actionType)
{
if (control == btDoUpdate)
{
//install the patch(s)
installUpdateGUI();
// tell the user what has been done
cmc_ChangeLog.Visible = false;
btDoUpdate.Visible = false;
if (StreamedMPConfig.manualInstallNeeded)
{
GUIDialogOK dlgDone = (GUIDialogOK)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_OK);
dlgDone.SetHeading(Translation.mupdateheader);
dlgDone.SetLine(1, Translation.mupdateline1);
dlgDone.SetLine(2, Translation.mupdateline2);
dlgDone.SetLine(3, string.Format(Translation.mupdateline3, Path.GetFileName(optionDownloadPath)));
dlgDone.SetLine(4, Translation.mupdateline4);
dlgDone.DoModal(GUIWindowManager.ActiveWindow);
}
else
{
if (!updateCancelled)
{
GUIDialogOK dlgDone = (GUIDialogOK)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_OK);
dlgDone.SetHeading(Translation.SkinUpdate);
dlgDone.SetLine(1, string.Format(Translation.NumPatchesInstalled, updateCheck.patchList.Count.ToString()));
dlgDone.SetLine(2, String.Empty);
dlgDone.SetLine(3, string.Format(Translation.PatchUpdateComplete, updateCheck.SkinVersion()));
dlgDone.DoModal(GUIWindowManager.ActiveWindow);
}
}
GUIWindowManager.ShowPreviousWindow();
StreamedMPConfig.updateAvailable = false;
}
}
示例4: OnAction
public override void OnAction(MediaPortal.GUI.Library.Action action)
{
if (action.wID == MediaPortal.GUI.Library.Action.ActionType.ACTION_VOLUME_UP ||
action.wID == MediaPortal.GUI.Library.Action.ActionType.ACTION_VOLUME_DOWN ||
action.wID == MediaPortal.GUI.Library.Action.ActionType.ACTION_VOLUME_MUTE)
{
// MediaPortal core sends this message to the Fullscreenwindow, we need to do it ourselves to make the Volume OSD show up
base.OnAction(new MediaPortal.GUI.Library.Action(MediaPortal.GUI.Library.Action.ActionType.ACTION_SHOW_VOLUME, 0, 0));
return;
}
else if (action.wID == MediaPortal.GUI.Library.Action.ActionType.ACTION_CONTEXT_MENU)
{
OnShowContextMenu();
return;
}
else
{
var translatedAction = new MediaPortal.GUI.Library.Action();
if (ActionTranslator.GetAction((int) GUIWindow.Window.WINDOW_FULLSCREEN_VIDEO, action.m_key,
ref translatedAction))
{
if (translatedAction.wID == MediaPortal.GUI.Library.Action.ActionType.ACTION_SHOW_OSD)
{
GUIPropertyManager.SetProperty("#Youtube.fm.FullScreen.ShowTitle", "false");
GUIPropertyManager.SetProperty("#Youtube.fm.FullScreen.ShowNextTitle", "false");
base.OnAction(translatedAction);
if (GUIWindowManager.VisibleOsd == GUIWindow.Window.WINDOW_OSD)
{
GUIWindowManager.VisibleOsd = (GUIWindow.Window) MyFilms.ID_MyFilmsTrailerOSD;
}
return;
}
if (translatedAction.wID == MediaPortal.GUI.Library.Action.ActionType.ACTION_ASPECT_RATIO)
{
base.OnAction(translatedAction);
return;
}
}
}
if (action.wID == MediaPortal.GUI.Library.Action.ActionType.ACTION_NEXT_ITEM || action.wID == MediaPortal.GUI.Library.Action.ActionType.ACTION_NEXT_CHAPTER)
{
if (MyFilms.currentTrailerMoviesList.Count > 1)
{
// MyFilms.player.PlayNext();
return;
}
}
if (action.wID == MediaPortal.GUI.Library.Action.ActionType.ACTION_PREV_ITEM || action.wID == MediaPortal.GUI.Library.Action.ActionType.ACTION_PREV_CHAPTER)
{
if (MyFilms.currentTrailerMoviesList.Count > 1)
{
// MyFilms.player.PlayPrevious();
return;
}
}
base.OnAction(action);
}
示例5: MpDialogSelect
public MpDialogSelect(MediaPortal.Dialogs.GUIDialogSelect menu)
: base(menu)
{
this.DialogType = menu.GetModuleName();
this.DialogId = menu.GetID;
this.AvailableActions.Add("ok");
this.AvailableActions.Add("cancel");
}
示例6: EnterModelContext
public void EnterModelContext(MediaPortal.UI.Presentation.Workflow.NavigationContext oldContext, MediaPortal.UI.Presentation.Workflow.NavigationContext newContext)
{
// reset the properties
UpdateInfo = string.Empty;
UpdateProgress = 0;
// start the update in a background thread
RunUpdate(newContext);
}
示例7: IsTraktRatingDialog
/// <summary>
/// Check if a dialog is a trakt rating dialog
/// </summary>
/// <param name="dialog">Dialog</param>
/// <returns>true/false ;)</returns>
internal static bool IsTraktRatingDialog(MediaPortal.Dialogs.GUIDialogWindow dialog)
{
if (dialog.GetType().Equals(typeof(TraktPlugin.GUI.GUIRateDialog)))
{
return true;
}
else
{
return false;
}
}
示例8: OnAction
public override void OnAction(MediaPortal.GUI.Library.Action action)
{
if (facadeControl.Focus == true)
{
if (action.wID == MediaPortal.GUI.Library.Action.ActionType.ACTION_MOVE_DOWN || action.wID == MediaPortal.GUI.Library.Action.ActionType.ACTION_MOVE_UP)
{
}
}
base.OnAction(action);
}
示例9: MpDialogNotify
public MpDialogNotify(MediaPortal.Dialogs.GUIDialogNotify menu)
: base(menu)
{
this.dialogMenu = menu;
this.DialogType = menu.GetModuleName();
this.DialogId = menu.GetID;
this.AvailableActions.Add("ok");
this.AvailableActions.Add("cancel");
GetHeading(menu, 4);
}
示例10: OnClicked
protected override void OnClicked(int controlId, GUIControl control, MediaPortal.GUI.Library.Action.ActionType actionType)
{
if (control == hidePlaylistButton)
{
WindowManager.ShowPlayList();
}
if (control == playlistControl)
{
onPlaylistControl();
}
}
示例11: OnAction
public override void OnAction(MediaPortal.GUI.Library.Action action)
{
if (action.wID == MediaPortal.GUI.Library.Action.ActionType.ACTION_PREVIOUS_MENU)
{
WindowManager.GoBack();
}
else
{
base.OnAction(action);
}
}
示例12: MpDialogProgress
public MpDialogProgress(MediaPortal.Dialogs.GUIDialogProgress menu)
: base(menu)
{
this.dialogMenu = menu;
this.DialogType = menu.GetModuleName();
this.DialogId = menu.GetID;
this.AvailableActions.Add("cancel");
this.AvailableActions.Add("progress");
UpdateValues();
}
示例13: OnClicked
protected override void OnClicked(int controlId, GUIControl control, MediaPortal.GUI.Library.Action.ActionType actionType)
{
if (control == checkControl)
{
onCheckControl();
}
if (control == addButton)
{
onAddButton();
}
base.OnClicked(controlId, control, actionType);
}
示例14: MpDialogOk
public MpDialogOk(MediaPortal.Dialogs.GUIDialogOK menu)
: base(menu)
{
this.dialogMenu = menu;
this.DialogType = menu.GetModuleName();
this.DialogId = menu.GetID;
this.AvailableActions.Add("ok");
this.AvailableActions.Add("cancel");
GetHeading(menu, 1);
GetText(menu, 2, 3, 4, 5);
}
示例15: OnAction
public override void OnAction(MediaPortal.GUI.Library.Action action)
{
if (action.wID == MediaPortal.GUI.Library.Action.ActionType.ACTION_CONTEXT_MENU)
{
var videoWindow = (MyFilmsGUIVideoFullscreen)GUIWindowManager.GetWindow(29054);
videoWindow.OnAction(new MediaPortal.GUI.Library.Action(MediaPortal.GUI.Library.Action.ActionType.ACTION_SHOW_OSD, 0, 0));
videoWindow.OnAction(action);
}
else
{
base.OnAction(action);
}
}