Skip to content

Commit

Permalink
all first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
dmvieira committed Nov 23, 2011
1 parent 02104a9 commit 7f30156
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 3 deletions.
3 changes: 0 additions & 3 deletions freegrum.pl
Expand Up @@ -6,9 +6,6 @@
use module; use module;
use interface; use interface;


#IdentSystem::escreve('laricá','Historico','Trabalho1','sistema');
#IdentSystem::le('Historico','Trabalho1','sistema');
#IdentSystem::altera('Historico','Trabalho1','sistema');
say "Diga o nome do trabalho que vai iniciar:"; say "Diga o nome do trabalho que vai iniciar:";
my $trabalho = <>; my $trabalho = <>;
$trabalho = IdentSystem::str_replace('_','-',$trabalho); $trabalho = IdentSystem::str_replace('_','-',$trabalho);
Expand Down
29 changes: 29 additions & 0 deletions interface.pm
Expand Up @@ -12,13 +12,16 @@ say "Escolha o que deseja fazer em $trabalho:\n";
say "0 : Sair"; say "0 : Sair";
say "1 : Identificacao do Sistema"; say "1 : Identificacao do Sistema";
say "2 : Diagnostico Estrategico"; say "2 : Diagnostico Estrategico";
say "3 : Visao Estrategica";



my $escolha = <>; my $escolha = <>;
system("clear"); system("clear");
if (isint($escolha)){ if (isint($escolha)){
if($escolha == 0) { print "Obrigado por ter usado FreeGrum!"; exit 0;} if($escolha == 0) { print "Obrigado por ter usado FreeGrum!"; exit 0;}
elsif($escolha == 1) { Interface::mostra_identsys($trabalho); } elsif($escolha == 1) { Interface::mostra_identsys($trabalho); }
elsif($escolha == 2) { Interface::mostra_diagestrateg($trabalho); } elsif($escolha == 2) { Interface::mostra_diagestrateg($trabalho); }
elsif($escolha == 3) { Interface::mostra_visestrateg($trabalho); }


else { Interface::mostra_principal($trabalho);} else { Interface::mostra_principal($trabalho);}


Expand Down Expand Up @@ -85,6 +88,32 @@ else{
} }
} }


sub mostra_visestrateg {
my $trabalho = shift;

say "Visao Estrategica de $trabalho:\n";
say "0 : Menu Principal";
say "1 : Brainstorming";
say "2 : Eventos Futuros";
say "3 : Peritos";
say "4 : Cenarios";
my $escolha = <>;
system("clear");
if (isint($escolha)){
if($escolha == 0){ Interface::mostra_principal($trabalho);}
elsif($escolha == 1){ Interface::mostra_pergunta('Brainstorming','Interface::mostra_visestrateg($trabalho)','visao', $trabalho); }
elsif($escolha == 2){ Interface::mostra_pergunta('Eventos-Futuros','Interface::mostra_visestrateg($trabalho)','visao', $trabalho); }
elsif($escolha == 3){ Interface::mostra_pergunta('Peritos','Interface::mostra_visestrateg($trabalho)','visao', $trabalho); }
elsif($escolha == 4){ Interface::mostra_pergunta('Cenarios','Interface::mostra_visestrateg($trabalho)','visao', $trabalho); }

else { Interface::mostra_visestrateg($trabalho)}

}
else{
Interface::mostra_visestrateg($trabalho);
}
}

sub mostra_pergunta { sub mostra_pergunta {
my $local = shift; my $local = shift;
my $anterior = shift; my $anterior = shift;
Expand Down

0 comments on commit 7f30156

Please sign in to comment.