CapicuaGenGaspar 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +11 -0
- data/.rspec +2 -0
- data/.travis.yml +4 -0
- data/CODE_OF_CONDUCT.md +49 -0
- data/CapicuaGenGaspar.gemspec +60 -0
- data/Gemfile +4 -0
- data/Gemfile.lock +33 -0
- data/LICENSE +165 -0
- data/README.md +41 -0
- data/Rakefile +6 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/lib/CapicuaGenGaspar/Business/CSSqlEntitityInterface/Source/cs_sql_entity_interface_feature.rb +96 -0
- data/lib/CapicuaGenGaspar/Business/CSSqlEntitityInterface/Template/table_interface.erb +49 -0
- data/lib/CapicuaGenGaspar/Business/CSSqlEntity/Source/cs_sql_entity_feature.rb +103 -0
- data/lib/CapicuaGenGaspar/Business/CSSqlEntity/Template/table_entity.erb +51 -0
- data/lib/CapicuaGenGaspar/CodeTransformer/CSHeaderFooter/Source/cs_header_footer_feature.rb +148 -0
- data/lib/CapicuaGenGaspar/CodeTransformer/CSHeaderFooter/Template/footer.erb +37 -0
- data/lib/CapicuaGenGaspar/CodeTransformer/CSHeaderFooter/Template/header.erb +43 -0
- data/lib/CapicuaGenGaspar/CodeTransformer/CodeMaidCleaner/Bin/EnvDTE.dll +0 -0
- data/lib/CapicuaGenGaspar/CodeTransformer/CodeMaidCleaner/Bin/EnvDTE80.dll +0 -0
- data/lib/CapicuaGenGaspar/CodeTransformer/CodeMaidCleaner/Bin/RunCodeMaidCleaner.exe +0 -0
- data/lib/CapicuaGenGaspar/CodeTransformer/CodeMaidCleaner/Bin/RunCodeMaidCleaner.exe.config +52 -0
- data/lib/CapicuaGenGaspar/CodeTransformer/CodeMaidCleaner/Bin/stdole.dll +0 -0
- data/lib/CapicuaGenGaspar/CodeTransformer/CodeMaidCleaner/Source/code_maid_cleaner_feature.rb +162 -0
- data/lib/CapicuaGenGaspar/DataAccess/CSConnectionProvider/Source/cs_db_connection_provider_feature.rb +90 -0
- data/lib/CapicuaGenGaspar/DataAccess/CSSqlDataAccess/Source/cs_sql_data_access_feature.rb +106 -0
- data/lib/CapicuaGenGaspar/DataAccess/CSSqlDataAccess/Template/data_access.erb +154 -0
- data/lib/CapicuaGenGaspar/DataAccess/CSSqlDataAccess/Template/data_access_exception.erb +36 -0
- data/lib/CapicuaGenGaspar/DataAccess/CSSqlDataAccess/Template/data_access_table.erb +298 -0
- data/lib/CapicuaGenGaspar/Entities/CSEntity/Source/entity_field_schema.rb +100 -0
- data/lib/CapicuaGenGaspar/GUI/CSAboutWindowsForm/Source/cs_about_windows_form_feature.rb +85 -0
- data/lib/CapicuaGenGaspar/GUI/CSAboutWindowsForm/Template/AboutForm.designer.erb +211 -0
- data/lib/CapicuaGenGaspar/GUI/CSAboutWindowsForm/Template/AboutForm.erb +127 -0
- data/lib/CapicuaGenGaspar/GUI/CSAboutWindowsForm/Template/AboutForm.resx.erb +535 -0
- data/lib/CapicuaGenGaspar/GUI/CSCatalogWindowsForm/Source/cs_catalog_windows_form_feature.rb +146 -0
- data/lib/CapicuaGenGaspar/GUI/CSCatalogWindowsForm/Template/CatalogForm.Designer.erb +363 -0
- data/lib/CapicuaGenGaspar/GUI/CSCatalogWindowsForm/Template/CatalogForm.erb +320 -0
- data/lib/CapicuaGenGaspar/GUI/CSCatalogWindowsForm/Template/CatalogForm.resx.erb +2407 -0
- data/lib/CapicuaGenGaspar/GUI/CSCatalogWindowsForm/Template/CatalogState.erb +51 -0
- data/lib/CapicuaGenGaspar/GUI/CSMDIWindowsForm/Source/cs_mdi_windows_form_feature.rb +93 -0
- data/lib/CapicuaGenGaspar/GUI/CSMDIWindowsForm/Template/MainForm.Designer.erb +316 -0
- data/lib/CapicuaGenGaspar/GUI/CSMDIWindowsForm/Template/MainForm.erb +161 -0
- data/lib/CapicuaGenGaspar/GUI/CSMDIWindowsForm/Template/MainForm.resx.erb +2504 -0
- data/lib/CapicuaGenGaspar/GUI/CSMDIWindowsForm/Template/MsgboxConsts.erb +31 -0
- data/lib/CapicuaGenGaspar/GUI/CSSplashWindowsForm/Source/cs_splash_windows_feature.rb +87 -0
- data/lib/CapicuaGenGaspar/GUI/CSSplashWindowsForm/Template/SplashForm.designer.erb +141 -0
- data/lib/CapicuaGenGaspar/GUI/CSSplashWindowsForm/Template/SplashForm.erb +160 -0
- data/lib/CapicuaGenGaspar/GUI/CSSplashWindowsForm/Template/SplashForm.resx.erb +535 -0
- data/lib/CapicuaGenGaspar/Mixins/about_mixin.rb +55 -0
- data/lib/CapicuaGenGaspar/Mixins/catalog_mixin.rb +65 -0
- data/lib/CapicuaGenGaspar/Mixins/cs_app_config_mixin.rb +41 -0
- data/lib/CapicuaGenGaspar/Mixins/cs_db_connection_provider_mixin.rb +67 -0
- data/lib/CapicuaGenGaspar/Mixins/cs_namespace_mixin.rb +53 -0
- data/lib/CapicuaGenGaspar/Mixins/entity_interface_mixin.rb +57 -0
- data/lib/CapicuaGenGaspar/Mixins/entity_mixin.rb +58 -0
- data/lib/CapicuaGenGaspar/Mixins/entity_sql_table_mixin.rb +58 -0
- data/lib/CapicuaGenGaspar/Mixins/main_form_mixin.rb +55 -0
- data/lib/CapicuaGenGaspar/Mixins/splash_mixin.rb +54 -0
- data/lib/CapicuaGenGaspar/Proyect/CSProyect/Source/cs_proyect_feature.rb +140 -0
- data/lib/CapicuaGenGaspar/Proyect/CSProyectRESTFul/Source/cs_proyect_rest_ful_feature.rb +82 -0
- data/lib/CapicuaGenGaspar/Proyect/CSProyectRESTFul/Template/AssemblyInfo.erb +59 -0
- data/lib/CapicuaGenGaspar/Proyect/CSProyectRESTFul/Template/ExcepcionControlada.erb +38 -0
- data/lib/CapicuaGenGaspar/Proyect/CSProyectRESTFul/Template/Proyect.erb +114 -0
- data/lib/CapicuaGenGaspar/Proyect/CSProyectRESTFul/Template/Soluction.erb +54 -0
- data/lib/CapicuaGenGaspar/Proyect/CSProyectRESTFul/Template/Web.erb +66 -0
- data/lib/CapicuaGenGaspar/Proyect/CSProyectWindowsForm/Source/cs_proyect_windows_form_feature.rb +85 -0
- data/lib/CapicuaGenGaspar/Proyect/CSProyectWindowsForm/Template/App.erb +32 -0
- data/lib/CapicuaGenGaspar/Proyect/CSProyectWindowsForm/Template/AssemblyInfo.erb +59 -0
- data/lib/CapicuaGenGaspar/Proyect/CSProyectWindowsForm/Template/ControlExcepciones.erb +49 -0
- data/lib/CapicuaGenGaspar/Proyect/CSProyectWindowsForm/Template/ExcepcionControlada.erb +40 -0
- data/lib/CapicuaGenGaspar/Proyect/CSProyectWindowsForm/Template/Program.erb +46 -0
- data/lib/CapicuaGenGaspar/Proyect/CSProyectWindowsForm/Template/Proyect.erb +138 -0
- data/lib/CapicuaGenGaspar/Proyect/CSProyectWindowsForm/Template/Soluction.erb +55 -0
- data/lib/CapicuaGenGaspar/Tools/message_helper.rb +43 -0
- data/lib/CapicuaGenGaspar/WCFService/CSRESTFulCatalog/Source/cs_rest_ful_catalog_feature.rb +176 -0
- data/lib/CapicuaGenGaspar/WCFService/CSRESTFulCatalog/Template/CatalogState.erb +51 -0
- data/lib/CapicuaGenGaspar/WCFService/CSRESTFulCatalog/Template/Catalogs.erb +58 -0
- data/lib/CapicuaGenGaspar/WCFService/CSRESTFulCatalog/Template/Catalogs.svc.erb +24 -0
- data/lib/CapicuaGenGaspar/WCFService/CSRESTFulCatalog/Template/ICatalogs.erb +58 -0
- data/lib/CapicuaGenGaspar/gaspar.rb +44 -0
- data/lib/CapicuaGenGaspar/version.rb +3 -0
- metadata +216 -0
@@ -0,0 +1,51 @@
|
|
1
|
+
<%
|
2
|
+
#encoding: UTF-8
|
3
|
+
|
4
|
+
=begin
|
5
|
+
|
6
|
+
CapicuaGen
|
7
|
+
|
8
|
+
CapicuaGen es un software que ayuda a la creación automática de
|
9
|
+
sistemas empresariales a través de la definición y ensamblado de
|
10
|
+
diversos generadores de características.
|
11
|
+
|
12
|
+
El proyecto fue iniciado por José Luis Bautista Martin, el 6 de enero
|
13
|
+
del 2016.
|
14
|
+
|
15
|
+
Puede modificar y distribuir este software, según le plazca, y usarlo
|
16
|
+
para cualquier fin ya sea comercial, personal, educativo, o de cualquier
|
17
|
+
índole, siempre y cuando incluya este mensaje, y se permita acceso el
|
18
|
+
código fuente.
|
19
|
+
|
20
|
+
Este software es código libre, y se licencia bajo LGPL.
|
21
|
+
|
22
|
+
Para más información consultar http://www.gnu.org/licenses/lgpl.html
|
23
|
+
=end
|
24
|
+
%>using System;
|
25
|
+
using System.Collections.Generic;
|
26
|
+
using System.Linq;
|
27
|
+
using System.Text;
|
28
|
+
|
29
|
+
namespace <%=generation_attributes[:namespace]%>
|
30
|
+
{
|
31
|
+
/// <summary>
|
32
|
+
/// Representan los posibles estados de un catalago
|
33
|
+
/// </summary>
|
34
|
+
internal enum EstadosCatalogo
|
35
|
+
{
|
36
|
+
/// <summary>
|
37
|
+
/// El catalogo esta en modo vista
|
38
|
+
/// </summary>
|
39
|
+
Vista = 0,
|
40
|
+
|
41
|
+
/// <summary>
|
42
|
+
/// El catalogo este creando un nuevo registro
|
43
|
+
/// </summary>
|
44
|
+
Nuevo = 1,
|
45
|
+
|
46
|
+
/// <summary>
|
47
|
+
/// El catalogo esta en edición
|
48
|
+
/// </summary>
|
49
|
+
Edicion = 2
|
50
|
+
}
|
51
|
+
}
|
@@ -0,0 +1,93 @@
|
|
1
|
+
=begin
|
2
|
+
|
3
|
+
CapicuaGen
|
4
|
+
|
5
|
+
CapicuaGen es un software que ayuda a la creación automática de
|
6
|
+
sistemas empresariales a través de la definición y ensamblado de
|
7
|
+
diversos generadores de características.
|
8
|
+
|
9
|
+
El proyecto fue iniciado por José Luis Bautista Martin, el 6 de enero
|
10
|
+
del 2016.
|
11
|
+
|
12
|
+
Puede modificar y distribuir este software, según le plazca, y usarlo
|
13
|
+
para cualquier fin ya sea comercial, personal, educativo, o de cualquier
|
14
|
+
índole, siempre y cuando incluya este mensaje, y se permita acceso el
|
15
|
+
código fuente.
|
16
|
+
|
17
|
+
Este software es código libre, y se licencia bajo LGPL.
|
18
|
+
|
19
|
+
Para más información consultar http://www.gnu.org/licenses/lgpl.html
|
20
|
+
=end
|
21
|
+
|
22
|
+
require 'active_support/core_ext/object/blank'
|
23
|
+
|
24
|
+
require_relative '../../../Mixins/about_mixin'
|
25
|
+
require_relative '../../../Mixins/catalog_mixin'
|
26
|
+
require_relative '../../../Mixins/cs_namespace_mixin'
|
27
|
+
require_relative '../../../gaspar'
|
28
|
+
|
29
|
+
module CapicuaGen::Gaspar
|
30
|
+
|
31
|
+
# Caracteristica generador de un formulario MDI
|
32
|
+
class CSMDIWindowsFormFeature < CapicuaGen::TemplateFeature
|
33
|
+
include CapicuaGen
|
34
|
+
include CapicuaGen::Gaspar
|
35
|
+
include CapicuaGen::Melchior
|
36
|
+
|
37
|
+
|
38
|
+
public
|
39
|
+
|
40
|
+
# Inicializa la caracteristica
|
41
|
+
def initialize(values= {})
|
42
|
+
super(values)
|
43
|
+
|
44
|
+
# Configuro los tipos si estos no han sido configurados previamente
|
45
|
+
self.types= [:gui, :main_form] if self.types.blank?
|
46
|
+
|
47
|
+
# Configuro los templates
|
48
|
+
set_template('mainForm', Template.new(:file => 'MainForm.erb'))
|
49
|
+
set_template('mainForm.designer', Template.new(:file => 'MainForm.Designer.erb'))
|
50
|
+
set_template('mainForm.resx', Template.new(:file => 'MainForm.resx.erb'))
|
51
|
+
set_template('msgboxConsts', Template.new(:file => 'MsgboxConsts.erb'))
|
52
|
+
|
53
|
+
|
54
|
+
end
|
55
|
+
|
56
|
+
# Configura los objetivos de las platillas (despues de establecer el generador)
|
57
|
+
def configure_template_targets
|
58
|
+
|
59
|
+
|
60
|
+
# Configuro los templates
|
61
|
+
set_template_target('mainForm', TemplateTarget.new(:out_file => "#{get_class_name}.cs", :types => :proyect_file, :class_name => get_class_name))
|
62
|
+
set_template_target('mainForm.designer', TemplateTarget.new(:out_file => "#{get_class_name}.Designer.cs", :types => :proyect_file, :class_name => get_class_name))
|
63
|
+
set_template_target('mainForm.resx', TemplateTarget.new(:out_file => "#{get_class_name}.resx", :types => :proyect_file, :class_name => get_class_name))
|
64
|
+
set_template_target('msgboxConsts', TemplateTarget.new(:out_file => 'MsgboxConsts.cs', :types => :proyect_file, :class_name => 'MsgboxConsts'))
|
65
|
+
|
66
|
+
|
67
|
+
end
|
68
|
+
|
69
|
+
# Resetea los atributos personalizados de la caracteristica (antes de establecer el generador)
|
70
|
+
def reset_attributes
|
71
|
+
self.generation_attributes[:out_dir] = nil
|
72
|
+
self.generation_attributes[:namespace]= nil
|
73
|
+
end
|
74
|
+
|
75
|
+
# Configura los atributos personalizados de la caracteristica (antes de establecer el generador)
|
76
|
+
def configure_attributes()
|
77
|
+
self.generation_attributes[:out_dir] = "#{self.generation_attributes[:out_dir]}/#{self.generation_attributes[:namespace]}/Windows.Forms" unless self.generation_attributes.has_in_self?(:out_dir)
|
78
|
+
self.generation_attributes[:namespace]= "#{self.generation_attributes[:namespace]}.Windows.Forms" unless self.generation_attributes.has_in_self?(:namespace)
|
79
|
+
end
|
80
|
+
|
81
|
+
# Obtiene el nombre de la clae
|
82
|
+
def get_class_name
|
83
|
+
return "MainForm"
|
84
|
+
end
|
85
|
+
|
86
|
+
# Obtiene el nombre completo de la clae
|
87
|
+
def get_class_full_name
|
88
|
+
return "#{self.generation_attributes[:namespace]}.#{get_class_name}"
|
89
|
+
end
|
90
|
+
|
91
|
+
|
92
|
+
end
|
93
|
+
end
|
@@ -0,0 +1,316 @@
|
|
1
|
+
<%
|
2
|
+
#encoding: UTF-8
|
3
|
+
|
4
|
+
=begin
|
5
|
+
|
6
|
+
CapicuaGen
|
7
|
+
|
8
|
+
CapicuaGen es un software que ayuda a la creación automática de
|
9
|
+
sistemas empresariales a través de la definición y ensamblado de
|
10
|
+
diversos generadores de características.
|
11
|
+
|
12
|
+
El proyecto fue iniciado por José Luis Bautista Martin, el 6 de enero
|
13
|
+
del 2016.
|
14
|
+
|
15
|
+
Puede modificar y distribuir este software, según le plazca, y usarlo
|
16
|
+
para cualquier fin ya sea comercial, personal, educativo, o de cualquier
|
17
|
+
índole, siempre y cuando incluya este mensaje, y se permita acceso el
|
18
|
+
código fuente.
|
19
|
+
|
20
|
+
Este software es código libre, y se licencia bajo LGPL.
|
21
|
+
|
22
|
+
Para más información consultar http://www.gnu.org/licenses/lgpl.html
|
23
|
+
=end
|
24
|
+
%>using System;
|
25
|
+
using System.Windows.Forms;
|
26
|
+
|
27
|
+
|
28
|
+
namespace <%=generation_attributes[:namespace]%>
|
29
|
+
{
|
30
|
+
partial class <%=template_target.class_name%> : Form
|
31
|
+
{
|
32
|
+
/// <summary>
|
33
|
+
/// Required designer variable.
|
34
|
+
/// </summary>
|
35
|
+
private System.ComponentModel.IContainer components = null;
|
36
|
+
|
37
|
+
/// <summary>
|
38
|
+
/// Clean up any resources being used.
|
39
|
+
/// </summary>
|
40
|
+
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
41
|
+
protected override void Dispose(bool disposing)
|
42
|
+
{
|
43
|
+
if (disposing && (components != null))
|
44
|
+
{
|
45
|
+
components.Dispose();
|
46
|
+
}
|
47
|
+
base.Dispose(disposing);
|
48
|
+
}
|
49
|
+
|
50
|
+
#region Windows Form Designer generated code
|
51
|
+
|
52
|
+
/// <summary>
|
53
|
+
/// Required method for Designer support - do not modify
|
54
|
+
/// the contents of this method with the code editor.
|
55
|
+
/// </summary>
|
56
|
+
private void InitializeComponent()
|
57
|
+
{
|
58
|
+
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(<%=template_target.class_name%>));
|
59
|
+
this.mnuMenu = new System.Windows.Forms.MenuStrip();
|
60
|
+
this.mnuArchivo = new System.Windows.Forms.ToolStripMenuItem();
|
61
|
+
this.mnuSalir = new System.Windows.Forms.ToolStripMenuItem();
|
62
|
+
this.mnuCatalogo = new System.Windows.Forms.ToolStripMenuItem();
|
63
|
+
this.mnuVentanas = new System.Windows.Forms.ToolStripMenuItem();
|
64
|
+
this.mnuCascada = new System.Windows.Forms.ToolStripMenuItem();
|
65
|
+
this.toolStripMenuItem6 = new System.Windows.Forms.ToolStripSeparator();
|
66
|
+
this.mnuOrganizarHorizontal = new System.Windows.Forms.ToolStripMenuItem();
|
67
|
+
this.mnuOrganizarVertical = new System.Windows.Forms.ToolStripMenuItem();
|
68
|
+
this.toolStripMenuItem7 = new System.Windows.Forms.ToolStripSeparator();
|
69
|
+
this.mnuCerrarTodas = new System.Windows.Forms.ToolStripMenuItem();
|
70
|
+
this.mnuAyuda = new System.Windows.Forms.ToolStripMenuItem();
|
71
|
+
this.mnuAcercaDe = new System.Windows.Forms.ToolStripMenuItem();
|
72
|
+
<%get_entity_catalogs_name { |catalog|%>this.mnu<%=catalog%> = new System.Windows.Forms.ToolStripMenuItem();
|
73
|
+
<%}%>this.toolStripMenuItem3 = new System.Windows.Forms.ToolStripSeparator();
|
74
|
+
this.pnlEncabezado = new System.Windows.Forms.Panel();
|
75
|
+
this.StatusBarMDI = new System.Windows.Forms.StatusStrip();
|
76
|
+
this.lblUsuarioFirmado = new System.Windows.Forms.ToolStripStatusLabel();
|
77
|
+
this.toolStripStatusLabel1 = new System.Windows.Forms.ToolStripStatusLabel();
|
78
|
+
this.lblFecha = new System.Windows.Forms.ToolStripStatusLabel();
|
79
|
+
this.mnuMenu.SuspendLayout();
|
80
|
+
this.StatusBarMDI.SuspendLayout();
|
81
|
+
this.SuspendLayout();
|
82
|
+
//
|
83
|
+
// mnuMenu
|
84
|
+
//
|
85
|
+
this.mnuMenu.BackColor = System.Drawing.SystemColors.Control;
|
86
|
+
this.mnuMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
87
|
+
this.mnuArchivo,
|
88
|
+
this.mnuCatalogo,
|
89
|
+
this.mnuVentanas,
|
90
|
+
this.mnuAyuda});
|
91
|
+
this.mnuMenu.Location = new System.Drawing.Point(0, 0);
|
92
|
+
this.mnuMenu.MdiWindowListItem = this.mnuVentanas;
|
93
|
+
this.mnuMenu.Name = "mnuMenu";
|
94
|
+
this.mnuMenu.Size = new System.Drawing.Size(770, 24);
|
95
|
+
this.mnuMenu.TabIndex = 4;
|
96
|
+
this.mnuMenu.Text = "Menu";
|
97
|
+
//
|
98
|
+
// mnuArchivo
|
99
|
+
//
|
100
|
+
this.mnuArchivo.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
101
|
+
this.mnuSalir});
|
102
|
+
this.mnuArchivo.Name = "mnuArchivo";
|
103
|
+
this.mnuArchivo.Size = new System.Drawing.Size(60, 20);
|
104
|
+
this.mnuArchivo.Text = "&Archivo";
|
105
|
+
//
|
106
|
+
// mnuSalir
|
107
|
+
//
|
108
|
+
this.mnuSalir.Image = ((System.Drawing.Image)(resources.GetObject("mnuSalir.Image")));
|
109
|
+
this.mnuSalir.Name = "mnuSalir";
|
110
|
+
this.mnuSalir.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.S)));
|
111
|
+
this.mnuSalir.Size = new System.Drawing.Size(152, 22);
|
112
|
+
this.mnuSalir.Text = "&Salir";
|
113
|
+
this.mnuSalir.Click += new System.EventHandler(this.mnuCerrarAplicacion_Click);
|
114
|
+
//
|
115
|
+
// mnuCatalogo
|
116
|
+
//
|
117
|
+
this.mnuCatalogo.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[]
|
118
|
+
{
|
119
|
+
<%get_entity_catalogs_name { |catalog|%> mnu<%=catalog%>,<%}%>
|
120
|
+
});
|
121
|
+
this.mnuCatalogo.Name = "mnuCatalogo";
|
122
|
+
this.mnuCatalogo.Size = new System.Drawing.Size(72, 20);
|
123
|
+
this.mnuCatalogo.Text = "&Catálogos";
|
124
|
+
<%get_entity_catalogs_name { |catalog|
|
125
|
+
entity=get_entity_by_catalog_name(catalog)
|
126
|
+
%>//
|
127
|
+
// mnu<%=catalog%>
|
128
|
+
//
|
129
|
+
this.mnu<%=catalog%>.Image = ((System.Drawing.Image)(resources.GetObject("mnuCatalogo.Image")));
|
130
|
+
this.mnu<%=catalog%>.Name = "mnu<%=catalog%>";
|
131
|
+
this.mnu<%=catalog%>.Size = new System.Drawing.Size(179, 22);
|
132
|
+
this.mnu<%=catalog%>.Text = "Catálogo de <%=entity.name%>";
|
133
|
+
this.mnu<%=catalog%>.Click += new System.EventHandler(this.mnu<%=catalog%>_Click);
|
134
|
+
<%}%>
|
135
|
+
//
|
136
|
+
// mnuVentanas
|
137
|
+
//
|
138
|
+
this.mnuVentanas.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
139
|
+
this.mnuCascada,
|
140
|
+
this.toolStripMenuItem6,
|
141
|
+
this.mnuOrganizarHorizontal,
|
142
|
+
this.mnuOrganizarVertical,
|
143
|
+
this.toolStripMenuItem7,
|
144
|
+
this.mnuCerrarTodas});
|
145
|
+
this.mnuVentanas.Name = "mnuVentanas";
|
146
|
+
this.mnuVentanas.Size = new System.Drawing.Size(62, 20);
|
147
|
+
this.mnuVentanas.Text = "&Ventana";
|
148
|
+
//
|
149
|
+
// mnuCascada
|
150
|
+
//
|
151
|
+
this.mnuCascada.Image = ((System.Drawing.Image)(resources.GetObject("mnuCascada.Image")));
|
152
|
+
this.mnuCascada.Name = "mnuCascada";
|
153
|
+
this.mnuCascada.Size = new System.Drawing.Size(202, 22);
|
154
|
+
this.mnuCascada.Text = "Cascada";
|
155
|
+
this.mnuCascada.Click += new System.EventHandler(this.mnuCascada_Click);
|
156
|
+
//
|
157
|
+
// toolStripMenuItem6
|
158
|
+
//
|
159
|
+
this.toolStripMenuItem6.Name = "toolStripMenuItem6";
|
160
|
+
this.toolStripMenuItem6.Size = new System.Drawing.Size(199, 6);
|
161
|
+
//
|
162
|
+
// mnuOrganizarHorizontal
|
163
|
+
//
|
164
|
+
this.mnuOrganizarHorizontal.Image = ((System.Drawing.Image)(resources.GetObject("mnuOrganizarHorizontal.Image")));
|
165
|
+
this.mnuOrganizarHorizontal.Name = "mnuOrganizarHorizontal";
|
166
|
+
this.mnuOrganizarHorizontal.Size = new System.Drawing.Size(202, 22);
|
167
|
+
this.mnuOrganizarHorizontal.Text = "Organización Horizontal";
|
168
|
+
this.mnuOrganizarHorizontal.Click += new System.EventHandler(this.mnuOrganizarHorizontal_Click);
|
169
|
+
//
|
170
|
+
// mnuOrganizarVertical
|
171
|
+
//
|
172
|
+
this.mnuOrganizarVertical.Image = ((System.Drawing.Image)(resources.GetObject("mnuOrganizarVertical.Image")));
|
173
|
+
this.mnuOrganizarVertical.Name = "mnuOrganizarVertical";
|
174
|
+
this.mnuOrganizarVertical.Size = new System.Drawing.Size(202, 22);
|
175
|
+
this.mnuOrganizarVertical.Text = "Organización Vertical";
|
176
|
+
this.mnuOrganizarVertical.Click += new System.EventHandler(this.mnuOrganizarVertical_Click);
|
177
|
+
//
|
178
|
+
// toolStripMenuItem7
|
179
|
+
//
|
180
|
+
this.toolStripMenuItem7.Name = "toolStripMenuItem7";
|
181
|
+
this.toolStripMenuItem7.Size = new System.Drawing.Size(199, 6);
|
182
|
+
//
|
183
|
+
// mnuCerrarTodas
|
184
|
+
//
|
185
|
+
this.mnuCerrarTodas.Image = ((System.Drawing.Image)(resources.GetObject("mnuCerrarTodas.Image")));
|
186
|
+
this.mnuCerrarTodas.Name = "mnuCerrarTodas";
|
187
|
+
this.mnuCerrarTodas.Size = new System.Drawing.Size(202, 22);
|
188
|
+
this.mnuCerrarTodas.Text = "Cerrar Todas";
|
189
|
+
this.mnuCerrarTodas.Click += new System.EventHandler(this.mnuCerrarTodas_Click);
|
190
|
+
//
|
191
|
+
// mnuAyuda
|
192
|
+
//
|
193
|
+
this.mnuAyuda.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
194
|
+
this.mnuAcercaDe});
|
195
|
+
this.mnuAyuda.Name = "mnuAyuda";
|
196
|
+
this.mnuAyuda.Size = new System.Drawing.Size(53, 20);
|
197
|
+
this.mnuAyuda.Text = "A&yuda";
|
198
|
+
//
|
199
|
+
// mnuAcercaDe
|
200
|
+
//
|
201
|
+
this.mnuAcercaDe.Image = ((System.Drawing.Image)(resources.GetObject("mnuAcercaDe.Image")));
|
202
|
+
this.mnuAcercaDe.Name = "mnuAcercaDe";
|
203
|
+
this.mnuAcercaDe.Size = new System.Drawing.Size(152, 22);
|
204
|
+
this.mnuAcercaDe.Text = "&Acerca de...";
|
205
|
+
this.mnuAcercaDe.Click += new System.EventHandler(this.mnuAcerca_Click);
|
206
|
+
//
|
207
|
+
// toolStripMenuItem3
|
208
|
+
//
|
209
|
+
this.toolStripMenuItem3.Name = "toolStripMenuItem3";
|
210
|
+
this.toolStripMenuItem3.Size = new System.Drawing.Size(6, 6);
|
211
|
+
//
|
212
|
+
// pnlEncabezado
|
213
|
+
//
|
214
|
+
this.pnlEncabezado.AutoScroll = true;
|
215
|
+
this.pnlEncabezado.AutoSize = true;
|
216
|
+
this.pnlEncabezado.BackColor = System.Drawing.Color.Gray;
|
217
|
+
this.pnlEncabezado.Dock = System.Windows.Forms.DockStyle.Top;
|
218
|
+
this.pnlEncabezado.Location = new System.Drawing.Point(0, 24);
|
219
|
+
this.pnlEncabezado.Name = "pnlEncabezado";
|
220
|
+
this.pnlEncabezado.Size = new System.Drawing.Size(770, 0);
|
221
|
+
this.pnlEncabezado.TabIndex = 0;
|
222
|
+
//
|
223
|
+
// StatusBarMDI
|
224
|
+
//
|
225
|
+
this.StatusBarMDI.BackColor = System.Drawing.SystemColors.Control;
|
226
|
+
this.StatusBarMDI.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
227
|
+
this.lblUsuarioFirmado,
|
228
|
+
this.toolStripStatusLabel1,
|
229
|
+
this.lblFecha});
|
230
|
+
this.StatusBarMDI.Location = new System.Drawing.Point(0, 465);
|
231
|
+
this.StatusBarMDI.Name = "StatusBarMDI";
|
232
|
+
this.StatusBarMDI.Size = new System.Drawing.Size(770, 22);
|
233
|
+
this.StatusBarMDI.TabIndex = 6;
|
234
|
+
this.StatusBarMDI.Text = "StatusStrip";
|
235
|
+
//
|
236
|
+
// lblUsuarioFirmado
|
237
|
+
//
|
238
|
+
this.lblUsuarioFirmado.AutoToolTip = true;
|
239
|
+
this.lblUsuarioFirmado.BorderStyle = System.Windows.Forms.Border3DStyle.Etched;
|
240
|
+
this.lblUsuarioFirmado.Image = ((System.Drawing.Image)(resources.GetObject("lblUsuarioFirmado.Image")));
|
241
|
+
this.lblUsuarioFirmado.Name = "lblUsuarioFirmado";
|
242
|
+
this.lblUsuarioFirmado.Size = new System.Drawing.Size(90, 17);
|
243
|
+
this.lblUsuarioFirmado.Text = "BIENVENIDO";
|
244
|
+
this.lblUsuarioFirmado.ToolTipText = "BIENVENIDO";
|
245
|
+
//
|
246
|
+
// toolStripStatusLabel1
|
247
|
+
//
|
248
|
+
this.toolStripStatusLabel1.Name = "toolStripStatusLabel1";
|
249
|
+
this.toolStripStatusLabel1.RightToLeft = System.Windows.Forms.RightToLeft.Yes;
|
250
|
+
this.toolStripStatusLabel1.Size = new System.Drawing.Size(602, 17);
|
251
|
+
this.toolStripStatusLabel1.Spring = true;
|
252
|
+
this.toolStripStatusLabel1.Text = " ";
|
253
|
+
//
|
254
|
+
// lblFecha
|
255
|
+
//
|
256
|
+
this.lblFecha.AutoToolTip = true;
|
257
|
+
this.lblFecha.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None;
|
258
|
+
this.lblFecha.BorderStyle = System.Windows.Forms.Border3DStyle.Etched;
|
259
|
+
this.lblFecha.Image = ((System.Drawing.Image)(resources.GetObject("lblFecha.Image")));
|
260
|
+
this.lblFecha.Name = "lblFecha";
|
261
|
+
this.lblFecha.RightToLeft = System.Windows.Forms.RightToLeft.No;
|
262
|
+
this.lblFecha.Size = new System.Drawing.Size(63, 17);
|
263
|
+
this.lblFecha.Text = "FECHA:";
|
264
|
+
this.lblFecha.ToolTipText = "FECHA";
|
265
|
+
//
|
266
|
+
// <%=template_target.class_name%>
|
267
|
+
//
|
268
|
+
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
269
|
+
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
270
|
+
this.ClientSize = new System.Drawing.Size(770, 487);
|
271
|
+
this.Controls.Add(this.StatusBarMDI);
|
272
|
+
this.Controls.Add(this.pnlEncabezado);
|
273
|
+
this.Controls.Add(this.mnuMenu);
|
274
|
+
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
275
|
+
this.IsMdiContainer = true;
|
276
|
+
this.MainMenuStrip = this.mnuMenu;
|
277
|
+
this.Name = "<%=template_target.class_name%>";
|
278
|
+
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
279
|
+
this.Text = "<%=generation_attributes[:assembly_title]%> - Versión: <%=generation_attributes[:assembly_version]%>";
|
280
|
+
this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
|
281
|
+
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.<%=template_target.class_name%>_FormClosing);
|
282
|
+
this.Load += new System.EventHandler(this.<%=template_target.class_name%>_Load);
|
283
|
+
this.mnuMenu.ResumeLayout(false);
|
284
|
+
this.mnuMenu.PerformLayout();
|
285
|
+
this.StatusBarMDI.ResumeLayout(false);
|
286
|
+
this.StatusBarMDI.PerformLayout();
|
287
|
+
this.ResumeLayout(false);
|
288
|
+
this.PerformLayout();
|
289
|
+
|
290
|
+
}
|
291
|
+
|
292
|
+
#endregion
|
293
|
+
|
294
|
+
private System.Windows.Forms.MenuStrip mnuMenu;
|
295
|
+
private System.Windows.Forms.ToolStripMenuItem mnuArchivo;
|
296
|
+
private System.Windows.Forms.ToolStripMenuItem mnuSalir;
|
297
|
+
private System.Windows.Forms.ToolStripMenuItem mnuCatalogo;
|
298
|
+
<%get_entity_catalogs_name { |catalog|%>private System.Windows.Forms.ToolStripMenuItem mnu<%=catalog%>;
|
299
|
+
<%}%>private System.Windows.Forms.ToolStripMenuItem mnuAyuda;
|
300
|
+
private System.Windows.Forms.Panel pnlEncabezado;
|
301
|
+
private System.Windows.Forms.StatusStrip StatusBarMDI;
|
302
|
+
private System.Windows.Forms.ToolStripStatusLabel toolStripStatusLabel1;
|
303
|
+
private System.Windows.Forms.ToolStripStatusLabel lblFecha;
|
304
|
+
private System.Windows.Forms.ToolStripMenuItem mnuVentanas;
|
305
|
+
private System.Windows.Forms.ToolStripMenuItem mnuCascada;
|
306
|
+
private System.Windows.Forms.ToolStripMenuItem mnuOrganizarHorizontal;
|
307
|
+
private System.Windows.Forms.ToolStripMenuItem mnuOrganizarVertical;
|
308
|
+
private System.Windows.Forms.ToolStripMenuItem mnuCerrarTodas;
|
309
|
+
private System.Windows.Forms.ToolStripSeparator toolStripMenuItem3;
|
310
|
+
private System.Windows.Forms.ToolStripSeparator toolStripMenuItem6;
|
311
|
+
private System.Windows.Forms.ToolStripSeparator toolStripMenuItem7;
|
312
|
+
private System.Windows.Forms.ToolStripMenuItem mnuAcercaDe;
|
313
|
+
private System.Windows.Forms.ToolStripStatusLabel lblUsuarioFirmado;
|
314
|
+
|
315
|
+
}
|
316
|
+
}
|
@@ -0,0 +1,161 @@
|
|
1
|
+
<%
|
2
|
+
#encoding: UTF-8
|
3
|
+
|
4
|
+
=begin
|
5
|
+
|
6
|
+
CapicuaGen
|
7
|
+
|
8
|
+
CapicuaGen es un software que ayuda a la creación automática de
|
9
|
+
sistemas empresariales a través de la definición y ensamblado de
|
10
|
+
diversos generadores de características.
|
11
|
+
|
12
|
+
El proyecto fue iniciado por José Luis Bautista Martin, el 6 de enero
|
13
|
+
del 2016.
|
14
|
+
|
15
|
+
Puede modificar y distribuir este software, según le plazca, y usarlo
|
16
|
+
para cualquier fin ya sea comercial, personal, educativo, o de cualquier
|
17
|
+
índole, siempre y cuando incluya este mensaje, y se permita acceso el
|
18
|
+
código fuente.
|
19
|
+
|
20
|
+
Este software es código libre, y se licencia bajo LGPL.
|
21
|
+
|
22
|
+
Para más información consultar http://www.gnu.org/licenses/lgpl.html
|
23
|
+
=end
|
24
|
+
%>using System;
|
25
|
+
using System.Windows.Forms;
|
26
|
+
<%=get_namespaces_text(:business_interfaces)
|
27
|
+
%><%=get_namespaces_text(:business_entities)
|
28
|
+
%><%=get_namespaces_text(:catalog)
|
29
|
+
%>
|
30
|
+
|
31
|
+
namespace <%=generation_attributes[:namespace]%>
|
32
|
+
{
|
33
|
+
partial class <%=template_target.class_name%>
|
34
|
+
{
|
35
|
+
#region Constructor
|
36
|
+
|
37
|
+
public <%=template_target.class_name%>()
|
38
|
+
{
|
39
|
+
InitializeComponent();
|
40
|
+
}
|
41
|
+
|
42
|
+
#endregion Constructor
|
43
|
+
|
44
|
+
#region Eventos
|
45
|
+
|
46
|
+
protected virtual void <%=template_target.class_name%>_Load(object sender, EventArgs e)
|
47
|
+
{
|
48
|
+
ConfigurarStatusBar();
|
49
|
+
}
|
50
|
+
|
51
|
+
/// <summary>
|
52
|
+
/// Opción de menú para finalizar aplicación
|
53
|
+
/// </summary>
|
54
|
+
/// <param name="sender"></param>
|
55
|
+
/// <param name="e"></param>
|
56
|
+
protected virtual void mnuCerrarAplicacion_Click(object sender, EventArgs e)
|
57
|
+
{
|
58
|
+
this.Close();
|
59
|
+
}
|
60
|
+
|
61
|
+
/// <summary>
|
62
|
+
/// Evento generado al cierre del formulario
|
63
|
+
/// </summary>
|
64
|
+
/// <param name="sender"></param>
|
65
|
+
/// <param name="e"></param>
|
66
|
+
protected virtual void <%=template_target.class_name%>_FormClosing(object sender, FormClosingEventArgs e)
|
67
|
+
{
|
68
|
+
if (this.MdiChildren.Length > 0)
|
69
|
+
{
|
70
|
+
if (MessageBox.Show("Tiene ventanas abiertas." + Environment.NewLine + "¿Realmente desea salir?", "Salir...",
|
71
|
+
MessageBoxButtons.YesNo, MessageBoxIcon.Question) == System.Windows.Forms.DialogResult.No)
|
72
|
+
{
|
73
|
+
e.Cancel = true;
|
74
|
+
}
|
75
|
+
}
|
76
|
+
}
|
77
|
+
|
78
|
+
protected virtual void mnuCascada_Click(object sender, EventArgs e)
|
79
|
+
{
|
80
|
+
LayoutMdi(MdiLayout.Cascade);
|
81
|
+
}
|
82
|
+
|
83
|
+
protected virtual void mnuOrganizarHorizontal_Click(object sender, EventArgs e)
|
84
|
+
{
|
85
|
+
LayoutMdi(MdiLayout.TileHorizontal);
|
86
|
+
}
|
87
|
+
|
88
|
+
protected virtual void mnuOrganizarVertical_Click(object sender, EventArgs e)
|
89
|
+
{
|
90
|
+
LayoutMdi(MdiLayout.TileVertical);
|
91
|
+
}
|
92
|
+
|
93
|
+
protected virtual void mnuCerrarTodas_Click(object sender, EventArgs e)
|
94
|
+
{
|
95
|
+
if (MessageBox.Show("¿Esta seguro que desea cerrar todas las ventanas?", MsgboxConsts.AVISO, MessageBoxButtons.YesNo, MessageBoxIcon.Question) == System.Windows.Forms.DialogResult.Yes)
|
96
|
+
{
|
97
|
+
foreach (Form childForm in MdiChildren)
|
98
|
+
{
|
99
|
+
childForm.Close();
|
100
|
+
}
|
101
|
+
}
|
102
|
+
}
|
103
|
+
|
104
|
+
/// <summary>
|
105
|
+
/// Evento generado al click en acercaDeToolStripMenuItem
|
106
|
+
/// </summary>
|
107
|
+
/// <param name="sender"></param>
|
108
|
+
/// <param name="e"></param>
|
109
|
+
protected virtual void mnuAcerca_Click(object sender, EventArgs e)
|
110
|
+
{
|
111
|
+
new <%=get_about_class_full_name%>().ShowDialog();
|
112
|
+
}
|
113
|
+
|
114
|
+
|
115
|
+
<%get_entity_catalogs_name do |tabla|%>
|
116
|
+
protected virtual void mnu<%=tabla%>_Click(object sender, EventArgs e)
|
117
|
+
{
|
118
|
+
//Carga el formulario FrmOrders
|
119
|
+
CargarFormulario<<%=tabla%>>();
|
120
|
+
}
|
121
|
+
|
122
|
+
<%end%>
|
123
|
+
|
124
|
+
#endregion Eventos
|
125
|
+
|
126
|
+
#region Metodos
|
127
|
+
/// <summary>
|
128
|
+
/// Configura la opciones de la estatus BAR
|
129
|
+
/// </summary>
|
130
|
+
protected virtual void ConfigurarStatusBar()
|
131
|
+
{
|
132
|
+
lblFecha.Text = string.Format("FECHA: {0}", DateTime.Now.ToShortDateString());
|
133
|
+
}
|
134
|
+
|
135
|
+
/// <summary>
|
136
|
+
/// Carga el formulario
|
137
|
+
/// </summary>
|
138
|
+
/// <typeparam name="F">Formulario a cargar</typeparam>
|
139
|
+
protected virtual void CargarFormulario<F>() where F : Form, new()
|
140
|
+
{
|
141
|
+
//Busca si el formulario ya se carga anteriormente
|
142
|
+
foreach (Form form in this.MdiChildren)
|
143
|
+
{
|
144
|
+
if (form.GetType() == typeof(F))
|
145
|
+
{
|
146
|
+
form.BringToFront();
|
147
|
+
form.WindowState = FormWindowState.Maximized;
|
148
|
+
return;
|
149
|
+
}
|
150
|
+
}
|
151
|
+
|
152
|
+
//No existe el formulario, crea uno nuevo
|
153
|
+
Form formNumero = new F();
|
154
|
+
formNumero.MdiParent = this;
|
155
|
+
formNumero.Show();
|
156
|
+
formNumero.WindowState = FormWindowState.Maximized;
|
157
|
+
}
|
158
|
+
|
159
|
+
#endregion
|
160
|
+
}
|
161
|
+
}
|