Skip to content

Instantly share code, notes, and snippets.

@bokutin
bokutin / chohyo.pl
Created April 24, 2012 18:24
Strawerry Perlを使って帳票印刷をごまかす
use utf8;
use strict;
use feature ":5.10";
use Text::MicroTemplate;
use IO::All;
main: {
my $html_fn = 'chohyo.html';
my $pdf_fn = 'chohyo.pdf';
use Wx;
Wx::MessageBox('hello wxperl');
import wx
app = wx.App() # wx._core.PyNoAppError: The wx.App object must be created first!
wx.MessageBox('hello wxpython', 'title')
require 'wx'
class MyApp < Wx::App
private
def on_init
Wx::message_box('Hello World!')
return false
end
end
package Janken::Wx::App {
use strict;
use Wx;
use base "Wx::App";
sub OnInit {
my $self = shift;
my $frame = Janken::Wx::Frame->new;
$frame->Fit;
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<wxFormBuilder_Project>
<FileVersion major="1" minor="11" />
<object class="Project" expanded="1">
<property name="class_decoration"></property>
<property name="code_generation">XRC</property>
<property name="disconnect_events">1</property>
<property name="disconnect_mode">source_name</property>
<property name="disconnect_php_events">0</property>
<property name="disconnect_python_events">0</property>
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<resource xmlns="http://www.wxwindows.org/wxxrc" version="2.3.0.1">
<object class="wxFrame" name="MainFrame">
<style>wxDEFAULT_FRAME_STYLE|wxTAB_TRAVERSAL</style>
<size>500,300</size>
<title>じゃんけん</title>
<centered>1</centered>
<aui_managed>0</aui_managed>
<object class="wxPanel" name="m_panel1">
<style>wxTAB_TRAVERSAL</style>
use Filter::Crypto::CryptFile qw(:DEFAULT $ErrStr);
crypt_file("janken.pl", "janken2.pl") or die "crypt_file() failed: $ErrStr\n";
use strict;
use feature ":5.10";
use ExtUtils::Installed;
use File::Spec;
use Portable;
use Win32::Unicode;
my $TO_DIR = 'C:\Janken';
my $FROM_DIR = Portable->default->dist_root;
package Janken::Wx::App {
use strict;
use Wx;
use base "Wx::App";
sub OnInit {
my $self = shift;
my $frame = Janken::Wx::Frame->new;
$frame->Fit;