Class: CapicuaGen::Gaspar::CSSplashWindowsFeature

Inherits:
TemplateFeature
  • Object
show all
Includes:
CapicuaGen
Defined in:
lib/CapicuaGenGaspar/GUI/CSSplashWindowsForm/Source/cs_splash_windows_feature.rb

Overview

Caracteristica generadora de una pantalla de Bienvenida

Instance Method Summary collapse

Constructor Details

#initialize(values = {}) ⇒ CSSplashWindowsFeature

Inicializa la caracteristica



38
39
40
41
42
43
44
45
46
47
48
49
50
# File 'lib/CapicuaGenGaspar/GUI/CSSplashWindowsForm/Source/cs_splash_windows_feature.rb', line 38

def initialize(values= {})
  super(values)

  # Configuro los tipos si estos no han sido configurados previamente
  self.types= [:gui, :splash_form] if self.types.blank?

  # Configuro los templates
  set_template('splashForm', Template.new(:file => 'SplashForm.erb'))
  set_template('splashForm.designer', Template.new(:file => 'SplashForm.Designer.erb'))
  set_template('splashForm.resx', Template.new(:file => 'SplashForm.resx.erb'))


end

Instance Method Details

#configure_attributesObject

Configura los atributos personalizados de la caracteristica (antes de establecer el generador)



59
60
61
62
# File 'lib/CapicuaGenGaspar/GUI/CSSplashWindowsForm/Source/cs_splash_windows_feature.rb', line 59

def configure_attributes()
  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)
  self.generation_attributes[:namespace]= "#{self.generation_attributes[:namespace]}.Windows.Forms" unless self.generation_attributes.has_in_self?(:namespace)
end

#configure_template_targetsObject

Configura los objetivos de las platillas (despues de establecer el generador)



65
66
67
68
69
70
71
72
73
# File 'lib/CapicuaGenGaspar/GUI/CSSplashWindowsForm/Source/cs_splash_windows_feature.rb', line 65

def configure_template_targets


  # Configuro los templates
  set_template_target('splashForm', TemplateTarget.new(:out_file => "#{get_class_name}.cs", :types => :proyect_file, :class_name => get_class_name))
  set_template_target('splashForm.designer', TemplateTarget.new(:out_file => "#{get_class_name}.Designer.cs", :types => :proyect_file, :class_name => get_class_name))
  set_template_target('splashForm.resx', TemplateTarget.new(:out_file => "#{get_class_name}.resx", :types => :proyect_file, :class_name => get_class_name))

end

#get_class_full_nameObject

Obtiene el nombre completo de la clase



81
82
83
# File 'lib/CapicuaGenGaspar/GUI/CSSplashWindowsForm/Source/cs_splash_windows_feature.rb', line 81

def get_class_full_name
  return "#{self.generation_attributes[:namespace]}.#{get_class_name}"
end

#get_class_nameObject

Obtiene el nombre de la clase



76
77
78
# File 'lib/CapicuaGenGaspar/GUI/CSSplashWindowsForm/Source/cs_splash_windows_feature.rb', line 76

def get_class_name
  return "SplashForm"
end

#reset_attributesObject

Resetea los atributos personalizados de la caracteristica (antes de establecer el generador)



53
54
55
56
# File 'lib/CapicuaGenGaspar/GUI/CSSplashWindowsForm/Source/cs_splash_windows_feature.rb', line 53

def reset_attributes
  self.generation_attributes[:out_dir]  = nil
  self.generation_attributes[:namespace]= nil
end