public ActionResult Edit(PopUps popUps, HttpPostedFileBase PopUpImage) { ModelState.Remove("ModifiedOnDatetime"); ModelState.Remove("ModifiedUsername"); if (ModelState.IsValid) { PopUps popUpEdit = popUpManager.Find(x => x.Id == popUps.Id); if (PopUpImage != null && (PopUpImage.ContentType == "image/jpeg" || PopUpImage.ContentType == "image/jpg" || PopUpImage.ContentType == "image/png")) { string filename = $"user_{popUps.Title}.{PopUpImage.ContentType.Split('/')[1]}"; PopUpImage.SaveAs(Server.MapPath($"~/Images/PopUpImage/{filename}")); popUpEdit.PopUpImage = filename; } popUpEdit.Title = popUps.Title; popUpEdit.IsActive = popUps.IsActive; popUpManager.Update(popUpEdit); return(RedirectToAction("Index")); } return(View(popUps)); }
public async Task CancelarPedido(int id) { if (await http.DELETE <bool>($"{Api.Venda}/{id}")) { NotificationService.Notify(PopUps.Success(validation[validationLocalizer.Sucesso], validation[validationLocalizer.CancelarPedidoMensagem])); await CarregarDados(); } }
public ActionResult DeleteConfirmed(int id) { PopUps popUps = popUpManager.Find(x => x.Id == id); popUpManager.Delete(popUps); System.IO.File.Delete(Server.MapPath($"~/Images/PopUpImage/{popUps.PopUpImage}")); return(RedirectToAction("Index")); }
public async Task OnSubmit() { if (await http.PUT <bool>($"{Api.Usuario}/TrocarSenha", Model)) { NotificationService.Notify(PopUps.Success(validation[validationLocalizer.Sucesso], localizer[painelLocalizer.SenhaTrocada])); navigation.NavigateTo("/Usuario/DashBoard"); } }
public static void Initialize() { GameObject.Find("Canvas"); if (!popUpText) { popUpText = Resources.Load <PopUps>("PopUpHolder"); } }
public async Task OnSubmit() { if (await http.PUT <bool>(Api.Usuario, UsuarioConta)) { NotificationService.Notify(PopUps.Success(_localizer[validation.Sucesso], _localizer[validation.dadosContaSucesso])); navigation.NavigateTo("/Usuario/DashBoard"); } }
public static void CreateFloatingText(string txt, Transform location) { PopUps instance = Instantiate(popUpText); Vector2 screenPosition = cam2.WorldToScreenPoint(location.position); instance.gameObject.transform.SetParent(canvas2.transform, false); instance.transform.position = screenPosition; instance.SetText(txt); }
private async Task OnSubmit() { await http.AdicionarCSRF(); if (await http.POST <bool>(Api.Usuario, UsuarioEndereco)) { NotificationService.Notify(PopUps.Success(validation.Sucesso, _localizer[validation.CadastradoSucesso])); await Task.Delay(5); navigation.NavigateTo("/Login"); } }
public void ExitOptions() { if (Change) { PopUps pop= GameObject.FindGameObjectWithTag("OptionsManager").GetComponent<PopUps>(); pop.PopUp("Save current changes?"); } else{ optionsCanva.gameObject.SetActive(false); pauseCanva.enabled= true; } }
public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } PopUps popUps = popUpManager.Find(x => x.Id == id.Value); if (popUps == null) { return(HttpNotFound()); } return(View(popUps)); }
public async Task Comentar() { ClassificacaoProduto.Use(x => { x.DataRegistro = DateTime.Now; x.ProdutoClassificacaoId = ProdutoID; x.PermitirVisualizar = false; }); if (await http.POST <bool>($"{Api.Produto}/Classificacao", ClassificacaoProduto)) { NotificationService.Notify(PopUps.Success(validationLocalizer[validation.Sucesso], validationLocalizer[validation.ComentarioEnviado])); Notifier.Atualizar(); } }
// Use this for initialization IEnumerator Start() { // Bind to moves scanner.OnMove += Scanner_OnMove; nextShowStage = CurrentStage.NumMoves; // Wait for a few seconds yield return(new WaitForSeconds(waitFor)); // Show the first stage if ((currentStage == 0) && (scanner.NumMoves < nextShowStage)) { stageId = PopUps.ShowNewDialog(CurrentStage.GetMessage(scanner)); } }
public override int GetHashCode() { int hash = 1; if (MissionId != 0) { hash ^= MissionId.GetHashCode(); } if (MissionName.Length != 0) { hash ^= MissionName.GetHashCode(); } if (MissionType != 0) { hash ^= MissionType.GetHashCode(); } hash ^= award_.GetHashCode(); if (MissionDesc.Length != 0) { hash ^= MissionDesc.GetHashCode(); } if (JumpTo.Length != 0) { hash ^= JumpTo.GetHashCode(); } if (Weight != 0) { hash ^= Weight.GetHashCode(); } if (Player != 0) { hash ^= Player.GetHashCode(); } if (PopUps != 0) { hash ^= PopUps.GetHashCode(); } if (extra_ != null) { hash ^= Extra.GetHashCode(); } return(hash); }
private async Task OnClick() { string mensagemErro = string.Empty; if (DateTime.Compare(Filtro.DataInical, Filtro.Datafinal) > 0) { mensagemErro = validation[validationLocalizer.DataInicialMaiorDataFinal]; } if (string.IsNullOrEmpty(mensagemErro)) { PedidosCliente = await http.POST <Pedido[]>(Api.Pedido, Filtro); } else { NotificationService.Notify(PopUps.Error(validation[validationLocalizer.Erro], mensagemErro)); await Task.CompletedTask; } }
private void Scanner_OnMove(BlockGridScanner obj) { // Check if the number of moves exceed the stage if ((CurrentStage != null) && (obj.NumMoves >= nextShowStage)) { // Hide the previous message PopUps.RemoveDialog(stageId); // Increment stage ++currentStage; // Check if there is a next stage if (CurrentStage != null) { // Show the next message nextShowStage += CurrentStage.NumMoves; stageId = PopUps.ShowNewDialog(CurrentStage.GetMessage(scanner)); } } }
private async Task OnClick() { string mensagemErro = string.Empty; if (filtro.DataInical.Year != filtro.Datafinal.Year) { mensagemErro = validation[validationLocalizer.PesquisasMesmoAno]; } else if (DateTime.Compare(filtro.DataInical, filtro.Datafinal) > 0) { mensagemErro = validation[validationLocalizer.DataInicialMaiorDataFinal]; } if (string.IsNullOrEmpty(mensagemErro)) { Painel = await http.POST <PainelViewModel>(Api.Painel, filtro); } else { NotificationService.Notify(PopUps.Error(validation[validationLocalizer.Erro], mensagemErro)); await Task.CompletedTask; } }
public void SetPopUpActive(PopUps a_popUpName) { switch (a_popUpName) { case PopUps.Options: m_popUp.cnvOptions.Visibility = Visibility.Visible; break; case PopUps.Statistics: m_popUp.cnvStatistics.Visibility = Visibility.Visible; break; case PopUps.Info: m_popUp.cnvInfo.Visibility = Visibility.Visible; break; default: m_popUp.cnvInfo.Visibility = Visibility.Collapsed; m_popUp.cnvOptions.Visibility = Visibility.Collapsed; m_popUp.cnvStatistics.Visibility = Visibility.Collapsed; break; } }
public void Confirm() { PopUps pop = GameObject.FindGameObjectWithTag(ManagerName).GetComponent <PopUps>(); pop.PopUp(Text); }
//******************************** //******MonoBehaviour************* #region MonoBehavior private void OnEnable() { PopUps.popUps = this; }