|
|
@@ -99,7 +99,7 @@ Public Class frmPrincipal
|
|
|
Private Sub frmPrincipal_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
|
|
|
|
|
Me.ToolStrip.Visible = False
|
|
|
- Listas()
|
|
|
+
|
|
|
Me.mnuPrincipal.Renderer = New MenuPrincipalRender()
|
|
|
''inicio()
|
|
|
|
|
|
@@ -140,7 +140,7 @@ Public Class frmPrincipal
|
|
|
End Sub
|
|
|
|
|
|
Private Sub mnuInicio_Click(sender As Object, e As EventArgs) Handles mnuInicio.Click
|
|
|
- inicio()
|
|
|
+ frmPrincipalInicio.ShowDialog()
|
|
|
End Sub
|
|
|
|
|
|
Private Sub mnuPropuestas_Click(sender As Object, e As EventArgs) Handles mnuPropuestas.Click
|
|
|
@@ -324,123 +324,16 @@ Public Class frmPrincipal
|
|
|
End Sub
|
|
|
|
|
|
|
|
|
- Sub Listas()
|
|
|
- Fuente()
|
|
|
- DefinirTam()
|
|
|
- ListaEmpresas()
|
|
|
- ListaInstrumentos()
|
|
|
- ListaPaises()
|
|
|
- GraficaInstrumentos()
|
|
|
- GraficaMontoInstrumentos()
|
|
|
- GraficaRendimientoInstrumentos()
|
|
|
- RendimientoMonto()
|
|
|
- End Sub
|
|
|
-
|
|
|
- Sub Fuente()
|
|
|
- lblTitulo.ForeColor = Drawing.Color.FromArgb(15, 151, 208)
|
|
|
- lblRendimiento.ForeColor = Drawing.Color.FromArgb(15, 151, 208)
|
|
|
- lblIngreso.ForeColor = Drawing.Color.FromArgb(15, 151, 208)
|
|
|
- lblPortafolio.ForeColor = Drawing.Color.FromArgb(15, 151, 208)
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- lblMontoIngresos.ForeColor = Drawing.Color.FromArgb(237, 51, 50)
|
|
|
- lblIngresostexto.ForeColor = Drawing.Color.FromArgb(15, 151, 208)
|
|
|
- lblMontoRendimiento.ForeColor = Drawing.Color.FromArgb(237, 51, 50)
|
|
|
- lblRendimientotexto.ForeColor = Drawing.Color.FromArgb(15, 151, 208)
|
|
|
- End Sub
|
|
|
-
|
|
|
- Sub ListaEmpresas()
|
|
|
- Dim General As New DAOGeneral
|
|
|
- Dim Empresas As DataTable = General.ListaEmpresas
|
|
|
- For Each row As DataRow In Empresas.Rows
|
|
|
- Dim Boton As New Button
|
|
|
- Boton.Text = CStr(row("Descripcion"))
|
|
|
- Boton.Name = CStr(row("Codigo"))
|
|
|
- Boton.Width = flpEmpresas.Width - 20
|
|
|
- 'Boton.FlatStyle = FlatStyle.Flat
|
|
|
- Boton.ForeColor = Drawing.Color.FromArgb(40, 47, 59)
|
|
|
- Boton.BackColor = Drawing.Color.FromArgb(15, 151, 208)
|
|
|
- Boton.Height = 30
|
|
|
- Boton.TextAlign = ContentAlignment.MiddleLeft
|
|
|
- Boton.Font = New Font(Boton.Font.Name, 10)
|
|
|
- Boton.Margin = New Padding(0)
|
|
|
- flpEmpresas.Controls.Add(Boton)
|
|
|
- Next
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- End Sub
|
|
|
-
|
|
|
- Sub ListaInstrumentos()
|
|
|
- Dim General As New DAOGeneral
|
|
|
- Dim Instrumentos As DataTable = General.ListaInstrumentos
|
|
|
- For Each row As DataRow In Instrumentos.Rows
|
|
|
- Dim Boton As New Button
|
|
|
- Boton.Text = CStr(row("Descripcion"))
|
|
|
- Boton.Name = CStr(row("Codigo"))
|
|
|
- Boton.Width = flpEmpresas.Width - 20
|
|
|
- 'Boton.FlatStyle = FlatStyle.Flat
|
|
|
- Boton.ForeColor = Drawing.Color.FromArgb(40, 47, 59)
|
|
|
- Boton.BackColor = Drawing.Color.FromArgb(15, 151, 208)
|
|
|
- Boton.Height = 30
|
|
|
- Boton.TextAlign = ContentAlignment.MiddleLeft
|
|
|
- Boton.Font = New Font(Boton.Font.Name, 10)
|
|
|
- Boton.Margin = New Padding(0)
|
|
|
- flpInstrumentos.Controls.Add(Boton)
|
|
|
- Next
|
|
|
- End Sub
|
|
|
-
|
|
|
-
|
|
|
- Sub ListaPaises()
|
|
|
- Dim General As New DAOGeneral
|
|
|
- Dim Paises As DataTable = General.ListaPaisesRelevanteInversion
|
|
|
- For Each row As DataRow In Paises.Rows
|
|
|
- Dim Boton As New Button
|
|
|
- Boton.Text = CStr(row("Descripcion"))
|
|
|
- Boton.Name = CStr(row("Codigo"))
|
|
|
- Boton.Width = flpEmpresas.Width - 20
|
|
|
- 'Boton.FlatStyle = FlatStyle.Flat
|
|
|
- Boton.ForeColor = Drawing.Color.FromArgb(40, 47, 59)
|
|
|
- Boton.BackColor = Drawing.Color.FromArgb(15, 151, 208)
|
|
|
- Boton.Height = 30
|
|
|
- Boton.TextAlign = ContentAlignment.MiddleLeft
|
|
|
- Boton.Font = New Font(Boton.Font.Name, 10)
|
|
|
- Boton.Margin = New Padding(0)
|
|
|
- flpPaises.Controls.Add(Boton)
|
|
|
- Next
|
|
|
- End Sub
|
|
|
-
|
|
|
|
|
|
|
|
|
- Sub DefinirTam()
|
|
|
- Dim TamEmpresa As Double = lblEmpresa.Width * 3
|
|
|
|
|
|
|
|
|
- pnlEmpresa.Width = TamEmpresa
|
|
|
- pnlInstrumento.Width = TamEmpresa
|
|
|
- pnlPais.Width = TamEmpresa
|
|
|
|
|
|
|
|
|
- pnlEmpresa.Height = 300
|
|
|
- pnlInstrumento.Height = 300
|
|
|
- pnlPais.Height = 300
|
|
|
|
|
|
- flpEmpresas.Width = TamEmpresa - 5
|
|
|
- flpInstrumentos.Width = TamEmpresa - 5
|
|
|
- flpPaises.Width = TamEmpresa - 5
|
|
|
|
|
|
- flpEmpresas.Height = 295
|
|
|
- flpInstrumentos.Height = 295
|
|
|
- flpPaises.Height = 295
|
|
|
|
|
|
|
|
|
-
|
|
|
- End Sub
|
|
|
-
|
|
|
Private Sub Button2_Click_1(sender As Object, e As EventArgs)
|
|
|
|
|
|
End Sub
|
|
|
@@ -449,186 +342,53 @@ Public Class frmPrincipal
|
|
|
|
|
|
End Sub
|
|
|
|
|
|
- Sub GraficaInstrumentos()
|
|
|
- Dim general As New DAOGeneral
|
|
|
- Dim dt As DataTable = general.InstrumentosGrafica
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- charPastel.Series(0).Points.Clear()
|
|
|
- charPastel.Series(0).IsValueShownAsLabel = False
|
|
|
- charPastel.Series(0).LabelForeColor = Color.Transparent
|
|
|
- 'charPastel.Series(0).LabelAngle = -45
|
|
|
-
|
|
|
- 'charPastel.Series(0).Font = New Font(charPastel.Series(0).Font.Name, 5)
|
|
|
-
|
|
|
- 'charPastel.ChartAreas(0).Area3DStyle.Enable3D = True
|
|
|
-
|
|
|
- charPastel.Series(0).XValueMember = "Instrumento"
|
|
|
- charPastel.Series(0).YValueMembers = "Cantidad"
|
|
|
-
|
|
|
- charPastel.DataSource = dt
|
|
|
- End Sub
|
|
|
-
|
|
|
- Sub GraficaMontoInstrumentos()
|
|
|
- Dim general As New DAOGeneral
|
|
|
|
|
|
- Dim dt As DataTable = general.MontosInstrumentosGrafica
|
|
|
- charbarras.Series(0).Points.Clear()
|
|
|
- 'charbarras.ChartAreas(0).Area3DStyle.Enable3D = True
|
|
|
|
|
|
|
|
|
- charbarras.Series(0).XValueMember = "Instrumento"
|
|
|
- charbarras.Series(0).YValueMembers = "Suma"
|
|
|
- charbarras.DataSource = dt
|
|
|
- End Sub
|
|
|
-
|
|
|
-
|
|
|
- Sub GraficaRendimientoInstrumentos()
|
|
|
- Dim general As New DAOGeneral
|
|
|
-
|
|
|
- Dim dt As DataTable = general.RendimientosInstrumentoGrafica
|
|
|
- charlineal.Series(0).Points.Clear()
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- charlineal.Series(0).XValueMember = "Instrumento"
|
|
|
- charlineal.Series(0).YValueMembers = "Suma"
|
|
|
- charlineal.DataSource = dt
|
|
|
- End Sub
|
|
|
-
|
|
|
|
|
|
|
|
|
|
|
|
- Sub RendimientoMonto()
|
|
|
- Dim general As New DAOGeneral
|
|
|
- Dim Monto As String = "0.00"
|
|
|
- Dim Cantidad As Integer = 0
|
|
|
- Dim Rendimiento As String = "0.00 "
|
|
|
- Dim dt As DataTable = general.RendimientoMontoGraficas
|
|
|
- For Each rows As DataRow In dt.Rows
|
|
|
- If Not String.IsNullOrEmpty(rows("Rendimiento").ToString) Then
|
|
|
- Rendimiento = rows("Rendimiento").ToString
|
|
|
- End If
|
|
|
-
|
|
|
- If Not String.IsNullOrEmpty(rows("Monto").ToString) Then
|
|
|
- Monto = rows("Monto").ToString
|
|
|
- End If
|
|
|
-
|
|
|
- If Not String.IsNullOrEmpty(rows("Cantidad").ToString) Then
|
|
|
- Cantidad = rows("Cantidad")
|
|
|
- End If
|
|
|
- Next
|
|
|
-
|
|
|
- lblMontoIngresos.Text = "$ " + Monto
|
|
|
- If Cantidad = 0 Then
|
|
|
- lblMontoRendimiento.Text = "0 %"
|
|
|
- Else
|
|
|
-
|
|
|
- lblMontoRendimiento.Text = FormatNumber((((CDec(Rendimiento) / Cantidad)) * 100), 6).ToString + " %"
|
|
|
- End If
|
|
|
- End Sub
|
|
|
|
|
|
Private Sub ToolStrip_ItemClicked(sender As Object, e As ToolStripItemClickedEventArgs) Handles ToolStrip.ItemClicked
|
|
|
|
|
|
End Sub
|
|
|
|
|
|
- Sub EventEmpresa()
|
|
|
- If lblEmpresa.ForeColor.Name = Drawing.Color.FromArgb(237, 168, 59).Name Then
|
|
|
- lblEmpresa.ForeColor = Color.WhiteSmoke
|
|
|
- lblInstrumento.ForeColor = Drawing.Color.FromArgb(237, 168, 59)
|
|
|
- lblPais.ForeColor = Drawing.Color.FromArgb(237, 168, 59)
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- pnlEmpresa.Visible = True
|
|
|
- pnlInstrumento.Visible = False
|
|
|
- pnlPais.Visible = False
|
|
|
-
|
|
|
- Else
|
|
|
-
|
|
|
- lblEmpresa.ForeColor = Drawing.Color.FromArgb(237, 168, 59)
|
|
|
- pnlEmpresa.Visible = False
|
|
|
-
|
|
|
- End If
|
|
|
-
|
|
|
- End Sub
|
|
|
-
|
|
|
|
|
|
- Sub EventInstrumento()
|
|
|
- If lblInstrumento.ForeColor.Name = Drawing.Color.FromArgb(237, 168, 59).Name Then
|
|
|
- lblInstrumento.ForeColor = Color.WhiteSmoke
|
|
|
- lblEmpresa.ForeColor = Drawing.Color.FromArgb(237, 168, 59)
|
|
|
- lblPais.ForeColor = Drawing.Color.FromArgb(237, 168, 59)
|
|
|
|
|
|
|
|
|
|
|
|
- pnlInstrumento.Visible = True
|
|
|
- pnlEmpresa.Visible = False
|
|
|
- pnlPais.Visible = False
|
|
|
|
|
|
- Else
|
|
|
|
|
|
- lblInstrumento.ForeColor = Drawing.Color.FromArgb(237, 168, 59)
|
|
|
- pnlInstrumento.Visible = False
|
|
|
|
|
|
- End If
|
|
|
+ Private Sub lblEmpresa_MouseHover(sender As Object, e As EventArgs)
|
|
|
|
|
|
End Sub
|
|
|
|
|
|
-
|
|
|
- Sub EventPais()
|
|
|
- If lblPais.ForeColor.Name = Drawing.Color.FromArgb(237, 168, 59).Name Then
|
|
|
- lblPais.ForeColor = Color.WhiteSmoke
|
|
|
- lblInstrumento.ForeColor = Drawing.Color.FromArgb(237, 168, 59)
|
|
|
- lblEmpresa.ForeColor = Drawing.Color.FromArgb(237, 168, 59)
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- pnlPais.Visible = True
|
|
|
- pnlInstrumento.Visible = False
|
|
|
- pnlEmpresa.Visible = False
|
|
|
-
|
|
|
- Else
|
|
|
-
|
|
|
- lblPais.ForeColor = Drawing.Color.FromArgb(237, 168, 59)
|
|
|
- pnlPais.Visible = False
|
|
|
-
|
|
|
- End If
|
|
|
+ Private Sub lblEmpresa_MouseLeave(sender As Object, e As EventArgs)
|
|
|
|
|
|
End Sub
|
|
|
|
|
|
-
|
|
|
-
|
|
|
- Private Sub lblEmpresa_MouseHover(sender As Object, e As EventArgs) Handles lblEmpresa.MouseHover
|
|
|
+ Private Sub lblEmpresa_MouseEnter(sender As Object, e As EventArgs)
|
|
|
|
|
|
End Sub
|
|
|
|
|
|
- Private Sub lblEmpresa_MouseLeave(sender As Object, e As EventArgs) Handles lblEmpresa.MouseLeave
|
|
|
+ Private Sub pnlEmpresa_MouseEnter(sender As Object, e As EventArgs)
|
|
|
|
|
|
End Sub
|
|
|
|
|
|
- Private Sub lblEmpresa_MouseEnter(sender As Object, e As EventArgs) Handles lblEmpresa.MouseEnter
|
|
|
+ Private Sub lblEmpresa_Click(sender As Object, e As EventArgs)
|
|
|
|
|
|
End Sub
|
|
|
|
|
|
- Private Sub pnlEmpresa_MouseEnter(sender As Object, e As EventArgs) Handles pnlEmpresa.MouseEnter
|
|
|
+ Private Sub lblInstrumento_Click(sender As Object, e As EventArgs)
|
|
|
|
|
|
End Sub
|
|
|
|
|
|
- Private Sub lblEmpresa_Click(sender As Object, e As EventArgs) Handles lblEmpresa.Click
|
|
|
- EventEmpresa()
|
|
|
- End Sub
|
|
|
+ Private Sub lblPais_Click(sender As Object, e As EventArgs)
|
|
|
|
|
|
- Private Sub lblInstrumento_Click(sender As Object, e As EventArgs) Handles lblInstrumento.Click
|
|
|
- EventInstrumento()
|
|
|
End Sub
|
|
|
|
|
|
- Private Sub lblPais_Click(sender As Object, e As EventArgs) Handles lblPais.Click
|
|
|
- EventPais()
|
|
|
- End Sub
|
|
|
-
|
|
|
- Private Sub pnlHijo_Paint(sender As Object, e As PaintEventArgs) Handles pnlHijo.Paint
|
|
|
+ Private Sub pnlHijo_Paint(sender As Object, e As PaintEventArgs)
|
|
|
|
|
|
End Sub
|
|
|
|
|
|
@@ -636,7 +396,7 @@ Public Class frmPrincipal
|
|
|
|
|
|
End Sub
|
|
|
|
|
|
- Private Sub lblMontoRendimiento_Click(sender As Object, e As EventArgs) Handles lblMontoRendimiento.Click
|
|
|
+ Private Sub lblMontoRendimiento_Click(sender As Object, e As EventArgs)
|
|
|
|
|
|
End Sub
|
|
|
|
|
|
@@ -647,4 +407,8 @@ Public Class frmPrincipal
|
|
|
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
|
|
|
End Class
|