public ArreglarLineasForm(PrincipalForm Padre) { InitializeComponent(); lineaSeleccionada = -1; fusionar = false; formPadre = (PrincipalForm)Padre; copiaTexto = formPadre.textoSegmentado.Copia(); textoEscalado = copiaTexto.Copia(); textoEscalado.EscalacionLineal(((double)lineasSegmentadasPictureBox.Size.Width) / copiaTexto.GetAncho(), ((double)lineasSegmentadasPictureBox.Size.Height) / copiaTexto.GetAlto()); IntPtr ptrDIB; //Puntero al DIB IntPtr ptrMapaBits; //Puntero al mapa de bits en sí (nos saltamos el bitmapinfoheader y la paleta, si la hay) unsafe //Zona no segura (transformación de punteros C++ a C#) { ptrDIB = (IntPtr)textoEscalado.GetDIB(); ptrMapaBits = (IntPtr)textoEscalado.GetMapaBits(); } lineasSegmentadasPictureBox.Image = PrincipalForm.BitmapFromDIB(ptrDIB, ptrMapaBits); }
public PerfilesForm(PrincipalForm padre) { InitializeComponent(); this.padre = padre; ActualizarPerfiles(); }
private void Entrar() { PrincipalForm f = Application.OpenForms["PrincipalForm"] as PrincipalForm; f.Entrar(); f.Text = $"ProwayFlix - {Repositorios.UsuarioLogado.Nome} "; this.Close(); }
public SlopeForm(PrincipalForm Padre) { InitializeComponent(); formPadre = (PrincipalForm)Padre; copiaTexto = formPadre.textoSegmentado; distanciaMinimaNumericUpDown.Value = formPadre.perfilActual.segmentacion.distanciaMinimaSlope; }
public PalabrasForm(PrincipalForm Padre) { InitializeComponent(); formPadre = (PrincipalForm)Padre; copiaTexto = formPadre.textoSegmentado; espaciadoMedioNumericUpDown.Value = formPadre.perfilActual.segmentacion.espaciadoMedio; }
public LineasForm(PrincipalForm Padre) { InitializeComponent(); formPadre = (PrincipalForm)Padre; copiaTexto = formPadre.textoActual; interlineadoMedioNumericUpDown.Value = formPadre.perfilActual.segmentacion.interlineadoMedio; incrementoMinimoNumericUpDown.Value = formPadre.perfilActual.segmentacion.incrementoMinimoLineas; }
public CaracteresForm(PrincipalForm Padre) { InitializeComponent(); formPadre = (PrincipalForm)Padre; copiaTexto = formPadre.textoSegmentado; grosorTrazoNumericicUpDown.Value = formPadre.perfilActual.segmentacion.grosorMedioTrazo; incrementoMinimoNumericUpDown.Value = (decimal)formPadre.perfilActual.segmentacion.incrementoMinimoCaracteres; }
private int umbral;//Porque desde el hilo background no se puede acceder a la propiedad Value de la TrackBar public UmbralizadoForm(PrincipalForm Padre) { InitializeComponent(); formPadre = (PrincipalForm)Padre; copiaTexto = formPadre.textoActual; umbralTrackBar.Value = formPadre.perfilActual.preprocesado.umbral; umbralTextBox.Text = formPadre.perfilActual.preprocesado.umbral.ToString(); }
public EscaladoForm(PrincipalForm Padre) { InitializeComponent(); formPadre = (PrincipalForm)Padre; copiaTexto = formPadre.textoActual; altoNumericUpDown.Value = copiaTexto.GetAlto(); anchoNumericUpDown.Value = copiaTexto.GetAncho(); proporcionesCheckBox.Checked = formPadre.perfilActual.preprocesado.mantenerProporcion; }
private double grados;//Porque desde el hilo background no se puede acceder a la propiedad Value de la TrackBar public EnderezadoForm(PrincipalForm Padre) { InitializeComponent(); formPadre = (PrincipalForm)Padre; copiaTexto = formPadre.textoActual; direccion = 1; if (formPadre.estadoImagen == EstadoImagen.cargada)//La imagen no está umbralizada aún { automaticoRadioButton.Enabled = false; } }
private void Entrar() { PrincipalForm principal = Application.OpenForms["PrincipalForm"] as PrincipalForm; if (principal == null) { principal = new PrincipalForm(); } principal.Show(); principal.Entrar(); principal.Text = $"ProwayFlix - {Repositorios.UsuarioLogado.Nome} "; ResetarMensagemdeErro(); ResetarCampos(); this.Hide(); }
private void lineasSegmentadasPictureBox_MouseClick(object sender, MouseEventArgs e) { int linea = textoEscalado.GetLinea(e.Y, e.X); textoEscalado.LiberarTextoManejado(); if (fusionar) { if (lineaSeleccionada < linea) { copiaTexto.Fusionar(lineaSeleccionada, linea); } else { copiaTexto.Fusionar(linea, lineaSeleccionada); } } textoEscalado = copiaTexto.Copia(); textoEscalado.EscalacionLineal(((double)lineasSegmentadasPictureBox.Size.Width) / copiaTexto.GetAncho(), ((double)lineasSegmentadasPictureBox.Size.Height) / copiaTexto.GetAlto()); if (!fusionar && linea != -1 && linea != lineaSeleccionada) { textoEscalado.PintarLinea(linea); lineaSeleccionada = linea; } else { lineaSeleccionada = -1; } IntPtr ptrDIB; //Puntero al DIB IntPtr ptrMapaBits; //Puntero al mapa de bits en sí (nos saltamos el bitmapinfoheader y la paleta, si la hay) unsafe //Zona no segura (transformación de punteros C++ a C#) { ptrDIB = (IntPtr)textoEscalado.GetDIB(); ptrMapaBits = (IntPtr)textoEscalado.GetMapaBits(); } lineasSegmentadasPictureBox.Image = PrincipalForm.BitmapFromDIB(ptrDIB, ptrMapaBits); fusionar = false; }
public NuevoPerfilForm(PrincipalForm padre) { InitializeComponent(); this.padre = padre; //Cargamos los distintos perfiles disponibles en el list box if (!Directory.Exists(Application.StartupPath + "\\Perfiles")) { Directory.CreateDirectory(Application.StartupPath + "\\Perfiles"); } String[] perfiles = Directory.GetFiles(Application.StartupPath + "\\Perfiles"); foreach (String perfil in perfiles) { perfilBaseComboBox.Items.Add(perfil.Substring(perfil.LastIndexOf("\\") + 1)); } perfilBaseComboBox.SelectedItem = "Predefinido"; }
private void dividirButton_Click(object sender, EventArgs e) { copiaTexto.Dividir(lineaSeleccionada); textoEscalado.LiberarTextoManejado(); textoEscalado = copiaTexto.Copia(); textoEscalado.EscalacionLineal(((double)lineasSegmentadasPictureBox.Size.Width) / copiaTexto.GetAncho(), ((double)lineasSegmentadasPictureBox.Size.Height) / copiaTexto.GetAlto()); IntPtr ptrDIB; //Puntero al DIB IntPtr ptrMapaBits; //Puntero al mapa de bits en sí (nos saltamos el bitmapinfoheader y la paleta, si la hay) unsafe //Zona no segura (transformación de punteros C++ a C#) { ptrDIB = (IntPtr)textoEscalado.GetDIB(); ptrMapaBits = (IntPtr)textoEscalado.GetMapaBits(); } lineasSegmentadasPictureBox.Image = PrincipalForm.BitmapFromDIB(ptrDIB, ptrMapaBits); lineaSeleccionada = -1; }