private IObservable <Unit> sendFeedback() => FeedbackText.FirstAsync() .Do(_ => { isLoadingSubject.OnNext(true); currentErrorSubject.OnNext(null); }) .SelectMany(text => interactorFactory .SendFeedback(text) .Execute() .Materialize()) .Do(notification => { switch (notification.Kind) { case NotificationKind.OnError: isLoadingSubject.OnNext(false); currentErrorSubject.OnNext(notification.Exception); break; default: navigationService.Close(this, true); break; } }) .SelectUnit();
private IObservable <Unit> cancel() => FeedbackText.FirstAsync() .Select(string.IsNullOrEmpty) .SelectMany(isEmpty => isEmpty ? Observable.Return(true) : dialogService.ConfirmDestructiveAction(ActionType.DiscardFeedback)) .DoIf(shouldBeClosed => shouldBeClosed, _ => navigationService.Close(this, false)) .SelectUnit();
public void checkBox1_CheckedChanged(object sender, EventArgs e) { if (checkBox1.Checked == true) { FeedbackText.Text = "Congratulation your application was Successful "; FeedbackText.Refresh(); } }
private void checkBox2_CheckedChanged(object sender, EventArgs e) { if (checkBox2.Checked == true) { FeedbackText.Text = "Sorry your application was Unsuccessful "; FeedbackText.Refresh(); } }
public void PushList(FeedbackText text) { // Puts the given FeedbackText to be first in the list texts.Remove(text); texts.Insert(0, text); // Updates all the FeedbackTexts goal positions for (int i = 0; i < texts.Count; i++) { texts[i].goalPos = goalPositions[i]; } }
public void CreateText(Transform location) { FeedbackText popupText = Resources.Load <FeedbackText>("FeedbackText"); Vector2 screenPos = UnityEngine.Camera.main.WorldToScreenPoint(location.position); var instance = Instantiate(popupText); instance.transform.SetParent(location.transform, false); instance.transform.position = screenPos; instance.LoadTexts(location); }
private void UpdateText() { if (!string.IsNullOrEmpty(AppName)) { RatingMessageTitle = RatingMessageTitle.Replace("#MyApp#", AppName); RatingMessage = RatingMessage.Replace("#MyApp#", AppName); RatingCancelText = RatingCancelText.Replace("#MyApp#", AppName); RatingRemindText = RatingRemindText.Replace("#MyApp#", AppName); RateText = RateText.Replace("#MyApp#", AppName); FeedbackMessageTitle = FeedbackMessageTitle.Replace("#MyApp#", AppName); FeedbackMessage = FeedbackMessage.Replace("#MyApp#", AppName); FeedbackCancelText = FeedbackCancelText.Replace("#MyApp#", AppName); FeedbackText = FeedbackText.Replace("#MyApp#", AppName); } }
public override async void CloseWithDefaultResult() { var feedbackText = await FeedbackText.FirstAsync(); if (!string.IsNullOrEmpty(feedbackText)) { var shouldDiscard = await View.ConfirmDestructiveAction(ActionType.DiscardFeedback); if (!shouldDiscard) { return; } } base.CloseWithDefaultResult(); }
public override async Task <bool> ConfirmCloseRequest() { var feedbackText = await FeedbackText.FirstAsync(); if (!string.IsNullOrEmpty(feedbackText)) { var view = View; if (view == null) { return(true); } return(await view .ConfirmDestructiveAction(ActionType.DiscardFeedback)); } return(true); }
// Make sure that common GA functions are at lowest protected, not private. protected void Awake() { feedbackText = GameObject.FindGameObjectWithTag("FeedbackText").GetComponent <FeedbackText>(); if (feedbackText == null) { Debug.LogError("No FeedbackText found in GeneticAlgorithm"); } // Initialize values m_simulator = GameObject.FindGameObjectWithTag("matchSimulator").GetComponent <MatchSimulator>(); if (m_simulator != null) { m_simulator.MatchOver += MatchSessionOver; } else { Debug.LogError("No matchsimulator was found in GeneticAlgorithm"); } buttonCanvas = GameObject.FindGameObjectWithTag("ButtonCanvas"); if (buttonCanvas == null) { Debug.LogError("No gameobject with tag ButtonCanvas was found"); } if (generationField == null) { Debug.LogError("No Field for generation input was found"); } else { generationField.text = generations.ToString(); } if (tourneyContestents > populationSize) { tourneyContestents = populationSize; } }
private void Awake() { m_simulator = GameObject.FindGameObjectWithTag("matchSimulator").GetComponent <MatchSimulator>(); if (m_simulator == null) { Debug.LogError("No matchsimulator found in ButtonBattle"); } if (m_simulator != null) { m_simulator.MatchOver += MatchBattleOver; } m_buttonCanvas = GameObject.FindGameObjectWithTag("ButtonCanvas"); if (m_buttonCanvas == null) { Debug.LogError("No gameobject with tag ButtonCanvas was found"); } m_feedbackText = GameObject.FindGameObjectWithTag("FeedbackText").GetComponent <FeedbackText>(); if (m_feedbackText == null) { Debug.LogError("No FeedbackText could be found in ButtonBattle"); } }
private void OnLoaded(object sender, RoutedEventArgs routedEventArgs) { FeedbackText.Focus(); }