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); }
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); }
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); }
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); }
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); }
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); }
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; } }
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); }
protected override void OnClicked(int controlId, GUIControl control, MediaPortal.GUI.Library.Action.ActionType actionType) { if (control == serverListGUI) { onServerListGUI(); } }
protected override void OnClicked(int controlId, GUIControl control, Action.ActionType actionType) { base.OnClicked(controlId, control, actionType); if (control == btnClose) { PageDestroy(); } }
protected override void OnClicked(int controlId, GUIControl control, Action.ActionType actionType) { if (control == btnCreateMovingPicturesCategories) CreateMovingPicturesCategoriesClicked(); if (control == btnCreateMovingPicturesFilters) CreateMovingPicturesFiltersClicked(); base.OnClicked(controlId, control, actionType); }
protected override void OnClicked(int controlId, GUIControl control, Action.ActionType actionType) { if (control == btnEnterCode) { bIsSMSCodeButtonPressed = true; PageDestroy(); } base.OnClicked(controlId, control, actionType); }
/// <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); } }
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); }
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; } }
protected override void OnClicked(int controlId, GUIControl control, Action.ActionType actionType) { if (control == this.btnVolume) { this.SaveSettings(); } if (control == this.btnProgress) { this.SaveSettings(); } if (control == this.btnDiskIcon) { this.SaveSettings(); this.SetButtons(); } if (control == this.btnMediaStatus) { this.SaveSettings(); } if (control == this.btnDiskStatus) { this.SaveSettings(); } if (control == this.btnCustomFont) { this.SaveSettings(); this.SetButtons(); } if (control == this.btnLargeIcons) { this.SaveSettings(); this.SetButtons(); } if (control == this.btnCustomIcons) { this.SaveSettings(); } if (control == this.btnInvertIcons) { this.SaveSettings(); } if (control == this.btnFontEditor) { Form form = new iMONLCDg_FontEdit(); form.ShowDialog(); form.Dispose(); } if (control == this.btnIconEditor) { Form form2 = new iMONLCDg_IconEdit(); form2.ShowDialog(); form2.Dispose(); } base.OnClicked(controlId, control, actionType); }
/// <summary> /// Creates the element and retrieves all information from the control /// </summary> /// <param name="control">GUIControl</param> public TextScrollUpElement(GUIControl control) : base(control) { _textScrollUp = control as GUITextScrollUpControl; if (_textScrollUp != null) { _font = GetFont(_textScrollUp.FontName); _brush = new SolidBrush(GetColor(_textScrollUp.TextColor)); _label = _textScrollUp.Property; } }
protected override void OnClicked(int controlId, GUIControl control, MediaPortal.GUI.Library.Action.ActionType actionType) { if (control == hidePlaylistButton) { WindowManager.ShowPlayList(); } if (control == playlistControl) { onPlaylistControl(); } }
/// <summary> /// Creates the element and retrieves all information from the control /// </summary> /// <param name="control">GUIControl</param> public FadeLabelElement(GUIControl control) : base(control) { _label = control as GUIFadeLabel; if (_label != null) { _font = GetFont(_label.FontName); _brush = new SolidBrush(GetColor(_label.TextColor)); _labelString = _label.Label; } }
protected override void OnClicked(int controlId, GUIControl control, Action.ActionType actionType) { switch (controlId) { case (int)GUIControls.Style: break; case (int)GUIControls.ThumbViewMod: ShowThumbnailContextMenu(); break; } base.OnClicked(controlId, control, actionType); }
/// <summary> /// Creates the element and retrieves all information from the control /// </summary> /// <param name="control">GUIControl</param> public VerticalScrollBarElement(GUIControl control) : base(control) { _verticalScrollBar = control as GUIVerticalScrollbar; if (_verticalScrollBar != null) { _scrollBarBackground = loadBitmap(_verticalScrollBar.BackGroundTextureName); _scrollBarTop = loadBitmap(_verticalScrollBar.BackTextureTopName); _scrollBarBottom = loadBitmap(_verticalScrollBar.BackTextureBottomName); _percentage = _verticalScrollBar.Percentage; } }
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); }
/// <summary> /// Creates the element and retrieves all information from the control /// </summary> /// <param name="control">GUIControl</param> public ProgressControlElement(GUIControl control) : base(control) { _progressControl = control as GUIProgressControl; if (_progressControl != null) { _leftBitmap = LoadBitmap(_progressControl.BackTextureLeftName); _midBitmap = LoadBitmap(_progressControl.BackTextureMidName); _rightBitmap = LoadBitmap(_progressControl.BackTextureRightName); _backgroundBitmap = LoadBitmap(_progressControl.BackGroundTextureName); _percentage = GetPercentage(); } }
/////<summary> ///// Property to get/set the type if listview that will be displayed; GUIListControl or GUIPlayListItemListControl /////</summary> // public ListType ListViewType // { // get{return _listViewType;} // set{_listViewType = value;} // } protected void InitControl(GUIControl cntl) { if (cntl != null) { cntl.GetID = GetID; cntl.WindowId = WindowId; cntl.ParentControl = this; if (base.Animations.Count != 0) { cntl.Animations.AddRange(base.Animations); } } }
/// <summary> /// Creates the element and retrieves all information from the control /// </summary> /// <param name="control">GUIControl</param> public SliderElement(GUIControl control) : base(control) { _slider = control as GUISliderControl; if (_slider != null) { _backgroundBitmap = loadBitmap(_slider.BackGroundTextureName); _sliderBitmap = loadBitmap(_slider.BackTextureMidName); _sliderFocusBitmap = loadBitmap(_slider.BackTextureMidNameFocus); _focus = _slider.Focus; _percentage = _slider.Percentage; _strValue = getStringValue(); } }
protected override void OnClicked(int controlId, GUIControl control, Action.ActionType actionType) { switch (controlId) { case (int)GUIControls.Style: break; case (int)GUIControls.widebannerMod: ShowWidebannerContextMenu(); break; } base.OnClicked(controlId, control, actionType); }
protected override void OnClicked(int controlId, GUIControl control, MediaPortal.GUI.Library.Action.ActionType actionType) { if (control == facadeView) { GUIListItemActor actorItem = _currentSelection as GUIListItemActor; if (actorItem != null) { Movies.Actor = actorItem.ItemId; GUIWindowManager.ActivateWindow((int)MyMovies.GUIWindowID.Main); } } base.OnClicked(controlId, control, actionType); }
/// <summary> /// Creates the element and retrieves all information from the control /// </summary> /// <param name="control">GUIControl</param> public VolumeBarElement(GUIControl control) : base(control) { _volumeBar = control as GUIVolumeBar; if (_volumeBar != null) { _alignment = _volumeBar.TextAlignment; _bitmap = loadBitmap(_volumeBar.TextureName); _image1 = _volumeBar.Image1; _image2 = _volumeBar.Image2; _maximum = _volumeBar.Maximum; _current = _volumeBar.Current; } }
/// <summary> /// Creates the element and retrieves all information from the control /// </summary> /// <param name="control">GUIControl</param> public TVProgressControlElement(GUIControl control) : base(control) { _progressControl = control as GUITVProgressControl; if (_progressControl != null) { _fill1Texture = LoadBitmap(_progressControl.Fill1TextureName); _fill2Texture = LoadBitmap(_progressControl.Fill2TextureName); _fill3Texture = LoadBitmap(_progressControl.Fill3TextureName); LoadBitmap(_progressControl.FillBackGroundName); _percentage1 = (int)Math.Round(_progressControl.Percentage1); _percentage2 = (int)Math.Round(_progressControl.Percentage2); _percentage3 = (int)Math.Round(_progressControl.Percentage3); } }
protected override void OnClicked(int controlId, GUIControl control, Action.ActionType actionType) { if (control == this.btnMonitorPower) { XMLUTILS.SaveMonitorPowerState(this.btnMonitorPower.Selected); } if (control == this.btnContrast) { XMLUTILS.SaveContrast(this.btnContrast.SelectedItem); } if (control == this.btnBrightness) { XMLUTILS.SaveBrightness(this.btnBrightness.SelectedItem); } }