private void btnCancelar_Click(object sender, EventArgs e) { switch (ListaPantallas) { case Pantallas.pantalla3: ListaPantallas = Pantallas.pantalla2; Recepcion2 frmObj = new Recepcion2(); AbrirFormHija(new Recepcion2()); btnAceptar.Enabled = true; break; case Pantallas.pantalla2: ListaPantallas = Pantallas.pantalla1; AbrirFormHija(new Recepcion()); btnCancelar.Text = "Cancelar"; break; case Pantallas.pantalla1: this.Dispose(); break; // default: // Console.WriteLine("Default case"); // break; } }
private void saveScreen() { if (pantallasToSave.idPantalla.Equals(0)) { pantallasToSave = _ScreenPresenter.SaveScreen(pantallasToSave).Result; if (pantallasToSave != null && pantallasToSave.Activo) { screenList.Add(pantallasToSave); } } else { if (!pantallasToSave.Activo) { _ScreenPresenter.SaveScreen(pantallasToSave); screenList.Remove(pantallasToSave); } else { pantallasToSave = _ScreenPresenter.SaveScreen(pantallasToSave).Result; searchScreenTextBox.Text = string.Empty; screenList.Clear(); screenList.AddRange(_ScreenPresenter.GetAllPantallas()); } } }
public async Task <Pantallas> SaveScreen(Pantallas pantalla) { string webApiUrl = WebApiMethods.SaveScreen; Pantallas response = await App.HttpTools.HttpPostObjectWithResponseDataAsync <Pantallas, Pantallas>(webApiUrl, pantalla, "Hubo un error al guardar la unidad").ConfigureAwait(false); return(response); }
/// <summary> /// Allows the game to perform any initialization it needs to before starting to run. /// This is where it can query for any required services and load any non-graphic /// related content. Calling base.Initialize will enumerate through any components /// and initialize them as well. /// </summary> protected override void Initialize() { // TODO: Add your initialization logic here Coordenadas.InicializarDatos(this); manejadorDeEscenas = new Pantallas(this); base.Initialize(); }
public Enviar(String ipAddress, string ipCliente, int portNum, string OpcionDeEnvio, string Metadatos) { try { bool ok = true; while (ok) { _client = new TcpClient(); Ping Pings = new Ping(); //objeto ping para ver si hay conexion con el servidor int timeout = 10; if (Pings.Send(ipAddress, timeout).Status == IPStatus.Success) // si hay ping me inicia el meotod de hilo para establecer una conexion { _client.Connect(ipAddress, 4563); //se establece conexion y ya esta establecido un puerto unico EnvioTcp(ipCliente, portNum, OpcionDeEnvio, Metadatos); // inicia el envio tcp ok = false; //se cierra el ciclo } else { //Console.Clear(); //Console.WriteLine(" NO hay conexcion a al servidor verifie ip o conexion"); //Console.WriteLine(" Ingrese otra ip"); //Console.WriteLine(" Prbablemente se perdio la conexion"); //Console.ReadKey(); //Program miPrograma = new Program(); //Console.Clear(); } } } catch (Exception) { Pantallas ConfigurarPantalla = new Pantallas(); } }
public IActionResult SaveScreen([FromBody] Pantallas pantalla) { try { if (ModelState.IsValid) { if (pantalla.idPantalla == 0) { SecurityUoW.PantallasRepository.Add(pantalla); } else { SecurityUoW.PantallasRepository.Update(pantalla); } SecurityUoW.Save(); return(Ok(pantalla)); } else { return(BadRequest("Los datos de la unidad son incorrectos")); } } catch (Exception ex) { return(StatusCode(StatusCodes.Status500InternalServerError, ex)); } }
private void CheckScreen_Checked(object sender, System.Windows.RoutedEventArgs e) { CheckBox check = (CheckBox)sender; Pantallas currentScreen = check.DataContext as Pantallas; if (currentUser != null) { if ((bool)check.IsChecked) { long screenToAdd = currentUser.PantallasUsuario.Where(x => x.idPantalla.Equals(currentScreen.idPantalla)).Select(x => x.idPantallasUsuario).SingleOrDefault(); if (screenToAdd == 0) { PantallasUsuario pantalla = new PantallasUsuario { idPantalla = currentScreen.idPantalla, idUsuario = currentUser.idUsuario, }; currentUser.PantallasUsuario.Add(pantalla); } } else { long screenToRemove = currentUser.PantallasUsuario.Where(x => x.idPantalla.Equals(currentScreen.idPantalla)).Select(x => x.idPantallasUsuario).SingleOrDefault(); if (screenToRemove != 0) { _permissionsPresenter.DeleteImpuestoProductoById(screenToRemove); } currentUser.PantallasUsuario = currentUser.PantallasUsuario.Where(x => !x.idPantalla.Equals(currentScreen.idPantalla)).ToList(); } } }
public Juego(Pantallas manejador, SpriteBatch spriteBatch, string Padre) : base(manejador, spriteBatch, Padre) { Nombre = "Juego"; puntajeP1 = puntajeP2 = 0; temporizador = new Timer(tiempoLimiteSegundos * 1000); temporizador.Elapsed += AlPasarElIntervalo; temporizador.Enabled = true; InicializarComponentes(); }
private void activeScreen_Click(object sender, RoutedEventArgs e) { pantallasToSave = screenGrid.SelectedItem as Pantallas; if (pantallasToSave != null) { pantallasToSave.Activo = true; saveScreen(); cleanView(); } }
private void cleanView() { txtName.Text = string.Empty; txtPanel.Text = string.Empty; txtUrl.Text = string.Empty; txtIcon.Text = string.Empty; txtNivel.Text = string.Empty; checkStatus.IsChecked = true; checkSubScreen.IsChecked = false; pantallasToSave = new Pantallas(); }
public MenuPrincipalOpciones(Pantallas manejador, SpriteBatch spriteBatch, string padre) : base(manejador, spriteBatch, padre) { Nombre = "MenuPrincipalOpciones"; seleccionIndex = 0; coloresP1Index = Config.ColoresIndexP1; coloresP2Index = Config.ColoresIndexP2; cantidadParaGanar = Config.CantidadParaGanar; inputAnterior = 0; seleccionColor = Color.Magenta; InicializarComponentes(); }
private void ButtonSubScreenAdd_Click(object sender, System.Windows.RoutedEventArgs e) { Button currentButton = (Button)(sender); Pantallas currentScreen = currentButton.Tag as Pantallas; var userControls = App.LoadComponent(new Uri(currentScreen.Url, UriKind.Relative)); _catalogTabItem = new TabItem { Content = userControls }; catalogsTab.Items.Add(_catalogTabItem); catalogsTab.Items.Refresh(); catalogsTab.SelectedIndex = 1; }
private void screenGrid_MouseDoubleClick(object sender, MouseButtonEventArgs e) { DataGrid dataGrid = (DataGrid)sender; pantallasToSave = dataGrid.SelectedItem as Pantallas; txtName.Text = pantallasToSave.NombrePantalla; txtPanel.Text = pantallasToSave.TextoPanel; txtUrl.Text = pantallasToSave.Url; txtIcon.Text = pantallasToSave.Icono; txtNivel.Text = pantallasToSave.Nivel.ToString(); checkStatus.IsChecked = pantallasToSave.Activo; checkSubScreen.IsChecked = pantallasToSave.SubPantalla; }
private void ScreenAdd_PreviewMouseLeftButtonUp(object sender, MouseButtonEventArgs e) { if (!InUse) { ListViewItem itemClick = (ListViewItem)sender; ViewsTab.Items.Clear(); Pantallas currentScreen = itemClick.Tag as Pantallas; var userControls = App.LoadComponent(new Uri(currentScreen.Url, UriKind.Relative)); _tabUserPage = new TabItem { Content = userControls }; _tabUserPage.Tag = this; ViewsTab.Items.Add(_tabUserPage); ViewsTab.Items.Refresh(); } }
private void CheckScreen_Loaded(object sender, System.Windows.RoutedEventArgs e) { CheckBox check = (CheckBox)sender; Pantallas pantalla = check.DataContext as Pantallas; if (pantalla != null) { //meter procedimiento PantallasUsuario usuarioPantalla = currentUser.PantallasUsuario.Where(x => x.idPantalla.Equals(pantalla.idPantalla)).FirstOrDefault(); if (usuarioPantalla != null) { check.IsChecked = true; } else { check.IsChecked = false; } } }
private void btnAceptar_Click(object sender, EventArgs e) { switch (ListaPantallas) { case Pantallas.pantalla1: ListaPantallas = Pantallas.pantalla2; AbrirFormHija(new Recepcion2()); btnCancelar.Enabled = true; btnCancelar.Text = "Atrás"; break; case Pantallas.pantalla2: ListaPantallas = Pantallas.pantalla3; AbrirFormHija(new Recepcion4()); btnAceptar.Enabled = false; break; // default: // Console.WriteLine("Default case"); // break; } }
public Task <Pantallas> SaveScreen(Pantallas pantalla) { return(_ScreenServices.SaveScreen(pantalla)); }
public MenuPrincipal(Pantallas manejador, SpriteBatch spriteBatch, string padre) : base(manejador, spriteBatch, null) { Nombre = "MenuPrincipal"; InicializarComponentes(); }
public EscenaBase(Pantallas manejador, SpriteBatch spriteBatch, string padre = null) { this.manejador = manejador; this.spriteBatch = spriteBatch; Padre = padre; }
static void Main(string[] args) { Console.Title = " Cajero-AT & T V1.0"; Pantallas Micajero = new Pantallas(); }
private void Principal_Load(object sender, EventArgs e) { ListaPantallas = Pantallas.pantalla1; AbrirFormHija(new Recepcion()); }