SlideShare ist ein Scribd-Unternehmen logo
1 von 16
Пользовательский интерфейс на Perl
Архитектура  «Globus Professional» Client App Server DB
Вход в  «Globus Professional»
Клиентское приложение
Класс приложения use Wx; # every program must have a Wx::App-derive class package MyApp; use strict; use warnings; our  @ISA=qw(Wx::App); # this is called automatically on object creation sub OnInit { my( $this ) = @_; # create new MyFrame my $frame = MyFrame->new( "Minimal wxPerl app",   [  50, 50  ] ,  #position   [  450, 350  ] #size ); # set it as top window (so the app will automatically close when # the last top window is closed) $this->SetTopWindow( $frame ); # show the frame $frame->Show( 1 ); 1; }
Класс окна (1) package MyFrame; use strict; use warnings; our  @ISA=qw(Wx::Frame); use Wx::Event qw(EVT_MENU); use Wx qw(wxBITMAP_TYPE_ICO wxMENU_TEAROFF); # Parameters: title, position, size sub new { my $class  = shift; my $ self  = $class->SUPER::new( undef, -1, $_[0], $_[1], $_[2] ); # load an icon and set it as frame icon $ self ->SetIcon( Wx::GetWxPerlIcon() ); # create the menus my $mfile = Wx::Menu->new( undef, wxMENU_TEAROFF ); my $mhelp  = Wx::Menu->new(); my( $ID_ABOUT, $ID_EXIT ) = ( 1, 2 ); $mhelp->Append( $ID_ABOUT, "&About...Ctrl-A", "Show about dialog" ); $mfile->Append( $ID_EXIT, "E&xitAlt-X", "Quit this program" );
Класс окна (2) my $mbar = Wx::MenuBar->new(); $mbar->Append( $mfile, "&File" ); $mbar->Append( $mhelp, "&Help" ); $ self ->SetMenuBar( $mbar ); # declare that events coming from menu items with the given # id will be handled by these routines EVT_MENU( $ self , $ID_EXIT, amp;OnQuit ); EVT_MENU( $ self , $ID_ABOUT, amp;OnAbout ); # create a status bar (note that the status bar that gets created # has three panes, see the OnCreateStatusBar callback below $ self ->CreateStatusBar( 1 ); # and show a message $ self ->SetStatusText( "Welcome to wxPerl!", 1 ); $ self ; }
Обработчики # this is an addition to demonstrate virtual callbacks... # it ignores all parameters and creates a status bar with three fields sub OnCreateStatusBar { my $ self  = shift; my $status  = Wx::StatusBar->new( $ self , -1 ); $status->SetFieldsCount( 2 ); $status; } # called when the user selects the 'Exit' menu item sub OnQuit { my( $ self , $event ) = @_; # closes the frame $ self ->Close( 1 ); } use Wx qw(wxOK wxICON_INFORMATION wxVERSION_STRING); # called when the user selects the 'About' menu item sub OnAbout { my( $ self , $event ) = @_; # display a simple about box Wx::MessageBox( "This is the about dialog of minimal sample." .   "Welcome to wxPerl " . $Wx::VERSION . "" .   wxVERSION_STRING,   "About minimal", wxOK | wxICON_INFORMATION,   $  self  ); }
Запуск приложения package main; # create an instance of the Wx::App-derived class my $app = MyApp->new(); # start processing events $app->MainLoop();
Конструктор АРМ
АРМ регистратора заявок пользователей
Инструмент отладки перлового кода  ( KIT )
Регистрация  ActiveX- компонент perl -Mblib -MWx::ActiveX::Template -e"run_wxactivex_template();" Регистрация  ActiveX- компонент
Работа с компонентом use Win32::OLE; use Win32::OLE::Const;  use Win32::OLE::Variant; use Wx::ActiveX::RolledCalendar; … $dlg->{'_ X calendar'} = Wx::ActiveX::RolledCalendar->new( $dlg ); $main_sizer->Add( $dlg->{'_Xcalendar'}, 1, &Wx::wxGROW|&Wx::wxALL, 0 ); $dlg ->{'_calendar'}  = $dlg->{'_Xcalendar'}->GetOLE(); $dlg->{' _calendar '}->SetDate( $date ); … $date =  $dlg->{'_ c alendar'}->GetDate(); … . $dlg->{'_Xcalendar'}->Destroy();
Common Language Runtime (CLR) use Win32::CLR; Win32::CLR->load_from( $path ); $ fineReaderWrapper  = Win32::CLR->create_instance( "EISFREWrapper.Wrapper" ); $ fineReaderWrapper->setOutputFormat( $format );
Ссылки 1.  презентация www.umnix.com/upload/perlGUI.ppt 2.  сайт компании www.eis.ru 3. www.wxwidgets.org 4. wxperl.sourceforge.net 5. cpan.org 6.  email [email_address] [email_address]

