Esempio n. 1
0
        public void ActualizaPantalla(ProcesamientoComandos pc, string Comando, string ClaseVetnana, string TituloVentana)
        {
            lblAcento.Visible = pc.ACENTO;
            lblMAY.Visible    = pc.MAYUSCULAS;

            lblControl.Visible            = pc.CONTROL;
            lblShift.Visible              = pc.SELECCION;
            lblALT.Visible                = pc.ALT;
            pbActivo.Visible              = !pc.XULIA_ACTIVA;
            lblAviso.Visible              = pc.Aviso;
            lblCodTeclaPresionado.Visible = (pc.PressKey.Count > 0);

            tbClase.Text  = ClaseVetnana;
            tbTitulo.Text = TituloVentana;
            if (Comando != "")
            {
                tbComando.Text = Comando + " (" + pc.precision.ToString().Substring(0, 4) + "%)";
            }
            tbModo.Text = pc.MODO;

            tbNumero.Text = pc.Multiplicador.ToString();

            Visible = true;
            if (pc.OcultarEstadoSegundos > 0)
            {
                tmrOcultar.Interval = pc.OcultarEstadoSegundos * 1000;
                tmrOcultar.Enabled  = true;
            }
        }
Esempio n. 2
0
 public void ActivarAvatar()
 {
     tmrAvatar.Enabled = true;
     this.Show();
     ProcesamientoComandos.SiempreEncima((int)this.Handle);
     ProcesamientoComandos.NoSiempreEncima((int)this.Handle);
 }
Esempio n. 3
0
        public void DibujarControles(string frase, ProcesamientoComandos pc)
        {
            int      X = INI_X, Y = INI_Y;
            Graphics g = this.CreateGraphics();
            Label    tbPalabra;
            Label    lblPalabra;
            int      AnchoPalabra;

            m_pc = pc;

            if (m_pc.ModoCorreccion != "")
            {
                m_pc.CambioModo(m_pc.ModoCorreccion);
            }

            int alto  = Screen.PrimaryScreen.Bounds.Height;
            int ancho = Screen.PrimaryScreen.Bounds.Width;

            this.Width  = ancho;
            tbPalabras  = new Label[palabras.Length];
            lblPalabras = new Label[palabras.Length];
            for (int i = 0; i < palabras.Length; i++)
            {
                tbPalabra              = new Label();
                lblPalabra             = new Label();
                tbPalabras[i]          = tbPalabra;
                lblPalabras[i]         = lblPalabra;
                tbPalabra.Font         = new System.Drawing.Font("Arial", 11);
                lblPalabra.Font        = new System.Drawing.Font("Arial", 11);
                lblPalabra.BackColor   = System.Drawing.Color.Azure;
                tbPalabra.BackColor    = System.Drawing.Color.White;
                lblPalabra.BorderStyle = BorderStyle.FixedSingle;
                tbPalabra.BorderStyle  = BorderStyle.FixedSingle;

                lblPalabra.Text = i.ToString();
                tbPalabra.Text  = palabras[i];
                this.CreateGraphics();
                AnchoPalabra = (int)g.MeasureString(palabras[i], new Font("Arial", 11)).Width + 2 + ESPACIO_COMPONENTES;

                tbPalabra.Width      = AnchoPalabra;
                lblPalabra.Width     = AnchoPalabra;
                lblPalabra.TextAlign = ContentAlignment.MiddleCenter;

                if (X + AnchoPalabra + INI_X >= ancho - INI_X)
                {
                    int Alto = tbPalabra.Height + lblPalabra.Height + ESPACIO_VERTICAL;
                    Y           += Alto;
                    X            = INI_X;
                    this.Height += Alto;
                }
                tbPalabra.Location  = new System.Drawing.Point(X, Y);
                lblPalabra.Location = new System.Drawing.Point(X, Y - ALTURA_TB);

                X += AnchoPalabra;

                this.Controls.Add(tbPalabra);
                this.Controls.Add(lblPalabra);
            }
        }
Esempio n. 4
0
        public void ActivarVentana(int Numero)
        {
            sVentana v = mVentanasActivas.Find(x => x.Numero == Numero);

            if (v.Titulo != "")
            {
                ProcesamientoComandos.ActivarVentana(v.hWnd);
            }
            //SetForegroundWindow (v.hWnd);
        }
