From 12e3d8ecebe1b21aa00becb88b3550ade3360078 Mon Sep 17 00:00:00 2001 From: Mauricio Parra Casado Date: Fri, 22 Jul 2016 18:55:44 -0300 Subject: [PATCH] Pantalla ABM Ingresos --- SireCu/Ingresos/ABMIngresos.Designer.vb | 53 +++++++++++ SireCu/Ingresos/ABMIngresos.resx | 120 ++++++++++++++++++++++++ SireCu/Ingresos/ABMIngresos.vb | 3 + SireCu/Principal.Designer.vb | 26 +++++ SireCu/Principal.vb | 36 +++++++ SireCu/SireCu.vbproj | 10 +- 6 files changed, 247 insertions(+), 1 deletion(-) create mode 100644 SireCu/Ingresos/ABMIngresos.Designer.vb create mode 100644 SireCu/Ingresos/ABMIngresos.resx create mode 100644 SireCu/Ingresos/ABMIngresos.vb diff --git a/SireCu/Ingresos/ABMIngresos.Designer.vb b/SireCu/Ingresos/ABMIngresos.Designer.vb new file mode 100644 index 0000000..990eda6 --- /dev/null +++ b/SireCu/Ingresos/ABMIngresos.Designer.vb @@ -0,0 +1,53 @@ + _ +Partial Class ABMIngresos + Inherits System.Windows.Forms.UserControl + + 'UserControl reemplaza a Dispose para limpiar la lista de componentes. + _ + Protected Overrides Sub Dispose(ByVal disposing As Boolean) + Try + If disposing AndAlso components IsNot Nothing Then + components.Dispose() + End If + Finally + MyBase.Dispose(disposing) + End Try + End Sub + + 'Requerido por el Diseñador de Windows Forms + Private components As System.ComponentModel.IContainer + + 'NOTA: el Diseñador de Windows Forms necesita el siguiente procedimiento + 'Se puede modificar usando el Diseñador de Windows Forms. + 'No lo modifique con el editor de código. + _ + Private Sub InitializeComponent() + Me.LabelTitulo = New System.Windows.Forms.Label() + Me.SuspendLayout() + ' + 'LabelTitulo + ' + Me.LabelTitulo.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _ + Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.LabelTitulo.AutoSize = True + Me.LabelTitulo.Font = New System.Drawing.Font("Microsoft Sans Serif", 15.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.LabelTitulo.Location = New System.Drawing.Point(218, 12) + Me.LabelTitulo.Name = "LabelTitulo" + Me.LabelTitulo.Size = New System.Drawing.Size(102, 25) + Me.LabelTitulo.TabIndex = 0 + Me.LabelTitulo.Text = "Ingresos" + ' + 'ABMIngresos + ' + Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) + Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font + Me.Controls.Add(Me.LabelTitulo) + Me.Name = "ABMIngresos" + Me.Size = New System.Drawing.Size(583, 365) + Me.ResumeLayout(False) + Me.PerformLayout() + + End Sub + Friend WithEvents LabelTitulo As System.Windows.Forms.Label + +End Class diff --git a/SireCu/Ingresos/ABMIngresos.resx b/SireCu/Ingresos/ABMIngresos.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/SireCu/Ingresos/ABMIngresos.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/SireCu/Ingresos/ABMIngresos.vb b/SireCu/Ingresos/ABMIngresos.vb new file mode 100644 index 0000000..082596a --- /dev/null +++ b/SireCu/Ingresos/ABMIngresos.vb @@ -0,0 +1,3 @@ +Public Class ABMIngresos + +End Class diff --git a/SireCu/Principal.Designer.vb b/SireCu/Principal.Designer.vb index 0272d66..def3c67 100644 --- a/SireCu/Principal.Designer.vb +++ b/SireCu/Principal.Designer.vb @@ -28,12 +28,14 @@ Partial Class Principal Me.SplitContainerPrincipal = New System.Windows.Forms.SplitContainer() Me.ArchivoToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() Me.SalirToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() + Me.RadioButtonIngresos = New System.Windows.Forms.RadioButton() Me.ToolStripContainerPrincipal.BottomToolStripPanel.SuspendLayout() Me.ToolStripContainerPrincipal.ContentPanel.SuspendLayout() Me.ToolStripContainerPrincipal.TopToolStripPanel.SuspendLayout() Me.ToolStripContainerPrincipal.SuspendLayout() Me.MenuStripPrincipal.SuspendLayout() CType(Me.SplitContainerPrincipal, System.ComponentModel.ISupportInitialize).BeginInit() + Me.SplitContainerPrincipal.Panel1.SuspendLayout() Me.SplitContainerPrincipal.SuspendLayout() Me.SuspendLayout() ' @@ -88,6 +90,10 @@ Partial Class Principal Me.SplitContainerPrincipal.IsSplitterFixed = True Me.SplitContainerPrincipal.Location = New System.Drawing.Point(0, 0) Me.SplitContainerPrincipal.Name = "SplitContainerPrincipal" + ' + 'SplitContainerPrincipal.Panel1 + ' + Me.SplitContainerPrincipal.Panel1.Controls.Add(Me.RadioButtonIngresos) Me.SplitContainerPrincipal.Size = New System.Drawing.Size(784, 365) Me.SplitContainerPrincipal.SplitterDistance = 200 Me.SplitContainerPrincipal.SplitterWidth = 1 @@ -106,6 +112,23 @@ Partial Class Principal Me.SalirToolStripMenuItem.Size = New System.Drawing.Size(152, 22) Me.SalirToolStripMenuItem.Text = "&Salir" ' + 'RadioButtonIngresos + ' + Me.RadioButtonIngresos.Appearance = System.Windows.Forms.Appearance.Button + Me.RadioButtonIngresos.AutoSize = True + Me.RadioButtonIngresos.Checked = True + Me.RadioButtonIngresos.FlatStyle = System.Windows.Forms.FlatStyle.Flat + Me.RadioButtonIngresos.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.RadioButtonIngresos.Location = New System.Drawing.Point(3, 3) + Me.RadioButtonIngresos.MinimumSize = New System.Drawing.Size(190, 30) + Me.RadioButtonIngresos.Name = "RadioButtonIngresos" + Me.RadioButtonIngresos.Size = New System.Drawing.Size(190, 30) + Me.RadioButtonIngresos.TabIndex = 0 + Me.RadioButtonIngresos.TabStop = True + Me.RadioButtonIngresos.Text = "Ingresos" + Me.RadioButtonIngresos.TextAlign = System.Drawing.ContentAlignment.MiddleCenter + Me.RadioButtonIngresos.UseVisualStyleBackColor = True + ' 'Principal ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) @@ -124,6 +147,8 @@ Partial Class Principal Me.ToolStripContainerPrincipal.PerformLayout() Me.MenuStripPrincipal.ResumeLayout(False) Me.MenuStripPrincipal.PerformLayout() + Me.SplitContainerPrincipal.Panel1.ResumeLayout(False) + Me.SplitContainerPrincipal.Panel1.PerformLayout() CType(Me.SplitContainerPrincipal, System.ComponentModel.ISupportInitialize).EndInit() Me.SplitContainerPrincipal.ResumeLayout(False) Me.ResumeLayout(False) @@ -135,5 +160,6 @@ Partial Class Principal Friend WithEvents SplitContainerPrincipal As System.Windows.Forms.SplitContainer Friend WithEvents ArchivoToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem Friend WithEvents SalirToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem + Friend WithEvents RadioButtonIngresos As System.Windows.Forms.RadioButton End Class diff --git a/SireCu/Principal.vb b/SireCu/Principal.vb index 1ead979..ae6f0b7 100644 --- a/SireCu/Principal.vb +++ b/SireCu/Principal.vb @@ -3,4 +3,40 @@ Private Sub SalirToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles SalirToolStripMenuItem.Click Application.Exit() End Sub + + Private Sub AdminPantallas(ByVal pantalla As String) + Dim bandera As Boolean = False + + ' Controla que la pantalla no se encuentre cargada, en dicho caso la hace visible + For Each ctrl As Control In SplitContainerPrincipal.Panel2.Controls + If pantalla = ctrl.Name Then + ctrl.Show() + bandera = True + Else + + ' TO DO ver si es necesario + ctrl.Hide() + End If + Next + + If bandera = False Then + Select Case pantalla + Case "ABMIngresos" + Dim pantallaABMIngresos As ABMIngresos = New ABMIngresos() + pantallaABMIngresos.Dock = DockStyle.Fill + SplitContainerPrincipal.Panel2.Controls.Add(pantallaABMIngresos) + Case 2 + + Case Else + MessageBox.Show("Error del administrador de pantallas") + + End Select + + End If + + End Sub + + Private Sub RadioButtonIngresos_CheckedChanged(sender As Object, e As EventArgs) Handles RadioButtonIngresos.CheckedChanged + AdminPantallas("ABMIngresos") + End Sub End Class diff --git a/SireCu/SireCu.vbproj b/SireCu/SireCu.vbproj index e6f23a9..2d63cd2 100644 --- a/SireCu/SireCu.vbproj +++ b/SireCu/SireCu.vbproj @@ -93,6 +93,12 @@ + + ABMIngresos.vb + + + Form + Form @@ -117,6 +123,9 @@ + + ABMIngresos.vb + VbMyResourcesResXFileCodeGenerator Resources.Designer.vb @@ -158,7 +167,6 @@ -