Weitere ähnliche Inhalte

Was ist angesagt?

Decent exposure: Controladores sin @ivars
Decent exposure: Controladores sin @ivarsDecent exposure: Controladores sin @ivars
Decent exposure: Controladores sin @ivars
Leonardo Soto
 
Real time voice call integration - Confoo 2012
Real time voice call integration - Confoo 2012Real time voice call integration - Confoo 2012
Real time voice call integration - Confoo 2012
Michael Peacock
 
WordPress Third Party Authentication
WordPress Third Party AuthenticationWordPress Third Party Authentication
WordPress Third Party Authentication
Aaron Brazell
 
Mysql Aggregate
Mysql AggregateMysql Aggregate
Mysql Aggregate
lotlot
 

Was ist angesagt? (20)

symfony & jQuery (phpDay)
symfony & jQuery (phpDay)symfony & jQuery (phpDay)
symfony & jQuery (phpDay)
 
How kris-writes-symfony-apps-london
How kris-writes-symfony-apps-londonHow kris-writes-symfony-apps-london
How kris-writes-symfony-apps-london
 
jQuery Plugin
jQuery PluginjQuery Plugin
jQuery Plugin
 
How I started to love design patterns
How I started to love design patternsHow I started to love design patterns
How I started to love design patterns
 
Decent exposure: Controladores sin @ivars
Decent exposure: Controladores sin @ivarsDecent exposure: Controladores sin @ivars
Decent exposure: Controladores sin @ivars
 
Real time voice call integration - Confoo 2012
Real time voice call integration - Confoo 2012Real time voice call integration - Confoo 2012
Real time voice call integration - Confoo 2012
 
How I started to love design patterns
How I started to love design patternsHow I started to love design patterns
How I started to love design patterns
 
Chainable datasource
Chainable datasourceChainable datasource
Chainable datasource
 
Symfony CoP: Form component
Symfony CoP: Form componentSymfony CoP: Form component
Symfony CoP: Form component
 
WordPress Third Party Authentication
WordPress Third Party AuthenticationWordPress Third Party Authentication
WordPress Third Party Authentication
 
Introduction to CQRS and Event Sourcing
Introduction to CQRS and Event SourcingIntroduction to CQRS and Event Sourcing
Introduction to CQRS and Event Sourcing
 
Symfony Messenger (Symfony Live San Francisco)
Symfony Messenger (Symfony Live San Francisco)Symfony Messenger (Symfony Live San Francisco)
Symfony Messenger (Symfony Live San Francisco)
 
Hacking Movable Type
Hacking Movable TypeHacking Movable Type
Hacking Movable Type
 
Mysql Aggregate
Mysql AggregateMysql Aggregate
Mysql Aggregate
 
次世代PHPフレームワーク Symfony2
次世代PHPフレームワーク Symfony2次世代PHPフレームワーク Symfony2
次世代PHPフレームワーク Symfony2
 
AskTom Office Hours about Database Migrations
AskTom Office Hours about Database MigrationsAskTom Office Hours about Database Migrations
AskTom Office Hours about Database Migrations
 
HTML::FormHandler
HTML::FormHandlerHTML::FormHandler
HTML::FormHandler
 
Friendlier, Safer WordPress Admin Areas
Friendlier, Safer WordPress Admin AreasFriendlier, Safer WordPress Admin Areas
Friendlier, Safer WordPress Admin Areas
 
Constructive Destructor Use
Constructive Destructor UseConstructive Destructor Use
Constructive Destructor Use
 
Smarter Interfaces with jQuery (and Drupal)
Smarter Interfaces with jQuery (and Drupal)Smarter Interfaces with jQuery (and Drupal)
Smarter Interfaces with jQuery (and Drupal)
 