Esempio n. 5
0
        public string Corregir(string frase, ProcesamientoComandos pc)
        {
            palabras         = frase.Split(' ');
            palabrasCancelar = (string[])palabras.Clone();
            palabrasEntrada  = (string[])palabras.Clone();

            DibujarControles(frase, pc);

            this.Location = new Point(0, 0);
            this.Show();
            ProcesamientoComandos.SiempreEncima((int)this.Handle);
            Interaction.AppActivate("Corrección Xulia");
            return(frase);
        }
Esempio n. 6
0
 private void frmEstado_MouseDown(object sender, MouseEventArgs e)
 {
     if ((e.Location.X > 10) && (e.Location.X < 40) && (e.Location.Y > 10) && (e.Location.Y < 40))
     {
         ControlVoz.DesactivarXulia();
     }
     else
     {
         ProcesamientoComandos.SiempreEncima((int)frmXulia.Handle);
         frmXulia.Visible = true;
         frmXulia.Refresh();
         ProcesamientoComandos.SetForegroundWindow((IntPtr)frmXulia.Handle);
         frmXulia.Visible = true;
     }
 }
Esempio n. 7
0
 public void Buscar(string pregunta, ProcesamientoComandos pc, int x, int y, ProcesamientoComandos.Preguntas Pregunta)
 {
     m_Pregunta = Pregunta;
     if (Pregunta == ProcesamientoComandos.Preguntas.QueEs)
     {
         m_pc                 = pc;
         this.Visible         = true;
         tbDireccionWeb.Text  = "https://www.google.es/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=que%20es%20" + pregunta.Replace(" ", "%20");
         DocumentoCompleto    = false;
         this.Location        = new Point(x, y - this.Height);
         picXulia.Visible     = true;
         rtbRespuesta.Visible = false;
         rtbRespuesta.Refresh();
         picXulia.Refresh();
         CargarBusquedaTexto();
         if (BuscandoInformacion != "")
         {
             m_pc.Hablar(BuscandoInformacion);
         }
         webBrowser1.Navigate(tbDireccionWeb.Text);
     }
     else if (Pregunta == ProcesamientoComandos.Preguntas.QuienEs)
     {
         m_pc                = pc;
         this.Visible        = true;
         tbDireccionWeb.Text = "https://www.google.es/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=quien+es+" + pregunta.Replace(" ", "+");
         DocumentoCompleto   = false;
         this.Location       = new Point(x, y - this.Height);
         picXulia.Visible    = true;
         picXulia.Refresh();
         CargarBusquedaTexto();
         webBrowser1.Navigate(tbDireccionWeb.Text);
     }
     else if (Pregunta == ProcesamientoComandos.Preguntas.QueTiempoHace)
     {
         m_pc                = pc;
         this.Visible        = true;
         tbDireccionWeb.Text = "https://www.google.es/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=que+tiempo+hace+en+" + pregunta.Replace(" ", "+");
         DocumentoCompleto   = false;
         this.Location       = new Point(x, y - this.Height);
         picXulia.Visible    = true;
         picXulia.Refresh();
         CargarBusquedaTexto();
         webBrowser1.Navigate(tbDireccionWeb.Text);
     }
 }
Esempio n. 8
0
 public void MostrarAyuda(ProcesamientoComandos pcom)
 {
     pc = pcom;
     lstGramaticas.Items.Clear();
     lstGramaticasDesactivas.Items.Clear();
     foreach (string g in pc.BuscarNombresGramaticas(true))
     {
         lstGramaticas.Items.Add(g);
     }
     foreach (string g in pc.BuscarNombresGramaticas(false))
     {
         lstGramaticasDesactivas.Items.Add(g);
     }
     Visible = true;
     this.Focus();
     lstGramaticas.Focus();
     lstGramaticas.SelectedIndex = 0;
     ProcesamientoComandos.SiempreEncima((int)this.Handle);
 }
Esempio n. 9
0
 public void EnlaceFormXulia(aimlForm frm, ProcesamientoComandos pc)
 {
     frmXulia   = frm;
     ControlVoz = pc;
 }