本文整理汇总了C#中MediaPortal.GUI.Library.GUIControl类的典型用法代码示例。如果您正苦于以下问题:C# GUIControl类的具体用法?C# GUIControl怎么用?C# GUIControl使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
GUIControl类属于MediaPortal.GUI.Library命名空间,在下文中一共展示了GUIControl类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: 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);
}
示例2: 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);
}
示例3: 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);
}
示例4: 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);
}
示例5: ApplyAlignment
private void ApplyAlignment(GUIControl element, Thickness t, double x, double y, double w, double h)
{
Rect rect = new Rect(x, y, element.Width, element.Height);
switch (element.HorizontalAlignment)
{
case HorizontalAlignment.Center:
rect.X = x + ((w - element.Width) / 2);
break;
case HorizontalAlignment.Right:
rect.X = x + w - element.Width;
break;
case HorizontalAlignment.Stretch:
rect.Width = w;
break;
}
switch (element.VerticalAlignment)
{
case VerticalAlignment.Center:
rect.Y = y + ((h - element.Height) / 2);
break;
case VerticalAlignment.Bottom:
rect.Y = y + h - element.Height;
break;
case VerticalAlignment.Stretch:
rect.Height = h;
break;
}
element.Arrange(rect);
}
示例6: 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);
}
示例7: 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;
}
}
示例8: 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);
}
示例9: OnClicked
protected override void OnClicked(int controlId, GUIControl control, MediaPortal.GUI.Library.Action.ActionType actionType)
{
if (control == serverListGUI)
{
onServerListGUI();
}
}
示例10: OnClicked
protected override void OnClicked(int controlId, GUIControl control, Action.ActionType actionType)
{
base.OnClicked(controlId, control, actionType);
if (control == btnClose)
{
PageDestroy();
}
}
示例11: 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);
}
示例12: OnClicked
protected override void OnClicked(int controlId, GUIControl control, Action.ActionType actionType)
{
if (control == btnEnterCode)
{
bIsSMSCodeButtonPressed = true;
PageDestroy();
}
base.OnClicked(controlId, control, actionType);
}
示例13: ImageElement
/// <summary>
/// Creates the element and retrieves all information from the control
/// </summary>
/// <param name="control">GUIControl</param>
public ImageElement(GUIControl control)
: base(control)
{
_image = control as GUIImage;
if (_image != null)
{
_bitmap = loadBitmap(_image.FileName);
}
}
示例14: AddControl
public void AddControl(GUIControl control)
{
//control.AddAnimations(base.Animations);
if (base.Animations.Count != 0)
{
control.Animations.AddRange(base.Animations);
}
control.DimColor = DimColor;
Children.Add(control);
}
示例15: OnClicked
protected override void OnClicked(int controlId, GUIControl control, Action.ActionType actionType)
{
base.OnClicked(controlId, control, actionType);
int iYear, iMonth;
if (control == spinStartMonth)
{
iYear = spinStartYear.Value;
iMonth = spinStartMonth.Value;
if (iMonth == 2 && DateTime.IsLeapYear(iYear))
{
spinStartDay.SetRange(1, 29);
}
else
{
spinStartDay.SetRange(1, months[iMonth]);
}
}
if (control == spinEndMonth)
{
iYear = spinEndYear.Value;
iMonth = spinEndMonth.Value;
if (iMonth == 2 && DateTime.IsLeapYear(iYear))
{
spinEndDay.SetRange(1, 29);
}
else
{
spinEndDay.SetRange(1, months[iMonth]);
}
}
if (control == btnOK)
{
int iHour;
iHour = spinStartHour.Value;
int iMin;
iMin = spinStartMinute.Value;
int iDay;
iDay = spinStartDay.Value;
iMonth = spinStartMonth.Value;
iYear = spinStartYear.Value;
channel = spinChannel.GetLabel();
startDateTime = new DateTime(iYear, iMonth, iDay, iHour, iMin, 0, 0);
iHour = spinEndHour.Value;
iMin = spinEndMinute.Value;
iDay = spinEndDay.Value;
iMonth = spinEndMonth.Value;
iYear = spinEndYear.Value;
endDateTime = new DateTime(iYear, iMonth, iDay, iHour, iMin, 0, 0);
_confirmed = true;
PageDestroy();
return;
}
}