/// <summary> /// Jukebox controls /// </summary> private void HandleJukeboxInput() { if (DialogManager.Dialogs.Count != 0) { return; } if (KeyboardManager.IsUniqueKeyPress(Keys.Z)) { PreviousButton.FireButtonClickEvent(); } if (KeyboardManager.IsUniqueKeyPress(Keys.X)) { RestartButton.FireButtonClickEvent(); NotificationManager.Show(NotificationLevel.Info, "Restarted track"); } if (KeyboardManager.IsUniqueKeyPress(Keys.C)) { var isPaused = AudioEngine.Track.IsPaused; PauseResumeButton.FireButtonClickEvent(); NotificationManager.Show(NotificationLevel.Info, isPaused ? "Resumed track" : "Paused track"); } if (KeyboardManager.IsUniqueKeyPress(Keys.V)) { NextButton.FireButtonClickEvent(); } }
public void PreviousButtonListensForProfileChanges() { var first = new PreviousButton() { Height = 1 }; var second = new PreviousButton() { Height = 2 }; _appSettings.SetupSequence(m => m.PreviousButton) .Returns(first) .Returns(second); var vm = new PreviousButtonViewModel(_appSettings.Object, _dialog.Object, _session.Object, _messageBus.Object); bool raised = false; vm.PropertyChanged += (_, __) => raised = true; Assert.AreEqual(first.Height, vm.Height); _appSettings.Raise(m => m.ProfileChanged += null, EventArgs.Empty); Assert.IsFalse(vm.IsEditing); Assert.IsTrue(raised); Assert.AreEqual(second.Height, vm.Height); }
void ReleaseDesignerOutlets() { if (NextButton != null) { NextButton.Dispose(); NextButton = null; } if (PreviousButton != null) { PreviousButton.Dispose(); PreviousButton = null; } if (PageControl != null) { PageControl.Dispose(); PageControl = null; } if (StartButton != null) { StartButton.Dispose(); StartButton = null; } }
protected override bool ProcessCmdKey(ref Message msg, Keys keyData) { // Left Key if (keyData == Keys.Left && !userInputTextBox.Focused) { PreviousButton.PerformClick(); return(true); } // Right Key else if (keyData == Keys.Right && !userInputTextBox.Focused) { NextButton.PerformClick(); return(true); } // Space Key else if (keyData == Keys.Space && !userInputTextBox.Focused) { cardButton.PerformClick(); return(true); } // Enter Key else if (keyData == Keys.Enter && userInputTextBox.Focused) { AddAnotherAnswerButton.PerformClick(); cardButton.Focus(); return(true); } return(base.ProcessCmdKey(ref msg, keyData)); }
void ReleaseDesignerOutlets() { if (DayText != null) { DayText.Dispose(); DayText = null; } if (NextButton != null) { NextButton.Dispose(); NextButton = null; } if (PreviousButton != null) { PreviousButton.Dispose(); PreviousButton = null; } if (ProgressRing != null) { ProgressRing.Dispose(); ProgressRing = null; } if (TableView != null) { TableView.Dispose(); TableView = null; } }
public async void FocusObjectDone() { try { CurrentPointLabel.text = ""; // TODO: znovupovolit zavření menu //GetComponent<SimpleSideMenu>().handleToggleStateOnPressed = true; //GetComponent<SimpleSideMenu>().overlayCloseOnPressed = true; currentFocusPoint = -1; await WebsocketManager.Instance.ObjectAimingDone(); FocusObjectDoneButton.SetInteractivity(false, "No aiming in progress"); CancelAimingButton.SetInteractivity(false, "No aiming in progress"); NextButton.SetInteractivity(false, "No aiming in progress"); PreviousButton.SetInteractivity(false, "No aiming in progress"); SavePositionButton.SetInteractivity(false, "No aiming in progress"); StartObjectFocusingButton.SetInteractivity(true); if (currentObject is ActionObject3D actionObject3D) { actionObject3D.Highlight(); } AimingInProgress = false; } catch (Base.RequestFailedException ex) { Base.NotificationsModernUI.Instance.ShowNotification("Failed to focus object", ex.Message); } }
public async void StartObjectFocusing() { if (!SceneManager.Instance.IsRobotAndEESelected()) { Base.NotificationsModernUI.Instance.ShowNotification("Failed to update object position", "No robot or end effector available"); return; } try { AimingInProgress = true; string armId = null; if (SceneManager.Instance.SelectedRobot.MultiArm()) { armId = SceneManager.Instance.SelectedArmId; } await WebsocketManager.Instance.ObjectAimingStart(currentObject.Data.Id, SceneManager.Instance.SelectedRobot.GetId(), SceneManager.Instance.SelectedEndEffector.GetName(), armId); currentFocusPoint = 0; UpdateCurrentPointLabel(); //TODO: ZAJISTIT ABY MENU NEŠLO ZAVŘÍT když běží focusing - ideálně nějaký dialog //GetComponent<SimpleSideMenu>().handleToggleStateOnPressed = false; //GetComponent<SimpleSideMenu>().overlayCloseOnPressed = false; await CheckDoneBtn(); SavePositionButton.SetInteractivity(true); CancelAimingButton.SetInteractivity(true); StartObjectFocusingButton.SetInteractivity(false, "Already aiming"); if (currentObject is ActionObject3D actionObject3D) { actionObject3D.UnHighlight(); } if (!automaticPointSelection && currentObject.ActionObjectMetadata.ObjectModel.Mesh.FocusPoints.Count > 1) { NextButton.SetInteractivity(true); PreviousButton.SetInteractivity(true); PreviousPoint(); } foreach (AimingPointSphere sphere in spheres) { sphere.SetAimed(false); } } catch (Base.RequestFailedException ex) { Base.NotificationsModernUI.Instance.ShowNotification("Failed to start object focusing", ex.Message); CurrentPointLabel.text = ""; currentFocusPoint = -1; AimingInProgress = false; if (currentObject is ActionObject3D actionObject3D) { actionObject3D.Highlight(); } if (ex.Message == "Focusing already started.") //TODO HACK! find better solution { FocusObjectDone(); } } }
private void DisableFocusControls() { SavePositionButton.GetComponent <Button>().interactable = false; StartObjectFocusingButton.GetComponent <Button>().interactable = false; NextButton.GetComponent <Button>().interactable = false; PreviousButton.GetComponent <Button>().interactable = false; FocusObjectDoneButton.GetComponent <Button>().interactable = false; }
void ReleaseDesignerOutlets() { if (ArtistName != null) { ArtistName.Dispose(); ArtistName = null; } if (BackgroundImage != null) { BackgroundImage.Dispose(); BackgroundImage = null; } if (NextButton != null) { NextButton.Dispose(); NextButton = null; } if (PartyCodeLabel != null) { PartyCodeLabel.Dispose(); PartyCodeLabel = null; } if (PlayButton != null) { PlayButton.Dispose(); PlayButton = null; } if (PreviousButton != null) { PreviousButton.Dispose(); PreviousButton = null; } if (SongNameLabel != null) { SongNameLabel.Dispose(); SongNameLabel = null; } if (SongProgressView != null) { SongProgressView.Dispose(); SongProgressView = null; } if (SongsView != null) { SongsView.Dispose(); SongsView = null; } }
void ReleaseDesignerOutlets() { if (AddAlertButton != null) { AddAlertButton.Dispose(); AddAlertButton = null; } if (EmailAlertLabel != null) { EmailAlertLabel.Dispose(); EmailAlertLabel = null; } if (EmptyAlertButton != null) { EmptyAlertButton.Dispose(); EmptyAlertButton = null; } if (EmptyAlertImageButton != null) { EmptyAlertImageButton.Dispose(); EmptyAlertImageButton = null; } if (MobileNotificationLabel != null) { MobileNotificationLabel.Dispose(); MobileNotificationLabel = null; } if (NextButton != null) { NextButton.Dispose(); NextButton = null; } if (NotifActivatedLabel != null) { NotifActivatedLabel.Dispose(); NotifActivatedLabel = null; } if (PreviousButton != null) { PreviousButton.Dispose(); PreviousButton = null; } if (Tableview != null) { Tableview.Dispose(); Tableview = null; } }
private void PreviousButton_Click(object sender, EventArgs e) { displayBatch -= 1; DisplayResult(results, ranked_docs, displayBatch); NextButton.Show(); if (displayBatch <= 0) { PreviousButton.Hide(); } }
private void Next_Click(object sender, EventArgs e) { displayBatch++; DisplayResult(results, ranked_docs, displayBatch); PreviousButton.Show(); if (displayBatch >= results.TotalHits / 10) { NextButton.Hide(); } }
private void InitializeModels() { _albumArtModel = _appSettings.AlbumArt; _albumArtPopupModel = _appSettings.AlbumArtPopup; _audioBandModel = _appSettings.AudioBand; _customLabelsModel = _appSettings.CustomLabels; _nextButtonModel = _appSettings.NextButton; _playPauseButtonModel = _appSettings.PlayPauseButton; _previousButtonModel = _appSettings.PreviousButton; _progressBarModel = _appSettings.ProgressBar; _audioSourceSettingsModel = _appSettings.AudioSourceSettings; _trackModel = new Track(); }
private void FittingWizardPage_Load(object sender, EventArgs e) { if (PreviousPage == null) { PreviousButton.Hide(); } var parent = Parent as FittingWizard; if (parent != null) { parent.Text = "ウィザード - " + PageName; } }
public void PreviousPoint() { currentFocusPoint = Math.Max(currentFocusPoint - 1, 0); NextButton.interactable = true; if (currentFocusPoint == 0) { PreviousButton.GetComponent <Button>().interactable = false; } else { PreviousButton.GetComponent <Button>().interactable = true; } UpdateCurrentPointLabel(); }
public MainSearchForm() { InitializeComponent(); TitleBoostBox.Enabled = false; AuthorBoostBox.Enabled = false; BibliBoostBox.Enabled = false; AbstractBoostBox.Enabled = false; LoadDatabaseButton.Enabled = false; TitleBoostBox.Text = "1.0"; AuthorBoostBox.Text = "1.0"; BibliBoostBox.Text = "1.0"; AbstractBoostBox.Text = "1.0"; PreviousButton.Hide(); NextButton.Hide(); SaveButton.Hide(); DisplayItenButton.Hide(); }
public void InitialiseAllStrings() { MobileNotificationLabel.Text = Application.LocalizedString("MobileNotification"); NotifActivatedLabel.Text = Application.LocalizedString("NotifActivatedZone"); EmailAlertLabel.Text = Application.LocalizedString("EmailAlert"); AddAlertButton.SetTitle(Application.LocalizedString("CreateButton"), UIControlState.Normal); NextButton.SetTitle(Application.LocalizedString("Next"), UIControlState.Normal); EmptyAlertButton.SetTitle(Application.LocalizedString(Application.LocalizedString("NoEmailAlertConfigured")), UIControlState.Normal); PreviousButton.SetTitle(Application.LocalizedString("Previous"), UIControlState.Normal); if (App.Locator.ModeZone.LsAlertsModeZone?.Count > 0) { NextButton.SetTitle(Application.LocalizedString("Next"), UIControlState.Normal); } else { NextButton.SetTitle(Application.LocalizedString("Skip"), UIControlState.Normal); } }
public void SetAutomaticPointSelection(bool automatic) { automaticPointSelection = automatic; if (automatic) { NextButton.SetInteractivity(false, "Not available when automatic point selection is active"); PreviousButton.SetInteractivity(false, "Not available when automatic point selection is active"); } else { if (!AimingInProgress) { return; } NextButton.SetInteractivity(currentFocusPoint < currentObject.ActionObjectMetadata.ObjectModel.Mesh.FocusPoints.Count - 1, "Selected point is the first one"); PreviousButton.SetInteractivity(currentFocusPoint > 0, "Selected point is the first one"); } }
private void addToolStripMenuItem_Click(object sender, EventArgs e) { addToolStripMenuItem.Enabled = false; exitAddToolStripMenuItem.Enabled = true; this.Height = 600; StudentGridView.Hide(); SearchButton.Hide(); StudentSearctBox.Hide(); label10.Hide(); StudentAddForm.Show(); StudentDeleteButton.Hide(); label11.Hide(); label12.Hide(); FirstPageButton.Hide(); NextPageButton.Hide(); PreviousButton.Hide(); LastPageButton.Hide(); RefreshButton.Hide(); }
protected void ShowHideButtons() { if (PageIndex > 0) { PreviousButton.Show(); } else { PreviousButton.Hide(); } if (PageIndex < (Pages.Count - 1)) { NextButton.Show(); FinishButton.Hide(); } else { NextButton.Hide(); FinishButton.Show(); } }
public override void LoadContent() { base.LoadContent(); info_bulle = "Your number of moves (min number of moves to succeed)"; position_texte_score = new Vector2(16, 8); design_button = new DesignButton(ScreenManager.Instance.Content.Load <Texture2D>(@"Graphics\Buttons\design"), new Vector2(4 * 32, 0)); fire_button = new FireButton(ScreenManager.Instance.Content.Load <Texture2D>(@"Graphics\Buttons\fire"), new Vector2(5 * 32, 0)); water_button = new WaterButton(ScreenManager.Instance.Content.Load <Texture2D>(@"Graphics\Buttons\water"), new Vector2(6 * 32, 0)); music_button = new MusicButton(ScreenManager.Instance.Content.Load <Texture2D>(@"Graphics\Buttons\music"), new Vector2(8 * 32, 0)); sound_button = new SoundButton(ScreenManager.Instance.Content.Load <Texture2D>(@"Graphics\Buttons\sound"), new Vector2(9 * 32, 0)); refresh_button = new ReloadButton(ScreenManager.Instance.Content.Load <Texture2D>(@"Graphics\Buttons\refresh"), new Vector2(11 * 32, 0)); previous_button = new PreviousButton(ScreenManager.Instance.Content.Load <Texture2D>(@"Graphics\Buttons\previous"), new Vector2(13 * 32, 0)); next_button = new NextButton(ScreenManager.Instance.Content.Load <Texture2D>(@"Graphics\Buttons\next"), new Vector2(14 * 32, 0)); menu_button = new MenuButton(ScreenManager.Instance.Content.Load <Texture2D>(@"Graphics\Buttons\menu"), new Vector2(16 * 32, 0)); MapManager.Instance.LoadContent(); LevelManager.Instance.LoadContent(); Actor.Instance.LoadContent(); InitializeMusic(); }
public async Task UpdateMenu() { CalibrateBtn.gameObject.SetActive(false); if (!SceneManager.Instance.SceneStarted) { UpdatePositionBlockVO.SetActive(false); UpdatePositionBlockMesh.SetActive(false); Hide(); return; } CalibrateBtn.Button.onClick.RemoveAllListeners(); if (currentObject.IsRobot()) { CalibrateBtn.gameObject.SetActive(true); CalibrateBtn.SetDescription("Calibrate robot"); CalibrateBtn.Button.onClick.AddListener(() => ShowCalibrateRobotDialog()); if (SceneManager.Instance.GetCamerasNames().Count > 0) { CalibrateBtn.SetInteractivity(true); } else { CalibrateBtn.SetInteractivity(false, "Could not calibrate robot without camera"); } } else if (currentObject.IsCamera()) { CalibrateBtn.gameObject.SetActive(true); CalibrateBtn.SetDescription("Calibrate camera"); CalibrateBtn.Button.onClick.AddListener(() => ShowCalibrateCameraDialog()); } if (SceneManager.Instance.IsRobotAndEESelected()) { if (currentObject.ActionObjectMetadata.ObjectModel?.Type == IO.Swagger.Model.ObjectModel.TypeEnum.Mesh && currentObject.ActionObjectMetadata.ObjectModel.Mesh.FocusPoints?.Count > 0) { UpdatePositionBlockVO.SetActive(false); UpdatePositionBlockMesh.SetActive(true); int idx = 0; foreach (AimingPointSphere sphere in spheres) { if (sphere != null) { Destroy(sphere.gameObject); } } spheres.Clear(); foreach (IO.Swagger.Model.Pose point in currentObject.ActionObjectMetadata.ObjectModel.Mesh.FocusPoints) { AimingPointSphere sphere = Instantiate(Sphere, currentObject.transform).GetComponent <AimingPointSphere>(); sphere.transform.localScale = new Vector3(0.02f, 0.02f, 0.02f); sphere.transform.localPosition = TransformConvertor.ROSToUnity(DataHelper.PositionToVector3(point.Position)); sphere.transform.localRotation = TransformConvertor.ROSToUnity(DataHelper.OrientationToQuaternion(point.Orientation)); sphere.Init(idx, $"Aiming point #{idx}"); spheres.Add(sphere); ++idx; } try { List <int> finishedIndexes = await WebsocketManager.Instance.ObjectAimingAddPoint(0, true); foreach (AimingPointSphere sphere in spheres) { sphere.SetAimed(finishedIndexes.Contains(sphere.Index)); } if (!automaticPointSelection) { currentFocusPoint = 0; } StartObjectFocusingButton.SetInteractivity(false, "Already started"); SavePositionButton.SetInteractivity(true); CancelAimingButton.SetInteractivity(true); await CheckDoneBtn(); AimingInProgress = true; if (currentObject is ActionObject3D actionObject3D) { actionObject3D.UnHighlight(); } UpdateCurrentPointLabel(); if (!automaticPointSelection && currentObject.ActionObjectMetadata.ObjectModel.Mesh.FocusPoints.Count > 1) { NextButton.SetInteractivity(true); PreviousButton.SetInteractivity(true); PreviousPoint(); } } catch (RequestFailedException ex) { StartObjectFocusingButton.SetInteractivity(true); FocusObjectDoneButton.SetInteractivity(false, "No aiming in progress"); NextButton.SetInteractivity(false, "No aiming in progress"); PreviousButton.SetInteractivity(false, "No aiming in progress"); SavePositionButton.SetInteractivity(false, "No aiming in progress"); CancelAimingButton.SetInteractivity(false, "No aiming in progress"); AimingInProgress = false; if (currentObject is ActionObject3D actionObject3D) { actionObject3D.Highlight(); } } } else if (!currentObject.IsRobot() && !currentObject.IsCamera() && currentObject.ActionObjectMetadata.ObjectModel != null) { UpdatePositionBlockVO.SetActive(true); UpdatePositionBlockMesh.SetActive(false); ShowModelSwitch.Interactable = SceneManager.Instance.RobotsEEVisible; if (ShowModelSwitch.Interactable && ShowModelSwitch.Switch.isOn) { ShowModelOnEE(); } } else { UpdatePositionBlockVO.SetActive(false); UpdatePositionBlockMesh.SetActive(false); } } else { UpdatePositionBlockVO.SetActive(false); UpdatePositionBlockMesh.SetActive(false); } }
public void ClickPrevBtn() { PreviousButton.Click(); }