<s> '''<STR_LIT>''' <EOL> import clr <EOL> import i18n <EOL> from resources import Resources <EOL> from cvform import CVForm <EOL> clr . AddReference ( '<STR_LIT>' ) <EOL> from System . Windows . Forms import AutoScaleMode , Button , DialogResult , Label <EOL> clr . AddReference ( '<STR_LIT>' ) <EOL> from System . Drawing import ContentAlignment , Point , Size <EOL> class FinishForm ( CVForm ) : <EOL> '''<STR_LIT>''' <EOL> def __init__ ( self , scraper , status ) : <EOL> '''<STR_LIT>''' <EOL> CVForm . __init__ ( self , scraper . comicrack . MainWindow , "<STR_LIT>" ) <EOL> self . __build_gui ( status [ <NUM_LIT:0> ] , status [ <NUM_LIT:1> ] ) <EOL> def __build_gui ( self , scraped_n , skipped_n ) : <EOL> '''<STR_LIT>''' <EOL> scrape_label = self . __build_scrape_label ( scraped_n ) <EOL> skip_label = self . __build_skip_label ( skipped_n ) <EOL> ok = self . __build_okbutton ( ) <EOL> self . AcceptButton = ok <EOL> self . AutoScaleMode = AutoScaleMode . Font <EOL> self . Text = i18n . get ( "<STR_LIT>" ) . format ( Resources . SCRIPT_VERSION ) <EOL> self . ClientSize = Size ( <NUM_LIT> , <NUM_LIT> ) <EOL> self . Controls . Add ( scrape_label ) <EOL> self . Controls . Add ( skip_label ) <EOL> self . Controls . Add ( ok ) <EOL> ok . TabIndex = <NUM_LIT:0> <EOL> def __build_scrape_label ( self , scraped_n ) : <EOL> '''<STR_LIT>''' <EOL> label = Label ( ) <EOL> label . UseMnemonic = False <EOL> label . Location = Point ( <NUM_LIT:10> , <NUM_LIT:10> ) <EOL> label . Size = Size ( <NUM_LIT> , <NUM_LIT> ) <EOL> label . TextAlign = ContentAlignment . MiddleCenter <EOL> label . Text = i18n . get ( "<STR_LIT>" ) if scraped_n == <NUM_LIT:1> else i18n . get ( "<STR_LIT>" ) . format ( scraped_n ) <EOL> return label <EOL> def __build_skip_label ( self , skipped_n ) : <EOL> '''<STR_LIT>''' <EOL> label = Label ( ) <EOL> label . UseMnemonic = False <EOL> label . Location = Point ( <NUM_LIT:10> , <NUM_LIT:30> ) <EOL> label . Size = Size ( <NUM_LIT> , <NUM_LIT> ) <EOL> label . TextAlign = ContentAlignment . MiddleCenter <EOL> label . Text = i18n . get ( "<STR_LIT>" ) if skipped_n == <NUM_LIT:1> else i18n . get ( "<STR_LIT>" ) . format ( skipped_n ) <EOL> return label <EOL> def __build_okbutton ( self ) : <EOL> '''<STR_LIT>''' <EOL> button = Button ( ) <EOL> button . DialogResult = DialogResult . OK <EOL> button . Location = Point ( <NUM_LIT> , <NUM_LIT> ) <EOL> button . Size = Size ( <NUM_LIT> , <NUM_LIT> ) <EOL> button . Text = i18n . get ( "<STR_LIT>" ) <EOL> button . UseVisualStyleBackColor = True <EOL> return button <EOL> def show_form ( self ) : <EOL> '''<STR_LIT>''' <EOL> self . ShowDialog ( ) <EOL> return None </s>
