Imports System.Windows.Forms

Public Class frmPrincipal
    Private _MenuMini As Boolean = False

    Private Sub ShowNewForm(ByVal sender As Object, ByVal e As EventArgs) Handles NewToolStripButton.Click
        ' Cree una nueva instancia del formulario secundario.
        Dim ChildForm As New System.Windows.Forms.Form
        ' Conviértalo en un elemento secundario de este formulario MDI antes de mostrarlo.




        m_ChildFormNumber += 1
        ChildForm.Text = "Ventana " & m_ChildFormNumber

        ChildForm.Show()
    End Sub

    Private Sub OpenFile(ByVal sender As Object, ByVal e As EventArgs) Handles OpenToolStripButton.Click
        Dim OpenFileDialog As New OpenFileDialog
        OpenFileDialog.InitialDirectory = My.Computer.FileSystem.SpecialDirectories.MyDocuments
        OpenFileDialog.Filter = "Archivos de texto (*.txt)|*.txt|Todos los archivos (*.*)|*.*"
        If (OpenFileDialog.ShowDialog(Me) = System.Windows.Forms.DialogResult.OK) Then
            Dim FileName As String = OpenFileDialog.FileName
            ' TODO: agregue código aquí para abrir el archivo.
        End If
    End Sub

    Private Sub SaveAsToolStripMenuItem_Click(ByVal sender As Object, ByVal e As EventArgs)
        Dim SaveFileDialog As New SaveFileDialog
        SaveFileDialog.InitialDirectory = My.Computer.FileSystem.SpecialDirectories.MyDocuments
        SaveFileDialog.Filter = "Archivos de texto (*.txt)|*.txt|Todos los archivos (*.*)|*.*"

        If (SaveFileDialog.ShowDialog(Me) = System.Windows.Forms.DialogResult.OK) Then
            Dim FileName As String = SaveFileDialog.FileName
            ' TODO: agregue código aquí para guardar el contenido actual del formulario en un archivo.
        End If
    End Sub


    Private Sub ExitToolsStripMenuItem_Click(ByVal sender As Object, ByVal e As EventArgs)
        Me.Close()
    End Sub

    Private Sub CutToolStripMenuItem_Click(ByVal sender As Object, ByVal e As EventArgs)
        ' Utilice My.Computer.Clipboard para insertar el texto o las imágenes seleccionadas en el Portapapeles
    End Sub

    Private Sub CopyToolStripMenuItem_Click(ByVal sender As Object, ByVal e As EventArgs)
        ' Utilice My.Computer.Clipboard para insertar el texto o las imágenes seleccionadas en el Portapapeles
    End Sub

    Private Sub PasteToolStripMenuItem_Click(ByVal sender As Object, ByVal e As EventArgs)
        'Utilice My.Computer.Clipboard.GetText() o My.Computer.Clipboard.GetData para recuperar la información del Portapapeles.
    End Sub

    Private Sub ToolBarToolStripMenuItem_Click(ByVal sender As Object, ByVal e As EventArgs)
        'Me.ToolStrip.Visible = Me.ToolBarToolStripMenuItem.Checked
    End Sub

    Private Sub StatusBarToolStripMenuItem_Click(ByVal sender As Object, ByVal e As EventArgs)
        'Me.StatusStrip.Visible = Me.StatusBarToolStripMenuItem.Checked
    End Sub

    Private Sub CascadeToolStripMenuItem_Click(ByVal sender As Object, ByVal e As EventArgs)
        Me.LayoutMdi(MdiLayout.Cascade)
    End Sub

    Private Sub TileVerticalToolStripMenuItem_Click(ByVal sender As Object, ByVal e As EventArgs)
        Me.LayoutMdi(MdiLayout.TileVertical)
    End Sub

    Private Sub TileHorizontalToolStripMenuItem_Click(ByVal sender As Object, ByVal e As EventArgs)
        Me.LayoutMdi(MdiLayout.TileHorizontal)
    End Sub

    Private Sub ArrangeIconsToolStripMenuItem_Click(ByVal sender As Object, ByVal e As EventArgs)
        Me.LayoutMdi(MdiLayout.ArrangeIcons)
    End Sub

    Private Sub CloseAllToolStripMenuItem_Click(ByVal sender As Object, ByVal e As EventArgs)
        ' Cierre todos los formularios secundarios del principal.
        For Each ChildForm As Form In Me.MdiChildren
            ChildForm.Close()
        Next
    End Sub

    Private m_ChildFormNumber As Integer



    Private Sub frmPrincipal_Load(sender As Object, e As EventArgs) Handles MyBase.Load

        Me.ToolStrip.Visible = False

        Me.mnuPrincipal.Renderer = New MenuPrincipalRender()


    End Sub

    Private Sub btnInicio_Click(sender As Object, e As EventArgs)
        inicio()
    End Sub
    Private Sub inicio()




        frmPortafolio.WindowState = FormWindowState.Normal
        frmPortafolio.Dock = DockStyle.Fill
        frmPortafolio.Show()
        Me.Focus()
    End Sub

    Private Sub btnInverntario_Click(sender As Object, e As EventArgs)

        frmINV.WindowState = FormWindowState.Normal
        frmINV.ShowDialog()
        Me.Focus()
    End Sub

    Private Sub btnDisponibilidades_Click(sender As Object, e As EventArgs)

        frmDISP.WindowState = FormWindowState.Normal
        frmDISP.Show()
        Me.Focus()
    End Sub

    Private Sub Button2_Click(sender As Object, e As EventArgs)
        frmINV.ShowDialog()

    End Sub

    Private Sub mnuInicio_Click(sender As Object, e As EventArgs) Handles mnuInicio.Click
        frmPrincipalInicio.ShowDialog()
    End Sub

    Private Sub mnuPropuestas_Click(sender As Object, e As EventArgs) Handles mnuPropuestas.Click





        frmProgreso.Show()

        frmPIN.WindowState = FormWindowState.Normal
        frmPIN.ShowDialog()
        Me.Focus()

    End Sub

    Private Sub mnuInversiones_Click(sender As Object, e As EventArgs) Handles mnuInversiones.Click
        frmProgreso.Show()

        frmINV.WindowState = FormWindowState.Normal
        frmINV.ShowDialog()
        Me.Focus()
    End Sub

    Private Sub mnuDisponibilidades_Click(sender As Object, e As EventArgs) Handles mnuDisponibilidades.Click


        frmDISP.WindowState = FormWindowState.Normal
        frmDISP.Show()
        Me.Focus()
    End Sub

    Private Sub mnuPrincipal_ItemClicked(sender As Object, e As ToolStripItemClickedEventArgs)

    End Sub

    Private Sub mnuPrincipal_ItemClicked_1(sender As Object, e As ToolStripItemClickedEventArgs) Handles mnuPrincipal.ItemClicked

    End Sub

    Private Sub mnuCalificadoras_Click(sender As Object, e As EventArgs) Handles mnuCalificadoras.Click



        frmCalificadoras.WindowState = FormWindowState.Normal
        frmCalificadoras.Show()

    End Sub

    Private Sub mnuEmisores_Click(sender As Object, e As EventArgs) Handles mnuEmisores.Click



        frmEmisores.WindowState = FormWindowState.Normal
        frmEmisores.Show()

    End Sub

    Private Sub mnuEmpresas_Click(sender As Object, e As EventArgs) Handles mnuEmpresas.Click

        frmEmpresas.WindowState = FormWindowState.Normal
        frmEmpresas.Show()

    End Sub

    Private Sub mnuInstrumentos_Click(sender As Object, e As EventArgs) Handles mnuInstrumentos.Click


        frmInstrumentos.WindowState = FormWindowState.Normal
        frmInstrumentos.Show()

    End Sub

    Private Sub mnuIngresosDashboards_Click(sender As Object, e As EventArgs) Handles mnuIngresosDashboards.Click

        frmIngresosDashBoards.WindowState = FormWindowState.Maximized
        frmIngresosDashBoards.Show()

    End Sub

    Private Sub mnuIngresosConsulta_Click(sender As Object, e As EventArgs) Handles mnuIngresosConsulta.Click



        frmIngresosConsulta.WindowState = FormWindowState.Normal
        frmIngresosConsulta.Show()

    End Sub

    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        If _MenuMini Then
            MenuNormal()
        Else
            MenuMini()
        End If
    End Sub
    Private Sub MenuMini()
        Me.PanelMenu.Width = 60
        Me.picLogo.Width = 60
        Me.mnuPrincipal.Width = 60
        Me.lblInversionesTXT.Visible = False

        Dim mnuItems As ToolStripMenuItem
        For Each mnuItems In mnuPrincipal.Items
            mnuItems.Width = 40
            mnuItems.DisplayStyle = ToolStripItemDisplayStyle.Image
        Next
        _MenuMini = True
    End Sub
    Private Sub MenuNormal()
        Me.PanelMenu.Width = 254
        Me.picLogo.Width = 250
        Me.mnuPrincipal.Width = 250
        Me.lblInversionesTXT.Visible = True

        Dim mnuItems As ToolStripMenuItem
        For Each mnuItems In mnuPrincipal.Items
            mnuItems.Width = 250
            mnuItems.DisplayStyle = ToolStripItemDisplayStyle.ImageAndText
        Next
        _MenuMini = False
    End Sub

    Private Sub BancosToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles mnuBancos.Click



        frmBancos.WindowState = FormWindowState.Normal
        frmBancos.Focus()
        Me.Focus()
    End Sub

    Private Sub CuentasBancariasToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles mnuCuentasBancarias.Click

        frmCuentasBancarias.WindowState = FormWindowState.Normal
        frmCuentasBancarias.Focus()
        Me.Focus()
    End Sub

    Private Sub mnuPaises_Click(sender As Object, e As EventArgs) Handles mnuPaises.Click

        frmPaises.WindowState = FormWindowState.Normal
        frmPaises.Focus()
        Me.Focus()

    End Sub

    Private Sub mnuFormasDePago_Click(sender As Object, e As EventArgs) Handles mnuFormasDePago.Click

        frmFormasDePago.WindowState = FormWindowState.Normal
        frmFormasDePago.Focus()
        Me.Focus()
    End Sub

    Private Sub mnuUsuarios_Click(sender As Object, e As EventArgs) Handles mnuUsuarios.Click

        frmUSR0.WindowState = FormWindowState.Normal
        frmUSR0.Focus()
        Me.Focus()
    End Sub

    Private Sub mnuDepartamentos_Click(sender As Object, e As EventArgs) Handles mnuDepartamentos.Click


        frmDEP0.WindowState = FormWindowState.Normal
        frmDEP0.Focus()
        Me.Focus()
    End Sub

    Private Sub mnuTipoCuentaBancaria_Click(sender As Object, e As EventArgs) Handles mnuTipoCuentaBancaria.Click


        frmTipoCuentaBancaria.WindowState = FormWindowState.Normal
        frmTipoCuentaBancaria.Focus()
        Me.Focus()
    End Sub

    Private Sub mnuRendimientos_Click(sender As Object, e As EventArgs) Handles mnuRendimientos.Click
        Dim MenuRendimientos As New frmMenuRendimientos
        MenuRendimientos.Show()
    End Sub












    Private Sub Button2_Click_1(sender As Object, e As EventArgs)

    End Sub

    Private Sub Chart1_Click(sender As Object, e As EventArgs)

    End Sub








    Private Sub ToolStrip_ItemClicked(sender As Object, e As ToolStripItemClickedEventArgs) Handles ToolStrip.ItemClicked

    End Sub








    Private Sub lblEmpresa_MouseHover(sender As Object, e As EventArgs) 

    End Sub

    Private Sub lblEmpresa_MouseLeave(sender As Object, e As EventArgs) 

    End Sub

    Private Sub lblEmpresa_MouseEnter(sender As Object, e As EventArgs) 

    End Sub

    Private Sub pnlEmpresa_MouseEnter(sender As Object, e As EventArgs) 

    End Sub

    Private Sub lblEmpresa_Click(sender As Object, e As EventArgs)

    End Sub

    Private Sub lblInstrumento_Click(sender As Object, e As EventArgs)

    End Sub

    Private Sub lblPais_Click(sender As Object, e As EventArgs)

    End Sub

    Private Sub pnlHijo_Paint(sender As Object, e As PaintEventArgs)

    End Sub

    Private Sub mnuConfiguracion_Click(sender As Object, e As EventArgs) Handles mnuConfiguracion.Click

    End Sub

    Private Sub lblMontoRendimiento_Click(sender As Object, e As EventArgs)

    End Sub

    Private Sub FToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles FToolStripMenuItem.Click
        frmMenuCostos.Show()
    End Sub

    Private Sub ArbitrajeToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles ArbitrajeToolStripMenuItem.Click
        frmColaTitulos.Show()
    End Sub

    Private Sub lblTitulo_Click(sender As Object, e As EventArgs) Handles lblTitulo.Click

    End Sub

    Private Sub pnlPrincipal_Paint(sender As Object, e As PaintEventArgs) Handles pnlPrincipal.Paint

    End Sub
End Class
