1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
|
use strict;
use warnings;
use Net::Telnet;
use Net::FTP;
use Cwd;
use Tk; #Interface Graphique
use Tk::BrowseEntry; # Menu deroulant
my $log_distant="Login distant";
my $pass_distant="Mot de passe distant";
my $log_local="Login local";
my $pass_local="Mot de passe local";
my $choixsse="Sous-Ensemble";
my $standard="Standard (51 pour le standard Test 51)";
my $lot="Lot en cours (5 pour lot 5)";
my $login_int;
my $passwd_int;
my $login_ext;
my $passwd_ext;
my $std;
my $lt;
sub BDL
{
($log_local,$pass_local,$log_distant,$pass_distant,$choixsse,$standard,$lot) = @_;
$login_int=$log_local->get();
$passwd_int=$pass_local->get();
$login_ext=$log_distant->get();
$passwd_ext=$pass_distant->get();
$std=$standard->get();
$lt=$lot->get();
print $login_int."\n";
print $passwd_int."\n";
print $login_ext."\n";
print $passwd_ext."\n";
print $choixsse."\n";
print $std."\n";
print $lt."\n";
}
##MAIN
# Création du TopLevel
$frame = MainWindow->new(-title => 'BDL Sse');
$frame -> minsize('200','100');
$log_local=$frame -> Entry(-text => 'Login Local') -> pack(-side => 'top',-fill => 'x');
$pass_local=$frame -> Entry(-text => 'Pass Local',-show => '*') -> pack(-side => 'top',-fill => 'x');
$log_distant=$frame -> Entry(-text => 'Login Distant') -> pack(-side => 'top',-fill => 'x');
$pass_distant=$frame -> Entry(-text => 'Pass Distant',-show => '*') -> pack(-side => 'top',-fill => 'x');
$standard=$frame -> Entry(-text => 'Standard',) -> pack(-side => 'top',-fill => 'x');
$lot=$frame -> Entry(-text => 'Lot',) -> pack(-side => 'top',-fill => 'x');
my $menu_deroulant = $frame->BrowseEntry(-choices => ['TOTO', 'TITI','TUTU','TATA'],-variable => \$choixsse,-background => '#FFFFFF',)->pack(-side => 'top',-fill => 'x');
$frame -> Button(-text => 'Lancer',-command => [\&BDL, $log_local, $pass_local, $log_distant,$pass_distant,$choixsse,$standard,$lot]) -> pack(-side => 'top');
MainLoop; |
Partager