Menú

Mostrar Mensajes

Esta sección te permite ver todos los mensajes escritos por este usuario. Ten en cuenta que sólo puedes ver los mensajes escritos en zonas a las que tienes acceso en este momento.

Mostrar Mensajes Menú

Mensajes - TrashAmbishion

#601
El Symphony no es un CMS ?

Alguien que pueda comentar sobre ella ??
#602
Amigos tengo una urgencia, la App que estoy trabajando corre sin problema alguno desde el VS2010 lo que hace es comunicarse por el SerialPort con un Celular mandando comandos AT y recibiendo respuestas.

Ahora cuando ejecuto el .EXE no me da la respuesta del Cell nada mas me muestra el comando que envio con la respuesta inicial OK pero no me llegan los otros datos y les digo que desde el VS2010 si llegan que puede estar pasando les pongo el codigo.

Código (vbnet) [Seleccionar]


Imports System.Text

Public Class MainForm

    ' Declare necessary class variables.
    Private CommPort As New RS232()
    Private IsModemFound As Boolean = False
    Private ModemPort As Integer = 0

    ' This subroutine clears the TextBox.
    Private Sub ClearButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ClearButton.Click
        Me.StatusTextbox.Clear()
    End Sub

    ' This subroutine sends a user specified command to the modem, and records its
    '   response. It depends on the timer to do the reading of the response.
    Private Sub SendUserCommandButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SendUserCommandButton.Click

        ' Always wrap up working with Comm Ports in exception handlers.
        Try
            ' Enable the timer.
            'If Not Me.tmrReadCommPort.Enabled Then
            Me.tmrReadCommPort.Enabled = True
            'End If
            'If Not CommPort.IsOpen Then
            ' Attempt to open the port.
            CommPort.Open(8, 115200, 8, RS232.DataParity.Parity_None, RS232.DataStopBit.StopBit_1, 4096)
            'End If
            'Write an user specified Command to the Port.
            CommPort.Write(Encoding.ASCII.GetBytes(Me.UserCommandTextbox.Text & Chr(13)))
            ' Sleep long enough for the modem to respond and the timer to fire.
            System.Threading.Thread.Sleep(200)
            Application.DoEvents()
            CommPort.Close()

        Catch ex As Exception
            ' Warn the user.
            MessageBox.Show("Unable to communicate with Modem")
        Finally
            ' Disable the timer.
            Me.tmrReadCommPort.Enabled = False
        End Try

    End Sub

    ' This subroutine is fired when the timer event is raised. It writes whatever
    '   is in the Comm Port buffer to the output window.
    Private Sub tmrReadCommPort_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tmrReadCommPort.Tick
        Try
            ' As long as there is information, read one byte at a time and
            '   output it.
            While (CommPort.Read(1) <> -1)
                ' Write the output to the screen.
                WriteMessage(Chr(CommPort.InputStream(0)), False)
            End While
        Catch exc As Exception
            ' An exception is raised when there is no information to read.
            '   Don't do anything here, just let the exception go.
        End Try

    End Sub

    ' This subroutine writes a message to the txtStatus TextBox.
    Private Sub WriteMessage(ByVal message As String)
        Me.StatusTextbox.Text += message + vbCrLf
    End Sub

    ' This subroutine writes a message to the txtStatus TextBox and allows
    '   the line feed to be suppressed.
    Private Sub WriteMessage(ByVal message As String, ByVal linefeed As Boolean)
        Me.StatusTextbox.Text += message
        If linefeed Then
            Me.StatusTextbox.Text += vbCrLf
        End If
    End Sub

    Private Sub ExitToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ExitToolStripMenuItem.Click
        CommPort.Close()
        End
    End Sub

    Private Sub MainForm_FormClosing(sender As Object, e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
        CommPort.Close()
    End Sub

#603
Holas chicos estuve mirando esta web http://www.developershome.com/sms/howToSendSMSFromPC.asp sobre como enviar sms a traves del celular usando el hyperterminal y lo logro porque me descuenta del saldo pero no llegan al remitente alguna idea de que puede estar pasando...

Y bueno si alguien tuviese algun ejemplo que lo haya probado para enviar y recibir sms a traves del celular desde la pc estaria agradecido..

Salu2
#604
Amigos diganme si esto puede ser real

http://www.taringa.net/posts/info/11971640/Como-calibrar-una-bateria-para-que-me-dure-mas.html

En caso de que sea asi tengo una dudas cuando se refiere a que se encienda el LED VERDE quiere decir a que avise que esta cargada completamente la bateria.

Y esto otro ( Desconectar del cargador y apagar el móvil (ojo teniendo desconectado el fastboot), poner a cargar otra vez hasta que se ponga verde el led. )

No entiendo lo que marque en negrita y cursiva, si alguien me lo pudiese explicar.

Salu2
#605
Pues que tal eres un salvaje tremendo aporte..

Alguien ha probado la ultima version ??

Alguna posibilidad de que funcione en 32bits ?

SAlu2
#606
.NET (C#, VB.NET, ASP) / DevExpress ?
2 Marzo 2013, 17:21 PM
Amigos quisiera saber si alguien tiene documentacion o videos en español donde pueda adquirir una base sobre este excelente componente..

Por ejemplo como emplear los skins..

Se que hay videos ya los estoy bajando y viendo pero ese del uso del skin se me hace complicado...

Gracias.
#607
Gracias man lo tendre en cuenta..

A proposito necesito que me regales algunas tecnicas para mejorar el look de mis App..

Gracias nuevamente...
#608
Yo habia pensado en algo como eso pero no seria facil de detectar por algun usuario con conocimientos avanzados, montarle un sniffer de registro o documentos abiertos ??


Salu2 y gracias
#609
Holas chicos pues veran yo tengo un timer que pasada las 2 horas si mi programa no se ha conectado a internet pues necesito que se bloquee y que aunque se abra y cierre no funcione, ideas...

Gracias de antemano
#610
Holas de nuevo chicos pues miren los avances y con ellos nuevas frustaciones, leyendo sobre como subir archivos encontre que el code anterior no se aplica hay que hacerle algunas correciones por lo que pongo mis modificaciones..

Código (vbnet) [Seleccionar]


    Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
        'UploadLocalFile()
        Dim CookieJar As New CookieContainer
        Dim Url As String = "http://lok.myvnc.com/insertar-anuncio.html?isDBMode=1"
        Dim parametros As New NameValueCollection()

        ' Create the data we want to send
        parametros.Add("var1", "1235")
        parametros.Add("var2", "524")
        parametros.Add("var3", "Mas información para mandar")
        parametros.Add("var4", "Mas informacion para mandar")
        parametros.Add("var5", "jdueybd@gjhf.com")
        parametros.Add("var6", "123456")
        parametros.Add("var7", "654321")
        parametros.Add("var8", "Pepin")

        Uploaddata(CookieJar, Url, "C:\corazon.jpeg", "ad_picture_a", "image,jpeg", parametros)
    End Sub

'Funcion que manda la información

Public Function Uploaddata(ByVal containa As CookieContainer, ByVal uri As String, ByVal filePath As String, ByVal fileParameterName As String, ByVal contentType As String, ByVal otherParameters As Specialized.NameValueCollection) As String

        Dim boundary As String = "---------------------------" & DateTime.Now.Ticks.ToString("x")
        Dim newLine As String = System.Environment.NewLine
        Dim boundaryBytes As Byte() = System.Text.Encoding.ASCII.GetBytes(newLine & "--" & boundary & newLine)
        Dim request As Net.HttpWebRequest = Net.WebRequest.Create(Uri)

        request.ContentType = "multipart/form-data; boundary=" & boundary
        request.Method = "POST"
        request.Referer = "http://lok.myvnc.com/vivienda/casa-en-la-playa/insertar-anuncio.html"
        request.Headers.Add("Accept-Encoding", "gzip, deflate")
        request.Accept = "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"
        request.UserAgent = "Mozilla/5.0 (Windows NT 5.1; rv:16.0) Gecko/20100101 Firefox/16.0"
        request.CookieContainer = containa
        request.AllowAutoRedirect = True
        request.Timeout = -1
        request.KeepAlive = True
        request.AllowWriteStreamBuffering = False

        Dim ms As New MemoryStream()
        Dim formDataTemplate As String = "Content-Disposition: form-data; name=""{0}""{1}{1}{2}"

        For Each key As String In otherParameters.Keys
            ms.Write(boundaryBytes, 0, boundaryBytes.Length)
            Dim formItem As String = String.Format(formDataTemplate, key, newLine, otherParameters(key))
            Dim formItemBytes As Byte() = System.Text.Encoding.UTF8.GetBytes(formItem)
            ms.Write(formItemBytes, 0, formItemBytes.Length)
        Next key

        ms.Write(boundaryBytes, 0, boundaryBytes.Length)

        Dim headerTemplate As String = "Content-Disposition: form-data; name=""{0}""; filename=""{1}""{2}Content-Type: {3}{2}{2}"
        Dim header As String = String.Format(headerTemplate, fileParameterName, filePath, newLine, contentType)
        Dim headerBytes As Byte() = System.Text.Encoding.UTF8.GetBytes(header)
        ms.Write(headerBytes, 0, headerBytes.Length)

        Dim length As Long = ms.Length
        length += New FileInfo(filePath).Length
        request.ContentLength = length

        Using requestStream As IO.Stream = request.GetRequestStream()
            Dim bheader() As Byte = ms.ToArray()
            requestStream.Write(bheader, 0, bheader.Length)
            Using fileStream As New IO.FileStream(filePath, IO.FileMode.Open, IO.FileAccess.Read)

                Dim buffer(4096) As Byte
                Dim bytesRead As Int32 = fileStream.Read(buffer, 0, buffer.Length)

                Do While (bytesRead > 0)
                    requestStream.Write(buffer, 0, bytesRead)
                    bytesRead = fileStream.Read(buffer, 0, buffer.Length)
                Loop
            End Using
            requestStream.Close()
        End Using

        Dim response As Net.WebResponse = Nothing
        Dim responseText = ""

        Try

            response = request.GetResponse()

            Using responseStream As IO.Stream = response.GetResponseStream()

                Using responseReader As New IO.StreamReader(responseStream)

                    responseText = responseReader.ReadToEnd()

                End Using

            End Using

        Catch exception As Net.WebException

            MsgBox(exception.Message)

        Finally

            response.Close()
            response = Nothing
            request = Nothing
        End Try

        Return responseText

    End Function

End Class




Bueno el codigo funciona perfecto cuando abro la pagina para ver si lo que publico todo bien menos la maldita imagen que no se porque no la sube.. ahora busque un Sniffer HTTP para ver a nivel de protoclo que sucede y hay varias cosas que note esto:

Ejemplo de publicacion con el Firefox:

-----------------------------265001916915724
Content-Disposition: form-data; name="ad_picture_a"; filename="corazon.jpg"
Content-Type: image/jpeg

'Aqui va todo el archivo en codificado lenguaje maquina al server
-----------------------------265001916915724

Y otros parametros que se envian pero que el Form no me pide ningun dato de ellos, sera eso lo que esta sucediendo?.. Me parece tambien que el modo de codificacion del archivo no es el mismo que el del Mozilla lo digo porque vi ambos ejemplos y no se parecen en nada,  tambien quisiera saber si es obligatorio el orden en el que se mandan yo creo que no pero bueno... ahora algo que quiero dejar claro, el Form los datos que me exige son los que paso en el codigo quiero decir que si no pongo alguno de esos al dar click en el boton de enviar me vuelve a cargar la pagina señalandome los campos obligatorios, supongo entonces que si se publica entonces esos parametros que se envian junto con el form no son el problema en si...