private void SP_Breadcrumb_Tapped(object sender, TappedRoutedEventArgs e) { Hide(); if (GoBack != null) { GoBack?.Invoke(sender, e); } }
public void OnGoBackClicked() { GoBackEventArgs args; string message = "האם אתה בטוח שאתה רוצה לחזור?\nאם לא השינויים האחרונים לא נשמרו הם יאבדו"; args = new GoBackEventArgs() { IsWorkDone = false, Message = message }; GoBack?.Invoke(this, args); }
private void InitializeComponent() { AvaloniaXamlLoader.Load(this); PlayNowButton = this.FindControl <Button>("PlayNowButton"); InstallButton = this.FindControl <Button>("InstallButton"); BackButton = this.FindControl <Button>("BackButton"); PlayNowButton.Click += PlayNowButton_ClickAsync; InstallButton.Click += InstallButton_ClickAsync; BackButton.Click += (a, b) => GoBack?.Invoke(this); }
/// <summary> /// A function that triggers the event of a backward move /// </summary> public void OnGoBackClicked() { GoBackEventArgs args; string message = null; if (!IsWorkDone) { message = "האם אתה בטוח שאתה רוצה לחזור?\nהנתונים שמילאת על החנות ילכו לאיבוד אם תחזור עכשיו"; } args = new GoBackEventArgs() { IsWorkDone = this.IsWorkDone, Message = message }; GoBack.Invoke(this, args); }
/// <summary> /// A function that triggers the event of a backward move /// </summary> public void OnGoBackClicked() { GoBackEventArgs args; string message = null; if (!IsWorkDone) { message = "האם אתה בטוח שאתה רוצה לחזור?\nלא שמרת את הביקורת שלך, כל מה שכתבת ילך לאיבוד"; } args = new GoBackEventArgs() { IsWorkDone = this.IsWorkDone, Message = message }; GoBack?.Invoke(this, args); }
/// <summary> /// A function that triggers the event of a backward move /// </summary> public void OnGoBackClicked() { GoBackEventArgs args; string message = null; if (!IsWorkDone) { message = "לא שמרת את המוצר עדיין\nהאם את רוצה לחזור בכל זאת?"; } args = new GoBackEventArgs() { IsWorkDone = this.IsWorkDone, Message = message }; GoBack?.Invoke(this, args); }
private void SP_Breadcrumb_Tapped(object sender, TappedRoutedEventArgs e) { Scheduler.Stop(); Hide(); if (GoBack != null) { GoBack?.Invoke(sender, e); } CTRL_NewDevices.Reset(); CTRL_Telemetry.Reset(); CTRL_Bulk.Reset(); DevicesFromRunBooksToClean.Clear(); }
private void Awake() { join.performed += (context) => { for (int j = 0; j < playerSelectedControllers.Count; j++) { if (!playerSelectedControllers[j].isSelected) { playerSelectedControllers[j].isSelected = true; playerSelectedControllers[j].playerCharactersitc.number = context.control.device.deviceId; playerSelectedControllers[j].isReady = false; return; } else if (playerSelectedControllers[j].playerCharactersitc.number == context.control.device.deviceId) { playerSelectedControllers[j].isReady = true; return; } } }; back.performed += (context) => { for (int j = 0; j < playerSelectedControllers.Count; j++) { if (playerSelectedControllers[j].isSelected && playerSelectedControllers[j].playerCharactersitc.number == context.control.device.deviceId) { if (playerSelectedControllers[j].isReady == true) { playerSelectedControllers[j].isReady = false; } else { playerSelectedControllers[j].isSelected = false; } return; } } //if we get to here then the player that click back button is not in game and we shall return to the main menu goBack.Invoke(); }; }
/// <summary> /// Activate the backward event from this screen /// </summary> public void InvokeGoBack() { GoBack?.Invoke(this, null); }
private void OnBack(object sender, RoutedEventArgs e) { GoBack?.Invoke(this, EventArgs.Empty); }
private void btn_Back_Click(object sender, EventArgs e) { GoBack?.Invoke(); }
// Update is called once per frame void Update() { Debug.DrawRay(transform.position, transform.forward * distanceToSee, Color.cyan); if (Physics.Raycast(this.transform.position, this.transform.forward, out hit, distanceToSee)) { //Debug.Log("I touched " + hit.collider.gameObject.name); } //on click if (Input.GetKeyDown(KeyCode.E)) { //draw ray RaycastHit[] rayHits; var ray = Camera.main.ScreenPointToRay(Input.mousePosition); rayHits = Physics.RaycastAll(ray, distanceToSee, interactionsLayer); //checking every hit, so see if they match the tags for (int i = 0; i < rayHits.Length; i++) { //Debug.Log("With the new Raycast, I touched " + rayHits[i].collider.gameObject.name); if (rayHits[i].collider.gameObject.tag == "ForwardDoor") { GoForwards.Invoke(); source.PlayOneShot(door1); } else if (rayHits[i].collider.gameObject.tag == "BackDoor") { GoBack.Invoke(); source.PlayOneShot(door2); } else if (rayHits[i].collider.gameObject.tag == "ExitDoor") { source.PlayOneShot(door3); EventManager.TriggerEvent("ThroughExitDoor"); } else if (rayHits[i].collider.gameObject.tag == "Snowball") { if (!onlyOnce) { onlyOnce = true; var snowball = rayHits[i].collider.gameObject.GetComponent <SnowballScript>(); if (snowball != null) { snowball.GotFound(); source.PlayOneShot(snow); invSnow++; Debug.Log("Found snowball"); } Invoke("PickUpBall", 1f); } } else if (rayHits[i].collider.gameObject.tag == "Lantern") { var lantern = rayHits[i].collider.gameObject.GetComponent <Lantern>(); if (lantern != null) { if (invSnow <= 0) { if (hasLighter || hasMatches) { lantern.LightItUp(); if (hasLighter) { source.PlayOneShot(lightItUp); } else if (hasMatches) { source.PlayOneShot(lightItUp2); } } else { return; } } else { if (firstBall) { firstBall = false; } lantern.AddBall(); invSnow--; source.PlayOneShot(snow2); } } } else if (rayHits[i].collider.gameObject.tag == "Lighter") { hasLighter = true; Destroy(rayHits[i].collider.gameObject); source.PlayOneShot(lighter); } else if (rayHits[i].collider.gameObject.tag == "Matches") { hasLighter = true; Destroy(rayHits[i].collider.gameObject); source.PlayOneShot(matches); } } } }