File: w_about_explorer.srw
Size: 6177
Date: Mon, 07 Apr 2008 21:33:15 +0200
$PBExportHeader$w_about_explorer.srw
forward
global type w_about_explorer from w_response
end type
type st_linebottom from u_st within w_about_explorer
end type
type st_linetop from u_st within w_about_explorer
end type
type dw_list from u_dwlv within w_about_explorer
end type
type st_2 from u_st within w_about_explorer
end type
type uo_1 from u_borderpanel within w_about_explorer
end type
type st_1 from u_st within w_about_explorer
end type
type st_appname from u_st within w_about_explorer
end type
type lv_1 from u_lv within w_about_explorer
end type
type st_3 from u_st within w_about_explorer
end type
type cb_close from u_cb within w_about_explorer
end type
end forward

global type w_about_explorer from w_response
integer height = 1240
long backcolor = 1073741824
boolean #allowresize = false
st_linebottom st_linebottom
st_linetop st_linetop
dw_list dw_list
st_2 st_2
uo_1 uo_1
st_1 st_1
st_appname st_appname
lv_1 lv_1
st_3 st_3
cb_close cb_close
end type
global w_about_explorer w_about_explorer

forward prototypes
protected subroutine of_loadlibraries ()
end prototypes

protected subroutine of_loadlibraries ();n_svc_mgr lnv_svc
n_svc_string lnv_str
n_svc_files lnv_f
string ls_liblist, ls_libs[], ls_filename, ls_class, ls_version
long ll_count, n
powerobject lpo
ClassDefinition lcd

lnv_svc.of_LoadSvc(lnv_str, CSvc.STRING)
lnv_svc.of_LoadSvc(lnv_f, CSvc.FILES)

ls_liblist = GetLibraryList()
ll_count = lnv_str.of_parsetoarray(ls_liblist, ",", ls_libs)
FOR n = 1 to ll_count
   ls_filename = lnv_f.of_getfilename(ls_libs[n])
   ls_class = MID(ls_filename, 1, POS(ls_filename, ".") - 1)
   //try to get version
   TRY
      lcd = FindClassDefinition(ls_class)
      IF ISVALID(lcd) THEN
         lpo = CREATE USING ls_class
         ls_version = lpo.DYNAMIC of_GetVersion()
         IF ISVALID(lpo) THEN DESTROY lpo
      ELSE
         ls_version = "N/A"
      END IF
   CATCH (throwable ex)
      IF ISVALID(lpo) THEN DESTROY lpo
      ls_version = "N/A"
   END TRY
   dw_list.InsertRow(0)
   dw_list.SetItem(n, "objectname", ls_filename)
   dw_list.SetItem(n, "version", ls_version)
NEXT

dw_list.SetSort("objectname ASC")
dw_list.Sort()
dw_list.SelectRow(0, FALSE)
dw_list.SelectRow(1, TRUE)
end subroutine

on w_about_explorer.create
int iCurrent
call super::create
this.st_linebottom=create st_linebottom
this.st_linetop=create st_linetop
this.dw_list=create dw_list
this.st_2=create st_2
this.uo_1=create uo_1
this.st_1=create st_1
this.st_appname=create st_appname
this.lv_1=create lv_1
this.st_3=create st_3
this.cb_close=create cb_close
iCurrent=UpperBound(this.Control)
this.Control[iCurrent+1]=this.st_linebottom
this.Control[iCurrent+2]=this.st_linetop
this.Control[iCurrent+3]=this.dw_list
this.Control[iCurrent+4]=this.st_2
this.Control[iCurrent+5]=this.uo_1
this.Control[iCurrent+6]=this.st_1
this.Control[iCurrent+7]=this.st_appname
this.Control[iCurrent+8]=this.lv_1
this.Control[iCurrent+9]=this.st_3
this.Control[iCurrent+10]=this.cb_close
end on

on w_about_explorer.destroy
call super::destroy
destroy(this.st_linebottom)
destroy(this.st_linetop)
destroy(this.dw_list)
destroy(this.st_2)
destroy(this.uo_1)
destroy(this.st_1)
destroy(this.st_appname)
destroy(this.lv_1)
destroy(this.st_3)
destroy(this.cb_close)
end on

event ke_postinit;call super::ke_postinit;window lw

lw = parentwindow()

this.title = "About " + lw.title
st_appname.Text = lw.Title

of_loadlibraries()
end event

type uo_sizegrip from w_response`uo_sizegrip within w_about_explorer
end type

type st_linebottom from u_st within w_about_explorer
integer y = 968
integer width = 1883
integer height = 4
long textcolor = 268435456
long backcolor = 1073741824
string text = ""
boolean border = true
long bordercolor = 268435456
boolean #usethemebordercolor = true
end type

type st_linetop from u_st within w_about_explorer
integer y = 248
integer width = 1883
integer height = 4
long textcolor = 268435456
long backcolor = 1073741824
string text = ""
boolean border = true
long bordercolor = 268435456
boolean #usethemebordercolor = true
end type

type dw_list from u_dwlv within w_about_explorer
integer x = 311
integer y = 384
integer taborder = 30
string dataobject = "library_list"
boolean border = false
boolean #sortheaders = false
integer #selectionmode = 1
end type

type st_2 from u_st within w_about_explorer
integer x = 73
integer y = 280
integer width = 329
integer height = 64
string text = "Library List"
end type

type uo_1 from u_borderpanel within w_about_explorer
integer x = 55
integer y = 352
integer width = 1737
integer height = 544
integer taborder = 20
string #childobject = "dw_list"
end type

on uo_1.destroy
call u_borderpanel::destroy
end on

type st_1 from u_st within w_about_explorer
integer x = 311
integer y = 176
integer width = 329
integer height = 64
long textcolor = 268435456
long backcolor = 1073741824
string text = "Version 1.0"
end type

type st_appname from u_st within w_about_explorer
integer x = 293
integer y = 56
integer width = 1463
integer height = 128
integer textsize = -16
long backcolor = 1073741824
string text = ""
end type

type lv_1 from u_lv within w_about_explorer
integer x = 91
integer y = 48
integer width = 174
integer height = 148
boolean border = false
borderstyle borderstyle = stylebox!
boolean scrolling = false
listviewview view = listviewlist!
string item[] = {""}
integer itempictureindex[] = {1}
string largepicturename[] = {"",""}
integer largepicturewidth = 32
integer largepictureheight = 32
string smallpicturename[] = {"main.ico"}
integer smallpicturewidth = 32
integer smallpictureheight = 32
end type

type st_3 from u_st within w_about_explorer
integer y = 256
integer width = 1902
integer height = 928
string text = ""
end type

type cb_close from u_cb within w_about_explorer
integer x = 1449
integer y = 1024
integer taborder = 40
boolean bringtotop = true
string text = "Close"
boolean cancel = true
boolean default = true
end type

event clicked;call super::clicked;Close(parent)
end event