本文整理汇总了C#中MediaPortal.GUI.Library.Action类的典型用法代码示例。如果您正苦于以下问题:C# Action类的具体用法?C# Action怎么用?C# Action使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Action类属于MediaPortal.GUI.Library命名空间,在下文中一共展示了Action类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnAction
public override void OnAction(Action action)
{
//needRefresh = true;
if (action.wID == Action.ActionType.ACTION_CLOSE_DIALOG ||
action.wID == Action.ActionType.ACTION_PREVIOUS_MENU)
{
m_DefaultStop = false;
base.OnAction(action);
return;
}
//
// WARNING: Even if STOP is a semantic NO, as we look from the user point of view, here it's a YES
//
// es. "Do you really want to STOP play LiveTv ?" -> YES I want to STOP
//
if (action.wID == Action.ActionType.ACTION_STOP || (action.m_key != null) && (action.m_key.KeyChar == 'b'))
{
m_bConfirmed = true;
PageDestroy();
m_DefaultStop = false;
return;
}
//
// WARNING: See above comment to understand why PLAY, that is a semantic YES, here is a NO
//
if (action.wID == Action.ActionType.ACTION_PLAY || (action.m_key != null) && (action.m_key.KeyChar == 'p'))
{
m_bConfirmed = false;
PageDestroy();
m_DefaultStop = false;
return;
}
base.OnAction(action);
}
示例2: OnClicked
protected override void OnClicked(int controlId, GUIControl control, Action.ActionType actionType)
{
if (control == btnSearch)
{
TvNewScheduleSearch.SearchFor = TvNewScheduleSearch.SearchType.Title;
GUIWindowManager.ActivateWindow((int)Window.WINDOW_TV_SEARCH);
return;
}
if (control == btnTvGuide)
{
TvNewScheduleSearch.SearchFor = TvNewScheduleSearch.SearchType.KeyWord;
GUIWindowManager.ActivateWindow((int)Window.WINDOW_TVGUIDE);
return;
}
if (control == btnQuickRecord)
{
OnQuickRecord();
return;
}
if (control == btnAdvancedRecord)
{
OnAdvancedRecord();
return;
}
base.OnClicked(controlId, control, actionType);
}
示例3: WndProc
/// <summary>
/// Broadcast window messages to each input device.
/// </summary>
/// <param name="msg"></param>
/// <param name="action"></param>
/// <param name="key"></param>
/// <param name="keyCode"></param>
/// <returns></returns>
public static bool WndProc(ref Message msg, out Action action, out char key, out Keys keyCode)
{
action = null;
key = (char)0;
keyCode = Keys.A;
foreach (var device in Devices)
{
try
{
if (device.WndProc(ref msg, out action, out key, out keyCode))
{
//First come, first served, stop message propagation then.
return true;
}
}
catch (Exception ex)
{
//Keep on propagating that message even if one of our input device crapped out.
Log.Error("InputDevices - WndProc - exception caught from InputDevice: {0} {1}", device.ToString(), ex);
}
}
return false;
}
示例4: OnClicked
protected override void OnClicked(int controlId, GUIControl control, Action.ActionType actionType)
{
if (control.GetType() == typeof (GUIButtonControl))
{
if (controlId > 100 && controlId <= Settings.LocalPresetsNumber + 100 &&
_setting.PresetStations[controlId - 100 - 1] != null &&
_setting.PresetStations[controlId - 100 - 1].GuidId != null)
{
DoPlay(_setting.PresetStations[controlId - 100 - 1]);
if (_setting.JumpNowPlaying)
GUIWindowManager.ActivateWindow(25652);
}
}
if (control == homeButton)
{
GUIWindowManager.ActivateWindow(25650);
}
else if (control == folderButton)
{
var s = GetPresetFolder();
if (s == noPresetFolders)
{
ErrMessage(Translation.NoPresetFoldersFound);
GUIControl.DisableControl(GetID, folderButton.GetID);
}
else if (s != null)
{
_setting.FolderId = s;
_setting.Save();
LoadLocalPresetStations();
}
}
base.OnClicked(controlId, control, actionType);
}
示例5: OnClicked
protected override void OnClicked(int controlId, GUIControl control, Action.ActionType actionType)
{
if (control == this.btnDisableRemote)
{
this.SaveSettings();
this.SetButtons();
}
if (control == this.btnDisableRepeat)
{
this.SaveSettings();
this.SetButtons();
}
if (control == this.btnRepeatDelay)
{
this.SaveSettings();
}
if (control == this.btnRemoteMapping)
{
try
{
if (!File.Exists(VLSYS_Mplay.DefaultMappingPath))
{
VLSYS_Mplay.AdvancedSettings.CreateDefaultRemoteMapping();
}
new InputMappingForm("VLSYS_Mplay").ShowDialog();
}
catch (Exception exception)
{
Log.Info("VLSYS_AdvancedSetupForm.btnRemoteSetup_Click() CAUGHT EXCEPTION: {0}", new object[] {exception});
}
}
base.OnClicked(controlId, control, actionType);
}
示例6: OnAction
public override void OnAction(Action action)
{
/*switch (action.wID)
{
}*/
base.OnAction(action);
}
示例7: OnAction
public override void OnAction(Action action)
{
switch (action.wID)
{
case Action.ActionType.REMOTE_1:
Rated = TraktAPI.TraktRateValue.love;
UpdateRating();
break;
case Action.ActionType.REMOTE_2:
Rated = TraktAPI.TraktRateValue.hate;
UpdateRating();
break;
case Action.ActionType.ACTION_SELECT_ITEM:
IsSubmitted = true;
PageDestroy();
return;
case Action.ActionType.ACTION_PREVIOUS_MENU:
case Action.ActionType.ACTION_CLOSE_DIALOG:
case Action.ActionType.ACTION_CONTEXT_MENU:
IsSubmitted = false;
PageDestroy();
return;
}
base.OnAction(action);
}
示例8: WndProc
public static bool WndProc(ref Message msg, out Action action, out char key, out Keys keyCode)
{
action = null;
key = (char)0;
keyCode = Keys.A;
if (CentareaRemote.WndProc(ref msg))
{
return true;
}
if (HidListener.WndProc(ref msg, out action, out key, out keyCode))
{
return true;
}
if (HCWRemote.WndProc(msg))
{
return true;
}
if (FireDTVRemote.WndProc(ref msg, out action, out key, out keyCode))
{
return true;
}
if (MCE2005Remote.WndProc(msg))
{
return true;
}
return false;
}
示例9: OnClicked
protected override void OnClicked(int controlId, GUIControl control, Action.ActionType actionType)
{
bIsUsernameButtonPressed = false;
bIsPasswordButtonPressed = false;
if (control == btnEnterUsername)
{
bIsUsernameButtonPressed = true;
PageDestroy();
}
if (control == btnEnterPassword)
{
bIsPasswordButtonPressed = true;
PageDestroy();
}
if (control == btnOK)
{
HeadWeb hw = (HeadWeb)GUIWindowManager.GetWindow(HeadWeb.ID);
HeadWebSettings.Instance.s_cc = new CookieContainer();
bool loginresult = hw.loginUser(HeadWebSettings.Instance.s_username, HeadWebSettings.Instance.s_password);
if (loginresult)
{
HeadWebSettings.Instance.s_loggedin = true;
hw.getFavorites(true);
PageDestroy();
}
}
base.OnClicked(controlId, control, actionType);
}
示例10: OnAction
public override void OnAction(Action action)
{
if (action.wID == Action.ActionType.ACTION_VOLUME_UP ||
action.wID == Action.ActionType.ACTION_VOLUME_DOWN ||
action.wID == 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 Action(Action.ActionType.ACTION_SHOW_VOLUME, 0, 0));
return;
}
else
{
Action translatedAction = new Action();
if (ActionTranslator.GetAction((int)Window.WINDOW_FULLSCREEN_VIDEO, action.m_key, ref translatedAction))
{
if (translatedAction.wID == Action.ActionType.ACTION_SHOW_OSD)
{
base.OnAction(translatedAction);
if (GUIWindowManager.VisibleOsd == Window.WINDOW_OSD)
{
GUIWindowManager.VisibleOsd = (Window)GUIOnlineVideoOSD.WINDOW_ONLINEVIDEOS_OSD;
}
return;
}
if (translatedAction.wID == Action.ActionType.ACTION_ASPECT_RATIO)
{
base.OnAction(translatedAction);
}
}
}
base.OnAction(action);
}
示例11: OnClicked
protected override void OnClicked(int controlId, GUIControl control, Action.ActionType actionType)
{
if (control == this.btnDisplayVideo)
{
this.SaveSettings();
this.SetButtons();
}
if (control == this.btnDisplayAction)
{
this.SaveSettings();
this.SetButtons();
}
if (control == this.btnDisplayActionTime)
{
this.SaveSettings();
}
if (control == this.btnDisplayIdle)
{
this.SaveSettings();
this.SetButtons();
}
if (control == this.btnIdleDelay)
{
this.SaveSettings();
}
base.OnClicked(controlId, control, actionType);
}
示例12: OnClicked
protected override void OnClicked(int controlId, GUIControl control, Action.ActionType actionType)
{
if (control == this.btnEnableKeyPad)
{
this.SaveSettings();
this.SetButtons();
}
if (control == this.btnEnableCustom)
{
this.SaveSettings();
this.SetButtons();
}
if (control == this.btnKeyPadMapping)
{
try
{
if (!File.Exists(MatrixMX.DefaultMappingPath))
{
MatrixMX.AdvancedSettings.CreateDefaultKeyPadMapping();
}
new InputMappingForm("MatrixMX_Keypad").ShowDialog();
}
catch (Exception exception)
{
Log.Info("VLSYS_AdvancedSetupForm.btnRemoteSetup_Click() CAUGHT EXCEPTION: {0}", new object[] {exception});
}
}
base.OnClicked(controlId, control, actionType);
}
示例13: OnAction
public override void OnAction(Action action)
{
if (action.wID == MediaPortal.GUI.Library.Action.ActionType.ACTION_NEXT_ITEM || action.wID == MediaPortal.GUI.Library.Action.ActionType.ACTION_NEXT_CHAPTER)
{
if (Youtube2MP.player.CurrentSong > -1)
{
Youtube2MP.player.PlayNext();
return;
}
if (Youtube2MP.temp_player.CurrentSong > -1)
{
Youtube2MP.temp_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 (Youtube2MP.player.CurrentSong > -1)
{
Youtube2MP.player.PlayPrevious();
return;
}
if (Youtube2MP.temp_player.CurrentSong > -1)
{
Youtube2MP.temp_player.PlayPrevious();
return;
}
}
base.OnAction(action);
}
示例14: OnClicked
protected override void OnClicked(int controlId, GUIControl control, Action.ActionType actionType)
{
base.OnClicked(controlId, control, actionType);
if (control == btnClose)
{
PageDestroy();
}
}
示例15: OnClicked
protected override void OnClicked(int controlId, GUIControl control, Action.ActionType actionType)
{
if (control == btnCreateMovingPicturesCategories)
CreateMovingPicturesCategoriesClicked();
if (control == btnCreateMovingPicturesFilters)
CreateMovingPicturesFiltersClicked();
base.OnClicked(controlId, control, actionType);
}