Imports DbUtilidades.MyDbOperacionesComunes
Imports Marcador.Marcador
Imports s2c_Interprete
Public Class frmDev
Dim db As New OleDbAMBC(My.Resources.CnnStr)
Dim Sty As New Estilo(Color.Black, Color.Blue, "Courier New", 11)
Dim WithEvents Marc As New s2c_Marcador(Sty)
Dim ArchivoAbierto As String
Dim WithEvents _Inter As New Seu2Cpp.Interprete_s2c
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Marc.AsignarControl(Me.RTB)
Marc.MarcarTodo()
'Me.MdiParent = frmMain
End Sub
Private Sub marc_MarcErr(ByVal Mensaje As String) Handles marc.MarcErr
MsgBox(Mensaje & vbCrLf _
& "Se deshabilitará el marcado del texto!", MsgBoxStyle.Critical)
End Sub
Public Sub Abrir_Archivo(ByVal Path As String)
Dim Lector As String, Porciones() As String
Marc.AsignarControl(Me.RTB)
Try
Porciones = Split(Path, "\")
ArchivoAbierto = Porciones(UBound(Porciones))
Lector = My.Computer.FileSystem.ReadAllText(Path)
Me.Text = "s2c IDE - [" & ArchivoAbierto & "]" '** nombre de archivo abierto
RTB.Text = Lector
Marc.MarcarTodo()
Catch ex As Exception
Marc.DesMarcarTodo()
MsgBox(ex.Message, MsgBoxStyle.Critical)
End Try
End Sub
Private Sub RTB_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles RTB.KeyDown
lblLineaActual.Text = "Linea: " & Marc.Get_Linea_Actual
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim tit As String, Texto As String
Texto = RTB.Text.ToString
tit = Me.Text
Me.Text = "[Compilando]"
_Inter.Correr(Texto)
Me.Text = tit
End Sub
Private Sub _Inter_Interprete_Err(ByVal Mensaje As String) Handles _Inter.Interprete_Err
MsgBox(Mensaje, MsgBoxStyle.Critical)
End Sub
Private Sub RTB_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles RTB.MouseDown
lblLineaActual.Text = "Linea: " & Marc.Get_Linea_Actual
End Sub
Private Sub RTB_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RTB.TextChanged
End Sub
End Class