File: w_crypto.srw
Size: 3594
Date: Mon, 07 Apr 2008 21:31:32 +0200
$PBExportHeader$w_crypto.srw
$PBExportComments$Crypto Window Utility
forward
global type w_crypto from w_main
end type
type cb_decrypt from u_cb within w_crypto
end type
type cb_encrypt from u_cb within w_crypto
end type
type st_3 from u_st within w_crypto
end type
type sle_password from u_sle within w_crypto
end type
type sle_result from u_sle within w_crypto
end type
type st_2 from u_st within w_crypto
end type
type sle_source from u_sle within w_crypto
end type
type st_1 from u_st within w_crypto
end type
end forward

global type w_crypto from w_main
integer width = 1504
integer height = 600
string title = "Crypto Utility"
boolean minbox = false
boolean maxbox = false
string icon = "WebPBWizard!"
cb_decrypt cb_decrypt
cb_encrypt cb_encrypt
st_3 st_3
sle_password sle_password
sle_result sle_result
st_2 st_2
sle_source sle_source
st_1 st_1
end type
global w_crypto w_crypto

on w_crypto.create
int iCurrent
call super::create
this.cb_decrypt=create cb_decrypt
this.cb_encrypt=create cb_encrypt
this.st_3=create st_3
this.sle_password=create sle_password
this.sle_result=create sle_result
this.st_2=create st_2
this.sle_source=create sle_source
this.st_1=create st_1
iCurrent=UpperBound(this.Control)
this.Control[iCurrent+1]=this.cb_decrypt
this.Control[iCurrent+2]=this.cb_encrypt
this.Control[iCurrent+3]=this.st_3
this.Control[iCurrent+4]=this.sle_password
this.Control[iCurrent+5]=this.sle_result
this.Control[iCurrent+6]=this.st_2
this.Control[iCurrent+7]=this.sle_source
this.Control[iCurrent+8]=this.st_1
end on

on w_crypto.destroy
call super::destroy
destroy(this.cb_decrypt)
destroy(this.cb_encrypt)
destroy(this.st_3)
destroy(this.sle_password)
destroy(this.sle_result)
destroy(this.st_2)
destroy(this.sle_source)
destroy(this.st_1)
end on

type cb_decrypt from u_cb within w_crypto
integer x = 1079
integer y = 176
integer taborder = 50
string text = "Decrypt"
boolean #anchorright = true
end type

event clicked;call super::clicked;n_svc_mgr lnv_svc
n_svc_crypto lnv_c

lnv_svc.of_LoadSvc(lnv_c, CSvc.CRYPTO)
sle_result.text = lnv_c.of_decryptdata(sle_source.text, sle_password.text)
end event

type cb_encrypt from u_cb within w_crypto
integer x = 1079
integer y = 52
integer taborder = 40
string text = "Encrypt"
boolean #anchorright = true
end type

event clicked;call super::clicked;n_svc_mgr lnv_svc
n_svc_crypto lnv_c

lnv_svc.of_LoadSvc(lnv_c, CSvc.CRYPTO)
sle_result.text = lnv_c.of_encryptdata(sle_source.text, sle_password.text)
end event

type st_3 from u_st within w_crypto
integer x = 55
integer y = 72
integer width = 233
string text = "CryptKey:"
end type

type sle_password from u_sle within w_crypto
integer x = 311
integer y = 52
integer width = 727
integer taborder = 10
string text = ""
boolean #anchorleft = true
boolean #anchorright = true
end type

type sle_result from u_sle within w_crypto
integer x = 311
integer y = 308
integer width = 727
integer taborder = 30
string text = ""
boolean #anchorleft = true
boolean #anchorright = true
end type

type st_2 from u_st within w_crypto
integer x = 55
integer y = 328
integer width = 215
string text = "Result:"
end type

type sle_source from u_sle within w_crypto
integer x = 311
integer y = 176
integer width = 727
integer taborder = 20
string text = ""
boolean #anchorleft = true
boolean #anchorright = true
end type

type st_1 from u_st within w_crypto
integer x = 55
integer y = 192
integer width = 215
string text = "Source:"
end type