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 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83
| use strict;
use Tk;
use Tk::Photo;
use Tk::JPEG;
use Tk::Table;
use Tk::Dialog;
use Win32::NetResource qw(:DEFAULT AddConnection CancelConnection);
use Win32::Registry;
use Fonction_Admin_Isotop;
# -- Définition des Variables Tk -- #
my ($Fenetre_Principale, $Frame_Principale );
my ($Cadre_Haut, $Cadre_Bas);
my ($Image_Gauche_Logo, $Frame_Gauche_Logo);
my ($Frame_Gauche_Menu, $Frame_Top, $Frame_Main);
my ($Barre_Menu, $Menu_App, $DBI_MyAdmin_Menu, $Menu_Quitter);
my $foreground_1 = "black";
my $font_1 = "{Garamond} 12";
my $color_menu_1 = "PeachPuff4";
my $color_menu_2 = "DarkSlateGray3";
my $color_principale = "bisque4";
my $mappage = Fonction_Admin_Isotop::Recuperation_Information_BDR("MAPPAGE"); # A VOIR!!!!
my $Logo ="$mappage:/Ressources/Images/Logo_Isotop_Transparent_5.gif";
my $Icon_Modif ="$mappage:/Ressources/Images/Icon_Modif.jpeg";
my $Bouton_ON = "$mappage:/Ressources/Images/Bouton_ON.gif";
my $Bouton_OFF = "$mappage:/Ressources/Images/Bouton_OFF.gif";
my $ON_OFF = "$mappage:/Ressources/Images/ON_OFF.gif";
my $dbargs = {AutoCommit => 0, PrintError => 1};
my ($Entry_NAME, $Entry_GROUPE, $Entry_CODEISO, $Entry_CODEPRO, $Label_IN_TYPE, $Entry_START, $Label_IN_ICON, $Label_IN_SESSION, $Label_IN_VIE, $Text_INFO);
# -- Création de la Fenêtre Principale -- #
$Fenetre_Principale = MainWindow->new();
$Fenetre_Principale->minsize( '800', '600' );
$Fenetre_Principale->title("Interface Admin ISOTOP");
#===================================
# Création d'un menu principal
#===================================
$Barre_Menu = $Fenetre_Principale->Menu(-type => "menubar");
$Fenetre_Principale->configure( -menu => $Barre_Menu );
# Configuration de mon menu
# Menu Application (qui contiendra des sous menu)
$Menu_App = $Barre_Menu->cascade(-label => "Application", -tearoff => 0);
$DBI_MyAdmin_Menu = $Menu_App->cascade( -label => "DBI_MyAdmin",
-tearoff => 0,
-background => $color_menu_1,
-activebackground => $color_menu_2,
-foreground => $foreground_1,
-font => $font_1);
foreach ( qw/ Langue Jetton / ) {$DBI_MyAdmin_Menu->command( -label => $_,
-command => [\&My_Admin, $_]);}
# Autre Menu
$Menu_Quitter = $Menu_App->command( -label => "Quitter",
-command => sub {exit(0);},
-background => $color_menu_1,
-activebackground => $color_menu_2,
-foreground => $foreground_1,
-font => $font_1);
# Création de la Première fenêtre
Frame_Principale();
# -- Lanceur d'évènement -- #
MainLoop;
# -- Fonctions Principales -- #
sub Frame_Principale
{
# -- Création de la Frame Centrale -- #
#$Frame_Principale = $Fenetre_Principale->Frame(-background => 'blue');
#$Frame_Principale->pack(-side => 'left', -fill => 'both', -anchor => 'nw', -expand => 1);
# -- Création du Cadre_Haut --#
$Cadre_Haut = $Fenetre_Principale -> Frame(-background => 'green', -height => 150);
$Cadre_Haut -> pack(-side => 'top', -fill => 'x', -anchor => 'nw', -expand => 1);
# -- Création du Cadre_Bas --#
$Cadre_Bas = $Fenetre_Principale -> Frame(-background => 'red');
$Cadre_Bas -> pack(-side => 'top', -fill => 'both', -anchor => 'sw', -expand => 1);
} |
Partager