Ähnlich wie Perl gui

The state of Symfony2 - SymfonyDay 2010
The state of Symfony2 - SymfonyDay 2010The state of Symfony2 - SymfonyDay 2010
The state of Symfony2 - SymfonyDay 2010
Fabien Potencier
 
10 Things Every Plugin Developer Should Know (WordCamp Atlanta 2013)
10 Things Every Plugin Developer Should Know (WordCamp Atlanta 2013)10 Things Every Plugin Developer Should Know (WordCamp Atlanta 2013)
10 Things Every Plugin Developer Should Know (WordCamp Atlanta 2013)
arcware
 

Ähnlich wie Perl gui (20)

JavaScript and UI Architecture Best Practices
JavaScript and UI Architecture Best PracticesJavaScript and UI Architecture Best Practices
JavaScript and UI Architecture Best Practices
 
The state of Symfony2 - SymfonyDay 2010
The state of Symfony2 - SymfonyDay 2010The state of Symfony2 - SymfonyDay 2010
The state of Symfony2 - SymfonyDay 2010
 
Doctrine For Beginners
Doctrine For BeginnersDoctrine For Beginners
Doctrine For Beginners
 
First Steps in Drupal Code Driven Development
First Steps in Drupal Code Driven DevelopmentFirst Steps in Drupal Code Driven Development
First Steps in Drupal Code Driven Development
 
And the Greatest of These Is ... Rack Support
And the Greatest of These Is ... Rack SupportAnd the Greatest of These Is ... Rack Support
And the Greatest of These Is ... Rack Support
 
jQuery Performance Rules
jQuery Performance RulesjQuery Performance Rules
jQuery Performance Rules
 
Non Conventional Android Programming (English)
Non Conventional Android Programming (English)Non Conventional Android Programming (English)
Non Conventional Android Programming (English)
 
Non Conventional Android Programming En
Non Conventional Android Programming EnNon Conventional Android Programming En
Non Conventional Android Programming En
 
Magento Live Australia 2016: Request Flow
Magento Live Australia 2016: Request FlowMagento Live Australia 2016: Request Flow
Magento Live Australia 2016: Request Flow
 
Extend sdk
Extend sdkExtend sdk
Extend sdk
 
Java awt
Java awtJava awt
Java awt
 
10 Things Every Plugin Developer Should Know (WordCamp Atlanta 2013)
10 Things Every Plugin Developer Should Know (WordCamp Atlanta 2013)10 Things Every Plugin Developer Should Know (WordCamp Atlanta 2013)
10 Things Every Plugin Developer Should Know (WordCamp Atlanta 2013)
 
Curso Symfony - Clase 4
Curso Symfony - Clase 4Curso Symfony - Clase 4
Curso Symfony - Clase 4
 
More Secrets of JavaScript Libraries
More Secrets of JavaScript LibrariesMore Secrets of JavaScript Libraries
More Secrets of JavaScript Libraries
 
Unittests für Dummies
Unittests für DummiesUnittests für Dummies
Unittests für Dummies
 
Building Your First Widget
Building Your First WidgetBuilding Your First Widget
Building Your First Widget
 
Using and reusing CakePHP plugins
Using and reusing CakePHP pluginsUsing and reusing CakePHP plugins
Using and reusing CakePHP plugins
 
Single Page Applications in Angular (italiano)
Single Page Applications in Angular (italiano)Single Page Applications in Angular (italiano)
Single Page Applications in Angular (italiano)
 
Writing Pluggable Software
Writing Pluggable SoftwareWriting Pluggable Software
Writing Pluggable Software
 
Virtual Madness @ Etsy
Virtual Madness @ EtsyVirtual Madness @ Etsy
Virtual Madness @ Etsy
 

Kürzlich hochgeladen

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 

Kürzlich hochgeladen (20)

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 

