//************************************************************************** // Function: SyncButton_Clicked // // Description: Close the popup so that the main viewmodel can register the location // // Parameters: None // // Returns: None //************************************************************************** public async void SyncButton_Clicked(object sender, EventArgs args) { await PopupNavigation.Instance.PopAsync(true); // Callback is only invoked when the user presses the sync button CallbackEvent?.Invoke(this, EventArgs.Empty); }
//close popup and update measurement's activity id private async void OnCloseButtonTapped(object sender, EventArgs e) { bool isNewActivity = false; if (autoSuggestionBox.Text != "") { measurement.ActivityName = autoSuggestionBox.Text; var azure = AzureDataService.Instance; var temp = await azure._activities.Where(item => item.Name == autoSuggestionBox.Text).Take(1).ToListAsync(); Activities newActivity = temp.Count > 0 ? temp[0] : null; if (newActivity == null) { newActivity = new Activities(); newActivity.Name = autoSuggestionBox.Text; await azure.AddActivity(newActivity); azure.SyncActivties(); //doesn't wait isNewActivity = true; } measurement.ActivityID = newActivity.Id; azure.UpdateMeasurement(measurement); //doesn't wait UpdateViewModel(); if (isNewActivity) { CallbackEvent.Invoke(this, newActivity); } else { CallbackEvent.Invoke(this, null); } } CloseAllPopup(); }
private static void OnCallback(CallbackQuery callback) { CallbackEvent?.Invoke(new CallbackEventArgs() { callbackQuery = callback }); }
private void idetiIkrepseliBtn_Clicked(object sender, EventArgs e) { var activity = Android.App.Application.Context; CallbackEvent?.Invoke(address_product, EventArgs.Empty); switch (address_product) { case "maxima": PopupNavigation.Instance.PopAsync(); Utils.showToast(activity, "Prekė pridėta į krepšelį."); break; case "maxima_pramones": PopupNavigation.Instance.PopAsync(); Utils.showToast(activity, "Prekė pridėta į krepšelį."); break; case "namai": PopupNavigation.Instance.PopAsync(); Utils.showToast(activity, "Prekė pridėta į krepšelį."); break; default: DisplayAlert("Neparinktas adresas", "Prašome pasirinkti prekės pristatymo/atsiemimo adresą", "OK"); break; } }
//************************************************************************** // Function: SubmitButton_Clicked // // Description: When the submit button is clicked this command will check update the // table entry according to the values they specified // // Parameters: sender - Object that sent the message // e - List View item that was tapped // // Returns: None //************************************************************************** public async void SubmitButton_Clicked(object sender, EventArgs args) { FieldTable updatedField = new FieldTable(ref singleField); bool bPopOff = true; if (false == this.areEntriesFilled()) { await App.Current.MainPage.DisplayAlert("Update Field Alert", "No New Entries", "OK"); bPopOff = false; } else { // Update based on which entries got filled out if (false == string.IsNullOrEmpty(fieldname.Text)) { // Verify Unique field name if (true == this.fieldBackend.DoesFieldNameExist(fieldname.Text)) { await App.Current.MainPage.DisplayAlert("Update Field Alert", "Field Name Already Exists", "OK"); bPopOff = false; } else { updatedField.FieldName = fieldname.Text; } } if (-1 != pivotlength.SelectedIndex) { updatedField.PivotLength = (int)pivotlength.ItemsSource[pivotlength.SelectedIndex]; } if (-1 != soiltype.SelectedIndex) { updatedField.SoilType = (string)soiltype.ItemsSource[soiltype.SelectedIndex]; } } // If valid new field then edit existing if (true == bPopOff) { // If pivot length or soil type were changed need to redo equation if (-1 != pivotlength.SelectedIndex || -1 != soiltype.SelectedIndex) { updatedField.WaterUsage = RainCat.WaterUsage(ref updatedField); } await this.fieldBackend.UpdateField(updatedField); await PopupNavigation.Instance.PopAsync(true); CallbackEvent?.Invoke(this, EventArgs.Empty); } }
public void OnEventInvoked(object sender) { if (sender as Object == source) { OnCallbackRecieved?.Invoke(sender); } else if (sender is MonoBehaviour && source is MonoBehaviour) { if (((MonoBehaviour)sender).gameObject == ((MonoBehaviour)source).gameObject) { OnCallbackRecieved?.Invoke(sender); } } else if (sender is MonoBehaviour && source is GameObject) { if (((MonoBehaviour)sender).gameObject == source) { OnCallbackRecieved?.Invoke(sender); } } }
private IEnumerator DelayRoutine() { yield return(new WaitForSeconds(delay)); functionsToInvoke?.Invoke(this); foreach (GameEvent gameEvent in gameEvents) { gameEvent.InvokeEvent(this); } }
private void InvokeCallback() { //Una vez terminado el seleccionar limpia el popup try { CallbackEvent?.Invoke(this, EventArgs.Empty); } catch (Exception ex) { throw ex; } }
//************************************************************************** // Function: SubmitButton_Clicked // // Description: When the submit button is clicked this command will check update the // table entry according to the values they specified // // Parameters: sender - Object that sent the message // e - List View item that was tapped // // Returns: None //************************************************************************** public async void SubmitButton_Clicked(object sender, EventArgs args) { UserTable newUser = new UserTable(ref this.singleUser); bool bPopOff = true; if (false == this.areEntriesFilled()) { await App.Current.MainPage.DisplayAlert("Update Account Alert", "No New Entries", "OK"); bPopOff = false; } else { // Update based on which entries got filled out if (false == string.IsNullOrEmpty(password.Text)) { newUser.Password = password.Text; } if (false == string.IsNullOrEmpty(firstname.Text)) { newUser.FirstName = firstname.Text; } if (false == string.IsNullOrEmpty(lastname.Text)) { newUser.LastName = lastname.Text; } if (false == string.IsNullOrEmpty(email.Text)) { // Before update check that the unique values don't already exist if (true == this.userBackend.IsEmailUnique(email.Text)) { await App.Current.MainPage.DisplayAlert("Update Account Alert", "Email Already Exists", "OK"); bPopOff = false; } else { newUser.Email = email.Text; } } } if (true == bPopOff) { await this.userBackend.UpdateUser(newUser); await PopupNavigation.Instance.PopAsync(true); CallbackEvent?.Invoke(this, EventArgs.Empty); } }
private async void OnAdd(object sender, System.EventArgs e) { if (!String.IsNullOrEmpty(name.Text)) { LeavingPopUpEvent?.Invoke(this, null); var user = new UserDto() { UserName = name.Text, Email = email.Text }; await Rg.Plugins.Popup.Services.PopupNavigation.Instance.PopAllAsync(); CallbackEvent?.Invoke(this, user); } }
// Invokes events based on type of marker data received private void InvokeMarkerEvents(Marker newMarker) { switch (newMarker.eventType) { case (int)CallbackType.Detected: onDetectedEvent.Invoke(newMarker); break; case (int)CallbackType.Lost: onLostEvent.Invoke(newMarker); break; case (int)CallbackType.ReDetected: onRedetectedEvent.Invoke(newMarker); break; default: break; } }
private void InvoceCallback() { CallbackEvent?.Invoke(this, EventArgs.Empty); }
protected override void OnDisappearing() => CallbackEvent?.Invoke(this, _selectedArtist);
protected override void OnDisappearing() => CallbackEvent?.Invoke(this, true);
private void OnEnable() { functionsToCall?.Invoke(this); }
public void CallbackEventTrigger() { CallbackEvent?.Invoke(); }
private void btnConfirm_Click(object sender, EventArgs e) { this.Close(); this.DialogResult = DialogResult.OK; CallbackEvent?.Invoke(CurrPlayer, txbExecPath.Text, txbExecArguments.Text); }
protected override void OnDisappearing() => CallbackEvent?.Invoke(this, EventArgs.Empty);
protected override void OnDisappearing() => CallbackEvent?.Invoke(this, _selectedTracklistId);
private void Update() { functionsToCall?.Invoke(this); }
////////////////////////////////////////////////////////////////////////// private void Awake() { OnAwakeAction?.Invoke(gameObject); OnAwakeEvent?.Invoke(gameObject); }
private void btnConfirm_Click(object sender, EventArgs e) { this.Close(); CallbackEvent?.Invoke(Moves[dgvMoves.CurrentRow.Index]); }
public virtual void OnEventInvoked(object sender) { //Debug.Log(gameEvent.name); OnCallbackRecieved?.Invoke(sender); }
public void OnEventInvoked(object sender) { callbackEvents?.Invoke(sender); }