示例#1
0
        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);
        }
示例#2
0
        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();
        }
示例#4
0
        public SlopeForm(PrincipalForm Padre)
        {
            InitializeComponent();

            formPadre  = (PrincipalForm)Padre;
            copiaTexto = formPadre.textoSegmentado;

            distanciaMinimaNumericUpDown.Value = formPadre.perfilActual.segmentacion.distanciaMinimaSlope;
        }
示例#5
0
        public PalabrasForm(PrincipalForm Padre)
        {
            InitializeComponent();

            formPadre  = (PrincipalForm)Padre;
            copiaTexto = formPadre.textoSegmentado;

            espaciadoMedioNumericUpDown.Value = formPadre.perfilActual.segmentacion.espaciadoMedio;
        }
示例#6
0
        public LineasForm(PrincipalForm Padre)
        {
            InitializeComponent();

            formPadre  = (PrincipalForm)Padre;
            copiaTexto = formPadre.textoActual;

            interlineadoMedioNumericUpDown.Value = formPadre.perfilActual.segmentacion.interlineadoMedio;
            incrementoMinimoNumericUpDown.Value  = formPadre.perfilActual.segmentacion.incrementoMinimoLineas;
        }
示例#7
0
        public CaracteresForm(PrincipalForm Padre)
        {
            InitializeComponent();

            formPadre  = (PrincipalForm)Padre;
            copiaTexto = formPadre.textoSegmentado;

            grosorTrazoNumericicUpDown.Value    = formPadre.perfilActual.segmentacion.grosorMedioTrazo;
            incrementoMinimoNumericUpDown.Value = (decimal)formPadre.perfilActual.segmentacion.incrementoMinimoCaracteres;
        }
示例#8
0
        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();
        }
示例#9
0
        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;
        }
示例#10
0
        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;
            }
        }
示例#11
0
        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();
        }
示例#12
0
        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;
        }
示例#13
0
        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";
        }
示例#14
0
        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;
        }