Perl gui

  • 2. Архитектура «Globus Professional» Client App Server DB
  • 3. Вход в «Globus Professional»
  • 5. Класс приложения use Wx; # every program must have a Wx::App-derive class package MyApp; use strict; use warnings; our @ISA=qw(Wx::App); # this is called automatically on object creation sub OnInit { my( $this ) = @_; # create new MyFrame my $frame = MyFrame->new( "Minimal wxPerl app", [ 50, 50 ] , #position [ 450, 350 ] #size ); # set it as top window (so the app will automatically close when # the last top window is closed) $this->SetTopWindow( $frame ); # show the frame $frame->Show( 1 ); 1; }
  • 6. Класс окна (1) package MyFrame; use strict; use warnings; our @ISA=qw(Wx::Frame); use Wx::Event qw(EVT_MENU); use Wx qw(wxBITMAP_TYPE_ICO wxMENU_TEAROFF); # Parameters: title, position, size sub new { my $class = shift; my $ self = $class->SUPER::new( undef, -1, $_[0], $_[1], $_[2] ); # load an icon and set it as frame icon $ self ->SetIcon( Wx::GetWxPerlIcon() ); # create the menus my $mfile = Wx::Menu->new( undef, wxMENU_TEAROFF ); my $mhelp = Wx::Menu->new(); my( $ID_ABOUT, $ID_EXIT ) = ( 1, 2 ); $mhelp->Append( $ID_ABOUT, "&About...Ctrl-A", "Show about dialog" ); $mfile->Append( $ID_EXIT, "E&xitAlt-X", "Quit this program" );
  • 7. Класс окна (2) my $mbar = Wx::MenuBar->new(); $mbar->Append( $mfile, "&File" ); $mbar->Append( $mhelp, "&Help" ); $ self ->SetMenuBar( $mbar ); # declare that events coming from menu items with the given # id will be handled by these routines EVT_MENU( $ self , $ID_EXIT, amp;OnQuit ); EVT_MENU( $ self , $ID_ABOUT, amp;OnAbout ); # create a status bar (note that the status bar that gets created # has three panes, see the OnCreateStatusBar callback below $ self ->CreateStatusBar( 1 ); # and show a message $ self ->SetStatusText( "Welcome to wxPerl!", 1 ); $ self ; }
  • 8. Обработчики # this is an addition to demonstrate virtual callbacks... # it ignores all parameters and creates a status bar with three fields sub OnCreateStatusBar { my $ self = shift; my $status = Wx::StatusBar->new( $ self , -1 ); $status->SetFieldsCount( 2 ); $status; } # called when the user selects the 'Exit' menu item sub OnQuit { my( $ self , $event ) = @_; # closes the frame $ self ->Close( 1 ); } use Wx qw(wxOK wxICON_INFORMATION wxVERSION_STRING); # called when the user selects the 'About' menu item sub OnAbout { my( $ self , $event ) = @_; # display a simple about box Wx::MessageBox( "This is the about dialog of minimal sample." . "Welcome to wxPerl " . $Wx::VERSION . "" . wxVERSION_STRING, "About minimal", wxOK | wxICON_INFORMATION, $ self ); }
  • 9. Запуск приложения package main; # create an instance of the Wx::App-derived class my $app = MyApp->new(); # start processing events $app->MainLoop();
  • 11. АРМ регистратора заявок пользователей
  • 13. Регистрация ActiveX- компонент perl -Mblib -MWx::ActiveX::Template -e"run_wxactivex_template();" Регистрация ActiveX- компонент
  • 14. Работа с компонентом use Win32::OLE; use Win32::OLE::Const; use Win32::OLE::Variant; use Wx::ActiveX::RolledCalendar; … $dlg->{'_ X calendar'} = Wx::ActiveX::RolledCalendar->new( $dlg ); $main_sizer->Add( $dlg->{'_Xcalendar'}, 1, &Wx::wxGROW|&Wx::wxALL, 0 ); $dlg ->{'_calendar'} = $dlg->{'_Xcalendar'}->GetOLE(); $dlg->{' _calendar '}->SetDate( $date ); … $date = $dlg->{'_ c alendar'}->GetDate(); … . $dlg->{'_Xcalendar'}->Destroy();
  • 15. Common Language Runtime (CLR) use Win32::CLR; Win32::CLR->load_from( $path ); $ fineReaderWrapper = Win32::CLR->create_instance( "EISFREWrapper.Wrapper" ); $ fineReaderWrapper->setOutputFormat( $format );
  • 16. Ссылки 1. презентация www.umnix.com/upload/perlGUI.ppt 2. сайт компании www.eis.ru 3. www.wxwidgets.org 4. wxperl.sourceforge.net 5. cpan.org 6. email [email_address] [email_address]