From aece2e4e4d9363be64f2156d9190eaf71d7e5132 Mon Sep 17 00:00:00 2001 From: wabdel Date: Sat, 18 Jul 2020 01:52:21 +0300 Subject: [PATCH 1/7] Doc --- .DS_Store | Bin 0 -> 6148 bytes Builds - mmctp/.DS_Store | Bin 0 -> 6148 bytes Builds - mmctp/OS X 64 bit/.DS_Store | Bin 0 -> 6148 bytes Utility/Class_Preference.xojo_code | 67 +++++++++++++++++++-------- mmctp.xojo_project | 6 +-- 5 files changed, 50 insertions(+), 23 deletions(-) create mode 100644 .DS_Store create mode 100644 Builds - mmctp/.DS_Store create mode 100644 Builds - mmctp/OS X 64 bit/.DS_Store diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..8d66dea4e1965318770cb83feac565877abaa3f0 GIT binary patch literal 6148 zcmeHKJx{|h5WRy8kr=4N0Hc2aQg;SZ!U#etGlDdz46Tx-Gx>%;Gc=rKnMFfZe zA#@kn?|i;<>=(sn6A@2V&6sFJL?wzKi!vZ$9_-q3=K{z&#swWxL$_4ZYG9zhXp*__ z(ixr;x}^2_&#{&p>Zn`H$J1H6>}2}I^ZC)&5zDr!>P1__vwYa!d%VATI{r>n^Mk1F zZf$li@*P8hfnXpQ2nK?IPZ>bY7AbcOqYegwfneaB0oflCiePr^4Rz~4rB?u;9HUjB z>lqZ7!~o2Wy&)_RwossjvR^US!eLMDmmPaU3n$h$V;q0;+vSD*1k6d@iL+tU!9Xyu z$-uTXN0R?f@hc5p@;5`G6$}Ie|BL}Hs%bUBqCB^LSf1qCgmR4{B7VIn5a^nUftrfZ hkbUGpJFP#7j{fY}8_FnR*KlAQ1eB1df`MOP;1z@1Hk<$e literal 0 HcmV?d00001 diff --git a/Builds - mmctp/.DS_Store b/Builds - mmctp/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..ffcb01ca7ce134f948bb30779e2c823cdd4986f7 GIT binary patch literal 6148 zcmeHK&1%~~5T13MR@;Q4LZK=2u+T#z3f=8k#Z#v)^cTW>)%E><<8lZWXNqxB%dw5;i0@e-Y{@ zU66+L5DHyG!6tM-K?uo0G&}x9259b9U>AIxwGXI&=C2GV<58IAAx8WRM``})wmlJ1NViWL~$4t2T4>8_v5Ue#z%3sTf7a*xcErH z`+1&XfU$${eG*Rw?$bAURt8BH7rLIQ@#!GRqI}ZLt1KGpcw1cCdqFwGI`XAgjWn~; zkpuVHblTZ&sg2I-SxZf~w%RS#+1Q-Tq;#IY+Ijb-`gVMBdUk&C{l}%54uOBJmM0eH zaD~P#%pCbemgd=4jF@N7vly8HW`G&E4-D9~%UQV(FU#-93@`(C$^fko3YE~aSR2$! z2R3wkr2Zx$3EFg*AXFATi?u=QK@lbu(WDA{#SkVP{mRC97Hfkh9fTek>)4Tny`cy_ zI{K9k2jLmymKk6MZZfcB9$ni1`?uf!Zzk~*Gr$b|R}6?|&+m2dlkDEQ@Nu-)D%3+% q5{j!0{!T$dZ^al(Tk#sI7W6AJ5Iu{vLG+;TK|s^M4Kr}34EzGu&R~)N literal 0 HcmV?d00001 diff --git a/Builds - mmctp/OS X 64 bit/.DS_Store b/Builds - mmctp/OS X 64 bit/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..8b8e4f51898926598697c8767e14cb2590baea27 GIT binary patch literal 6148 zcmeHK%}N6?5T3C;ta#~BZ@CL%-yqiYC!|M=y`u{(#lCsq5vYSwdSKJ+1Tc;`!_=%hfk6+xwlFUr!M( zBp3(=f`MQl82C{JaA#Ah1H-6;fnXpQ_+WtNLqZ{D$Ih@E9jHnQ0OT{e2-?gg=#w0? zV`m5rM9mdwuIedv=uHru=UGv_0On3FQWbLc5L)2->|z06IKJ4vW(CiEY?r W$Ig&ZI9}X=@enA4L=_DD0t0W(NG)mr literal 0 HcmV?d00001 diff --git a/Utility/Class_Preference.xojo_code b/Utility/Class_Preference.xojo_code index c2e26d6..aff8261 100644 --- a/Utility/Class_Preference.xojo_code +++ b/Utility/Class_Preference.xojo_code @@ -47,46 +47,73 @@ Protected Class Class_Preference // A Alexander 2012 // Update MsgBox for main folder location //------------------------------------------------- - Dim fi,b,c as FolderItem + Var fi,b,c As FolderItem //--------------------------------------------------- - if TargetWindows Then - fi=SpecialFolder.Applications + + #If TargetWindows Then + + fi_new=Xojo.IO.SpecialFolder.ApplicationSupport b=fi.child("McGill Medical Physics") - if b= nil Then + + If b= Nil Then + MsgBox("MMCTP not installed. The folder called 'McGill Medical Physics' was not found within applications folder " +fi.name+ ". Nil object returned.") Quit - else + + Else + c=b.Child("MMCTP") - if c=nil Then + + If c=Nil Then + MsgBox("MMCTP not installed. The folder called MMCTP was not found within applications folder " +b.name+ ". Nil object returned.") Quit - else + + Else + Return c - end - end - elseif TargetMacOS Then - fi=SpecialFolder.Applications - b=fi.child("MMCTP") - elseif TargetLinux Then + + End + + End + + #ElseIf TargetMacOS Then + // Changed from special folder due to catalina problems. + //SpecialFolder.Applications gives a native path of /System/Applications + // Change by Wamied ABdel-Rahman 18 July 2020 + + f i= New FolderItem("/Applications", FolderItem.PathModes.Native) + b = fi.Child("MMCTP") + + #ElseIf TargetLinux Then + fi=SpecialFolder.UserLibrary //2011 Linux UPDATE for MMCTP Install area b=fi.child("MMCTP") - else + + #Else + MsgBox("OS not determined!") Quit - end + + #EndIf - if b=nil Then + If b=Nil Then MsgBox("MMCTP not installed. The folder called MMCTP was not found within applications folder " +fi.name+ ". Nil object returned.") Quit - end + + End - if b.Exists=False Then + If b.Exists=False Then + MsgBox("MMCTP not installed, app folder at location "+b.ShellPath+" does not exist") Quit - else + + Else + Return b - end + + End End Function #tag EndMethod diff --git a/mmctp.xojo_project b/mmctp.xojo_project index 67bf727..649b5aa 100644 --- a/mmctp.xojo_project +++ b/mmctp.xojo_project @@ -1,5 +1,5 @@ Type=Desktop -RBProjectVersion=2019.031 +RBProjectVersion=2019.032 MinIDEVersion=20070100 OrigIDEVersion=20190310 Folder=Utility;Utility;&h0000000022CC0B19;&h0000000000000000;false @@ -352,7 +352,7 @@ AppMenuBar=File MajorVersion=9 MinorVersion=2 SubVersion=0 -NonRelease=493 +NonRelease=494 Release=2 InfoVersion= LongVersion= @@ -362,7 +362,7 @@ WinInternalName= WinProductName=McGill Monte Carlo Treatment Planning WinFileDescription= AutoIncrementVersionInformation=True -BuildFlags=&h910 +BuildFlags=&h1900 BuildLanguage=&h1 DebugLanguage=&h1 Region=0 From efbe0ae7744ba10a4b1aa8413258679701ba0d6c Mon Sep 17 00:00:00 2001 From: wabdel Date: Sat, 18 Jul 2020 08:48:51 +0300 Subject: [PATCH 2/7] doc --- Builds - mmctp/OS X 64 bit/.DS_Store | Bin 6148 -> 6148 bytes Utility/Class_Preference.xojo_code | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/Builds - mmctp/OS X 64 bit/.DS_Store b/Builds - mmctp/OS X 64 bit/.DS_Store index 8b8e4f51898926598697c8767e14cb2590baea27..4de48b8ce2f07e27d90a9009367b2e8aaea5507a 100644 GIT binary patch delta 53 zcmZoMXffDez{r$wU~&wj#AGiRk(BN Date: Sat, 18 Jul 2020 23:09:22 +0300 Subject: [PATCH 3/7] Fix MLC conversion problem. Had to modify local_endoffile. As of 2013r1 EndofLine.macos returns endofline.unix. This was causing a problem with spliting .MLC files. Removed conditon for mac and combined it wilt unix. --- .../Class_BEAM_CM_DYNVMLC.xojo_code | 317 ++++++++++-------- Builds - mmctp/OS X 64 bit/.DS_Store | Bin 6148 -> 6148 bytes RTOG Class/RTOG Plan/RTOG_Plan.xojo_code | 2 +- Utility/App.xojo_code | 41 ++- Utility/Class_Shell_One.xojo_code | 20 +- ...ndow_Configurations_Beam_Model.xojo_window | 4 +- .../Window_Configurations_Shell.xojo_window | 5 +- Utility/Window_Progress.xojo_window | 2 +- mmctp.xojo_project | 2 +- 9 files changed, 217 insertions(+), 176 deletions(-) diff --git a/BEAMnrc/BEAMnrc-CMS/Class_BEAM_CM_DYNVMLC.xojo_code b/BEAMnrc/BEAMnrc-CMS/Class_BEAM_CM_DYNVMLC.xojo_code index dcbbe69..a1f0598 100644 --- a/BEAMnrc/BEAMnrc-CMS/Class_BEAM_CM_DYNVMLC.xojo_code +++ b/BEAMnrc/BEAMnrc-CMS/Class_BEAM_CM_DYNVMLC.xojo_code @@ -6,23 +6,23 @@ Protected Class Class_BEAM_CM_DYNVMLC // READIN DYNVMLC CM into variables // //----------------------------------------------- - Dim dynvmlc as Class_Beam_cm_DYNVMLC - Dim DYN1 as Class_BEAM_CM_DYNVMLC_Leaf_Full - Dim DYN2 as Class_BEAM_CM_DYNVMLC_Leaf_Target - Dim DYN3 as Class_BEAM_CM_DYNVMLC_Leaf_Iso - Dim gg as Class_BEAM_CM_DYNVMLC_Leaf_Group - Dim k,i,index,num_slabs,j,m as integer - Dim temp as String - Dim bottom as Single + Var dynvmlc As Class_Beam_cm_DYNVMLC + Var DYN1 As Class_BEAM_CM_DYNVMLC_Leaf_Full + Var DYN2 As Class_BEAM_CM_DYNVMLC_Leaf_Target + Var DYN3 As Class_BEAM_CM_DYNVMLC_Leaf_Iso + Var gg As Class_BEAM_CM_DYNVMLC_Leaf_Group + Var k,i,index,num_slabs,j,m As Integer + Var temp As String + Var bottom As Single //----------------------------------------------- // BEAMnrc cm is from DYNVMLC STATIC - RMAX_CM=val(NthField((text(0)),",",1)) - Title_CM=text(1) + RMAX_CM=Val(NthField((Text(0)),",",1)) + Title_CM=Text(1) // Orient 0, for leaves parallel to Y direction // 1 for leaves parallel to X direction - Orient_DYNVMLC=val(NthField((text(2)),",",1)) + Orient_DYNVMLC=Val(NthField((Text(2)),",",1)) // NGROUP_$DYNVMLC = number of groups of adjacent leaves where // all leaves in a group are: @@ -30,110 +30,117 @@ Protected Class Class_BEAM_CM_DYNVMLC // 2. TARGET/ISOCENTER pairs with TARGET leaf // on the -X (ORIENT=0) or -Y (ORIENT=1) side // NGROUP_$DYNVMLC defaults to 3 if set <=0 - NGROUP_DYNVMLC=val(NthField((text(2)),",",2)) + NGROUP_DYNVMLC=Val(NthField((Text(2)),",",2)) // Step and shoot or Dynamic - MODE_DYNVMLC=val(NthField((text(2)),",",3)) + MODE_DYNVMLC=Val(NthField((Text(2)),",",3)) - ZMIN=val(NthField((text(3)),",",1)) - ZThick=val(NthField((text(4)),",",1)) + ZMIN=Val(NthField((Text(3)),",",1)) + ZThick=Val(NthField((Text(4)),",",1)) - DYN1 =new Class_BEAM_CM_DYNVMLC_Leaf_Full - DYN2 =new Class_BEAM_CM_DYNVMLC_Leaf_Target - DYN3 =new Class_BEAM_CM_DYNVMLC_Leaf_Iso + DYN1 =New Class_BEAM_CM_DYNVMLC_Leaf_Full + DYN2 =New Class_BEAM_CM_DYNVMLC_Leaf_Target + DYN3 =New Class_BEAM_CM_DYNVMLC_Leaf_Iso Full=DYN1 Target=DYN2 Isocenter=DYN3 - DYN1.Leafwidths=Trim(text(5)) - DYN1.LeafWidth=val(NthField(DYN1.Leafwidths,",",1)) - DYN1.WTongue=val(NthField(DYN1.Leafwidths,",",2)) - DYN1.Wgroove=val(NthField(DYN1.Leafwidths,",",3)) - DYN1.WTIP=val(NthField(DYN1.Leafwidths,",",4)) - DYN1.WrailTop=val(NthField(DYN1.Leafwidths,",",5)) - DYN1.Wrailbot=val(NthField(DYN1.Leafwidths,",",6)) - DYN1.ZTip=val(NthField(DYN1.Leafwidths,",",7)) - DYN1.Zleaf=val(NthField(DYN1.Leafwidths,",",8)) - DYN1.ZTongue=val(NthField(DYN1.Leafwidths,",",9)) - DYN1.ZGroove=val(NthField(DYN1.Leafwidths,",",10)) - DYN1.Zholetop=val(NthField(DYN1.Leafwidths,",",11)) - DYN1.ZHoleBot=val(NthField(DYN1.Leafwidths,",",12)) - DYN1.Holepos=val(NthField(DYN1.Leafwidths,",",13)) - DYN1.Zrailtop=val(NthField(DYN1.Leafwidths,",",14)) - DYN1.Zrailbot=val(NthField(DYN1.Leafwidths,",",15)) - - - DYN2.Leafwidths=Trim(text(6)) - DYN2.LeafWidth=val(NthField(DYN2.Leafwidths,",",1)) - DYN2.WTongue=val(NthField(DYN2.Leafwidths,",",2)) - DYN2.Wgroove=val(NthField(DYN2.Leafwidths,",",3)) - DYN2.WTIP=val(NthField(DYN2.Leafwidths,",",4)) - DYN2.WrailTop=val(NthField(DYN2.Leafwidths,",",5)) - DYN2.Wrailbot=val(NthField(DYN2.Leafwidths,",",6)) - - DYN2.Zrailtop=val(NthField(DYN2.Leafwidths,",",7)) - DYN2.Zrailbot=val(NthField(DYN2.Leafwidths,",",8)) - - - DYN2.Zholetop=val(NthField(DYN2.Leafwidths,",",9)) - DYN2.ZHoleBot=val(NthField(DYN2.Leafwidths,",",10)) - DYN2.Holepos=val(NthField(DYN2.Leafwidths,",",11)) - - DYN2.ZTongue=val(NthField(DYN2.Leafwidths,",",12)) - DYN2.ZGroove=val(NthField(DYN2.Leafwidths,",",13)) - DYN2.Zleaf=val(NthField(DYN2.Leafwidths,",",14)) - DYN2.ZTip=val(NthField(DYN2.Leafwidths,",",15)) - - - DYN3.Leafwidths=Trim(text(7)) - DYN3.LeafWidth=val(NthField(DYN3.Leafwidths,",",1)) - DYN3.WTongue=val(NthField(DYN3.Leafwidths,",",2)) - DYN3.Wgroove=val(NthField(DYN3.Leafwidths,",",3)) - DYN3.WTIP=val(NthField(DYN3.Leafwidths,",",4)) - DYN3.WrailTop=val(NthField(DYN3.Leafwidths,",",5)) - DYN3.Wrailbot=val(NthField(DYN3.Leafwidths,",",6)) - DYN3.ZTip=val(NthField(DYN3.Leafwidths,",",7)) - DYN3.Zleaf=val(NthField(DYN3.Leafwidths,",",8)) - DYN3.ZTongue=val(NthField(DYN3.Leafwidths,",",9)) - DYN3.ZGroove=val(NthField(DYN3.Leafwidths,",",10)) - DYN3.Zholetop=val(NthField(DYN3.Leafwidths,",",11)) - DYN3.ZHoleBot=val(NthField(DYN3.Leafwidths,",",12)) - DYN3.HolePos_Iso=val(NthField(DYN3.Leafwidths,",",13)) - DYN3.Zrailtop=val(NthField(DYN3.Leafwidths,",",14)) - DYN3.Zrailbot=val(NthField(DYN3.Leafwidths,",",15)) - - for k=0 to NGROUP_DYNVMLC-1 - gg=new Class_BEAM_CM_DYNVMLC_Leaf_Group - gg.Numleaves=val(NthField(text(8+k),",",1)) - gg.Leaftype=val(NthField(text(8+k),",",2)) + DYN1.Leafwidths=Trim(Text(5)) + DYN1.LeafWidth=Val(NthField(DYN1.Leafwidths,",",1)) + DYN1.WTongue=Val(NthField(DYN1.Leafwidths,",",2)) + DYN1.Wgroove=Val(NthField(DYN1.Leafwidths,",",3)) + DYN1.WTIP=Val(NthField(DYN1.Leafwidths,",",4)) + DYN1.WrailTop=Val(NthField(DYN1.Leafwidths,",",5)) + DYN1.Wrailbot=Val(NthField(DYN1.Leafwidths,",",6)) + DYN1.ZTip=Val(NthField(DYN1.Leafwidths,",",7)) + DYN1.Zleaf=Val(NthField(DYN1.Leafwidths,",",8)) + DYN1.ZTongue=Val(NthField(DYN1.Leafwidths,",",9)) + DYN1.ZGroove=Val(NthField(DYN1.Leafwidths,",",10)) + DYN1.Zholetop=Val(NthField(DYN1.Leafwidths,",",11)) + DYN1.ZHoleBot=Val(NthField(DYN1.Leafwidths,",",12)) + DYN1.Holepos=Val(NthField(DYN1.Leafwidths,",",13)) + DYN1.Zrailtop=Val(NthField(DYN1.Leafwidths,",",14)) + DYN1.Zrailbot=Val(NthField(DYN1.Leafwidths,",",15)) + + + DYN2.Leafwidths=Trim(Text(6)) + DYN2.LeafWidth=Val(NthField(DYN2.Leafwidths,",",1)) + DYN2.WTongue=Val(NthField(DYN2.Leafwidths,",",2)) + DYN2.Wgroove=Val(NthField(DYN2.Leafwidths,",",3)) + DYN2.WTIP=Val(NthField(DYN2.Leafwidths,",",4)) + DYN2.WrailTop=Val(NthField(DYN2.Leafwidths,",",5)) + DYN2.Wrailbot=Val(NthField(DYN2.Leafwidths,",",6)) + + DYN2.Zrailtop=Val(NthField(DYN2.Leafwidths,",",7)) + DYN2.Zrailbot=Val(NthField(DYN2.Leafwidths,",",8)) + + + DYN2.Zholetop=Val(NthField(DYN2.Leafwidths,",",9)) + DYN2.ZHoleBot=Val(NthField(DYN2.Leafwidths,",",10)) + DYN2.Holepos=Val(NthField(DYN2.Leafwidths,",",11)) + + DYN2.ZTongue=Val(NthField(DYN2.Leafwidths,",",12)) + DYN2.ZGroove=Val(NthField(DYN2.Leafwidths,",",13)) + DYN2.Zleaf=Val(NthField(DYN2.Leafwidths,",",14)) + DYN2.ZTip=Val(NthField(DYN2.Leafwidths,",",15)) + + + DYN3.Leafwidths=Trim(Text(7)) + DYN3.LeafWidth=Val(NthField(DYN3.Leafwidths,",",1)) + DYN3.WTongue=Val(NthField(DYN3.Leafwidths,",",2)) + DYN3.Wgroove=Val(NthField(DYN3.Leafwidths,",",3)) + DYN3.WTIP=Val(NthField(DYN3.Leafwidths,",",4)) + DYN3.WrailTop=Val(NthField(DYN3.Leafwidths,",",5)) + DYN3.Wrailbot=Val(NthField(DYN3.Leafwidths,",",6)) + DYN3.ZTip=Val(NthField(DYN3.Leafwidths,",",7)) + DYN3.Zleaf=Val(NthField(DYN3.Leafwidths,",",8)) + DYN3.ZTongue=Val(NthField(DYN3.Leafwidths,",",9)) + DYN3.ZGroove=Val(NthField(DYN3.Leafwidths,",",10)) + DYN3.Zholetop=Val(NthField(DYN3.Leafwidths,",",11)) + DYN3.ZHoleBot=Val(NthField(DYN3.Leafwidths,",",12)) + DYN3.HolePos_Iso=Val(NthField(DYN3.Leafwidths,",",13)) + DYN3.Zrailtop=Val(NthField(DYN3.Leafwidths,",",14)) + DYN3.Zrailbot=Val(NthField(DYN3.Leafwidths,",",15)) + + For k=0 To NGROUP_DYNVMLC-1 + + gg=New Class_BEAM_CM_DYNVMLC_Leaf_Group + gg.Numleaves=Val(NthField(Text(8+k),",",1)) + gg.Leaftype=Val(NthField(Text(8+k),",",2)) Groups.Append gg - next + + Next Numleaves=0 - for k=0 to NGROUP_DYNVMLC-1 + For k = 0 To NGROUP_DYNVMLC-1 + Numleaves=Numleaves+Groups(k).Numleaves - next + + Next + + Redim Fields(0) + Fields(0)=New Class_BEAM_CM_DYNVMLC_Fields + Redim Fields(0).leaves(Numleaves-1) - ReDim Fields(0) - Fields(0)=new Class_BEAM_CM_DYNVMLC_Fields - ReDim Fields(0).leaves(Numleaves-1) - for k=1 to Numleaves - Fields(0).leaves(k-1)=new Class_BEAM_CM_DYNVMLC_Leaf_Opening - next + For k=1 To Numleaves + + Fields(0).leaves(k-1)=New Class_BEAM_CM_DYNVMLC_Leaf_Opening + + Next index=8+NGROUP_DYNVMLC - temp=text(index) + temp=Text(index) - Start=val(NthField((text(index)),",",1)) - Leafgap=val(NthField((text(index+1)),",",1)) - Endtype=val(NthField((text(index+2)),",",1)) + Start=Val(NthField((Text(index)),",",1)) + Leafgap=Val(NthField((Text(index+1)),",",1)) + Endtype=Val(NthField((Text(index+2)),",",1)) zfocus_ends=val(NthField((text(index+3)),",",1)) Leafradius=val(NthField((text(index+3)),",",1)) zfocus_sides=val(NthField((text(index+4)),",",1)) @@ -210,65 +217,83 @@ Protected Class Class_BEAM_CM_DYNVMLC // Update April 2011 // Textfile is writin per line to speed up process //------------------------------------------------------------------------------------------------- - Dim mlcts as TextInputStream - Dim one_line,treatment_type,num_fields,num_leaves,mlc_read,allfield(-1),temp,whole,mlc_string as String - Dim i,j as Integer - Dim ts as TextOutputStream - Dim test as Boolean - Dim mlc_b as Boolean - Dim mlc_file as FolderItem + Var mlcts As TextInputStream + Var one_line,treatment_type,num_fields,num_leaves,mlc_read,allfield(-1),temp,whole,mlc_string As String + Var ts As TextOutputStream + Var test As Boolean + Var mlc_b As Boolean + Var mlc_file As FolderItem //------------------------------------------------------------------------------------------------- // Write MLC file mlc_file=gRTOG.Plan(Plan_Index).Path mlc_file=mlc_file.Child(MLC_File_Name) - if mlc_file.Exists Then + + If mlc_file.Exists Then + mlc_file.Delete - end + + End // Create MLC file for multi-MLC - if MODE_DYNVMLC=1 or MODE_DYNVMLC=2 Then + If MODE_DYNVMLC=1 Or MODE_DYNVMLC=2 Then + ts=mlc_file.CreateTextFile - if ts<> nil Then - if MODE_DYNVMLC=2 Then + + If ts<> Nil Then + + If MODE_DYNVMLC=2 Then + whole="Step and Shoot MLC"+EndOfLine.UNIX + Else + whole="Dynamic MLC"+EndOfLine.UNIX - end + + End + whole=whole+Format(UBound(Fields)+1,"#")+EndOfLine.UNIX ts.Write whole - for i =0 to UBound(Fields) + For i As Integer = 0 To UBound(Fields) // Write Index of field whole=Format(Fields(i).Index,"#.######")+EndOfLine.UNIX mlc_string="" - for j=0 to UBound(Fields(i).leaves) + + For j As Integer = 0 To UBound(Fields(i).leaves) + mlc_string=mlc_string+Format(Fields(i).leaves(j).neg,"-#.####")+", "+Format(Fields(i).leaves(j).pos,"-#.####")+", 1"+EndOfLine.UNIX - next + + Next + whole=whole+mlc_string ts.Write whole - next + + Next + ts.Close - else + + Else + gBEAM.egs_msg.append "Error ! could not creat MLC file : "+MLC_File.Name - end - end + End + End //------------------------------------------------------------------------------------------------- // Now rewite CM with new opening - ReDim cm.text(-1) + Redim cm.Text(-1) - cm.text.Append Format(RMAX_CM,"-0.0###")+", RMAX" - cm.text.Append Title_CM - CM.text.Append Format(Orient_DYNVMLC,"-#")+", "+Format(NGROUP_DYNVMLC,"-#")+", "+Format(MODE_DYNVMLC,"-#")+", ORIENT, NGROUP, MODE" - CM.text.Append Format(ZMIN,"-0.0###")+", ZMIN" - CM.text.Append Format(ZThick,"-0.0###")+", ZTHICK" + cm.Text.Append Format(RMAX_CM,"-0.0###")+", RMAX" + cm.Text.Append Title_CM + CM.Text.Append Format(Orient_DYNVMLC,"-#")+", "+Format(NGROUP_DYNVMLC,"-#")+", "+Format(MODE_DYNVMLC,"-#")+", ORIENT, NGROUP, MODE" + CM.Text.Append Format(ZMIN,"-0.0###")+", ZMIN" + CM.Text.Append Format(ZThick,"-0.0###")+", ZTHICK" // Full leaves - CM.text.Append Format(Full.LeafWidth,"-0.0####") +", "+ Format(Full.WTongue,"-0.0####") +", "+ Format(Full.Wgroove,"-0.0####")_ + CM.Text.Append Format(Full.LeafWidth,"-0.0####") +", "+ Format(Full.WTongue,"-0.0####") +", "+ Format(Full.Wgroove,"-0.0####")_ +", "+ Format(Full.WTIP,"-0.0####") +", "+ Format(Full.WrailTop,"-0.0####") +", "+ Format(Full.Wrailbot,"-0.0####") _ +", "+ Format(Full.ZTip,"-0.0#####") +", "+ Format(Full.Zleaf,"-0.0#####") +", "+ Format(Full.ZTongue,"-0.0#####") _ +", "+ Format(Full.ZGroove,"-0.0#####") +", "+ Format(Full.Zholetop,"-0.0#####") +", "+ Format(Full.ZHoleBot,"-0.0#####")_ @@ -276,48 +301,56 @@ Protected Class Class_BEAM_CM_DYNVMLC // For Target Leaves - CM.text.Append Format(Target.LeafWidth,"-0.0####") +", "+ Format(Target.WTongue,"-0.0####") +", "+ Format(Target.Wgroove,"-0.0####") +", "+ _ + CM.Text.Append Format(Target.LeafWidth,"-0.0####") +", "+ Format(Target.WTongue,"-0.0####") +", "+ Format(Target.Wgroove,"-0.0####") +", "+ _ Format(Target.WTIP,"-0.0####") +", "+ Format(Target.WrailTop,"-0.0####")+", "+ Format(Target.Wrailbot,"-0.0####") +", "+ _ Format(Target.Zrailtop,"-0.0####") +", "+ Format(Target.Zrailbot,"-0.0####") +", "+ Format(Target.ZHoleBot,"-0.0####") +", "+ _ Format(Target.ZHoleBot,"-0.0####") +", "+ Format(Target.Holepos,"-0.0####") +", "+ Format(Target.ZTongue,"-0.0####") +", "+ _ Format(Target.ZGroove,"-0.0####") +", "+ Format(Target.Zleaf,"-0.0####") +", "+ Format(Target.ZTip,"-0.0####") - CM.text.Append Format(Isocenter.LeafWidth,"-0.0####") +", "+ Format(Isocenter.WTongue,"-0.0####") +", "+ Format(Isocenter.Wgroove,"-0.0####") +", "+ _ + CM.Text.Append Format(Isocenter.LeafWidth,"-0.0####") +", "+ Format(Isocenter.WTongue,"-0.0####") +", "+ Format(Isocenter.Wgroove,"-0.0####") +", "+ _ Format(Isocenter.WTIP,"-0.0####") +", "+ Format(Isocenter.WrailTop,"-0.0####") +", "+ Format(Isocenter.Wrailbot,"-0.0####") +", "+_ Format(Isocenter.ZTip,"-0.0###") +", "+ Format(Isocenter.Zleaf,"-0.0###") +", "+ Format(Isocenter.ZTongue,"-0.0####")+", "+ _ Format(Isocenter.ZGroove,"-0.0####")+", "+ Format(Isocenter.Zholetop,"-0.0####")+", "+ Format(Isocenter.ZHoleBot,"-0.0####")+", "+ _ Format(Isocenter.HolePos_Iso,"-0.0####")+", "+ Format(Isocenter.Zrailtop,"-0.0####")+", "+ Format(Isocenter.Zrailbot,"-0.0####") - for i=0 to UBound(Groups) - cm.text.Append Format(Groups(i).Numleaves,"#")+", "+Format(Groups(i).Leaftype,"#") - next + For i as Integer = 0 To UBound(Groups) + + cm.Text.Append Format(Groups(i).Numleaves,"#")+", "+Format(Groups(i).Leaftype,"#") + + Next - CM.text.Append Format(Start,"-0.0####")+", START" - CM.text.Append Format(Leafgap,"-0.0####")+", LEAFGAP" - CM.text.Append Format(Endtype,"#")+", ENDTYPE" - CM.text.Append Format(zfocus_ends,"-0.0####")+", ZFOCUS or RADIUS of leaf ends" - CM.text.Append Format(zfocus_sides,"-0.0####")+", ZFOCUS of leaf sides" + CM.Text.Append Format(Start,"-0.0####")+", START" + CM.Text.Append Format(Leafgap,"-0.0####")+", LEAFGAP" + CM.Text.Append Format(Endtype,"#")+", ENDTYPE" + CM.Text.Append Format(zfocus_ends,"-0.0####")+", ZFOCUS or RADIUS of leaf ends" + CM.Text.Append Format(zfocus_sides,"-0.0####")+", ZFOCUS of leaf sides" - if MODE_DYNVMLC=0 Then // For static field - for i=0 to UBound(Fields(0).leaves) - cm.text.Append Format(cm.DYNVMLC.Fields(0).leaves(i).Neg,"-#.###")+", "+Format(Fields(0).leaves(i).Pos,"-#.###")+", 1" - next - else// For Dynamic field - cm.text.Append MLC_File_Path - end + If MODE_DYNVMLC=0 Then // For static field'' + + For i As Integer = 0 To UBound(Fields(0).leaves) + + cm.Text.Append Format(cm.DYNVMLC.Fields(0).leaves(i).Neg,"-#.###")+", "+Format(Fields(0).leaves(i).Pos,"-#.###")+", 1" + + Next + Else// For Dynamic field + + cm.Text.Append MLC_File_Path + + End // Append ECUT, PCUT and Materials - cm.text.Append Format(cm.DYNVMLC.Ecut_Air,"#.###")+", "+Format(cm.DYNVMLC.Pcut_air,"#.###")+", "+Format(cm.DYNVMLC.Dose_Zone_air,"-#")+", "+Format(cm.DYNVMLC.IRegion_to_bit_air,"#") - cm.text.Append cm.DYNVMLC.Med_In_Air + cm.Text.Append Format(cm.DYNVMLC.Ecut_Air,"#.###")+", "+Format(cm.DYNVMLC.Pcut_air,"#.###")+", "+Format(cm.DYNVMLC.Dose_Zone_air,"-#")+", "+Format(cm.DYNVMLC.IRegion_to_bit_air,"#") + cm.Text.Append cm.DYNVMLC.Med_In_Air + + cm.Text.Append Format(cm.DYNVMLC.Ecut_Leaves,"#.###")+", "+Format(cm.DYNVMLC.Pcut_Leaves,"#.###")+", "+Format(cm.DYNVMLC.Dose_Zone_Leaves,"-#")+", "+Format(cm.DYNVMLC.IRegion_to_bit_Leaves,"#")+", "+Format(cm.DYNVMLC.IGNOREGAPS,"#") + cm.Text.Append cm.DYNVMLC.Med_In_Leaves - cm.text.Append Format(cm.DYNVMLC.Ecut_Leaves,"#.###")+", "+Format(cm.DYNVMLC.Pcut_Leaves,"#.###")+", "+Format(cm.DYNVMLC.Dose_Zone_Leaves,"-#")+", "+Format(cm.DYNVMLC.IRegion_to_bit_Leaves,"#")+", "+Format(cm.DYNVMLC.IGNOREGAPS,"#") - cm.text.Append cm.DYNVMLC.Med_In_Leaves + cm.Text.Append Format(cm.DYNVMLC.Ecut_Holes,"#.###")+", "+Format(cm.DYNVMLC.Pcut_holes,"#.###")+", "+Format(cm.DYNVMLC.Dose_Zone_holes,"-#")+", "+Format(cm.DYNVMLC.IRegion_to_bit_holes,"#") + cm.Text.Append cm.DYNVMLC.Med_In_holes - cm.text.Append Format(cm.DYNVMLC.Ecut_Holes,"#.###")+", "+Format(cm.DYNVMLC.Pcut_holes,"#.###")+", "+Format(cm.DYNVMLC.Dose_Zone_holes,"-#")+", "+Format(cm.DYNVMLC.IRegion_to_bit_holes,"#") - cm.text.Append cm.DYNVMLC.Med_In_holes End Sub #tag EndMethod diff --git a/Builds - mmctp/OS X 64 bit/.DS_Store b/Builds - mmctp/OS X 64 bit/.DS_Store index 4de48b8ce2f07e27d90a9009367b2e8aaea5507a..5a43cb04e637523ce480f2e2d21bcb775e358377 100644 GIT binary patch delta 28 fcmZoMXffCj!pIu2e|Am!nil Then + + If Screen(0)<>Nil Then + App.MDIWindow.Top= Screen(0).height/2 - App.MDIWindow.height/2 - App.MDIWindow.Left = screen(0).Width/2 - (App.MDIWindow.Width/2) - end - elseif TargetMacOS then - local_endline=EndOfLine.Macintosh - else + App.MDIWindow.Left = Screen(0).Width/2 - (App.MDIWindow.Width/2) + + End + + #Else + + + //removed mac and unix conditions. THey are redundent. + //Wamied Abdel-Rahman 18 July local_endline=EndOfLine.unix - end + + #EndIf - gpref=new Class_Preference + gpref=New Class_Preference gpref.initialize // Look for User license agreement - if MMCTP_Read_License Then + If MMCTP_Read_License Then + Window_Licence.Show - else + + Else + MMCTP_Open_Application - end + + End - BackColour=rgb(200,200,200) + BackColour=RGB(200,200,200) End Sub #tag EndEvent diff --git a/Utility/Class_Shell_One.xojo_code b/Utility/Class_Shell_One.xojo_code index cf93810..5a4ac97 100644 --- a/Utility/Class_Shell_One.xojo_code +++ b/Utility/Class_Shell_One.xojo_code @@ -2,30 +2,30 @@ Protected Class Class_Shell_One #tag Method, Flags = &h0 Function Queue_Submit(queuevalue as string, inputfile as String) As String - Dim command as String + Dim command As String - if batch="at" then + If batch="at" Then command="at -q d -f "+inputfile+" -m now" - elseif batch="nqs" then - if queuevalue="" Then + Elseif batch="nqs" Then + If queuevalue="" Then queuevalue="medium" - end + End command="qsub -q "+queuevalue+" -x "+inputfile - elseif batch="keg" or batch="pbs" then + Elseif batch="keg" Or batch="pbs" Then command="qsub -V "+inputfile - elseif batch="moab" Then + Elseif batch="moab" Then command="msub -V "+inputfile - elseif batch="SLURM" Then + Elseif batch="slurm" Then command="sbatch "+inputfile+ " -srun" - else + Else MsgBox "Error: No command line for batch = "+batch - end + End Return command diff --git a/Utility/Window_Configurations_Beam_Model.xojo_window b/Utility/Window_Configurations_Beam_Model.xojo_window index 8532f77..6db46b4 100644 --- a/Utility/Window_Configurations_Beam_Model.xojo_window +++ b/Utility/Window_Configurations_Beam_Model.xojo_window @@ -1643,7 +1643,6 @@ Begin Window Window_Configurations_Beam_Model LockLeft = False LockRight = False LockTop = False - MenuValue = "0" Scope = 0 TabIndex = 2 TabPanelIndex = 2 @@ -1688,7 +1687,6 @@ Begin Window Window_Configurations_Beam_Model LockLeft = False LockRight = False LockTop = False - MenuValue = "0" Scope = 0 TabIndex = 3 TabPanelIndex = 2 @@ -3467,7 +3465,7 @@ End #tag Events RadioButton_MLC_SimpleParser #tag Event Sub Action() - if me.Value Then + If Me.Value Then MLC.Parser=1 end Save_MLC=True diff --git a/Utility/Window_Configurations_Shell.xojo_window b/Utility/Window_Configurations_Shell.xojo_window index 7735206..60e76fd 100644 --- a/Utility/Window_Configurations_Shell.xojo_window +++ b/Utility/Window_Configurations_Shell.xojo_window @@ -370,7 +370,6 @@ Begin Window Window_Configurations_Shell LockLeft = False LockRight = False LockTop = False - MenuValue = "0" Scope = 0 TabIndex = 16 TabPanelIndex = 4 @@ -4049,7 +4048,7 @@ End PopupMenu_Batch.AddRow "moab" PopupMenu_Batch.AddRow "keg" PopupMenu_Batch.AddRow "pbs" - PopupMenu_Batch.AddRow "SLURM" + PopupMenu_Batch.AddRow "slurm" EditField_plink.Text=gShells.Plink @@ -4122,7 +4121,7 @@ End PopupMenu_Batch.ListIndex=3 elseif ss.batch="pbs" Then PopupMenu_Batch.ListIndex=4 - elseif ss.batch="SLURM" Then + elseif ss.batch="slurm" Then PopupMenu_Batch.ListIndex=5 end diff --git a/Utility/Window_Progress.xojo_window b/Utility/Window_Progress.xojo_window index fba02b4..847fb79 100644 --- a/Utility/Window_Progress.xojo_window +++ b/Utility/Window_Progress.xojo_window @@ -78,7 +78,7 @@ Begin Window Window_Progress Scope = 0 TabIndex = 1 TabPanelIndex = 0 - TabStop = "True" + TabStop = True Top = 90 Transparent = False Value = 0.0 diff --git a/mmctp.xojo_project b/mmctp.xojo_project index 649b5aa..900297b 100644 --- a/mmctp.xojo_project +++ b/mmctp.xojo_project @@ -352,7 +352,7 @@ AppMenuBar=File MajorVersion=9 MinorVersion=2 SubVersion=0 -NonRelease=494 +NonRelease=497 Release=2 InfoVersion= LongVersion= From 5e9c1fe0a0bc5bfed599c7c4f18979d4c673fd27 Mon Sep 17 00:00:00 2001 From: wabdel Date: Wed, 22 Jul 2020 00:13:21 +0300 Subject: [PATCH 4/7] t --- .DS_Store | Bin 6148 -> 6148 bytes BEAMnrc/Window_BEAM_MainInputs.xojo_window | 20 +- BEAMnrc/Window_BEAM_Options.xojo_window | 34 +- .../Window_BEAM_Options_APPLICAT.xojo_window | 16 +- BEAMnrc/Window_BEAM_Options_BLOCK.xojo_window | 34 +- ..._BEAM_Options_BremSplitUniform.xojo_window | 2 +- .../Window_BEAM_Options_DYNJAWS.xojo_window | 16 +- ...ow_BEAM_Options_DYNJAWS_MOTION.xojo_window | 2 +- .../Window_BEAM_Options_DYNVMLC.xojo_window | 56 +- ...BEAM_Options_DYNVMLC_LeafCross.xojo_window | 90 +-- ...ow_BEAM_Options_DirecBremPhoto.xojo_window | 12 +- BEAMnrc/Window_BEAM_Options_JAWS.xojo_window | 14 +- BEAMnrc/Window_BEAM_Options_MLC.xojo_window | 36 +- BEAMnrc/Window_BEAM_Options_SLABS.xojo_window | 8 +- .../Window_BEAM_Options_Scoring.xojo_window | 4 +- .../Window_BEAM_Options_TOMOMLC.xojo_window | 38 +- BEAMnrc/Window_BEAM_Options_WEDGE.xojo_window | 66 +- .../Window_BEAM_Options_source0.xojo_window | 10 +- .../Window_BEAM_Options_source1.xojo_window | 16 +- .../Window_BEAM_Options_source19.xojo_window | 14 +- .../Window_BEAM_Options_source21.xojo_window | 16 +- .../Window_BEAM_Options_source3.xojo_window | 12 +- .../Window_BEAM_Phsp_Information.xojo_window | 34 +- Builds - mmctp/.DS_Store | Bin 6148 -> 6148 bytes Builds - mmctp/OS X 64 bit/.DS_Store | Bin 6148 -> 6148 bytes Commissioning/Window_CSV_Import.xojo_window | 22 +- .../Window_Commisssioning.xojo_window | 22 +- .../Window_Eclipse_Import.xojo_window | 20 +- .../Window_MEPHYSTO_Import.xojo_window | 30 +- .../Window_Profile_Properties.xojo_window | 22 +- .../Window_Profile_analysis.xojo_window | 4 +- Commissioning/Window_RFA_Import.xojo_window | 36 +- Commissioning/Window_XiO_Import.xojo_window | 8 +- DICOM/Thread_DICOM_Object.xojo_code | 225 +++---- ...ndow_DOSXYZ_EGSPhant_Materials.xojo_window | 32 +- DOSXYZnrc/Window_DOSXYZ_Import.xojo_window | 80 +-- .../Window_DOSXYZ_Maininputs.xojo_window | 26 +- ...ndow_DOSXYZ_Maininputs_Phantom.xojo_window | 6 +- ...DOSXYZ_Maininputs_Phantom_View.xojo_window | 12 +- ...SXYZ_Maininputs_Phantom_Voxels.xojo_window | 60 +- ...ow_DOSXYZ_Maininputs_Thickness.xojo_window | 10 +- ...ndow_DOSXYZ_Maininputs_source1.xojo_window | 10 +- ...dow_DOSXYZ_Maininputs_source10.xojo_window | 10 +- ...dow_DOSXYZ_Maininputs_source11.xojo_window | 28 +- ...ndow_DOSXYZ_Maininputs_source2.xojo_window | 22 +- ...dow_DOSXYZ_Maininputs_source20.xojo_window | 20 +- ...dow_DOSXYZ_Maininputs_source21.xojo_window | 14 +- ...ndow_DOSXYZ_Maininputs_source3.xojo_window | 14 +- ...ndow_DOSXYZ_Maininputs_source8.xojo_window | 10 +- ...ndow_DOSXYZ_Maininputs_source9.xojo_window | 22 +- .../Window_DOSXYZ_Properties.xojo_window | 42 +- DVH/Window_DVH_Plot.xojo_window | 8 +- EGSnrc/Window_EGSnrc_Inputs.xojo_window | 8 +- Gamma/Window_dose.xojo_window | 2 +- Gamma/Window_images.xojo_window | 2 +- General_Module.xojo_code | 164 +++++ MERT/Canvas_EMET.xojo_code | 2 +- MERT/DJAW/Class_MERT_JAWSA.xojo_code | 38 +- MERT/GradDVH/Class_MERT_GradDVH.xojo_code | 8 +- MERT/NLODVH/Class_MERT_NLODVH.xojo_code | 10 +- MERT/SADVH/Class_MERT_SADVH.xojo_code | 40 +- MERT/Window_EMET_Results.xojo_window | 115 ++-- MERT/Window_EMET_Run.xojo_window | 16 +- MERT/Window_EMET_Setup.xojo_window | 98 +-- McGill_Cutout/Thread_Cutout.xojo_code | 2 +- .../Window_Cutout_Options.xojo_window | 34 +- RTOG Class/RTOG Plan/RTOG_Plan.xojo_code | 4 +- RTOG Class/Thread_RTOG.xojo_code | 27 +- Treatment Planning/Thread_AddDose.xojo_code | 8 +- Treatment Planning/Window_3DView.xojo_window | 4 +- .../Window_Beam_Cutout.xojo_window | 2 +- .../Window_Beam_Properties.xojo_window | 58 +- .../Window_ColourWash.xojo_window | 4 +- .../Window_Dose_Info.xojo_window | 50 +- Treatment Planning/Window_Graph.xojo_window | 6 +- .../Window_Image_Info.xojo_window | 34 +- Treatment Planning/Window_IsoDose.xojo_window | 10 +- .../Window_Patient_Info.xojo_window | 6 +- .../Window_Plan_Info.xojo_window | 2 +- .../Window_Prescription.xojo_window | 4 +- Treatment Planning/Window_Rename.xojo_window | 10 +- .../Window_Treatment.xojo_window | 38 +- Utility/App.xojo_code | 597 +++++++++++------- Utility/Class_MMCTP_Timer_Download.xojo_code | 12 +- ...Class_MMCTP_Timer_ProgressWindow.xojo_code | 2 +- Utility/Class_MMCTP_Timer_Refresh.xojo_code | 4 +- Utility/Class_MMCTP_Timer_Run.xojo_code | 4 +- Utility/Class_MMCTP_Timer_Windows.xojo_code | 8 +- Utility/Shell_MMCTP_Download.xojo_code | 28 +- Utility/Shell_MMCTP_Refresh.xojo_code | 28 +- Utility/Shell_MMCTP_Run.xojo_code | 34 +- Utility/Window_About.xojo_window | 8 +- ...ndow_Configurations_Beam_Model.xojo_window | 44 +- ...Configurations_BeamnrcSettings.xojo_window | 14 +- ...Window_Configurations_CTModels.xojo_window | 178 +++--- ...nfigurations_DOSXYZnrcSettings.xojo_window | 14 +- .../Window_Configurations_Shell.xojo_window | 253 +++++--- ...ndow_Configurations_TPS_System.xojo_window | 42 +- ...ow_Configurations_VMC_Settings.xojo_window | 14 +- Utility/Window_CreatBox.xojo_window | 18 +- Utility/Window_Import_Changes.xojo_window | 8 +- Utility/Window_OpenPatient.xojo_window | 2 +- Utility/Window_Progress.xojo_window | 2 +- Utility/Window_Transfer.xojo_window | 271 ++++---- VMC/Class_VMC.xojo_code | 2 +- VMC/Thread_VMC.xojo_code | 16 +- VMC/Window_VMC_AdvancedOptions.xojo_window | 66 +- VMC/Window_VMC_DMXSettings.xojo_window | 22 +- VMC/Window_VMC_Properties.xojo_window | 26 +- Visualization/Thread_Visualization.xojo_code | 4 +- Visualization/Window_Contouring.xojo_window | 12 +- mmctp.xojo_project | 3 +- 112 files changed, 2164 insertions(+), 1743 deletions(-) create mode 100644 General_Module.xojo_code diff --git a/.DS_Store b/.DS_Store index 8d66dea4e1965318770cb83feac565877abaa3f0..d8d152ce1e17601f80219d04eccc5d512c07b966 100644 GIT binary patch delta 370 zcmZoMXfc=|#>B)qu~2NHo}wrd0|Nsi1A_nqLkdGNg93vt5a(`w$he$wvVjOoJs*P; zLn%WhLk_YuLoP!yLkUAcQh9MfQcivn(1;UB1v#0;B?bo98JU<_SlQS)I5@aDcsXK& zGxE!WOA<>;i=7gSqCvcX#FC68C_5xSKL^fEObW|PEsqxvan8>xNzBYkEefs&>CQ|^ z1*(Y&&&*57FL%l>%}Xf;8w8c$|%#-;=EIELNgU#O@AhLxS0N00GZ~y=R delta 290 zcmZoMXfc=|#>B`mu~2NHo}wrV0|Nsi1A_nqLjZ#wLkdGGLlQ&j#KPtEAPIg3Um$d5 z2tk%)NCzrRWGG-L$VoR0PR`FQ0IFnQIqYXcSVwNYi%U{YeiBe6$3}7C?e%eo9I@*P zWGF>gl$)PIq&8$-1sO=rJ0`H%kog+R#)dG)&Fmcf9Ka9&3Vdgt%r9ce0dxW=5STUx Ih-_g70M`0D(*OVf diff --git a/BEAMnrc/Window_BEAM_MainInputs.xojo_window b/BEAMnrc/Window_BEAM_MainInputs.xojo_window index f0cbfa0..03a7000 100644 --- a/BEAMnrc/Window_BEAM_MainInputs.xojo_window +++ b/BEAMnrc/Window_BEAM_MainInputs.xojo_window @@ -2197,15 +2197,15 @@ End popupbrem=True - EditField_gECUT_rangerejection.Text=str(BEAM.ESAVE_Global) - EditField_gPCUT.Text=str(BEAM.PCUT) - EditField_gECUT.Text=str(BEAM.ECUT) - EditField_z.Text=BEAM.z_of_front - EditField_RNG1.Text=str(BEAM.RNG_1) - EditField_RNG2.Text=str(BEAM.RNG_2) - EditField_Medium.Text=BEAM.medium - EditField_MaxCPU.Text=str(BEAM.Max_CPU_hr) - StaticText_title.Text=BEAM.title + EditField_gECUT_rangerejection.value = str(BEAM.ESAVE_Global) + EditField_gPCUT.value = str(BEAM.PCUT) + EditField_gECUT.value = str(BEAM.ECUT) + EditField_z.value = BEAM.z_of_front + EditField_RNG1.value = str(BEAM.RNG_1) + EditField_RNG2.value = str(BEAM.RNG_2) + EditField_Medium.value = BEAM.medium + EditField_MaxCPU.value = str(BEAM.Max_CPU_hr) + StaticText_title.value = BEAM.title @@ -2592,7 +2592,7 @@ End Dim k,i as Integer i=me.ListIndex - EditField_CM.Text="" + EditField_CM.value = "" if i>=0 and i<= UBound(BEAM.CMs) Then EditField_CM.AppendText BEAM.CMs(i).CM_Names +EndOfLine.UNIX diff --git a/BEAMnrc/Window_BEAM_Options.xojo_window b/BEAMnrc/Window_BEAM_Options.xojo_window index 03fd5b1..e6edcae 100644 --- a/BEAMnrc/Window_BEAM_Options.xojo_window +++ b/BEAMnrc/Window_BEAM_Options.xojo_window @@ -1472,15 +1472,15 @@ End Time=Time/60 // Hours if time> 36 Then Time=Time/24 // days - StaticText_TotalTime.Text="Approx CPU time per job (day) "+Format(time,"###,###,###.##") + StaticText_TotalTime.value = "Approx CPU time per job (day) "+Format(time,"###,###,###.##") else - StaticText_TotalTime.Text="Approx CPU time per job (hr) "+Format(time,"###,###,###.##") + StaticText_TotalTime.value = "Approx CPU time per job (hr) "+Format(time,"###,###,###.##") end else - StaticText_TotalTime.Text="Approx CPU time per job (min) "+Format(time,"###,###,###.##") + StaticText_TotalTime.value = "Approx CPU time per job (min) "+Format(time,"###,###,###.##") end else - StaticText_TotalTime.Text="Approx CPU time per job (sec) "+Format(time,"###,###,###.##") + StaticText_TotalTime.value = "Approx CPU time per job (sec) "+Format(time,"###,###,###.##") end End Sub #tag EndMethod @@ -1504,31 +1504,31 @@ End next i PopupMenu_Shell.ListIndex=gBEAM.Beams(beam_num).egs_Shell_Index - EditField_testrun.Text=Format(gBEAM.Beams(beam_num).Num_test_hist,"#") + EditField_testrun.value = Format(gBEAM.Beams(beam_num).Num_test_hist,"#") CheckBox_Simulation_Start.Caption="Started "+gBEAM.Beams(beam_num).egs_Start_Time+" active jobs : "+str(gBEAM.Beams(beam_num).egs_BEAMnrc_active_jobs) StaticText_part_per_history.Text ="Number particles per history "+Format(gBEAM.Beams(beam_num).egs_particle_per_history,"-#.######") - StaticText_beamid.Text="Beam ID: "+str(gRTOG.Plan(Plan_Index).Beam(beam_num).beam_num) - StaticText_CPU.Text="CPU time per history (s) "+Format(gBEAM.Beams(beam_num).egs_CPU_time_per_hist,"-#.######") - StaticText_phsp_num_part.Text="Number particles in PhSp file "+Format(gBEAM.Beams(beam_num).egs_phsp_num_particles,"###,###,###,###") + StaticText_beamid.value = "Beam ID: "+str(gRTOG.Plan(Plan_Index).Beam(beam_num).beam_num) + StaticText_CPU.value = "CPU time per history (s) "+Format(gBEAM.Beams(beam_num).egs_CPU_time_per_hist,"-#.######") + StaticText_phsp_num_part.value = "Number particles in PhSp file "+Format(gBEAM.Beams(beam_num).egs_phsp_num_particles,"###,###,###,###") if gBEAM.Beams(beam_num).egs_CPU_time_per_hist>0 Then - StaticText_part_per_s.Text="Particles per second "+Format(gBEAM.Beams(beam_num).egs_particle_per_history/gBEAM.Beams(beam_num).egs_CPU_time_per_hist,"###,###,###.##") + StaticText_part_per_s.value = "Particles per second "+Format(gBEAM.Beams(beam_num).egs_particle_per_history/gBEAM.Beams(beam_num).egs_CPU_time_per_hist,"###,###,###.##") else - StaticText_part_per_s.Text="Particles per second Unknown" + StaticText_part_per_s.value = "Particles per second Unknown" end jarea=gBEAM.egs_Calculate_Area(beam_num) - StaticText_jawarea.Text="Aperture area cm^2 "+Format(jarea,"###,###.##") + StaticText_jawarea.value = "Aperture area cm^2 "+Format(jarea,"###,###.##") - EditField_numhist.Text=Format(gBEAM.Beams(beam_num).egs_num_histories,"###,###,###,###") - EditField_desired.Text=Format(gBEAM.Beams(beam_num).egs_desired_phsp_particle_density,"###,###,###,###") + EditField_numhist.value = Format(gBEAM.Beams(beam_num).egs_num_histories,"###,###,###,###") + EditField_desired.value = Format(gBEAM.Beams(beam_num).egs_desired_phsp_particle_density,"###,###,###,###") - EditField_jobs.Text=str(gBEAM.Beams(beam_num).egs_jobs) - EditField_pegs.Text=gBEAM.Beams(beam_num).egs_pegs_file - EditField_progress.Text=Format(gBEAM.Beams(beam_num).egs_progress,"-#.#") + EditField_jobs.value = str(gBEAM.Beams(beam_num).egs_jobs) + EditField_pegs.value = gBEAM.Beams(beam_num).egs_pegs_file + EditField_progress.value = Format(gBEAM.Beams(beam_num).egs_progress,"-#.#") if gBEAM.Beams(beam_num).egs_BEAMnrc_started Then CheckBox_Simulation_Start.Value=True @@ -1785,7 +1785,7 @@ End if gBEAM.Beams(beam_num).egs_particle_per_history>0 Then gBEAM.beams(beam_num).egs_num_histories=Round(gBEAM.Beams(beam_num).egs_desired_phsp_particle_density*jarea/gBEAM.Beams(beam_num).egs_particle_per_history) - EditField_numhist.Text=Format(gBEAM.beams(beam_num).egs_num_histories,"###,###,###,###") + EditField_numhist.value = Format(gBEAM.beams(beam_num).egs_num_histories,"###,###,###,###") end end End Sub diff --git a/BEAMnrc/Window_BEAM_Options_APPLICAT.xojo_window b/BEAMnrc/Window_BEAM_Options_APPLICAT.xojo_window index 2bba627..ebb7069 100644 --- a/BEAMnrc/Window_BEAM_Options_APPLICAT.xojo_window +++ b/BEAMnrc/Window_BEAM_Options_APPLICAT.xojo_window @@ -813,14 +813,14 @@ End Dim i as Integer - EditField_dosezoneair.Text=str(app.DOSE_ZONE_AIR) - EditField_Ecut.Text=str(app.ECUT) - EditField_LATCHbitair.Text=str(app.IREGION_TO_BIT_AIR) - EditField_numscrapers.Text=str(app.N_APPLICAT) - EditField_Pcut.Text=str(app.PCUT) - EditField_radius.Text=str(app.RMAX_CM) - EditField_title.Text=str(app.Title_CM) - EditField_zback.Text=str(app.ZBACK_APPLICAT) + EditField_dosezoneair.value = str(app.DOSE_ZONE_AIR) + EditField_Ecut.value = str(app.ECUT) + EditField_LATCHbitair.value = str(app.IREGION_TO_BIT_AIR) + EditField_numscrapers.value = str(app.N_APPLICAT) + EditField_Pcut.value = str(app.PCUT) + EditField_radius.value = str(app.RMAX_CM) + EditField_title.value = str(app.Title_CM) + EditField_zback.value = str(app.ZBACK_APPLICAT) if app.Ishape=0 Then diff --git a/BEAMnrc/Window_BEAM_Options_BLOCK.xojo_window b/BEAMnrc/Window_BEAM_Options_BLOCK.xojo_window index ce009a6..fdd9482 100644 --- a/BEAMnrc/Window_BEAM_Options_BLOCK.xojo_window +++ b/BEAMnrc/Window_BEAM_Options_BLOCK.xojo_window @@ -1481,26 +1481,26 @@ End Dim i as Integer - EditField_dosezoneair_B.Text=str(BLOCK.DOSE_ZONE_AIR) - EditField_Ecut_B.Text=str(BLOCK.ECUT_Block) - EditField_LATCHbitair_B.Text=str(BLOCK.IRegion_Air) - EditField_numsubregions.Text=str(BLOCK.ISUB_MAX_BLOCK) - EditField_Pcut_B.Text=str(BLOCK.PCUT_Block) - EditField_radius.Text=str(BLOCK.RMAX_CM) - EditField_title.Text=str(BLOCK.Title_CM) - EditField_zmax.Text=Format(BLOCK.ZMAX_BLOCK,"-#.###") - EditField_zmin.Text=Format(Block.ZMIN_BLOCK,"-#.###") - EditField_ZFOCUS_BLOCK.Text=Format(Block.ZFOCUS_BLOCK,"-#.###") + EditField_dosezoneair_B.value = str(BLOCK.DOSE_ZONE_AIR) + EditField_Ecut_B.value = str(BLOCK.ECUT_Block) + EditField_LATCHbitair_B.value = str(BLOCK.IRegion_Air) + EditField_numsubregions.value = str(BLOCK.ISUB_MAX_BLOCK) + EditField_Pcut_B.value = str(BLOCK.PCUT_Block) + EditField_radius.value = str(BLOCK.RMAX_CM) + EditField_title.value = str(BLOCK.Title_CM) + EditField_zmax.value = Format(BLOCK.ZMAX_BLOCK,"-#.###") + EditField_zmin.value = Format(Block.ZMIN_BLOCK,"-#.###") + EditField_ZFOCUS_BLOCK.value = Format(Block.ZFOCUS_BLOCK,"-#.###") - EditField_XNMAX.Text=Format(Block.XNMAX_BLOCK,"-#.###") - EditField_XPMAX.Text=Format(Block.XPMAX_BLOCK,"-#.###") - EditField_YNMAX.Text=Format(Block.YNMAX_BLOCK,"-#.###") - EditField_YPMAX.Text=Format(Block.YPMAX_BLOCK,"-#.###") + EditField_XNMAX.value = Format(Block.XNMAX_BLOCK,"-#.###") + EditField_XPMAX.value = Format(Block.XPMAX_BLOCK,"-#.###") + EditField_YNMAX.value = Format(Block.YNMAX_BLOCK,"-#.###") + EditField_YPMAX.value = Format(Block.YPMAX_BLOCK,"-#.###") - EditField_BLOCK_M.Text=Block.Medium_In_Block + EditField_BLOCK_M.value = Block.Medium_In_Block PopupMenu_Subregion.DeleteAllRows @@ -1512,7 +1512,7 @@ End i=PopupMenu_Subregion.ListIndex if i>-1 and i<=UBound(BLOCK.Subregions) Then - EditField_numsubregion_points.Text=str(Block.Subregions(i).NSUB_BLOCK) + EditField_numsubregion_points.value = str(Block.Subregions(i).NSUB_BLOCK) end End Sub #tag EndMethod @@ -1688,7 +1688,7 @@ End i=PopupMenu_Subregion.ListIndex if i>-1 and i<=UBound(BLOCK.Subregions) Then - EditField_numsubregion_points.Text=str(Block.Subregions(i).NSUB_BLOCK) + EditField_numsubregion_points.value = str(Block.Subregions(i).NSUB_BLOCK) end End Sub #tag EndEvent diff --git a/BEAMnrc/Window_BEAM_Options_BremSplitUniform.xojo_window b/BEAMnrc/Window_BEAM_Options_BremSplitUniform.xojo_window index 47c677b..5d80bbb 100644 --- a/BEAMnrc/Window_BEAM_Options_BremSplitUniform.xojo_window +++ b/BEAMnrc/Window_BEAM_Options_BremSplitUniform.xojo_window @@ -234,7 +234,7 @@ End - EditField_brem_splitting_num.Text=str(Window_BEAM_MainInputs.BEAM.NBRSPL) + EditField_brem_splitting_num.value = str(Window_BEAM_MainInputs.BEAM.NBRSPL) if Window_BEAM_MainInputs.BEAM.IRRLTT>0 Then diff --git a/BEAMnrc/Window_BEAM_Options_DYNJAWS.xojo_window b/BEAMnrc/Window_BEAM_Options_DYNJAWS.xojo_window index 4bbe431..667e1cc 100644 --- a/BEAMnrc/Window_BEAM_Options_DYNJAWS.xojo_window +++ b/BEAMnrc/Window_BEAM_Options_DYNJAWS.xojo_window @@ -902,21 +902,21 @@ End Sub Refresh_window() Dim i as Integer - EditField_Opening_file.Text=s.JAW_File_Path + EditField_Opening_file.value = s.JAW_File_Path - EditField_numpairs.Text=str(S.ISCM_MAX) - EditField_radius.Text=Format(S.RMAX_CM,"-#.###") - EditField_title.Text=str(S.Title_CM) - EditField_ECUT.Text=Format(S.ECUT_Openings,"-#.###") + EditField_numpairs.value = str(S.ISCM_MAX) + EditField_radius.value = Format(S.RMAX_CM,"-#.###") + EditField_title.value = str(S.Title_CM) + EditField_ECUT.value = Format(S.ECUT_Openings,"-#.###") - EditField_pCUT.Text=Format(S.pCUT_Openings,"-#.###") + EditField_pCUT.value = Format(S.pCUT_Openings,"-#.###") - EditField_Dosezone.Text=Format(S.Dose_Zone_air,"#") + EditField_Dosezone.value = Format(S.Dose_Zone_air,"#") - EditField_Latchbit.Text=Format(S.IREGION_to_bit_air,"#") + EditField_Latchbit.value = Format(S.IREGION_to_bit_air,"#") if s.MODE=0 Then diff --git a/BEAMnrc/Window_BEAM_Options_DYNJAWS_MOTION.xojo_window b/BEAMnrc/Window_BEAM_Options_DYNJAWS_MOTION.xojo_window index 8465850..d486fe4 100644 --- a/BEAMnrc/Window_BEAM_Options_DYNJAWS_MOTION.xojo_window +++ b/BEAMnrc/Window_BEAM_Options_DYNJAWS_MOTION.xojo_window @@ -267,7 +267,7 @@ End if Pair_Index<=UBound(app.DYN_Openings) and Pair_Index>-1 Then - EditField_OpeningNum.Text=Format(app.Number_Fields,"#") + EditField_OpeningNum.value = Format(app.Number_Fields,"#") for i=1 to app.Number_Fields ffindex=(i-1)*app.ISCM_MAX+Pair_Index Listbox_Pairs.AddRow Format(app.Index(i-1),"-#.####") diff --git a/BEAMnrc/Window_BEAM_Options_DYNVMLC.xojo_window b/BEAMnrc/Window_BEAM_Options_DYNVMLC.xojo_window index 35219f3..a3cda23 100644 --- a/BEAMnrc/Window_BEAM_Options_DYNVMLC.xojo_window +++ b/BEAMnrc/Window_BEAM_Options_DYNVMLC.xojo_window @@ -2206,34 +2206,34 @@ End RadioButton_par_x.Value=True end - EditField_numleaves.Text=str(DYNVMLC.Numleaves) - EditField_radius.Text=Format(DYNVMLC.RMAX_CM,"-#.###") - EditField_title.Text=str(DYNVMLC.Title_CM) + EditField_numleaves.value = str(DYNVMLC.Numleaves) + EditField_radius.value = Format(DYNVMLC.RMAX_CM,"-#.###") + EditField_title.value = str(DYNVMLC.Title_CM) - EditField_ecut_holes.Text=Format(DYNVMLC.Ecut_Holes,"-#.###") - EditField_Ecut_leaves.Text=Format(DYNVMLC.Ecut_Leaves,"-#.###") - EditField_ECUT_Open.Text=Format(DYNVMLC.Ecut_Air,"-#.###") + EditField_ecut_holes.value = Format(DYNVMLC.Ecut_Holes,"-#.###") + EditField_Ecut_leaves.value = Format(DYNVMLC.Ecut_Leaves,"-#.###") + EditField_ECUT_Open.value = Format(DYNVMLC.Ecut_Air,"-#.###") - EditField_PcutOpen.Text=Format(DYNVMLC.Pcut_air,"-#.###") - EditField_pcut_holes.Text=Format(DYNVMLC.Pcut_holes,"-#.###") - EditField_Pcut_leaves.Text=Format(DYNVMLC.Pcut_Leaves,"-#.###") + EditField_PcutOpen.value = Format(DYNVMLC.Pcut_air,"-#.###") + EditField_pcut_holes.value = Format(DYNVMLC.Pcut_holes,"-#.###") + EditField_Pcut_leaves.value = Format(DYNVMLC.Pcut_Leaves,"-#.###") - EditField_file.Text=DYNVMLC.MLC_File_Path + EditField_file.value = DYNVMLC.MLC_File_Path - EditField_DoseZone_open.Text=Format(DYNVMLC.Dose_Zone_air,"#") - EditField_dose_zone_holes.Text=Format(DYNVMLC.Dose_Zone_holes,"#") - EditField_dose_zone_leaves.Text=Format(DYNVMLC.Dose_Zone_Leaves,"#") + EditField_DoseZone_open.value = Format(DYNVMLC.Dose_Zone_air,"#") + EditField_dose_zone_holes.value = Format(DYNVMLC.Dose_Zone_holes,"#") + EditField_dose_zone_leaves.value = Format(DYNVMLC.Dose_Zone_Leaves,"#") - EditField_latch_holes.Text=Format(DYNVMLC.IRegion_to_bit_holes,"#") - EditField_latch_leaves.Text=Format(DYNVMLC.IRegion_to_bit_Leaves,"#") - EditField_Latch_open.Text=Format(DYNVMLC.IRegion_to_bit_air,"#") + EditField_latch_holes.value = Format(DYNVMLC.IRegion_to_bit_holes,"#") + EditField_latch_leaves.value = Format(DYNVMLC.IRegion_to_bit_Leaves,"#") + EditField_Latch_open.value = Format(DYNVMLC.IRegion_to_bit_air,"#") - EditField_zmin.Text=Format(DYNVMLC.ZMIN,"-#.#####") - EditField_leavesthick.Text=Format(DYNVMLC.ZThick,"-#.#####") + EditField_zmin.value = Format(DYNVMLC.ZMIN,"-#.#####") + EditField_leavesthick.value = Format(DYNVMLC.ZThick,"-#.#####") - EditField_startleaf.Text=Format(DYNVMLC.Start,"-#.#####") - EditField_zfocussides.Text=Format(DYNVMLC.zfocus_sides,"-#.#####") - EditField_widthgap.Text=Format(DYNVMLC.Leafgap,"-#.#####") + EditField_startleaf.value = Format(DYNVMLC.Start,"-#.#####") + EditField_zfocussides.value = Format(DYNVMLC.zfocus_sides,"-#.#####") + EditField_widthgap.value = Format(DYNVMLC.Leafgap,"-#.#####") if DYNVMLC.IGNOREGAPS=1 Then CheckBox_ignore.Value=True @@ -2242,12 +2242,12 @@ End if DYNVMLC.Endtype=0 Then PopupMenu_Leaftype.ListIndex=0 - StaticText_Radius.Text="Radius of leaf ends" - EditField_Zfocus_and_Radiusleafend.Text=Format(DYNVMLC.Leafradius,"-#.#####") + StaticText_Radius.value = "Radius of leaf ends" + EditField_Zfocus_and_Radiusleafend.value = Format(DYNVMLC.Leafradius,"-#.#####") elseif DYNVMLC.Endtype=1 Then PopupMenu_Leaftype.ListIndex=1 - StaticText_Radius.Text="Zfocus of leaf ends" - EditField_Zfocus_and_Radiusleafend.Text=Format(DYNVMLC.zfocus_ends,"-#.#####") + StaticText_Radius.value = "Zfocus of leaf ends" + EditField_Zfocus_and_Radiusleafend.value = Format(DYNVMLC.zfocus_ends,"-#.#####") end if DYNVMLC.MODE_DYNVMLC=0 Then @@ -2258,9 +2258,9 @@ End RadioButton_Step.Value=True end - EditField_material_holes.Text=DYNVMLC.Med_In_holes - EditField_Mat_open.Text=DYNVMLC.Med_In_Air - EditField_material_leaves.Text=DYNVMLC.Med_In_Leaves + EditField_material_holes.value = DYNVMLC.Med_In_holes + EditField_Mat_open.value = DYNVMLC.Med_In_Air + EditField_material_leaves.value = DYNVMLC.Med_In_Leaves donothing=False End Sub diff --git a/BEAMnrc/Window_BEAM_Options_DYNVMLC_LeafCross.xojo_window b/BEAMnrc/Window_BEAM_Options_DYNVMLC_LeafCross.xojo_window index 238928d..ff90d19 100644 --- a/BEAMnrc/Window_BEAM_Options_DYNVMLC_LeafCross.xojo_window +++ b/BEAMnrc/Window_BEAM_Options_DYNVMLC_LeafCross.xojo_window @@ -3295,58 +3295,58 @@ End - TextField_Full_Leafwidth.Text=Format(DVMLC.Full.LeafWidth,"-0.0####") - TextField_Full_WTongue.Text=Format(DVMLC.Full.WTongue,"-0.0####") - TextField_Full_WGroove.Text=Format(DVMLC.Full.Wgroove,"-0.0####") - TextField_Full_WTip.Text=Format(DVMLC.Full.WTIP,"-0.0####") - TextField_Full_WRailTop.Text=Format(DVMLC.Full.WrailTop,"-0.0####") - TextField_Full_WRailBot.Text=Format(DVMLC.Full.Wrailbot,"-0.0####") + TextField_Full_Leafwidth.value = Format(DVMLC.Full.LeafWidth,"-0.0####") + TextField_Full_WTongue.value = Format(DVMLC.Full.WTongue,"-0.0####") + TextField_Full_WGroove.value = Format(DVMLC.Full.Wgroove,"-0.0####") + TextField_Full_WTip.value = Format(DVMLC.Full.WTIP,"-0.0####") + TextField_Full_WRailTop.value = Format(DVMLC.Full.WrailTop,"-0.0####") + TextField_Full_WRailBot.value = Format(DVMLC.Full.Wrailbot,"-0.0####") - TextField_Full_ZTip.Text=Format(DVMLC.Full.ZTip,"-0.0####") - TextField_Full_Zleaf.Text=Format(DVMLC.Full.Zleaf,"-0.0####") - TextField_Full_ZTongue.Text=Format(DVMLC.Full.ZTongue,"-0.0####") - TextField_Full_ZGroove.Text=Format(DVMLC.Full.ZGroove,"-0.0#####") - TextField_Full_ZholeTop.Text=Format(DVMLC.Full.Zholetop,"-0.0####") - TextField_Full_ZholeBot.Text=Format(DVMLC.Full.ZHoleBot,"-0.0####") - TextField_Full_Holepos.Text=Format(DVMLC.Full.Holepos,"-0.0####") - TextField_Full_ZrailTop.Text=Format(DVMLC.Full.Zrailtop,"-0.0####") - TextField_Full_ZrailBot.Text=Format(DVMLC.Full.Zrailbot,"-0.0####") + TextField_Full_ZTip.value = Format(DVMLC.Full.ZTip,"-0.0####") + TextField_Full_Zleaf.value = Format(DVMLC.Full.Zleaf,"-0.0####") + TextField_Full_ZTongue.value = Format(DVMLC.Full.ZTongue,"-0.0####") + TextField_Full_ZGroove.value = Format(DVMLC.Full.ZGroove,"-0.0#####") + TextField_Full_ZholeTop.value = Format(DVMLC.Full.Zholetop,"-0.0####") + TextField_Full_ZholeBot.value = Format(DVMLC.Full.ZHoleBot,"-0.0####") + TextField_Full_Holepos.value = Format(DVMLC.Full.Holepos,"-0.0####") + TextField_Full_ZrailTop.value = Format(DVMLC.Full.Zrailtop,"-0.0####") + TextField_Full_ZrailBot.value = Format(DVMLC.Full.Zrailbot,"-0.0####") - TextField_Target_LeafWidth.Text=Format(DVMLC.Target.LeafWidth,"-0.0####") - TextField_Target_WTongue.Text=Format(DVMLC.Target.WTongue,"-0.0####") - TextField_Target_WGroove.Text=Format(DVMLC.Target.Wgroove,"-0.0####") - TextField_Target_WTip.Text=Format(DVMLC.Target.WTIP,"-0.0####") - TextField_Target_WRailTop.Text=Format(DVMLC.Target.WrailTop,"-0.0####") - TextField_Target_WRailBot.Text=Format(DVMLC.Target.Wrailbot,"-0.0####") + TextField_Target_LeafWidth.value = Format(DVMLC.Target.LeafWidth,"-0.0####") + TextField_Target_WTongue.value = Format(DVMLC.Target.WTongue,"-0.0####") + TextField_Target_WGroove.value = Format(DVMLC.Target.Wgroove,"-0.0####") + TextField_Target_WTip.value = Format(DVMLC.Target.WTIP,"-0.0####") + TextField_Target_WRailTop.value = Format(DVMLC.Target.WrailTop,"-0.0####") + TextField_Target_WRailBot.value = Format(DVMLC.Target.Wrailbot,"-0.0####") - TextField_Target_ZTip.Text=Format(DVMLC.Target.ZTip,"-0.0####") - TextField_Target_Zleaf.Text=Format(DVMLC.Target.Zleaf,"-0.0####") - TextField_Target_ZTongue.Text=Format(DVMLC.Target.ZTongue,"-0.0###") - TextField_Target_ZGroove.Text=Format(DVMLC.Target.ZGroove,"-0.0####") - TextField_Target_ZholeTop.Text=Format(DVMLC.Target.Zholetop,"-0.0####") - TextField_Target_ZholeBot.Text=Format(DVMLC.Target.ZHoleBot,"-0.0####") - TextField_Target_Holepos.Text=Format(DVMLC.Target.Holepos,"-0.0####") - TextField_Target_ZrailTop.Text=Format(DVMLC.Target.Zrailtop,"-0.0####") - TextField_Target_ZrailBot.Text=Format(DVMLC.Target.Zrailbot,"-0.0####") + TextField_Target_ZTip.value = Format(DVMLC.Target.ZTip,"-0.0####") + TextField_Target_Zleaf.value = Format(DVMLC.Target.Zleaf,"-0.0####") + TextField_Target_ZTongue.value = Format(DVMLC.Target.ZTongue,"-0.0###") + TextField_Target_ZGroove.value = Format(DVMLC.Target.ZGroove,"-0.0####") + TextField_Target_ZholeTop.value = Format(DVMLC.Target.Zholetop,"-0.0####") + TextField_Target_ZholeBot.value = Format(DVMLC.Target.ZHoleBot,"-0.0####") + TextField_Target_Holepos.value = Format(DVMLC.Target.Holepos,"-0.0####") + TextField_Target_ZrailTop.value = Format(DVMLC.Target.Zrailtop,"-0.0####") + TextField_Target_ZrailBot.value = Format(DVMLC.Target.Zrailbot,"-0.0####") - TextField_Iso_Width.Text=Format(DVMLC.Isocenter.LeafWidth,"-0.0####") - TextField_iso_WTongue.Text=Format(DVMLC.Isocenter.WTongue,"-0.0####") - TextField_iso_WGroove.Text=Format(DVMLC.Isocenter.Wgroove,"-0.0####") - TextField_iso_WTip.Text=Format(DVMLC.Isocenter.WTIP,"-0.0####") - TextField_Iso_Wrailtop.Text=Format(DVMLC.Isocenter.WrailTop,"-0.0####") - TextField_iso_WRailBot.Text=Format(DVMLC.Isocenter.Wrailbot,"-0.0####") + TextField_Iso_Width.value = Format(DVMLC.Isocenter.LeafWidth,"-0.0####") + TextField_iso_WTongue.value = Format(DVMLC.Isocenter.WTongue,"-0.0####") + TextField_iso_WGroove.value = Format(DVMLC.Isocenter.Wgroove,"-0.0####") + TextField_iso_WTip.value = Format(DVMLC.Isocenter.WTIP,"-0.0####") + TextField_Iso_Wrailtop.value = Format(DVMLC.Isocenter.WrailTop,"-0.0####") + TextField_iso_WRailBot.value = Format(DVMLC.Isocenter.Wrailbot,"-0.0####") - TextField_iso_ZTip.Text=Format(DVMLC.Isocenter.ZTip,"-0.0####") - TextField_iso_Zleaf.Text=Format(DVMLC.Isocenter.Zleaf,"-0.0####") - TextField_iso_ZTongue.Text=Format(DVMLC.Isocenter.ZTongue,"-0.0###") - TextField_iso_ZGroove.Text=Format(DVMLC.Isocenter.ZGroove,"-0.0####") - TextField_iso_ZholeTop.Text=Format(DVMLC.Isocenter.Zholetop,"-0.0####") - TextField_iso_ZholeBot.Text=Format(DVMLC.Isocenter.ZHoleBot,"-0.0####") - TextField_iso_Holepos.Text=Format(DVMLC.Isocenter.HolePos_Iso,"-0.0####") - TextField_iso_ZrailTop.Text=Format(DVMLC.Isocenter.Zrailtop,"-0.0####") - TextField_Iso_Zrailbot.Text=Format(DVMLC.Isocenter.Zrailbot,"-0.0####") + TextField_iso_ZTip.value = Format(DVMLC.Isocenter.ZTip,"-0.0####") + TextField_iso_Zleaf.value = Format(DVMLC.Isocenter.Zleaf,"-0.0####") + TextField_iso_ZTongue.value = Format(DVMLC.Isocenter.ZTongue,"-0.0###") + TextField_iso_ZGroove.value = Format(DVMLC.Isocenter.ZGroove,"-0.0####") + TextField_iso_ZholeTop.value = Format(DVMLC.Isocenter.Zholetop,"-0.0####") + TextField_iso_ZholeBot.value = Format(DVMLC.Isocenter.ZHoleBot,"-0.0####") + TextField_iso_Holepos.value = Format(DVMLC.Isocenter.HolePos_Iso,"-0.0####") + TextField_iso_ZrailTop.value = Format(DVMLC.Isocenter.Zrailtop,"-0.0####") + TextField_Iso_Zrailbot.value = Format(DVMLC.Isocenter.Zrailbot,"-0.0####") End Sub #tag EndEvent diff --git a/BEAMnrc/Window_BEAM_Options_DirecBremPhoto.xojo_window b/BEAMnrc/Window_BEAM_Options_DirecBremPhoto.xojo_window index e6ada19..0278ee1 100644 --- a/BEAMnrc/Window_BEAM_Options_DirecBremPhoto.xojo_window +++ b/BEAMnrc/Window_BEAM_Options_DirecBremPhoto.xojo_window @@ -804,11 +804,11 @@ End Dim i,num as Integer Dim znum as Single - EditField_brem_field_radius.Text=str(BremSplit.fs) - EditField_brem_splitting_num.Text=str(Window_BEAM_MainInputs.BEAM.NBRSPL) - EditField_ssd.Text=str(BremSplit.ssd) - EditField_z_RR.Text=str(BremSplit.ZRR_DBS) - //EditField_e_splitting_plane_no.Text=str(BremSplit.ZPLANEDBS) + EditField_brem_field_radius.value = str(BremSplit.fs) + EditField_brem_splitting_num.value = str(Window_BEAM_MainInputs.BEAM.NBRSPL) + EditField_ssd.value = str(BremSplit.ssd) + EditField_z_RR.value = str(BremSplit.ZRR_DBS) + //EditField_e_splitting_plane_no.value = str(BremSplit.ZPLANEDBS) for i=0 to PopupMenu_CM.ListCount @@ -858,7 +858,7 @@ End CheckBox_AugmentRR.Value=True end - EditField_z_RP.Text=str(BremSplit.Z_REJPLN) + EditField_z_RP.value = str(BremSplit.Z_REJPLN) End Sub #tag EndMethod diff --git a/BEAMnrc/Window_BEAM_Options_JAWS.xojo_window b/BEAMnrc/Window_BEAM_Options_JAWS.xojo_window index 7fcceec..905a0c4 100644 --- a/BEAMnrc/Window_BEAM_Options_JAWS.xojo_window +++ b/BEAMnrc/Window_BEAM_Options_JAWS.xojo_window @@ -676,13 +676,13 @@ End - EditField_numpairs.Text=str(S.ISCM_MAX) - EditField_radius.Text=Format(S.RMAX_CM,"-#.###") - EditField_title.Text=str(S.Title_CM) - EditField_ECUT.Text=Format(S.ECUT_Openings,"-#.###") - EditField_pCUT.Text=Format(S.pCUT_Openings,"-#.###") - EditField_Dosezone.Text=Format(S.Dose_zone_opening,"#") - EditField_Latchbit.Text=Format(S.Iregion_opening,"#") + EditField_numpairs.value = str(S.ISCM_MAX) + EditField_radius.value = Format(S.RMAX_CM,"-#.###") + EditField_title.value = str(S.Title_CM) + EditField_ECUT.value = Format(S.ECUT_Openings,"-#.###") + EditField_pCUT.value = Format(S.pCUT_Openings,"-#.###") + EditField_Dosezone.value = Format(S.Dose_zone_opening,"#") + EditField_Latchbit.value = Format(S.Iregion_opening,"#") End Sub diff --git a/BEAMnrc/Window_BEAM_Options_MLC.xojo_window b/BEAMnrc/Window_BEAM_Options_MLC.xojo_window index e2caf75..1266779 100644 --- a/BEAMnrc/Window_BEAM_Options_MLC.xojo_window +++ b/BEAMnrc/Window_BEAM_Options_MLC.xojo_window @@ -1532,37 +1532,37 @@ End RadioButton_par_x.Value=True end - EditField_numleaves.Text=str(MLC.Num_leaf) - EditField_radius.Text=Format(MLC.RMAX_CM,"-#.###") - EditField_title.Text=Trim(MLC.Title_CM) + EditField_numleaves.value = str(MLC.Num_leaf) + EditField_radius.value = Format(MLC.RMAX_CM,"-#.###") + EditField_title.value = Trim(MLC.Title_CM) - EditField_Twidth.Text=Format(MLC.TWIDTH_MLC,"-#.###") + EditField_Twidth.value = Format(MLC.TWIDTH_MLC,"-#.###") - EditField_ECUT_Inside.Text=Format(MLC.Ecut_inside_collimator,"-#.###") - EditField_Ecut_leaves.Text=Format(MLC.Ecut_collimator_leaves,"-#.###") + EditField_ECUT_Inside.value = Format(MLC.Ecut_inside_collimator,"-#.###") + EditField_Ecut_leaves.value = Format(MLC.Ecut_collimator_leaves,"-#.###") - EditField_Pcut_Inside.Text=Format(MLC.Pcut_inside_collimator,"-#.###") - EditField_Pcut_leaves.Text=Format(MLC.Pcut_collimator_Leaves,"-#.###") + EditField_Pcut_Inside.value = Format(MLC.Pcut_inside_collimator,"-#.###") + EditField_Pcut_leaves.value = Format(MLC.Pcut_collimator_Leaves,"-#.###") - EditField_DoseZone_Inside.Text=Format(MLC.Dose_Zone_inside_collimator,"#") - EditField_dose_zone_leaves.Text=Format(MLC.Dose_Zone_collimator_Leaves,"#") + EditField_DoseZone_Inside.value = Format(MLC.Dose_Zone_inside_collimator,"#") + EditField_dose_zone_leaves.value = Format(MLC.Dose_Zone_collimator_Leaves,"#") - EditField_Latch_Inside.Text=Format(MLC.IRegion_to_bit_inside_collimator,"#") - EditField_latch_leaves.Text=Format(MLC.IRegion_to_bit_collimator_Leaves,"#") + EditField_Latch_Inside.value = Format(MLC.IRegion_to_bit_inside_collimator,"#") + EditField_latch_leaves.value = Format(MLC.IRegion_to_bit_collimator_Leaves,"#") - EditField_zmin.Text=Format(MLC.ZMIN,"-#.#####") - EditField_leavesthick.Text=Format(MLC.ZThick,"-#.#####") + EditField_zmin.value = Format(MLC.ZMIN,"-#.#####") + EditField_leavesthick.value = Format(MLC.ZThick,"-#.#####") - EditField_Zsides.Text=Format(MLC.zfocus_sides,"-#.#####") - EditField_Zends.Text=Format(MLC.zfocus_ends,"-#.#####") + EditField_Zsides.value = Format(MLC.zfocus_sides,"-#.#####") + EditField_Zends.value = Format(MLC.zfocus_ends,"-#.#####") - EditField_material_leaves.Text=MLC.Med_collimator_leaves - EditField_Mat_Inside.Text=MLC.Med_inside_collimator + EditField_material_leaves.value = MLC.Med_collimator_leaves + EditField_Mat_Inside.value = MLC.Med_inside_collimator donothing=False End Sub diff --git a/BEAMnrc/Window_BEAM_Options_SLABS.xojo_window b/BEAMnrc/Window_BEAM_Options_SLABS.xojo_window index 23a14a4..4d1270a 100644 --- a/BEAMnrc/Window_BEAM_Options_SLABS.xojo_window +++ b/BEAMnrc/Window_BEAM_Options_SLABS.xojo_window @@ -439,10 +439,10 @@ End - EditField_numslabs.Text=str(S.N_SLABS) - EditField_radius.Text=str(S.RMAX_CM) - EditField_title.Text=str(S.Title_CM) - EditField_zmin.Text=Format(S.Zmin,"-#.#####") + EditField_numslabs.value = str(S.N_SLABS) + EditField_radius.value = str(S.RMAX_CM) + EditField_title.value = str(S.Title_CM) + EditField_zmin.value = Format(S.Zmin,"-#.#####") diff --git a/BEAMnrc/Window_BEAM_Options_Scoring.xojo_window b/BEAMnrc/Window_BEAM_Options_Scoring.xojo_window index e598d27..b4df3f6 100644 --- a/BEAMnrc/Window_BEAM_Options_Scoring.xojo_window +++ b/BEAMnrc/Window_BEAM_Options_Scoring.xojo_window @@ -471,10 +471,10 @@ End PopupMenu_zonetype.ListIndex=BEAM.NSC(NSC_Index).MZONE_TYPE - EditField_scor_cmnum.Text=str(BEAM.NSC(NSC_Index).IPLANE_to_CM) + EditField_scor_cmnum.value = str(BEAM.NSC(NSC_Index).IPLANE_to_CM) - EditField_NumScoringZones.Text=str(BEAM.NSC(NSC_Index).NSC_ZONES) + EditField_NumScoringZones.value = str(BEAM.NSC(NSC_Index).NSC_ZONES) Update_Listbox diff --git a/BEAMnrc/Window_BEAM_Options_TOMOMLC.xojo_window b/BEAMnrc/Window_BEAM_Options_TOMOMLC.xojo_window index 25ad96a..075677f 100644 --- a/BEAMnrc/Window_BEAM_Options_TOMOMLC.xojo_window +++ b/BEAMnrc/Window_BEAM_Options_TOMOMLC.xojo_window @@ -1610,37 +1610,37 @@ End RadioButton_par_x.Value=True end - //EditField_numleaves.Text=str(MLC.Num_leaf) - EditField_radius.Text=Format(MLC.RMAX_CM,"-#.###") - EditField_title.Text=Trim(MLC.Title_CM) + //EditField_numleaves.value = str(MLC.Num_leaf) + EditField_radius.value = Format(MLC.RMAX_CM,"-#.###") + EditField_title.value = Trim(MLC.Title_CM) - //EditField_Twidth.Text=Format(MLC.TWIDTH_MLC,"-#.###") + //EditField_Twidth.value = Format(MLC.TWIDTH_MLC,"-#.###") - EditField_ECUT_Inside.Text=Format(MLC.Ecut_Air,"-#.###") - EditField_Ecut_leaves.Text=Format(MLC.Ecut_leaves,"-#.###") + EditField_ECUT_Inside.value = Format(MLC.Ecut_Air,"-#.###") + EditField_Ecut_leaves.value = Format(MLC.Ecut_leaves,"-#.###") - EditField_Pcut_Inside.Text=Format(MLC.Pcut_air,"-#.###") - EditField_Pcut_leaves.Text=Format(MLC.Pcut_leaves,"-#.###") + EditField_Pcut_Inside.value = Format(MLC.Pcut_air,"-#.###") + EditField_Pcut_leaves.value = Format(MLC.Pcut_leaves,"-#.###") - EditField_DoseZone_Inside.Text=Format(MLC.Dose_Zone_air,"#") - EditField_dose_zone_leaves.Text=Format(MLC.Dose_Zone_Leaves,"#") + EditField_DoseZone_Inside.value = Format(MLC.Dose_Zone_air,"#") + EditField_dose_zone_leaves.value = Format(MLC.Dose_Zone_Leaves,"#") - EditField_Latch_Inside.Text=Format(MLC.IRegion_to_bit_air,"#") - EditField_latch_leaves.Text=Format(MLC.IRegion_to_bit_Leaves,"#") + EditField_Latch_Inside.value = Format(MLC.IRegion_to_bit_air,"#") + EditField_latch_leaves.value = Format(MLC.IRegion_to_bit_Leaves,"#") - //EditField_zmin.Text=Format(MLC.ZMIN,"-#.#####") - //EditField_leavesthick.Text=Format(MLC.ZThick,"-#.#####") + //EditField_zmin.value = Format(MLC.ZMIN,"-#.#####") + //EditField_leavesthick.value = Format(MLC.ZThick,"-#.#####") - //EditField_Zsides.Text=Format(MLC.zfocus_sides,"-#.#####") - //EditField_Zends.Text=Format(MLC.zfocus_ends,"-#.#####") + //EditField_Zsides.value = Format(MLC.zfocus_sides,"-#.#####") + //EditField_Zends.value = Format(MLC.zfocus_ends,"-#.#####") - EditField_Path.Text=MLC.MLC_File_Path - EditField_material_leaves.Text=MLC.Med_In_Leaves - EditField_Mat_Inside.Text=MLC.Med_In_Air + EditField_Path.value = MLC.MLC_File_Path + EditField_material_leaves.value = MLC.Med_In_Leaves + EditField_Mat_Inside.value = MLC.Med_In_Air donothing=False End Sub diff --git a/BEAMnrc/Window_BEAM_Options_WEDGE.xojo_window b/BEAMnrc/Window_BEAM_Options_WEDGE.xojo_window index fcbc56b..b4c103b 100644 --- a/BEAMnrc/Window_BEAM_Options_WEDGE.xojo_window +++ b/BEAMnrc/Window_BEAM_Options_WEDGE.xojo_window @@ -2526,9 +2526,9 @@ End - EditField_radius.Text=str(w.RMAX_CM) - EditField_title.Text=str(w.Title_CM) - EditField_zmin.Text=Format(w.Zmin,"-#.#####") + EditField_radius.value = str(w.RMAX_CM) + EditField_title.value = str(w.Title_CM) + EditField_zmin.value = Format(w.Zmin,"-#.#####") if w.Status=1 Then @@ -2610,47 +2610,47 @@ End - EditField_Dist_B.Text=Format(w.DBack,"-#.#####") - EditField_Dist_F.Text=Format(w.DFront,"-#.#####") + EditField_Dist_B.value = Format(w.DBack,"-#.#####") + EditField_Dist_F.value = Format(w.DFront,"-#.#####") - EditField_B_Thick.Text=Format(w.TBack,"-#.#####") - EditField_F_Thick.Text=Format(w.TFront,"-#.#####") + EditField_B_Thick.value = Format(w.TBack,"-#.#####") + EditField_F_Thick.value = Format(w.TFront,"-#.#####") - EditField_WP1.Text=Format(w.WPos1,"-#.#####") - EditField_WP2.Text=Format(w.WPos2,"-#.#####") + EditField_WP1.value = Format(w.WPos1,"-#.#####") + EditField_WP2.value = Format(w.WPos2,"-#.#####") - EditField_NProf.Text=Format(w.NProf,"-#.#####") - EditField_NPoint.Text=Format(w.NPoint,"-#.#####") + EditField_NProf.value = Format(w.NProf,"-#.#####") + EditField_NPoint.value = Format(w.NPoint,"-#.#####") - EditField_Material_Back.Text=w.Medium_In_Back - EditField_Material_Wedge.Text=w.Medium_In_Wedge - EditField_Material_Front.Text=w.Medium_In_Front + EditField_Material_Back.value = w.Medium_In_Back + EditField_Material_Wedge.value = w.Medium_In_Wedge + EditField_Material_Front.value = w.Medium_In_Front - EditField_dosezoneair.Text=Format(w.DoseZoneAir,"#") - EditField_dosezone_F.Text=Format(w.DoseZoneFront,"#") - EditField_dosezone_B.Text=Format(w.DoseZoneBack,"#") - EditField_dosezone_Wedge.Text=Format(w.DoseZoneWedge,"#") + EditField_dosezoneair.value = Format(w.DoseZoneAir,"#") + EditField_dosezone_F.value = Format(w.DoseZoneFront,"#") + EditField_dosezone_B.value = Format(w.DoseZoneBack,"#") + EditField_dosezone_Wedge.value = Format(w.DoseZoneWedge,"#") - EditField_LATCHbit_Air.Text=Format(w.Iregion_to_bit_Air,"#") - EditField_LATCHbit_F.Text=Format(w.Iregion_to_bit_Front,"#") - EditField_LATCHbit_B.Text=Format(w.Iregion_to_bit_back,"#") - EditField_LATCHbit_Wedge.Text=Format(w.Iregion_to_bit_Wedge,"#") + EditField_LATCHbit_Air.value = Format(w.Iregion_to_bit_Air,"#") + EditField_LATCHbit_F.value = Format(w.Iregion_to_bit_Front,"#") + EditField_LATCHbit_B.value = Format(w.Iregion_to_bit_back,"#") + EditField_LATCHbit_Wedge.value = Format(w.Iregion_to_bit_Wedge,"#") - EditField_ESaveF.Text=Format(w.ESaveIn_Front,"-#.#####") - EditField_ESaveB.Text=Format(w.ESaveIn_Back,"-#.#####") - EditField_EsaveW.Text=Format(w.ESaveIn_Wedge,"-#.#####") + EditField_ESaveF.value = Format(w.ESaveIn_Front,"-#.#####") + EditField_ESaveB.value = Format(w.ESaveIn_Back,"-#.#####") + EditField_EsaveW.value = Format(w.ESaveIn_Wedge,"-#.#####") - EditField_Ecut_Air.Text=Format(w.ECutAir,"-#.#####") - EditField_Ecut_F.Text=Format(w.ECutFront,"-#.#####") - EditField_Ecut_B.Text=Format(w.ECutBack,"-#.#####") - EditField_Ecut_Wedge.Text=Format(w.ECutWedge,"-#.#####") + EditField_Ecut_Air.value = Format(w.ECutAir,"-#.#####") + EditField_Ecut_F.value = Format(w.ECutFront,"-#.#####") + EditField_Ecut_B.value = Format(w.ECutBack,"-#.#####") + EditField_Ecut_Wedge.value = Format(w.ECutWedge,"-#.#####") - EditField_pcut_Air.Text=Format(w.PcutAir,"-#.#####") - EditField_pcut_F.Text=Format(w.PcutFront,"-#.#####") - EditField_pcut_B.Text=Format(w.PcutBack,"-#.#####") - EditField_pcut_Wedge.Text=Format(w.PcutWedge,"-#.#####") + EditField_pcut_Air.value = Format(w.PcutAir,"-#.#####") + EditField_pcut_F.value = Format(w.PcutFront,"-#.#####") + EditField_pcut_B.value = Format(w.PcutBack,"-#.#####") + EditField_pcut_Wedge.value = Format(w.PcutWedge,"-#.#####") diff --git a/BEAMnrc/Window_BEAM_Options_source0.xojo_window b/BEAMnrc/Window_BEAM_Options_source0.xojo_window index 06133e0..ebf7013 100644 --- a/BEAMnrc/Window_BEAM_Options_source0.xojo_window +++ b/BEAMnrc/Window_BEAM_Options_source0.xojo_window @@ -532,11 +532,11 @@ End #tag Method, Flags = &h0 Sub Refresh_window() - EditField_radius.Text=str(BEAM.RBEAM) - EditField_KeV.Text=str(BEAM.EIN) - EditField_xaxis.Text=str(BEAM.UINC) - EditField_yaxis.Text=str(BEAM.VINC) - EditField_zaxis.Text=str(BEAM.WINC) + EditField_radius.value = str(BEAM.RBEAM) + EditField_KeV.value = str(BEAM.EIN) + EditField_xaxis.value = str(BEAM.UINC) + EditField_yaxis.value = str(BEAM.VINC) + EditField_zaxis.value = str(BEAM.WINC) if BEAM.MONOEN=1 Then diff --git a/BEAMnrc/Window_BEAM_Options_source1.xojo_window b/BEAMnrc/Window_BEAM_Options_source1.xojo_window index f53eedb..154cdb9 100644 --- a/BEAMnrc/Window_BEAM_Options_source1.xojo_window +++ b/BEAMnrc/Window_BEAM_Options_source1.xojo_window @@ -890,14 +890,14 @@ End #tag Method, Flags = &h0 Sub Refresh_window() - EditField_distanceZ.Text=str(BEAM.DISTZ) - EditField_rbeam.Text=str(Abs(BEAM.RBEAM)) - EditField_gamma.Text=str(BEAM.GAMMA) - EditField_xinl.Text=str(BEAM.XINL) - EditField_xinu.Text=str(BEAM.XINU) - EditField_yinl.Text=str(BEAM.yINL) - EditField_yinu.Text=str(BEAM.yINU) - EditField_KeV.Text=str(BEAM.EIN) + EditField_distanceZ.value = str(BEAM.DISTZ) + EditField_rbeam.value = str(Abs(BEAM.RBEAM)) + EditField_gamma.value = str(BEAM.GAMMA) + EditField_xinl.value = str(BEAM.XINL) + EditField_xinu.value = str(BEAM.XINU) + EditField_yinl.value = str(BEAM.yINL) + EditField_yinu.value = str(BEAM.yINU) + EditField_KeV.value = str(BEAM.EIN) if BEAM.RBEAM>0 Then RadioButton_cir.Value=True diff --git a/BEAMnrc/Window_BEAM_Options_source19.xojo_window b/BEAMnrc/Window_BEAM_Options_source19.xojo_window index 9466c3f..5e5daaa 100644 --- a/BEAMnrc/Window_BEAM_Options_source19.xojo_window +++ b/BEAMnrc/Window_BEAM_Options_source19.xojo_window @@ -821,15 +821,15 @@ End RadioButton_FWHM.Value=True end - EditField_radius.Text=str(Abs(BEAM.RBEAM)) - EditField_radiusY.Text=str(Abs(BEAM.RBEAMY)) + EditField_radius.value = str(Abs(BEAM.RBEAM)) + EditField_radiusY.value = str(Abs(BEAM.RBEAMY)) - EditField_KeV.Text=str(BEAM.EIN) - EditField_xaxis.Text=str(BEAM.UINC) - EditField_yaxis.Text=str(BEAM.VINC) - EditField_zaxis.Text=str(BEAM.WINC) - EditField_mean_ang_spread.Text=str(BEAM.sigma_src19) + EditField_KeV.value = str(BEAM.EIN) + EditField_xaxis.value = str(BEAM.UINC) + EditField_yaxis.value = str(BEAM.VINC) + EditField_zaxis.value = str(BEAM.WINC) + EditField_mean_ang_spread.value = str(BEAM.sigma_src19) diff --git a/BEAMnrc/Window_BEAM_Options_source21.xojo_window b/BEAMnrc/Window_BEAM_Options_source21.xojo_window index bbd2876..a38bf54 100644 --- a/BEAMnrc/Window_BEAM_Options_source21.xojo_window +++ b/BEAMnrc/Window_BEAM_Options_source21.xojo_window @@ -742,14 +742,14 @@ End #tag Method, Flags = &h0 Sub Refresh_window() - EditField_ICM.Text=str(BEAM.INIT_ICM) - EditField_IPARALLEL.Text=str(BEAM.IPARALLEL) - EditField_PARNUM.Text=str(BEAM.PARNUM) - EditField_PhSPName.Text=(BEAM.SPCNAM) - EditField_recycle.Text=str(BEAM.NRCYCL) - EditField_RSRC.Text=str(BEAM.RSRCDBS) - EditField_SSDSRC.Text=str(BEAM.SSDSRCDBS) - EditField_ZSRC.Text=str(BEAM.ZSRCDBS) + EditField_ICM.value = str(BEAM.INIT_ICM) + EditField_IPARALLEL.value = str(BEAM.IPARALLEL) + EditField_PARNUM.value = str(BEAM.PARNUM) + EditField_PhSPName.value = (BEAM.SPCNAM) + EditField_recycle.value = str(BEAM.NRCYCL) + EditField_RSRC.value = str(BEAM.RSRCDBS) + EditField_SSDSRC.value = str(BEAM.SSDSRCDBS) + EditField_ZSRC.value = str(BEAM.ZSRCDBS) if BEAM.ISRCDBS=1 Then CheckBox_DBS.Value=True diff --git a/BEAMnrc/Window_BEAM_Options_source3.xojo_window b/BEAMnrc/Window_BEAM_Options_source3.xojo_window index d651f07..834479d 100644 --- a/BEAMnrc/Window_BEAM_Options_source3.xojo_window +++ b/BEAMnrc/Window_BEAM_Options_source3.xojo_window @@ -740,12 +740,12 @@ End RadioButton_hor.Value=True end - EditField_RBEAM.Text=str(Abs(BEAM.RBEAM)) - EditField_RMINBM.Text=str(BEAM.RMINBM) - EditField_ZSMAX.Text=str(BEAM.ZSMAX) - EditField_ZSMIN.Text=str(BEAM.ZSMIN) - EditField_Path.Text=str(BEAM.Filnam) - EditField_KeV.Text=str(BEAM.EIN) + EditField_RBEAM.value = str(Abs(BEAM.RBEAM)) + EditField_RMINBM.value = str(BEAM.RMINBM) + EditField_ZSMAX.value = str(BEAM.ZSMAX) + EditField_ZSMIN.value = str(BEAM.ZSMIN) + EditField_Path.value = str(BEAM.Filnam) + EditField_KeV.value = str(BEAM.EIN) if BEAM.MONOEN=1 Then diff --git a/BEAMnrc/Window_BEAM_Phsp_Information.xojo_window b/BEAMnrc/Window_BEAM_Phsp_Information.xojo_window index 3c5ea70..61fd01e 100644 --- a/BEAMnrc/Window_BEAM_Phsp_Information.xojo_window +++ b/BEAMnrc/Window_BEAM_Phsp_Information.xojo_window @@ -1565,48 +1565,48 @@ End StaticText_linac_name.Text =gRTOG.Plan(k).beam(i).RT_name - StaticText_beam_energy.Text=(gRTOG.Plan(k).beam(i).beam_energy ) + StaticText_beam_energy.value = (gRTOG.Plan(k).beam(i).beam_energy ) - //StaticText_ganty_rtn.Text=str(gRTOG.Plan(k).beam(i).gantry_Angle) - //StaticText_coll_rtn.text=str(gRTOG.Plan(k).beam(i).collimator_angle) - //StaticText_couch_rtn.text=str(gRTOG.Plan(k).beam(i).couch_Angle) + //StaticText_ganty_rtn.value = str(gRTOG.Plan(k).beam(i).gantry_Angle) + //StaticText_coll_rtn.value = str(gRTOG.Plan(k).beam(i).collimator_angle) + //StaticText_couch_rtn.value = str(gRTOG.Plan(k).beam(i).couch_Angle) - StaticText_Phsp_name.Text=gBEAM.Beams(i).egs_Phsp_name + StaticText_Phsp_name.value = gBEAM.Beams(i).egs_Phsp_name - StaticText_Phsp_size.Text=Format(gBEAM.Beams(i).egs_phsp_size,"###,###,###,###") + StaticText_Phsp_size.value = Format(gBEAM.Beams(i).egs_phsp_size,"###,###,###,###") if gBEAM.Beams(i).egs_phsp_size>0 Then StaticText_Phsp_found.TextColor=RGB(0,255,0) - StaticText_Phsp_found.Text="Yes" + StaticText_Phsp_found.value = "Yes" else StaticText_Phsp_found.TextColor=RGB(255,0,0) - StaticText_Phsp_found.Text="No" + StaticText_Phsp_found.value = "No" end if gBEAM.Beams(i).egs_phsp_link Then StaticText_Phsp_linkyn.TextColor=RGB(0,0,255) - StaticText_Phsp_linkyn.Text="Yes" - StaticText_Phsp_linkyname.Text=gBEAM.Beams(i).egs_phsp_name + StaticText_Phsp_linkyn.value = "Yes" + StaticText_Phsp_linkyname.value = gBEAM.Beams(i).egs_phsp_name else StaticText_Phsp_linkyn.TextColor=RGB(0,0,0) - StaticText_Phsp_linkyn.Text="No" - StaticText_Phsp_linkyname.Text="" + StaticText_Phsp_linkyn.value = "No" + StaticText_Phsp_linkyname.value = "" end StaticText_wedge.text =gRTOG.Plan(k).Beam(i).Wedge_Angle +" "+left(gRTOG.Plan(k).Beam(i).Wedge_Rotation,1) - StaticText_beam_mode.text=gRTOG.Plan(k).Beam(i).beam_mode + StaticText_beam_mode.value = gRTOG.Plan(k).Beam(i).beam_mode - StaticText_Beam_Number.Text=str(beam_index+1) + StaticText_Beam_Number.value = str(beam_index+1) - StaticText_xjaws.Text=str(col.X1+col.x2) + StaticText_xjaws.value = str(col.X1+col.x2) - StaticText_yjaws.Text=str(col.y1+col.y2) + StaticText_yjaws.value = str(col.y1+col.y2) end End Sub @@ -1737,7 +1737,7 @@ End wedge=rs.Field("WEDGE").StringValue app=rs.Field("APP").StringValue - if InStr(mode+" "+jaw+" "+name+" "+eng+" "+opening+" "+linac+" "+Shell,EditField_Filter.Text)>0 or EditField_Filter.Text="" Then + if InStr(mode+" "+jaw+" "+name+" "+eng+" "+opening+" "+linac+" "+Shell,EditField_Filter.Text)>0 or EditField_Filter.value = "" Then Listbox_PhaseSpace.AddRow mode Listbox_PhaseSpace.Cell(Listbox_PhaseSpace.LastIndex,1)=name Listbox_PhaseSpace.Cell(Listbox_PhaseSpace.LastIndex,2)=eng diff --git a/Builds - mmctp/.DS_Store b/Builds - mmctp/.DS_Store index ffcb01ca7ce134f948bb30779e2c823cdd4986f7..3cf3a2d74d4a83109f46069482cc3ce6b3be99c7 100644 GIT binary patch delta 158 zcmZoMXffDe$YgjTsURn_xWvHVIwKP^3o9Et2L}f?2QNo#a7KQ4a7kiGX|YpcQ8b7b zkXVwDlsLJZ$claqrpUO>FM+RRc%!Pv;OR!5=Q+}uD%!Nl0Cww9AaT-DIlGaf|IQ&$MWehJeJ944@)TWrxxN1`y!n z;EWd#udX(+)KM@tF|E~6s5Un@&`~fkHmj}WNeeUP diff --git a/Builds - mmctp/OS X 64 bit/.DS_Store b/Builds - mmctp/OS X 64 bit/.DS_Store index 5a43cb04e637523ce480f2e2d21bcb775e358377..f56f255405af80b6d565a0e74104a15bca54ca04 100644 GIT binary patch delta 55 zcmZoMXffDez{nJ#Fgb=%VzL(_7uy$A{TlY<$x)0dFlGy*8l%AGjf`Pz6C2nzvvd6A F2LQQv5F-Ep delta 55 zcmZoMXffDez{r$wU~&wj#AGiAJ>%+B$b F9{>aI5_13m diff --git a/Commissioning/Window_CSV_Import.xojo_window b/Commissioning/Window_CSV_Import.xojo_window index 360b1bd..e4fdea3 100644 --- a/Commissioning/Window_CSV_Import.xojo_window +++ b/Commissioning/Window_CSV_Import.xojo_window @@ -1365,7 +1365,7 @@ End #tag Method, Flags = &h0 Sub OpenWin() - EditField_File.Text=f.Name + EditField_File.value = f.Name End Sub #tag EndMethod @@ -1410,17 +1410,17 @@ End Listbox_Points.Cell(i,4)=str(gg.Points(i).value) next - EditField_Date.Text=gg.Date - EditField_Comment.Text=gg.Comment - EditField_ssd.Text=str(gg.SSD) - EditField_FieldX.Text=str(gg.Field_X) - EditField_FieldY.Text=Str(gg.Field_Y) + EditField_Date.value = gg.Date + EditField_Comment.value = gg.Comment + EditField_ssd.value = str(gg.SSD) + EditField_FieldX.value = str(gg.Field_X) + EditField_FieldY.value = Str(gg.Field_Y) - EditField_Depth.text=str(gg.Depth) - EditField_Energy.Text=str(gg.Energy) - EditField_TYPE.text=Str(gg.Type) - EditField_AddOn.Text=gg.addon - EditField_RadType.Text=gg.Radiation_Type + EditField_Depth.value = str(gg.Depth) + EditField_Energy.value = str(gg.Energy) + EditField_TYPE.value = Str(gg.Type) + EditField_AddOn.value = gg.addon + EditField_RadType.value = gg.Radiation_Type end diff --git a/Commissioning/Window_Commisssioning.xojo_window b/Commissioning/Window_Commisssioning.xojo_window index 1c901f5..497b90b 100644 --- a/Commissioning/Window_Commisssioning.xojo_window +++ b/Commissioning/Window_Commisssioning.xojo_window @@ -1332,10 +1332,10 @@ End //window with the plot_Canvas. Canvas_Graph.Refresh - EditField_xmin.Text=Format(Canvas_Graph.x_Minimum,"-0.0###E") - EditField_xmax.Text=Format(Canvas_Graph.x_Maximum,"-0.0###e") - EditField_YMIN.Text=Format(Canvas_Graph.y_Minimum,"-0.0###e") - EditField_ymax.Text=Format(Canvas_Graph.y_Maximum,"-0.0###e") + EditField_xmin.value = Format(Canvas_Graph.x_Minimum,"-0.0###E") + EditField_xmax.value = Format(Canvas_Graph.x_Maximum,"-0.0###e") + EditField_YMIN.value = Format(Canvas_Graph.y_Minimum,"-0.0###e") + EditField_ymax.value = Format(Canvas_Graph.y_Maximum,"-0.0###e") End Sub #tag EndMethod @@ -1889,11 +1889,11 @@ End dd=Get_Dictionary_For_menu if dd<> Nil Then kk=new MenuItem - kk.Text="Select all" + kk.value = "Select all" base.Append(kk) kk=new MenuItem - kk.Text="Deselect all" + kk.value = "Deselect all" base.Append(kk) for i=0 to dd.Count-1 @@ -1912,7 +1912,7 @@ End kk.Checked=False end end - kk.Text=test(i) + kk.value = test(i) base.Append(kk) Next end @@ -2221,10 +2221,10 @@ End me.Redraw - EditField_X.Text=Format(me.x_mouse_value,"-#.####") + EditField_X.value = Format(me.x_mouse_value,"-#.####") if me.Interactive=False Then - EditField_Y.Text=Format(me.y_mouse_value,"-#.####e") + EditField_Y.value = Format(me.y_mouse_value,"-#.####e") end End Sub #tag EndEvent @@ -2381,9 +2381,9 @@ End if (x<0.1 and x>-0.1) or (abs(x)>1000) Then - EditField_Y.Text=Format(x,"-#.####e") + EditField_Y.value = Format(x,"-#.####e") else - EditField_Y.Text=Format(x,"-#.####") + EditField_Y.value = Format(x,"-#.####") end diff --git a/Commissioning/Window_Eclipse_Import.xojo_window b/Commissioning/Window_Eclipse_Import.xojo_window index 7021570..c1646e1 100644 --- a/Commissioning/Window_Eclipse_Import.xojo_window +++ b/Commissioning/Window_Eclipse_Import.xojo_window @@ -1350,7 +1350,7 @@ End Listbox_Points.Cell(i,3)=str(data.Graphs(k).Points(i).z_cm) Listbox_Points.Cell(i,4)=str(data.Graphs(k).Points(i).value) next - EditField_FS.Text=DATA.Graphs(k).FLSZ + EditField_FS.value = DATA.Graphs(k).FLSZ end @@ -1380,7 +1380,7 @@ End if f.Exists=False Then Return end - EditField_RFA_File.Text=f.Name + EditField_RFA_File.value = f.Name ts=f.OpenAsTextFile if ts=Nil Then @@ -1476,14 +1476,14 @@ End wend ts.Close - EditField_Date.Text=data.exportingdate - EditField_ssd.Text=Format(data.SSD,"-#.####") - EditField_Energy.Text=data.energy - EditField_algorithm.text=data.algorithm - EditField_machine.text=data.machine - EditField_data.Text=data.data - EditField_addon.Text=data.addon - EditField_beamdata.Text=data.beamdata + EditField_Date.value = data.exportingdate + EditField_ssd.value = Format(data.SSD,"-#.####") + EditField_Energy.value = data.energy + EditField_algorithm.value = data.algorithm + EditField_machine.value = data.machine + EditField_data.value = data.data + EditField_addon.value = data.addon + EditField_beamdata.value = data.beamdata GroupBox2.Enabled=True Pop_Graphs End Sub diff --git a/Commissioning/Window_MEPHYSTO_Import.xojo_window b/Commissioning/Window_MEPHYSTO_Import.xojo_window index 7ec3dbb..9039d2e 100644 --- a/Commissioning/Window_MEPHYSTO_Import.xojo_window +++ b/Commissioning/Window_MEPHYSTO_Import.xojo_window @@ -1719,7 +1719,7 @@ End #tag Method, Flags = &h0 Sub OpenWin() - EditField_RFA_File.Text=f.Name + EditField_RFA_File.value = f.Name End Sub #tag EndMethod @@ -1764,24 +1764,24 @@ End Listbox_Points.Cell(i,4)=str(mcc.Graphs(k).Points(i).value) next - EditField_Date.Text=mcc.Graphs(k).Date - EditField_Comment.Text=mcc.Graphs(k).Comment - EditField_ssd.Text=str(mcc.Graphs(k).SSD) - EditField_Field_Cros.Text=str(mcc.Graphs(k).FLSX) - EditField_Field_In.Text=Str(mcc.Graphs(k).FLSY) + EditField_Date.value = mcc.Graphs(k).Date + EditField_Comment.value = mcc.Graphs(k).Comment + EditField_ssd.value = str(mcc.Graphs(k).SSD) + EditField_Field_Cros.value = str(mcc.Graphs(k).FLSX) + EditField_Field_In.value = Str(mcc.Graphs(k).FLSY) - EditField_Linac.Text=mcc.Graphs(k).LinacName + EditField_Linac.value = mcc.Graphs(k).LinacName - EditField_Depth.text=str(mcc.Graphs(k).DPTH) - EditField_Energy.Text=str(mcc.Graphs(k).Energy) - EditField_BMTY.text=mcc.Graphs(k).BMTY - EditField_TYPE.text=mcc.Graphs(k).Type - EditField_DETY.text=mcc.Graphs(k).DETY - EditField_Detector.Text=mcc.Graphs(k).Detector - EditField_Operator.Text=mcc.Graphs(k).Operator + EditField_Depth.value = str(mcc.Graphs(k).DPTH) + EditField_Energy.value = str(mcc.Graphs(k).Energy) + EditField_BMTY.value = mcc.Graphs(k).BMTY + EditField_TYPE.value = mcc.Graphs(k).Type + EditField_DETY.value = mcc.Graphs(k).DETY + EditField_Detector.value = mcc.Graphs(k).Detector + EditField_Operator.value = mcc.Graphs(k).Operator - EditField_Wedge.Text=mcc.Graphs(k).Wedge + EditField_Wedge.value = mcc.Graphs(k).Wedge end diff --git a/Commissioning/Window_Profile_Properties.xojo_window b/Commissioning/Window_Profile_Properties.xojo_window index 82c5316..b3013cd 100644 --- a/Commissioning/Window_Profile_Properties.xojo_window +++ b/Commissioning/Window_Profile_Properties.xojo_window @@ -1620,19 +1620,19 @@ End #tag Method, Flags = &h0 Sub Open_Pro() - EditField_Label.Text=one.Label - EditField_Energy.Text=Format(one.Energy,"-#.##") - EditField_FieldX.Text=Format(one.Field_X,"-#.##") - EditField_Fieldy.Text=Format(one.Field_Y,"-#.##") - EditField_Depth.Text=Format(one.Depth,"-#.##") - EditField_SSD.Text=Format(one.SSD,"-#.##") + EditField_Label.value = one.Label + EditField_Energy.value = Format(one.Energy,"-#.##") + EditField_FieldX.value = Format(one.Field_X,"-#.##") + EditField_Fieldy.value = Format(one.Field_Y,"-#.##") + EditField_Depth.value = Format(one.Depth,"-#.##") + EditField_SSD.value = Format(one.SSD,"-#.##") - EditField_Date.Text=one.Date - EditField_Linacname.Text=One.Linac - EditField_AddOn.Text=One.AddOn + EditField_Date.value = one.Date + EditField_Linacname.value = One.Linac + EditField_AddOn.value = One.AddOn - EditField_Algorithm.Text=One.Algorithm - EditField_Comment.Text=One.Comment + EditField_Algorithm.value = One.Algorithm + EditField_Comment.value = One.Comment if one.Radiation_Type="Photon" Then RadioButton_RTypeP.Value=True diff --git a/Commissioning/Window_Profile_analysis.xojo_window b/Commissioning/Window_Profile_analysis.xojo_window index ddc4973..840ec51 100644 --- a/Commissioning/Window_Profile_analysis.xojo_window +++ b/Commissioning/Window_Profile_analysis.xojo_window @@ -1131,7 +1131,7 @@ End ppb=Profiles(PopupMenu_Calculated.ListIndex) pp=Gamma_1D(delD,dta,ppa,ppb) - EditField_GammaPass.Text=Format(pp.Gamma_Value,"#.#") + EditField_GammaPass.value = Format(pp.Gamma_Value,"#.#") pp=Dose_Difference_1D(ppa,ppb,kk) gProfiles.One_Profile.Append pp @@ -1141,7 +1141,7 @@ End gProfiles.One_Profile.Append ppdta - EditField_Chi.Text=Format(pp.Chi,"-#.##") + EditField_Chi.value = Format(pp.Chi,"-#.##") if app.which_window_Commission Then Window_Commisssioning.Update_Profile end diff --git a/Commissioning/Window_RFA_Import.xojo_window b/Commissioning/Window_RFA_Import.xojo_window index 6e7978f..330d02a 100644 --- a/Commissioning/Window_RFA_Import.xojo_window +++ b/Commissioning/Window_RFA_Import.xojo_window @@ -2306,7 +2306,7 @@ End #tag Method, Flags = &h0 Sub OpenWin() - EditField_RFA_File.Text=f.Name + EditField_RFA_File.value = f.Name End Sub #tag EndMethod @@ -2344,7 +2344,7 @@ End I50=pointpp.Z_cm - Window_RFA_Import.EditField_I50.Text=str(I50) + Window_RFA_Import.EditField_I50.value = str(I50) if I50<=10 Then @@ -2357,7 +2357,7 @@ End - EditField_R50.Text=str(r50) + EditField_R50.value = str(r50) @@ -2437,22 +2437,22 @@ End Listbox_Points.Cell(i,4)=str(rfa.Graphs(k).Points(i).value) next - EditField_Date.Text=RFA.Graphs(k).Date - EditField_Comment.Text=RFA.Graphs(k).Comment - EditField_ssd.Text=str(RFA.Graphs(k).SSD) - EditField_axis.Text=RFA.Graphs(k).AXIS - EditField_Field.Text=RFA.Graphs(k).FLSZ - EditField_Depth.text=str(RFA.Graphs(k).DPTH) - EditField_Energy.Text=str(rfa.Graphs(k).Energy) - EditField_BMTY.text=RFA.Graphs(k).BMTY - EditField_TYPE.text=RFA.Graphs(k).Type - EditField_DETY.text=RFA.Graphs(k).DETY - EditField_AddOn.Text=rfa.Graphs(k).addon - EditField_Detector.Text=RFA.Graphs(k).Detector - EditField_Operator.Text=RFA.Graphs(k).Operator + EditField_Date.value = RFA.Graphs(k).Date + EditField_Comment.value = RFA.Graphs(k).Comment + EditField_ssd.value = str(RFA.Graphs(k).SSD) + EditField_axis.value = RFA.Graphs(k).AXIS + EditField_Field.value = RFA.Graphs(k).FLSZ + EditField_Depth.value = str(RFA.Graphs(k).DPTH) + EditField_Energy.value = str(rfa.Graphs(k).Energy) + EditField_BMTY.value = RFA.Graphs(k).BMTY + EditField_TYPE.value = RFA.Graphs(k).Type + EditField_DETY.value = RFA.Graphs(k).DETY + EditField_AddOn.value = rfa.Graphs(k).addon + EditField_Detector.value = RFA.Graphs(k).Detector + EditField_Operator.value = RFA.Graphs(k).Operator - EditField_WDGD.Text=RFA.Graphs(k).WDGD - EditField_WDGL.Text=RFA.Graphs(k).WDGL + EditField_WDGD.value = RFA.Graphs(k).WDGD + EditField_WDGL.value = RFA.Graphs(k).WDGL end diff --git a/Commissioning/Window_XiO_Import.xojo_window b/Commissioning/Window_XiO_Import.xojo_window index 4d1847a..2348c28 100644 --- a/Commissioning/Window_XiO_Import.xojo_window +++ b/Commissioning/Window_XiO_Import.xojo_window @@ -1489,9 +1489,9 @@ End Listbox_Points.Cell(i,3)=str(data.Graphs(k).Points(i).z_cm) Listbox_Points.Cell(i,4)=str(data.Graphs(k).Points(i).value) next - EditField_Date.Text=data.exportingdate - EditField_Depth.Text=str(data.Graphs(k).DPTH) - EditField_Angle.Text=Str(data.Graphs(k).Angle) + EditField_Date.value = data.exportingdate + EditField_Depth.value = str(data.Graphs(k).DPTH) + EditField_Angle.value = Str(data.Graphs(k).Angle) end @@ -1515,7 +1515,7 @@ End if f.Exists=False Then Return end - EditField_RFA_File.Text=f.Name + EditField_RFA_File.value = f.Name ts=f.OpenAsTextFile if ts=Nil Then diff --git a/DICOM/Thread_DICOM_Object.xojo_code b/DICOM/Thread_DICOM_Object.xojo_code index a1a4df8..9e538d4 100644 --- a/DICOM/Thread_DICOM_Object.xojo_code +++ b/DICOM/Thread_DICOM_Object.xojo_code @@ -2472,237 +2472,240 @@ Inherits Thread // DICOM image reader // //------------------------------------------------------- - dim i,j,pos as integer - dim found,signed as boolean - Dim Image as Class_DICOM_Image + Dim pos As Integer + Dim found,signed As Boolean + Dim Image As Class_DICOM_Image //================================================ found=False - for i=0 to UBound(file.Elements) // look for Image .dcm files - if file.Elements(i).tag_a="0008" and file.Elements(i).tag_b="0060" and file.Elements(i).value="CT" then - found=true + For i As Integer = 0 To UBound(file.Elements) // look for Image .dcm files + If file.Elements(i).tag_a="0008" And file.Elements(i).tag_b="0060" And file.Elements(i).value="CT" Then + found=True Exit - elseif file.Elements(i).tag_a="0008" and file.Elements(i).tag_b="0060" and file.Elements(i).value="" then // Correction for Issam DICOM Data from CERR + Elseif file.Elements(i).tag_a="0008" And file.Elements(i).tag_b="0060" And file.Elements(i).value="" Then // Correction for Issam DICOM Data from CERR file.Elements(i).value="CT" - found=true + found=True Exit - end if - next + End If + Next - if found Then - Image=new Class_DICOM_Image - else + If found Then + Image=New Class_DICOM_Image + Else Return - end + End - for i=0 to UBound(file.Elements) - if file.Elements(i).tag_a="0002" and file.Elements(i).tag_b="0002" then + For i As Integer = 0 To UBound(file.Elements) + If file.Elements(i).tag_a="0002" And file.Elements(i).tag_b="0002" Then Image.MediaStorageSOPClassUID=(file.Elements(i).value) - elseif file.Elements(i).tag_a="0002" and file.Elements(i).tag_b="0003" then + Elseif file.Elements(i).tag_a="0002" And file.Elements(i).tag_b="0003" Then Image.MediaStorageSOPInstanceUID=(file.Elements(i).value) - elseif file.Elements(i).tag_a="0002" and file.Elements(i).tag_b="0020" then + Elseif file.Elements(i).tag_a="0002" And file.Elements(i).tag_b="0020" Then Image.PatientOrientation=Trim(file.Elements(i).value) // Patient Orientation - elseif file.Elements(i).tag_a="0008" and file.Elements(i).tag_b="0008" then // Image Type + Elseif file.Elements(i).tag_a="0008" And file.Elements(i).tag_b="0008" Then // Image Type Image.Image_Type=file.Elements(i).value - elseif file.Elements(i).tag_a="0008" and file.Elements(i).tag_b="0012" then // Creation Date - Image.InstanceCreationDate=val(file.Elements(i).value) + Elseif file.Elements(i).tag_a="0008" And file.Elements(i).tag_b="0012" Then // Creation Date + Image.InstanceCreationDate=Val(file.Elements(i).value) - elseif file.Elements(i).tag_a="0008" and file.Elements(i).tag_b="0013" then // Creation Time + Elseif file.Elements(i).tag_a="0008" And file.Elements(i).tag_b="0013" Then // Creation Time Image.InstanceCreationTime=file.Elements(i).value - elseif file.Elements(i).tag_a="0008" and file.Elements(i).tag_b="0016" then // SOP Class UID + Elseif file.Elements(i).tag_a="0008" And file.Elements(i).tag_b="0016" Then // SOP Class UID Image.SOPClassUID=file.Elements(i).value - elseif file.Elements(i).tag_a="0008" and file.Elements(i).tag_b="0018" then // SOP Instance UID + Elseif file.Elements(i).tag_a="0008" And file.Elements(i).tag_b="0018" Then // SOP Instance UID Image.SOPInstanceUID=file.Elements(i).value - elseif file.Elements(i).tag_a="0008" and file.Elements(i).tag_b="0020" then // Study Date + Elseif file.Elements(i).tag_a="0008" And file.Elements(i).tag_b="0020" Then // Study Date Image.StudyDate=file.Elements(i).value - elseif file.Elements(i).tag_a="0008" and file.Elements(i).tag_b="0021" then // Series Date + Elseif file.Elements(i).tag_a="0008" And file.Elements(i).tag_b="0021" Then // Series Date Image.SeriesDate=file.Elements(i).value - elseif file.Elements(i).tag_a="0008" and file.Elements(i).tag_b="0022" then // AcquisitionDate Date + Elseif file.Elements(i).tag_a="0008" And file.Elements(i).tag_b="0022" Then // AcquisitionDate Date Image.AcquisitionDate=file.Elements(i).value - elseif file.Elements(i).tag_a="0008" and file.Elements(i).tag_b="0030" then //Study Time + Elseif file.Elements(i).tag_a="0008" And file.Elements(i).tag_b="0030" Then //Study Time Image.StudyTime=file.Elements(i).value - elseif file.Elements(i).tag_a="0008" and file.Elements(i).tag_b="0031" then // Series Time + Elseif file.Elements(i).tag_a="0008" And file.Elements(i).tag_b="0031" Then // Series Time Image.SeriesTime=file.Elements(i).value - elseif file.Elements(i).tag_a="0008" and file.Elements(i).tag_b="0032" then // aq Time + Elseif file.Elements(i).tag_a="0008" And file.Elements(i).tag_b="0032" Then // aq Time Image.AcquisitionTime=file.Elements(i).value - elseif file.Elements(i).tag_a="0008" and file.Elements(i).tag_b="0050" then // + Elseif file.Elements(i).tag_a="0008" And file.Elements(i).tag_b="0050" Then // Image.AccessionNumber=file.Elements(i).value - elseif file.Elements(i).tag_a="0008" and file.Elements(i).tag_b="0060" then //Modality + Elseif file.Elements(i).tag_a="0008" And file.Elements(i).tag_b="0060" Then //Modality Image.Modality=file.Elements(i).value - elseif file.Elements(i).tag_a="0008" and file.Elements(i).tag_b="0070" then //Modality + Elseif file.Elements(i).tag_a="0008" And file.Elements(i).tag_b="0070" Then //Modality Image.Manufacturer=file.Elements(i).value - elseif file.Elements(i).tag_a="0008" and file.Elements(i).tag_b="0090" then // Referring Physician's name + Elseif file.Elements(i).tag_a="0008" And file.Elements(i).tag_b="0090" Then // Referring Physician's name Image.ReferringPhysician=file.Elements(i).value - elseif file.Elements(i).tag_a="0008" and file.Elements(i).tag_b="1030" then //Study Description + Elseif file.Elements(i).tag_a="0008" And file.Elements(i).tag_b="1030" Then //Study Description Image.StudyDescription=file.Elements(i).value - elseif file.Elements(i).tag_a="0008" and file.Elements(i).tag_b="103E" then //Series Description + Elseif file.Elements(i).tag_a="0008" And file.Elements(i).tag_b="103E" Then //Series Description Image.SeriesDescription=file.Elements(i).value - elseif file.Elements(i).tag_a="0008" and file.Elements(i).tag_b="1048" then //Physician Name + Elseif file.Elements(i).tag_a="0008" And file.Elements(i).tag_b="1048" Then //Physician Name Image.Physician=file.Elements(i).value - elseif file.Elements(i).tag_a="0008" and file.Elements(i).tag_b="2111" then // + Elseif file.Elements(i).tag_a="0008" And file.Elements(i).tag_b="2111" Then // Image.DerivationDescription=file.Elements(i).value - elseif file.Elements(i).tag_a="0010" and file.Elements(i).tag_b="0010" then - Image.PatientName=trim((file.Elements(i).value)) + Elseif file.Elements(i).tag_a="0010" And file.Elements(i).tag_b="0010" Then + Image.PatientName=Trim((file.Elements(i).value)) - elseif file.Elements(i).tag_a="0010" and file.Elements(i).tag_b="0020" then - Image.PatientID=trim(file.Elements(i).value) //0010x0020 patient ID + Elseif file.Elements(i).tag_a="0010" And file.Elements(i).tag_b="0020" Then + Image.PatientID=Trim(file.Elements(i).value) //0010x0020 patient ID - elseif file.Elements(i).tag_a="0010" and file.Elements(i).tag_b="0030" then - Image.PatientBirthDate=trim((file.Elements(i).value)) // Birthdate + Elseif file.Elements(i).tag_a="0010" And file.Elements(i).tag_b="0030" Then + Image.PatientBirthDate=Trim((file.Elements(i).value)) // Birthdate - elseif file.Elements(i).tag_a="0010" and file.Elements(i).tag_b="0040" then - Image.sex=trim(file.Elements(i).value) // patient sex + Elseif file.Elements(i).tag_a="0010" And file.Elements(i).tag_b="0040" Then + Image.sex=Trim(file.Elements(i).value) // patient sex - elseif file.Elements(i).tag_a="0010" and file.Elements(i).tag_b="1010" then - Image.Age=trim(file.Elements(i).value) //Age + Elseif file.Elements(i).tag_a="0010" And file.Elements(i).tag_b="1010" Then + Image.Age=Trim(file.Elements(i).value) //Age - elseif file.Elements(i).tag_a="0018" and file.Elements(i).tag_b="0050" then - Image.SliceThickness=cdbl(file.Elements(i).value) //slice thickness in mm + Elseif file.Elements(i).tag_a="0018" And file.Elements(i).tag_b="0050" Then + Image.SliceThickness=CDbl(file.Elements(i).value) //slice thickness in mm - elseif file.Elements(i).tag_a="0018" and file.Elements(i).tag_b="0060" then + Elseif file.Elements(i).tag_a="0018" And file.Elements(i).tag_b="0060" Then Image.Kvp=Trim(file.Elements(i).value) //slice thickness in mm - elseif file.Elements(i).tag_a="0018" and file.Elements(i).tag_b="1020" then + Elseif file.Elements(i).tag_a="0018" And file.Elements(i).tag_b="1020" Then Image.SoftwareVersions=Trim(file.Elements(i).value) - elseif file.Elements(i).tag_a="0018" and file.Elements(i).tag_b="5100" then + Elseif file.Elements(i).tag_a="0018" And file.Elements(i).tag_b="5100" Then Image.patient_position=file.Elements(i).value //patient position HFS, etc... - ElseIf file.Elements(i).tag_a="0020" and file.Elements(i).tag_b="000D" then // Study instace UID + Elseif file.Elements(i).tag_a="0020" And file.Elements(i).tag_b="000D" Then // Study instace UID Image.StudyInstanceUID=(file.Elements(i).value) - ElseIf file.Elements(i).tag_a="0020" and file.Elements(i).tag_b="000E" then // Series Instance UID + Elseif file.Elements(i).tag_a="0020" And file.Elements(i).tag_b="000E" Then // Series Instance UID Image.SeriesInstanceUID=(file.Elements(i).value) - ElseIf file.Elements(i).tag_a="0020" and file.Elements(i).tag_b="0010" then // Study ID + Elseif file.Elements(i).tag_a="0020" And file.Elements(i).tag_b="0010" Then // Study ID Image.StudyID=(file.Elements(i).value) - ElseIf file.Elements(i).tag_a="0020" and file.Elements(i).tag_b="0011" then // Series Number + Elseif file.Elements(i).tag_a="0020" And file.Elements(i).tag_b="0011" Then // Series Number Image.SeriesNumber=(file.Elements(i).value) - ElseIf file.Elements(i).tag_a="0020" and file.Elements(i).tag_b="0013" then // Series Number - Image.InstanceNumber=val(file.Elements(i).value) + Elseif file.Elements(i).tag_a="0020" And file.Elements(i).tag_b="0013" Then // Series Number + Image.InstanceNumber=Val(file.Elements(i).value) - elseif file.Elements(i).tag_a="0020" and file.Elements(i).tag_b="0032" then + Elseif file.Elements(i).tag_a="0020" And file.Elements(i).tag_b="0032" Then Image.ImagePositionPatient=file.Elements(i).value //Image Position Patient - elseif file.Elements(i).tag_a="0020" and file.Elements(i).tag_b="0037" then + Elseif file.Elements(i).tag_a="0020" And file.Elements(i).tag_b="0037" Then Image.ImageOrientationPatient=Trim(file.Elements(i).value) // ImageOrientationPatient - elseif file.Elements(i).tag_a="0020" and file.Elements(i).tag_b="0052" then + Elseif file.Elements(i).tag_a="0020" And file.Elements(i).tag_b="0052" Then Image.FrameOfReferenceUID=file.Elements(i).value //Image FrameOfReferenceUID - elseif file.Elements(i).tag_a="0020" and file.Elements(i).tag_b="1002" then - Image.ImagesinAcquisition=val(file.Elements(i).value) //Image FrameOfReferenceUID + Elseif file.Elements(i).tag_a="0020" And file.Elements(i).tag_b="1002" Then + Image.ImagesinAcquisition=Val(file.Elements(i).value) //Image FrameOfReferenceUID - elseif file.Elements(i).tag_a="0020" and file.Elements(i).tag_b="1040" then + Elseif file.Elements(i).tag_a="0020" And file.Elements(i).tag_b="1040" Then Image.PositionReferenceIndicator=file.Elements(i).value //Image FrameOfReferenceUID - elseif file.Elements(i).tag_a="0020" and file.Elements(i).tag_b="1041" then - Image.SliceLocation=val(file.Elements(i).value )// Z coordinate of the slice - in mm + Elseif file.Elements(i).tag_a="0020" And file.Elements(i).tag_b="1041" Then + Image.SliceLocation=Val(file.Elements(i).value )// Z coordinate of the slice - in mm - elseif file.Elements(i).tag_a="0028" and file.Elements(i).tag_b="0002" then //Smaples per pixel + Elseif file.Elements(i).tag_a="0028" And file.Elements(i).tag_b="0002" Then //Smaples per pixel Image.SampleperPixel=(file.Elements(i).value) - elseif file.Elements(i).tag_a="0028" and file.Elements(i).tag_b="0004" then //Photo + Elseif file.Elements(i).tag_a="0028" And file.Elements(i).tag_b="0004" Then //Photo Image.PhotometricInterpretation=(file.Elements(i).value) - elseif file.Elements(i).tag_a="0028" and file.Elements(i).tag_b="0010" then - Image.row=cdbl(file.Elements(i).value) // No of rows + Elseif file.Elements(i).tag_a="0028" And file.Elements(i).tag_b="0010" Then + Image.row=CDbl(file.Elements(i).value) // No of rows - elseif file.Elements(i).tag_a="0028" and file.Elements(i).tag_b="0011" then - Image.Columns=cdbl(file.Elements(i).value) // No of columns + Elseif file.Elements(i).tag_a="0028" And file.Elements(i).tag_b="0011" Then + Image.Columns=CDbl(file.Elements(i).value) // No of columns - elseif file.Elements(i).tag_a="0028" and file.Elements(i).tag_b="0030" then + Elseif file.Elements(i).tag_a="0028" And file.Elements(i).tag_b="0030" Then Image.PixelSpacing=file.Elements(i).value // Pixel size (x) in mm - elseif file.Elements(i).tag_a="0028" and file.Elements(i).tag_b="0100" then // Bits allocated per pixel ... - Image.BitsAllocated=cdbl(file.Elements(i).value) + Elseif file.Elements(i).tag_a="0028" And file.Elements(i).tag_b="0100" Then // Bits allocated per pixel ... + Image.BitsAllocated=CDbl(file.Elements(i).value) - elseif file.Elements(i).tag_a="0028" and file.Elements(i).tag_b="0101" then // Bits stored per pixel ... - Image.BitsStored=cdbl(file.Elements(i).value) + Elseif file.Elements(i).tag_a="0028" And file.Elements(i).tag_b="0101" Then // Bits stored per pixel ... + Image.BitsStored=CDbl(file.Elements(i).value) - elseif file.Elements(i).tag_a="0028" and file.Elements(i).tag_b="0102" then // Bits highbit per pixel ... - Image.HighBit=cdbl(file.Elements(i).value) + Elseif file.Elements(i).tag_a="0028" And file.Elements(i).tag_b="0102" Then // Bits highbit per pixel ... + Image.HighBit=CDbl(file.Elements(i).value) - elseif file.Elements(i).tag_a="0028" and file.Elements(i).tag_b="0103" then + Elseif file.Elements(i).tag_a="0028" And file.Elements(i).tag_b="0103" Then Image.PixelRepresentation=CDbl(file.Elements(i).value) //PixelRepresentation - if Image.PixelRepresentation=1 Then + If Image.PixelRepresentation=1 Then signed=True - else + Else signed=False - end + End - elseif file.Elements(i).tag_a="0028" and file.Elements(i).tag_b="1050" then - Image.WinLevel=cdbl(file.Elements(i).value) //default window level + Elseif file.Elements(i).tag_a="0028" And file.Elements(i).tag_b="1050" Then + Image.WinLevel=CDbl(file.Elements(i).value) //default window level - elseif file.Elements(i).tag_a="0028" and file.Elements(i).tag_b="1051" then - Image.WinWidth=cdbl(file.Elements(i).value) //default window width + Elseif file.Elements(i).tag_a="0028" And file.Elements(i).tag_b="1051" Then + Image.WinWidth=CDbl(file.Elements(i).value) //default window width - elseif file.Elements(i).tag_a="0028" and file.Elements(i).tag_b="1052" then //Image rescale intercept - Image.rescaleintercept=cdbl(file.Elements(i).value) + Elseif file.Elements(i).tag_a="0028" And file.Elements(i).tag_b="1052" Then //Image rescale intercept + Image.rescaleintercept=CDbl(file.Elements(i).value) - elseif file.Elements(i).tag_a="0028" and file.Elements(i).tag_b="1053" then - Image.rescaleslope=cdbl(file.Elements(i).value) + Elseif file.Elements(i).tag_a="0028" And file.Elements(i).tag_b="1053" Then + Image.rescaleslope=CDbl(file.Elements(i).value) - ElseIf file.Elements(i).tag_a="7FE0" and file.Elements(i).tag_b="0010" then // Pixel data - if file.TS_Implicit then + Elseif file.Elements(i).tag_a="7FE0" And file.Elements(i).tag_b="0010" Then // Pixel data + If file.TS_Implicit Then pos=file.Elements(i).byte_position+8 - else + Else pos=file.Elements(i).byte_position+12 - end if - end - next + End If + End + Next - redim Image.PixelData(Image.row*Image.Columns-1) + Redim Image.PixelData(Image.row*Image.Columns-1) //pos=thismemblock.size-imagesize //for now assume pixel data from end of file up so rows*width*Bits allocated/8 give size in byte. //thismemblock.littleEndian=not thismemblock.littleEndian - for j=0 to Image.row-1 - for i=0 to Image.Columns-1 + Var temp As New Class_DICOM_File + temp =file + + For j As Integer = 0 To Image.row-1 + For i As Integer = 0 To Image.Columns-1 //here read the proper way...8 or 16 bits signed or not. endian is taken care by the memory block .littleendian - if Image.BitsAllocated=16 then - if signed then - Image.PixelData(i+j*Image.Columns)=file.thismemblock.short(pos)// signed 16bit integer - else + If Image.BitsAllocated=16 Then + If signed Then + Image.PixelData(i+j*Image.Columns)=file.thismemblock.Short(pos)// signed 16bit integer + Else Image.PixelData(i+j*Image.Columns)=file.thismemblock.ushort(pos) //16bit integer - end if + End If pos=pos+2 - elseif Image.BitsAllocated=8 then - Image.PixelData(i+j*Image.Columns)=file.thismemblock.byte(pos) + Elseif Image.BitsAllocated=8 Then + Image.PixelData(i+j*Image.Columns)=file.thismemblock.Byte(pos) pos=pos+1 - end if - next - next + End If + Next + Next RT_Images.Append Image End Sub diff --git a/DOSXYZnrc/Window_DOSXYZ_EGSPhant_Materials.xojo_window b/DOSXYZnrc/Window_DOSXYZ_EGSPhant_Materials.xojo_window index 681c58b..3b7b101 100644 --- a/DOSXYZnrc/Window_DOSXYZ_EGSPhant_Materials.xojo_window +++ b/DOSXYZnrc/Window_DOSXYZ_EGSPhant_Materials.xojo_window @@ -1850,19 +1850,19 @@ End next - EditField_Clean_density.Text=md - EditField_Pegs4.Text=gDOSXYZ.EGSPhantSettings.Pegsfile - EditField_Xdel.Text=Format(gDOSXYZ.EGSPhantSettings.Del_X,"-#.###") - EditField_Xmax.Text=Format(gDOSXYZ.EGSPhantSettings.X_Max,"-#.###") - EditField_Xmin.Text=Format(gDOSXYZ.EGSPhantSettings.X_min,"-#.###") - EditField_ydel.Text=Format(gDOSXYZ.EGSPhantSettings.Del_y,"-#.###") - EditField_ymax.Text=Format(gDOSXYZ.EGSPhantSettings.y_Max,"-#.###") - EditField_ymin.Text=Format(gDOSXYZ.EGSPhantSettings.y_min,"-#.###") - EditField_zdel.Text=Format(gDOSXYZ.EGSPhantSettings.Del_z,"-#.###") - EditField_zmax.Text=Format(gDOSXYZ.EGSPhantSettings.z_Max,"-#.###") - EditField_zmin.Text=Format(gDOSXYZ.EGSPhantSettings.z_min,"-#.###") - EditField_egsphantname.Text=gDOSXYZ.EGSPhantSettings.Name - EditField_outsidemedium.Text=egsphant.media_of_outside + EditField_Clean_density.value = md + EditField_Pegs4.value = gDOSXYZ.EGSPhantSettings.Pegsfile + EditField_Xdel.value = Format(gDOSXYZ.EGSPhantSettings.Del_X,"-#.###") + EditField_Xmax.value = Format(gDOSXYZ.EGSPhantSettings.X_Max,"-#.###") + EditField_Xmin.value = Format(gDOSXYZ.EGSPhantSettings.X_min,"-#.###") + EditField_ydel.value = Format(gDOSXYZ.EGSPhantSettings.Del_y,"-#.###") + EditField_ymax.value = Format(gDOSXYZ.EGSPhantSettings.y_Max,"-#.###") + EditField_ymin.value = Format(gDOSXYZ.EGSPhantSettings.y_min,"-#.###") + EditField_zdel.value = Format(gDOSXYZ.EGSPhantSettings.Del_z,"-#.###") + EditField_zmax.value = Format(gDOSXYZ.EGSPhantSettings.z_Max,"-#.###") + EditField_zmin.value = Format(gDOSXYZ.EGSPhantSettings.z_min,"-#.###") + EditField_egsphantname.value = gDOSXYZ.EGSPhantSettings.Name + EditField_outsidemedium.value = egsphant.media_of_outside Listbox_Materials.Heading(0)="Index" Listbox_Materials.Heading(1)="Material" @@ -2186,7 +2186,7 @@ End #tag Event Sub Change() gDOSXYZ.EGSPhantSettings.Clean_material=me.Text - EditField_Clean_density.Text=str(gDOSXYZ.dosxyz_materials(me.ListIndex).Material_Density) + EditField_Clean_density.value = str(gDOSXYZ.dosxyz_materials(me.ListIndex).Material_Density) egsphant.Update_MaterialsUD Materials_Listbox End Sub @@ -2197,7 +2197,7 @@ End Sub TextChange() if InStr(me.Text,"_")>0 Then While InStr(me.Text,"_")>0 - me.Text=Replace(me.Text,"_","") + me.value = Replace(me.Text,"_","") Wend end @@ -2291,7 +2291,7 @@ End i=me.ListIndex gDOSXYZ.EGSPhantSettings.CT_model=i if i>-1 and i<=UBound(gCT.All_CT) Then - EditField_Pegs4.Text=gct.All_CT(i).Pegs_file + EditField_Pegs4.value = gct.All_CT(i).Pegs_file egsphant.Pegsfile=gct.All_CT(i).Pegs_file egsphant.Update_MaterialsUD Materials_Listbox diff --git a/DOSXYZnrc/Window_DOSXYZ_Import.xojo_window b/DOSXYZnrc/Window_DOSXYZ_Import.xojo_window index f61a840..93373a6 100644 --- a/DOSXYZnrc/Window_DOSXYZ_Import.xojo_window +++ b/DOSXYZnrc/Window_DOSXYZ_Import.xojo_window @@ -1402,13 +1402,13 @@ End Window_DOSXYZ_Import.Close end - StaticText_X.Text="X axis : nx = "+str(dddose.Nx)+ ", dx = "+Format(dddose.dx,"-#.#####")+", boundaries = "+Format(dddose.boundaryX(0),"-#.#####")+" : "+Format(dddose.boundaryX(UBound(dddose.boundaryX)),"-#.#####") + StaticText_X.value = "X axis : nx = "+str(dddose.Nx)+ ", dx = "+Format(dddose.dx,"-#.#####")+", boundaries = "+Format(dddose.boundaryX(0),"-#.#####")+" : "+Format(dddose.boundaryX(UBound(dddose.boundaryX)),"-#.#####") - StaticText_y.Text="Y axis : ny = "+str(dddose.Ny)+ ", dy = "+Format(dddose.dy,"-#.#####")+", boundaries = "+Format(dddose.boundaryy(0),"-#.#####")+" : "+Format(dddose.boundaryy(UBound(dddose.boundaryy)),"-#.#####") + StaticText_y.value = "Y axis : ny = "+str(dddose.Ny)+ ", dy = "+Format(dddose.dy,"-#.#####")+", boundaries = "+Format(dddose.boundaryy(0),"-#.#####")+" : "+Format(dddose.boundaryy(UBound(dddose.boundaryy)),"-#.#####") - StaticText_z.Text="Z axis : nz = "+str(dddose.Nz)+ ", dz = "+Format(dddose.dz,"-#.#####")+", boundaries = "+Format(dddose.boundaryz(0),"-#.#####")+" : "+Format(dddose.boundaryz(UBound(dddose.boundaryz)),"-#.#####") + StaticText_z.value = "Z axis : nz = "+str(dddose.Nz)+ ", dz = "+Format(dddose.dz,"-#.#####")+", boundaries = "+Format(dddose.boundaryz(0),"-#.#####")+" : "+Format(dddose.boundaryz(UBound(dddose.boundaryz)),"-#.#####") - EditField_Name.Text=f.Name + EditField_Name.value = f.Name PopupMenu_x_3ddose.AddRow "x" PopupMenu_x_3ddose.AddRow "y" @@ -1456,16 +1456,16 @@ End #tag Event Sub Change() if me.ListIndex=0 Then - EditField_X_Grid.Text=Format(dddose.dx,"-#.#####") - EditField_X_coord.Text=Format(dddose.Coord_X+X_off,"-#.#####") + EditField_X_Grid.value = Format(dddose.dx,"-#.#####") + EditField_X_coord.value = Format(dddose.Coord_X+X_off,"-#.#####") elseif me.ListIndex=1 Then - EditField_X_Grid.Text=Format(dddose.dy,"-#.#####") - EditField_X_coord.Text=Format(dddose.Coord_y+X_off,"-#.#####") + EditField_X_Grid.value = Format(dddose.dy,"-#.#####") + EditField_X_coord.value = Format(dddose.Coord_y+X_off,"-#.#####") elseif me.ListIndex=2 Then - EditField_X_Grid.Text=Format(dddose.dz,"-#.#####") - EditField_X_coord.Text=Format(dddose.Coord_z+X_off,"-#.#####") + EditField_X_Grid.value = Format(dddose.dz,"-#.#####") + EditField_X_coord.value = Format(dddose.Coord_z+X_off,"-#.#####") end End Sub @@ -1477,16 +1477,16 @@ End X_off=Val(me.Text) if PopupMenu_x_3ddose.ListIndex=0 Then - EditField_X_Grid.Text=Format(dddose.dx,"-#.#####") - EditField_X_coord.Text=Format(dddose.Coord_X+X_off,"-#.#####") + EditField_X_Grid.value = Format(dddose.dx,"-#.#####") + EditField_X_coord.value = Format(dddose.Coord_X+X_off,"-#.#####") elseif PopupMenu_x_3ddose.ListIndex=1 Then - EditField_X_Grid.Text=Format(dddose.dy,"-#.#####") - EditField_X_coord.Text=Format(dddose.Coord_y+X_off,"-#.#####") + EditField_X_Grid.value = Format(dddose.dy,"-#.#####") + EditField_X_coord.value = Format(dddose.Coord_y+X_off,"-#.#####") elseif PopupMenu_x_3ddose.ListIndex=2 Then - EditField_X_Grid.Text=Format(dddose.dz,"-#.#####") - EditField_X_coord.Text=Format(dddose.Coord_z+X_off,"-#.#####") + EditField_X_Grid.value = Format(dddose.dz,"-#.#####") + EditField_X_coord.value = Format(dddose.Coord_z+X_off,"-#.#####") end End Sub @@ -1498,16 +1498,16 @@ End Y_off=val(me.Text) if PopupMenu_y_3ddose.ListIndex=0 Then - EditField_y_Grid.Text=Format(dddose.dx,"-#.#####") - EditField_y_coord.Text=Format(dddose.Coord_X+y_off,"-#.#####") + EditField_y_Grid.value = Format(dddose.dx,"-#.#####") + EditField_y_coord.value = Format(dddose.Coord_X+y_off,"-#.#####") elseif PopupMenu_y_3ddose.ListIndex=1 Then - EditField_y_Grid.Text=Format(dddose.dy,"-#.#####") - EditField_y_coord.Text=Format(dddose.Coord_y+y_off,"-#.#####") + EditField_y_Grid.value = Format(dddose.dy,"-#.#####") + EditField_y_coord.value = Format(dddose.Coord_y+y_off,"-#.#####") elseif PopupMenu_y_3ddose.ListIndex=2 Then - EditField_y_Grid.Text=Format(dddose.dz,"-#.#####") - EditField_y_coord.Text=Format(dddose.Coord_z+y_off,"-#.#####") + EditField_y_Grid.value = Format(dddose.dz,"-#.#####") + EditField_y_coord.value = Format(dddose.Coord_z+y_off,"-#.#####") end End Sub @@ -1517,14 +1517,14 @@ End #tag Event Sub Change() if me.ListIndex=0 Then - EditField_y_Grid.Text=Format(dddose.dx,"-#.#####") - EditField_Y_coord.Text=Format(dddose.Coord_x+Y_off,"-#.###") + EditField_y_Grid.value = Format(dddose.dx,"-#.#####") + EditField_Y_coord.value = Format(dddose.Coord_x+Y_off,"-#.###") elseif me.ListIndex=1 Then - EditField_y_Grid.Text=Format(dddose.dy,"-#.#####") - EditField_Y_coord.Text=Format(dddose.Coord_y+Y_off,"-#.###") + EditField_y_Grid.value = Format(dddose.dy,"-#.#####") + EditField_Y_coord.value = Format(dddose.Coord_y+Y_off,"-#.###") elseif me.ListIndex=2 Then - EditField_y_Grid.Text=Format(dddose.dz,"-#.#####") - EditField_Y_coord.Text=Format(dddose.Coord_z+Y_off,"-#.###") + EditField_y_Grid.value = Format(dddose.dz,"-#.#####") + EditField_Y_coord.value = Format(dddose.Coord_z+Y_off,"-#.###") end End Sub #tag EndEvent @@ -1535,16 +1535,16 @@ End Z_off=val(me.Text) if PopupMenu_z_3ddose.ListIndex=0 Then - EditField_z_Grid.Text=Format(dddose.dx,"-#.#####") - EditField_z_coord.Text=Format(dddose.Coord_X+z_off,"-#.#####") + EditField_z_Grid.value = Format(dddose.dx,"-#.#####") + EditField_z_coord.value = Format(dddose.Coord_X+z_off,"-#.#####") elseif PopupMenu_z_3ddose.ListIndex=1 Then - EditField_z_Grid.Text=Format(dddose.dy,"-#.#####") - EditField_z_coord.Text=Format(dddose.Coord_y+z_off,"-#.#####") + EditField_z_Grid.value = Format(dddose.dy,"-#.#####") + EditField_z_coord.value = Format(dddose.Coord_y+z_off,"-#.#####") elseif PopupMenu_z_3ddose.ListIndex=2 Then - EditField_z_Grid.Text=Format(dddose.dz,"-#.#####") - EditField_z_coord.Text=Format(dddose.Coord_z+z_off,"-#.#####") + EditField_z_Grid.value = Format(dddose.dz,"-#.#####") + EditField_z_coord.value = Format(dddose.Coord_z+z_off,"-#.#####") end End Sub @@ -1554,16 +1554,16 @@ End #tag Event Sub Change() if me.ListIndex=0 Then - EditField_z_Grid.Text=Format(dddose.dx,"-#.#####") - EditField_z_coord.Text=Format(dddose.Coord_x+z_off,"-#.###") + EditField_z_Grid.value = Format(dddose.dx,"-#.#####") + EditField_z_coord.value = Format(dddose.Coord_x+z_off,"-#.###") elseif me.ListIndex=1 Then - EditField_z_Grid.Text=Format(dddose.dy,"-#.#####") - EditField_z_coord.Text=Format(dddose.Coord_y+z_off,"-#.###") + EditField_z_Grid.value = Format(dddose.dy,"-#.#####") + EditField_z_coord.value = Format(dddose.Coord_y+z_off,"-#.###") elseif me.ListIndex=2 Then - EditField_z_Grid.Text=Format(dddose.dz,"-#.#####") - EditField_z_coord.Text=Format(dddose.Coord_z+z_off,"-#.###") + EditField_z_Grid.value = Format(dddose.dz,"-#.#####") + EditField_z_coord.value = Format(dddose.Coord_z+z_off,"-#.###") end End Sub diff --git a/DOSXYZnrc/Window_DOSXYZ_Maininputs.xojo_window b/DOSXYZnrc/Window_DOSXYZ_Maininputs.xojo_window index 7574554..1d09e4f 100644 --- a/DOSXYZnrc/Window_DOSXYZ_Maininputs.xojo_window +++ b/DOSXYZnrc/Window_DOSXYZ_Maininputs.xojo_window @@ -1920,16 +1920,16 @@ End PopupMenu_mediumthickness.ListIndex=dosxyz_input.dflag - EditField_title.Text=dosxyz_input.TITLE - EditField_nrcycl.Text=Format(dosxyz_input.NRCYCL,"#") - EditField_pcut.Text=Format(dosxyz_input.PCUT,"#.###") - EditField_ecut.Text=Format(dosxyz_input.ECUTIN,"#.###") - EditField_rng1.Text=Format(dosxyz_input.INSEED1,"#") - EditField_rng2.Text=Format(dosxyz_input.INSEED2,"#") - EditField_maxtime.Text=Format(dosxyz_input.TIMMAX,"#.##") - EditField_beam_size.Text=Format(dosxyz_input.BEAM_SIZE,"#.##") - EditField_Esave.Text=Format(dosxyz_input.ESAVE_GLOBAL,"#.###") - EditField_N_Split.Text=Format(dosxyz_input.n_split,"#") + EditField_title.value = dosxyz_input.TITLE + EditField_nrcycl.value = Format(dosxyz_input.NRCYCL,"#") + EditField_pcut.value = Format(dosxyz_input.PCUT,"#.###") + EditField_ecut.value = Format(dosxyz_input.ECUTIN,"#.###") + EditField_rng1.value = Format(dosxyz_input.INSEED1,"#") + EditField_rng2.value = Format(dosxyz_input.INSEED2,"#") + EditField_maxtime.value = Format(dosxyz_input.TIMMAX,"#.##") + EditField_beam_size.value = Format(dosxyz_input.BEAM_SIZE,"#.##") + EditField_Esave.value = Format(dosxyz_input.ESAVE_GLOBAL,"#.###") + EditField_N_Split.value = Format(dosxyz_input.n_split,"#") PopupMenu_mediumoutside.DeleteAllRows @@ -2070,18 +2070,18 @@ End ElseIf me.ListIndex=1 Then - //PopupMenu_source.Text="2 - Full phase-space source file" Then + //PopupMenu_source.value = "2 - Full phase-space source file" Then dosxyz_input.isource=2 Window_DOSXYZ_Maininputs_source2.Show ElseIf me.ListIndex=2 Then - //PopupMenu_source.Text="3 - Point source from front" Then + //PopupMenu_source.value = "3 - Point source from front" Then dosxyz_input.isource=3 Window_DOSXYZ_Maininputs_source3.Show ElseIf me.ListIndex=3 Then - //PopupMenu_source.Text="3 - Point source from front" Then + //PopupMenu_source.value = "3 - Point source from front" Then dosxyz_input.isource=8 Window_DOSXYZ_Maininputs_source8.Show diff --git a/DOSXYZnrc/Window_DOSXYZ_Maininputs_Phantom.xojo_window b/DOSXYZnrc/Window_DOSXYZ_Maininputs_Phantom.xojo_window index 679ae6f..58f0733 100644 --- a/DOSXYZnrc/Window_DOSXYZ_Maininputs_Phantom.xojo_window +++ b/DOSXYZnrc/Window_DOSXYZ_Maininputs_Phantom.xojo_window @@ -1092,12 +1092,12 @@ End End - EditField_Med_Density.Text=str(DOSXYZ_Input.DENSITY) + EditField_Med_Density.value = str(DOSXYZ_Input.DENSITY) if dosxyz_input.dos_Non_CT Then - EditField_NumMed.Text=str(DOSXYZ_Input.nmed) + EditField_NumMed.value = str(DOSXYZ_Input.nmed) else - EditField_NumMed.Text=str(UBound(gDOSXYZ.DOSXYZ(egsphant_index).EGSPhantSettings.Materials)+1) + EditField_NumMed.value = str(UBound(gDOSXYZ.DOSXYZ(egsphant_index).EGSPhantSettings.Materials)+1) EditField_NumMed.ReadOnly=True end diff --git a/DOSXYZnrc/Window_DOSXYZ_Maininputs_Phantom_View.xojo_window b/DOSXYZnrc/Window_DOSXYZ_Maininputs_Phantom_View.xojo_window index 802c719..8c6d041 100644 --- a/DOSXYZnrc/Window_DOSXYZ_Maininputs_Phantom_View.xojo_window +++ b/DOSXYZnrc/Window_DOSXYZ_Maininputs_Phantom_View.xojo_window @@ -1080,7 +1080,7 @@ End else ss=ss+ "Plane: "+str(ScrollBar_Slice.value+1)+"/"+str(egsphant.Nx) end - StaticText_Info.Text=ss + StaticText_Info.value = ss if Egsphant.Loaded=False Then g.DrawString "No image as EGSPhant voxels not loaded",5,20 @@ -1178,8 +1178,8 @@ End CheckBox_Density.Value=Prefshowphantdensity CheckBox_Materials.Value=Prefshowmedia - TextField_Max_Density.Text=Format(Egsphant.maxdensity,"-#.#####") - TextField_Min_Density.Text=Format(Egsphant.mindensity,"-#.#####") + TextField_Max_Density.value = Format(Egsphant.maxdensity,"-#.#####") + TextField_Min_Density.value = Format(Egsphant.mindensity,"-#.#####") ruler.init(Display.graphics.width-30,30,Display.graphics.width-30,200) movingruler1=false @@ -1198,9 +1198,9 @@ End RadioButton_XY.Value=True - StaticText_X.Text="nX "+Str(Egsphant.Nx)+" del X "+Format(Egsphant.Del_X,"-0.000")+" Min X "+Format(Egsphant.boundaryx(0),"-0.000")+" Max X "+Format(Egsphant.boundaryx(UBound(Egsphant.boundaryx)),"-0.000") - StaticText_Y.Text="nY "+Str(Egsphant.Ny)+" del Y "+Format(Egsphant.Del_Y,"-0.000")+" Min Y "+Format(Egsphant.boundaryy(0),"-0.000")+" Max Y "+Format(Egsphant.boundaryy(UBound(Egsphant.boundaryy)),"-0.000") - StaticText_Z.Text="nZ "+Str(Egsphant.Nz)+" del Z "+Format(Egsphant.Del_Z,"-0.000")+" Min Z "+Format(Egsphant.boundaryz(0),"-0.000")+" Max Z "+Format(Egsphant.boundaryz(UBound(Egsphant.boundaryZ)),"-0.000") + StaticText_X.value = "nX "+Str(Egsphant.Nx)+" del X "+Format(Egsphant.Del_X,"-0.000")+" Min X "+Format(Egsphant.boundaryx(0),"-0.000")+" Max X "+Format(Egsphant.boundaryx(UBound(Egsphant.boundaryx)),"-0.000") + StaticText_Y.value = "nY "+Str(Egsphant.Ny)+" del Y "+Format(Egsphant.Del_Y,"-0.000")+" Min Y "+Format(Egsphant.boundaryy(0),"-0.000")+" Max Y "+Format(Egsphant.boundaryy(UBound(Egsphant.boundaryy)),"-0.000") + StaticText_Z.value = "nZ "+Str(Egsphant.Nz)+" del Z "+Format(Egsphant.Del_Z,"-0.000")+" Min Z "+Format(Egsphant.boundaryz(0),"-0.000")+" Max Z "+Format(Egsphant.boundaryz(UBound(Egsphant.boundaryZ)),"-0.000") End Sub #tag EndMethod diff --git a/DOSXYZnrc/Window_DOSXYZ_Maininputs_Phantom_Voxels.xojo_window b/DOSXYZnrc/Window_DOSXYZ_Maininputs_Phantom_Voxels.xojo_window index 1529e05..0905e06 100644 --- a/DOSXYZnrc/Window_DOSXYZ_Maininputs_Phantom_Voxels.xojo_window +++ b/DOSXYZnrc/Window_DOSXYZ_Maininputs_Phantom_Voxels.xojo_window @@ -1093,63 +1093,63 @@ End if dosxyz_input.iMAX<0 Then X_Pro=True GroupBox3.Caption="X Voxels" - EditField_Num_Groups.Text=str(abs(dosxyz_input.iMAX)) + EditField_Num_Groups.value = str(abs(dosxyz_input.iMAX)) GroupBox1.Caption="Y Voxels" - EditField_1_high.Text=Format(dosxyz_input.jMAX_Bound(2),"-#.###") - EditField_1_Low.Text=Format(dosxyz_input.jMAX_Bound(1),"-#.###") - EditField_1_Max.Text=Format(dosxyz_input.jMAX_Bound(3),"-#.###") - EditField_1_Min.Text=Format(dosxyz_input.jMAX_Bound(0),"-#.###") + EditField_1_high.value = Format(dosxyz_input.jMAX_Bound(2),"-#.###") + EditField_1_Low.value = Format(dosxyz_input.jMAX_Bound(1),"-#.###") + EditField_1_Max.value = Format(dosxyz_input.jMAX_Bound(3),"-#.###") + EditField_1_Min.value = Format(dosxyz_input.jMAX_Bound(0),"-#.###") GroupBox2.Caption="Z Voxels" - EditField_2_high.Text=Format(dosxyz_input.kMAX_Bound(2),"-#.###") - EditField_2_Low.Text=Format(dosxyz_input.kMAX_Bound(1),"-#.###") - EditField_2_Max.Text=Format(dosxyz_input.kMAX_Bound(3),"-#.###") - EditField_2_Min.Text=Format(dosxyz_input.kMAX_Bound(0),"-#.###") + EditField_2_high.value = Format(dosxyz_input.kMAX_Bound(2),"-#.###") + EditField_2_Low.value = Format(dosxyz_input.kMAX_Bound(1),"-#.###") + EditField_2_Max.value = Format(dosxyz_input.kMAX_Bound(3),"-#.###") + EditField_2_Min.value = Format(dosxyz_input.kMAX_Bound(0),"-#.###") elseif dosxyz_input.jMAX<0 Then Y_Pro=True - EditField_Num_Groups.Text=str(abs(dosxyz_input.jMAX)) + EditField_Num_Groups.value = str(abs(dosxyz_input.jMAX)) GroupBox3.Caption="Y Voxels" GroupBox1.Caption="X Voxels" - EditField_1_high.Text=Format(dosxyz_input.iMAX_Bound(2),"-#.###") - EditField_1_Low.Text=Format(dosxyz_input.iMAX_Bound(1),"-#.###") - EditField_1_Max.Text=Format(dosxyz_input.iMAX_Bound(3),"-#.###") - EditField_1_Min.Text=Format(dosxyz_input.iMAX_Bound(0),"-#.###") + EditField_1_high.value = Format(dosxyz_input.iMAX_Bound(2),"-#.###") + EditField_1_Low.value = Format(dosxyz_input.iMAX_Bound(1),"-#.###") + EditField_1_Max.value = Format(dosxyz_input.iMAX_Bound(3),"-#.###") + EditField_1_Min.value = Format(dosxyz_input.iMAX_Bound(0),"-#.###") GroupBox2.Caption="Z Voxels" - EditField_2_high.Text=Format(dosxyz_input.kMAX_Bound(2),"-#.###") - EditField_2_Low.Text=Format(dosxyz_input.kMAX_Bound(1),"-#.###") - EditField_2_Max.Text=Format(dosxyz_input.kMAX_Bound(3),"-#.###") - EditField_2_Min.Text=Format(dosxyz_input.kMAX_Bound(0),"-#.###") + EditField_2_high.value = Format(dosxyz_input.kMAX_Bound(2),"-#.###") + EditField_2_Low.value = Format(dosxyz_input.kMAX_Bound(1),"-#.###") + EditField_2_Max.value = Format(dosxyz_input.kMAX_Bound(3),"-#.###") + EditField_2_Min.value = Format(dosxyz_input.kMAX_Bound(0),"-#.###") elseif dosxyz_input.kMAX<0 Then Z_Pro=True GroupBox3.Caption="Z Voxels" - EditField_Num_Groups.Text=str(abs(dosxyz_input.KMAX)) + EditField_Num_Groups.value = str(abs(dosxyz_input.KMAX)) GroupBox1.Caption="X Voxels" - EditField_1_high.Text=Format(dosxyz_input.iMAX_Bound(2),"-#.###") - EditField_1_Low.Text=Format(dosxyz_input.iMAX_Bound(1),"-#.###") - EditField_1_Max.Text=Format(dosxyz_input.iMAX_Bound(3),"-#.###") - EditField_1_Min.Text=Format(dosxyz_input.iMAX_Bound(0),"-#.###") + EditField_1_high.value = Format(dosxyz_input.iMAX_Bound(2),"-#.###") + EditField_1_Low.value = Format(dosxyz_input.iMAX_Bound(1),"-#.###") + EditField_1_Max.value = Format(dosxyz_input.iMAX_Bound(3),"-#.###") + EditField_1_Min.value = Format(dosxyz_input.iMAX_Bound(0),"-#.###") GroupBox2.Caption="Y Voxels" - EditField_2_high.Text=Format(dosxyz_input.jMAX_Bound(2),"-#.###") - EditField_2_Low.Text=Format(dosxyz_input.jMAX_Bound(1),"-#.###") - EditField_2_Max.Text=Format(dosxyz_input.jMAX_Bound(3),"-#.###") - EditField_2_Min.Text=Format(dosxyz_input.jMAX_Bound(0),"-#.###") + EditField_2_high.value = Format(dosxyz_input.jMAX_Bound(2),"-#.###") + EditField_2_Low.value = Format(dosxyz_input.jMAX_Bound(1),"-#.###") + EditField_2_Max.value = Format(dosxyz_input.jMAX_Bound(3),"-#.###") + EditField_2_Min.value = Format(dosxyz_input.jMAX_Bound(0),"-#.###") end @@ -1192,7 +1192,7 @@ End end - EditField_Max.Text=Format(s,"-#.###") + EditField_Max.value = Format(s,"-#.###") End Sub #tag EndMethod @@ -1258,8 +1258,8 @@ End min=dosxyz_input.jMAX_Group_Min end - EditField_Max.Text=Format(s,"-#.###") - EditField_Min.Text=Format(min,"-#.###") + EditField_Max.value = Format(s,"-#.###") + EditField_Min.value = Format(min,"-#.###") End Sub #tag EndMethod diff --git a/DOSXYZnrc/Window_DOSXYZ_Maininputs_Thickness.xojo_window b/DOSXYZnrc/Window_DOSXYZ_Maininputs_Thickness.xojo_window index 14e49b8..02314d6 100644 --- a/DOSXYZnrc/Window_DOSXYZ_Maininputs_Thickness.xojo_window +++ b/DOSXYZnrc/Window_DOSXYZ_Maininputs_Thickness.xojo_window @@ -502,11 +502,11 @@ End - EditField_neg_y_thickness.Text=Format(dosxyz_input.dsurround4,"#.###") - EditField_pos_y_thickness.Text=Format(dosxyz_input.dsurround3,"#.###") - EditField_uniform.Text=Format(dosxyz_input.dsurround1,"#.###") - EditField_x_thickness.Text=Format(dosxyz_input.dsurround1,"#.###") - EditField_zthickness.Text=Format(dosxyz_input.dsurround2,"#.###") + EditField_neg_y_thickness.value = Format(dosxyz_input.dsurround4,"#.###") + EditField_pos_y_thickness.value = Format(dosxyz_input.dsurround3,"#.###") + EditField_uniform.value = Format(dosxyz_input.dsurround1,"#.###") + EditField_x_thickness.value = Format(dosxyz_input.dsurround1,"#.###") + EditField_zthickness.value = Format(dosxyz_input.dsurround2,"#.###") End Sub #tag EndEvent diff --git a/DOSXYZnrc/Window_DOSXYZ_Maininputs_source1.xojo_window b/DOSXYZnrc/Window_DOSXYZ_Maininputs_source1.xojo_window index 0d3e0f8..a884ca0 100644 --- a/DOSXYZnrc/Window_DOSXYZ_Maininputs_source1.xojo_window +++ b/DOSXYZnrc/Window_DOSXYZ_Maininputs_source1.xojo_window @@ -543,11 +543,11 @@ End end - EditField_Isocenter.Text=Format(dosxyz_input.xiso,"-#.###")+", "+Format(dosxyz_input.yiso,"-#.###")+", "+Format(dosxyz_input.ziso,"-#.###") - EditField_Angles.Text=Format(dosxyz_input.theta(0),"-#.###")+", "+Format(dosxyz_input.phi(0),"-#.###")+", "+Format(dosxyz_input.phicol(0),"-#.###") - EditField_Energy.Text=Format(dosxyz_input.ein,"-#.####") - EditField_xcol.Text=Format(dosxyz_input.xcol,"-#.####") - EditField_y_col.Text=Format(dosxyz_input.ycol,"-#.####") + EditField_Isocenter.value = Format(dosxyz_input.xiso,"-#.###")+", "+Format(dosxyz_input.yiso,"-#.###")+", "+Format(dosxyz_input.ziso,"-#.###") + EditField_Angles.value = Format(dosxyz_input.theta(0),"-#.###")+", "+Format(dosxyz_input.phi(0),"-#.###")+", "+Format(dosxyz_input.phicol(0),"-#.###") + EditField_Energy.value = Format(dosxyz_input.ein,"-#.####") + EditField_xcol.value = Format(dosxyz_input.xcol,"-#.####") + EditField_y_col.value = Format(dosxyz_input.ycol,"-#.####") do_nothing=False diff --git a/DOSXYZnrc/Window_DOSXYZ_Maininputs_source10.xojo_window b/DOSXYZnrc/Window_DOSXYZ_Maininputs_source10.xojo_window index 6dd9ab7..5a3cfac 100644 --- a/DOSXYZnrc/Window_DOSXYZ_Maininputs_source10.xojo_window +++ b/DOSXYZnrc/Window_DOSXYZ_Maininputs_source10.xojo_window @@ -745,11 +745,11 @@ End CheckBox_DBS.Value=False end - EditField_DBS_splittingR.Text=Format(dosxyz_input.r_dbs,"#.###") - EditField_ssd_DBS.Text=Format(dosxyz_input.ssd_dbs,"#.###") - EditField_Z_scored.Text=Format(dosxyz_input.z_dbs,"#.###") - EditField_Isocenter.Text=Format(dosxyz_input.xiso,"-#.###")+", "+Format(dosxyz_input.yiso,"-#.###")+", "+Format(dosxyz_input.ziso,"-#.###") - EditField_dsource.Text=Format(dosxyz_input.dsource,"#.###") + EditField_DBS_splittingR.value = Format(dosxyz_input.r_dbs,"#.###") + EditField_ssd_DBS.value = Format(dosxyz_input.ssd_dbs,"#.###") + EditField_Z_scored.value = Format(dosxyz_input.z_dbs,"#.###") + EditField_Isocenter.value = Format(dosxyz_input.xiso,"-#.###")+", "+Format(dosxyz_input.yiso,"-#.###")+", "+Format(dosxyz_input.ziso,"-#.###") + EditField_dsource.value = Format(dosxyz_input.dsource,"#.###") PopupMenu_ScoreLastZ.DeleteAllRows diff --git a/DOSXYZnrc/Window_DOSXYZ_Maininputs_source11.xojo_window b/DOSXYZnrc/Window_DOSXYZ_Maininputs_source11.xojo_window index daaf309..1d3f3cf 100644 --- a/DOSXYZnrc/Window_DOSXYZ_Maininputs_source11.xojo_window +++ b/DOSXYZnrc/Window_DOSXYZ_Maininputs_source11.xojo_window @@ -1128,23 +1128,23 @@ End CheckBox_FAT_DBS.Value=False end - EditField_Isocenter_X.Text=Format(dosxyz_input.xiso,"-#.###") - EditField_Isocenter_y.Text=Format(dosxyz_input.yiso,"-#.###") - EditField_Isocenter_z.Text=Format(dosxyz_input.ziso,"-#.###") + EditField_Isocenter_X.value = Format(dosxyz_input.xiso,"-#.###") + EditField_Isocenter_y.value = Format(dosxyz_input.yiso,"-#.###") + EditField_Isocenter_z.value = Format(dosxyz_input.ziso,"-#.###") - EditField_theta.Text=Format(dosxyz_input.theta(0),"-#.###") - EditField_phi.Text=Format(dosxyz_input.phi(0),"-#.###") - EditField_phicol.Text=Format(dosxyz_input.phicol(0),"-#.###") + EditField_theta.value = Format(dosxyz_input.theta(0),"-#.###") + EditField_phi.value = Format(dosxyz_input.phi(0),"-#.###") + EditField_phicol.value = Format(dosxyz_input.phicol(0),"-#.###") - EditField_distance_source.Text=Format(dosxyz_input.dsource,"#.###") - EditField_esplit.Text=Format(dosxyz_input.e_split,"-#") - EditField_BEAM_exe.Text=dosxyz_input.the_beam_code - EditField_BEAM_Inputfile.Text=dosxyz_input.the_input_file - EditField_Pegs.Text=dosxyz_input.the_pegs_file - EditField_path.Text=dosxyz_input.path11 + EditField_distance_source.value = Format(dosxyz_input.dsource,"#.###") + EditField_esplit.value = Format(dosxyz_input.e_split,"-#") + EditField_BEAM_exe.value = dosxyz_input.the_beam_code + EditField_BEAM_Inputfile.value = dosxyz_input.the_input_file + EditField_Pegs.value = dosxyz_input.the_pegs_file + EditField_path.value = dosxyz_input.path11 - EditField_ipp.Text=Format(dosxyz_input.tomo_ipp,"-#.####") - EditField_pitch.Text=Format(dosxyz_input.tomo_pitch,"-#.####") + EditField_ipp.value = Format(dosxyz_input.tomo_ipp,"-#.####") + EditField_pitch.value = Format(dosxyz_input.tomo_pitch,"-#.####") PopupMenu_LatchBitFilter.DeleteAllRows PopupMenu_LatchBitFilter.AddRow "I BIT FILTER=0" diff --git a/DOSXYZnrc/Window_DOSXYZ_Maininputs_source2.xojo_window b/DOSXYZnrc/Window_DOSXYZ_Maininputs_source2.xojo_window index 7aba28b..86969a6 100644 --- a/DOSXYZnrc/Window_DOSXYZ_Maininputs_source2.xojo_window +++ b/DOSXYZnrc/Window_DOSXYZ_Maininputs_source2.xojo_window @@ -996,16 +996,16 @@ End CheckBox_DBS.Value=False end - EditField_DBS_splittingR.Text=Format(dosxyz_input.r_dbs,"#.###") - EditField_ssd_DBS.Text=Format(dosxyz_input.ssd_dbs,"#.###") - EditField_Z_scored.Text=Format(dosxyz_input.z_dbs,"#.###") - EditField_Isocenter_X.Text=Format(dosxyz_input.xiso,"-#.###") - EditField_Isocenter_Y.Text=Format(dosxyz_input.yiso,"-#.###") - EditField_Isocenter_Z.Text=Format(dosxyz_input.ziso,"-#.###") + EditField_DBS_splittingR.value = Format(dosxyz_input.r_dbs,"#.###") + EditField_ssd_DBS.value = Format(dosxyz_input.ssd_dbs,"#.###") + EditField_Z_scored.value = Format(dosxyz_input.z_dbs,"#.###") + EditField_Isocenter_X.value = Format(dosxyz_input.xiso,"-#.###") + EditField_Isocenter_Y.value = Format(dosxyz_input.yiso,"-#.###") + EditField_Isocenter_Z.value = Format(dosxyz_input.ziso,"-#.###") - EditField_dsource.Text=Format(dosxyz_input.dsource,"#.###") - EditField_Phsp.Text=dosxyz_input.FILNAM + EditField_dsource.value = Format(dosxyz_input.dsource,"#.###") + EditField_Phsp.value = dosxyz_input.FILNAM if UBound(dosxyz_input.theta)=-1 Then ReDim dosxyz_input.theta(0) @@ -1016,9 +1016,9 @@ End end - EditField_theta.Text=Format(dosxyz_input.theta(0),"-#.###") - EditField_phi.Text=Format(dosxyz_input.phi(0),"-#.###") - EditField_coll.Text=Format(dosxyz_input.phicol(0),"-#.###") + EditField_theta.value = Format(dosxyz_input.theta(0),"-#.###") + EditField_phi.value = Format(dosxyz_input.phi(0),"-#.###") + EditField_coll.value = Format(dosxyz_input.phicol(0),"-#.###") PopupMenu_ScoreLastZ.DeleteAllRows diff --git a/DOSXYZnrc/Window_DOSXYZ_Maininputs_source20.xojo_window b/DOSXYZnrc/Window_DOSXYZ_Maininputs_source20.xojo_window index 8027bc4..41b8469 100644 --- a/DOSXYZnrc/Window_DOSXYZ_Maininputs_source20.xojo_window +++ b/DOSXYZnrc/Window_DOSXYZ_Maininputs_source20.xojo_window @@ -968,22 +968,22 @@ End UpdateListbox - EditField_idbs.Text=Format(dosxyz_input.i_dbs,"#") + EditField_idbs.value = Format(dosxyz_input.i_dbs,"#") - EditField_r_dbs.Text=Format(dosxyz_input.r_dbs,"-#.#####") - EditField_ssd_dbs.Text=Format(dosxyz_input.ssd_dbs,"-#.#####") - EditField_z_dbs.Text=Format(dosxyz_input.z_dbs,"-#.#####") - EditField_i_muidxout.Text=Format(dosxyz_input.i_muidx_out,"-#.######") + EditField_r_dbs.value = Format(dosxyz_input.r_dbs,"-#.#####") + EditField_ssd_dbs.value = Format(dosxyz_input.ssd_dbs,"-#.#####") + EditField_z_dbs.value = Format(dosxyz_input.z_dbs,"-#.#####") + EditField_i_muidxout.value = Format(dosxyz_input.i_muidx_out,"-#.######") - EditField_e_split.Text=Format(dosxyz_input.e_split,"-#") - EditField_BEAM_exe.Text=dosxyz_input.the_shared_lib - EditField_BEAM_Inputfile.Text=dosxyz_input.the_input_file - EditField_FILNAME.Text=dosxyz_input.FILNAM + EditField_e_split.value = Format(dosxyz_input.e_split,"-#") + EditField_BEAM_exe.value = dosxyz_input.the_shared_lib + EditField_BEAM_Inputfile.value = dosxyz_input.the_input_file + EditField_FILNAME.value = dosxyz_input.FILNAM - EditField_num_control.Text=Format(dosxyz_input.nset,"#") + EditField_num_control.value = Format(dosxyz_input.nset,"#") if dosxyz_input.calflag=0 Then RadioButton_CalRun.Value=True elseif dosxyz_input.calflag=1 Then diff --git a/DOSXYZnrc/Window_DOSXYZ_Maininputs_source21.xojo_window b/DOSXYZnrc/Window_DOSXYZ_Maininputs_source21.xojo_window index fff2e61..8335f8a 100644 --- a/DOSXYZnrc/Window_DOSXYZ_Maininputs_source21.xojo_window +++ b/DOSXYZnrc/Window_DOSXYZ_Maininputs_source21.xojo_window @@ -808,11 +808,11 @@ End UpdateListbox - EditField_esplit.Text=Format(dosxyz_input.e_split,"-#") - EditField_BEAM_exe.Text=dosxyz_input.the_beam_code - EditField_BEAM_Inputfile.Text=dosxyz_input.the_input_file - EditField_Pegs.Text=dosxyz_input.the_pegs_file - EditField_num_control.Text=Format(dosxyz_input.nset,"#") + EditField_esplit.value = Format(dosxyz_input.e_split,"-#") + EditField_BEAM_exe.value = dosxyz_input.the_beam_code + EditField_BEAM_Inputfile.value = dosxyz_input.the_input_file + EditField_Pegs.value = dosxyz_input.the_pegs_file + EditField_num_control.value = Format(dosxyz_input.nset,"#") PopupMenu_LatchBitFilter.DeleteAllRows PopupMenu_LatchBitFilter.AddRow "I BIT FILTER=0" @@ -822,8 +822,8 @@ End PopupMenu_LatchBitFilter.ListIndex=dosxyz_input.I_bit_filter - EditField_vcu_code.Text=dosxyz_input.the_vcu_code - EditField_vcu_file.Text=dosxyz_input.the_vcu_input_file + EditField_vcu_code.value = dosxyz_input.the_vcu_code + EditField_vcu_file.value = dosxyz_input.the_vcu_input_file End Sub #tag EndEvent diff --git a/DOSXYZnrc/Window_DOSXYZ_Maininputs_source3.xojo_window b/DOSXYZnrc/Window_DOSXYZ_Maininputs_source3.xojo_window index e2a21f0..513ed9c 100644 --- a/DOSXYZnrc/Window_DOSXYZ_Maininputs_source3.xojo_window +++ b/DOSXYZnrc/Window_DOSXYZ_Maininputs_source3.xojo_window @@ -614,14 +614,14 @@ End RadioButton_spec.Value=True end - EditField_Lowerxbound.Text=Format(dosxyz_input.xinl,"#.###") - EditField_upperxbound.Text=Format(dosxyz_input.xinu,"#.###") - EditField_Lowerybound.Text=Format(dosxyz_input.yinl,"#.###") - EditField_upperybound.Text=Format(dosxyz_input.yinu,"#.###") - EditField_mono.Text=Format(dosxyz_input.ein,"#.###") - EditField_spectrum.Text=dosxyz_input.FILNAM + EditField_Lowerxbound.value = Format(dosxyz_input.xinl,"#.###") + EditField_upperxbound.value = Format(dosxyz_input.xinu,"#.###") + EditField_Lowerybound.value = Format(dosxyz_input.yinl,"#.###") + EditField_upperybound.value = Format(dosxyz_input.yinu,"#.###") + EditField_mono.value = Format(dosxyz_input.ein,"#.###") + EditField_spectrum.value = dosxyz_input.FILNAM - EditField_ssd.Text=Format(dosxyz_input.ssd,"#.###") + EditField_ssd.value = Format(dosxyz_input.ssd,"#.###") diff --git a/DOSXYZnrc/Window_DOSXYZ_Maininputs_source8.xojo_window b/DOSXYZnrc/Window_DOSXYZ_Maininputs_source8.xojo_window index 2753262..ac5a0de 100644 --- a/DOSXYZnrc/Window_DOSXYZ_Maininputs_source8.xojo_window +++ b/DOSXYZnrc/Window_DOSXYZ_Maininputs_source8.xojo_window @@ -745,11 +745,11 @@ End CheckBox_DBS.Value=False end - EditField_DBS_splittingR.Text=Format(dosxyz_input.r_dbs,"#.###") - EditField_ssd_DBS.Text=Format(dosxyz_input.ssd_dbs,"#.###") - EditField_Z_scored.Text=Format(dosxyz_input.z_dbs,"#.###") - EditField_Isocenter.Text=Format(dosxyz_input.xiso,"-#.###")+", "+Format(dosxyz_input.yiso,"-#.###")+", "+Format(dosxyz_input.ziso,"-#.###") - EditField_dsource.Text=Format(dosxyz_input.dsource,"#.###") + EditField_DBS_splittingR.value = Format(dosxyz_input.r_dbs,"#.###") + EditField_ssd_DBS.value = Format(dosxyz_input.ssd_dbs,"#.###") + EditField_Z_scored.value = Format(dosxyz_input.z_dbs,"#.###") + EditField_Isocenter.value = Format(dosxyz_input.xiso,"-#.###")+", "+Format(dosxyz_input.yiso,"-#.###")+", "+Format(dosxyz_input.ziso,"-#.###") + EditField_dsource.value = Format(dosxyz_input.dsource,"#.###") PopupMenu_ScoreLastZ.DeleteAllRows diff --git a/DOSXYZnrc/Window_DOSXYZ_Maininputs_source9.xojo_window b/DOSXYZnrc/Window_DOSXYZ_Maininputs_source9.xojo_window index aa991a4..f79bc17 100644 --- a/DOSXYZnrc/Window_DOSXYZ_Maininputs_source9.xojo_window +++ b/DOSXYZnrc/Window_DOSXYZ_Maininputs_source9.xojo_window @@ -930,17 +930,17 @@ End CheckBox_FAT_DBS.Value=False end - EditField_Isocenter_X.Text=Format(dosxyz_input.xiso,"-#.###") - EditField_Isocenter_y.Text=Format(dosxyz_input.yiso,"-#.###") - EditField_Isocenter_z.Text=Format(dosxyz_input.ziso,"-#.###") - EditField_theta.Text=Format(dosxyz_input.theta(0),"-#.###") - EditField_phi.Text=Format(dosxyz_input.phi(0),"-#.###") - EditField_coll.Text=Format(dosxyz_input.phicol(0),"-#.###") - EditField_distance_source.Text=Format(dosxyz_input.dsource,"#.###") - EditField_esplit.Text=Format(dosxyz_input.e_split,"-#") - EditField_BEAM_exe.Text=dosxyz_input.the_beam_code - EditField_BEAM_Inputfile.Text=dosxyz_input.the_input_file - EditField_Pegs.Text=dosxyz_input.the_pegs_file + EditField_Isocenter_X.value = Format(dosxyz_input.xiso,"-#.###") + EditField_Isocenter_y.value = Format(dosxyz_input.yiso,"-#.###") + EditField_Isocenter_z.value = Format(dosxyz_input.ziso,"-#.###") + EditField_theta.value = Format(dosxyz_input.theta(0),"-#.###") + EditField_phi.value = Format(dosxyz_input.phi(0),"-#.###") + EditField_coll.value = Format(dosxyz_input.phicol(0),"-#.###") + EditField_distance_source.value = Format(dosxyz_input.dsource,"#.###") + EditField_esplit.value = Format(dosxyz_input.e_split,"-#") + EditField_BEAM_exe.value = dosxyz_input.the_beam_code + EditField_BEAM_Inputfile.value = dosxyz_input.the_input_file + EditField_Pegs.value = dosxyz_input.the_pegs_file PopupMenu_LatchBitFilter.DeleteAllRows diff --git a/DOSXYZnrc/Window_DOSXYZ_Properties.xojo_window b/DOSXYZnrc/Window_DOSXYZ_Properties.xojo_window index 6e926b0..7f5157c 100644 --- a/DOSXYZnrc/Window_DOSXYZ_Properties.xojo_window +++ b/DOSXYZnrc/Window_DOSXYZ_Properties.xojo_window @@ -1606,33 +1606,33 @@ End if gBEAM.Beams(beam).egs_phsp_num_particles=0 Then c=0 end - StaticText_phsp_pho.Text="Phsp # Photon :"+Format(gBEAM.beams(beam).egs_phsp_num_photons,"###,###,###")+", "+Format(100*c,"#.##")+"%" - StaticText_phsp_par.Text="Phsp # Particles :"+Format(gBEAM.beams(beam).egs_phsp_num_particles,"###,###,###") - statictext_cpu_total.Text="Total CPU time estimate "+Calculate_Time - StaticText_JobTimeReal.Text=Calculate_Real_Time + StaticText_phsp_pho.value = "Phsp # Photon :"+Format(gBEAM.beams(beam).egs_phsp_num_photons,"###,###,###")+", "+Format(100*c,"#.##")+"%" + StaticText_phsp_par.value = "Phsp # Particles :"+Format(gBEAM.beams(beam).egs_phsp_num_particles,"###,###,###") + statictext_cpu_total.value = "Total CPU time estimate "+Calculate_Time + StaticText_JobTimeReal.value = Calculate_Real_Time - StaticText_cpu_time_per_hist.Text="CPU time per history (s) "+Format(DOSXYZ.DOSXYZ_Input(beam).dos_CPU_time,"###.#####") + StaticText_cpu_time_per_hist.value = "CPU time per history (s) "+Format(DOSXYZ.DOSXYZ_Input(beam).dos_CPU_time,"###.#####") CheckBox_Simulation_Start.Caption="Started "+DOSXYZ.DOSXYZ_Input(beam).dos_start_Date+" active jobs "+str(DOSXYZ.DOSXYZ_Input(beam).dos_num_active_jobs) - StaticText_AvgError.Text="Average % error of doses > 0.5 of max dose: " + StaticText_AvgError.value = "Average % error of doses > 0.5 of max dose: " if dosxyz.DOSXYZ_Input(beam).dos_average_error>0.001 Then - StaticText_AvgError.Text=StaticText_AvgError.Text+Format(dosxyz.DOSXYZ_Input(beam).dos_average_error,"-#.###")+"%" + StaticText_AvgError.value = StaticText_AvgError.Text+Format(dosxyz.DOSXYZ_Input(beam).dos_average_error,"-#.###")+"%" else - StaticText_AvgError.Text=StaticText_AvgError.Text+Format(dosxyz.DOSXYZ_Input(beam).dos_average_error,"-#.###e")+"%" + StaticText_AvgError.value = StaticText_AvgError.Text+Format(dosxyz.DOSXYZ_Input(beam).dos_average_error,"-#.###e")+"%" end - StaticText_Pre_hist.Text="Number of histories: " +Format(dosxyz.DOSXYZ_Input(beam).dos_error_math_hist,"-#") + StaticText_Pre_hist.value = "Number of histories: " +Format(dosxyz.DOSXYZ_Input(beam).dos_error_math_hist,"-#") - EditField_histories.Text=Format(DOSXYZ.DOSXYZ_Input(beam).dos_num_histories,"###,###,###,###") - EditField_queue.Text=DOSXYZ.DOSXYZ_Input(beam).dos_queue - EditField_dose.Text=Format(DOSXYZ.DOSXYZ_Input(beam).dos_dose,"#.#######e") - EditField_jobs.Text=Format(DOSXYZ.DOSXYZ_Input(beam).dos_jobs,"#") - EditField_pegs.Text=DOSXYZ.DOSXYZ_Input(beam).dos_pegs_file + EditField_histories.value = Format(DOSXYZ.DOSXYZ_Input(beam).dos_num_histories,"###,###,###,###") + EditField_queue.value = DOSXYZ.DOSXYZ_Input(beam).dos_queue + EditField_dose.value = Format(DOSXYZ.DOSXYZ_Input(beam).dos_dose,"#.#######e") + EditField_jobs.value = Format(DOSXYZ.DOSXYZ_Input(beam).dos_jobs,"#") + EditField_pegs.value = DOSXYZ.DOSXYZ_Input(beam).dos_pegs_file - EditField_des_error.Text=Format(DOSXYZ.DOSXYZ_Input(beam).dos_desired_average_error,"#.##") - EditField_dosetowater.Text=Format(DOSXYZ.DOSXYZ_Input(beam).dose_to_water,"#.###") - EditField_temp_his.Text=Format(DOSXYZ.DOSXYZ_Input(beam).dos_test_histories,"#") - EditField_MU_BS.Text=Format(dosxyz.DOSXYZ_Input(beam).dos_MU_BS,"-#.###") + EditField_des_error.value = Format(DOSXYZ.DOSXYZ_Input(beam).dos_desired_average_error,"#.##") + EditField_dosetowater.value = Format(DOSXYZ.DOSXYZ_Input(beam).dose_to_water,"#.###") + EditField_temp_his.value = Format(DOSXYZ.DOSXYZ_Input(beam).dos_test_histories,"#") + EditField_MU_BS.value = Format(dosxyz.DOSXYZ_Input(beam).dos_MU_BS,"-#.###") PopupMenu_Shell.ListIndex=dosxyz.DOSXYZ_Input(beam).dos_Shell_Index @@ -1715,7 +1715,7 @@ End gDOSXYZ.DOSXYZ(egsphant).DOSXYZ_Input(beam).dos_jobs=val(me.Text) - StaticText_cpu_total.Text="Total CPU time estimate "+Calculate_Time + StaticText_cpu_total.value = "Total CPU time estimate "+Calculate_Time End Sub #tag EndEvent #tag EndEvents @@ -1745,7 +1745,7 @@ End gDOSXYZ.DOSXYZ(egsphant).DOSXYZ_Input(beam).dos_desired_average_error StartNohist=Round(egs_pro*egs_pro*gDOSXYZ.DOSXYZ(egsphant).DOSXYZ_Input(beam).dos_error_math_hist) gDOSXYZ.DOSXYZ(egsphant).DOSXYZ_Input(beam).dos_num_histories =StartNohist - EditField_histories.Text=Format(DOSXYZ.DOSXYZ_Input(beam).dos_num_histories,"###,###,###,###") + EditField_histories.value = Format(DOSXYZ.DOSXYZ_Input(beam).dos_num_histories,"###,###,###,###") end end @@ -1793,7 +1793,7 @@ End s=Replace(s,",","") Wend gDOSXYZ.DOSXYZ(egsphant).DOSXYZ_Input(beam).dos_num_histories=val(s) - StaticText_cpu_total.Text="Total CPU time estimate "+Calculate_Time + StaticText_cpu_total.value = "Total CPU time estimate "+Calculate_Time End Sub #tag EndEvent #tag EndEvents diff --git a/DVH/Window_DVH_Plot.xojo_window b/DVH/Window_DVH_Plot.xojo_window index 0605ee1..485e2e7 100644 --- a/DVH/Window_DVH_Plot.xojo_window +++ b/DVH/Window_DVH_Plot.xojo_window @@ -1326,8 +1326,8 @@ End Editing_donothing_X=True Editing_donothing_Y=True - EditField_X.Text=me.x_mouse_value_str - EditField_Y.Text=me.y_mouse_value_str + EditField_X.value = me.x_mouse_value_str + EditField_Y.value = me.y_mouse_value_str Editing_donothing_X=False Editing_donothing_Y=False @@ -1456,7 +1456,7 @@ End end ff=fff(0) r=ff.X_cm - EditField_X.Text=Format(r,"-#.###") + EditField_X.value = Format(r,"-#.###") DVHGraph.x_mouse_value=r DVHGraph.y_mouse_value=gg DVHGraph.x_mouse=DVHGraph.XS(DVHGraph.x_mouse_value) @@ -1481,7 +1481,7 @@ End gg=val(me.Text) DVHGraph.x_mouse_value=gg r=DVHGraph.Profiles.One_Profile(DVHGraph.Interactive_index).Get_Value_at_Point(gg,0,0,false) - EditField_Y.Text=Format(r,"-#.###") + EditField_Y.value = Format(r,"-#.###") DVHGraph.y_mouse_value=r DVHGraph.x_mouse=DVHGraph.XS(DVHGraph.x_mouse_value) DVHGraph.y_mouse=DVHGraph.YS(DVHGraph.y_mouse_value) diff --git a/EGSnrc/Window_EGSnrc_Inputs.xojo_window b/EGSnrc/Window_EGSnrc_Inputs.xojo_window index aa5721a..250cc77 100644 --- a/EGSnrc/Window_EGSnrc_Inputs.xojo_window +++ b/EGSnrc/Window_EGSnrc_Inputs.xojo_window @@ -1346,10 +1346,10 @@ End popupbrem=True - EditField_max_stepSize.Text=str(EGSnrc.Global_SMAX) - EditField_max_frac_loss.Text=str(EGSnrc.ESTEPE) - EditField_XImax.Text=str(EGSnrc.XImax) - EditField_SkinDepth.Text=Format(EGSnrc.Skin_depth_BCA,"-#.####e") + EditField_max_stepSize.value = str(EGSnrc.Global_SMAX) + EditField_max_frac_loss.value = str(EGSnrc.ESTEPE) + EditField_XImax.value = str(EGSnrc.XImax) + EditField_SkinDepth.value = Format(EGSnrc.Skin_depth_BCA,"-#.####e") End Sub #tag EndMethod diff --git a/Gamma/Window_dose.xojo_window b/Gamma/Window_dose.xojo_window index db947dd..244d053 100644 --- a/Gamma/Window_dose.xojo_window +++ b/Gamma/Window_dose.xojo_window @@ -1663,7 +1663,7 @@ End - WindowGamma.StaticText2.Text="Percentage of Pixels that Fail: " + str(100*pixelcountfail/pixelcounttotal) + "%" + WindowGamma.StaticText2.value = "Percentage of Pixels that Fail: " + str(100*pixelcountfail/pixelcounttotal) + "%" else diff --git a/Gamma/Window_images.xojo_window b/Gamma/Window_images.xojo_window index 0ffd1fc..7309486 100644 --- a/Gamma/Window_images.xojo_window +++ b/Gamma/Window_images.xojo_window @@ -885,7 +885,7 @@ End - WindowGamma.StaticText2.Text="Percentage of Pixels that Fail: " + str(100*pixelcountfail/pixelcounttotal) + "%" + WindowGamma.StaticText2.value = "Percentage of Pixels that Fail: " + str(100*pixelcountfail/pixelcounttotal) + "%" else diff --git a/General_Module.xojo_code b/General_Module.xojo_code new file mode 100644 index 0000000..be707b8 --- /dev/null +++ b/General_Module.xojo_code @@ -0,0 +1,164 @@ +#tag Module +Protected Module General_Module + #tag Method, Flags = &h0 + Function Accept_Real_Numbers(Key as String) As Boolean + Var skipKey As Boolean = True // Skip all keys by default + + // Allow these keys + If Key >= "0" And Key <= "9" Then Return False + If Key = "." Then Return False ' . + + If Key = Chr(8) Then Return False ' BackSpace + If Key = Chr(4) Then Return False ' End + If Key = Chr(1) Then Return False ' Home + If Key = Chr(127) Then Return False ' Delete + If Key = Chr(28) Then Return False ' Left arrow + If Key = Chr(29) Then Return False ' Right arrow + If Key = General_Module.kTab Then Return False ' Tab + If Key = "." Then Return False ' . + + + Return True + End Function + #tag EndMethod + + #tag Method, Flags = &h0 + Function GET_Day_of_the_Week(day as Integer) As String + Select Case day + Case 1 + Return "Sun" + Case 2 + Return "Mon" + Case 3 + Return "Tue" + Case 4 + Return "Wed" + Case 5 + Return "Thu" + Case 6 + Return "Fri" + Case 7 + Return "Sat" + + End Select + End Function + #tag EndMethod + + #tag Method, Flags = &h0 + Function GET_Month_Abbreviation(month as Integer) As String + Select Case month + Case 1 + Return "Jan" + Case 2 + Return "Feb" + Case 3 + Return "Mar" + Case 4 + Return "Apr" + Case 5 + Return "May" + Case 6 + Return "Jun" + Case 7 + Return "Jul" + Case 8 + Return "Aug" + Case 9 + Return "Sep" + Case 10 + Return "Oct" + Case 11 + Return "Nov" + Case 12 + Return "Dec" + End Select + End Function + #tag EndMethod + + #tag Method, Flags = &h0 + Function Split_text_file(file_chunk as String) As String() + Var file_data() As String = Split(file_chunk, EndOfLine.Windows) + + If file_data.LastRowIndex = 0 Then + + file_data.ResizeTo(-1) + file_data = Split(file_chunk, EndOfLine.UNIX) + + End If + + If file_data.LastRowIndex = 0 Then + + file_data.ResizeTo(-1) + file_data = Split(file_chunk, EndOfLine.OSX) + + End If + + Return file_data + End Function + #tag EndMethod + + + #tag ComputedProperty, Flags = &h0 + #tag Getter + Get + Const kTab As String = &u09 + + Return kTab + End Get + #tag EndGetter + kTab As String + #tag EndComputedProperty + + + #tag ViewBehavior + #tag ViewProperty + Name="Name" + Visible=true + Group="ID" + InitialValue="" + Type="String" + EditorType="" + #tag EndViewProperty + #tag ViewProperty + Name="Index" + Visible=true + Group="ID" + InitialValue="-2147483648" + Type="Integer" + EditorType="" + #tag EndViewProperty + #tag ViewProperty + Name="Super" + Visible=true + Group="ID" + InitialValue="" + Type="String" + EditorType="" + #tag EndViewProperty + #tag ViewProperty + Name="Left" + Visible=true + Group="Position" + InitialValue="0" + Type="Integer" + EditorType="" + #tag EndViewProperty + #tag ViewProperty + Name="Top" + Visible=true + Group="Position" + InitialValue="0" + Type="Integer" + EditorType="" + #tag EndViewProperty + #tag ViewProperty + Name="kTab" + Visible=false + Group="Behavior" + InitialValue="" + Type="String" + EditorType="MultiLineEditor" + #tag EndViewProperty + #tag EndViewBehavior +End Module +#tag EndModule diff --git a/MERT/Canvas_EMET.xojo_code b/MERT/Canvas_EMET.xojo_code index 6aef610..4f39534 100644 --- a/MERT/Canvas_EMET.xojo_code +++ b/MERT/Canvas_EMET.xojo_code @@ -525,7 +525,7 @@ Inherits Canvas else g.DrawString ss,x_mouse+5,y_mouse-5 end - //Window_EMET.EditField_XY.Text=ss + //Window_EMET.EditField_XY.value = ss Exit end diff --git a/MERT/DJAW/Class_MERT_JAWSA.xojo_code b/MERT/DJAW/Class_MERT_JAWSA.xojo_code index 6a02583..4e36474 100644 --- a/MERT/DJAW/Class_MERT_JAWSA.xojo_code +++ b/MERT/DJAW/Class_MERT_JAWSA.xojo_code @@ -146,7 +146,7 @@ Protected Class Class_MERT_JAWSA else Window_EMET_Run.EditField_Jaw_Score.TextColor=RGB(255,0,0) end - Window_EMET_Run.EditField_Jaw_Score.Text=Format(score,"-#.#######e") + Window_EMET_Run.EditField_Jaw_Score.value = Format(score,"-#.#######e") ss=ts.ReadLine @@ -201,7 +201,7 @@ Protected Class Class_MERT_JAWSA else Time=Format(times,"#")+" minutes" end - Window_EMET_Run.StaticText_JAW_RunTime.Text=Time + Window_EMET_Run.StaticText_JAW_RunTime.value = Time if Waiting and gOpt.JAW.Run_Thread.Shell.IsRunning Then i=IBeam_index @@ -265,10 +265,10 @@ Protected Class Class_MERT_JAWSA ts=f.OpenAsTextFile if ts<> nil Then w=val(ts.ReadLine) - Window_EMET_Run.EditField_Jaws_Iterations.Text=Format(w,"#") + Window_EMET_Run.EditField_Jaws_Iterations.value = Format(w,"#") w=val(ts.ReadLine) - //Window_EMET_Run.EditField_Jaw_DVHBin.Text=str(w) + //Window_EMET_Run.EditField_Jaw_DVHBin.value = str(w) temp=ts.ReadLine if InStr(temp,"yes")>0 Then @@ -277,24 +277,24 @@ Protected Class Class_MERT_JAWSA Window_EMET_Run.CheckBox_WriteDoseJaw.Value=False end temp=ts.ReadLine - Window_EMET_Run.EditField_Jaw_Dname.Text=temp + Window_EMET_Run.EditField_Jaw_Dname.value = temp temp=ts.ReadLine Weight_Range=val(NthField(temp,",",1)) Jaw_Range=val(NthField(temp,",",2)) RateGD=val(NthField(temp,",",3)) RatePD=val(NthField(temp,",",4)) - Window_EMET_Run.EditField_Jaw_RangeW.Text=Format(Weight_Range,"-0.0#######") - Window_EMET_Run.EditField_Jaw_RangeO.Text=Format(Jaw_Range,"-0.0#######") - Window_EMET_Run.EditField_Jaw_RateGD.Text=Format(RateGD,"-0.0#######") - Window_EMET_Run.EditField_Jaw_RatePD.Text=Format(RatePD,"-0.0#######") + Window_EMET_Run.EditField_Jaw_RangeW.value = Format(Weight_Range,"-0.0#######") + Window_EMET_Run.EditField_Jaw_RangeO.value = Format(Jaw_Range,"-0.0#######") + Window_EMET_Run.EditField_Jaw_RateGD.value = Format(RateGD,"-0.0#######") + Window_EMET_Run.EditField_Jaw_RatePD.value = Format(RatePD,"-0.0#######") temp=ts.ReadLine w=val(Temp) - Window_EMET_Run.EditField_Jaw_MinWeight.Text=str(w) + Window_EMET_Run.EditField_Jaw_MinWeight.value = str(w) temp=ts.ReadLine w=val(Temp) - Window_EMET_Run.EditField_jaw_MaxWeight.Text=str(w) + Window_EMET_Run.EditField_jaw_MaxWeight.value = str(w) temp=ts.ReadLine w=val(Temp) @@ -306,7 +306,7 @@ Protected Class Class_MERT_JAWSA temp=ts.ReadLine w=val(Temp) - Window_EMET_Run.EditField_Jaw_StochasticP.Text=str(w) + Window_EMET_Run.EditField_Jaw_StochasticP.value = str(w) temp=ts.ReadLine w=val(Temp) @@ -325,22 +325,22 @@ Protected Class Class_MERT_JAWSA end temp=ts.ReadLine - Window_EMET_Run.EditField_Jaw_Opt_IterationsJaw.Text=Trim(temp) + Window_EMET_Run.EditField_Jaw_Opt_IterationsJaw.value = Trim(temp) MoveBeamInt=val(temp) temp=ts.ReadLine - Window_EMET_Run.EditField_Jaw_MinFieldRange.Text=Trim(temp) + Window_EMET_Run.EditField_Jaw_MinFieldRange.value = Trim(temp) MinFieldRange=val(temp) temp=ts.ReadLine - Window_EMET_Run.EditField_Jaw_MinFieldSize.Text=Trim(temp) + Window_EMET_Run.EditField_Jaw_MinFieldSize.value = Trim(temp) MinFieldSize=val(temp) temp=ts.ReadLine - Window_EMET_Run.EditField_Jaw_MinFieldMove.Text=Trim(temp) + Window_EMET_Run.EditField_Jaw_MinFieldMove.value = Trim(temp) MinFieldMove=val(temp) temp=ts.ReadLine @@ -371,7 +371,7 @@ Protected Class Class_MERT_JAWSA temp=ts.ReadLine FLEC_Size=val(Temp) - Window_EMET_Run.EditField_Jaw_FLECLimit.Text=Trim(temp) + Window_EMET_Run.EditField_Jaw_FLECLimit.value = Trim(temp) ts.Close end end @@ -390,9 +390,9 @@ Protected Class Class_MERT_JAWSA Running=True gopt.Write_Fields Write_sajawDVH_Input - Window_EMET_Run.EditField_Jaw_Score.Text="" + Window_EMET_Run.EditField_Jaw_Score.value = "" Inital_Score=Score - Window_EMET_Run.EditField_Jaw_Inital_Score.Text=Format(Inital_Score,"0.000000e") + Window_EMET_Run.EditField_Jaw_Inital_Score.value = Format(Inital_Score,"0.000000e") Run_Thread.Run diff --git a/MERT/GradDVH/Class_MERT_GradDVH.xojo_code b/MERT/GradDVH/Class_MERT_GradDVH.xojo_code index a2964d9..e31af13 100644 --- a/MERT/GradDVH/Class_MERT_GradDVH.xojo_code +++ b/MERT/GradDVH/Class_MERT_GradDVH.xojo_code @@ -286,7 +286,7 @@ Protected Class Class_MERT_GradDVH ts.Close if InStr(oneline,"GradDVH finished")>0 Then if oneline<>Window_EMET_Run.EditField_Grad_Output.Text Then - Window_EMET_Run.EditField_Grad_Output.Text=oneline + Window_EMET_Run.EditField_Grad_Output.value = oneline end Runtime=(val(NthField(oneline,"Execution time (min) :",2))) hours=Floor(Runtime/60) @@ -302,7 +302,7 @@ Protected Class Class_MERT_GradDVH end elseif Window_EMET_Run.EditField_Grad_Output.Text ="" Then - Window_EMET_Run.EditField_Grad_Output.Text=oneline + Window_EMET_Run.EditField_Grad_Output.value = oneline end end @@ -341,7 +341,7 @@ Protected Class Class_MERT_GradDVH oneline=ts.ReadAll ts.Close if oneline<>Window_EMET_Run.EditField_Grad_Output.Text Then - Window_EMET_Run.EditField_Grad_Output.Text=oneline + Window_EMET_Run.EditField_Grad_Output.value = oneline end End Sub #tag EndMethod @@ -368,7 +368,7 @@ Protected Class Class_MERT_GradDVH gOpt.Write_Fields - Window_EMET_Run.EditField_Grad_Output.Text="" + Window_EMET_Run.EditField_Grad_Output.value = "" app.TodayDate=new Date Submit_Date=app.TodayDate.AbbreviatedDate +" "+App.TodayDate.ShortTime diff --git a/MERT/NLODVH/Class_MERT_NLODVH.xojo_code b/MERT/NLODVH/Class_MERT_NLODVH.xojo_code index 0b2347e..094814a 100644 --- a/MERT/NLODVH/Class_MERT_NLODVH.xojo_code +++ b/MERT/NLODVH/Class_MERT_NLODVH.xojo_code @@ -250,7 +250,7 @@ Protected Class Class_MERT_NLODVH 'end ' ' - '//Window_EMET_Run.StaticText_Grad_RunTime.Text="Time : "+Time + '//Window_EMET_Run.StaticText_Grad_RunTime.value = "Time : "+Time '//Window_EMET_Run.ProgressWheel_Grad.Visible=Running ' 'if Running Then @@ -269,7 +269,7 @@ Protected Class Class_MERT_NLODVH 'oneline=ts.ReadAll 'ts.Close 'if oneline<>Window_EMET_Run.EditField_NLO_Output.Text Then - 'Window_EMET_Run.EditField_NLO_Output.Text=oneline + 'Window_EMET_Run.EditField_NLO_Output.value = oneline 'end 'end ' @@ -292,7 +292,7 @@ Protected Class Class_MERT_NLODVH 'ts.Close 'if InStr(oneline,"NLO finished")>0 Then 'if oneline<>Window_EMET_Run.EditField_NLO_Output.Text Then - 'Window_EMET_Run.EditField_NLO_Output.Text=oneline + 'Window_EMET_Run.EditField_NLO_Output.value = oneline 'end 'Runtime=val(NthField(oneline,"Execution time (min) :",2)) 'Score_Initial=val(NthField(oneline,"Initial Best Obj :",2)) @@ -301,7 +301,7 @@ Protected Class Class_MERT_NLODVH 'Read_Output=True 'S.Read_Results(oneline) 'elseif Window_EMET_Run.EditField_NLO_Output.Text ="" Then - 'Window_EMET_Run.EditField_NLO_Output.Text=oneline + 'Window_EMET_Run.EditField_NLO_Output.value = oneline 'end ' ' @@ -336,7 +336,7 @@ Protected Class Class_MERT_NLODVH '//Set inital values 'Running=True 'Score_Previous=Score - 'Window_EMET_Run.EditField_NLO_Output.Text="" + 'Window_EMET_Run.EditField_NLO_Output.value = "" 'Score_Initial=-1 'Time="" 'Score=-1 diff --git a/MERT/SADVH/Class_MERT_SADVH.xojo_code b/MERT/SADVH/Class_MERT_SADVH.xojo_code index 1508bee..bf8c6c3 100644 --- a/MERT/SADVH/Class_MERT_SADVH.xojo_code +++ b/MERT/SADVH/Class_MERT_SADVH.xojo_code @@ -132,7 +132,7 @@ Protected Class Class_MERT_SADVH Window_EMET_Run.EditField_Sa_Score.TextColor=RGB(255,0,0) end - Window_EMET_Run.EditField_Sa_Score.Text=Format(score,"-0.0000##e") + Window_EMET_Run.EditField_Sa_Score.value = Format(score,"-0.0000##e") ss=ts.ReadLine ss=ts.ReadLine @@ -183,15 +183,15 @@ Protected Class Class_MERT_SADVH 'ts.PositionB=0 ' 'w=val(ts.ReadLine) - 'Window_EMET_Run.EditField_SA_Iterations.Text=Format(w,"#") + 'Window_EMET_Run.EditField_SA_Iterations.value = Format(w,"#") ' 'w=val(ts.ReadLine) - ' //Window_EMET_Run.EditField_DVHBinSA.Text=str(w) + ' //Window_EMET_Run.EditField_DVHBinSA.value = str(w) ' 'w=val(ts.ReadLine) ' 'w=val(ts.ReadLine) - 'Window_EMET_Run.EditField_Conf_Dose.Text=str(w) + 'Window_EMET_Run.EditField_Conf_Dose.value = str(w) ' 'temp=ts.ReadLine ' @@ -202,22 +202,22 @@ Protected Class Class_MERT_SADVH ' 'end 'temp=ts.ReadLine - 'Window_EMET_Run.EditField_SA_Dname.Text=trim(temp) + 'Window_EMET_Run.EditField_SA_Dname.value = trim(temp) ' 'temp=ts.ReadLine 'To_value=val(temp) - 'Window_EMET_Run.EditField_ToSA.Text=Format(To_value,"-0.00###e") + 'Window_EMET_Run.EditField_ToSA.value = Format(To_value,"-0.00###e") 'temp=ts.ReadLine 'Range=val(temp) - 'Window_EMET_Run.EditField_RangeSA.Text=Format(Range,"-0.00###e") + 'Window_EMET_Run.EditField_RangeSA.value = Format(Range,"-0.00###e") 'temp=ts.ReadLine 'Alpha=val(temp) - 'Window_EMET_Run.EditField_SA_Alpha.Text=Format(Alpha,"-0.00###e") + 'Window_EMET_Run.EditField_SA_Alpha.value = Format(Alpha,"-0.00###e") ' 'temp=ts.ReadLine 'Weight_Type=val(temp) 'Init_w=val(NthField(temp," ",2)) - 'Window_EMET_Run.EditField_SA_InitW.Text=str(Init_w) + 'Window_EMET_Run.EditField_SA_InitW.value = str(Init_w) 'if val(temp)=0 Then 'Window_EMET_Run.RadioButton_W_SA_UseValue.Value=True 'elseif val(temp)=1 Then @@ -234,11 +234,11 @@ Protected Class Class_MERT_SADVH ' 'temp=ts.ReadLine 'w=val(Temp) - 'Window_EMET_Run.EditField_MinWeightSA.Text=str(w) + 'Window_EMET_Run.EditField_MinWeightSA.value = str(w) ' 'temp=ts.ReadLine 'w=val(Temp) - 'Window_EMET_Run.EditField_MaxWeightSA.Text=str(w) + 'Window_EMET_Run.EditField_MaxWeightSA.value = str(w) ' 'temp=ts.ReadLine 'w=val(Temp) @@ -291,7 +291,7 @@ Protected Class Class_MERT_SADVH Run_Status end - Window_EMET_Run.StaticText_SA_RunTime.Text="Run Time : "+Time + Window_EMET_Run.StaticText_SA_RunTime.value = "Run Time : "+Time Window_EMET_Run.ProgressWheel_SA.Visible=Running @@ -312,7 +312,7 @@ Protected Class Class_MERT_SADVH whole="" whole=ts.ReadAll if whole<>Window_EMET_Run.EditField_ShelloutSA.Text Then - Window_EMET_Run.EditField_ShelloutSA.Text=whole + Window_EMET_Run.EditField_ShelloutSA.value = whole end ts.Close end @@ -340,18 +340,18 @@ Protected Class Class_MERT_SADVH Running=False Read_Output=True if whole<> Window_EMET_Run.EditField_ShelloutSA.Text Then - Window_EMET_Run.EditField_ShelloutSA.Text=whole + Window_EMET_Run.EditField_ShelloutSA.value = whole end Runtime=val(NthField(whole,"Execution time (min) :",2)) - Window_EMET_Run.EditField_Sa_Time.Text=Format(Runtime,"#.##") + Window_EMET_Run.EditField_Sa_Time.value = Format(Runtime,"#.##") Score_Initial=val(NthField(whole,"Initial Objective:",2)) - Window_EMET_Run.EditField_Sa_Score_Intitial.Text=Format(Score_Initial,"#.#####e") + Window_EMET_Run.EditField_Sa_Score_Intitial.value = Format(Score_Initial,"#.#####e") SAOArray.Read_Results(whole) - elseif Window_EMET_Run.EditField_ShelloutSA.Text="" Then - Window_EMET_Run.EditField_ShelloutSA.Text=whole + elseif Window_EMET_Run.EditField_ShelloutSA.value = "" Then + Window_EMET_Run.EditField_ShelloutSA.value = whole end end End Sub @@ -378,7 +378,7 @@ Protected Class Class_MERT_SADVH Temp=ts.ReadLine if len(temp)>10 Then w=val(NthField(temp," ",5)) - Window_EMET_Run.EditField_Sa_Score.Text=Format(w,"0.0000##e") + Window_EMET_Run.EditField_Sa_Score.value = Format(w,"0.0000##e") end Wend ts.Close @@ -402,7 +402,7 @@ Protected Class Class_MERT_SADVH Delete_SaDVH_files Write_saDVH_Input gOpt.Write_Fields - Window_EMET_Run.EditField_Sa_Score.Text="" + Window_EMET_Run.EditField_Sa_Score.value = "" Read_Output=False g=gRTOG.Plan(Plan_Index).Path diff --git a/MERT/Window_EMET_Results.xojo_window b/MERT/Window_EMET_Results.xojo_window index 5510886..089f1eb 100644 --- a/MERT/Window_EMET_Results.xojo_window +++ b/MERT/Window_EMET_Results.xojo_window @@ -68,7 +68,6 @@ Begin Window Window_EMET_Results drawXsub = False drawYsub = False Enabled = True - EraseBackground = "True" Graph_Title = "" Height = 516 HelpTag = "" @@ -170,7 +169,6 @@ Begin Window Window_EMET_Results drawXsub = False drawYsub = False Enabled = True - EraseBackground = "True" Errors = False Graph_Title = "" Height = 356 @@ -896,7 +894,6 @@ Begin Window Window_EMET_Results Backdrop = 0 DoubleBuffer = False Enabled = True - EraseBackground = "True" Height = 426 HelpTag = "" Index = -2147483648 @@ -1351,7 +1348,6 @@ Begin Window Window_EMET_Results LockLeft = False LockRight = True LockTop = False - MenuValue = "0" Scope = 0 TabIndex = 5 TabPanelIndex = 1 @@ -1396,7 +1392,6 @@ Begin Window Window_EMET_Results LockLeft = False LockRight = True LockTop = False - MenuValue = "0" Scope = 0 TabIndex = 6 TabPanelIndex = 1 @@ -1591,53 +1586,83 @@ End // Load the DVHs into graph points, to plot! // //------------------------------------------ - Dim i ,k as Integer - Dim pp as Class_Profile_One - Dim pxy as Class_Points - Dim dvalue,vvalue as Single + //Dim i ,k as Integer + //Dim pp as Class_Profile_One + //Dim pxy as Class_Points + //Dim dvalue,vvalue as Single //------------------------------------------ - ReDim DVHGraph.Profiles.One_Profile(UBound(DVHs.All_DVH)) + DVHGraph.Profiles.One_Profile.ResizeTo( DVHs.All_DVH.LastRowIndex ) // Load DVHs to Profile plots - for k=0 to UBound(DVHs.All_DVH) - if DVHGraph.Profiles.One_Profile(k)=nil Then - DVHGraph.Profiles.One_Profile(k)=new Class_Profile_One - end - pp= DVHGraph.Profiles.One_Profile(k) - pp.Symbol=DVHs.All_DVH(k).DVH_Symbol - pp.Label=DVHs.All_DVH(k).Name+" "+DVHs.All_DVH(k).struc_names - if PopupMenu_DVH.Text="ALL" or PopupMenu_DVH.Text=DVHs.All_DVH(k).struc_names Then + For k As Integer = 0 To DVHs.All_DVH.LastRowIndex + + If DVHGraph.Profiles.One_Profile(k) = Nil Then + + DVHGraph.Profiles.One_Profile(k) = New Class_Profile_One + + End + + Var pp as Class_Profile_One = DVHGraph.Profiles.One_Profile(k) + pp.Symbol = DVHs.All_DVH(k).DVH_Symbol + pp.Label = DVHs.All_DVH(k).Name + " " + DVHs.All_DVH(k).struc_names + + If PopupMenu_DVH.SelectedRowValue = "ALL" Or _ + PopupMenu_DVH.SelectedRowValue = DVHs.All_DVH(k).struc_names Then + pp.Show=True - if UBound(pp.Points)<>DVHs.All_DVH(k).DVH_bins-1 Then - ReDim pp.Points(DVHs.All_DVH(k).DVH_bins-1) - end + If pp.Points.LastRowIndex <> _ + DVHs.All_DVH(k).DVH_bins - 1 Then + + pp.Points.ResizeTo(DVHs.All_DVH(k).DVH_bins - 1) + + End - StaticText_DVH_Stat.Text="Min, Avg, Max dose : "+str(DVHs.All_DVH(k).mindose)+", "+str(DVHs.All_DVH(k).avgdose)+", "+str(DVHs.All_DVH(k).maxdose) + StaticText_DVH_Stat.value = "Min, Avg, Max dose : " _ + + Str(DVHs.All_DVH(k).mindose) + ", " _ + + Str(DVHs.All_DVH(k).avgdose) + ", " _ + + Str(DVHs.All_DVH(k).maxdose) - for i=0 to DVHs.All_DVH(k).DVH_bins-1 //n bins - if pp.Points(i)= nil Then - pp.Points(i)= new Class_Points - end - pxy=pp.Points(i) - pxy.X_cm=DVHs.All_DVH(k).mindose+(DVHs.All_DVH(k).maxdose-DVHs.All_DVH(k).mindose)*(i+0.5)/DVHs.All_DVH(k).DVH_bins + For i As Integer = 0 To DVHs.All_DVH(k).DVH_bins - 1 //n bins + + If pp.Points(i)= Nil Then + + pp.Points(i)= New Class_Points + + End + + Var pxy as Class_Points = pp.Points(i) + pxy.X_cm= DVHs.All_DVH(k).mindose _ + + (DVHs.All_DVH(k).maxdose - DVHs.All_DVH(k).mindose) _ + * (i+0.5)/DVHs.All_DVH(k).DVH_bins pxy.X_cm=DVHs.All_DVH(k).Normalize*pxy.X_cm - if CumuRadioButton.Value then + + If CumuRadioButton.Value Then + pxy.Y_cm=DVHs.All_DVH(k).DVH_Cum(i) - else + + Else + pxy.Y_cm=DVHs.All_DVH(k).DVH(i) - end - next - else + + End + Next + Else + pp.Show=False - end - for i=0 to UBound(grtog.Structures.Structures) - if DVHs.All_DVH(k).struc_names=grtog.Structures.Structures(i).Structure_Name Then + + End + + For i As Integer = 0 To grtog.Structures.Structures.LastRowIndex + + If DVHs.All_DVH(k).struc_names=grtog.Structures.Structures(i).Structure_Name Then + pp.Colour=grtog.Structures.Structures(i).scolor - end - next - next + + End + Next + Next DVHGraph.Default_Settings DVHGraph.Refresh @@ -1716,17 +1741,17 @@ End i=Listbox_Results.ListIndex - TextArea_Input.Text="" - TextArea_Output.Text="" + TextArea_Input.value = "" + TextArea_Output.value = "" if i>=0 and i<=Listbox_Results.ListCount Then - TextArea_Input.Text=Listbox_Results.Cell(i,5)+Chr(10)+"----Organ & Target Values ------ "+chr(10)+Listbox_Results.Cell(i,9) - TextArea_Output.Text=Listbox_Results.Cell(i,6)+Chr(10)+"----Fluence File------ "+chr(10)+Listbox_Results.Cell(i,7)+Chr(10)+"----DVH File------ "+chr(10)+Listbox_Results.Cell(i,8) - TextArea_Output.Text=Listbox_Results.Cell(i,6)+Chr(10)+"----Fluence File------ "+chr(10)+Listbox_Results.Cell(i,7)+Chr(10)+"----DVH File------ "+chr(10)+Listbox_Results.Cell(i,8) + TextArea_Input.value = Listbox_Results.Cell(i,5)+Chr(10)+"----Organ & Target Values ------ "+chr(10)+Listbox_Results.Cell(i,9) + TextArea_Output.value = Listbox_Results.Cell(i,6)+Chr(10)+"----Fluence File------ "+chr(10)+Listbox_Results.Cell(i,7)+Chr(10)+"----DVH File------ "+chr(10)+Listbox_Results.Cell(i,8) + TextArea_Output.value = Listbox_Results.Cell(i,6)+Chr(10)+"----Fluence File------ "+chr(10)+Listbox_Results.Cell(i,7)+Chr(10)+"----DVH File------ "+chr(10)+Listbox_Results.Cell(i,8) DoNot=True - TextArea_Note.Text=Listbox_Results.Cell(i,12) + TextArea_Note.value = Listbox_Results.Cell(i,12) DoNot=False end diff --git a/MERT/Window_EMET_Run.xojo_window b/MERT/Window_EMET_Run.xojo_window index d314729..046df23 100644 --- a/MERT/Window_EMET_Run.xojo_window +++ b/MERT/Window_EMET_Run.xojo_window @@ -8394,7 +8394,7 @@ End CheckBox_6MV.Caption="6 MV : "+str(p6) CheckBox_18MV.Caption="18 MV : "+str(p18) - Window_EMET_Run.StaticText_NumofOpenings.Text="Number of unique openings : "+ str(UBound(FLEC_Fields)+1) + Window_EMET_Run.StaticText_NumofOpenings.value = "Number of unique openings : "+ str(UBound(FLEC_Fields)+1) End Sub #tag EndMethod @@ -8751,7 +8751,7 @@ End Listbox_GradDVH_Status.CellCheck(13,0)=gOpt.Grad.NormDD Listbox_GradDVH_Status.CellCheck(14,0)=gOpt.Grad.WriteDose Listbox_GradDVH_Status.Cell(14,1)=gOpt.Grad.DoseOutputName - Window_EMET_Run.EditField_Grad_Weight_Value.Text=str(gOpt.Grad.Init_Weight) + Window_EMET_Run.EditField_Grad_Weight_Value.value = str(gOpt.Grad.Init_Weight) End Sub #tag EndMethod @@ -9239,7 +9239,7 @@ End end next gopt.Write_Fields - EditField_Num.Text=str(gopt.Num_Fields) + EditField_Num.value = str(gopt.Num_Fields) Update_Listbox_BEAMS End Sub #tag EndMethod @@ -9558,7 +9558,7 @@ End #tag Events PushButton_OutputClear1 #tag Event Sub Action() - EditField_ShelloutSA.Text="" + EditField_ShelloutSA.value = "" End Sub #tag EndEvent #tag EndEvents @@ -9717,7 +9717,7 @@ End #tag Events PushButton_OutputClearJaw #tag Event Sub Action() - EditField_Shellout_Jaw.Text="" + EditField_Shellout_Jaw.value = "" End Sub #tag EndEvent #tag EndEvents @@ -9849,7 +9849,7 @@ End #tag Events PushButton_GradDVH_OutputClear #tag Event Sub Action() - EditField_Grad_Output.Text="" + EditField_Grad_Output.value = "" End Sub #tag EndEvent #tag EndEvents @@ -9905,7 +9905,7 @@ End 'DVH_index=me.ListIndex-1 'DVHGraph.Interactive=True 'DVH=gopt.Oarray.organ(DVH_index).DVH - 'StaticText_DVH_Stat.Text="Max dose : "+Format(dvh.maxdose,"-#.#####e")+" "+dvh.Dose_Units+" "+"Min dose : "+Format(dvh.mindose,"-#.#####e")+" "+dvh.Dose_Units+" "+"Avg dose : "+Format(dvh.avgdose,"-#.#####e")+" "+dvh.Dose_Units + 'StaticText_DVH_Stat.value = "Max dose : "+Format(dvh.maxdose,"-#.#####e")+" "+dvh.Dose_Units+" "+"Min dose : "+Format(dvh.mindose,"-#.#####e")+" "+dvh.Dose_Units+" "+"Avg dose : "+Format(dvh.avgdose,"-#.#####e")+" "+dvh.Dose_Units ' ' 'for i =0 to UBound(DVHGraph.Profiles.One_Profile) @@ -9921,7 +9921,7 @@ End 'DVHGraph.Profiles.One_Profile(i).Show=True 'next 'DVHGraph.Interactive=False - 'StaticText_DVH_Stat.Text="" + 'StaticText_DVH_Stat.value = "" ' ' 'end if diff --git a/MERT/Window_EMET_Setup.xojo_window b/MERT/Window_EMET_Setup.xojo_window index 7df5876..a97a712 100644 --- a/MERT/Window_EMET_Setup.xojo_window +++ b/MERT/Window_EMET_Setup.xojo_window @@ -7065,7 +7065,7 @@ End - StaticText_Depth_Progress.Text="Making axial and rotated images" + StaticText_Depth_Progress.value = "Making axial and rotated images" ProgressBar_Depths.Maximum=UBound(gVis.scans) for i=0 to UBound(gVis.scans) ProgressBar_Depths.Value=i @@ -7159,7 +7159,7 @@ End //-------------------------------------------------------------- - StaticText_Depth_Progress.Text="Filter depth range on rotated images in Y pixels" + StaticText_Depth_Progress.value = "Filter depth range on rotated images in Y pixels" ProgressBar_Depths.Maximum=nx*2 ProgressBar_Depths.Refresh y_lower=0 @@ -7196,7 +7196,7 @@ End //-------------------------------------------------------------- - StaticText_Depth_Progress.Text="Calculate depth for each target pixel on rotated images" + StaticText_Depth_Progress.value = "Calculate depth for each target pixel on rotated images" ProgressBar_Depths.Maximum=-1 ProgressBar_Depths.Refresh for y=y_lower DownTo y_higher // Seach within y range to speed things up @@ -7300,7 +7300,7 @@ End ' ' ' - 'StaticText_Depth_Progress.Text="Making depth plot" + 'StaticText_Depth_Progress.value = "Making depth plot" 'ProgressBar_Depths.Maximum=-1 'ProgressBar_Depths.Refresh ' @@ -7349,7 +7349,7 @@ End Normal.Graphics.FillRect(0,0,ff.nx,ff.nz) - StaticText_Depth_Progress.Text="Making depth plot" + StaticText_Depth_Progress.value = "Making depth plot" ProgressBar_Depths.Maximum=ff.nx-1 ProgressBar_Depths.Refresh @@ -7999,12 +7999,12 @@ End #tag Method, Flags = &h0 Sub FLEC_Populate_Beam() - EditField_FLEC_x1.Text=str(FLEC.x1) - EditField_FLEC_x2.Text=str(FLEC.x2) - EditField_FLEC_Y1.Text=str(FLEC.y1) - EditField_FLEC_Y2.Text=str(FLEC.y2) - EditField_FLEC_FieldX.Text=str(FLEC.x1+FLEC.x2) - EditField_FLEC_FieldY.Text=str(FLEC.y1+FLEC.y2) + EditField_FLEC_x1.value = str(FLEC.x1) + EditField_FLEC_x2.value = str(FLEC.x2) + EditField_FLEC_Y1.value = str(FLEC.y1) + EditField_FLEC_Y2.value = str(FLEC.y2) + EditField_FLEC_FieldX.value = str(FLEC.x1+FLEC.x2) + EditField_FLEC_FieldY.value = str(FLEC.y1+FLEC.y2) End Sub #tag EndMethod @@ -8279,11 +8279,11 @@ End //---------------------------------Ray Beam Settings-------------------------------- - EditField_RayX.Text=str(1) - EditField_RayY.Text=str(1) + EditField_RayX.value = str(1) + EditField_RayY.value = str(1) - EditField_Ray_delX.Text=str((FLEC.x1+FLEC.x2)/val(EditField_RayX.Text)) - EditField_Ray_delY.Text=str((FLEC.y1+FLEC.y2)/val(EditField_Rayy.Text)) + EditField_Ray_delX.value = str((FLEC.x1+FLEC.x2)/val(EditField_RayX.Text)) + EditField_Ray_delY.value = str((FLEC.y1+FLEC.y2)/val(EditField_Rayy.Text)) //---------------------------------Ray Beam Settings-------------------------------- @@ -8310,7 +8310,7 @@ End PopupMenu_SC_Target.ListIndex=target_index PopupMenu_Target.ListIndex=target_index PopupMenu_External.ListIndex=external_index - EditField_Angle_nx.Text=str(nx) + EditField_Angle_nx.value = str(nx) @@ -8439,7 +8439,7 @@ End - EditField_Ray_delX.Text=str(Ray_delx) + EditField_Ray_delX.value = str(Ray_delx) @@ -8453,7 +8453,7 @@ End Ray_Y_Quad=val(me.Text) Ray_dely=(fLEC.y1+FLEC.y2)/Ray_y_Quad - EditField_Ray_dely.Text=str(Ray_dely) + EditField_Ray_dely.value = str(Ray_dely) End Sub #tag EndEvent @@ -8475,7 +8475,7 @@ End end end - EditField_Feathered_Number_X.Text=Format(Feather_Number_X,"#") + EditField_Feathered_Number_X.value = Format(Feather_Number_X,"#") End Sub #tag EndEvent #tag EndEvents @@ -8494,7 +8494,7 @@ End Feather_Number_y=1 end end - EditField_Feathered_Number_y.Text=Format(Feather_Number_Y,"-#") + EditField_Feathered_Number_y.value = Format(Feather_Number_Y,"-#") End Sub #tag EndEvent #tag EndEvents @@ -8526,7 +8526,7 @@ End Feather_Number_y=1 end end - EditField_Feathered_Number_y.Text=Format(Feather_Number_Y,"-#") + EditField_Feathered_Number_y.value = Format(Feather_Number_Y,"-#") End Sub #tag EndEvent #tag EndEvents @@ -8546,7 +8546,7 @@ End end end - EditField_Feathered_Number_X.Text=Format(Feather_Number_X,"#") + EditField_Feathered_Number_X.value = Format(Feather_Number_X,"#") End Sub #tag EndEvent #tag EndEvents @@ -8770,8 +8770,8 @@ End Sub Change() if me.ListIndex>-1 Then Beam=gRTOG.Plan(Plan_Index).Beam(me.ListIndex) - StaticText_Depth_OneBeam.Text="Isocenter X,Y,Z : ("+Format(Beam.Collimator.Fields(0).isocenter.X,"-#.###")+", "+Format(Beam.Collimator.Fields(0).isocenter.y,"-#.###")+", "+Format(Beam.Collimator.Fields(0).isocenter.z,"-#.###")+")" - StaticText_Depth_OneBeam.Text=StaticText_Depth_OneBeam.Text+chr(10)+"Gantry angle : "+Format(Beam.Collimator.Fields(0).Gantry_Angle,"-#.###") + StaticText_Depth_OneBeam.value = "Isocenter X,Y,Z : ("+Format(Beam.Collimator.Fields(0).isocenter.X,"-#.###")+", "+Format(Beam.Collimator.Fields(0).isocenter.y,"-#.###")+", "+Format(Beam.Collimator.Fields(0).isocenter.z,"-#.###")+")" + StaticText_Depth_OneBeam.value = StaticText_Depth_OneBeam.Text+chr(10)+"Gantry angle : "+Format(Beam.Collimator.Fields(0).Gantry_Angle,"-#.###") end @@ -8880,8 +8880,8 @@ End if Key=chr(13) or key=chr(9) then FLEC.x1=val(me.text)/2 FLEC.x2=val(me.text)/2 - EditField_FLEC_x1.Text=str(FLEC.x1) - EditField_FLEC_x2.Text=str(FLEC.x2) + EditField_FLEC_x1.value = str(FLEC.x1) + EditField_FLEC_x2.value = str(FLEC.x2) Beam.Collimator.fields(0).X1=val(me.text)/2+0.5 Beam.Collimator.fields(0).X2=val(me.text)/2+0.5 @@ -8899,8 +8899,8 @@ End FLEC.y1=val(me.text)/2 FLEC.y2=val(me.text)/2 - EditField_FLEC_Y1.Text=str(FLEC.y1) - EditField_FLEC_Y2.Text=str(FLEC.y2) + EditField_FLEC_Y1.value = str(FLEC.y1) + EditField_FLEC_Y2.value = str(FLEC.y2) Beam.Collimator.fields(0).Y1=val(me.text)/2+0.5 Beam.Collimator.fields(0).Y2=val(me.text)/2+0.5 @@ -8916,7 +8916,7 @@ End if Key=chr(13) or key=chr(9) then // chr(13) or key=chr(9) = Carriage return FLEC.x1=Val(me.Text) - EditField_FLEC_FieldX.Text=str(FLEC.x1+FLEC.x2) + EditField_FLEC_FieldX.value = str(FLEC.x1+FLEC.x2) Beam.Collimator.fields(0).X1=val(me.text)+0.5 end if @@ -8929,7 +8929,7 @@ End if Key=chr(13) or key=chr(9) then // chr(13) or key=chr(9) = Carriage return FLEC.x2=Val(me.Text) - EditField_FLEC_FieldX.Text=str(FLEC.x1+FLEC.x2) + EditField_FLEC_FieldX.value = str(FLEC.x1+FLEC.x2) Beam.Collimator.fields(0).X2=val(me.text)+0.5 @@ -8943,7 +8943,7 @@ End if Key=chr(13) or key=chr(9) then // chr(13) or key=chr(9) = Carriage return FLEC.y1=Val(me.Text) - EditField_FLEC_FieldY.Text=str(FLEC.y1+FLEC.y2) + EditField_FLEC_FieldY.value = str(FLEC.y1+FLEC.y2) Beam.Collimator.fields(0).Y1=val(me.text)+0.5 @@ -8958,7 +8958,7 @@ End if Key=chr(13) or key=chr(9) then // chr(13) or key=chr(9) = Carriage return FLEC.y2=Val(me.Text) - EditField_FLEC_FieldY.Text=str(FLEC.y1+FLEC.y2) + EditField_FLEC_FieldY.value = str(FLEC.y1+FLEC.y2) Beam.Collimator.fields(0).Y2=val(me.text)+0.5 end if @@ -9537,10 +9537,10 @@ End ' ' ' - 'EditField_PP_X.Text=Format(xcm,"-#.##") - 'EditField_PP_y.Text=Format(ycm,"-#.##") + 'EditField_PP_X.value = Format(xcm,"-#.##") + 'EditField_PP_y.value = Format(ycm,"-#.##") ' - 'StaticText_Depth_Pixel.Text="Offset Pixel X : "+Format((x-buffer_offx)/zoomx,"#")+" Y: "+Format((y-buffer_offy)/zoomy,"#") + 'StaticText_Depth_Pixel.value = "Offset Pixel X : "+Format((x-buffer_offx)/zoomx,"#")+" Y: "+Format((y-buffer_offy)/zoomy,"#") ' 'if CheckBox_Plot_Point.Value Then 'me.Refresh @@ -9659,7 +9659,7 @@ End if Key=chr(13) or key=chr(9) then // chr(13) or key=chr(9) = Carriage return FLEC.x1=Val(me.Text) - EditField_FLEC_FieldX.Text=str(FLEC.x1+FLEC.x2) + EditField_FLEC_FieldX.value = str(FLEC.x1+FLEC.x2) Beam.Collimator.fields(0).X1=val(me.text)+0.5 end if @@ -9672,8 +9672,8 @@ End if Key=chr(13) or key=chr(9) then FLEC.x1=val(me.text)/2 FLEC.x2=val(me.text)/2 - EditField_FLEC_x1.Text=str(FLEC.x1) - EditField_FLEC_x2.Text=str(FLEC.x2) + EditField_FLEC_x1.value = str(FLEC.x1) + EditField_FLEC_x2.value = str(FLEC.x2) Beam.Collimator.fields(0).X1=val(me.text)/2+0.5 Beam.Collimator.fields(0).X2=val(me.text)/2+0.5 @@ -9690,7 +9690,7 @@ End if Key=chr(13) or key=chr(9) then // chr(13) or key=chr(9) = Carriage return FLEC.x1=Val(me.Text) - EditField_FLEC_FieldX.Text=str(FLEC.x1+FLEC.x2) + EditField_FLEC_FieldX.value = str(FLEC.x1+FLEC.x2) Beam.Collimator.fields(0).X1=val(me.text)+0.5 end if @@ -9703,8 +9703,8 @@ End if Key=chr(13) or key=chr(9) then FLEC.x1=val(me.text)/2 FLEC.x2=val(me.text)/2 - EditField_FLEC_x1.Text=str(FLEC.x1) - EditField_FLEC_x2.Text=str(FLEC.x2) + EditField_FLEC_x1.value = str(FLEC.x1) + EditField_FLEC_x2.value = str(FLEC.x2) Beam.Collimator.fields(0).X1=val(me.text)/2+0.5 Beam.Collimator.fields(0).X2=val(me.text)/2+0.5 @@ -9721,7 +9721,7 @@ End if Key=chr(13) or key=chr(9) then // chr(13) or key=chr(9) = Carriage return FLEC.x1=Val(me.Text) - EditField_FLEC_FieldX.Text=str(FLEC.x1+FLEC.x2) + EditField_FLEC_FieldX.value = str(FLEC.x1+FLEC.x2) Beam.Collimator.fields(0).X1=val(me.text)+0.5 end if @@ -9734,8 +9734,8 @@ End if Key=chr(13) or key=chr(9) then FLEC.x1=val(me.text)/2 FLEC.x2=val(me.text)/2 - EditField_FLEC_x1.Text=str(FLEC.x1) - EditField_FLEC_x2.Text=str(FLEC.x2) + EditField_FLEC_x1.value = str(FLEC.x1) + EditField_FLEC_x2.value = str(FLEC.x2) Beam.Collimator.fields(0).X1=val(me.text)/2+0.5 Beam.Collimator.fields(0).X2=val(me.text)/2+0.5 @@ -9752,7 +9752,7 @@ End if Key=chr(13) or key=chr(9) then // chr(13) or key=chr(9) = Carriage return FLEC.x1=Val(me.Text) - EditField_FLEC_FieldX.Text=str(FLEC.x1+FLEC.x2) + EditField_FLEC_FieldX.value = str(FLEC.x1+FLEC.x2) Beam.Collimator.fields(0).X1=val(me.text)+0.5 end if @@ -9765,7 +9765,7 @@ End if Key=chr(13) or key=chr(9) then // chr(13) or key=chr(9) = Carriage return FLEC.x1=Val(me.Text) - EditField_FLEC_FieldX.Text=str(FLEC.x1+FLEC.x2) + EditField_FLEC_FieldX.value = str(FLEC.x1+FLEC.x2) Beam.Collimator.fields(0).X1=val(me.text)+0.5 end if @@ -9778,8 +9778,8 @@ End if Key=chr(13) or key=chr(9) then FLEC.x1=val(me.text)/2 FLEC.x2=val(me.text)/2 - EditField_FLEC_x1.Text=str(FLEC.x1) - EditField_FLEC_x2.Text=str(FLEC.x2) + EditField_FLEC_x1.value = str(FLEC.x1) + EditField_FLEC_x2.value = str(FLEC.x2) Beam.Collimator.fields(0).X1=val(me.text)/2+0.5 Beam.Collimator.fields(0).X2=val(me.text)/2+0.5 @@ -9796,7 +9796,7 @@ End if Key=chr(13) or key=chr(9) then // chr(13) or key=chr(9) = Carriage return FLEC.x1=Val(me.Text) - EditField_FLEC_FieldX.Text=str(FLEC.x1+FLEC.x2) + EditField_FLEC_FieldX.value = str(FLEC.x1+FLEC.x2) Beam.Collimator.fields(0).X1=val(me.text)+0.5 end if diff --git a/McGill_Cutout/Thread_Cutout.xojo_code b/McGill_Cutout/Thread_Cutout.xojo_code index e964727..f036c3c 100644 --- a/McGill_Cutout/Thread_Cutout.xojo_code +++ b/McGill_Cutout/Thread_Cutout.xojo_code @@ -175,7 +175,7 @@ Inherits Thread Return True else - Window_Treatment.StaticText_Cutout_Status.Text="Error : shell index on beam "+str(beam+1)+" is out of bounds" + Window_Treatment.StaticText_Cutout_Status.value = "Error : shell index on beam "+str(beam+1)+" is out of bounds" Return False end diff --git a/McGill_Cutout/Window_Cutout_Options.xojo_window b/McGill_Cutout/Window_Cutout_Options.xojo_window index c2a9b8b..b339117 100644 --- a/McGill_Cutout/Window_Cutout_Options.xojo_window +++ b/McGill_Cutout/Window_Cutout_Options.xojo_window @@ -2072,7 +2072,7 @@ End next PopupMenu_Gap_Material.ListIndex=list_index - //EditField_cutout_thick.Text=str(Cutout.CutOutThickness) + //EditField_cutout_thick.value = str(Cutout.CutOutThickness) '=================== @@ -2096,23 +2096,23 @@ End end '=================== - EditField_histories.Text=Format(Cutout.NHistories,"#") - EditField_jobs.Text=Format(Cutout.jobs,"#") - EditField_pegs.Text=Cutout.pegsfile - EditField_CutoutThickness.Text=Format(Cutout.CutOutThickness,"-#.####") + EditField_histories.value = Format(Cutout.NHistories,"#") + EditField_jobs.value = Format(Cutout.jobs,"#") + EditField_pegs.value = Cutout.pegsfile + EditField_CutoutThickness.value = Format(Cutout.CutOutThickness,"-#.####") PopupMenu_Shell.ListIndex=Cutout.Shell_Index - EditField_ECUT.Text=Format(Cutout.ECUT,"-#.####") - EditField_PCUT.Text=Format(Cutout.PCUT,"-#.####") - EditField_airgapthickness.Text=Format(Cutout.GapThickness,"-#.####") - EditField_phsppath.Text=Cutout.InputPhaseSpaceName - EditField_MC_Seed.Text=Format(Cutout.seed,"#") - EditField_Read_buff.Text=Format(Cutout.nreadbuffer,"#") - EditField_write_buff.Text=Format(Cutout.nwritebuffer,"#") + EditField_ECUT.value = Format(Cutout.ECUT,"-#.####") + EditField_PCUT.value = Format(Cutout.PCUT,"-#.####") + EditField_airgapthickness.value = Format(Cutout.GapThickness,"-#.####") + EditField_phsppath.value = Cutout.InputPhaseSpaceName + EditField_MC_Seed.value = Format(Cutout.seed,"#") + EditField_Read_buff.value = Format(Cutout.nreadbuffer,"#") + EditField_write_buff.value = Format(Cutout.nwritebuffer,"#") - EditField_scoring_thick.Text=Format(Cutout.ScoringRegionThickness,"#.###") - EditField_phantom_thick.Text=Format(Cutout.phantomthickness,"#.###") - EditField_Scoring_rad.Text=Format(Cutout.ScoringRegionRadius,"#.###") - EditField_phspdistance.Text=Format(Cutout.DistInputPhsp,"#.###") + EditField_scoring_thick.value = Format(Cutout.ScoringRegionThickness,"#.###") + EditField_phantom_thick.value = Format(Cutout.phantomthickness,"#.###") + EditField_Scoring_rad.value = Format(Cutout.ScoringRegionRadius,"#.###") + EditField_phspdistance.value = Format(Cutout.DistInputPhsp,"#.###") If Cutout.OutputType=1 Then @@ -2137,7 +2137,7 @@ End CheckBox_Finished.Value=Cutout.Finished - EditField_progress.Text=Format(Cutout.progress,"#") + EditField_progress.value = Format(Cutout.progress,"#") End Sub #tag EndMethod diff --git a/RTOG Class/RTOG Plan/RTOG_Plan.xojo_code b/RTOG Class/RTOG Plan/RTOG_Plan.xojo_code index 1d141eb..7197227 100644 --- a/RTOG Class/RTOG Plan/RTOG_Plan.xojo_code +++ b/RTOG Class/RTOG Plan/RTOG_Plan.xojo_code @@ -3278,7 +3278,7 @@ Protected Class RTOG_Plan for i=0 to UBound(grtog.Structures.Structures) if Structure_Dose(i).Use_DV_Constraint or Structure_Dose(i).Use_Min_Dose or Structure_Dose(i).AvgDose_Use Then //show progress along the way...to know where we are. - //Window_EMET.StaticText_Structure.text="Writing Struture point file : "+grtog.Structures.Structures(i).Structure_Name + //Window_EMET.StaticText_Structure.value = "Writing Struture point file : "+grtog.Structures.Structures(i).Structure_Name //for each structure //initialize the stuff @@ -3389,7 +3389,7 @@ Protected Class RTOG_Plan end next 'End for each Structure - //Window_EMET.StaticText_Structure.text="Struture point file finished!" + //Window_EMET.StaticText_Structure.value = "Struture point file finished!" Window_Prescription.ProgressBar_Struc.Value=0 Window_Prescription.ProgressBar_Struc.Refresh Window_Prescription.Update_Listbox_Volumes diff --git a/RTOG Class/Thread_RTOG.xojo_code b/RTOG Class/Thread_RTOG.xojo_code index 8eae60d..54fe370 100644 --- a/RTOG Class/Thread_RTOG.xojo_code +++ b/RTOG Class/Thread_RTOG.xojo_code @@ -4576,8 +4576,7 @@ Inherits Thread '===========Write McGill format to disk================= Dim f ,g as FolderItem Dim fname,line,temp,temp2 as string - Dim i ,j ,k as integer - Dim ct as boolean + Dim ct As Boolean Dim d as date Dim ts as TextOutputStream '====================================================== @@ -4627,22 +4626,28 @@ Inherits Thread f=f.Parent PW_Progress_Max=ubound(scan)+1 - for i=0 to ubound(scan) + For i As Integer = 0 To ubound(scan) write_McGill_CT_Scan(f,i) - next + Next - PW_Progress_Max=ubound(Structures.Structures)+1 - for i=0 to ubound(Structures.Structures) - write_mcGill_Structures(Structures.Structures(i),f,i) - next + Try + PW_Progress_Max=ubound(Structures.Structures)+1 + For i As Integer = 0 To ubound(Structures.Structures) + write_mcGill_Structures(Structures.Structures(i),f,i) + Next + Catch err As NilObjectException + + + + End Try - end + End If - for i=0 to ubound(Plan) + For i As Integer = 0 To ubound(Plan) Plan(i).Write_McGill_Plan(path) - next + Next PW_Show=false End Function diff --git a/Treatment Planning/Thread_AddDose.xojo_code b/Treatment Planning/Thread_AddDose.xojo_code index 2bd82ef..ec33521 100644 --- a/Treatment Planning/Thread_AddDose.xojo_code +++ b/Treatment Planning/Thread_AddDose.xojo_code @@ -150,7 +150,7 @@ Inherits Thread da=gRTOG.Plan(plan_index).Dose(a) Dose = new RTOG_Dose_Distribution Dose.SOP_Instance_UID=gDICOM.UID_Make - //Window_AddDose.StaticText2.Text="Calculating New Dose Matrix" + //Window_AddDose.StaticText2.value = "Calculating New Dose Matrix" Dose.Coord_1_1st_point =da.Coord_1_1st_point Dose.Coord_2_1st_point =da.Coord_2_1st_point @@ -185,7 +185,7 @@ Inherits Thread //dose=Dose_Op_Div(a,b,dose) //end - //Window_AddDose.StaticText2.Text="Finished New Dose Matrix" + //Window_AddDose.StaticText2.value = "Finished New Dose Matrix" if Zero Then @@ -265,7 +265,7 @@ Inherits Thread //dose=Dose_Op_Div(a,b,dose) //end - 'Window_AddDose.StaticText2.Text="Finished New Dose Matrix" + 'Window_AddDose.StaticText2.value = "Finished New Dose Matrix" Window_AddDose.ProgressMsg="Finished New Dose Matrix" @@ -309,7 +309,7 @@ Inherits Thread if b=-1 then'We use the editfield value edit_value=Val(Window_AddDose.EditField_Dose_Cons.Text) Dc.Dose_name=Da.Dose_name+"+"+Window_AddDose.EditField_Dose_Cons.Text - 'Window_AddDose.StaticText2.Text=dc.Dose_name + 'Window_AddDose.StaticText2.value = dc.Dose_name for i = 0 to UBound(Dc.Dose_Distribution) 'PW_Progress=i diff --git a/Treatment Planning/Window_3DView.xojo_window b/Treatment Planning/Window_3DView.xojo_window index 0b9bf5c..4faa84e 100644 --- a/Treatment Planning/Window_3DView.xojo_window +++ b/Treatment Planning/Window_3DView.xojo_window @@ -1162,7 +1162,7 @@ End #tag EndEvent #tag Event Sub MouseUp(X As Integer, Y As Integer) - EditField_Scale.Text=Format(Canvas_3D(0).canvas_scale,"#.##") + EditField_Scale.value = Format(Canvas_3D(0).canvas_scale,"#.##") End Sub #tag EndEvent #tag EndEvents @@ -1395,7 +1395,7 @@ End #tag Events Slider_Image #tag Event Sub ValueChanged() - EditField_Nz.Text=Str(me.Value) + EditField_Nz.value = Str(me.Value) Canvas_3D(0).update_Room End Sub diff --git a/Treatment Planning/Window_Beam_Cutout.xojo_window b/Treatment Planning/Window_Beam_Cutout.xojo_window index db32fb5..ec47fdf 100644 --- a/Treatment Planning/Window_Beam_Cutout.xojo_window +++ b/Treatment Planning/Window_Beam_Cutout.xojo_window @@ -527,7 +527,7 @@ End 'Canvas_digitizer.graphics.drawOval rulerx1-5,rulery1-5, 11,11 'Canvas_digitizer.graphics.drawOval rulerx2-5,rulery2-5, 11,11 'Canvas_digitizer.graphics.drawline rulerx1, rulery1, rulerx2, rulery2 - 'pixpercmtextbox.text="Pixel/cm: " + str(gpixpercm) + 'pixpercmtextbox.value = "Pixel/cm: " + str(gpixpercm) End Sub #tag EndMethod diff --git a/Treatment Planning/Window_Beam_Properties.xojo_window b/Treatment Planning/Window_Beam_Properties.xojo_window index 0fb1e79..58cbbc3 100644 --- a/Treatment Planning/Window_Beam_Properties.xojo_window +++ b/Treatment Planning/Window_Beam_Properties.xojo_window @@ -4235,7 +4235,7 @@ End Sub Accessories_MLC_info() - EditField_mlc_Model.Text=beam.MLC.Model + EditField_mlc_Model.value = beam.MLC.Model if mlc_field>UBound(beam.MLC.Fields) Then mlc_field=UBound(beam.MLC.Fields) @@ -4256,20 +4256,20 @@ End end - EditField_mlc_type.Text=beam.MLC.MLC_Type + EditField_mlc_type.value = beam.MLC.MLC_Type EditField_mlc_type.Enabled=True EditField_mlc_field_index.Enabled=True ScrollBar_mlcfields.Minimum=0 ScrollBar_mlcfields.Maximum=UBound(beam.MLC.Fields) - EditField_mlc_field_index.Text=str(beam.MLC.Fields(mlc_field).Indexnum) - EditField_mlc_fields.Text=str(beam.MLC.NumberofFields) + EditField_mlc_field_index.value = str(beam.MLC.Fields(mlc_field).Indexnum) + EditField_mlc_fields.value = str(beam.MLC.NumberofFields) ScrollBar_mlcfields.Enabled=True else - EditField_mlc_type.Text="" + EditField_mlc_type.value = "" EditField_mlc_type.Enabled=False EditField_mlc_field_index.Enabled=False - EditField_mlc_field_index.Text="" - EditField_mlc_fields.Text="" + EditField_mlc_field_index.value = "" + EditField_mlc_fields.value = "" ScrollBar_mlcfields.Enabled=False end @@ -4301,7 +4301,7 @@ End RadioButton_Wedge_Dynamic.Value=True EditField_Wedge_Dynamic_Angle.Enabled=True PopupMenu_Wedge_Dynamic_Or.Enabled=True - EditField_Wedge_Dynamic_Angle.Text=beam.Wedge_Angle + EditField_Wedge_Dynamic_Angle.value = beam.Wedge_Angle Accessories_pop_wedge_dyn_rot @@ -4516,7 +4516,7 @@ End EditField_BType.Text = beam.Beam_Type EditField_BWeight.Text = str(beam.Beam_Weight) - EditField_DR.Text=beam.Beam_DoseRate + EditField_DR.value = beam.Beam_DoseRate EditField_MU.Text = Str(beam.MU) EditField_NoTx.Text = str(beam.Number_of_Tx) EditField_TxDose.Text = str(beam.Rx_Dose) @@ -4615,8 +4615,8 @@ End end ScrollBar_JAWfields.Minimum=1 ScrollBar_JAWfields.Maximum=UBound(beam.Collimator.Fields)+1 - EditField_JAW_fields.Text=str(UBound(beam.Collimator.Fields)+1) - EditField_JAW_type.Text=beam.Collimator.Type + EditField_JAW_fields.value = str(UBound(beam.Collimator.Fields)+1) + EditField_JAW_type.value = beam.Collimator.Type Geometry_populate_Field @@ -4634,21 +4634,21 @@ End donothing=True EditField_Coll_Ang.text =str(Beam.Collimator.Fields(jaw_field).Collimator_Angle, "-##.####") EditField_FieldX.Text = str(beam.Collimator.fields(jaw_field).X1+beam.Collimator.fields(jaw_field).X2, "-##.####") - EditField_X1.Text=str(beam.Collimator.fields(jaw_field).X1, "-##.####") - EditField_X2.Text=str(beam.Collimator.fields(jaw_field).X2, "-##.####") - EditField_BS.Text=Format(beam.Collimator.BackScatter,"-#.###") + EditField_X1.value = str(beam.Collimator.fields(jaw_field).X1, "-##.####") + EditField_X2.value = str(beam.Collimator.fields(jaw_field).X2, "-##.####") + EditField_BS.value = Format(beam.Collimator.BackScatter,"-#.###") EditField_FieldY.Text = str(beam.Collimator.fields(jaw_field).Y1+beam.Collimator.fields(jaw_field).Y2, "-##.####") - EditField_Y1.Text=str(beam.Collimator.fields(jaw_field).Y1, "-##.####") - EditField_Y2.Text=str(beam.Collimator.fields(jaw_field).Y2, "-##.####") + EditField_Y1.value = str(beam.Collimator.fields(jaw_field).Y1, "-##.####") + EditField_Y2.value = str(beam.Collimator.fields(jaw_field).Y2, "-##.####") EditField_Gantry_Ang.text =str(Beam.Collimator.Fields(jaw_field).Gantry_Angle, "-##.####") EditField_Couch_Ang.text =str(beam.Collimator.Fields(jaw_field).couch_Angle, "-##.####") - EditField_Iso_X.Text=str(beam.Collimator.Fields(jaw_field).isocenter.X, "-##.####") - EditField_Iso_Y.Text=str(beam.Collimator.Fields(jaw_field).isocenter.Y, "-##.####") - EditField_Iso_Z.Text=str(beam.Collimator.Fields(jaw_field).isocenter.z, "-##.####") - EditField_Isoc.Text=str(beam.nominal_Isocenter, "-##.####") - EditField_SSD.Text=str(Beam.SSD, "-##.####") - EditField_JAW_type.Text=beam.Collimator.Type - EditField_JAW_field_index.Text=Format(beam.Collimator.Fields(jaw_field).Index,"-#.######") + EditField_Iso_X.value = str(beam.Collimator.Fields(jaw_field).isocenter.X, "-##.####") + EditField_Iso_Y.value = str(beam.Collimator.Fields(jaw_field).isocenter.Y, "-##.####") + EditField_Iso_Z.value = str(beam.Collimator.Fields(jaw_field).isocenter.z, "-##.####") + EditField_Isoc.value = str(beam.nominal_Isocenter, "-##.####") + EditField_SSD.value = str(Beam.SSD, "-##.####") + EditField_JAW_type.value = beam.Collimator.Type + EditField_JAW_field_index.value = Format(beam.Collimator.Fields(jaw_field).Index,"-#.######") Accessories_Jaw_Draw if beam.Collimator.Fields(jaw_field).ARC_Direction=0 Then @@ -5110,8 +5110,8 @@ End if i>-1 and i<=UBound(beam.MLC.Fields) Then mlc_field=i Accessories_MLC_Draw - StaticText_MLC_fieldnum.Text="Index of field : "+str(mlc_field+1) - EditField_mlc_field_index.Text=Format(beam.MLC.Fields(mlc_field).Indexnum,"#.#####") + StaticText_MLC_fieldnum.value = "Index of field : "+str(mlc_field+1) + EditField_mlc_field_index.value = Format(beam.MLC.Fields(mlc_field).Indexnum,"#.#####") end End Sub #tag EndEvent @@ -5175,7 +5175,7 @@ End Function KeyDown(Key As String) As Boolean if val(me.text)<0.001 or val(me.text)>2.0 then MsgBox "cut out thickness has to be between 0.001 and 2.0 cm" - me.text="1.5" + me.value = "1.5" me.refresh end if End Function @@ -5254,7 +5254,7 @@ End ScrollBar_JAWfields.Minimum=1 ScrollBar_JAWfields.Maximum=beam.Collimator.NumFields - //EditField_JAW_fields.Text=str(UBound(beam.Collimator.Fields)+1) + //EditField_JAW_fields.value = str(UBound(beam.Collimator.Fields)+1) End Sub #tag EndEvent @@ -5274,8 +5274,8 @@ End if i>-1 and i<=UBound(beam.Collimator.Fields) Then jaw_field=i - StaticText_Jaw_Index.Text="Index of field :"+str(i+1) - EditField_JAW_field_index.Text=Format(beam.Collimator.Fields(i).Index,"#.######") + StaticText_Jaw_Index.value = "Index of field :"+str(i+1) + EditField_JAW_field_index.value = Format(beam.Collimator.Fields(i).Index,"#.######") Geometry_populate_Field Canvas_JAWS.Refresh end diff --git a/Treatment Planning/Window_ColourWash.xojo_window b/Treatment Planning/Window_ColourWash.xojo_window index ba8d654..324250c 100644 --- a/Treatment Planning/Window_ColourWash.xojo_window +++ b/Treatment Planning/Window_ColourWash.xojo_window @@ -224,8 +224,8 @@ End #tag Event Sub Open() - EditField_ColourMax.text=Format(gvis.ColourWashMax,"-#.####e") - EditField_ColourMin.text=Format(gvis.ColourWashMin,"-#.####e") + EditField_ColourMax.value = Format(gvis.ColourWashMax,"-#.####e") + EditField_ColourMin.value = Format(gvis.ColourWashMin,"-#.####e") End Sub #tag EndEvent diff --git a/Treatment Planning/Window_Dose_Info.xojo_window b/Treatment Planning/Window_Dose_Info.xojo_window index efe8656..1abd15a 100644 --- a/Treatment Planning/Window_Dose_Info.xojo_window +++ b/Treatment Planning/Window_Dose_Info.xojo_window @@ -1760,11 +1760,11 @@ End if UBound(gRTOG.Plan(Plan_Index).Dose)>= Window_Treatment.dose_index and Window_Treatment.dose_index>-1 Then dd=gRTOG.Plan(Plan_Index).Dose(Window_Treatment.dose_index) - EditField_Dose_SOP.Text=dd.SOP_Instance_UID - EditField_Dose_Comments.Text=dd.Dose_Comment - EditField_Dose_Type.Text=dd.SumType - EditField_Dose_Engine.Text=dd.engine - EditField_Dose_Series.Text=dd.SeriesDescription + EditField_Dose_SOP.value = dd.SOP_Instance_UID + EditField_Dose_Comments.value = dd.Dose_Comment + EditField_Dose_Type.value = dd.SumType + EditField_Dose_Engine.value = dd.engine + EditField_Dose_Series.value = dd.SeriesDescription dx=dd.Horizontal_Grid dy=dd.Vertical_Grid @@ -1775,50 +1775,50 @@ End z=dd.Coord_3_1st_point - EditField_1stx_BL.Text=Format(gRTOG.Plan(Plan_Index).Dose(Window_Treatment.dose_index).Coord_1_1st_point-dd.Horizontal_Grid/2,"-#.#####") - EditField_1stY_BL.Text=Format(gRTOG.Plan(Plan_Index).Dose(Window_Treatment.dose_index).Coord_2_1st_point-dd.Vertical_Grid/2,"-#.#####") - EditField_1stZ_BL.Text=Format(gRTOG.Plan(Plan_Index).Dose(Window_Treatment.dose_index).Coord_3_1st_point-dd.Depth_Grid/2,"-#.#####") + EditField_1stx_BL.value = Format(gRTOG.Plan(Plan_Index).Dose(Window_Treatment.dose_index).Coord_1_1st_point-dd.Horizontal_Grid/2,"-#.#####") + EditField_1stY_BL.value = Format(gRTOG.Plan(Plan_Index).Dose(Window_Treatment.dose_index).Coord_2_1st_point-dd.Vertical_Grid/2,"-#.#####") + EditField_1stZ_BL.value = Format(gRTOG.Plan(Plan_Index).Dose(Window_Treatment.dose_index).Coord_3_1st_point-dd.Depth_Grid/2,"-#.#####") - EditField_1stx.Text=Format(gRTOG.Plan(Plan_Index).Dose(Window_Treatment.dose_index).Coord_1_1st_point,"-#.#####") - EditField_1sty.Text=Format(gRTOG.Plan(Plan_Index).Dose(Window_Treatment.dose_index).Coord_2_1st_point,"-#.#####") - EditField_1stz.Text=Format(gRTOG.Plan(Plan_Index).Dose(Window_Treatment.dose_index).Coord_3_1st_point,"-#.#####") + EditField_1stx.value = Format(gRTOG.Plan(Plan_Index).Dose(Window_Treatment.dose_index).Coord_1_1st_point,"-#.#####") + EditField_1sty.value = Format(gRTOG.Plan(Plan_Index).Dose(Window_Treatment.dose_index).Coord_2_1st_point,"-#.#####") + EditField_1stz.value = Format(gRTOG.Plan(Plan_Index).Dose(Window_Treatment.dose_index).Coord_3_1st_point,"-#.#####") - EditField_dx.Text=Format(gRTOG.Plan(Plan_Index).Dose(Window_Treatment.dose_index).horizontal_grid,"-#.#####") - EditField_dy.Text=Format(gRTOG.Plan(Plan_Index).Dose(Window_Treatment.dose_index).Vertical_Grid,"-#.#####") - EditField_dz.Text=Format(gRTOG.Plan(Plan_Index).Dose(Window_Treatment.dose_index).depth_grid,"-#.#####") + EditField_dx.value = Format(gRTOG.Plan(Plan_Index).Dose(Window_Treatment.dose_index).horizontal_grid,"-#.#####") + EditField_dy.value = Format(gRTOG.Plan(Plan_Index).Dose(Window_Treatment.dose_index).Vertical_Grid,"-#.#####") + EditField_dz.value = Format(gRTOG.Plan(Plan_Index).Dose(Window_Treatment.dose_index).depth_grid,"-#.#####") - EditField_LastX.Text=Format(gRTOG.Plan(Plan_Index).Dose(Window_Treatment.dose_index).Coord_1_1st_point+_ + EditField_LastX.value = Format(gRTOG.Plan(Plan_Index).Dose(Window_Treatment.dose_index).Coord_1_1st_point+_ gRTOG.Plan(Plan_Index).Dose(Window_Treatment.dose_index).horizontal_grid*_ (gRTOG.Plan(Plan_Index).Dose(Window_Treatment.dose_index).Size_of_Dimension1-1),"-#.#####") - EditField_Lasty.Text=Format(gRTOG.Plan(Plan_Index).Dose(Window_Treatment.dose_index).Coord_2_1st_point+_ + EditField_Lasty.value = Format(gRTOG.Plan(Plan_Index).Dose(Window_Treatment.dose_index).Coord_2_1st_point+_ gRTOG.Plan(Plan_Index).Dose(Window_Treatment.dose_index).Vertical_Grid*_ (gRTOG.Plan(Plan_Index).Dose(Window_Treatment.dose_index).Size_of_Dimension2-1),"-#.#####") - EditField_Lastz.Text=Format(gRTOG.Plan(Plan_Index).Dose(Window_Treatment.dose_index).Coord_3_1st_point+_ + EditField_Lastz.value = Format(gRTOG.Plan(Plan_Index).Dose(Window_Treatment.dose_index).Coord_3_1st_point+_ gRTOG.Plan(Plan_Index).Dose(Window_Treatment.dose_index).depth_grid*_ (gRTOG.Plan(Plan_Index).Dose(Window_Treatment.dose_index).Size_of_Dimension3-1),"-#.#####") - EditField_LastX_BL.Text=Format(gRTOG.Plan(Plan_Index).Dose(Window_Treatment.dose_index).Coord_1_1st_point-dd.Horizontal_Grid/2+_ + EditField_LastX_BL.value = Format(gRTOG.Plan(Plan_Index).Dose(Window_Treatment.dose_index).Coord_1_1st_point-dd.Horizontal_Grid/2+_ gRTOG.Plan(Plan_Index).Dose(Window_Treatment.dose_index).horizontal_grid*_ (gRTOG.Plan(Plan_Index).Dose(Window_Treatment.dose_index).Size_of_Dimension1),"-#.#####") - EditField_LastY_BL.Text=Format(gRTOG.Plan(Plan_Index).Dose(Window_Treatment.dose_index).Coord_2_1st_point-dd.Vertical_Grid/2+_ + EditField_LastY_BL.value = Format(gRTOG.Plan(Plan_Index).Dose(Window_Treatment.dose_index).Coord_2_1st_point-dd.Vertical_Grid/2+_ gRTOG.Plan(Plan_Index).Dose(Window_Treatment.dose_index).Vertical_Grid*_ (gRTOG.Plan(Plan_Index).Dose(Window_Treatment.dose_index).Size_of_Dimension2),"-#.#####") - EditField_lastZ_BL.Text=Format(gRTOG.Plan(Plan_Index).Dose(Window_Treatment.dose_index).Coord_3_1st_point-dd.Depth_Grid/2+_ + EditField_lastZ_BL.value = Format(gRTOG.Plan(Plan_Index).Dose(Window_Treatment.dose_index).Coord_3_1st_point-dd.Depth_Grid/2+_ gRTOG.Plan(Plan_Index).Dose(Window_Treatment.dose_index).depth_grid*_ (gRTOG.Plan(Plan_Index).Dose(Window_Treatment.dose_index).Size_of_Dimension3),"-#.#####") - EditField_nx.Text=Format(gRTOG.Plan(Plan_Index).Dose(Window_Treatment.dose_index).Size_of_Dimension1,"#") - EditField_ny.Text=Format(gRTOG.Plan(Plan_Index).Dose(Window_Treatment.dose_index).Size_of_Dimension2,"#") - EditField_nz.Text=Format(gRTOG.Plan(Plan_Index).Dose(Window_Treatment.dose_index).Size_of_Dimension3,"#") + EditField_nx.value = Format(gRTOG.Plan(Plan_Index).Dose(Window_Treatment.dose_index).Size_of_Dimension1,"#") + EditField_ny.value = Format(gRTOG.Plan(Plan_Index).Dose(Window_Treatment.dose_index).Size_of_Dimension2,"#") + EditField_nz.value = Format(gRTOG.Plan(Plan_Index).Dose(Window_Treatment.dose_index).Size_of_Dimension3,"#") - EditField_Dose_units.Text=gRTOG.Plan(Plan_Index).Dose(Window_Treatment.dose_index).dose_units + EditField_Dose_units.value = gRTOG.Plan(Plan_Index).Dose(Window_Treatment.dose_index).dose_units - EditField_Dname.Text=gRTOG.Plan(Plan_Index).Dose(Window_Treatment.dose_index).dose_name + EditField_Dname.value = gRTOG.Plan(Plan_Index).Dose(Window_Treatment.dose_index).dose_name diff --git a/Treatment Planning/Window_Graph.xojo_window b/Treatment Planning/Window_Graph.xojo_window index 0a232d0..c3d4af8 100644 --- a/Treatment Planning/Window_Graph.xojo_window +++ b/Treatment Planning/Window_Graph.xojo_window @@ -738,8 +738,8 @@ End me.Redraw - EditField_X.Text=Format(me.x_mouse_value,"-#.####") - EditField_Y.Text=Format(me.y_mouse_value,"-#.####e") + EditField_X.value = Format(me.x_mouse_value,"-#.####") + EditField_Y.value = Format(me.y_mouse_value,"-#.####e") End Sub #tag EndEvent #tag EndEvents @@ -943,7 +943,7 @@ End gg=Canvas_Graph.Profiles.One_Profile(Canvas_Graph.Interactive_index).Get_Value_at_Point(x,y,z,false) - EditField_Y.Text=Format(gg,"-#.####e") + EditField_Y.value = Format(gg,"-#.####e") end End Sub #tag EndEvent diff --git a/Treatment Planning/Window_Image_Info.xojo_window b/Treatment Planning/Window_Image_Info.xojo_window index fa806bb..888594c 100644 --- a/Treatment Planning/Window_Image_Info.xojo_window +++ b/Treatment Planning/Window_Image_Info.xojo_window @@ -1398,25 +1398,25 @@ End #tag WindowCode #tag Event Sub Open() - EditField_StudyInstanceUID.Text=gRTOG.StudyInstanceUID - EditField_RefernecedSSS.Text=gRTOG.ReferencedStructureSetSequence - EditField_ID.Text=gRTOG.StudyID - EditField_Orientation.Text=gRTOG.DICOM_ImageOrientationPatient - EditField_PatientP.Text=gRTOG.PatientPosition - EditField_FrameOfReferenceUID.Text=gRTOG.FrameOfReferenceUID - EditField_Description.Text=gRTOG.DICOM_Study_Description - EditField_SeriesNumber.Text=gRTOG.SeriesNumber - EditField_StudyDate.Text=gRTOG.DICOM_Study_Date - EditField_seriesdescription.Text=gRTOG.seriesdescription - EditField_seriesUID.Text=gRTOG.SeriesInstanceUID + EditField_StudyInstanceUID.value = gRTOG.StudyInstanceUID + EditField_RefernecedSSS.value = gRTOG.ReferencedStructureSetSequence + EditField_ID.value = gRTOG.StudyID + EditField_Orientation.value = gRTOG.DICOM_ImageOrientationPatient + EditField_PatientP.value = gRTOG.PatientPosition + EditField_FrameOfReferenceUID.value = gRTOG.FrameOfReferenceUID + EditField_Description.value = gRTOG.DICOM_Study_Description + EditField_SeriesNumber.value = gRTOG.SeriesNumber + EditField_StudyDate.value = gRTOG.DICOM_Study_Date + EditField_seriesdescription.value = gRTOG.seriesdescription + EditField_seriesUID.value = gRTOG.SeriesInstanceUID - EditField_x.Text=Format(gVis.xoff_set,"-#.###e") - EditField_Y.Text=Format(gVis.yoff_set,"-#.###e") - EditField_z.Text=Format(gVis.zoff_set,"-#.###e") + EditField_x.value = Format(gVis.xoff_set,"-#.###e") + EditField_Y.value = Format(gVis.yoff_set,"-#.###e") + EditField_z.value = Format(gVis.zoff_set,"-#.###e") - EditField_X_Res.Text=Format(10*gVis.scale_width,"-#.###") - EditField_Y_Res.Text=Format(10*gVis.scale_height,"-#.###") - EditField_Z_Res.Text=Format(10*gVis.scale_thickness,"-#.###") + EditField_X_Res.value = Format(10*gVis.scale_width,"-#.###") + EditField_Y_Res.value = Format(10*gVis.scale_height,"-#.###") + EditField_Z_Res.value = Format(10*gVis.scale_thickness,"-#.###") End Sub #tag EndEvent diff --git a/Treatment Planning/Window_IsoDose.xojo_window b/Treatment Planning/Window_IsoDose.xojo_window index 412ca59..453a4a4 100644 --- a/Treatment Planning/Window_IsoDose.xojo_window +++ b/Treatment Planning/Window_IsoDose.xojo_window @@ -1040,10 +1040,10 @@ End Sub Open() ListBox_Isodose.heading(1)="Colour" ListBox_Isodose.heading(2)="Show" - EditField_LineThickness.text=str(gvis.Iso.thickness) - EditField_Font.text=(gvis.Iso.FONT) - EditField_Font_Size.text=str(gvis.Iso.FONT_Size) - EditField_LineThicknessSave.Text=Str(gVis.Iso.thicknessSave) + EditField_LineThickness.value = str(gvis.Iso.thickness) + EditField_Font.value = (gvis.Iso.FONT) + EditField_Font_Size.value = str(gvis.Iso.FONT_Size) + EditField_LineThicknessSave.value = Str(gVis.Iso.thicknessSave) ListBox_Isodose.columnalignment(0)=2 ListBox_Isodose.columnalignment(1)=2 @@ -1083,7 +1083,7 @@ End end if RadioButton_Relative.Value Then - EditField_normalize.text=str(gvis.Iso.normalization_value) + EditField_normalize.value = str(gvis.Iso.normalization_value) if gvis.Iso.Show_Type=2 then RadioButton_max.Value=True elseif gVis.Iso.Show_Type=3 Then diff --git a/Treatment Planning/Window_Patient_Info.xojo_window b/Treatment Planning/Window_Patient_Info.xojo_window index 7847221..b1c1db6 100644 --- a/Treatment Planning/Window_Patient_Info.xojo_window +++ b/Treatment Planning/Window_Patient_Info.xojo_window @@ -362,9 +362,9 @@ End #tag WindowCode #tag Event Sub Open() - EditField_1stname.Text=gRTOG.Patient_Name - EditField_lastName.Text=gRTOG.Patient_Surname - EditField_ID.Text=gRTOG.Patient_ID + EditField_1stname.value = gRTOG.Patient_Name + EditField_lastName.value = gRTOG.Patient_Surname + EditField_ID.value = gRTOG.Patient_ID CheckBox_Show.Value=gPref.Show_Patient_Info End Sub diff --git a/Treatment Planning/Window_Plan_Info.xojo_window b/Treatment Planning/Window_Plan_Info.xojo_window index fa7f4a9..b5d1d50 100644 --- a/Treatment Planning/Window_Plan_Info.xojo_window +++ b/Treatment Planning/Window_Plan_Info.xojo_window @@ -287,7 +287,7 @@ End if UBound(gRTOG.Plan)>-1 Then - //EditField_CurrentPlan.Text=gRTOG.Plan(Plan_Index).Plan_ID+ " "+gRTOG.Plan(Plan_Index).Plan_Name + //EditField_CurrentPlan.value = gRTOG.Plan(Plan_Index).Plan_ID+ " "+gRTOG.Plan(Plan_Index).Plan_Name for i=0 to UBound(gShells.Shells) Listbox_MC_Running.AddRow gShells.Shells(i).title if gBEAM<> nil Then diff --git a/Treatment Planning/Window_Prescription.xojo_window b/Treatment Planning/Window_Prescription.xojo_window index 19cc1b2..80a4df9 100644 --- a/Treatment Planning/Window_Prescription.xojo_window +++ b/Treatment Planning/Window_Prescription.xojo_window @@ -724,8 +724,8 @@ End CheckBox_MaxSegment.Value=plan.UseMaxSegement - EditField_Max_Segments.Text=Format(plan.MaximumSegments,"#") - EditField_Max_Segpriority.Text=Format(plan.MaximumSegmentsPriority,"#.0000e") + EditField_Max_Segments.value = Format(plan.MaximumSegments,"#") + EditField_Max_Segpriority.value = Format(plan.MaximumSegmentsPriority,"#.0000e") Update_Listbox_OrganConst Update_Listbox_TargetConst diff --git a/Treatment Planning/Window_Rename.xojo_window b/Treatment Planning/Window_Rename.xojo_window index 9f39cb8..2adeb44 100644 --- a/Treatment Planning/Window_Rename.xojo_window +++ b/Treatment Planning/Window_Rename.xojo_window @@ -254,13 +254,13 @@ End Sub OpenWin() if Dose Then me.Title="Rename Dose " - StaticText_old.Text=gRTOG.Plan(Plan_Index).Dose(Window_Treatment.dose_index).dose_name - EditField_new.Text=gRTOG.Plan(Plan_Index).Dose(Window_Treatment.dose_index).dose_name + StaticText_old.value = gRTOG.Plan(Plan_Index).Dose(Window_Treatment.dose_index).dose_name + EditField_new.value = gRTOG.Plan(Plan_Index).Dose(Window_Treatment.dose_index).dose_name Else me.Title="Rename Plan "+gRTOG.Plan(Plan_Index).Plan_ID - StaticText_old.Text=(gRTOG.Plan(Plan_Index).Plan_Name) - EditField_new.Text=(gRTOG.Plan(Plan_Index).Plan_Name) + StaticText_old.value = (gRTOG.Plan(Plan_Index).Plan_Name) + EditField_new.value = (gRTOG.Plan(Plan_Index).Plan_Name) end End Sub @@ -298,7 +298,7 @@ End newname=Replace(newname," ","-") Wend - EditField_new.Text=NewName + EditField_new.value = NewName if Dose Then diff --git a/Treatment Planning/Window_Treatment.xojo_window b/Treatment Planning/Window_Treatment.xojo_window index 9e264d1..86f29c5 100644 --- a/Treatment Planning/Window_Treatment.xojo_window +++ b/Treatment Planning/Window_Treatment.xojo_window @@ -4823,8 +4823,8 @@ End end - EditField_point1.Text=Format(rr.point1.x_cm,"-##.###")+" , "+Format(rr.point1.y_cm,"-##.###")+" , "+Format(rr.point1.z_cm,"-##.###") - EditField_point2.Text=Format(rr.point2.x_cm,"-##.###")+" , "+Format(rr.point2.y_cm,"-##.###")+" , "+Format(rr.point2.z_cm,"-##.###") + EditField_point1.value = Format(rr.point1.x_cm,"-##.###")+" , "+Format(rr.point1.y_cm,"-##.###")+" , "+Format(rr.point1.z_cm,"-##.###") + EditField_point2.value = Format(rr.point2.x_cm,"-##.###")+" , "+Format(rr.point2.y_cm,"-##.###")+" , "+Format(rr.point2.z_cm,"-##.###") ruler_change=True End Sub @@ -4950,8 +4950,8 @@ End Slider_Window_Level.Value=gvis.WL Slider_Window_Width.Value=gvis.ww - StaticText_level.Text="Level : "+str(gvis.wl) - StaticText_window.Text="Window : "+str(gvis.ww) + StaticText_level.value = "Level : "+str(gvis.wl) + StaticText_window.value = "Window : "+str(gvis.ww) Slider_Scale.Maximum=5000 Slider_Scale.Minimum=10 @@ -5023,7 +5023,7 @@ End MC_Open_settings(Plan_Index) gDVH.Read_DVH - EditField_DVHBins.Text=str(gDVH.DVHBins) + EditField_DVHBins.value = str(gDVH.DVHBins) Dose_DVH_Structures Dose_DVH window_update_plan @@ -6725,7 +6725,7 @@ End #tag Events Slider_Window_Level #tag Event Sub ValueChanged() - StaticText_Level.Text="Level : "+Format(me.Value,"-#") + StaticText_Level.value = "Level : "+Format(me.Value,"-#") if me.Value<>gvis.wl then gvis.WL=me.Value gvis.WL_Recalculate @@ -6757,7 +6757,7 @@ End if me.Value<>gvis.ww then gvis.ww=me.Value gvis.WL_Recalculate - StaticText_window.Text="Window : "+Format(me.Value,"-#") + StaticText_window.value = "Window : "+Format(me.Value,"-#") end End Sub #tag EndEvent @@ -6787,25 +6787,25 @@ End canvas_top.canvas_scale=Slider_Scale.Value/100 Canvas_top.Buffer Canvas_top.Ruler_cm_to_pix - EditField_Scale.Text=format(canvas_top.canvas_scale*100,"#.##") + EditField_Scale.value = format(canvas_top.canvas_scale*100,"#.##") Canvas_Top.RePaint elseif ScaleFlag=2 Then canvas_left.canvas_scale=Slider_Scale.Value/100 Canvas_left.Buffer Canvas_Left.Ruler_cm_to_pix - EditField_Scale.Text=Format(canvas_left.canvas_scale*100,"#.##") + EditField_Scale.value = Format(canvas_left.canvas_scale*100,"#.##") Canvas_left.RePaint elseif ScaleFlag=3 Then canvas_right.canvas_scale=Slider_Scale.Value/100 Canvas_Right.Buffer Canvas_Right.Ruler_cm_to_pix - EditField_Scale.Text=Format(canvas_right.canvas_scale*100,"#.##") + EditField_Scale.value = Format(canvas_right.canvas_scale*100,"#.##") Canvas_right.RePaint else //Canvas_3D(0).canvas_scale=Slider_Scale.Value/10 - //EditField_Scale.Text=Format(//Canvas_3D(0).canvas_scale,"#.##") + //EditField_Scale.value = Format(//Canvas_3D(0).canvas_scale,"#.##") //Canvas_3D(0).Update_Camera_Position //'Canvas_3D(0).Refresh(false) end @@ -6837,20 +6837,20 @@ End Select case hitItem.Text case "Top" ScaleFlag=1 - StaticText_Scale.Text="Scale Top %" - EditField_Scale.Text=str(Canvas_Top.canvas_scale*100) + StaticText_Scale.value = "Scale Top %" + EditField_Scale.value = str(Canvas_Top.canvas_scale*100) Case "Left" ScaleFlag=2 - StaticText_Scale.Text="Scale Left %" - EditField_Scale.Text=str(canvas_left.canvas_scale*100) + StaticText_Scale.value = "Scale Left %" + EditField_Scale.value = str(canvas_left.canvas_scale*100) case "Right" ScaleFlag=3 - StaticText_Scale.Text="Scale Right %" - EditField_Scale.Text=str(canvas_right.canvas_scale*100) + StaticText_Scale.value = "Scale Right %" + EditField_Scale.value = str(canvas_right.canvas_scale*100) case "3D" ScaleFlag=4 - StaticText_Scale.Text="Scale 3D %" - EditField_Scale.Text=str(canvas_right.canvas_scale*100) + StaticText_Scale.value = "Scale 3D %" + EditField_Scale.value = str(canvas_right.canvas_scale*100) end Select End Function #tag EndEvent diff --git a/Utility/App.xojo_code b/Utility/App.xojo_code index ea5e798..96e142f 100644 --- a/Utility/App.xojo_code +++ b/Utility/App.xojo_code @@ -56,7 +56,7 @@ Inherits Application FileConfigurationsVMCsettings.Enabled=True - if gRTOG<>nil Then + If gRTOG<>Nil Then Task_TreatmentPlanning.Enabled=True Task_Contour.Enabled=True Task_AddDose.Enabled=True @@ -67,9 +67,9 @@ Inherits Application FileImageInformation.Enabled=True - if which_window_Contouring Then + If which_window_Contouring Then File_Save_Contours.Enabled=True - end + End File_Save_DoseDistributions.Enabled=True FileSaveProfiles.Enabled=True @@ -85,13 +85,13 @@ Inherits Application File_Import_DICOMRTPlanD.Enabled=True File_Import_DICOMStrutures.Enabled=True File_Import_DICOMRTPlan.Enabled=True - if which_window_TreatmentPlanning Then + If which_window_TreatmentPlanning Then Task_3DViewer.Enabled=True File_Export_DosePlane.Enabled=True - else + Else File_Export_DosePlane.Enabled=False - end - end + End + End End Sub #tag EndEvent @@ -147,13 +147,13 @@ Inherits Application #tag Event Function UnhandledException(error As RuntimeException) As Boolean - If error isa OutOfBoundsException Then + If error IsA OutOfBoundsException Then MsgBox("An OutOfBounds Exception has occurred") - elseif error isa OutOfMemoryException Then + Elseif error IsA OutOfMemoryException Then MsgBox("An OutOf Memory Exception has occurred") - else + Else MsgBox("An error has occured : "+error.Reason) - end + End End Function #tag EndEvent @@ -1080,16 +1080,15 @@ Inherits Application #tag Method, Flags = &h0 Sub MMCTP_Check_Version() - Dim i,magv,minv as Integer - + Var magv As Integer = Val(NthField(Previous_Version,".",1)) + Var minv As Integer = Val(NthField(Previous_Version,".",2)) - magv=val(NthField(Previous_Version,".",1)) - minv=val(NthField(Previous_Version,".",2)) - - if magv<7 Then + If magv < 7 Then + MMCTP_Version_Update_7 - end + + End End Sub #tag EndMethod @@ -1104,41 +1103,49 @@ Inherits Application MMCTP_Shell_Run.Close - ReDim MMCTP_Shell_Refresh.All(-1) - ReDim MMCTP_Shell_Run.All(-1) + MMCTP_Shell_Refresh.All.ResizeTo(-1) + MMCTP_Shell_Run.All.ResizeTo(-1) // Kill gvis runs - if gvis<>Nil then - if gVis.Contours<> nil Then + If gvis <> Nil Then + + If gVis.Contours <> Nil Then + gVis.Contours.kill - gVis.contours=nil - end + gVis.contours = Nil + + End + gvis.kill - ReDim gvis.scans(-1) - gvis=nil - end - gvis=new Thread_Visualization + gvis.scans.ResizeTo(-1) + gvis = Nil + + End + gvis = New Thread_Visualization - if App.which_window_TreatmentPlanning then + If App.which_window_TreatmentPlanning Then + Window_Treatment.Close - if app.which_window_TreatmentPlanning=False Then - gRTOG=nil - else - Return false - - end + If app.which_window_TreatmentPlanning=False Then + + gRTOG = Nil + + Else + + Return False + + End + Elseif App.which_window_Contouring Then - elseif App.which_window_Contouring then Window_Contouring.Close - gRTOG=nil - end - - + gRTOG=Nil + + End - Return true + Return True End Function #tag EndMethod @@ -1146,69 +1153,68 @@ Inherits Application Sub MMCTP_Open_Application() // Open MMCTP Settings - if MMCTP_Open Then + If MMCTP_Open Then + Return - end + + End - gShells = new Class_Shells + gShells = New Class_Shells gShells.Read_login - gLinacs=new Class_Linacs + gLinacs = New Class_Linacs gLinacs.Read_MLCs gLinacs.Read_Linacs - gDoseStats=new Class_Dose_Stats + gDoseStats = New Class_Dose_Stats gDoseStats.read - gTimer_Refresh=new Class_MMCTP_Timer_Refresh - gTimer_Run=new Class_MMCTP_Timer_Run - gTimer_Download=new Class_MMCTP_Timer_Download - gTimer_PW=new Class_MMCTP_Timer_ProgressWindow - gTimer_Windows=new Class_MMCTP_Timer_Windows - gTimer_PW.Enabled=True - gTimer_Windows.Enabled=True + gTimer_Refresh = New Class_MMCTP_Timer_Refresh + gTimer_Run = New Class_MMCTP_Timer_Run + gTimer_Download = New Class_MMCTP_Timer_Download + gTimer_PW = New Class_MMCTP_Timer_ProgressWindow + gTimer_Windows = New Class_MMCTP_Timer_Windows + gTimer_PW.Enabled = True + gTimer_Windows.Enabled = True gTimer_Windows.Mode=Timer.ModeMultiple gTimer_PW.Mode=Timer.ModeMultiple + gDVH = New Thread_DVH + gOpt = New Thread_Optimization - - - gDVH=new Thread_DVH - - gOpt=new Thread_Optimization - - gDICOM= new Thread_DICOM_Object + gDICOM = New Thread_DICOM_Object gDICOM.Read_Dictionary - gCT=new Class_CT + gCT = New Class_CT gct.Read_CT_Calibration - MMCTP_Shell_Refresh=new Shell_MMCTP_Refresh - MMCTP_Download= new Shell_MMCTP_Download - MMCTP_Shell_Run=new Shell_MMCTP_Run + MMCTP_Shell_Refresh = New Shell_MMCTP_Refresh + MMCTP_Download = New Shell_MMCTP_Download + MMCTP_Shell_Run = New Shell_MMCTP_Run MMCTP_ReadConfig MMCTP_Check_Version - gOutput=new Class_OutPut - gProfiles=new Class_Profiles_All - if gPref.McGillRT_Profile_Skip=False Then + gOutput = New Class_OutPut + gProfiles = New Class_Profiles_All + + If gPref.McGillRT_Profile_Skip = False Then + gOutput.Read_All_Tables gProfiles.Read_All_Profiles(gPref.Commission_fi) - end + + End Window_OpenPatient.Show - MMCTP_Open=True + MMCTP_Open =True End Sub #tag EndMethod #tag Method, Flags = &h0 Sub MMCTP_Open_Patient(f as folderItem) - Dim answer as Boolean - Window_OpenPatient.Close gRTOG.path=f gRTOG.Run @@ -1222,80 +1228,107 @@ Inherits Application // Read MMCTP Config file MMCTP-Settings // //------------------------------------- - Dim i as Integer - Dim f as FolderItem - Dim ts as TextInputStream - Dim temp,ss,shell as String - //------------------------------------- + //Dim f As FolderItem + //Dim ts as TextInputStream + //Dim temp,ss,shell As String + //------------------------------------- - f=gPref.Settings_fi - f=f.Child("MMCTP-Settings.txt") + Var f As FolderItem = gPref.Settings_fi.Child("MMCTP-Settings.txt") - if f=Nil Then + If f = Nil Then + Return - end + + End - if f.Exists=False Then + If f.Exists = False Then + Return - end - ts=f.OpenAsTextFile - if ts=nil Then + + End + + Var ts As TextInputStream = f.OpenAsTextFile + + If ts = Nil Then + Return - end + + End - while ts.EOF=False - temp=ts.ReadLine - if InStr(temp,"Auto Check")>0 Then + While ts.EOF=False + + Var temp as String = ts.ReadLine + + If InStr(temp,"Auto Check")>0 Then + Temp=NthField(Temp,":=",2) - if InStr(Temp,"no")>0 Then + + If InStr(Temp,"no")>0 Then + MC_Auto_Check=False - else + + Else + MC_Auto_Check=True - end + + End + + Elseif InStr(temp,"MMCTP-Version")>0 Then - ElseIf InStr(temp,"MMCTP-Version")>0 Then Temp=NthField(Temp,":=",2) Previous_Version=Trim(temp) - - Elseif InStr(temp,"Auto Timer")>0 Then + Temp=NthField(Temp,":=",2) - gTimer_Refresh.Check_Period=val(Temp) + gTimer_Refresh.Check_Period=Val(Temp) gTimer_Download.Check_Period=gTimer_Refresh.Check_Period Elseif InStr(temp,"AutoRUNTIMER")>0 Then + Temp=NthField(Temp,":=",2) - gTimer_Run.Check_Period=val(Temp) + gTimer_Run.Check_Period=Val(Temp) + Elseif InStr(temp,"MC Run Logic")>0 Then - elseif InStr(temp,"MC Run Logic")>0 Then Temp=NthField(Temp,":=",2) - if InStr(Temp,"no")>0 Then + + If InStr(Temp,"no")>0 Then + MC_Run_Logic=False - else + + Else + MC_Run_Logic=True - end + + End + + Elseif InStr(temp,"Shell Online")>0 Then - elseif InStr(temp,"Shell Online")>0 Then - Temp=NthField(Temp,"Shell Online",2) - ss=NthField(Temp,":=",2) - Shell=Trim(NthField(Temp,":=",1)) + temp = NthField(Temp,"Shell Online",2) + Var ss As String = NthField(Temp,":=",2) + Var Shell As String =Trim(NthField(Temp,":=",1)) - for i=0 to UBound(gShells.Shells) - if Shell=gShells.Shells(i).title Then - if InStr(ss,"no")>0 Then + For i As Integer = 0 To UBound(gShells.Shells) + + If Shell=gShells.Shells(i).title Then + + If InStr(ss,"no")>0 Then + gShells.Shells(i).online=False - else + + Else + gShells.Shells(i).online=True - end - end - next + + End + End + Next - end + End Wend ts.Close End Sub @@ -1307,62 +1340,75 @@ Inherits Application // // //--------------------------------- - Dim fi as FolderItem - Dim op as Boolean - Dim ts as TextInputStream - Dim fileread as String + //Dim fi As FolderItem + //Dim op As Boolean + //Dim ts As TextInputStream + //Dim fileread As String //--------------------------------- - fi=gPref.Settings_fi - if fi.Exists =False Then - MsgBox "Error, could not find User folder"+chr(13)+"Goodbye" - Quit - else - fi=fi.child(".llc") - op=True - if fi.Exists Then - ts=fi.OpenAsTextFile - fileread=ts.ReadLine - if fileread=fi.NativePath Then - op=False - else - op=true - end + Var f As FolderItem = gPref.Settings_fi + + If f.Exists Then + + f=f.child(".llc") + Var op As Boolean = True + + If f.Exists Then + + Var ts As TextInputStream = f.OpenAsTextFile + Var fileread As String = ts.ReadLine + + If fileread=f.NativePath Then + + op = False + + End + ts.Close - end + + End + Return op - end + + Else + + MsgBox "Error, could not find User folder"+Chr(13)+"Goodbye" + Quit + + End End Function #tag EndMethod #tag Method, Flags = &h0 Sub MMCTP_Save_Dose() - Dim i,k as Integer - - - - PW_Title="Saving Dose" PW_Progress_Max=0 - PW_Show=true + PW_Show =True - for i=0 to UBound(gRTOG.Plan) - for k=0 to UBound(gRTOG.Plan(i).Dose) - if gRTOG.Plan(i).Dose(k).save Then + For i As Integer = 0 To gRTOG.Plan.LastRowIndex + + For k As Integer=0 To gRTOG.Plan(i).Dose.LastRowIndex + + If gRTOG.Plan(i).Dose(k).save Then + gRTOG.Plan(i).Write_McGill_Dose(k) - gRTOG.Plan(i).Dose(k).save=False - end + gRTOG.Plan(i).Dose(k).save = False + + End Next Next - PW_Show=false - if app.which_window_TreatmentPlanning Then + PW_Show = False + + If app.which_window_TreatmentPlanning Then + Window_Treatment.Window_update_plan Window_Treatment.Window_canvas_refresh - Window_Treatment.Save_Dose=False - end + Window_Treatment.Save_Dose = False + + End @@ -1372,27 +1418,31 @@ Inherits Application #tag Method, Flags = &h0 Sub MMCTP_Save_Plan() - Dim i as integer - Dim fname as String - + Var fname As String = _ + gRTOG.Patient_Name+String_Separate + _ + gRTOG.Patient_Surname+String_Separate+(gRTOG.Patient_ID) - fname=gRTOG.Patient_Name+String_Separate+gRTOG.Patient_Surname+String_Separate+(gRTOG.Patient_ID) - PW_Title="Saving McGill files..." - PW_StaticText=fname - PW_Show=true + PW_Title = "Saving McGill files..." + PW_StaticText = fname + PW_Show = True - for i =0 to UBound(gRTOG.Plan) - if gRTOG.Plan(i).Save_Plan Then + For i As Integer =0 To gRTOG.Plan.LastRowIndex + + If gRTOG.Plan(i).Save_Plan Then + gRTOG.Plan(i).Write_McGill_Beam - gRTOG.Plan(i).Save_Plan=False - end - next + gRTOG.Plan(i).Save_Plan = False + + End + Next - PW_Show=false + PW_Show=False - if app.which_window_TreatmentPlanning Then + If app.which_window_TreatmentPlanning Then + Window_Treatment.Save_Beams=False - end + + End End Sub #tag EndMethod @@ -1402,54 +1452,90 @@ Inherits Application // Update for new string delim // //----------------------------------- - Dim g,imageset,plans as FolderItem - Dim i,k,p as Integer - Dim name,temp as String - Dim exith as Boolean + //Dim g,imageset,plans As FolderItem + //Dim i,k,p As Integer + //Dim name,temp As String + //Dim exith As Boolean '==================Find Strings for folder listbox ' get McGill folder - g=gPref.mcgillfi - Break + Var g As FolderItem = gPref.mcgillfi - if g<>nil Then - for i =1 to g.count - name=g.item(i).name - if g.item(i).Visible and g.Item(i).directory=True and g.item(i).Locked=False Then + + If g <> Nil Then + + For i As Integer = 1 To g.Count + + Var name As String = g.item(i).name + + If g.item(i).Visible And g.Item(i).directory =True And g.item(i).Locked = False Then + + Var exith As Boolean = False // exit condition - exith=False // exit condition - While InStr(g.item(i).Name,"_")>0 and exith=False - temp=g.item(i).Name - g.item(i).Name=Replace(g.item(i).Name,"_",String_Separate) - if temp=g.item(i).Name Then - exith=True - end + While InStr(g.item(i).Name,"_")>0 And exith=False + + Var temp As String = g.item(i).Name + g.item(i).Name = Replace(g.item(i).Name,"_",String_Separate) + + If temp=g.item(i).Name Then + + exith =True + + End + Wend - imageset=g.Item(i) - if imageset<>nil Then - for k =1 to imageset.count + Var imageset As FolderItem = g.Item(i) + + If imageset<>Nil Then + + For k As Integer =1 To imageset.count + name=imageset.item(k).name - if imageset.item(k).Visible and imageset.item(k).Locked=False and imageset.item(k).Directory=True Then - While InStr(imageset.item(k).Name,"_")>0 + + If imageset.item(k).Visible And _ + imageset.item(k).Locked = False And _ + imageset.item(k).Directory = True Then + + While InStr(imageset.item(k).Name,"_") > 0 + imageset.item(k).Name=Replace(imageset.item(k).Name,"_",String_Separate) + Wend - plans=imageset.Item(k) - for p =1 to plans.count + + Var plans as FolderItem = imageset.Item(k) + + For p As Integer = 1 To plans.count + name=plans.item(p).name - if name<>"McGill_RT" and plans.Item(p).Visible and plans.Item(p).Locked=False and plans.Item(p).Directory=True Then - While InStr(plans.item(p).Name,"_")>0 + + If name<>"McGill_RT" And _ + plans.Item(p).Visible And _ + plans.Item(p).Locked = False And _ + plans.Item(p).Directory =True Then + + While InStr(plans.item(p).Name,"_") > 0 + plans.item(p).Name=Replace(plans.item(p).Name,"_",String_Separate) + Wend - end - next - end - next - end - end - next - end + + End + + Next + + End + + Next + + End + + End + + Next + + End MMCTP_WriteConfig End Sub @@ -1461,60 +1547,90 @@ Inherits Application // Write MMCTP Config file MMCTP-Settings // //------------------------------------- - Dim i as Integer - Dim f as FolderItem - Dim ts as TextOutputStream - Dim temp as String + //Dim i as Integer + //Dim f as FolderItem + //Dim ts as TextOutputStream + //Dim temp as String //------------------------------------- - f=gPref.Settings_fi + Var f As FolderItem = gPref.Settings_fi f=f.Child("MMCTP-Settings.txt") - if f.Exists Then + If f.Exists Then + f.Delete - end - - ts=f.CreateTextFile - i=0 - while ts=nil - ts=f.CreateTextFile - i=i+1 - if i>100 Then - Return - end - Wend + + End + + Var ts As TextOutputStream = TextOutputStream.Create(f) + + For j As Integer = 0 To 100 + + If ts = Nil Then + + ts =TextOutputStream.Create(f) + + Else + + Exit For + + End If + + Next + + If ts = Nil Then Return + + + Var Temp As String = Format(app.MajorVersion,"#")+"."+Format(app.MinorVersion,"#") - Temp=Format(app.MajorVersion,"#")+"."+Format(app.MinorVersion,"#") spaces(ts,"MMCTP-Version",31,temp) - if MC_Auto_Check Then + If MC_Auto_Check Then + Temp="yes" - else + + Else + Temp="no" - end + + End + spaces(ts,"Auto Check",31,temp) - spaces(ts,"Auto Timer",31,str(gTimer_Refresh.Check_Period)) - spaces(ts,"AutoRUNTIMER",31,str(gTimer_Run.Check_Period)) + spaces(ts,"Auto Timer",31,Str(gTimer_Refresh.Check_Period)) + spaces(ts,"AutoRUNTIMER",31,Str(gTimer_Run.Check_Period)) - if MC_Run_Logic Then + If MC_Run_Logic Then + Temp="yes" - else + + Else + Temp="no" - end + + End + spaces(ts,"MC Run Logic",31,temp) - for i =0 to UBound(gShells.Shells) - if gShells.Shells(i).online Then + For i As Integer = 0 To gShells.Shells.LastRowIndex + + If gShells.Shells(i).online Then + Temp="yes" - else + + Else + Temp="no" - end + + End + spaces(ts,"Shell Online "+gShells.Shells(i).title,31,temp) - next + + Next + ts.Close End Sub @@ -1526,19 +1642,24 @@ Inherits Application // // //------------------------------------ - Dim fi as FolderItem - Dim text as String - Dim ts as TextOutputStream + //Dim fi as FolderItem + //Dim text as String + //Dim ts as TextOutputStream //------------------------------------ - fi=gPref.Settings_fi - fi=fi.child(".llc") - if fi.Exists Then - fi.Delete - end - ts=fi.CreateTextFile() - ts.WriteLine fi.NativePath + Var f As FolderItem = gPref.Settings_fi.Child(".llc") + //f=f.child(".llc") + + If f.Exists Then + + f.Delete + + End + + Var ts As TextOutputStream = TextOutputStream.Create(f) + + ts.WriteLine(f.NativePath) ts.Close Window_Licence.Close End Sub diff --git a/Utility/Class_MMCTP_Timer_Download.xojo_code b/Utility/Class_MMCTP_Timer_Download.xojo_code index 1459080..acbd84e 100644 --- a/Utility/Class_MMCTP_Timer_Download.xojo_code +++ b/Utility/Class_MMCTP_Timer_Download.xojo_code @@ -28,14 +28,14 @@ Inherits Timer time=time+Format(seconds,"00.00") if app.which_window_shell Then - Window_Configurations_Shell.StaticText_Timer_FTP.Text=Time - Window_Configurations_Shell.StaticText_ShellDownLoadNum.Text="Number of files to transfer: "+str(UBound(MMCTP_Download.All)+1) + Window_Configurations_Shell.StaticText_Timer_FTP.value = Time + Window_Configurations_Shell.StaticText_ShellDownLoadNum.value = "Number of files to transfer: "+str(UBound(MMCTP_Download.All)+1) end // If current FTP download has exceeded time limit if Min>MMCTP_Download.Max_TimeStamp_FTP Then if app.which_window_shell Then - Window_Configurations_Shell.StaticText_Timer_FTP.Text="Max timeout exceeded ! "+Time + Window_Configurations_Shell.StaticText_Timer_FTP.value = "Max timeout exceeded ! "+Time end MMCTP_Download.All(0).started=False MMCTP_Download.Restart_Job @@ -57,9 +57,9 @@ Inherits Timer if UBound(MMCTP_Download.All)=-1 Then // Reset number of transfers if app.which_window_shell Then - Window_Configurations_Shell.StaticText_ShellDownLoadNum.Text="Number of files to transfer: "+str(UBound(MMCTP_Download.All)+1) - Window_Configurations_Shell.StaticText_FTP.Text="" - Window_Configurations_Shell.StaticText_FTP_Info.Text="" + Window_Configurations_Shell.StaticText_ShellDownLoadNum.value = "Number of files to transfer: "+str(UBound(MMCTP_Download.All)+1) + Window_Configurations_Shell.StaticText_FTP.value = "" + Window_Configurations_Shell.StaticText_FTP_Info.value = "" end diff --git a/Utility/Class_MMCTP_Timer_ProgressWindow.xojo_code b/Utility/Class_MMCTP_Timer_ProgressWindow.xojo_code index 2080e2a..e331ba2 100644 --- a/Utility/Class_MMCTP_Timer_ProgressWindow.xojo_code +++ b/Utility/Class_MMCTP_Timer_ProgressWindow.xojo_code @@ -21,7 +21,7 @@ Inherits Timer Window_Progress.Close ElseIf app.which_window_progress Then - Window_Progress.StaticText.Text=PW_StaticText + Window_Progress.StaticText.value = PW_StaticText Window_Progress.ProgressBar.Maximum=PW_Progress_Max Window_Progress.ProgressBar.Value=PW_Progress Window_Progress.ProgressBar.Refresh(False) diff --git a/Utility/Class_MMCTP_Timer_Refresh.xojo_code b/Utility/Class_MMCTP_Timer_Refresh.xojo_code index 2f2ae8b..f49bb64 100644 --- a/Utility/Class_MMCTP_Timer_Refresh.xojo_code +++ b/Utility/Class_MMCTP_Timer_Refresh.xojo_code @@ -34,7 +34,7 @@ Inherits Timer if app.which_window_shell Then - Window_Configurations_Shell.StaticText_Timer_refresh.Text=Time + Window_Configurations_Shell.StaticText_Timer_refresh.value = Time end // If current task has exceeded time limit @@ -42,7 +42,7 @@ Inherits Timer if (MMCTP_Shell_Refresh.All(0).FTP_Now and Min>MMCTP_Shell_Refresh.Max_TimeStamp_FTP) or _ (MMCTP_Shell_Refresh.All(0).FTP_Now=False and Min>MMCTP_Shell_Refresh.Max_TimeStamp_SSH) Then if app.which_window_shell Then - Window_Configurations_Shell.StaticText_Timer_refresh.Text="Max timeout exceeded ! "+Time + Window_Configurations_Shell.StaticText_Timer_refresh.value = "Max timeout exceeded ! "+Time end MMCTP_Shell_Refresh.All(0).started=False MMCTP_Shell_Refresh.Restart_Job diff --git a/Utility/Class_MMCTP_Timer_Run.xojo_code b/Utility/Class_MMCTP_Timer_Run.xojo_code index 79aa242..dd5091a 100644 --- a/Utility/Class_MMCTP_Timer_Run.xojo_code +++ b/Utility/Class_MMCTP_Timer_Run.xojo_code @@ -33,7 +33,7 @@ Inherits Timer if app.which_window_shell Then - Window_Configurations_Shell.StaticText_Timer_Run.Text=Time + Window_Configurations_Shell.StaticText_Timer_Run.value = Time end // If current task has exceeded time limit @@ -41,7 +41,7 @@ Inherits Timer if (MMCTP_Shell_Run.All(0).FTP_Now and Min>MMCTP_Shell_Run.Max_TimeStamp_FTP) or _ (MMCTP_Shell_Run.All(0).FTP_Now=False and Min>MMCTP_Shell_Run.Max_TimeStamp_SSH) Then if app.which_window_shell Then - Window_Configurations_Shell.StaticText_Timer_Run.Text="Max timeout exceeded ! "+Time + Window_Configurations_Shell.StaticText_Timer_Run.value = "Max timeout exceeded ! "+Time Window_Configurations_Shell.EditField_ShellRun.AppendText chr(13)+ "Max timeout exceeded ! "+Time+chr(13)+"Connection Closed"+chr(13) end MMCTP_Shell_Run.All(0).started=False diff --git a/Utility/Class_MMCTP_Timer_Windows.xojo_code b/Utility/Class_MMCTP_Timer_Windows.xojo_code index 65e1b36..4e719a0 100644 --- a/Utility/Class_MMCTP_Timer_Windows.xojo_code +++ b/Utility/Class_MMCTP_Timer_Windows.xojo_code @@ -45,7 +45,7 @@ Inherits Timer if Window_Treatment.StaticText_DVH.Text<>TP_DVH_Text Then - Window_Treatment.StaticText_DVH.Text=TP_DVH_Text + Window_Treatment.StaticText_DVH.value = TP_DVH_Text end if Window_Treatment.Canvas_refresh_Image_WL Then @@ -63,11 +63,11 @@ Inherits Timer end if UBound(gBEAM.egs_msg)>-1 Then - Window_Treatment.StaticText_BEAM_Status.Text=gBEAM.egs_msg(UBound(gBEAM.egs_msg)) + Window_Treatment.StaticText_BEAM_Status.value = gBEAM.egs_msg(UBound(gBEAM.egs_msg)) end if UBound(gDOSXYZ.egs_msg)>-1 Then - Window_Treatment.StaticText_DOSYXZ_Status.Text= gDOSXYZ.egs_msg(UBound(gDOSXYZ.egs_msg)) + Window_Treatment.StaticText_DOSYXZ_Status.value = gDOSXYZ.egs_msg(UBound(gDOSXYZ.egs_msg)) end if app.which_window_DOSYXZ_Options Then @@ -106,7 +106,7 @@ Inherits Timer end if app.which_window_adddose Then - Window_AddDose.StaticText1.Text=Window_AddDose.ProgressMsg + Window_AddDose.StaticText1.value = Window_AddDose.ProgressMsg if Window_AddDose.UpdateLists Then Window_AddDose.UpdateLists=False Window_AddDose.UpdateNow diff --git a/Utility/Shell_MMCTP_Download.xojo_code b/Utility/Shell_MMCTP_Download.xojo_code index d72e539..a0de2e3 100644 --- a/Utility/Shell_MMCTP_Download.xojo_code +++ b/Utility/Shell_MMCTP_Download.xojo_code @@ -115,9 +115,9 @@ Inherits Shell if app.which_window_shell Then - Window_Configurations_Shell.StaticText_FTP.Text=All(0).command - Window_Configurations_Shell.StaticText_Timer_FTP.Text="" - Window_Configurations_Shell.StaticText_FTP_Info.Text="Get file "+all(0).FTP_Files.name+" from "+ All(0).shell.machine+chr(13)+_ + Window_Configurations_Shell.StaticText_FTP.value = All(0).command + Window_Configurations_Shell.StaticText_Timer_FTP.value = "" + Window_Configurations_Shell.StaticText_FTP_Info.value = "Get file "+all(0).FTP_Files.name+" from "+ All(0).shell.machine+chr(13)+_ "Remote Directory " +all(0).FTP_Remote_Path+chr(13)+"Local Directory "+all(0).FTP_Local_Path @@ -127,16 +127,16 @@ Inherits Shell if All(0).vmc_download_d3d Then - Window_Treatment.StaticText_VMC_Status.Text="About to download "+all(0).inpfilename + Window_Treatment.StaticText_VMC_Status.value = "About to download "+all(0).inpfilename elseif all(0).dos_download_3ddose Then gdosxyz.egs_msg.append "About to download "+all(0).inpfilename elseif all(0).vmc_download_d3d Then - Window_Treatment.StaticText_vmc_Status.Text="About to download "+all(0).inpfilename + Window_Treatment.StaticText_vmc_Status.value = "About to download "+all(0).inpfilename elseif all(0).egs_download_egslst Then - Window_Treatment.StaticText_VMC_Status.Text="About to download "+all(0).inpfilename + Window_Treatment.StaticText_VMC_Status.value = "About to download "+all(0).inpfilename end @@ -243,8 +243,8 @@ Inherits Shell if app.which_window_shell Then - Window_Configurations_Shell.StaticText_FTP.Text="" - Window_Configurations_Shell.StaticText_Timer_FTP.Text="" + Window_Configurations_Shell.StaticText_FTP.value = "" + Window_Configurations_Shell.StaticText_Timer_FTP.value = "" end @@ -342,13 +342,13 @@ Inherits Shell elseif gg.vmc_download_d3d Then if bb Then - Window_Treatment.StaticText_VMC_Status.Text=gg.inpfilename+" dose file downloaded" + Window_Treatment.StaticText_VMC_Status.value = gg.inpfilename+" dose file downloaded" gVMC.VMC(gg.vmc_dmx_index).Write_VMC_Settings Window_Treatment.MC_vmc_beam_progress gVMC.VMC(gg.vmc_dmx_index).beams(gg.beam_num).downloaded_d3d=true else gVMC.VMC(gg.vmc_dmx_index).beams(gg.beam_num).downloaded_d3d=False - Window_Treatment.StaticText_VMC_Status.Text="Error : "+gg.inpfilename+" file not downloaded" + Window_Treatment.StaticText_VMC_Status.value = "Error : "+gg.inpfilename+" file not downloaded" end @@ -358,7 +358,7 @@ Inherits Shell elseif gg.vmc_download_hed Then if bb Then - Window_Treatment.StaticText_VMC_Status.Text=gg.inpfilename+" file downloaded" + Window_Treatment.StaticText_VMC_Status.value = gg.inpfilename+" file downloaded" if gVMC.auto_importD Then gVMC.AddDoseList.Append str(gg.vmc_dmx_index)+","+str(gg.beam_num)+Chr(10) gVMC.vmc_adddose=True @@ -376,7 +376,7 @@ Inherits Shell if UBound(gVMC.VMC)>=gg.vmc_dmx_index Then if UBound(gVMC.VMC(gg.vmc_dmx_index).BEAMS)>=gg.beam_num Then gVMC.VMC(gg.vmc_dmx_index).beams(gg.beam_num).downloaded_hed=False - Window_Treatment.StaticText_VMC_Status.Text="Error : "+gg.inpfilename+" file not downloaded" + Window_Treatment.StaticText_VMC_Status.value = "Error : "+gg.inpfilename+" file not downloaded" end end end @@ -399,8 +399,8 @@ Inherits Shell if app.which_window_shell Then - Window_Configurations_Shell.StaticText_FTP.Text="" - Window_Configurations_Shell.StaticText_Timer_FTP.Text="" + Window_Configurations_Shell.StaticText_FTP.value = "" + Window_Configurations_Shell.StaticText_Timer_FTP.value = "" end End Sub #tag EndMethod diff --git a/Utility/Shell_MMCTP_Refresh.xojo_code b/Utility/Shell_MMCTP_Refresh.xojo_code index e3dd2ed..84ef484 100644 --- a/Utility/Shell_MMCTP_Refresh.xojo_code +++ b/Utility/Shell_MMCTP_Refresh.xojo_code @@ -178,8 +178,8 @@ Inherits Shell me.Mode=2 if app.which_window_shell Then - Window_Configurations_Shell.StaticText_Task_Refresh.Text=All(0).command - Window_Configurations_Shell.StaticText_Timer_refresh.Text="" + Window_Configurations_Shell.StaticText_Task_Refresh.value = All(0).command + Window_Configurations_Shell.StaticText_Timer_refresh.value = "" end @@ -197,10 +197,10 @@ Inherits Shell gdosxyz.egs_msg.append "About to download "+all(0).inpfilename elseif all(0).vmc_refresh_d3d or all(0).vmc_refresh_pro Then - Window_Treatment.StaticText_vmc_Status.Text="Looking for "+all(0).inpfilename + Window_Treatment.StaticText_vmc_Status.value = "Looking for "+all(0).inpfilename elseif all(0).vmc_download_d3d Then - Window_Treatment.StaticText_vmc_Status.Text="About to download "+all(0).inpfilename + Window_Treatment.StaticText_vmc_Status.value = "About to download "+all(0).inpfilename end @@ -358,8 +358,8 @@ Inherits Shell if app.which_window_shell Then - Window_Configurations_Shell.StaticText_Task_Refresh.Text="" - Window_Configurations_Shell.StaticText_Timer_refresh.Text="" + Window_Configurations_Shell.StaticText_Task_Refresh.value = "" + Window_Configurations_Shell.StaticText_Timer_refresh.value = "" end End Sub #tag EndMethod @@ -428,8 +428,8 @@ Inherits Shell if app.which_window_shell Then Window_Configurations_Shell.EditField_ShellRefresh.AppendText s - Window_Configurations_Shell.StaticText_Task_Refresh.Text="" - Window_Configurations_Shell.StaticText_Timer_refresh.Text="" + Window_Configurations_Shell.StaticText_Task_Refresh.value = "" + Window_Configurations_Shell.StaticText_Timer_refresh.value = "" end @@ -460,7 +460,7 @@ Inherits Shell // Shell Test run complete //---------------------------------------- if gg.shell_Test Then - Window_Configurations_Shell.StaticText_ConnectionTest.Text="Connection ok" + Window_Configurations_Shell.StaticText_ConnectionTest.value = "Connection ok" //---------------------------------------------------------- // BEAMnrc Read the phase space file size @@ -866,7 +866,7 @@ Inherits Shell // VMC refresh d3d file //---------------------------------------------------------- ElseIf gg.vmc_refresh_d3d Then - Window_Treatment.StaticText_vmc_Status.Text="" + Window_Treatment.StaticText_vmc_Status.value = "" tmpstr=gg.OutPut //look for d3d file first if InStr(tmpstr,"No such file ")=0 Then @@ -883,7 +883,7 @@ Inherits Shell // VMC refresh progress file //---------------------------------------------------------- ElseIf gg.vmc_refresh_pro Then - Window_Treatment.StaticText_vmc_Status.Text="" + Window_Treatment.StaticText_vmc_Status.value = "" tmpstr=gg.OutPut if InStr(tmpstr,"No such file ")=0 Then @@ -951,10 +951,10 @@ Inherits Shell tmpstr=gg.OutPut if InStr(tmpstr,"error")=0 Then - Window_Treatment.StaticText_VMC_Status.Text=gg.inpfilename+ " job submitted" + Window_Treatment.StaticText_VMC_Status.value = gg.inpfilename+ " job submitted" gVMC.VMC(gg.vmc_dmx_index).BEAMS(gg.beam_num).vmc_started=True else - Window_Treatment.StaticText_VMC_Status.Text= "Error, "+gg.inpfilename+" job not submitted" + Window_Treatment.StaticText_VMC_Status.value = "Error, "+gg.inpfilename+" job not submitted" gVMC.VMC(gg.vmc_dmx_index).BEAMS(gg.beam_num).vmc_started=False end gVMC.VMC(gg.vmc_dmx_index).Write_VMC_Settings @@ -964,7 +964,7 @@ Inherits Shell // Cutout status refresh //---------------------------------------------------------- ElseIf gg.cutout_refresh Then - Window_Treatment.StaticText_Cutout_Status.Text="" + Window_Treatment.StaticText_Cutout_Status.value = "" s=gg.OutPut While InStr(s," ")>0 s=Replace(s," "," ") diff --git a/Utility/Shell_MMCTP_Run.xojo_code b/Utility/Shell_MMCTP_Run.xojo_code index b1f3fed..23cd881 100644 --- a/Utility/Shell_MMCTP_Run.xojo_code +++ b/Utility/Shell_MMCTP_Run.xojo_code @@ -200,9 +200,9 @@ Inherits Shell if app.which_window_shell Then - Window_Configurations_Shell.StaticText_ShellRunNum.Text="Number of tasks to run: "+str(UBound(All)+1) - Window_Configurations_Shell.StaticText_Task_Run.Text=All(0).command - Window_Configurations_Shell.StaticText_Timer_Run.Text="" + Window_Configurations_Shell.StaticText_ShellRunNum.value = "Number of tasks to run: "+str(UBound(All)+1) + Window_Configurations_Shell.StaticText_Task_Run.value = All(0).command + Window_Configurations_Shell.StaticText_Timer_Run.value = "" end @@ -436,9 +436,9 @@ Inherits Shell if gg.Shell_Test_FTP Then if transferyesno Then - Window_Configurations_Shell.StaticText_ConnectionTest_FTP.Text="ok" + Window_Configurations_Shell.StaticText_ConnectionTest_FTP.value = "ok" else - Window_Configurations_Shell.StaticText_ConnectionTest_FTP.Text="failed" + Window_Configurations_Shell.StaticText_ConnectionTest_FTP.value = "failed" end f=new FolderItem f=f.Child("MMCTP-FTP-Test") @@ -493,7 +493,7 @@ Inherits Shell ElseIf gg.egs_run_script Then // Remove beamnrc run script if transferyesno Then - Window_Treatment.StaticText_VMC_Status.Text="Input script file ("+gg.inpfilename+") uploaded to "+gg.shell.machine + Window_Treatment.StaticText_VMC_Status.value = "Input script file ("+gg.inpfilename+") uploaded to "+gg.shell.machine f=gRTOG.Plan(Plan_Index).Path f=f.Child("j"+MC_file_name+str(gg.beam_num+1)+"_run") if f.Exists Then @@ -530,8 +530,8 @@ Inherits Shell if app.which_window_shell Then - Window_Configurations_Shell.StaticText_Task_Run.Text="" - Window_Configurations_Shell.StaticText_Timer_Run.Text="" + Window_Configurations_Shell.StaticText_Task_Run.value = "" + Window_Configurations_Shell.StaticText_Timer_Run.value = "" end End Sub #tag EndMethod @@ -595,8 +595,8 @@ Inherits Shell if app.which_window_shell Then Window_Configurations_Shell.EditField_ShellRun.AppendText s - Window_Configurations_Shell.StaticText_Task_Run.Text="" - Window_Configurations_Shell.StaticText_Timer_Run.Text="" + Window_Configurations_Shell.StaticText_Task_Run.value = "" + Window_Configurations_Shell.StaticText_Timer_Run.value = "" end @@ -623,9 +623,9 @@ Inherits Shell //---------------------------------------- if gg.shell_Test Then if gg.command_done Then - Window_Configurations_Shell.StaticText_ConnectionTest.Text="Connection ok" + Window_Configurations_Shell.StaticText_ConnectionTest.value = "Connection ok" else - Window_Configurations_Shell.StaticText_ConnectionTest.Text="Connection NOT ok" + Window_Configurations_Shell.StaticText_ConnectionTest.value = "Connection NOT ok" end @@ -704,7 +704,7 @@ Inherits Shell else - Window_Treatment.StaticText_VMC_Status.Text="Error, "+gg.inpfilename+" job not submitted" + Window_Treatment.StaticText_VMC_Status.value = "Error, "+gg.inpfilename+" job not submitted" gBEAM.Beams(gg.beam_num).egs_BEAMnrc_started=False gBEAM.Beams(gg.beam_num).egs_BEAMnrc_active_jobs=0 end @@ -838,14 +838,14 @@ Inherits Shell tmpstr=gg.OutPut if InStr(tmpstr,"error")=0 and InStr(tmpstr,"No such file or directory")=0 Then - Window_Treatment.StaticText_VMC_Status.Text=gg.inpfilename+ " job submitted" + Window_Treatment.StaticText_VMC_Status.value = gg.inpfilename+ " job submitted" gVMC.VMC(gg.vmc_dmx_index).BEAMS(gg.beam_num).vmc_started=True gVMC.VMC(gg.vmc_dmx_index).BEAMS(gg.beam_num).start_Time=sysdate.AbbreviatedDate+" "+sysdate.LongTime gVMC.VMC(gg.vmc_dmx_index).BEAMS(gg.beam_num).start_Time_Seconds=sysdate.TotalSeconds else - Window_Treatment.StaticText_VMC_Status.Text= "Error, "+gg.inpfilename+" job not submitted" + Window_Treatment.StaticText_VMC_Status.value = "Error, "+gg.inpfilename+" job not submitted" gVMC.VMC(gg.vmc_dmx_index).BEAMS(gg.beam_num).vmc_started=False end gVMC.VMC(gg.vmc_dmx_index).Write_VMC_Settings @@ -860,12 +860,12 @@ Inherits Shell elseif gg.cutout_run Then tmpstr=gg.OutPut if InStr(tmpstr,"error")=0 Then - Window_Treatment.StaticText_Cutout_Status.Text=gg.inpfilename+ " job submitted" + Window_Treatment.StaticText_Cutout_Status.value = gg.inpfilename+ " job submitted" gCutout.Beams(gg.beam_num).Started=True //gBEAM.Beams(gg.beam_num).egs_BEAMnrc_active_jobs=gBEAM.Beams(gg.beam_num).egs_jobs gCutout.Beams(gg.beam_num).startdate=sysdate.AbbreviatedDate+" "+sysdate.LongTime else - Window_Treatment.StaticText_Cutout_Status.Text= "Error, "+gg.inpfilename+" job not submitted" + Window_Treatment.StaticText_Cutout_Status.value = "Error, "+gg.inpfilename+" job not submitted" gCutout.Beams(gg.beam_num).Started=False //gBEAM.Beams(gg.beam_num).egs_BEAMnrc_active_jobs=0 end diff --git a/Utility/Window_About.xojo_window b/Utility/Window_About.xojo_window index 18bdac1..7e5fc37 100644 --- a/Utility/Window_About.xojo_window +++ b/Utility/Window_About.xojo_window @@ -244,8 +244,8 @@ End #tag WindowCode #tag Event Function MouseDown(X As Integer, Y As Integer) As Boolean - me.close - me.hide + Me.close + Me.hide End Function #tag EndEvent @@ -253,7 +253,7 @@ End Sub Open() //----------------------------------------- - StaticText_BuildLabel.text="MMCTP built : "+str(app.MajorVersion)+"."+str(app.MinorVersion)+"."+str(app.BugVersion)+CHR(13)+"Build Date : "+app.BuildDate.ShortDate + StaticText_BuildLabel.Value="MMCTP built : "+str(app.MajorVersion)+"."+str(app.MinorVersion)+"."+str(app.BugVersion)+CHR(13)+"Build Date : "+app.BuildDate.ShortDate //set the credits to draw credits = credits + "MMCTP GUI conception: Andrew Alexander" + chr(13) @@ -350,7 +350,7 @@ End #tag Events StaticText_BuildLabel #tag Event Sub Open() - me.text=app.LongVersion + me.value=app.LongVersion End Sub #tag EndEvent #tag EndEvents diff --git a/Utility/Window_Configurations_Beam_Model.xojo_window b/Utility/Window_Configurations_Beam_Model.xojo_window index 6db46b4..618d92b 100644 --- a/Utility/Window_Configurations_Beam_Model.xojo_window +++ b/Utility/Window_Configurations_Beam_Model.xojo_window @@ -2767,12 +2767,12 @@ End // Clear forms if Name_Change=False Then - EditField_Linac_Name.Text="" - EditField_Linac_Energy.Text="" - EditField_Linac_BEAMnrc_INputfile.Text="" - EditField_Linac_App.Text="" - EditField_Linac_BEAMnrc_part_density.Text="" - EditField_Linac_BEAMnrc_pegs.Text="" + EditField_Linac_Name.value = "" + EditField_Linac_Energy.value = "" + EditField_Linac_BEAMnrc_INputfile.value = "" + EditField_Linac_App.value = "" + EditField_Linac_BEAMnrc_part_density.value = "" + EditField_Linac_BEAMnrc_pegs.value = "" end @@ -2859,12 +2859,12 @@ End Next if Name_Change =False Then - EditField_Linac_Name.Text=Linac.RT_name + EditField_Linac_Name.value = Linac.RT_name end - EditField_Linac_BEAMnrc_INputfile.Text=Linac.MC_BEAMnrc_input_file - EditField_Linac_Energy.Text=Linac.Energy - EditField_Linac_BEAMnrc_part_density.Text=Format(Linac.MC_BEAMnrc_part_density,"###,###,###") + EditField_Linac_BEAMnrc_INputfile.value = Linac.MC_BEAMnrc_input_file + EditField_Linac_Energy.value = Linac.Energy + EditField_Linac_BEAMnrc_part_density.value = Format(Linac.MC_BEAMnrc_part_density,"###,###,###") for i=1 to PopupMenu_Linac_Mode.ListCount if Linac.Mode=PopupMenu_Linac_Mode.List(i-1) Then @@ -2875,8 +2875,8 @@ End - EditField_Linac_BEAMnrc_pegs.Text=Linac.MC_BEAMnrc_pegs4 - EditField_Linac_Wedge_STT.Text=Linac.STT_Table + EditField_Linac_BEAMnrc_pegs.value = Linac.MC_BEAMnrc_pegs4 + EditField_Linac_Wedge_STT.value = Linac.STT_Table @@ -2927,10 +2927,10 @@ End Listbox_Linac_applicators.Heading(2)="BEAMnrc CM name" Listbox_Linac_applicators.Heading(3)="BEAMnrc CM label" - EditField_Linac_App.Text=str(UBound(Linac.Applicator)+1) + EditField_Linac_App.value = str(UBound(Linac.Applicator)+1) Linac_Applicator - EditField_Linac_Num_Wedge.Text=str(UBound(Linac.Wedges)+1) + EditField_Linac_Num_Wedge.value = str(UBound(Linac.Wedges)+1) Linac_Pop_PhotonWedges PopupMenu_Linac_Wedge.ListIndex=0 end @@ -3044,12 +3044,12 @@ End DoNothing=True if MLC_Edit=False Then - EditField_MLC_Name.Text=mlc.MLC_Name + EditField_MLC_Name.value = mlc.MLC_Name end - EditField_MLC_Numberofpairs.Text=str(MLC.NumberofLeafPairs) - EditField_MLC_SourceDistance.Text=Format(MLC.Source_to_Device_Distance,"-#.#####") - EditField_MLC_AirGap.Text=Format(MLC.AbuttingGap,"-#.######") + EditField_MLC_Numberofpairs.value = str(MLC.NumberofLeafPairs) + EditField_MLC_SourceDistance.value = Format(MLC.Source_to_Device_Distance,"-#.#####") + EditField_MLC_AirGap.value = Format(MLC.AbuttingGap,"-#.######") if MLC.LeafDirection=1 Then RadioButton_MLC_Y.Value=True @@ -3221,7 +3221,7 @@ End if fi<>nil then //fi.Exists then Linac.MC_BEAMnrc_input_file=fi.Name save_linac=True - me.Text=fi.Name + me.value = fi.Name end if end End Function @@ -3300,9 +3300,9 @@ End w=me.ListIndex if w>=0 and w<=UBound(Linac.Wedges) Then - EditField_Linac_Wedge_Orientations.Text=str(UBound(Linac.Wedges(w).Rotations)+1) + EditField_Linac_Wedge_Orientations.value = str(UBound(Linac.Wedges(w).Rotations)+1) if Linac_Wedge_Edit=False Then - EditField_Linac_Wedge_Angle.Text=Linac.Wedges(w).Angle + EditField_Linac_Wedge_Angle.value = Linac.Wedges(w).Angle end Linac_Pop_PhotonWedgesOri end @@ -3677,7 +3677,7 @@ End end if - me.Text=Linac.STT_Table + me.value = Linac.STT_Table end diff --git a/Utility/Window_Configurations_BeamnrcSettings.xojo_window b/Utility/Window_Configurations_BeamnrcSettings.xojo_window index 2d27725..3cd9528 100644 --- a/Utility/Window_Configurations_BeamnrcSettings.xojo_window +++ b/Utility/Window_Configurations_BeamnrcSettings.xojo_window @@ -847,23 +847,23 @@ End DoNothing=True if gBEAM<> nil Then - EditField_BEAM_MinNumJobs.Text=Format(gBEAM.egs_Min_Num_Jobs,"#.##") - EditField_BEAMnrc_NumJobs.Text=Format(gBEAM.egs_Num_Jobs,"#.##") + EditField_BEAM_MinNumJobs.value = Format(gBEAM.egs_Min_Num_Jobs,"#.##") + EditField_BEAMnrc_NumJobs.value = Format(gBEAM.egs_Num_Jobs,"#.##") CheckBox_Beam_auto.Value=gBEAM.egs_auto_run CheckBox_Beam_refresh.Value=gBEAM.egs_auto_refresh CheckBox_Beam_ForceAddphsp.Value=gBEAM.egs_force_addphsp - EditField_BEAMnrc_Force_AddPhsp.Text=Format(gBEAM.egs_force_addphsp_value,"#.##") + EditField_BEAMnrc_Force_AddPhsp.value = Format(gBEAM.egs_force_addphsp_value,"#.##") CheckBox_Beam_Addphsp.Value=gBEAM.egs_Addphsp_fullpath CheckBox_Beam_MC_BEAM_remove_w.Value=gBEAM.Remove_w_files CheckBox_MC_Beam_auto_Shell.Value=gBEAM.egs_auto_shell CheckBox_MC_Beam_auto_Phsp.Value=Not(gBEAM.egs_auto_phsp) - EditField_BEAM_defaultIDAT.Text=Format(gBEAM.egs_idat,"-#") - EditField_BEAM_defaultIZLAST.Text=Format(gBEAM.egs_izlast,"-#") + EditField_BEAM_defaultIDAT.value = Format(gBEAM.egs_idat,"-#") + EditField_BEAM_defaultIZLAST.value = Format(gBEAM.egs_izlast,"-#") CheckBox_MC_Beam_auto_job_num.Value=gBEAM.egs_automaxjob - EditField_BEAM_Autojobtime.Text=str(gBEAM.egs_automaxjobtime,"#") + EditField_BEAM_Autojobtime.value = str(gBEAM.egs_automaxjobtime,"#") for i =0 to UBound(gBEAM.egs_msg) - TextArea_msg.Text=TextArea_msg.Text+gBEAM.egs_msg(i)+EndOfLine.UNIX + TextArea_msg.value = TextArea_msg.Text+gBEAM.egs_msg(i)+EndOfLine.UNIX Next else GroupBox_MC_Beam.Enabled=False diff --git a/Utility/Window_Configurations_CTModels.xojo_window b/Utility/Window_Configurations_CTModels.xojo_window index e1c54bc..b9c47fc 100644 --- a/Utility/Window_Configurations_CTModels.xojo_window +++ b/Utility/Window_Configurations_CTModels.xojo_window @@ -372,7 +372,6 @@ Begin Window Window_Configurations_CTModels LockLeft = False LockRight = False LockTop = False - MenuValue = "0" Scope = 0 TabIndex = 2 TabPanelIndex = 0 @@ -527,16 +526,19 @@ End #tag Method, Flags = &h0 Sub CT_Open() - DIm i as Integer + 'DIm i as Integer - DoNothing=True + DoNothing =True PopupMenu_CT_Model.DeleteAllRows - for i =0 to UBound(gCT.All_CT) - PopupMenu_CT_Model.AddRow gCT.All_CT(i).Model_name + For i As Integer =0 To gCT.All_CT.LastRowIndex + + PopupMenu_CT_Model.AddRow( gCT.All_CT(i).Model_name ) + Next + PopupMenu_CT_Model.AddRow "Add new model" - PopupMenu_CT_Model.ListIndex=0 + PopupMenu_CT_Model.SelectedRowIndex = 0 Listbox_CT_Materials.Heading(0)="Material" @@ -553,67 +555,70 @@ End #tag Method, Flags = &h0 Sub CT_Popup() - Dim i as Integer - Dim ff as Boolean - Dim snew as Class_CT2Density + 'Dim i as Integer + 'Dim ff as Boolean + 'Dim snew as Class_CT2Density - DoNothing=True + DoNothing = True - ff=False + Var ff As Boolean = False - for i =0 to UBound(gCT.All_CT) - if PopupMenu_CT_Model.Text= gCT.All_CT(i).Model_name Then + For i As Integer = 0 To gCT.All_CT.LastRowIndex + + If PopupMenu_CT_Model.SelectedRowValue = gCT.All_CT(i).Model_name Then + CT_Model= gCT.All_CT(i) ff=True - end + + End + Next - if ff=False Then - snew=new Class_CT2Density + If ff = False Then + Var snew As New Class_CT2Density snew.Model_name= "New model" - gCT.All_CT.Append snew + gCT.All_CT.AddRow( snew ) CT_Open CT_Popup Return - end - - - if Name_Change=False Then - EditField_CT_Name.Text=CT_Model.Model_name - end - - EditField_CT_Pegs.Text=CT_Model.Pegs_file - EditField_CT_Material_Num.Text=str(UBound(CT_Model.CalibrationM)+1) + End + If Name_Change = False Then + + EditField_CT_Name.value = CT_Model.Model_name + + End - Listbox_CT_Materials.DeleteAllRows + EditField_CT_Pegs.value = CT_Model.Pegs_file + EditField_CT_Material_Num.value = Str(CT_Model.CalibrationM.LastRowIndex + 1) + Listbox_CT_Materials.RemoveAllRows - for i=0 to UBound(CT_Model.CalibrationM) - Listbox_CT_Materials.AddRow CT_Model.CalibrationM(i).M_name - Listbox_CT_Materials.Cell(i,1)= Format(CT_Model.CalibrationM(i).HU_l,"-#.#") - Listbox_CT_Materials.Cell(i,2) =Format(CT_Model.CalibrationM(i).HU_h,"-#.#") - Listbox_CT_Materials.Cell(i,3) =Format(CT_Model.CalibrationM(i).p_l,"-#.#####") - Listbox_CT_Materials.Cell(i,4) =Format(CT_Model.CalibrationM(i).p_h,"-#.#####") + For i As Integer = 0 To CT_Model.CalibrationM.LastRowIndex + Listbox_CT_Materials.AddRow( CT_Model.CalibrationM(i).M_name ) + Listbox_CT_Materials.CellValueAt(i, 1) = Format(CT_Model.CalibrationM(i).HU_l,"-#.#") + Listbox_CT_Materials.CellValueAt(i, 2) = Format(CT_Model.CalibrationM(i).HU_h,"-#.#") + Listbox_CT_Materials.CellValueAt(i, 3) = Format(CT_Model.CalibrationM(i).p_l,"-#.#####") + Listbox_CT_Materials.CellValueAt(i, 4) = Format(CT_Model.CalibrationM(i).p_h,"-#.#####") - next + Next - Listbox_CT_Materials.ColumnType(0)=3 - Listbox_CT_Materials.ColumnType(1)=3 - Listbox_CT_Materials.ColumnType(2)=3 - Listbox_CT_Materials.ColumnType(3)=3 - Listbox_CT_Materials.ColumnType(4)=3 + Listbox_CT_Materials.ColumnTypeAt(0) = Listbox.CellTypes.TextField + Listbox_CT_Materials.ColumnTypeAt(1) = Listbox.CellTypes.TextField + Listbox_CT_Materials.ColumnTypeAt(2) = Listbox.CellTypes.TextField + Listbox_CT_Materials.ColumnTypeAt(3) = Listbox.CellTypes.TextField + Listbox_CT_Materials.ColumnTypeAt(4) = Listbox.CellTypes.TextField - DoNothing=False + DoNothing = False End Sub #tag EndMethod @@ -733,52 +738,72 @@ End #tag Events EditField_CT_Material_Num #tag Event Sub TextChange() - Dim i,num as Integer - - if DoNothing=False Then - num=val(me.Text) + If DoNothing = False Then + + If Me.Value.ToInteger > 20 Then Me.Value = "20" - ReDim CT_Model.CalibrationM(num-1) + CT_Model.CalibrationM.ResizeTo( Me.Value.ToInteger - 1 ) - for i=0 to UBound(CT_Model.CalibrationM) - if CT_Model.CalibrationM(i)=nil Then - CT_Model.CalibrationM(i)=new Class_CT_Materials - end - next + For i As Integer = 0 To CT_Model.CalibrationM.LastRowIndex + + If CT_Model.CalibrationM(i)=Nil Then + + CT_Model.CalibrationM(i) = New Class_CT_Materials + End + Next Save_Model=True CT_Popup - end + End + End Sub + #tag EndEvent + #tag Event + Function KeyDown(Key As String) As Boolean + Return General_Module.Accept_Real_Numbers(Key) + + End Function + #tag EndEvent + #tag Event + Sub KeyUp(Key As String) + End Sub #tag EndEvent #tag EndEvents #tag Events Listbox_CT_Materials #tag Event Sub CellTextChange(row as Integer, column as Integer) - Dim i as Integer - Dim temp as String + 'Dim i As Integer + 'Dim temp as String - if DoNothing=False Then - temp=Trim(me.Cell(row,column)) + If DoNothing = False Then + Var temp As String = Me.CellValueAt(row,column).Trim - if column=0 Then + If column = 0 Then + + CT_Model.CalibrationM(row).M_name = Temp.Trim - CT_Model.CalibrationM(row).M_name=Trim(temp) + Elseif column=1 Then - elseif column=1 Then - CT_Model.CalibrationM(row).HU_l=val(temp) + CT_Model.CalibrationM(row).HU_l = Temp.Trim.ToDouble + Me.CellValueAt( row, column) = CT_Model.CalibrationM(row).HU_l.ToText - elseif column=2 Then - CT_Model.CalibrationM(row).HU_h=val(temp) + Elseif column=2 Then - elseif column=3 Then - CT_Model.CalibrationM(row).p_l=val(temp) + CT_Model.CalibrationM(row).HU_h = Temp.Trim.ToDouble - elseif column=4 Then - CT_Model.CalibrationM(row).p_h=val(temp) - end + Elseif column=3 Then + + CT_Model.CalibrationM(row).p_l = Temp.Trim.ToDouble + + Elseif column=4 Then + + CT_Model.CalibrationM(row).p_h = Temp.Trim.ToDouble + + End Save_Model=True - end + + End + Me.InvalidateCell(row, column) End Sub #tag EndEvent #tag EndEvents @@ -801,20 +826,19 @@ End #tag Events PopupMenu_CT_Model #tag Event Sub Change() - Dim i as Integer - Dim snew as Class_CT2Density + 'Dim i as Integer + 'Dim snew as Class_CT2Density + + If DoNothing Then Return - if DoNothing=True Then - Return - end - if PopupMenu_CT_Model.Text="Add new model" Then - snew = new Class_CT2Density + If PopupMenu_CT_Model.SelectedRowValue = "Add new model" Then + Var snew As New Class_CT2Density snew.Model_name= "New model" - gCT.All_CT.Append snew + gCT.All_CT.AddRow( snew ) CT_Open - PopupMenu_CT_Model.ListIndex=PopupMenu_CT_Model.ListCount-2 - end + PopupMenu_CT_Model.SelectedRowIndex = PopupMenu_CT_Model.RowCount - 2 + End CT_Popup diff --git a/Utility/Window_Configurations_DOSXYZnrcSettings.xojo_window b/Utility/Window_Configurations_DOSXYZnrcSettings.xojo_window index ea07fea..3ca1148 100644 --- a/Utility/Window_Configurations_DOSXYZnrcSettings.xojo_window +++ b/Utility/Window_Configurations_DOSXYZnrcSettings.xojo_window @@ -1278,12 +1278,12 @@ End Listbox_MC_DOS_Egsphant.AddRow "Resolution Z (cm)" Listbox_MC_DOS_Egsphant.AddRow "Auto Make" - EditField_DOSXYZnrc_Error.Text=Format(gDOSXYZ.dosxyz_desired_average_error,"#.##") - EditField_DOSxyz_NumJobs.Text=Format(gDOSXYZ.dosxyz_desired_number_of_Jobs,"#") - EditField_DOSxyz_defaultSource.Text=Format(gDOSXYZ.dosxyz_defaultsource,"#") + EditField_DOSXYZnrc_Error.value = Format(gDOSXYZ.dosxyz_desired_average_error,"#.##") + EditField_DOSxyz_NumJobs.value = Format(gDOSXYZ.dosxyz_desired_number_of_Jobs,"#") + EditField_DOSxyz_defaultSource.value = Format(gDOSXYZ.dosxyz_defaultsource,"#") CheckBox_MC_DOS_autojob.Value=gDOSXYZ.dosxyz_autojobtimer - EditField_DOSxyz_autojobtime.Text=Format(gDOSXYZ.dosxyz_autojobtimer_sec,"#") + EditField_DOSxyz_autojobtime.value = Format(gDOSXYZ.dosxyz_autojobtimer_sec,"#") CheckBox_DOSXYZ_Auto.Value=gDOSXYZ.dosxyz_auto_run CheckBox_DOSXYZ_Refresh.Value=gDOSXYZ.dosxyz_auto_refresh @@ -1297,9 +1297,9 @@ End CheckBox_MC_DOS_Zero.Value=gDOSXYZ.Zero_Dose - EditField_DOSxyz_Numtest_hist.Text=Format(gDOSXYZ.dosxyz_test_histories,"#") - EditField_DOSxyz_MinNumJobs.Text=Format(gDOSXYZ.dosxyz_min_number_of_Jobs,"#") - EditField_DOSxyz_defaultIDAT.Text=Format(gDOSXYZ.dosxyz_defaultIDAT,"#") + EditField_DOSxyz_Numtest_hist.value = Format(gDOSXYZ.dosxyz_test_histories,"#") + EditField_DOSxyz_MinNumJobs.value = Format(gDOSXYZ.dosxyz_min_number_of_Jobs,"#") + EditField_DOSxyz_defaultIDAT.value = Format(gDOSXYZ.dosxyz_defaultIDAT,"#") if gDOSXYZ.dosxyz_defaultsource20_as_phasespace =False Then diff --git a/Utility/Window_Configurations_Shell.xojo_window b/Utility/Window_Configurations_Shell.xojo_window index 60e76fd..a424174 100644 --- a/Utility/Window_Configurations_Shell.xojo_window +++ b/Utility/Window_Configurations_Shell.xojo_window @@ -4013,15 +4013,15 @@ End DoNothing=True if UBound(MMCTP_Shell_Refresh.All)>-1 Then - StaticText_Task_Refresh.Text=MMCTP_Shell_Refresh.All(0).command + StaticText_Task_Refresh.value = MMCTP_Shell_Refresh.All(0).command end if UBound(MMCTP_Shell_Run.All)>-1 Then - StaticText_Task_Run.Text=MMCTP_Shell_Run.All(0).command + StaticText_Task_Run.value = MMCTP_Shell_Run.All(0).command end - EditField_ShellRefresh.Text=MMCTP_Shell_Refresh.Total_Output - EditField_ShellRun.Text=MMCTP_Shell_Run.Total_Output + EditField_ShellRefresh.value = MMCTP_Shell_Refresh.Total_Output + EditField_ShellRun.value = MMCTP_Shell_Run.Total_Output Login_Open DoNothing=False @@ -4051,8 +4051,8 @@ End PopupMenu_Batch.AddRow "slurm" - EditField_plink.Text=gShells.Plink - EditField_pscp.Text=gShells.pscp + EditField_plink.value = gShells.Plink + EditField_pscp.value = gShells.pscp @@ -4063,29 +4063,33 @@ End #tag Method, Flags = &h0 Sub Login_Popup() - //----------------------------------- - // - // - //----------------------------------- - Dim i as Integer - Dim ff as Boolean - Dim snew as Class_Shell_One - //----------------------------------- + '//----------------------------------- + '// + '// + '//----------------------------------- + 'Dim i as Integer + 'Dim ff as Boolean + 'Dim snew as Class_Shell_One + '//----------------------------------- - DoNothing=True - ff=False + DoNothing = True + Var ff As Boolean = False - for i =0 to UBound(gShells.shells) - if PopupMenu_Shell.Text= gShells.shells(i).title Then + For i As Integer = 0 To gShells.shells.LastRowIndex + + If PopupMenu_Shell.SelectedRowValue = gShells.shells(i).title Then + ss= gShells.shells(i) - ff=True - end + ff = True + + End Next - if ff=False Then - snew=new Class_Shell_One + If ff = False Then + + Var snew As New Class_Shell_One snew.title= "New Shell" gShells.Shells.Append snew Login_Open @@ -4095,89 +4099,125 @@ End save_linac=True Save_Login=True Return - end + End - CheckBox_Shell_Online.Value=ss.online + CheckBox_Shell_Online.Value = ss.online - EditField_logintext.text= ss.login + EditField_logintext.Value = ss.login - EditField_MC_BEAMnrc_Version.Text=ss.Beamnrc_v - EditField_machinetext.text= ss.machine - EditField_passwordtext.text= ss.password - EditField_linefeed.Text=ss.linefeed - EditField_egsnrc_folder.Text=ss.egsnrc_folder_path - EditField_listfiles.Text=ss.listfiles - EditField_ftpLF.Text=ss.ftplinefeed + EditField_MC_BEAMnrc_Version.value = ss.Beamnrc_v + EditField_machinetext.value = ss.machine + EditField_passwordtext.value = ss.password + EditField_linefeed.value = ss.linefeed + EditField_egsnrc_folder.value = ss.egsnrc_folder_path + EditField_listfiles.value = ss.listfiles + EditField_ftpLF.value = ss.ftplinefeed - if ss.batch="at" Then - PopupMenu_Batch.ListIndex=0 - elseif ss.batch="nqs" Then - PopupMenu_Batch.ListIndex=1 - elseif ss.batch="moab" Then - PopupMenu_Batch.ListIndex=2 - elseif ss.batch="keg" Then - PopupMenu_Batch.ListIndex=3 - elseif ss.batch="pbs" Then - PopupMenu_Batch.ListIndex=4 - elseif ss.batch="slurm" Then - PopupMenu_Batch.ListIndex=5 - end + If ss.batch="at" Then + + PopupMenu_Batch.SelectedRowIndex = 0 + + Elseif ss.batch="nqs" Then + + PopupMenu_Batch.SelectedRowIndex=1 + + Elseif ss.batch="moab" Then + + PopupMenu_Batch.SelectedRowIndex=2 + + Elseif ss.batch="keg" Then + + PopupMenu_Batch.SelectedRowIndex=3 + + Elseif ss.batch="pbs" Then + + PopupMenu_Batch.SelectedRowIndex=4 + + Elseif ss.batch="slurm" Then + + PopupMenu_Batch.SelectedRowIndex=5 + + End - if Name_Change=False Then - Editfield_Shell_title.Text=ss.title - end - EditField_vmc_exe.Text=ss.vmc_path - EditField_vmc_folder.Text=ss.vmc_folder - EditField_bash.Text=ss.bash - EditField_listfile_name.Text=str(ss.listfiles_name) - EditField_listfiles_size.Text=str(ss.listfiles_column_num) - EditField_listfiles_dateA.Text=str(ss.listfiles_dateA) - EditField_listfiles_dateb.Text=str(ss.listfiles_dateB) + If Name_Change = False Then + + Editfield_Shell_title.value = ss.title + + End - EditField_listfiles_time.Text=str(ss.listfiles_time) + EditField_vmc_exe.value = ss.vmc_path + EditField_vmc_folder.value = ss.vmc_folder + EditField_bash.value = ss.bash + EditField_listfile_name.value = str(ss.listfiles_name) + EditField_listfiles_size.value = str(ss.listfiles_column_num) + EditField_listfiles_dateA.value = str(ss.listfiles_dateA) + EditField_listfiles_dateb.value = str(ss.listfiles_dateB) - EditField_tail_c.Text=ss.tail_c - EditField_tail_after.Text=ss.tail_after + EditField_listfiles_time.value = str(ss.listfiles_time) - EditField_MC_jobs.Text=str(ss.MaxJobs) - if ss.OS=1 Then - RadioButton_Mac.Value=True - elseif ss.OS=2 Then - RadioButton_Linux.Value=True - else - RadioButton_PC.Value=True - end + EditField_tail_c.value = ss.tail_c + EditField_tail_after.value = ss.tail_after - if ss.File_Transfer_Index=0 Then - RadioButton_FTP.Value=True - else - RadioButton_SCP.Value=True - end + EditField_MC_jobs.value = Str(ss.MaxJobs) - EditField_NumberofQueues.Text=str(UBound(ss.Queue)+1) + Select Case ss.Os + Case 1 + + RadioButton_Mac.Value = True + + Case 2 + + RadioButton_Linux.Value = True + + Else + + RadioButton_PC.Value = True + + End Select - PopupMenu_Shell_Queue.DeleteAllRows - for i=0 to UBound(ss.Queue) - PopupMenu_Shell_Queue.AddRow ss.Queue(i)+" - "+Str(ss.QueueTime(i)) - next - PopupMenu_Shell_Queue.ListIndex=0 + If ss.File_Transfer_Index = 0 Then + + RadioButton_FTP.Value = True + + Else + + RadioButton_SCP.Value = True + + End - i=PopupMenu_Shell_Queue.ListIndex - if Name_Change=False Then - if i>=0 and i<= UBound(ss.Queue) Then - EditField_QueueName.Text=ss.Queue(i) - EditField_QueueName1.Text=Str(ss.QueueTime(i)) + EditField_NumberofQueues.value = Str(ss.Queue.LastRowIndex + 1) + + PopupMenu_Shell_Queue.RemoveAllRows + + For i As Integer = 0 To ss.Queue.LastRowIndex + + PopupMenu_Shell_Queue.AddRow( _ + ss.Queue(i)+" - " +ss.QueueTime(i).ToString) + + Next + + PopupMenu_Shell_Queue.SelectedRowIndex = 0 + + If Name_Change = False Then + + If PopupMenu_Shell_Queue.SelectedRowIndex >= 0 And _ + PopupMenu_Shell_Queue.SelectedRowIndex <= ss.Queue.LastRowIndex Then + EditField_QueueName.value = ss.Queue( _ + PopupMenu_Shell_Queue.SelectedRowIndex) + EditField_QueueName1.value = ss.QueueTime( _ + PopupMenu_Shell_Queue.SelectedRowIndex).ToString - else - EditField_QueueName.Text="" - EditField_QueueName1.Text="" + Else - end - end - DoNothing=False + EditField_QueueName.value = "" + EditField_QueueName1.value = "" + + End + End + DoNothing = False End Sub #tag EndMethod @@ -4227,7 +4267,7 @@ End #tag Events PushButton_Clear_Refresh #tag Event Sub Action() - EditField_ShellRefresh.Text="" + EditField_ShellRefresh.value = "" MMCTP_Shell_Refresh.Total_Output="" End Sub @@ -4255,23 +4295,28 @@ End #tag Events PopupMenu_Shell #tag Event Sub Change() - Dim i as Integer - Dim snew as Class_Shell_One + 'Dim i as Integer + 'Dim snew as Class_Shell_One - if DoNothing=True Then + If DoNothing Then + Return - end + + End - if PopupMenu_Shell.Text="Add new Shell" Then - snew = new Class_Shell_One + If PopupMenu_Shell.SelectedRowValue = "Add new Shell" Then + + Var snew As New Class_Shell_One snew.title= "New Shell" - gShells.Shells.Append snew + gShells.Shells.AddRow( snew ) Login_Open gLinacs.Update_Shells_Add - PopupMenu_Shell.ListIndex=PopupMenu_Shell.ListCount-2 + PopupMenu_Shell.SelectedRowIndex = PopupMenu_Shell.RowCount - 2 Save_Login=True save_linac=True - end + + End + Login_Popup End Sub #tag EndEvent @@ -4471,7 +4516,7 @@ End #tag Events PushButton_ConnectionTest #tag Event Sub Action() - StaticText_ConnectionTest.Text="" + StaticText_ConnectionTest.value = "" cc= new Class_MMCTP_Commands cc.shell=ss cc.command="ls" @@ -4603,7 +4648,7 @@ End - StaticText_ConnectionTest_FTP.Text="" + StaticText_ConnectionTest_FTP.value = "" cc= new Class_MMCTP_Commands cc.shell=ss cc.Shell_Test_FTP=True @@ -4634,8 +4679,8 @@ End if Name_Change=False Then i=me.ListIndex if i>=0 and i<= UBound(ss.Queue) Then - EditField_QueueName.Text=ss.Queue(i) - EditField_QueueName1.Text=Str(ss.QueueTime(i)) + EditField_QueueName.value = ss.Queue(i) + EditField_QueueName1.value = Str(ss.QueueTime(i)) end end @@ -4786,7 +4831,7 @@ End #tag Events PushButton_ClearFTP #tag Event Sub Action() - EditField_ShellFTP.Text="" + EditField_ShellFTP.value = "" MMCTP_Download.Total_Output="" End Sub #tag EndEvent @@ -4802,7 +4847,7 @@ End #tag Events PushButton_Clear_Run #tag Event Sub Action() - EditField_ShellRun.Text="" + EditField_ShellRun.value = "" MMCTP_Shell_Run.Total_Output="" End Sub #tag EndEvent diff --git a/Utility/Window_Configurations_TPS_System.xojo_window b/Utility/Window_Configurations_TPS_System.xojo_window index 18d1d71..cc28a66 100644 --- a/Utility/Window_Configurations_TPS_System.xojo_window +++ b/Utility/Window_Configurations_TPS_System.xojo_window @@ -3081,8 +3081,8 @@ End DoNothing=True CheckBox_auto_Check.Value=MC_Auto_Check CheckBox_auto_Run.Value=MC_Run_Logic - EditField_AutoCheck.Text=str(gTimer_Refresh.Check_Period/(60*1000)) - EditField_AutoRun.Text=str(gTimer_Run.Check_Period/(60*1000)) + EditField_AutoCheck.value = str(gTimer_Refresh.Check_Period/(60*1000)) + EditField_AutoRun.value = str(gTimer_Run.Check_Period/(60*1000)) Update_Preferences CheckBox_McGillRTDoseload.Value=gPref.McGillRT_Dose_Skip CheckBox_McGillRTProfileLoad.Value=gPref.McGillRT_Profile_Skip @@ -3096,14 +3096,14 @@ End Sub Constructor() // Calling the overridden superclass constructor. Super.Constructor - TextField_McRT.Text=gPref.mcgillfi.ShellPath - TextField_DICOM.Text=gPref.DICOMfi.ShellPath - TextField_CADPLAN.Text=gPref.cadplanfi.ShellPath - TextField_RTOG.Text=gPref.rtogfi.ShellPath - TextField_BEAMnrc.Text=gPref.BEAMnrc_fi.ShellPath - TextField_VMC.Text=gPref.VMC_fi.ShellPath - TextField_Commission.Text=gPref.Commission_fi.ShellPath - TextField_McGillCutout.Text=gPref.McGillCUtout.ShellPath + TextField_McRT.value = gPref.mcgillfi.ShellPath + TextField_DICOM.value = gPref.DICOMfi.ShellPath + TextField_CADPLAN.value = gPref.cadplanfi.ShellPath + TextField_RTOG.value = gPref.rtogfi.ShellPath + TextField_BEAMnrc.value = gPref.BEAMnrc_fi.ShellPath + TextField_VMC.value = gPref.VMC_fi.ShellPath + TextField_Commission.value = gPref.Commission_fi.ShellPath + TextField_McGillCutout.value = gPref.McGillCUtout.ShellPath if gPref.endian Then RadioButton_Endian_little.Value=True @@ -3191,7 +3191,7 @@ End else CheckBox_Stat_Sparing.Value=True end - TextField_Stat_SparingDose.Text=Format(gDoseStats.spin_dose,"-#.#####e") + TextField_Stat_SparingDose.value = Format(gDoseStats.spin_dose,"-#.#####e") for i=0 to UBound(gDoseStats.DoseVolume) @@ -3310,14 +3310,14 @@ End #tag Method, Flags = &h0 Sub Update_Preferences() - TextField_McRT.Text=gPref.mcgillfi.ShellPath - TextField_DICOM.Text=gPref.DICOMfi.ShellPath - TextField_CADPLAN.Text=gPref.cadplanfi.ShellPath - TextField_RTOG.Text=gPref.rtogfi.ShellPath - TextField_BEAMnrc.Text=gPref.BEAMnrc_fi.ShellPath - TextField_VMC.Text=gPref.VMC_fi.ShellPath - TextField_Commission.Text=gPref.Commission_fi.ShellPath - TextField_McGillCutout.Text=gPref.McGillCUtout.ShellPath + TextField_McRT.value = gPref.mcgillfi.ShellPath + TextField_DICOM.value = gPref.DICOMfi.ShellPath + TextField_CADPLAN.value = gPref.cadplanfi.ShellPath + TextField_RTOG.value = gPref.rtogfi.ShellPath + TextField_BEAMnrc.value = gPref.BEAMnrc_fi.ShellPath + TextField_VMC.value = gPref.VMC_fi.ShellPath + TextField_Commission.value = gPref.Commission_fi.ShellPath + TextField_McGillCutout.value = gPref.McGillCUtout.ShellPath if gPref.endian Then RadioButton_Endian_little.Value=True @@ -3326,7 +3326,7 @@ End end CheckBox_DICOMImport.Value=gPref.DICOM_IN_Inverse - TextField_DICOM_Import_Structure_Slice.Text=Format(gPref.DICOM_In_Structure_Slice_Assigment,"-#.###e") + TextField_DICOM_Import_Structure_Slice.value = Format(gPref.DICOM_In_Structure_Slice_Assigment,"-#.###e") if TargetWindows Then @@ -3349,7 +3349,7 @@ End RadioButton_DVH_Grid_User.Value=True end - EditField_DVH_grid.Text=Format(gPref.DVH_Calc_Grid_Size,"#.#####") + EditField_DVH_grid.value = Format(gPref.DVH_Calc_Grid_Size,"#.#####") CheckBox_DVH_Delete.Value=gPref.DVH_clean End Sub diff --git a/Utility/Window_Configurations_VMC_Settings.xojo_window b/Utility/Window_Configurations_VMC_Settings.xojo_window index 37bbc2d..af5f2a1 100644 --- a/Utility/Window_Configurations_VMC_Settings.xojo_window +++ b/Utility/Window_Configurations_VMC_Settings.xojo_window @@ -721,13 +721,13 @@ End CheckBox_VMC_refresh.Value=gVMC.auto_refresh CheckBox_VMC_Run.Value=gVMC.auto_run CheckBox_MC_VMC_ImportD.Value=gVMC.auto_importD - EditField_MC_VMC_ChrLimit.Text=Format(gVMC.vmc_chrLimit,"#") - EditField_MC_VMC_DosetoWater.Text=Format(gVMC.vmc_dose_water,"-#.####") - EditField_VMC_DMXName.Text=gVMC.dmx_name - EditField_VMC_Res_X.Text=Format(gVMC.vmc_res_x,"-#.####") - EditField_VMC_Res_y.Text=Format(gVMC.vmc_res_y,"-#.####") - EditField_VMC_Res_z.Text=Format(gVMC.vmc_res_z,"-#.####") - EditField_MC_VMC_Numhist.Text=Format(gVMC.vmc_numb_hist,"-#") + EditField_MC_VMC_ChrLimit.value = Format(gVMC.vmc_chrLimit,"#") + EditField_MC_VMC_DosetoWater.value = Format(gVMC.vmc_dose_water,"-#.####") + EditField_VMC_DMXName.value = gVMC.dmx_name + EditField_VMC_Res_X.value = Format(gVMC.vmc_res_x,"-#.####") + EditField_VMC_Res_y.value = Format(gVMC.vmc_res_y,"-#.####") + EditField_VMC_Res_z.value = Format(gVMC.vmc_res_z,"-#.####") + EditField_MC_VMC_Numhist.value = Format(gVMC.vmc_numb_hist,"-#") if gVMC.Default_Device_Type=1 Then RadioButton_VMC_ShLib.Value=True diff --git a/Utility/Window_CreatBox.xojo_window b/Utility/Window_CreatBox.xojo_window index 9f9d733..9724030 100644 --- a/Utility/Window_CreatBox.xojo_window +++ b/Utility/Window_CreatBox.xojo_window @@ -1382,15 +1382,15 @@ End Listbox_Gradient.AddRow "HU step size","100" - EditField1_slices.Text=Str(nz) - EditField_nx.Text=Str(nx) - EditField_ny.Text=Str(ny) - EditField_dz.Text=Str(dz) - EditField_dx.Text=Str(dx) - EditField_dy.Text=Str(dy) - EditField1_slices1.Text=Str(z1) - EditField_nx1.Text=Str(x1) - EditField_ny1.Text=Str(y1) + EditField1_slices.value = Str(nz) + EditField_nx.value = Str(nx) + EditField_ny.value = Str(ny) + EditField_dz.value = Str(dz) + EditField_dx.value = Str(dx) + EditField_dy.value = Str(dy) + EditField1_slices1.value = Str(z1) + EditField_nx1.value = Str(x1) + EditField_ny1.value = Str(y1) End Sub #tag EndEvent diff --git a/Utility/Window_Import_Changes.xojo_window b/Utility/Window_Import_Changes.xojo_window index a2444c3..82ba26e 100644 --- a/Utility/Window_Import_Changes.xojo_window +++ b/Utility/Window_Import_Changes.xojo_window @@ -444,11 +444,11 @@ End edit_rtog=Window_Transfer.McGillRT - EditField_first.Text=edit_rtog.Patient_Name - EditField_last.Text=edit_rtog.Patient_Surname - EditField_id.Text=edit_rtog.Patient_ID + EditField_first.value = edit_rtog.Patient_Name + EditField_last.value = edit_rtog.Patient_Surname + EditField_id.value = edit_rtog.Patient_ID if UBound(edit_rtog.Scan)>= 0 Then - EditField_imageset.Text=edit_rtog.Scan(0).Scan_date + EditField_imageset.value = edit_rtog.Scan(0).Scan_date end End Sub diff --git a/Utility/Window_OpenPatient.xojo_window b/Utility/Window_OpenPatient.xojo_window index 3e170c0..5e3f336 100644 --- a/Utility/Window_OpenPatient.xojo_window +++ b/Utility/Window_OpenPatient.xojo_window @@ -461,7 +461,7 @@ End EditField_Current_Dir.TextSize=9 if gPref.mcgillfi<> nil Then - EditField_Current_Dir.Text=gPref.mcgillfi.ShellPath + EditField_Current_Dir.value = gPref.mcgillfi.ShellPath end u=CountFields(name_id,",") diff --git a/Utility/Window_Progress.xojo_window b/Utility/Window_Progress.xojo_window index 847fb79..fba02b4 100644 --- a/Utility/Window_Progress.xojo_window +++ b/Utility/Window_Progress.xojo_window @@ -78,7 +78,7 @@ Begin Window Window_Progress Scope = 0 TabIndex = 1 TabPanelIndex = 0 - TabStop = True + TabStop = "True" Top = 90 Transparent = False Value = 0.0 diff --git a/Utility/Window_Transfer.xojo_window b/Utility/Window_Transfer.xojo_window index 00bdc76..a72e9c9 100644 --- a/Utility/Window_Transfer.xojo_window +++ b/Utility/Window_Transfer.xojo_window @@ -420,41 +420,49 @@ End #tag Event Sub Open() '======Open Transfer window, set initial stuff - Dim s,line as String - Dim i,last as Integer - Dim d as New Date - Dim f as folderItem - Dim inp as textInputStream + 'Dim s,line as String + 'Dim i,last as Integer + 'Dim d as New Date + 'Dim f as folderItem + 'Dim inp as textInputStream '================================ app.which_window_Transfer=True - DICOM= new Thread_DICOM_Object + DICOM= New Thread_DICOM_Object '=========Transfer import types. populate - s="DICOM,CADPLAN,RTOG" - last=CountFields(s,",") - PopupMenu_import.DeleteAllRows - For i=1 to last - PopupMenu_import.addRow NthField(s,",",i) + Var s As String = "DICOM,CADPLAN,RTOG" + + PopupMenu_import.RemoveAllRows + For i As Integer = 1 To CountFields(s,",") + + PopupMenu_import.AddRow(s.NthField( "," , i)) + Next '======== Populate import files - if PopupMenu_import.text="DICOM" then - ImportStaticText.text=gpref.dicomfi.NativePath - elseif PopupMenu_import.text="CADPLAN" then - ImportStaticText.text=gpref.cadplanfi.NativePath - elseif PopupMenu_import.text="RTOG" then - ImportStaticText.text=gpref.rtogfi.NativePath - end if + If PopupMenu_import.SelectedRowValue = "DICOM" Then + + ImportStaticText.value = gpref.dicomfi.NativePath + + Elseif PopupMenu_import.SelectedRowValue = "CADPLAN" Then + + ImportStaticText.value = gpref.cadplanfi.NativePath + + Elseif PopupMenu_import.SelectedRowValue = "RTOG" Then + + ImportStaticText.value = gpref.rtogfi.NativePath + + End If - McGillStaticText.text=gPref.mcgillfi.NativePath + McGillStaticText.value = gPref.mcgillfi.NativePath UpDate_McGill - PopupMenu_import.ListIndex=0 + PopupMenu_import.SelectedRowIndex = 0 End Sub #tag EndEvent @@ -760,18 +768,22 @@ End #tag Events PopupMenu_import #tag Event Sub Change() - if me.text="RTOG" then - ImportStaticText.text=gPref.rtogfi.NativePath + If Me.SelectedRowValue = "RTOG" Then + + ImportStaticText.value = gPref.rtogfi.NativePath UpDate_RTOG - elseif me.text="CadPlan" then - ImportStaticText.text=gpref.cadplanfi.NativePath + + Elseif Me.SelectedRowValue = "CadPlan" Then + + ImportStaticText.value = gpref.cadplanfi.NativePath UpDate_CadPlan - elseif me.text="DICOM" then - ImportStaticText.text=gpref.DICOMfi.NativePath - Update_DICOM_Patients + Elseif Me.SelectedRowValue = "DICOM" Then - end if + ImportStaticText.value = gpref.DICOMfi.NativePath + Update_DICOM_Patients + + End If ImportStaticText.Refresh End Sub @@ -780,42 +792,59 @@ End #tag Events ImportStaticText #tag Event Function MouseDown(X As Integer, Y As Integer) As Boolean - dim fi,opfi as FolderItem - dim fdlg as new SelectFolderDialog + //dim fi,opfi as FolderItem + //dim fdlg as new SelectFolderDialog + Var fdlg As New SelectFolderDialog + fdlg.Title="Select Folder" + If PopupMenu_import.SelectedRowValue = "DICOM" Then + + fdlg.InitialFolder = gPref.DICOMfi + + Elseif PopupMenu_import.SelectedRowValue = "CADPLAN" Then + + fdlg.InitialFolder = gpref.cadplanfi + + Elseif PopupMenu_import.SelectedRowValue = "RTOG" Then + + fdlg.InitialFolder = gpref.rtogfi + + End - if PopupMenu_import.text="DICOM" then - opfi=gPref.DICOMfi - elseif PopupMenu_import.text="CADPLAN" then - opfi=gpref.cadplanfi - elseif PopupMenu_import.text="RTOG" then - opfi=gpref.rtogfi - end - fdlg.InitialDirectory=opfi - fdlg.Title="Select Folder" - fi = fdlg.ShowModal() - if fi<>nil then - if PopupMenu_import.text="DICOM" then - gPref.DICOMfi=fi - ImportStaticText.text=gpref.dicomfi.NativePath + + Var f As FolderItem = fdlg.ShowModal + + If f <> Nil Then + + If PopupMenu_import.SelectedRowValue = "DICOM" Then + + gPref.DICOMfi = f + ImportStaticText.value = gpref.dicomfi.NativePath Update_DICOM_Patients - elseif PopupMenu_import.text="CADPLAN" then - ImportStaticText.text=gpref.cadplanfi.NativePath - gpref.cadplanfi=fi + + Elseif PopupMenu_import.SelectedRowValue = "CADPLAN" Then + + ImportStaticText.value = gpref.cadplanfi.NativePath + gpref.cadplanfi=f Update_CadPlan - elseif PopupMenu_import.text="RTOG" then - gpref.rtogfi=fi - ImportStaticText.text=gpref.rtogfi.NativePath + + Elseif PopupMenu_import.SelectedRowValue = "RTOG" Then + + gpref.rtogfi=f + ImportStaticText.value = gpref.rtogfi.NativePath UpDate_RTOG - end if + + End If + ImportStaticText.Refresh gpref.Write_Pref - end if + + End If End Function #tag EndEvent @@ -836,7 +865,7 @@ End if fi<>nil then //fi.Exists then gPref.McGillfi=fi - McGillStaticText.text=gpref.mcgillfi.NativePath + McGillStaticText.value = gpref.mcgillfi.NativePath McGillStaticText.Refresh gpref.Write_Pref UpDate_McGill @@ -854,86 +883,92 @@ End // // //---------------------------------------------------------------------- - Dim f,g as folderItem - Dim i,k,Z as integer - dim fname,Temp,lname, id_string as string - Dim ts_in as TextInputStream - Dim ts as TextInputStream - Dim found as Boolean + 'Dim f,g as folderItem + 'Dim i,k,Z as integer + 'dim fname,Temp,lname, id_string as string + 'Dim ts_in as TextInputStream + 'Dim ts as TextInputStream + 'Dim found as Boolean //---------------------------------------------------------------------- - i=ListBox_import.listindex - if i>=0 then - if PopupMenu_import.text="DICOM" then - DICOM=nil - DICOM=new Thread_DICOM_Object - DICOM.File= new Class_DICOM_File + If ListBox_import.SelectedRowIndex >= 0 Then + + If PopupMenu_import.SelectedRowValue = "DICOM" Then + + DICOM = New Thread_DICOM_Object + DICOM.File= New Class_DICOM_File - id_string=ListBox_import.cell(ListBox_import.listindex,1) - fname=ListBox_import.cell(ListBox_import.listindex,0) - DICOM.Import_ID=id_string - DICOM.Import_Name=fname - Dicom.TaskNum=1 + Var id_string As String = ListBox_import.cell(ListBox_import.SelectedRowIndex, 1) + Var fname As String = ListBox_import.cell(ListBox_import.SelectedRowIndex, 0) + DICOM.Import_ID = id_string + DICOM.Import_Name = fname + Dicom.TaskNum = 1 DICOM.Run - DICOM=nil + DICOM = Nil - elseif PopupMenu_import.text="CADPLAN" then + Elseif PopupMenu_import.SelectedRowValue = "CADPLAN" Then //import cadplan //get the base file name then - fname=ListBox_import.cell(ListBox_import.listindex,3) - f=gPref.cadplanfi.child(fname+"0") //passing image #0 folder item since all cadplan are in same folder... - if f<>nil then - CADPLAN=nil - CADPLAN=new Thread_RTOG + Var fname As String = ListBox_import.CellValueAt( ListBox_import.SelectedRowIndex, 3) + Var f As FolderItem = gPref.cadplanfi.child(fname+"0") //passing image #0 folder item since all cadplan are in same folder... + + If f <> Nil Then + CADPLAN=Nil + CADPLAN=New Thread_RTOG PW_Title="Reading CadPlan files" - PW_Show=true + PW_Show=True CADPLAN.Read_CadPlan(f) - McGillRT=nil - McGillRT= new Thread_RTOG + McGillRT=Nil + McGillRT= New Thread_RTOG McGillRT.Convert_CadPlan2McGilRT(CADPLAN) - PW_Show=false - end if + PW_Show =False + End If - elseif PopupMenu_import.text="RTOG" then + Elseif PopupMenu_import.SelectedRowValue = "RTOG" Then //import RTOG - fname= ListBox_import.cell(i,0) - lname=ListBox_import.cell(i,1) + Var fname As String = ListBox_import.CellValueAt( _ + ListBox_import.SelectedRowIndex, 0) + Var lname As String = ListBox_import.CellValueAt( _ + ListBox_import.SelectedRowIndex, 1) - for k = 1 to gPref.rtogfi.Count - f=gPref.rtogfi.item(k) + For k As Integer = 1 To gPref.rtogfi.Count + Var f As FolderItem = gPref.rtogfi.item(k) - if InStr(f.Name,"aapm0000")>0 then - ts=f.OpenAsTextFile + If f.Name.IndexOf("aapm0000") > 0 Then + Var ts As TextInputStream = f.OpenAsTextFile - While ts.EOF=False - Temp=ts.ReadLine - if InStr(Temp,"Patient name")> 0 Then - exit - end + Var Temp As String + While ts.EOF = False + + Temp = ts.ReadLine + If InStr(Temp,"Patient name")> 0 Then + + Exit + End Wend ts.Close - if InStr(Temp, fname)>0 and InStr(Temp,lname)> 0 Then + If Temp.IndexOf(fname) > 0 And Temp.IndexOf(lname)> 0 Then f=f.child("aapm0000") PW_Title="Reading RTOG files" - PW_Show=true + PW_Show=True - RTOG=nil - RTOG=new Thread_RTOG + RTOG=Nil + RTOG=New Thread_RTOG RTOG.Read_RTOG(f) - McGillRT=nil - McGillRT= new Thread_RTOG + McGillRT=Nil + McGillRT= New Thread_RTOG McGillRT.Convert_RTOG2McGillRT(RTOG) @@ -974,29 +1009,27 @@ End // // //---------------------------------------------------------------------- - Dim f,g as folderItem - Dim i,k,Z as integer - dim fname,Temp,lname, id_string as string - Dim ts_in as TextInputStream - Dim ts as TextInputStream - Dim found as Boolean + 'Dim f,g as folderItem + 'Dim i,k,Z as integer + 'dim fname,Temp,lname, id_string as string + 'Dim ts_in as TextInputStream + 'Dim ts as TextInputStream + 'Dim found as Boolean //---------------------------------------------------------------------- - i=ListBox_import.listindex - if i>=0 then - if PopupMenu_import.text="DICOM" then - DICOM=nil - DICOM=new Thread_DICOM_Object - DICOM.File= new Class_DICOM_File + If ListBox_import.SelectedRowIndex >= 0 Then + + If PopupMenu_import.SelectedRowValue = "DICOM" Then + + DICOM=New Thread_DICOM_Object + DICOM.File= New Class_DICOM_File DICOM.TaskNum=0 - id_string=ListBox_import.cell(ListBox_import.listindex,1) - fname=ListBox_import.cell(ListBox_import.listindex,0) - DICOM.Import_ID=id_string - DICOM.Import_Name=fname + DICOM.Import_ID = ListBox_import.CellValueAt(ListBox_import.SelectedRowIndex, 1) + DICOM.Import_Name = ListBox_import.CellValueAt(ListBox_import.SelectedRowIndex, 0) DICOM.Run - DICOM=nil - end if - end + DICOM=Nil + End If + End End Sub #tag EndEvent #tag EndEvents diff --git a/VMC/Class_VMC.xojo_code b/VMC/Class_VMC.xojo_code index 90c4515..8c56de9 100644 --- a/VMC/Class_VMC.xojo_code +++ b/VMC/Class_VMC.xojo_code @@ -604,7 +604,7 @@ Protected Class Class_VMC if wts<> Nil Then wts.Write ffile wts.Close - //Window_Treatment.StaticText_VMC_Status.Text=f.Name +" input file written" //Commented out by William Davis to avoid crash due to exception + //Window_Treatment.StaticText_VMC_Status.value = f.Name +" input file written" //Commented out by William Davis to avoid crash due to exception Return True else Errors.append "Error ! "+f.Name +" input file NOT written" //Changed to "Errors.append" by William Davis to avoid crash due to exception diff --git a/VMC/Thread_VMC.xojo_code b/VMC/Thread_VMC.xojo_code index 9e3dea3..cfc9e0a 100644 --- a/VMC/Thread_VMC.xojo_code +++ b/VMC/Thread_VMC.xojo_code @@ -172,8 +172,8 @@ Inherits Thread - //Window_Treatment.StaticText_VMC_Status.Text="VMC to McGill RT Dose" //Commented out by William Davis to avoid crash due to exception - //Window_Treatment.StaticText_VMC_Status.Text="Reading header file : "+vmc(dmx_index).DMX.dmx_name+".hed" //Commented out by William Davis to avoid crash due to exception + //Window_Treatment.StaticText_VMC_Status.value = "VMC to McGill RT Dose" //Commented out by William Davis to avoid crash due to exception + //Window_Treatment.StaticText_VMC_Status.value = "Reading header file : "+vmc(dmx_index).DMX.dmx_name+".hed" //Commented out by William Davis to avoid crash due to exception f=gRTOG.Plan(Plan_Index).Path f=f.Child(MC_file_name+str(first_dose+1)+"00_"+vmc(dmx_index).DMX.dmx_name+".hed") @@ -201,7 +201,7 @@ Inherits Thread Return end else - //Window_Treatment.StaticText_VMC_Status.Text= "Could not find file : "+f.Name //Commented out by William Davis to avoid crash due to exception + //Window_Treatment.StaticText_VMC_Status.value = "Could not find file : "+f.Name //Commented out by William Davis to avoid crash due to exception Return end @@ -771,7 +771,7 @@ Inherits Thread - Window_VMC_DMXSettings.StaticText_VMC_Make.Text="Making DMX file" + Window_VMC_DMXSettings.StaticText_VMC_Make.value = "Making DMX file" Window_VMC_DMXSettings.ProgressBar.Maximum=vv.DMX.Z_num @@ -910,7 +910,7 @@ Inherits Thread //=========Write DMX file, and hed file h=plan_index - Window_VMC_DMXSettings.StaticText_VMC_Make.Text="Writing DMX file" + Window_VMC_DMXSettings.StaticText_VMC_Make.value = "Writing DMX file" f=new FolderItem f=gRTOG.Path.Child("McGill_RT") dmxfile=f.child(gRTOG.Patient_ID+gRTOG.StudyID+gRTOG.SeriesNumber+"_"+vv.DMX.dmx_name+".dmx") @@ -922,7 +922,7 @@ Inherits Thread end // now write the header file ".hed" - Window_VMC_DMXSettings.StaticText_VMC_Make.Text="Writing HED file" + Window_VMC_DMXSettings.StaticText_VMC_Make.value = "Writing HED file" headerfile=f.child(gRTOG.Patient_ID+gRTOG.StudyID+gRTOG.SeriesNumber+"_"+vv.DMX.dmx_name+".hed") if headerfile<>nil then ts=headerfile.createTextFile @@ -934,13 +934,13 @@ Inherits Thread ts.write chr(10) ts.close end - Window_VMC_DMXSettings.StaticText_VMC_Make.Text="Saving DMX Properties" + Window_VMC_DMXSettings.StaticText_VMC_Make.value = "Saving DMX Properties" vv.Write_DMX_Settings vv.Write_VMC_Settings vmc.Append vv - Window_VMC_DMXSettings.StaticText_VMC_Make.Text="Finished" + Window_VMC_DMXSettings.StaticText_VMC_Make.value = "Finished" Window_Treatment.MC_vmc_beam_progress End Sub diff --git a/VMC/Window_VMC_AdvancedOptions.xojo_window b/VMC/Window_VMC_AdvancedOptions.xojo_window index 18e9e28..732ea86 100644 --- a/VMC/Window_VMC_AdvancedOptions.xojo_window +++ b/VMC/Window_VMC_AdvancedOptions.xojo_window @@ -2883,38 +2883,38 @@ End DoNothing=True - EditField_num_his.Text=Format(vmc_inputfile.num_histories,"-###,###,###") - EditField_his_reps.Text=Format(vmc_inputfile.num_hist_rep,"#") - EditField_rnds1.Text=Format(vmc_inputfile.rndseed1,"#") - EditField_rnds2.Text=Format(vmc_inputfile.rndseed2,"#") - EditField_rnds3.Text=Format(vmc_inputfile.rndseed3,"#") - EditField_rnds4.Text=Format(vmc_inputfile.rndseed4,"#") - EditField_SAD.text=Format(vmc_inputfile.CHANGESAD,"-#.###") - EditField_BeamWeight.text=Format(vmc_inputfile.BEAMWEIGHT,"-#.###") - EditField_DeviceKey.text=vmc_inputfile.DEVICEKEY - EditField_Isocenterdist.text=Format(vmc_inputfile.ISOCENTERDIST,"-#.###") - EditField_tableangle.text=Format(vmc_inputfile.TABLEANGLE,"-#.###") - EditField_num_batches.Text=Format(vmc_inputfile.num_batches,"#") - EditField_his_rotation.Text=Format(vmc_inputfile.num_further_rep,"#") - EditField_Isocenterdist.text=Format(vmc_inputfile.ISOCENTERDIST,"-#.###") - EditField_Isocenterx.text=Format(vmc_inputfile.ISOCENTERx,"-#.###") - EditField_Isocentery.text=Format(vmc_inputfile.ISOCENTERy,"-#.###") - EditField_Isocenterz.text=Format(vmc_inputfile.ISOCENTERz,"-#.###") - EditField_gantry.text=Format(vmc_inputfile.GANTRYANGLE_Value1,"-#.###") - EditField_collangle.text=Format(vmc_inputfile.COLLANGLE,"-#.###") - EditField_tableangle.text=Format(vmc_inputfile.TABLEANGLE,"-#.###") - EditField_ecut.text=Format(vmc_inputfile.Ecut,"-#.###") - EditField_pcut.text=Format(vmc_inputfile.pcut,"-#.###") - EditField_Coll_Width_X.Text=Format(vmc_inputfile.Coll_Width_X,"-#.###") - EditField_Coll_Width_y.Text=Format(vmc_inputfile.Coll_Width_y,"-#.###") - EditField_irreg_num.Text=Format(vmc_inputfile.IRREGULAR_Num,"#") - EditField_NormialEnergy.Text=Format(vmc_inputfile.NominalEnergy,"#.###") - EditField_refx.text=Format(vmc_inputfile.RefPointx,"-#.###") - EditField_refy.text=Format(vmc_inputfile.RefPointy,"-#.###") - EditField_refz.text=Format(vmc_inputfile.RefPointz,"-#.###") + EditField_num_his.value = Format(vmc_inputfile.num_histories,"-###,###,###") + EditField_his_reps.value = Format(vmc_inputfile.num_hist_rep,"#") + EditField_rnds1.value = Format(vmc_inputfile.rndseed1,"#") + EditField_rnds2.value = Format(vmc_inputfile.rndseed2,"#") + EditField_rnds3.value = Format(vmc_inputfile.rndseed3,"#") + EditField_rnds4.value = Format(vmc_inputfile.rndseed4,"#") + EditField_SAD.value = Format(vmc_inputfile.CHANGESAD,"-#.###") + EditField_BeamWeight.value = Format(vmc_inputfile.BEAMWEIGHT,"-#.###") + EditField_DeviceKey.value = vmc_inputfile.DEVICEKEY + EditField_Isocenterdist.value = Format(vmc_inputfile.ISOCENTERDIST,"-#.###") + EditField_tableangle.value = Format(vmc_inputfile.TABLEANGLE,"-#.###") + EditField_num_batches.value = Format(vmc_inputfile.num_batches,"#") + EditField_his_rotation.value = Format(vmc_inputfile.num_further_rep,"#") + EditField_Isocenterdist.value = Format(vmc_inputfile.ISOCENTERDIST,"-#.###") + EditField_Isocenterx.value = Format(vmc_inputfile.ISOCENTERx,"-#.###") + EditField_Isocentery.value = Format(vmc_inputfile.ISOCENTERy,"-#.###") + EditField_Isocenterz.value = Format(vmc_inputfile.ISOCENTERz,"-#.###") + EditField_gantry.value = Format(vmc_inputfile.GANTRYANGLE_Value1,"-#.###") + EditField_collangle.value = Format(vmc_inputfile.COLLANGLE,"-#.###") + EditField_tableangle.value = Format(vmc_inputfile.TABLEANGLE,"-#.###") + EditField_ecut.value = Format(vmc_inputfile.Ecut,"-#.###") + EditField_pcut.value = Format(vmc_inputfile.pcut,"-#.###") + EditField_Coll_Width_X.value = Format(vmc_inputfile.Coll_Width_X,"-#.###") + EditField_Coll_Width_y.value = Format(vmc_inputfile.Coll_Width_y,"-#.###") + EditField_irreg_num.value = Format(vmc_inputfile.IRREGULAR_Num,"#") + EditField_NormialEnergy.value = Format(vmc_inputfile.NominalEnergy,"#.###") + EditField_refx.value = Format(vmc_inputfile.RefPointx,"-#.###") + EditField_refy.value = Format(vmc_inputfile.RefPointy,"-#.###") + EditField_refz.value = Format(vmc_inputfile.RefPointz,"-#.###") - EditField_BEAMInputfile.text=vmc_inputfile.BEAMnrc_INPUT - EditField_BEAMpegs.text=vmc_inputfile.BEAMnrc_PEGS + EditField_BEAMInputfile.value = vmc_inputfile.BEAMnrc_INPUT + EditField_BEAMpegs.value = vmc_inputfile.BEAMnrc_PEGS @@ -2931,7 +2931,7 @@ End if vmc_inputfile.num_histories<0 Then RadioButton_stat.Value=True - EditField_stat.Text=Format(-1*vmc_inputfile.num_histories/10,"#.#") + EditField_stat.value = Format(-1*vmc_inputfile.num_histories/10,"#.#") else RadioButton_his.Value=True end @@ -3179,7 +3179,7 @@ End vmc_inputfile.num_histories=-1*s*10 - EditField_num_his.Text=Format(vmc_inputfile.num_histories,"-#.#") + EditField_num_his.value = Format(vmc_inputfile.num_histories,"-#.#") End Sub #tag EndEvent #tag EndEvents diff --git a/VMC/Window_VMC_DMXSettings.xojo_window b/VMC/Window_VMC_DMXSettings.xojo_window index 048f8ac..c26eace 100644 --- a/VMC/Window_VMC_DMXSettings.xojo_window +++ b/VMC/Window_VMC_DMXSettings.xojo_window @@ -1306,19 +1306,19 @@ End Checkbox_dosxyz_Clean1.Value=DMX.Cleancontours - EditField_air_density.Text=DMX.Clean_density - EditField_DMXname.Text=DMX.dmx_name + EditField_air_density.value = DMX.Clean_density + EditField_DMXname.value = DMX.dmx_name - EditField_Xdel.Text=Format(gVMC.DMXSettings.Del_X,"-#.###") - EditField_Xmax.Text=Format(gVMC.DMXSettings.X_Max,"-#.###") - EditField_Xmin.Text=Format(gVMC.DMXSettings.X_min,"-#.###") - EditField_ydel.Text=Format(gVMC.DMXSettings.Del_y,"-#.###") - EditField_ymax.Text=Format(gVMC.DMXSettings.y_Max,"-#.###") - EditField_ymin.Text=Format(gVMC.DMXSettings.y_min,"-#.###") - EditField_zdel.Text=Format(gVMC.DMXSettings.Del_z,"-#.###") - EditField_zmax.Text=Format(gVMC.DMXSettings.z_Max,"-#.###") - EditField_zmin.Text=Format(gVMC.DMXSettings.z_min,"-#.###") + EditField_Xdel.value = Format(gVMC.DMXSettings.Del_X,"-#.###") + EditField_Xmax.value = Format(gVMC.DMXSettings.X_Max,"-#.###") + EditField_Xmin.value = Format(gVMC.DMXSettings.X_min,"-#.###") + EditField_ydel.value = Format(gVMC.DMXSettings.Del_y,"-#.###") + EditField_ymax.value = Format(gVMC.DMXSettings.y_Max,"-#.###") + EditField_ymin.value = Format(gVMC.DMXSettings.y_min,"-#.###") + EditField_zdel.value = Format(gVMC.DMXSettings.Del_z,"-#.###") + EditField_zmax.value = Format(gVMC.DMXSettings.z_Max,"-#.###") + EditField_zmin.value = Format(gVMC.DMXSettings.z_min,"-#.###") End Sub #tag EndEvent diff --git a/VMC/Window_VMC_Properties.xojo_window b/VMC/Window_VMC_Properties.xojo_window index 42263aa..b68ef3a 100644 --- a/VMC/Window_VMC_Properties.xojo_window +++ b/VMC/Window_VMC_Properties.xojo_window @@ -1334,29 +1334,29 @@ End me.Title="VMC Properties, DMX : "+gVMC.VMC(dmx_index).DMX.dmx_name vmc_inputfile=gVMC.VMC(dmx_index).BEAMS(beam_index) - StaticText_beamid.Text="Beam ID: "+str(gRTOG.Plan( plan_index).Beam(beam_index).beam_num) - StaticText_beam_energy.Text=gRTOG.Plan( plan_index).Beam(beam_index).beam_energy - StaticText_beam_linac.Text=gRTOG.Plan( plan_index).Beam(beam_index).rt_name - StaticText_phsp_pho.Text=Format(gBEAM.Beams(beam_index).egs_phsp_num_photons,"###,###,###") - StaticText_phsp_par.Text=Format(gBEAM.Beams(beam_index).egs_phsp_num_particles,"###,###,###") + StaticText_beamid.value = "Beam ID: "+str(gRTOG.Plan( plan_index).Beam(beam_index).beam_num) + StaticText_beam_energy.value = gRTOG.Plan( plan_index).Beam(beam_index).beam_energy + StaticText_beam_linac.value = gRTOG.Plan( plan_index).Beam(beam_index).rt_name + StaticText_phsp_pho.value = Format(gBEAM.Beams(beam_index).egs_phsp_num_photons,"###,###,###") + StaticText_phsp_par.value = Format(gBEAM.Beams(beam_index).egs_phsp_num_particles,"###,###,###") c=gBEAM.Beams(beam_index).egs_phsp_num_photons/gBEAM.Beams(beam_index).egs_phsp_num_particles - StaticText_per_phot.Text=Format(100*c,"#.###") + StaticText_per_phot.value = Format(100*c,"#.###") a=gRTOG.Plan(plan_index).Beam(beam_index).Collimator.fields(0).x1+gRTOG.Plan(plan_index).Beam(beam_index).Collimator.fields(0).x2 b=gRTOG.Plan(plan_index).Beam(beam_index).Collimator.fields(0).y1+gRTOG.Plan(plan_index).Beam(beam_index).Collimator.fields(0).y2 - StaticText_beam_field.Text=Format(a*b,"-#.###") - StaticText_part_par_area.Text=Format(gBEAM.Beams(beam_index).egs_phsp_num_particles/(a*b),"-#.##") + StaticText_beam_field.value = Format(a*b,"-#.###") + StaticText_part_par_area.value = Format(gBEAM.Beams(beam_index).egs_phsp_num_particles/(a*b),"-#.##") CheckBox_Simulation_Start.Caption="Job Started : "+vmc_inputfile.Start_Time CheckBox_Simulation_Start.Value=vmc_inputfile.vmc_started CheckBox_Downloaded_d3d.Value=vmc_inputfile.downloaded_d3d CheckBox_Downloaded_hed.Value=vmc_inputfile.downloaded_hed - EditField_caldose.Text=Format(vmc_inputfile.dose,"#.#######e") - EditField_dw.Text=Format(vmc_inputfile.dose_to_water,"#.#######") - EditField_queue.Text=vmc_inputfile.queue + EditField_caldose.value = Format(vmc_inputfile.dose,"#.#######e") + EditField_dw.value = Format(vmc_inputfile.dose_to_water,"#.#######") + EditField_queue.value = vmc_inputfile.queue PopupMenu_Shell.ListIndex=vmc_inputfile.Shell_Index CheckBox_Auto_Shell.Value=vmc_inputfile.auto_shell - StaticText_Uncertainty.Text="Uncertainty region d > 50% (%) : "+Format(vmc_inputfile.uncertainty,"#.###") - StaticText_CPUTime.Text="Total CPU Time : "+Calculate_Real_Time + StaticText_Uncertainty.value = "Uncertainty region d > 50% (%) : "+Format(vmc_inputfile.uncertainty,"#.###") + StaticText_CPUTime.value = "Total CPU Time : "+Calculate_Real_Time End Sub #tag EndMethod diff --git a/Visualization/Thread_Visualization.xojo_code b/Visualization/Thread_Visualization.xojo_code index cf587d4..41e30b0 100644 --- a/Visualization/Thread_Visualization.xojo_code +++ b/Visualization/Thread_Visualization.xojo_code @@ -558,8 +558,8 @@ Inherits Thread end - //Window_Treatment.StaticText_Level.Text="Level : "+Format(wl,"-#") //Commented out by William Davis to avoid crash due to exception - //Window_Treatment.StaticText_Window.Text="Window : "+Format(ww,"-#") //Commented out by William Davis to avoid crash due to exception + //Window_Treatment.StaticText_Level.value = "Level : "+Format(wl,"-#") //Commented out by William Davis to avoid crash due to exception + //Window_Treatment.StaticText_Window.value = "Window : "+Format(ww,"-#") //Commented out by William Davis to avoid crash due to exception //Window_Treatment.Slider_Window_Level.Value=wl //Commented out by William Davis to avoid crash due to exception //Window_Treatment.Slider_Window_Width.Value=ww //Commented out by William Davis to avoid crash due to exception diff --git a/Visualization/Window_Contouring.xojo_window b/Visualization/Window_Contouring.xojo_window index 466ab5f..e4174d1 100644 --- a/Visualization/Window_Contouring.xojo_window +++ b/Visualization/Window_Contouring.xojo_window @@ -1083,8 +1083,8 @@ End Slider_Window_Level.Value=gvis.WL Slider_Window_Width.Value=gvis.ww - StaticText_level1.Text=Str(gvis.WL) - StaticText_window1.Text=str(gvis.ww) + StaticText_level1.value = Str(gvis.WL) + StaticText_window1.value = str(gvis.ww) Slider_Trans.Maximum=100 Slider_Trans.Minimum=0 @@ -1428,7 +1428,7 @@ End MI.Text = "Copy Inf" base.Append MI MI = New MenuItem - MI.Text= "Define ROI" + MI.value = "Define ROI" base.Append MI MI = New MenuItem MI.Text = "AutoContour" @@ -1713,7 +1713,7 @@ End if me.Value<>gvis.ww then gvis.ww=me.Value gvis.WL_Recalculate - StaticText_window1.Text=str(me.Value) + StaticText_window1.value = str(me.Value) end End Sub @@ -1722,7 +1722,7 @@ End #tag Events Slider_Window_Level #tag Event Sub ValueChanged() - StaticText_level1.Text=str(me.Value) + StaticText_level1.value = str(me.Value) if me.Value<>gvis.wl then gvis.WL=me.Value gvis.WL_Recalculate @@ -1914,7 +1914,7 @@ End #tag Event Sub ValueChanged() scale=Slider_Scale.Value/100 - EditField_Scale.Text=Str(Slider_Scale.Value) + EditField_Scale.value = Str(Slider_Scale.Value) ReDraw_Canvas diff --git a/mmctp.xojo_project b/mmctp.xojo_project index 900297b..c7c7fd1 100644 --- a/mmctp.xojo_project +++ b/mmctp.xojo_project @@ -22,6 +22,7 @@ Class=RTOG_Dose_Distribution;RTOG Class/RTOG Dose/RTOG_Dose_Distribution.xojo_co Class=RTOG_Structure_Class;RTOG Class/RTOG Structure/RTOG_Structure_Class.xojo_code;&hFFFFFFFFBE62870D;&hFFFFFFFFBEC34D2A;false Class=RTOG_Beam_Geometry;RTOG Class/RTOG Beam Geometry/RTOG_Beam_Geometry.xojo_code;&hFFFFFFFFBE6286DF;&hFFFFFFFFBEC37D2E;false Class=Class_isocenter;RTOG Class/RTOG Beam Geometry/Class_isocenter.xojo_code;&hFFFFFFFFBEC37D60;&hFFFFFFFFBEC37D2E;false +Module=General_Module;General_Module.xojo_code;&h00000000397507FF;&h0000000000000000;false Class=Class_Collimator;RTOG Class/RTOG Beam Geometry/Class_Collimator.xojo_code;&hFFFFFFFFBEC37E11;&hFFFFFFFFBEC37D2E;false Class=Class_Collimator_Fields;RTOG Class/RTOG Beam Geometry/Class_Collimator_Fields.xojo_code;&h000000007137332F;&hFFFFFFFFBEC37D2E;false Class=Class_MLC;RTOG Class/RTOG Beam Geometry/Class_MLC.xojo_code;&h000000007CEA8939;&hFFFFFFFFBEC37D2E;false @@ -352,7 +353,7 @@ AppMenuBar=File MajorVersion=9 MinorVersion=2 SubVersion=0 -NonRelease=497 +NonRelease=498 Release=2 InfoVersion= LongVersion= From 2ba70f0fcdbf90dacb170bd1cae0c13890c5e652 Mon Sep 17 00:00:00 2001 From: Wamied Abdel-Rahman Date: Wed, 22 Jul 2020 16:55:27 +0300 Subject: [PATCH 5/7] July 22 --- .DS_Store | Bin 6148 -> 6148 bytes 3D/Rb3DSpace.xojo_code | 12 +- 3D/Rb3DSpace_MMCTP.xojo_code | 12 +- BEAMnrc/Class_BEAM.xojo_code | 114 ++-- BEAMnrc/Class_BEAMnrc_PhaseSpace.xojo_code | 2 +- BEAMnrc/Thread_BEAM.xojo_code | 566 +++++++++------- BEAMnrc/Window_BEAM_MainInputs.xojo_window | 198 +++--- BEAMnrc/Window_BEAM_Options.xojo_window | 10 +- .../Window_BEAM_Options_APPLICAT.xojo_window | 2 +- ...BEAM_Options_APPLICAT_Scrapers.xojo_window | 68 +- BEAMnrc/Window_BEAM_Options_BLOCK.xojo_window | 14 +- ...ndow_BEAM_Options_BLOCK_Points.xojo_window | 16 +- ..._BEAM_Options_BremSplitUniform.xojo_window | 6 +- .../Window_BEAM_Options_DYNJAWS.xojo_window | 2 +- ...ow_BEAM_Options_DYNJAWS_MOTION.xojo_window | 52 +- ...dow_BEAM_Options_DYNJAWS_PARIS.xojo_window | 40 +- .../Window_BEAM_Options_DYNVMLC.xojo_window | 8 +- ...AM_Options_DYNVMLC_LeafOffsets.xojo_window | 10 +- ...M_Options_DYNVMLC_LeafOpenings.xojo_window | 16 +- ..._BEAM_Options_DYNVMLC_Leaftype.xojo_window | 10 +- ...ow_BEAM_Options_DirecBremPhoto.xojo_window | 8 +- BEAMnrc/Window_BEAM_Options_JAWS.xojo_window | 2 +- ...Window_BEAM_Options_JAWS_PARIS.xojo_window | 52 +- BEAMnrc/Window_BEAM_Options_MLC.xojo_window | 2 +- ..._BEAM_Options_MLC_LeafOpenings.xojo_window | 18 +- BEAMnrc/Window_BEAM_Options_SLABS.xojo_window | 2 +- ...ndow_BEAM_Options_SLABS_LAYERS.xojo_window | 32 +- .../Window_BEAM_Options_Scoring.xojo_window | 50 +- .../Window_BEAM_Options_TOMOMLC.xojo_window | 2 +- BEAMnrc/Window_BEAM_Options_WEDGE.xojo_window | 46 +- .../Window_BEAM_Phsp_Information.xojo_window | 284 ++++---- Commissioning/Class_Profile_One.xojo_code | 10 +- Commissioning/Window_CSV_Import.xojo_window | 22 +- .../Window_Commisssioning.xojo_window | 186 +++--- .../Window_Eclipse_Import.xojo_window | 22 +- Commissioning/Window_Excel_Import.xojo_window | 38 +- .../Window_MEPHYSTO_Import.xojo_window | 22 +- Commissioning/Window_OutPut.xojo_window | 6 +- .../Window_Profile_Properties.xojo_window | 46 +- .../Window_Profile_analysis.xojo_window | 42 +- Commissioning/Window_RFA_Import.xojo_window | 28 +- Commissioning/Window_XiO_Import.xojo_window | 22 +- DICOM/Class_DICOM_File.xojo_code | 36 +- DICOM/Thread_DICOM_Object.xojo_code | 4 +- DICOM/Window_DICOM_View.xojo_window | 2 +- DOSXYZnrc/Class_DOSXYZ.xojo_code | 4 +- DOSXYZnrc/Class_DOSXYZ_3ddose.xojo_code | 20 +- DOSXYZnrc/Thread_DOSXYZ.xojo_code | 215 +++--- ...ndow_DOSXYZ_EGSPhant_Materials.xojo_window | 96 +-- DOSXYZnrc/Window_DOSXYZ_Import.xojo_window | 90 +-- .../Window_DOSXYZ_Maininputs.xojo_window | 186 +++--- ...ndow_DOSXYZ_Maininputs_Phantom.xojo_window | 28 +- ...DOSXYZ_Maininputs_Phantom_View.xojo_window | 4 +- ...SXYZ_Maininputs_Phantom_Voxels.xojo_window | 22 +- ...dow_DOSXYZ_Maininputs_source10.xojo_window | 123 ++-- ...dow_DOSXYZ_Maininputs_source11.xojo_window | 4 +- ...ndow_DOSXYZ_Maininputs_source2.xojo_window | 12 +- ...dow_DOSXYZ_Maininputs_source20.xojo_window | 48 +- ...dow_DOSXYZ_Maininputs_source21.xojo_window | 52 +- ...ndow_DOSXYZ_Maininputs_source8.xojo_window | 129 ++-- ...ndow_DOSXYZ_Maininputs_source9.xojo_window | 4 +- .../Window_DOSXYZ_Properties.xojo_window | 4 +- DVH/Window_DVH_Plot.xojo_window | 72 +- EGSnrc/Window_EGSnrc_Inputs.xojo_window | 24 +- Gamma/WindowGamma.xojo_window | 6 +- Gamma/Window_dose.xojo_window | 24 +- Gamma/Window_images.xojo_window | 8 +- MERT/DJAW/Shell_JASADVH.xojo_code | 2 +- MERT/GradDVH/Class_MERT_GradDVH.xojo_code | 4 +- MERT/NLODVH/Class_MERT_NLODVH.xojo_code | 4 +- MERT/Thread_Optimization.xojo_code | 2 +- MERT/Window_EMET_Results.xojo_window | 386 ++++++----- MERT/Window_EMET_Run.xojo_window | 330 +++++----- MERT/Window_EMET_Setup.xojo_window | 168 ++--- McGill_Cutout/Class_Cutout.xojo_code | 8 +- .../Window_Cutout_Options.xojo_window | 18 +- .../RTOG_Beam_Geometry.xojo_code | 2 +- RTOG Class/RTOG Plan/RTOG_Plan.xojo_code | 14 +- RTOG Class/Thread_RTOG.xojo_code | 2 +- Treatment Planning/Canvas_TP.xojo_code | 2 +- Treatment Planning/Window_3DView.xojo_window | 15 +- Treatment Planning/Window_AddDose.xojo_window | 44 +- .../Window_Beam_Cutout.xojo_window | 45 +- .../Window_Beam_MLC_Properties.xojo_window | 30 +- .../Window_Beam_Properties.xojo_window | 30 +- .../Window_CopyBeam.xojo_window | 6 +- Treatment Planning/Window_Graph.xojo_window | 42 +- Treatment Planning/Window_IsoDose.xojo_window | 12 +- .../Window_Plan_Info.xojo_window | 42 +- .../Window_Prescription.xojo_window | 171 ++--- .../Window_Treatment.xojo_window | 616 +++++++++++------- Utility/App.xojo_code | 12 +- Utility/Class_Linacs.xojo_code | 2 +- Utility/Class_MMCTP_Timer_Windows.xojo_code | 4 +- Utility/Class_Preference.xojo_code | 16 +- Utility/Class_Shell_One.xojo_code | 2 +- Utility/Shell_MMCTP_Download.xojo_code | 4 +- Utility/Shell_MMCTP_Refresh.xojo_code | 8 +- Utility/Shell_MMCTP_Run.xojo_code | 4 +- ...ndow_Configurations_Beam_Model.xojo_window | 124 ++-- ...Window_Configurations_CTModels.xojo_window | 16 +- ...nfigurations_DOSXYZnrcSettings.xojo_window | 42 +- .../Window_Configurations_Shell.xojo_window | 24 +- ...ndow_Configurations_TPS_System.xojo_window | 34 +- Utility/Window_CreatBox.xojo_window | 10 +- Utility/Window_Import_Changes.xojo_window | 2 +- Utility/Window_OpenPatient.xojo_window | 40 +- Utility/Window_Transfer.xojo_window | 53 +- VMC/Thread_VMC.xojo_code | 72 +- VMC/Window_VMC_AdvancedOptions.xojo_window | 92 +-- VMC/Window_VMC_DMXSettings.xojo_window | 32 +- VMC/Window_VMC_Properties.xojo_window | 4 +- Visualization/Class_Structures.xojo_code | 4 +- Visualization/Thread_Contours.xojo_code | 4 +- Visualization/Window_Contouring.xojo_window | 86 ++- .../InternetSession.xojo_code | 6 +- 116 files changed, 3306 insertions(+), 2703 deletions(-) diff --git a/.DS_Store b/.DS_Store index d8d152ce1e17601f80219d04eccc5d512c07b966..e010e7cd0903a1db96f8737325be04533911b777 100644 GIT binary patch delta 129 zcmZoMXfc@J&&aYdU^gQp%Oqxn%{olXj0yY0 or RMAx_cm<=0 Then - MsgBox "RMAX Value in DYNVMLC is below zero! for file "+Inputfile.title + MessageBox "RMAX Value in DYNVMLC is below zero! for file "+Inputfile.title end @@ -988,7 +988,7 @@ Protected Class Class_BEAM 'Normal_or_Overtravel_2=0 'end 'if((leaf_a>=leaf_b) and (leaf_a <> 0.0) and (leaf_b <>0.0)) then - ''MsgBox("leaves colliding! ... exiting ...") + ''MessageBox("leaves colliding! ... exiting ...") 'end 'leaf_a=egs_Input_CM_DYNVMLC_leaveset(leaf_a,Normal_or_Overtravel_1,z_MLC,leaf_radius,z_field) 'leaf_b=egs_Input_CM_DYNVMLC_leaveset(leaf_b,Normal_or_Overtravel_2,z_MLC,leaf_radius,z_field) @@ -1031,69 +1031,79 @@ Protected Class Class_BEAM // Turki M and A. Alexander (2015) // //=================================================== - Dim mlc as Class_MLC - Dim i,j,inum_fields,inum_leaves as Integer - Dim leaf_a, leaf_b as Single - Dim midpoint as Double + 'Dim mlc as Class_MLC + 'Dim i,j,inum_fields,inum_leaves as Integer + 'Dim leaf_a, leaf_b as Single + 'Dim midpoint as Double //=================================================== - MLC = new Class_MLC - MLC = gRTOG.Plan(Plan_Index).Beam(beam_number).mlc - CM.MLCE.Title_CM="MMCTP updated MLCE CM within method egs_Input_CM_MLCE" - midpoint=(cm.MLCE.zmin+cm.MLCE.zmax)/2 - + Var MLC As Class_MLC = gRTOG.Plan(Plan_Index).Beam(beam_number).mlc + CM.MLCE.Title_CM = "MMCTP updated MLCE CM within method egs_Input_CM_MLCE" + Var midpoint As Double = (cm.MLCE.zmin+cm.MLCE.zmax)/2 + https://docs.xojo.com/DatabaseRow - if MLC.NumberofFields=0 or UBound(MLC.Fields)<0 Then //load default setting + If MLC.NumberofFields = 0 Or MLC.Fields.LastRowIndex < 0 Then //load default setting // 0 mode for static fields - CM.MLCE.mode=0 - cm.MLCE.nfield=1 - ReDim cm.MLCE.Field(cm.MLCE.nfield-1) - cm.MLCE.Field(0)=new Class_BEAM_CM_MLC_Leaf_Opening - CM.MLCE.Field(0).Neg=-20.3 - CM.MLCE.Field(0).Pos=20.3 - CM.MLCE.Field(0).Num=cm.MLCE.Num_leaf + CM.MLCE.mode = 0 + CM.MLCE.nfield = 1 + CM.MLCE.Field.ResizeTo(cm.MLCE.nfield-1) + CM.MLCE.Field(0) = New Class_BEAM_CM_MLC_Leaf_Opening + CM.MLCE.Field(0).Neg = -20.3 + CM.MLCE.Field(0).Pos = 20.3 + CM.MLCE.Field(0).Num = cm.MLCE.Num_leaf - else // If we have an MLC file + Else // If we have an MLC file - if InStr(MLC.MLC_Type,"Static")>0 Then + If InStr(MLC.MLC_Type,"Static")>0 Then CM.MLCE.MODE=0 - elseif InStr(MLC.MLC_Type,"Step")>0 Then + Elseif InStr(MLC.MLC_Type,"Step")>0 Then CM.MLCE.MODE=2 - elseif InStr(MLC.MLC_Type,"Dynamic")>0 Then + Elseif InStr(MLC.MLC_Type,"Dynamic")>0 Then + CM.MLCE.MODE=1 - end + End If - inum_fields=MLC.NumberofFields - inum_leaves=mlc.NumberofLeafPairs - ReDim cm.MLCE.Index(inum_fields-1) - ReDim cm.MLCE.Field(inum_fields*MLC.NumberofLeafPairs-1) + Var inum_fields As Integer = MLC.NumberofFields + Var inum_leaves As Integer = mlc.NumberofLeafPairs + CM.MLCE.Index.ResizeTo(inum_fields-1) + CM.MLCE.Field.ResizeTo( inum_fields*MLC.NumberofLeafPairs - 1) - for i=0 to UBound(cm.MLCE.Field) - cm.MLCE.Field(i)=new Class_BEAM_CM_MLC_Leaf_Opening - next + For i As Integer = 0 To CM.MLCE.Field.LastRowIndex + + CM.MLCE.Field(i) = New Class_BEAM_CM_MLC_Leaf_Opening + + Next - if (inum_fields-1)<>UBound(MLC.Fields) Then + If (inum_fields-1) <> MLC.Fields.LastRowIndex Then + gBEAM.egs_msg.append "Error within MLCE2BEAM : number of fields does not match UBound of fields" Return - end + + End If - for i=1 to inum_fields + For i As Integer = 1 To inum_fields // Update index of field - cm.MLCE.Index(i-1)=MLC.Fields(i-1).Indexnum - for j=0 to inum_leaves-1 - cm.MLCE.Field((i-1)*MLC.NumberofLeafPairs+j)=new Class_BEAM_CM_MLC_Leaf_Opening - leaf_a=egs_Input_CM_MLC_RoundedLeaf(MLC.Fields(i-1).Leaf_A(j),midpoint, cm.SYNCMLCE.leafradius,cm.SYNCMLCE.ssd,0) - leaf_b=egs_Input_CM_MLC_RoundedLeaf((-1*MLC.Fields(i-1).Leaf_B(j)), midpoint,cm.SYNCMLCE.leafradius,cm.SYNCMLCE.ssd,1) + CM.MLCE.Index(i-1)=MLC.Fields(i-1).Indexnum + For j As Integer = 0 To inum_leaves-1 - if ((leaf_a<-leaf_b) and (leaf_a <> 0.0) and (leaf_b <>0.0)) then + CM.MLCE.Field((i-1)*MLC.NumberofLeafPairs+j) = New Class_BEAM_CM_MLC_Leaf_Opening + Var leaf_a As Single = egs_Input_CM_MLC_RoundedLeaf(MLC.Fields(i-1).Leaf_A(j),midpoint, _ + CM.SYNCMLCE.leafradius,cm.SYNCMLCE.ssd,0) + Var leaf_b As Single = egs_Input_CM_MLC_RoundedLeaf((-1*MLC.Fields(i-1).Leaf_B(j)), _ + midpoint,cm.SYNCMLCE.leafradius,cm.SYNCMLCE.ssd,1) + + If ((leaf_a<-leaf_b) And (leaf_a <> 0.0) And (leaf_b <>0.0)) Then + gBEAM.egs_msg.append "Error Leaves colliding in MLCE! ..." - end - cm.MLCE.Field((i-1)*MLC.NumberofLeafPairs+j).pos=leaf_a - cm.MLCE.Field((i-1)*MLC.NumberofLeafPairs+j).neg=leaf_b - cm.MLCE.Field((i-1)*MLC.NumberofLeafPairs+j).num=1 - next - next - end + + End If + CM.MLCE.Field((i-1)*MLC.NumberofLeafPairs+j).pos = leaf_a + CM.MLCE.Field((i-1)*MLC.NumberofLeafPairs+j).neg = leaf_b + CM.MLCE.Field((i-1)*MLC.NumberofLeafPairs+j).num = 1 + + Next + Next + End If End Sub #tag EndMethod @@ -1284,7 +1294,7 @@ Protected Class Class_BEAM RMAx_cm=Zmax_lowest*TAN(ACOS(Zmax_lowest/(R_arc+real_thick))+36.8/180*3.1416) if InStr(Str(RMAx_cm),"nan")>0 or RMAx_cm<=0 Then - MsgBox "RMAX Value in DYNVMLC is below zero! for file "+Inputfile.title + MessageBox "RMAX Value in DYNVMLC is below zero! for file "+Inputfile.title end @@ -1305,7 +1315,7 @@ Protected Class Class_BEAM for j=0 to inum_leaves-1 - BEAMMLC.Field(j)=new Class_BEAM_CM_MLC_Leaf_Opening + BEAMMLC.Field(j)=New Class_BEAM_CM_MLC_Leaf_Opening BEAMMLC.Field(j).pos=zmin/100*MLC.Fields(i-1).Leaf_B(j) BEAMMLC.Field(j).neg=-zmin/100*MLC.Fields(i-1).Leaf_A(j) BEAMMLC.Field(j).num=1 @@ -1735,7 +1745,7 @@ Protected Class Class_BEAM 'cm.text(i-1)=wedge_text(i) 'next else - MsgBox "Error in CM Static Wedge! Could not find wedge file "+f.Name + MessageBox "Error in CM Static Wedge! Could not find wedge file "+f.Name end else @@ -2029,7 +2039,7 @@ Protected Class Class_BEAM try beam_input_file=gPref.BEAMnrc_fi.child(inputfile) Catch err As NilObjectException - //MsgBox("The path is invalid!") + //MessageBox("The path is invalid!") end try @@ -2060,7 +2070,7 @@ Protected Class Class_BEAM Return good Exception err as UnsupportedFormatException - //MsgBox err.message+" Error No.: "+Str(err.ErrorNumber) + //MessageBox err.message+" Error No.: "+Str(err.ErrorNumber) End Function #tag EndMethod diff --git a/BEAMnrc/Class_BEAMnrc_PhaseSpace.xojo_code b/BEAMnrc/Class_BEAMnrc_PhaseSpace.xojo_code index 3714381..bc5b470 100644 --- a/BEAMnrc/Class_BEAMnrc_PhaseSpace.xojo_code +++ b/BEAMnrc/Class_BEAMnrc_PhaseSpace.xojo_code @@ -35,7 +35,7 @@ Protected Class Class_BEAMnrc_PhaseSpace bs.position=0 //mb.stringValue(0,mb.size)=bs.read(bs.Length) 'else - 'MsgBox "MB not big enough" + 'MessageBox "MB not big enough" 'Return //end diff --git a/BEAMnrc/Thread_BEAM.xojo_code b/BEAMnrc/Thread_BEAM.xojo_code index 067f529..e841d46 100644 --- a/BEAMnrc/Thread_BEAM.xojo_code +++ b/BEAMnrc/Thread_BEAM.xojo_code @@ -253,44 +253,60 @@ Inherits Thread //Removing previous egsrun beams // //-------------------------------------- - Dim temp ,phspname,sql as String - Dim hh,record_found as Boolean - Dim bb as RTOG_Beam_Geometry - Dim db as SQLiteDatabase //Changed to "SQLiteDatabase by William Davis after REAQLSQPDatabase was found to have been deprecated - Dim f,g,h as FolderItem - Dim rs as RecordSet + 'Dim temp ,phspname,sql As String + 'Dim hh,record_found as Boolean + 'Dim bb as RTOG_Beam_Geometry + 'Dim db as SQLiteDatabase //Changed to "SQLiteDatabase by William Davis after REAQLSQPDatabase was found to have been deprecated + 'Dim f,g,h As FolderItem + 'Dim rs as RecordSet //-------------------------------------- - if Beams(beam).Inputfile.IRESTART=0 then + If Beams(beam).Inputfile.IRESTART = 0 Then // New run - temp=str(beam+1) + Var temp As String = Str(beam+1) // Remove from local folder - f=gRTOG.Plan(Plan_Index).Path - if f<>nil Then - if f.Exists Then - g=f.Child(MC_file_name+temp+".egsinp") - if g<> nil Then - if g.Exists Then - g.Delete - end - end - g=f.Child(MC_file_name+temp+".djaws") - if g<> nil Then - if g.Exists Then - g.Delete - end - end - g=f.Child(MC_file_name+temp+".mlc") - if g<> nil Then - if g.Exists Then - g.Delete - end - end - end - end + Var f As FolderItem = gRTOG.Plan(Plan_Index).Path - h=gRTOG.Plan(Plan_Index).Path + If f<>Nil Then + + If f.Exists Then + Var g As FolderItem = f.Child(MC_file_name+temp+".egsinp") + + If g <> Nil Then + + If g.Exists Then + + g.Remove + + End If + + End If + + g = f.Child(MC_file_name+temp+".djaws") + + If g <> Nil Then + If g.Exists Then + + g.Remove + + End If + End If + + g = Nil + g = f.Child(MC_file_name+temp+".mlc") + + If g <> Nil Then + If g.Exists Then + + g.Remove + + End If + End If + End If + End If + + Var h As FolderItem = gRTOG.Plan(Plan_Index).Path beams(beam).egs_BEAMnrc_active_jobs=0 beams(beam).egs_BEAMnrc_started=False beams(beam).egs_progress=0 @@ -301,61 +317,76 @@ Inherits Thread Beams(beam).egs_phsp_num_particles=0 Beams(beam).egs_phsp_num_photons=0 + Var phspname As String - if Beams(beam).Inputfile.IO_OPT=4 Then + If Beams(beam).Inputfile.IO_OPT=4 Then + phspname=".1.IAEAphsp" - else + + Else + phspname=".egsphsp1" - end - beams(beam).egs_phsp_name=MC_file_name+str(beam+1)+phspname - + + End If + beams(beam).egs_phsp_name = MC_file_name+Str(beam+1) + phspname Beams(beam).egs_Start_Time="" Beams(beam).egs_Sim_Time=0 - hh=egs_Get_Directory(Beam) - temp=str(beam+1) + Var hh As Boolean = egs_Get_Directory(Beam) + temp=Str(beam+1) temp="*_"+MC_file_name+temp+"_*" cc.command= "rm -f -r "+temp - MMCTP_Shell_Run.All.Append cc + MMCTP_Shell_Run.All.AddRow( cc ) hh=egs_Get_Directory(Beam) - temp=str(beam+1) - temp=MC_file_name+temp+"_* "+MC_file_name+temp+".* "+MC_file_name+temp+"*djaws " + + temp = MC_file_name + Str(beam+1) + "_* "+MC_file_name+temp _ + + ".* "+MC_file_name+temp+"*djaws " cc.command= "rm -f "+temp MMCTP_Shell_Run.All.Append cc // Remove beam from database - bb=gRTOG.Plan(Plan_Index).Beam(Beam) + Var bb As RTOG_Beam_Geometry = gRTOG.Plan(Plan_Index).Beam(Beam) - db=PhaseSpace - if bb.FLEC<>nil Then - temp=Format(bb.FLEC.x1,"-#.##")+","+Format(bb.FLEC.x2,"-#.##")+","+Format(bb.FLEC.y1,"-#.##")+","+Format(bb.FLEC.y2,"-#.##") - end + Var db As SQLiteDatabase = PhaseSpace + If bb.FLEC<>Nil Then + + temp = Format(bb.FLEC.x1,"-#.##")+","+Format(bb.FLEC.x2,"-#.##") _ + + "," + Format(bb.FLEC.y1,"-#.##")+","+Format(bb.FLEC.y2,"-#.##") + + End If - if db.Connect Then - sql="select BeamMode,FileName,BeamEnergy,FLECOpening,LinacName,Shell from PhaseSpaces" - rs=db.SQLSelect(sql) - if rs=nil Then + If db.Connect Then + + Var sql as String = "select BeamMode,FileName,BeamEnergy,FLECOpening," _ + + "LinacName,Shell from PhaseSpaces" + Var rs As RowSet = db.SelectSQL(sql) + + If rs=Nil Then + Return - end - record_found=False - While not rs.EOF - if rs.Field("LinacName").StringValue=bb.RT_name and _ - rs.Field("FileName").StringValue=MC_file_name+str(beam+1) and _ - rs.Field("Shell").StringValue=cc.shell.title Then + + End If + Var record_found As Boolean = False + + While Not rs.AfterLastRow + + If rs.Column("LinacName").StringValue=bb.RT_name And _ + rs.Column("FileName").StringValue=MC_file_name+Str(beam+1) And _ + rs.Column("Shell").StringValue=cc.shell.title Then record_found=True - rs.DeleteRecord - db.Commit - exit - end - rs.MoveNext + rs.RemoveRow + db.CommitTransaction + Exit + End + rs.MoveToNextRow Wend rs.Close - end - end + End + End End Sub #tag EndMethod @@ -1013,7 +1044,7 @@ Inherits Thread Exception exc as RuntimeException - MsgBox "oops - there's something wrong" + MessageBox "oops - there's something wrong" End Sub #tag EndMethod @@ -1687,143 +1718,189 @@ Inherits Thread // typea=2 Then // FLEC logic If the number of available jobs is greater than 0, DOSYXZnrc logic // //------------------------------------------ - Dim sql,FLEC,JAW,MLC,WEDGE,APP,shell_name,inputfile(-1) as String - Dim ava_jobs,i,k,shell_index,findex as Integer - Dim found_file(-1) as String - dim good as Boolean - dim tt,record_found as Boolean - Dim bb as RTOG_Beam_Geometry - Dim rs as RecordSet + 'Dim sql,FLEC,JAW,MLC,WEDGE,APP,shell_name,inputfile(-1) as String + 'Dim ava_jobs,i,k,shell_index,findex as Integer + 'Dim found_file(-1) as String + 'dim good as Boolean + 'dim tt,record_found as Boolean + 'Dim bb as RTOG_Beam_Geometry + 'Dim rs As RecordSet //------------------------------------------ - Beams(beam).egs_Phsp_Search=True - bb=gRTOG.Plan(Plan_Index).Beam(Beam) - tt=egs_Get_Directory(Beam) - record_found=False + Beams(beam).egs_Phsp_Search = True + Var bb As RTOG_Beam_Geometry = gRTOG.Plan(Plan_Index).Beam(Beam) + Var tt As Boolean = egs_Get_Directory(Beam) + Var found_file(-1) As String + Var inputfile(-1) As String - if bb.Beam_Mode="FLEC" Then - FLEC=Format(bb.FLEC.x1,"-#.##")+","+Format(bb.FLEC.x2,"-#.##")+","+Format(bb.FLEC.y1,"-#.##")+","+Format(bb.FLEC.y2,"-#.##") - end + Var FLEC As String - App=bb.Aperture_ID - WEDGE=bb.Wedge_Type+bb.Wedge_Angle+bb.Wedge_Rotation + If bb.Beam_Mode="FLEC" Then + + FLEC=Format(bb.FLEC.x1,"-#.##")+","+Format(bb.FLEC.x2,"-#.##")+"," _ + + Format(bb.FLEC.y1,"-#.##")+","+Format(bb.FLEC.y2,"-#.##") + + End If - JAW=Format(bb.Collimator.Fields(0).x1,"-#.##")+","+Format(bb.Collimator.Fields(0).x2,"-#.##")+","+Format(bb.Collimator.Fields(0).y1,"-#.##")+","+Format(bb.Collimator.Fields(0).y2,"-#.##") + Var App As String = bb.Aperture_ID + Var WEDGE As String = bb.Wedge_Type+bb.Wedge_Angle+bb.Wedge_Rotation - if bb.MLC.MLC_Type<>"" Then + Var JAW As String = Format(bb.Collimator.Fields(0).x1,"-#.##")+"," _ + + Format(bb.Collimator.Fields(0).x2,"-#.##")+"," _ + + Format(bb.Collimator.Fields(0).y1,"-#.##")+"," _ + + Format(bb.Collimator.Fields(0).y2,"-#.##") + Var MLC As String + + If bb.MLC.MLC_Type <> "" Then + gRTOG.Plan(Plan_Index).Write_McGill_MLC(beam) - MLC=gRTOG.Plan(Plan_Index).Beam(beam).mlc.mlc_file - end + MLC = gRTOG.Plan(Plan_Index).Beam(beam).mlc.mlc_file + + End If - if PhaseSpace.Connect Then - sql="select BeamMode,FileName,BeamEnergy,FLECOpening,LinacName,Shell,JawOpening,MLCOpening,WEDGE,APP from PhaseSpaces" - rs=PhaseSpace.SQLSelect(sql) - if rs= Nil Then + Var record_found As Boolean = False + + If PhaseSpace.Connect Then + + Var sql As String = "select BeamMode,FileName,BeamEnergy,FLECOpening," _ + + "LinacName,Shell,JawOpening,MLCOpening,WEDGE,APP from PhaseSpaces" + Var rs As RowSet = PhaseSpace.SelectSQL(sql) + + If rs = Nil Then + Return False - end - record_found=False - While not rs.EOF - if bb.Beam_Mode="FLEC" Then - if rs.Field("BeamMode").StringValue=bb.Beam_Mode and _ - rs.Field("BeamEnergy").IntegerValue=val(bb.Beam_Energy) and _ - rs.Field("FLECOpening").StringValue=FLEC and _ - rs.Field("LinacName").StringValue=bb.RT_name and _ - rs.Field("APP").StringValue=APP then + End If + + While Not rs.AfterLastRow + + If bb.Beam_Mode="FLEC" Then + If rs.Column("BeamMode").StringValue = bb.Beam_Mode And _ + rs.Column("BeamEnergy").IntegerValue = Val(bb.Beam_Energy) And _ + rs.Column("FLECOpening").StringValue = FLEC And _ + rs.Column("LinacName").StringValue = bb.RT_name And _ + rs.Column("APP").StringValue = APP Then - //rs.Field("JawOpening").StringValue=JAW and _ - //rs.Field("WEDGE").StringValue=WEDGE and _ - //rs.Field("MLCOpening").StringValue=MLC and _ - inputfile.append rs.Field("FileName").StringValue+".egsphsp1" - found_file.Append rs.Field("Shell").StringValue - record_found=True - end - elseif bb.Beam_Mode="Photon" then - if rs.Field("BeamMode").StringValue=bb.Beam_Mode and _ - rs.Field("BeamEnergy").IntegerValue=val(bb.Beam_Energy) and _ - rs.Field("FLECOpening").StringValue=FLEC and _ - rs.Field("JawOpening").StringValue=JAW and _ - rs.Field("MLCOpening").StringValue=MLC and _ - rs.Field("WEDGE").StringValue=WEDGE and _ - rs.Field("APP").StringValue=APP and _ - rs.Field("LinacName").StringValue=bb.RT_name Then - inputfile.append rs.Field("FileName").StringValue+".egsphsp1" - found_file.Append rs.Field("Shell").StringValue - record_found=True - end + //rs.Column("JawOpening").StringValue=JAW and _ + //rs.Column("WEDGE").StringValue=WEDGE and _ + //rs.Column("MLCOpening").StringValue=MLC and _ + inputfile.AddRow( rs.Column("FileName").StringValue+".egsphsp1" ) + found_file.AddRow( rs.Column("Shell").StringValue ) + record_found = True + End If + Elseif bb.Beam_Mode = "Photon" Then + + If rs.Column("BeamMode").StringValue = bb.Beam_Mode And _ + rs.Column("BeamEnergy").IntegerValue = Val(bb.Beam_Energy) And _ + rs.Column("FLECOpening").StringValue = FLEC And _ + rs.Column("JawOpening").StringValue = JAW And _ + rs.Column("MLCOpening").StringValue = MLC And _ + rs.Column("WEDGE").StringValue = WEDGE And _ + rs.Column("APP").StringValue = APP And _ + rs.Column("LinacName").StringValue = bb.RT_name Then + + inputfile.AddRow( rs.Column("FileName").StringValue+".egsphsp1" ) + found_file.AddRow( rs.Column("Shell").StringValue ) + record_found = True + + End If + Else - else - if rs.Field("BeamMode").StringValue=bb.Beam_Mode and _ - rs.Field("BeamEnergy").IntegerValue=val(bb.Beam_Energy) and _ - rs.Field("FLECOpening").StringValue=FLEC and _ - rs.Field("JawOpening").StringValue=JAW and _ - rs.Field("MLCOpening").StringValue=MLC and _ - rs.Field("WEDGE").StringValue=WEDGE and _ - rs.Field("APP").StringValue=APP and _ - rs.Field("LinacName").StringValue=bb.RT_name Then - inputfile.append rs.Field("FileName").StringValue+".egsphsp1" - found_file.Append rs.Field("Shell").StringValue - record_found=True - end + If rs.Column("BeamMode").StringValue = bb.Beam_Mode And _ + rs.Column("BeamEnergy").IntegerValue = Val(bb.Beam_Energy) And _ + rs.Column("FLECOpening").StringValue = FLEC And _ + rs.Column("JawOpening").StringValue = JAW And _ + rs.Column("MLCOpening").StringValue = MLC And _ + rs.Column("WEDGE").StringValue = WEDGE And _ + rs.Column("APP").StringValue = APP And _ + rs.Column("LinacName").StringValue=bb.RT_name Then + + inputfile.AddRow( rs.Column("FileName").StringValue+".egsphsp1" ) + found_file.AddRow( rs.Column("Shell").StringValue ) + record_found = True + + End If - end + End If + + rs.MoveToNextRow - rs.MoveNext Wend rs.Close - end + End If - ava_jobs=-1 + Var ava_jobs As Integer = -1 - if record_found Then - shell_index=0 - shell_name=found_file(0) - if typea=1 Then // If the beam has finished before, BEAMnrc logic - for i=0 to UBound(found_file) - for k=0 to UBound(gShells.Shells) - if gShells.Shells(k).title=found_file(i) and gShells.Shells(k).online Then - if (gShells.Shells(k).MaxJobs- gShells.Shells(k).ActiveJobs)> ava_jobs Then + If record_found Then + + Var shell_index As Integer = 0 + Var shell_name As String = found_file(0) + + If typea = 1 Then // If the beam has finished before, BEAMnrc logic + + Var findex As Integer + + For i As Integer = 0 To found_file.LastRowIndex + + For k As Integer = 0 To gShells.Shells.LastRowIndex + + If gShells.Shells(k).title=found_file(i) And gShells.Shells(k).online Then + + If (gShells.Shells(k).MaxJobs- gShells.Shells(k).ActiveJobs)> ava_jobs Then + ava_jobs=gShells.Shells(k).MaxJobs- gShells.Shells(k).ActiveJobs - shell_index=k - shell_name=found_file(i) + shell_index = k + shell_name = found_file(i) findex=i - end - end - next - next - gBEAM.Beams(Beam).egs_Shell_Index=shell_index - gBEAM.Beams(Beam).egs_Shell=shell_name - gBEAM.Beams(Beam).egs_Phsp_link=True - gBEAM.Beams(Beam).egs_Phsp_name=inputfile(findex) - gBEAM.Beams(Beam).egs_progress=100 + + End If + + End If + + Next + + Next + + gBEAM.Beams(Beam).egs_Shell_Index = shell_index + gBEAM.Beams(Beam).egs_Shell = shell_name + gBEAM.Beams(Beam).egs_Phsp_link = True + gBEAM.Beams(Beam).egs_Phsp_name = inputfile(findex) + gBEAM.Beams(Beam).egs_progress = 100 gBEAM.Beams(Beam).egs_AddPhsp_Finished=True gBEAM.Beams(Beam).egs_BEAMnrc_started=True MC_Get_Linac_Properties_for_patientdose(beam) Return True - elseif typea=2 Then // FLEC logic If the number of available jobs is greater than 0, DOSYXZnrc logic - for i=0 to UBound(found_file) - for k=0 to UBound(gShells.Shells) - if gShells.Shells(k).title=found_file(i) and gShells.Shells(k).online and Wantedshell_name=found_file(i) Then - shell_index=k - shell_name=found_file(i) - gBEAM.Beams(Beam).egs_Shell_Index=shell_index - gBEAM.Beams(Beam).egs_Shell=shell_name - gBEAM.Beams(Beam).egs_Phsp_link=True - gBEAM.Beams(Beam).egs_Phsp_name=inputfile(i) - gBEAM.Beams(Beam).egs_progress=100 - gBEAM.Beams(Beam).egs_AddPhsp_Finished=True - gBEAM.Beams(Beam).egs_BEAMnrc_started=True + Elseif typea=2 Then + // FLEC logic If the number of available jobs is greater than 0, DOSYXZnrc logic + + For i As Integer = 0 To found_file.LastRowIndex + + For k As Integer = 0 To gShells.Shells.LastRowIndex + + If gShells.Shells(k).title=found_file(i) And _ + gShells.Shells(k).online And _ + Wantedshell_name=found_file(i) Then + + shell_index = k + shell_name = found_file(i) + gBEAM.Beams(Beam).egs_Shell_Index = shell_index + gBEAM.Beams(Beam).egs_Shell = shell_name + gBEAM.Beams(Beam).egs_Phsp_link = True + gBEAM.Beams(Beam).egs_Phsp_name = inputfile(i) + gBEAM.Beams(Beam).egs_progress = 100 + gBEAM.Beams(Beam).egs_AddPhsp_Finished = True + gBEAM.Beams(Beam).egs_BEAMnrc_started = True MC_Get_Linac_Properties_for_patientdose(beam) Return True - end - next - next - end - end + End If + Next + Next + End If + End If Return False End Function #tag EndMethod @@ -1833,78 +1910,109 @@ Inherits Thread //---------------------------------- // Update database //---------------------------------- - dim dr as DatabaseRecord - dim i,k as Integer - dim JAW,MLC,sql,flec,app,wedge as String - dim beam as RTOG_Beam_Geometry - dim tt,record_found as Boolean - dim db as SQLiteDatabase //Changed to "SQLiteDatabase by William Davis after REAQLSQPDatabase was found to have been deprecated - dim rs as RecordSet + 'dim dr as DatabaseRecord + 'dim i,k as Integer + 'dim JAW,MLC,sql,flec,app,wedge as String + 'dim beam as RTOG_Beam_Geometry + 'dim tt,record_found as Boolean + 'dim db as SQLiteDatabase //Changed to "SQLiteDatabase by William Davis after REAQLSQPDatabase was found to have been deprecated + 'dim rs as RecordSet //---------------------------------- - db=PhaseSpace + Var db As SQLiteDatabase = PhaseSpace - if db.Connect Then - dr = new DatabaseRecord - beam=gRTOG.Plan(Plan_Index).Beam(bb) - dr.Column("BeamMode")=gRTOG.Plan(Plan_Index).Beam(bb).beam_mode - dr.Column("FileName")=MC_file_name+str(bb+1) - i=val(gRTOG.Plan(Plan_Index).Beam(bb).Beam_Energy) - dr.Column("BeamEnergy")=str(i) - if gRTOG.Plan(Plan_Index).Beam(bb).beam_mode="FLEC" Then - flec=Format(beam.FLEC.x1,"-#.##")+","+Format(beam.FLEC.x2,"-#.##")+","+Format(beam.FLEC.y1,"-#.##")+","+Format(beam.FLEC.y2,"-#.##") - dr.Column("FLECOpening")=flec - end + If db.Connect Then + Var dr As DatabaseRow + Var beam As RTOG_Beam_Geometry = gRTOG.Plan(Plan_Index).Beam(bb) + dr.Column("BeamMode") = gRTOG.Plan(Plan_Index).Beam(bb).beam_mode + dr.Column("FileName") = MC_file_name+Str(bb+1) + dr.Column("BeamEnergy")=Str( Val(gRTOG.Plan(Plan_Index).Beam(bb).Beam_Energy) ) - App=beam.Aperture_ID - dr.Column("APP")=App - - WEDGE=beam.Wedge_Type+beam.Wedge_Angle+beam.Wedge_Rotation - dr.Column("WEDGE")=wedge + If gRTOG.Plan(Plan_Index).Beam(bb).beam_mode="FLEC" Then + + Var flec as String = Format(beam.FLEC.x1,"-#.##")+"," _ + + Format(beam.FLEC.x2,"-#.##") + "," _ + + Format(beam.FLEC.y1,"-#.##") + "," _ + + Format(beam.FLEC.y2,"-#.##") + + dr.Column("FLECOpening") = flec + + End If - jaw=Format(beam.Collimator.Fields(0).X1,"-#.##")+","+Format(beam.Collimator.Fields(0).X2,"-#.##")+","+Format(beam.Collimator.Fields(0).Y1,"-#.##")+","+Format(beam.Collimator.Fields(0).Y2,"-#.##") - dr.Column("JawOpening")=jaw + dr.Column("APP")= beam.Aperture_ID + dr.Column("WEDGE") = beam.Wedge_Type+beam.Wedge_Angle+beam.Wedge_Rotation + dr.Column("JawOpening") = Format(beam.Collimator.Fields(0).X1,"-#.##") + "," _ + + Format(beam.Collimator.Fields(0).X2,"-#.##") + "," _ + + Format(beam.Collimator.Fields(0).Y1,"-#.##") + "," _ + + Format(beam.Collimator.Fields(0).Y2,"-#.##") - if beam.MLC.MLC_Type<>"" Then + If beam.MLC.MLC_Type <> "" Then + gRTOG.Plan(Plan_Index).Write_McGill_MLC(bb) - mlc=Beam.MLC.MLC_File - dr.Column("MLCOpening")=mlc - end + dr.Column("MLCOpening") = Beam.MLC.MLC_File + + End If dr.Column("LinacName")=gRTOG.Plan(Plan_Index).Beam(bb).RT_name - tt=egs_Get_Directory(bb) - if tt Then + + If egs_Get_Directory(bb) Then + dr.Column("Shell")=cc.shell.title - end + + End + + Var sql as String = "select BeamMode,FileName,BeamEnergy,FLECOpening," _ + + "LinacName,Shell,JawOpening,MLCOpening,WEDGE,APP from PhaseSpaces" + Var rs As RowSet = db.SelectSQL(sql) - sql="select BeamMode,FileName,BeamEnergy,FLECOpening,LinacName,Shell,JawOpening,MLCOpening,WEDGE,APP from PhaseSpaces" - rs=db.SQLSelect(sql) - if rs=Nil Then + If rs = Nil Then + Exit - end - record_found=False - While not rs.EOF - if rs.Field("BeamMode").StringValue=dr.Column("BeamMode") and _ - rs.Field("FileName").StringValue=dr.Column("FileName") and _ - rs.Field("BeamEnergy").IntegerValue=val(dr.Column("BeamEnergy")) and _ - rs.Field("FLECOpening").StringValue=dr.Column("FLECOpening") and _ - rs.Field("LinacName").StringValue=dr.Column("LinacName") and _ - rs.Field("Shell").StringValue=dr.Column("Shell") and _ - rs.Field("JawOpening").StringValue=dr.Column("JawOpening") and _ - rs.Field("WEDGE").StringValue=dr.Column("WEDGE") and _ - rs.Field("APP").StringValue=dr.Column("APP") and _ - rs.Field("MLCOpening").StringValue=dr.Column("MLCOpening") Then - record_found=True - end - rs.MoveNext + + End If + + Var record_found As Boolean = False + + While Not rs.AfterLastRow + + If rs.Column("BeamMode").StringValue = dr.Column("BeamMode").StringValue And _ + rs.Column("FileName").StringValue = dr.Column("FileName").StringValue And _ + rs.Column("BeamEnergy").IntegerValue = dr.Column("BeamEnergy").IntegerValue And _ + rs.Column("FLECOpening").StringValue = dr.Column("FLECOpening").StringValue And _ + rs.Column("LinacName").StringValue = dr.Column("LinacName").StringValue And _ + rs.Column("Shell").StringValue = dr.Column("Shell").StringValue And _ + rs.Column("JawOpening").StringValue = dr.Column("JawOpening").StringValue And _ + rs.Column("WEDGE").StringValue = dr.Column("WEDGE").StringValue And _ + rs.Column("APP").StringValue = dr.Column("APP").StringValue And _ + rs.Column("MLCOpening").StringValue = dr.Column("MLCOpening").StringValue Then + + record_found = True + Exit + + End If + + rs.MoveToNextRow + Wend + rs.Close - if db.Error=False and record_found=False Then - db.InsertRecord "PhaseSpaces", dr - db.Commit - end - end + + If Not record_found Then + + Try + + db.AddRow("PhaseSpaces", dr) + db.CommitTransaction + + Catch error As DatabaseException + + MessageBox("DB Error: " + error.Message) + + End Try + + End If + End If db.Close End Sub diff --git a/BEAMnrc/Window_BEAM_MainInputs.xojo_window b/BEAMnrc/Window_BEAM_MainInputs.xojo_window index 03a7000..98573ff 100644 --- a/BEAMnrc/Window_BEAM_MainInputs.xojo_window +++ b/BEAMnrc/Window_BEAM_MainInputs.xojo_window @@ -2050,25 +2050,25 @@ End if BEAM.ISOURC=0 Then - PopupMenu_Source_Number.ListIndex=0 + PopupMenu_Source_Number.SelectedRowIndex=0 elseif BEAM.ISOURC=1 Then - PopupMenu_Source_Number.ListIndex=1 + PopupMenu_Source_Number.SelectedRowIndex=1 elseif BEAM.ISOURC=3 Then - PopupMenu_Source_Number.ListIndex=2 + PopupMenu_Source_Number.SelectedRowIndex=2 elseif BEAM.ISOURC=19 Then - PopupMenu_Source_Number.ListIndex=11 + PopupMenu_Source_Number.SelectedRowIndex=11 elseif BEAM.ISOURC=21 Then - PopupMenu_Source_Number.ListIndex=12 + PopupMenu_Source_Number.SelectedRowIndex=12 end if BEAM.IBRSPL=2 Then - PopupMenu_Brem_sp.ListIndex=3 + PopupMenu_Brem_sp.SelectedRowIndex=3 elseif BEAM.IBRSPL=29 Then - PopupMenu_Brem_sp.ListIndex=2 + PopupMenu_Brem_sp.SelectedRowIndex=2 else - PopupMenu_Brem_sp.ListIndex=BEAM.IBRSPL + PopupMenu_Brem_sp.SelectedRowIndex=BEAM.IBRSPL end @@ -2077,7 +2077,7 @@ End PopupMenu_Runoptions.AddRow "restart" PopupMenu_Runoptions.AddRow "analyze previous" PopupMenu_Runoptions.AddRow "analyze parellel" - PopupMenu_Runoptions.ListIndex=BEAM.IRESTART + PopupMenu_Runoptions.SelectedRowIndex=BEAM.IRESTART @@ -2091,7 +2091,7 @@ End end if i=0 and i<= UBound(BEAM.CMs) Then @@ -2616,7 +2640,7 @@ End Sub Action() Dim i as Integer - i= Listbox_CMs.ListIndex + i= Listbox_CMs.SelectedRowIndex if i>-1 and i<=UBound(BEAM.CMs) Then if BEAM.CMs(i).CM_Names="APPLICAT" Then diff --git a/BEAMnrc/Window_BEAM_Options.xojo_window b/BEAMnrc/Window_BEAM_Options.xojo_window index e6edcae..7d47d2b 100644 --- a/BEAMnrc/Window_BEAM_Options.xojo_window +++ b/BEAMnrc/Window_BEAM_Options.xojo_window @@ -1428,7 +1428,7 @@ End Main_Refresh=True if Plan_Index>=0 Then - beam_num=Window_Treatment.ListBox_MC_Beam.ListIndex + beam_num=Window_Treatment.ListBox_MC_Beam.SelectedRowIndex if beam_num >= 0 and beam_num<= UBound(gRTOG.Plan(Plan_Index).Beam) Then else @@ -1499,11 +1499,11 @@ End UpdateWindow=False for i = 0 to PopupMenu_JobType.ListCount-1 if PopupMenu_JobType.List(i)= gBEAM.Beams(beam_num).egs_queue then - PopupMenu_JobType.ListIndex = i + PopupMenu_JobType.SelectedRowIndex = i end if next i - PopupMenu_Shell.ListIndex=gBEAM.Beams(beam_num).egs_Shell_Index + PopupMenu_Shell.SelectedRowIndex=gBEAM.Beams(beam_num).egs_Shell_Index EditField_testrun.value = Format(gBEAM.Beams(beam_num).Num_test_hist,"#") CheckBox_Simulation_Start.Caption="Started "+gBEAM.Beams(beam_num).egs_Start_Time+" active jobs : "+str(gBEAM.Beams(beam_num).egs_BEAMnrc_active_jobs) @@ -1567,7 +1567,7 @@ End Exception err If err IsA OutOfBoundsException then - MsgBox "OutOfBoundsException in Refresh Window method" + MessageBox "OutOfBoundsException in Refresh Window method" end if End Sub #tag EndMethod @@ -1707,7 +1707,7 @@ End Sub Change() if Main_Refresh=False Then gBEAM.Beams(beam_num).egs_Shell = me.text - gBEAM.Beams(beam_num).egs_Shell_Index = me.ListIndex + gBEAM.Beams(beam_num).egs_Shell_Index = me.SelectedRowIndex MC_Get_Linac_Properties_for_patientdose(beam_num) end End Sub diff --git a/BEAMnrc/Window_BEAM_Options_APPLICAT.xojo_window b/BEAMnrc/Window_BEAM_Options_APPLICAT.xojo_window index ebb7069..df01407 100644 --- a/BEAMnrc/Window_BEAM_Options_APPLICAT.xojo_window +++ b/BEAMnrc/Window_BEAM_Options_APPLICAT.xojo_window @@ -792,7 +792,7 @@ End donothing=True - i= Window_BEAM_MainInputs.Listbox_CMs.ListIndex + i= Window_BEAM_MainInputs.Listbox_CMs.SelectedRowIndex App=Window_BEAM_MainInputs.BEAM.CMs(i).APPLICAT diff --git a/BEAMnrc/Window_BEAM_Options_APPLICAT_Scrapers.xojo_window b/BEAMnrc/Window_BEAM_Options_APPLICAT_Scrapers.xojo_window index 7403659..cac26cf 100644 --- a/BEAMnrc/Window_BEAM_Options_APPLICAT_Scrapers.xojo_window +++ b/BEAMnrc/Window_BEAM_Options_APPLICAT_Scrapers.xojo_window @@ -144,11 +144,11 @@ End Listbox_Scrapers.DeleteAllRows Listbox_Scrapers.ColumnCount=app.N_APPLICAT+1 - Listbox_Scrapers.Heading(0)="Scraper" + Listbox_Scrapers.HeaderAt(0)="Scraper" temp="300" for i=1 to app.N_APPLICAT temp=temp+", 150" - Listbox_Scrapers.Heading(i)=Str(i) + Listbox_Scrapers.HeaderAt(i)=Str(i) next Listbox_Scrapers.ColumnWidths=temp @@ -162,13 +162,13 @@ End Listbox_Scrapers.AddRow "Material" for i=1 to app.N_APPLICAT Listbox_Scrapers.ColumnType(i)=3 - Listbox_Scrapers.Cell(0,i)=Format(app.ZMIN_APPLICAT(i-1),"-#.###") - Listbox_Scrapers.Cell(1,i)=Format(app.ZTHICK_APPLICAT(i-1),"-#.###") - Listbox_Scrapers.Cell(2,i)=Format(app.XMIN_APPLICAT(i-1),"-#.###") - Listbox_Scrapers.Cell(3,i)=Format(app.WIDTHX_APPLICAT(i-1),"-#.###") - Listbox_Scrapers.Cell(4,i)=Format(app.DOSE_ZONE(i-1),"#") - Listbox_Scrapers.Cell(5,i)=Format(app.IREGION_TO_BIT(i-1),"#") - Listbox_Scrapers.Cell(6,i)=app.MED_IN(i-1) + Listbox_Scrapers.CellValueAt(0,i)=Format(app.ZMIN_APPLICAT(i-1),"-#.###") + Listbox_Scrapers.CellValueAt(1,i)=Format(app.ZTHICK_APPLICAT(i-1),"-#.###") + Listbox_Scrapers.CellValueAt(2,i)=Format(app.XMIN_APPLICAT(i-1),"-#.###") + Listbox_Scrapers.CellValueAt(3,i)=Format(app.WIDTHX_APPLICAT(i-1),"-#.###") + Listbox_Scrapers.CellValueAt(4,i)=Format(app.DOSE_ZONE(i-1),"#") + Listbox_Scrapers.CellValueAt(5,i)=Format(app.IREGION_TO_BIT(i-1),"#") + Listbox_Scrapers.CellValueAt(6,i)=app.MED_IN(i-1) next elseif app.Ishape=1 Then @@ -184,15 +184,15 @@ End for i=1 to app.N_APPLICAT Listbox_Scrapers.ColumnType(i)=3 - Listbox_Scrapers.Cell(0,i)=Format(app.ZMIN_APPLICAT(i-1),"-#.###") - Listbox_Scrapers.Cell(1,i)=Format(app.ZTHICK_APPLICAT(i-1),"-#.###") - Listbox_Scrapers.Cell(2,i)=Format(app.XMIN_APPLICAT(i-1),"-#.###") - Listbox_Scrapers.Cell(3,i)=Format(app.YMIN_APPLICAT(i-1),"-#.###") - Listbox_Scrapers.Cell(4,i)=Format(app.WIDTHX_APPLICAT(i-1),"-#.###") - Listbox_Scrapers.Cell(5,i)=Format(app.WIDTHY_APPLICAT(i-1),"-#.###") - Listbox_Scrapers.Cell(6,i)=Format(app.DOSE_ZONE(i-1),"#") - Listbox_Scrapers.Cell(7,i)=Format(app.IREGION_TO_BIT(i-1),"#") - Listbox_Scrapers.Cell(8,i)=app.MED_IN(i-1) + Listbox_Scrapers.CellValueAt(0,i)=Format(app.ZMIN_APPLICAT(i-1),"-#.###") + Listbox_Scrapers.CellValueAt(1,i)=Format(app.ZTHICK_APPLICAT(i-1),"-#.###") + Listbox_Scrapers.CellValueAt(2,i)=Format(app.XMIN_APPLICAT(i-1),"-#.###") + Listbox_Scrapers.CellValueAt(3,i)=Format(app.YMIN_APPLICAT(i-1),"-#.###") + Listbox_Scrapers.CellValueAt(4,i)=Format(app.WIDTHX_APPLICAT(i-1),"-#.###") + Listbox_Scrapers.CellValueAt(5,i)=Format(app.WIDTHY_APPLICAT(i-1),"-#.###") + Listbox_Scrapers.CellValueAt(6,i)=Format(app.DOSE_ZONE(i-1),"#") + Listbox_Scrapers.CellValueAt(7,i)=Format(app.IREGION_TO_BIT(i-1),"#") + Listbox_Scrapers.CellValueAt(8,i)=app.MED_IN(i-1) next end End Sub @@ -230,57 +230,57 @@ End if column>=1 Then if app.Ishape=1 Then // for rect shapes if row=0 Then - app.ZMIN_APPLICAT(column-1)=val(me.Cell(row,column)) + app.ZMIN_APPLICAT(column-1)=val(me.CellValueAt(row,column)) elseif row=1 Then - app.ZTHICK_APPLICAT(column-1)=val(me.Cell(row,column)) + app.ZTHICK_APPLICAT(column-1)=val(me.CellValueAt(row,column)) elseif row=2 Then - app.XMIN_APPLICAT(column-1)=val(me.Cell(row,column)) + app.XMIN_APPLICAT(column-1)=val(me.CellValueAt(row,column)) elseif row=3 Then - app.YMIN_APPLICAT(column-1)=val(me.Cell(row,column)) + app.YMIN_APPLICAT(column-1)=val(me.CellValueAt(row,column)) elseif row=4 Then - app.WIDTHX_APPLICAT(column-1)=val(me.Cell(row,column)) + app.WIDTHX_APPLICAT(column-1)=val(me.CellValueAt(row,column)) elseif row=5 Then - app.WIDTHY_APPLICAT(column-1)=val(me.Cell(row,column)) + app.WIDTHY_APPLICAT(column-1)=val(me.CellValueAt(row,column)) elseif row=6 Then - app.DOSE_ZONE(column-1)=val(me.Cell(row,column)) + app.DOSE_ZONE(column-1)=val(me.CellValueAt(row,column)) elseif row=7 Then - app.IREGION_TO_BIT(column-1)=val(me.Cell(row,column)) + app.IREGION_TO_BIT(column-1)=val(me.CellValueAt(row,column)) elseif row=8 Then - app.MED_IN(column-1)=trim(me.Cell(row,column)) + app.MED_IN(column-1)=trim(me.CellValueAt(row,column)) end elseif app.Ishape=0 Then // For square shapes if row=0 Then - app.ZMIN_APPLICAT(column-1)=val(me.Cell(row,column)) + app.ZMIN_APPLICAT(column-1)=val(me.CellValueAt(row,column)) elseif row=1 Then - app.ZTHICK_APPLICAT(column-1)=val(me.Cell(row,column)) + app.ZTHICK_APPLICAT(column-1)=val(me.CellValueAt(row,column)) elseif row=2 Then - app.XMIN_APPLICAT(column-1)=val(me.Cell(row,column)) + app.XMIN_APPLICAT(column-1)=val(me.CellValueAt(row,column)) elseif row=3 Then - app.WIDTHX_APPLICAT(column-1)=val(me.Cell(row,column)) + app.WIDTHX_APPLICAT(column-1)=val(me.CellValueAt(row,column)) elseif row=4 Then - app.DOSE_ZONE(column-1)=val(me.Cell(row,column)) + app.DOSE_ZONE(column-1)=val(me.CellValueAt(row,column)) elseif row=5 Then - app.IREGION_TO_BIT(column-1)=val(me.Cell(row,column)) + app.IREGION_TO_BIT(column-1)=val(me.CellValueAt(row,column)) elseif row=6 Then - app.MED_IN(column-1)=trim(me.Cell(row,column)) + app.MED_IN(column-1)=trim(me.CellValueAt(row,column)) end diff --git a/BEAMnrc/Window_BEAM_Options_BLOCK.xojo_window b/BEAMnrc/Window_BEAM_Options_BLOCK.xojo_window index fdd9482..86d58d1 100644 --- a/BEAMnrc/Window_BEAM_Options_BLOCK.xojo_window +++ b/BEAMnrc/Window_BEAM_Options_BLOCK.xojo_window @@ -1460,7 +1460,7 @@ End donothing=True - i= Window_BEAM_MainInputs.Listbox_CMs.ListIndex + i= Window_BEAM_MainInputs.Listbox_CMs.SelectedRowIndex BLOCK=Window_BEAM_MainInputs.BEAM.CMs(i).BLOCK @@ -1508,9 +1508,9 @@ End PopupMenu_Subregion.AddRow str(i+1) next - PopupMenu_Subregion.ListIndex=0 + PopupMenu_Subregion.SelectedRowIndex=0 - i=PopupMenu_Subregion.ListIndex + i=PopupMenu_Subregion.SelectedRowIndex if i>-1 and i<=UBound(BLOCK.Subregions) Then EditField_numsubregion_points.value = str(Block.Subregions(i).NSUB_BLOCK) end @@ -1573,7 +1573,7 @@ End end next - PopupMenu_Subregion.ListIndex=0 + PopupMenu_Subregion.SelectedRowIndex=0 @@ -1595,7 +1595,7 @@ End Dim i as Integer - i=Window_BEAM_Options_BLOCK.PopupMenu_Subregion.ListIndex + i=Window_BEAM_Options_BLOCK.PopupMenu_Subregion.SelectedRowIndex if i>-1 and i<=UBound(BLOCK.Subregions) Then Window_BEAM_Options_BLOCK_Points.Show @@ -1686,7 +1686,7 @@ End Sub Change() Dim i as Integer - i=PopupMenu_Subregion.ListIndex + i=PopupMenu_Subregion.SelectedRowIndex if i>-1 and i<=UBound(BLOCK.Subregions) Then EditField_numsubregion_points.value = str(Block.Subregions(i).NSUB_BLOCK) end @@ -1700,7 +1700,7 @@ End if donothing=False Then - i=PopupMenu_Subregion.ListIndex + i=PopupMenu_Subregion.SelectedRowIndex if i>-1 and i<=UBound(BLOCK.Subregions) Then Block.Subregions(i).NSUB_BLOCK=val(me.Text) diff --git a/BEAMnrc/Window_BEAM_Options_BLOCK_Points.xojo_window b/BEAMnrc/Window_BEAM_Options_BLOCK_Points.xojo_window index 41b0213..8b2918b 100644 --- a/BEAMnrc/Window_BEAM_Options_BLOCK_Points.xojo_window +++ b/BEAMnrc/Window_BEAM_Options_BLOCK_Points.xojo_window @@ -119,7 +119,7 @@ End donothing=True - i=Window_BEAM_Options_BLOCK.PopupMenu_Subregion.ListIndex + i=Window_BEAM_Options_BLOCK.PopupMenu_Subregion.SelectedRowIndex App=Window_BEAM_Options_BLOCK.BLOCK.Subregions(i) @@ -141,9 +141,9 @@ End Listbox_Points.DeleteAllRows - Listbox_Points.Heading(0)="Point" - Listbox_Points.Heading(1)="X" - Listbox_Points.Heading(2)="Y" + Listbox_Points.HeaderAt(0)="Point" + Listbox_Points.HeaderAt(1)="X" + Listbox_Points.HeaderAt(2)="Y" Listbox_Points.ColumnType(1)=3 Listbox_Points.ColumnType(2)=3 @@ -156,8 +156,8 @@ End for i=1 to app.NSUB_BLOCK Listbox_Points.AddRow str(i) - Listbox_Points.Cell(i-1,1)=Format(app.XHI_POINT_BLOCK(i-1),"-#.###") - Listbox_Points.Cell(i-1,2)=Format(app.yHI_POINT_BLOCK(i-1),"-#.###") + Listbox_Points.CellValueAt(i-1,1)=Format(app.XHI_POINT_BLOCK(i-1),"-#.###") + Listbox_Points.CellValueAt(i-1,2)=Format(app.yHI_POINT_BLOCK(i-1),"-#.###") next @@ -193,8 +193,8 @@ End Sub CellTextChange(row as Integer, column as Integer) if donothing=False Then if column=1 or column=2 Then - app.XHI_POINT_BLOCK(row)=val(me.Cell(row,1)) - app.yHI_POINT_BLOCK(row)=val(me.Cell(row,2)) + app.XHI_POINT_BLOCK(row)=val(me.CellValueAt(row,1)) + app.yHI_POINT_BLOCK(row)=val(me.CellValueAt(row,2)) end end End Sub diff --git a/BEAMnrc/Window_BEAM_Options_BremSplitUniform.xojo_window b/BEAMnrc/Window_BEAM_Options_BremSplitUniform.xojo_window index 5d80bbb..a8a328b 100644 --- a/BEAMnrc/Window_BEAM_Options_BremSplitUniform.xojo_window +++ b/BEAMnrc/Window_BEAM_Options_BremSplitUniform.xojo_window @@ -238,10 +238,10 @@ End if Window_BEAM_MainInputs.BEAM.IRRLTT>0 Then - PopupMenu1.ListIndex=1 + PopupMenu1.SelectedRowIndex=1 else - PopupMenu1.ListIndex=0 + PopupMenu1.SelectedRowIndex=0 end End Sub #tag EndMethod @@ -264,7 +264,7 @@ End #tag Events PushButton1 #tag Event Sub Action() - if PopupMenu1.ListIndex=0 Then + if PopupMenu1.SelectedRowIndex=0 Then Window_BEAM_MainInputs.BEAM.IRRLTT=0 diff --git a/BEAMnrc/Window_BEAM_Options_DYNJAWS.xojo_window b/BEAMnrc/Window_BEAM_Options_DYNJAWS.xojo_window index 667e1cc..e6eca27 100644 --- a/BEAMnrc/Window_BEAM_Options_DYNJAWS.xojo_window +++ b/BEAMnrc/Window_BEAM_Options_DYNJAWS.xojo_window @@ -882,7 +882,7 @@ End donothing=True - i= Window_BEAM_MainInputs.Listbox_CMs.ListIndex + i= Window_BEAM_MainInputs.Listbox_CMs.SelectedRowIndex S=Window_BEAM_MainInputs.BEAM.CMs(i).DYNJAWS diff --git a/BEAMnrc/Window_BEAM_Options_DYNJAWS_MOTION.xojo_window b/BEAMnrc/Window_BEAM_Options_DYNJAWS_MOTION.xojo_window index d486fe4..ed0d057 100644 --- a/BEAMnrc/Window_BEAM_Options_DYNJAWS_MOTION.xojo_window +++ b/BEAMnrc/Window_BEAM_Options_DYNJAWS_MOTION.xojo_window @@ -256,13 +256,13 @@ End Listbox_Pairs.DeleteAllRows - Listbox_Pairs.Heading(0)="Index" - Listbox_Pairs.Heading(1)="Zmin" - Listbox_Pairs.Heading(2)="Zmax" - Listbox_Pairs.Heading(3)="XFP" - Listbox_Pairs.Heading(4)="XBP" - Listbox_Pairs.Heading(5)="XFN" - Listbox_Pairs.Heading(6)="XBN" + Listbox_Pairs.HeaderAt(0)="Index" + Listbox_Pairs.HeaderAt(1)="Zmin" + Listbox_Pairs.HeaderAt(2)="Zmax" + Listbox_Pairs.HeaderAt(3)="XFP" + Listbox_Pairs.HeaderAt(4)="XBP" + Listbox_Pairs.HeaderAt(5)="XFN" + Listbox_Pairs.HeaderAt(6)="XBN" @@ -271,12 +271,12 @@ End for i=1 to app.Number_Fields ffindex=(i-1)*app.ISCM_MAX+Pair_Index Listbox_Pairs.AddRow Format(app.Index(i-1),"-#.####") - Listbox_Pairs.Cell(i-1,1)= Format(app.DYN_Openings(ffindex).zmin_jaws,"-#.####") - Listbox_Pairs.Cell(i-1,2)= Format(app.DYN_Openings(ffindex).zmax_jaws,"-#.####") - Listbox_Pairs.Cell(i-1,3)= Format(app.DYN_Openings(ffindex).XFP_jaws,"-#.####") - Listbox_Pairs.Cell(i-1,4)= Format(app.DYN_Openings(ffindex).XBP_jaws,"-#.####") - Listbox_Pairs.Cell(i-1,5)= Format(app.DYN_Openings(ffindex).XFN_jaws,"-#.####") - Listbox_Pairs.Cell(i-1,6)= Format(app.DYN_Openings(ffindex).XBN_jaws,"-#.####") + Listbox_Pairs.CellValueAt(i-1,1)= Format(app.DYN_Openings(ffindex).zmin_jaws,"-#.####") + Listbox_Pairs.CellValueAt(i-1,2)= Format(app.DYN_Openings(ffindex).zmax_jaws,"-#.####") + Listbox_Pairs.CellValueAt(i-1,3)= Format(app.DYN_Openings(ffindex).XFP_jaws,"-#.####") + Listbox_Pairs.CellValueAt(i-1,4)= Format(app.DYN_Openings(ffindex).XBP_jaws,"-#.####") + Listbox_Pairs.CellValueAt(i-1,5)= Format(app.DYN_Openings(ffindex).XFN_jaws,"-#.####") + Listbox_Pairs.CellValueAt(i-1,6)= Format(app.DYN_Openings(ffindex).XBN_jaws,"-#.####") next end End Sub @@ -318,42 +318,42 @@ End 'if column>=1 Then ' 'if row=0 Then - 'app.XY_Choice(column-1)=(me.Cell(row,column)) + 'app.XY_Choice(column-1)=(me.CellValueAt(row,column)) ' 'elseif row=1 Then - 'app.ZMIN_JAWS(column-1)=val(me.Cell(row,column)) + 'app.ZMIN_JAWS(column-1)=val(me.CellValueAt(row,column)) ' ' 'elseif row=2 Then - 'app.ZMAX_JAWS(column-1)=val(me.Cell(row,column)) + 'app.ZMAX_JAWS(column-1)=val(me.CellValueAt(row,column)) ' 'elseif row=3 Then - 'app.XFP_JAWS(column-1)=val(me.Cell(row,column)) + 'app.XFP_JAWS(column-1)=val(me.CellValueAt(row,column)) ' 'elseif row=4 Then - 'app.XBP_JAWS(column-1)=val(me.Cell(row,column)) + 'app.XBP_JAWS(column-1)=val(me.CellValueAt(row,column)) ' 'elseif row=5 Then - 'app.XFN_JAWS(column-1)=val(me.Cell(row,column)) + 'app.XFN_JAWS(column-1)=val(me.CellValueAt(row,column)) ' 'elseif row=6 Then - 'app.XBN_JAWS(column-1)=val(me.Cell(row,column)) + 'app.XBN_JAWS(column-1)=val(me.CellValueAt(row,column)) ' 'elseif row=7 Then - 'app.ECUT_Jaws(column-1)=val(me.Cell(row,column)) + 'app.ECUT_Jaws(column-1)=val(me.CellValueAt(row,column)) ' 'elseif row=8 Then - 'app.pCUT_Jaws(column-1)=val(me.Cell(row,column)) + 'app.pCUT_Jaws(column-1)=val(me.CellValueAt(row,column)) ' 'elseif row=9 Then - 'app.Dose_zone_Jaws(column-1)=val(me.Cell(row,column)) + 'app.Dose_zone_Jaws(column-1)=val(me.CellValueAt(row,column)) ' 'elseif row=10 Then - 'app.IREGION_to_bit_Jaws(column-1)=val(me.Cell(row,column)) + 'app.IREGION_to_bit_Jaws(column-1)=val(me.CellValueAt(row,column)) ' ' 'elseif row=11 Then - 'app.Medium_Jaws(column-1)=trim(me.Cell(row,column)) + 'app.Medium_Jaws(column-1)=trim(me.CellValueAt(row,column)) 'end 'end 'end @@ -363,7 +363,7 @@ End #tag Events PopupMenu_Pairs #tag Event Sub Change() - Pair_Index=me.ListIndex + Pair_Index=me.SelectedRowIndex Refresh_window End Sub #tag EndEvent diff --git a/BEAMnrc/Window_BEAM_Options_DYNJAWS_PARIS.xojo_window b/BEAMnrc/Window_BEAM_Options_DYNJAWS_PARIS.xojo_window index 5914b9b..eb6ee3c 100644 --- a/BEAMnrc/Window_BEAM_Options_DYNJAWS_PARIS.xojo_window +++ b/BEAMnrc/Window_BEAM_Options_DYNJAWS_PARIS.xojo_window @@ -140,11 +140,11 @@ End Listbox_Pairs.DeleteAllRows Listbox_Pairs.ColumnCount=app.ISCM_MAX+1 - Listbox_Pairs.Heading(0)="Jaw Variables" + Listbox_Pairs.HeaderAt(0)="Jaw Variables" temp="400" for i=1 to app.ISCM_MAX temp=temp+", 150" - Listbox_Pairs.Heading(i)=Str(i) + Listbox_Pairs.HeaderAt(i)=Str(i) next Listbox_Pairs.ColumnWidths=temp @@ -167,12 +167,12 @@ End for i=1 to app.ISCM_MAX Listbox_Pairs.ColumnType(i)=3 - Listbox_Pairs.Cell(0,i)=app.XY_Choice(i-1) - Listbox_Pairs.Cell(1,i)=Format(app.ECUT_Jaws(i-1),"-#.###") - Listbox_Pairs.Cell(2,i)=Format(app.PCUT_Jaws(i-1),"-#.###") - Listbox_Pairs.Cell(3,i)=Format(app.Dose_zone_Jaws(i-1),"#") - Listbox_Pairs.Cell(4,i)=Format(app.IREGION_to_bit_Jaws(i-1),"#") - Listbox_Pairs.Cell(5,i)=app.Medium_Jaws(i-1) + Listbox_Pairs.CellValueAt(0,i)=app.XY_Choice(i-1) + Listbox_Pairs.CellValueAt(1,i)=Format(app.ECUT_Jaws(i-1),"-#.###") + Listbox_Pairs.CellValueAt(2,i)=Format(app.PCUT_Jaws(i-1),"-#.###") + Listbox_Pairs.CellValueAt(3,i)=Format(app.Dose_zone_Jaws(i-1),"#") + Listbox_Pairs.CellValueAt(4,i)=Format(app.IREGION_to_bit_Jaws(i-1),"#") + Listbox_Pairs.CellValueAt(5,i)=app.Medium_Jaws(i-1) next @@ -212,42 +212,42 @@ End 'if column>=1 Then ' 'if row=0 Then - 'app.XY_Choice(column-1)=(me.Cell(row,column)) + 'app.XY_Choice(column-1)=(me.CellValueAt(row,column)) ' 'elseif row=1 Then - 'app.ZMIN_JAWS(column-1)=val(me.Cell(row,column)) + 'app.ZMIN_JAWS(column-1)=val(me.CellValueAt(row,column)) ' ' 'elseif row=2 Then - 'app.ZMAX_JAWS(column-1)=val(me.Cell(row,column)) + 'app.ZMAX_JAWS(column-1)=val(me.CellValueAt(row,column)) ' 'elseif row=3 Then - 'app.XFP_JAWS(column-1)=val(me.Cell(row,column)) + 'app.XFP_JAWS(column-1)=val(me.CellValueAt(row,column)) ' 'elseif row=4 Then - 'app.XBP_JAWS(column-1)=val(me.Cell(row,column)) + 'app.XBP_JAWS(column-1)=val(me.CellValueAt(row,column)) ' 'elseif row=5 Then - 'app.XFN_JAWS(column-1)=val(me.Cell(row,column)) + 'app.XFN_JAWS(column-1)=val(me.CellValueAt(row,column)) ' 'elseif row=6 Then - 'app.XBN_JAWS(column-1)=val(me.Cell(row,column)) + 'app.XBN_JAWS(column-1)=val(me.CellValueAt(row,column)) ' 'elseif row=7 Then - 'app.ECUT_Jaws(column-1)=val(me.Cell(row,column)) + 'app.ECUT_Jaws(column-1)=val(me.CellValueAt(row,column)) ' 'elseif row=8 Then - 'app.pCUT_Jaws(column-1)=val(me.Cell(row,column)) + 'app.pCUT_Jaws(column-1)=val(me.CellValueAt(row,column)) ' 'elseif row=9 Then - 'app.Dose_zone_Jaws(column-1)=val(me.Cell(row,column)) + 'app.Dose_zone_Jaws(column-1)=val(me.CellValueAt(row,column)) ' 'elseif row=10 Then - 'app.IREGION_to_bit_Jaws(column-1)=val(me.Cell(row,column)) + 'app.IREGION_to_bit_Jaws(column-1)=val(me.CellValueAt(row,column)) ' ' 'elseif row=11 Then - 'app.Medium_Jaws(column-1)=trim(me.Cell(row,column)) + 'app.Medium_Jaws(column-1)=trim(me.CellValueAt(row,column)) 'end 'end 'end diff --git a/BEAMnrc/Window_BEAM_Options_DYNVMLC.xojo_window b/BEAMnrc/Window_BEAM_Options_DYNVMLC.xojo_window index a3cda23..3306318 100644 --- a/BEAMnrc/Window_BEAM_Options_DYNVMLC.xojo_window +++ b/BEAMnrc/Window_BEAM_Options_DYNVMLC.xojo_window @@ -2170,7 +2170,7 @@ End donothing=True - i= Window_BEAM_MainInputs.Listbox_CMs.ListIndex + i= Window_BEAM_MainInputs.Listbox_CMs.SelectedRowIndex DYNVMLC=Window_BEAM_MainInputs.BEAM.CMs(i).DYNVMLC @@ -2241,11 +2241,11 @@ End if DYNVMLC.Endtype=0 Then - PopupMenu_Leaftype.ListIndex=0 + PopupMenu_Leaftype.SelectedRowIndex=0 StaticText_Radius.value = "Radius of leaf ends" EditField_Zfocus_and_Radiusleafend.value = Format(DYNVMLC.Leafradius,"-#.#####") elseif DYNVMLC.Endtype=1 Then - PopupMenu_Leaftype.ListIndex=1 + PopupMenu_Leaftype.SelectedRowIndex=1 StaticText_Radius.value = "Zfocus of leaf ends" EditField_Zfocus_and_Radiusleafend.value = Format(DYNVMLC.zfocus_ends,"-#.#####") end @@ -2391,7 +2391,7 @@ End Sub Change() if donothing=False Then - DYNVMLC.Endtype=me.ListIndex + DYNVMLC.Endtype=me.SelectedRowIndex Refresh_window diff --git a/BEAMnrc/Window_BEAM_Options_DYNVMLC_LeafOffsets.xojo_window b/BEAMnrc/Window_BEAM_Options_DYNVMLC_LeafOffsets.xojo_window index f52a8f1..c3d81e8 100644 --- a/BEAMnrc/Window_BEAM_Options_DYNVMLC_LeafOffsets.xojo_window +++ b/BEAMnrc/Window_BEAM_Options_DYNVMLC_LeafOffsets.xojo_window @@ -122,9 +122,9 @@ End Dim correctedleaf,correctedleafB, offset, offsetB,z_MLC,iso as Double //---------------------------- - Listbox_Openings.Heading(0)="From Pos (cm)" - Listbox_Openings.Heading(1)="Offset (cm) at MLC plane for bank A" - Listbox_Openings.Heading(2)="Offset (cm) at MLC plane for bank B" + Listbox_Openings.HeaderAt(0)="From Pos (cm)" + Listbox_Openings.HeaderAt(1)="Offset (cm) at MLC plane for bank A" + Listbox_Openings.HeaderAt(2)="Offset (cm) at MLC plane for bank B" DVMLC=Window_BEAM_Options_DYNVMLC.DYNVMLC @@ -140,8 +140,8 @@ End offset=correctedleaf-i*z_MLC/iso correctedleafB=gBEAM.Beams(findex).egs_Input_CM_MLC_RoundedLeaf(i,z_MLC,DVMLC.Leafradius,iso,1) offsetB=-1*(i*z_MLC/iso-correctedleafB) - Listbox_Openings.Cell(i+20,1)=Format(offset,"-#.#####") - Listbox_Openings.Cell(i+20,2)=Format(offsetB,"-#.#####") + Listbox_Openings.CellValueAt(i+20,1)=Format(offset,"-#.#####") + Listbox_Openings.CellValueAt(i+20,2)=Format(offsetB,"-#.#####") next diff --git a/BEAMnrc/Window_BEAM_Options_DYNVMLC_LeafOpenings.xojo_window b/BEAMnrc/Window_BEAM_Options_DYNVMLC_LeafOpenings.xojo_window index 88c9464..0f7cd38 100644 --- a/BEAMnrc/Window_BEAM_Options_DYNVMLC_LeafOpenings.xojo_window +++ b/BEAMnrc/Window_BEAM_Options_DYNVMLC_LeafOpenings.xojo_window @@ -149,10 +149,10 @@ End Sub Open() Dim i as Integer - Listbox_Openings.Heading(0)="From leaf" - Listbox_Openings.Heading(1)="to leaf" - Listbox_Openings.Heading(2)="min opening" - Listbox_Openings.Heading(3)="max opening" + Listbox_Openings.HeaderAt(0)="From leaf" + Listbox_Openings.HeaderAt(1)="to leaf" + Listbox_Openings.HeaderAt(2)="min opening" + Listbox_Openings.HeaderAt(3)="max opening" DVMLC=Window_BEAM_Options_DYNVMLC.DYNVMLC @@ -171,16 +171,16 @@ End Sub Pop_Opening() Dim i,row as Integer - findex=PopupMenu_fields.ListIndex + findex=PopupMenu_fields.SelectedRowIndex Listbox_Openings.DeleteAllRows if findex<=UBound(DVMLC.Fields) and findex>-1 Then row=0 for i=1 to DVMLC.Numleaves Listbox_Openings.AddRow str(i) - Listbox_Openings.Cell(row,1)=str(i+DVMLC.Fields(findex).leaves(row).Num-1) - Listbox_Openings.Cell(row,2)=Format(DVMLC.Fields(findex).leaves(row).Neg,"-#.#####") - Listbox_Openings.Cell(row,3)=Format(DVMLC.Fields(findex).leaves(row).Pos,"-#.#####") + Listbox_Openings.CellValueAt(row,1)=str(i+DVMLC.Fields(findex).leaves(row).Num-1) + Listbox_Openings.CellValueAt(row,2)=Format(DVMLC.Fields(findex).leaves(row).Neg,"-#.#####") + Listbox_Openings.CellValueAt(row,3)=Format(DVMLC.Fields(findex).leaves(row).Pos,"-#.#####") i=i+DVMLC.Fields(findex).leaves(row).Num-1 row=row+1 diff --git a/BEAMnrc/Window_BEAM_Options_DYNVMLC_Leaftype.xojo_window b/BEAMnrc/Window_BEAM_Options_DYNVMLC_Leaftype.xojo_window index 9f28d07..9a11376 100644 --- a/BEAMnrc/Window_BEAM_Options_DYNVMLC_Leaftype.xojo_window +++ b/BEAMnrc/Window_BEAM_Options_DYNVMLC_Leaftype.xojo_window @@ -183,10 +183,10 @@ End DVMLC=Window_BEAM_Options_DYNVMLC.DYNVMLC - Listbox_Type.Heading(0)="Start Leaf" - Listbox_Type.Heading(1)="End Leaf" - Listbox_Type.Heading(2)="FULL leaves" - Listbox_Type.Heading(3)="TARGET/ISOCENTER Pair" + Listbox_Type.HeaderAt(0)="Start Leaf" + Listbox_Type.HeaderAt(1)="End Leaf" + Listbox_Type.HeaderAt(2)="FULL leaves" + Listbox_Type.HeaderAt(3)="TARGET/ISOCENTER Pair" Listbox_Type.ColumnWidths="20%,20%,20%,40%" RefreshList @@ -207,7 +207,7 @@ End num=1 for i=0 to DVMLC.NGROUP_DYNVMLC-1 Listbox_Type.AddRow str(num) - Listbox_Type.Cell(i,1)=Format(DVMLC.Groups(i).Numleaves+num-1,"#") + Listbox_Type.CellValueAt(i,1)=Format(DVMLC.Groups(i).Numleaves+num-1,"#") num=DVMLC.Groups(i).Numleaves+num if DVMLC.Groups(i).Leaftype=1 Then Listbox_Type.CellCheck(i,2)=True diff --git a/BEAMnrc/Window_BEAM_Options_DirecBremPhoto.xojo_window b/BEAMnrc/Window_BEAM_Options_DirecBremPhoto.xojo_window index 0278ee1..5d67b11 100644 --- a/BEAMnrc/Window_BEAM_Options_DirecBremPhoto.xojo_window +++ b/BEAMnrc/Window_BEAM_Options_DirecBremPhoto.xojo_window @@ -814,14 +814,14 @@ End for i=0 to PopupMenu_CM.ListCount num=Val(PopupMenu_CM.List(i)) if num=BremSplit.ICMDBS Then - PopupMenu_CM.ListIndex=i + PopupMenu_CM.SelectedRowIndex=i Exit end next PopupMenu_e_splitting_plane_no.DeleteAllRows - if PopupMenu_CM.ListIndex>0 Then + if PopupMenu_CM.SelectedRowIndex>0 Then PopupMenu_e_splitting_plane_no.AddRow str(1)+" "+Format(BremSplit.CMs(BremSplit.ICMDBS-1).FLATFILT.z_min,"-#.#####") znum=BremSplit.CMs(BremSplit.ICMDBS-1).FLATFILT.z_min for i =0 to UBound(BremSplit.CMs(BremSplit.ICMDBS-1).FLATFILT.layers) @@ -831,7 +831,7 @@ End end if BremSplit.ZPLANEDBS<=PopupMenu_e_splitting_plane_no.ListCount and BremSplit.ZPLANEDBS>0 Then - PopupMenu_e_splitting_plane_no.ListIndex=BremSplit.ZPLANEDBS-1 + PopupMenu_e_splitting_plane_no.SelectedRowIndex=BremSplit.ZPLANEDBS-1 end @@ -966,7 +966,7 @@ End #tag Events PopupMenu_e_splitting_plane_no #tag Event Sub Change() - BremSplit.ZPLANEDBS=me.ListIndex+1 + BremSplit.ZPLANEDBS=me.SelectedRowIndex+1 End Sub #tag EndEvent #tag EndEvents diff --git a/BEAMnrc/Window_BEAM_Options_JAWS.xojo_window b/BEAMnrc/Window_BEAM_Options_JAWS.xojo_window index 905a0c4..32df41c 100644 --- a/BEAMnrc/Window_BEAM_Options_JAWS.xojo_window +++ b/BEAMnrc/Window_BEAM_Options_JAWS.xojo_window @@ -653,7 +653,7 @@ End donothing=True - i= Window_BEAM_MainInputs.Listbox_CMs.ListIndex + i= Window_BEAM_MainInputs.Listbox_CMs.SelectedRowIndex S=Window_BEAM_MainInputs.BEAM.CMs(i).JAWS diff --git a/BEAMnrc/Window_BEAM_Options_JAWS_PARIS.xojo_window b/BEAMnrc/Window_BEAM_Options_JAWS_PARIS.xojo_window index 0935e6c..ddccbd1 100644 --- a/BEAMnrc/Window_BEAM_Options_JAWS_PARIS.xojo_window +++ b/BEAMnrc/Window_BEAM_Options_JAWS_PARIS.xojo_window @@ -140,11 +140,11 @@ End Listbox_Pairs.DeleteAllRows Listbox_Pairs.ColumnCount=app.ISCM_MAX+1 - Listbox_Pairs.Heading(0)="Jaw Variables" + Listbox_Pairs.HeaderAt(0)="Jaw Variables" temp="400" for i=1 to app.ISCM_MAX temp=temp+", 150" - Listbox_Pairs.Heading(i)=Str(i) + Listbox_Pairs.HeaderAt(i)=Str(i) next Listbox_Pairs.ColumnWidths=temp @@ -166,18 +166,18 @@ End for i=1 to app.ISCM_MAX Listbox_Pairs.ColumnType(i)=3 - Listbox_Pairs.Cell(0,i)=app.XY_Choice(i-1) - Listbox_Pairs.Cell(1,i)=Format(app.ZMIN_JAWS(i-1),"-#.###") - Listbox_Pairs.Cell(2,i)=Format(app.ZMAX_JAWS(i-1),"-#.###") - Listbox_Pairs.Cell(3,i)=Format(app.XFP_JAWS(i-1),"-#.###") - Listbox_Pairs.Cell(4,i)=Format(app.XBP_JAWS(i-1),"-#.###") - Listbox_Pairs.Cell(5,i)=Format(app.XFN_JAWS(i-1),"-#.###") - Listbox_Pairs.Cell(6,i)=Format(app.XBN_JAWS(i-1),"-#.###") - Listbox_Pairs.Cell(7,i)=Format(app.ECUT_Jaws(i-1),"-#.###") - Listbox_Pairs.Cell(8,i)=Format(app.PCUT_Jaws(i-1),"-#.###") - Listbox_Pairs.Cell(9,i)=Format(app.Dose_zone_Jaws(i-1),"#") - Listbox_Pairs.Cell(10,i)=Format(app.Iregion_Jaws(i-1),"#") - Listbox_Pairs.Cell(11,i)=app.Medium_Jaws(i-1) + Listbox_Pairs.CellValueAt(0,i)=app.XY_Choice(i-1) + Listbox_Pairs.CellValueAt(1,i)=Format(app.ZMIN_JAWS(i-1),"-#.###") + Listbox_Pairs.CellValueAt(2,i)=Format(app.ZMAX_JAWS(i-1),"-#.###") + Listbox_Pairs.CellValueAt(3,i)=Format(app.XFP_JAWS(i-1),"-#.###") + Listbox_Pairs.CellValueAt(4,i)=Format(app.XBP_JAWS(i-1),"-#.###") + Listbox_Pairs.CellValueAt(5,i)=Format(app.XFN_JAWS(i-1),"-#.###") + Listbox_Pairs.CellValueAt(6,i)=Format(app.XBN_JAWS(i-1),"-#.###") + Listbox_Pairs.CellValueAt(7,i)=Format(app.ECUT_Jaws(i-1),"-#.###") + Listbox_Pairs.CellValueAt(8,i)=Format(app.PCUT_Jaws(i-1),"-#.###") + Listbox_Pairs.CellValueAt(9,i)=Format(app.Dose_zone_Jaws(i-1),"#") + Listbox_Pairs.CellValueAt(10,i)=Format(app.Iregion_Jaws(i-1),"#") + Listbox_Pairs.CellValueAt(11,i)=app.Medium_Jaws(i-1) next @@ -217,42 +217,42 @@ End if column>=1 Then if row=0 Then - app.XY_Choice(column-1)=(me.Cell(row,column)) + app.XY_Choice(column-1)=(me.CellValueAt(row,column)) elseif row=1 Then - app.ZMIN_JAWS(column-1)=val(me.Cell(row,column)) + app.ZMIN_JAWS(column-1)=val(me.CellValueAt(row,column)) elseif row=2 Then - app.ZMAX_JAWS(column-1)=val(me.Cell(row,column)) + app.ZMAX_JAWS(column-1)=val(me.CellValueAt(row,column)) elseif row=3 Then - app.XFP_JAWS(column-1)=val(me.Cell(row,column)) + app.XFP_JAWS(column-1)=val(me.CellValueAt(row,column)) elseif row=4 Then - app.XBP_JAWS(column-1)=val(me.Cell(row,column)) + app.XBP_JAWS(column-1)=val(me.CellValueAt(row,column)) elseif row=5 Then - app.XFN_JAWS(column-1)=val(me.Cell(row,column)) + app.XFN_JAWS(column-1)=val(me.CellValueAt(row,column)) elseif row=6 Then - app.XBN_JAWS(column-1)=val(me.Cell(row,column)) + app.XBN_JAWS(column-1)=val(me.CellValueAt(row,column)) elseif row=7 Then - app.ECUT_Jaws(column-1)=val(me.Cell(row,column)) + app.ECUT_Jaws(column-1)=val(me.CellValueAt(row,column)) elseif row=8 Then - app.pCUT_Jaws(column-1)=val(me.Cell(row,column)) + app.pCUT_Jaws(column-1)=val(me.CellValueAt(row,column)) elseif row=9 Then - app.Dose_zone_Jaws(column-1)=val(me.Cell(row,column)) + app.Dose_zone_Jaws(column-1)=val(me.CellValueAt(row,column)) elseif row=10 Then - app.Iregion_Jaws(column-1)=val(me.Cell(row,column)) + app.Iregion_Jaws(column-1)=val(me.CellValueAt(row,column)) elseif row=11 Then - app.Medium_Jaws(column-1)=trim(me.Cell(row,column)) + app.Medium_Jaws(column-1)=trim(me.CellValueAt(row,column)) end end end diff --git a/BEAMnrc/Window_BEAM_Options_MLC.xojo_window b/BEAMnrc/Window_BEAM_Options_MLC.xojo_window index 1266779..5b7a86e 100644 --- a/BEAMnrc/Window_BEAM_Options_MLC.xojo_window +++ b/BEAMnrc/Window_BEAM_Options_MLC.xojo_window @@ -1506,7 +1506,7 @@ End donothing=True - i= Window_BEAM_MainInputs.Listbox_CMs.ListIndex + i= Window_BEAM_MainInputs.Listbox_CMs.SelectedRowIndex MLC=Window_BEAM_MainInputs.BEAM.CMs(i).MLC diff --git a/BEAMnrc/Window_BEAM_Options_MLC_LeafOpenings.xojo_window b/BEAMnrc/Window_BEAM_Options_MLC_LeafOpenings.xojo_window index ddc8480..6b00c3d 100644 --- a/BEAMnrc/Window_BEAM_Options_MLC_LeafOpenings.xojo_window +++ b/BEAMnrc/Window_BEAM_Options_MLC_LeafOpenings.xojo_window @@ -117,10 +117,10 @@ End Sub Open() Dim i as Integer - Listbox_Openings.Heading(0)="From leaf" - Listbox_Openings.Heading(1)="to leaf" - Listbox_Openings.Heading(2)="min opening" - Listbox_Openings.Heading(3)="max opening" + Listbox_Openings.HeaderAt(0)="From leaf" + Listbox_Openings.HeaderAt(1)="to leaf" + Listbox_Openings.HeaderAt(2)="min opening" + Listbox_Openings.HeaderAt(3)="max opening" //Listbox_Openings.ColumnType(0)=3 @@ -147,9 +147,9 @@ End row=0 for i=1 to MLC.Num_leaf Listbox_Openings.AddRow str(i) - Listbox_Openings.Cell(row,1)=str(i+MLC.Field(row).Num-1) - Listbox_Openings.Cell(row,2)=Format(MLC.Field(row).Neg,"-#.#####") - Listbox_Openings.Cell(row,3)=Format(MLC.Field(row).Pos,"-#.#####") + Listbox_Openings.CellValueAt(row,1)=str(i+MLC.Field(row).Num-1) + Listbox_Openings.CellValueAt(row,2)=Format(MLC.Field(row).Neg,"-#.#####") + Listbox_Openings.CellValueAt(row,3)=Format(MLC.Field(row).Pos,"-#.#####") i=i+MLC.Field(row).Num-1 row=row+1 next @@ -175,10 +175,10 @@ End elseif column=2 Then - MLC.Field(row).Neg=val(me.Cell(row,column)) + MLC.Field(row).Neg=val(me.CellValueAt(row,column)) Elseif column=3 Then - MLC.Field(row).Pos=val(me.Cell(row,column)) + MLC.Field(row).Pos=val(me.CellValueAt(row,column)) end End Sub diff --git a/BEAMnrc/Window_BEAM_Options_SLABS.xojo_window b/BEAMnrc/Window_BEAM_Options_SLABS.xojo_window index 4d1270a..ede6e44 100644 --- a/BEAMnrc/Window_BEAM_Options_SLABS.xojo_window +++ b/BEAMnrc/Window_BEAM_Options_SLABS.xojo_window @@ -416,7 +416,7 @@ End donothing=True - i= Window_BEAM_MainInputs.Listbox_CMs.ListIndex + i= Window_BEAM_MainInputs.Listbox_CMs.SelectedRowIndex S=Window_BEAM_MainInputs.BEAM.CMs(i).SLABS diff --git a/BEAMnrc/Window_BEAM_Options_SLABS_LAYERS.xojo_window b/BEAMnrc/Window_BEAM_Options_SLABS_LAYERS.xojo_window index 03e54f4..cc12970 100644 --- a/BEAMnrc/Window_BEAM_Options_SLABS_LAYERS.xojo_window +++ b/BEAMnrc/Window_BEAM_Options_SLABS_LAYERS.xojo_window @@ -140,11 +140,11 @@ End Listbox_Layers.DeleteAllRows Listbox_Layers.ColumnCount=app.N_SLABS+1 - Listbox_Layers.Heading(0)="Layer" + Listbox_Layers.HeaderAt(0)="Layer" temp="300" for i=1 to app.N_SLABS temp=temp+", 150" - Listbox_Layers.Heading(i)=Str(i) + Listbox_Layers.HeaderAt(i)=Str(i) next Listbox_Layers.ColumnWidths=temp @@ -162,13 +162,13 @@ End for i=1 to app.N_SLABS Listbox_Layers.ColumnType(i)=3 - Listbox_Layers.Cell(0,i)=Format(app.Zthink(i-1),"-#.###") - Listbox_Layers.Cell(1,i)=Format(app.ECUT(i-1),"-#.###") - Listbox_Layers.Cell(2,i)=Format(app.PCUT(i-1),"-#.###") - Listbox_Layers.Cell(3,i)=Format(app.Dose_Zone(i-1),"#") - Listbox_Layers.Cell(4,i)=Format(app.IRegion_Bit(i-1),"#") - Listbox_Layers.Cell(5,i)=Format(app.Esave(i-1),"-#.###") - Listbox_Layers.Cell(6,i)=app.Medium_In(i-1) + Listbox_Layers.CellValueAt(0,i)=Format(app.Zthink(i-1),"-#.###") + Listbox_Layers.CellValueAt(1,i)=Format(app.ECUT(i-1),"-#.###") + Listbox_Layers.CellValueAt(2,i)=Format(app.PCUT(i-1),"-#.###") + Listbox_Layers.CellValueAt(3,i)=Format(app.Dose_Zone(i-1),"#") + Listbox_Layers.CellValueAt(4,i)=Format(app.IRegion_Bit(i-1),"#") + Listbox_Layers.CellValueAt(5,i)=Format(app.Esave(i-1),"-#.###") + Listbox_Layers.CellValueAt(6,i)=app.Medium_In(i-1) next @@ -207,26 +207,26 @@ End if column>=1 Then if row=0 Then - app.Zthink(column-1)=val(me.Cell(row,column)) + app.Zthink(column-1)=val(me.CellValueAt(row,column)) elseif row=1 Then - app.ECUT(column-1)=val(me.Cell(row,column)) + app.ECUT(column-1)=val(me.CellValueAt(row,column)) elseif row=2 Then - app.PCUT(column-1)=val(me.Cell(row,column)) + app.PCUT(column-1)=val(me.CellValueAt(row,column)) elseif row=3 Then - app.Dose_Zone(column-1)=val(me.Cell(row,column)) + app.Dose_Zone(column-1)=val(me.CellValueAt(row,column)) elseif row=4 Then - app.IRegion_Bit(column-1)=val(me.Cell(row,column)) + app.IRegion_Bit(column-1)=val(me.CellValueAt(row,column)) elseif row=5 Then - app.Esave(column-1)=val(me.Cell(row,column)) + app.Esave(column-1)=val(me.CellValueAt(row,column)) elseif row=6 Then - app.Medium_In(column-1)=(me.Cell(row,column)) + app.Medium_In(column-1)=(me.CellValueAt(row,column)) end diff --git a/BEAMnrc/Window_BEAM_Options_Scoring.xojo_window b/BEAMnrc/Window_BEAM_Options_Scoring.xojo_window index b4df3f6..2ac2d28 100644 --- a/BEAMnrc/Window_BEAM_Options_Scoring.xojo_window +++ b/BEAMnrc/Window_BEAM_Options_Scoring.xojo_window @@ -458,7 +458,7 @@ End Refresh_window - PopupMenu_ScoringPlan.ListIndex=0 + PopupMenu_ScoringPlan.SelectedRowIndex=0 End Sub #tag EndEvent @@ -470,7 +470,7 @@ End DoStuff=False - PopupMenu_zonetype.ListIndex=BEAM.NSC(NSC_Index).MZONE_TYPE + PopupMenu_zonetype.SelectedRowIndex=BEAM.NSC(NSC_Index).MZONE_TYPE EditField_scor_cmnum.value = str(BEAM.NSC(NSC_Index).IPLANE_to_CM) @@ -489,22 +489,22 @@ End Listbox_ZOnes.DeleteAllRows Listbox_ZOnes.ColumnCount=2 - Listbox_ZOnes.Heading(0)="Zone" + Listbox_ZOnes.HeaderAt(0)="Zone" Listbox_ZOnes.ColumnType(1)=3 if BEAM.NSC(NSC_Index).MZONE_TYPE=1 Then Listbox_ZOnes.ColumnCount=2 - Listbox_ZOnes.Heading(1)="Halfwidth" + Listbox_ZOnes.HeaderAt(1)="Halfwidth" elseif BEAM.NSC(NSC_Index).MZONE_TYPE=0 Then Listbox_ZOnes.ColumnCount=2 - Listbox_ZOnes.Heading(1)="Radius" + Listbox_ZOnes.HeaderAt(1)="Radius" else Listbox_ZOnes.ColumnCount=4 - Listbox_ZOnes.Heading(0)="direction" - Listbox_ZOnes.Heading(1)="min" - Listbox_ZOnes.Heading(2)="max" - Listbox_ZOnes.Heading(3)="no of zones" + Listbox_ZOnes.HeaderAt(0)="direction" + Listbox_ZOnes.HeaderAt(1)="min" + Listbox_ZOnes.HeaderAt(2)="max" + Listbox_ZOnes.HeaderAt(3)="no of zones" Listbox_ZOnes.ColumnType(1)=3 Listbox_ZOnes.ColumnType(2)=3 Listbox_ZOnes.ColumnType(3)=3 @@ -512,13 +512,13 @@ End Listbox_ZOnes.AddRow "X" Listbox_ZOnes.AddRow "Y" - Listbox_ZOnes.Cell(0,1)=str(Beam.NSC(NSC_Index).XMIN_ZOne) - Listbox_ZOnes.Cell(0,2)=str(Beam.NSC(NSC_Index).XMAX_Zone) - Listbox_ZOnes.Cell(0,3)=str(Beam.NSC(NSC_Index).NX_Zone) + Listbox_ZOnes.CellValueAt(0,1)=str(Beam.NSC(NSC_Index).XMIN_ZOne) + Listbox_ZOnes.CellValueAt(0,2)=str(Beam.NSC(NSC_Index).XMAX_Zone) + Listbox_ZOnes.CellValueAt(0,3)=str(Beam.NSC(NSC_Index).NX_Zone) - Listbox_ZOnes.Cell(1,1)=str(Beam.NSC(NSC_Index).yMIN_ZOne) - Listbox_ZOnes.Cell(1,2)=str(Beam.NSC(NSC_Index).yMAX_Zone) - Listbox_ZOnes.Cell(1,3)=str(Beam.NSC(NSC_Index).NY_Zone) + Listbox_ZOnes.CellValueAt(1,1)=str(Beam.NSC(NSC_Index).yMIN_ZOne) + Listbox_ZOnes.CellValueAt(1,2)=str(Beam.NSC(NSC_Index).yMAX_Zone) + Listbox_ZOnes.CellValueAt(1,3)=str(Beam.NSC(NSC_Index).NY_Zone) @@ -530,7 +530,7 @@ End for i=0 to BEAM.NSC(NSC_Index).NSC_ZONES-1 Listbox_ZOnes.AddRow str(i+1) - Listbox_ZOnes.Cell(i,1)=Format(Beam.NSC(NSC_Index).RSCORE_ZONE(i),"-0.0##") + Listbox_ZOnes.CellValueAt(i,1)=Format(Beam.NSC(NSC_Index).RSCORE_ZONE(i),"-0.0##") next End Sub #tag EndMethod @@ -563,7 +563,7 @@ End #tag Events PopupMenu_ScoringPlan #tag Event Sub Change() - NSC_Index=me.ListIndex + NSC_Index=me.SelectedRowIndex Refresh_window End Sub #tag EndEvent @@ -572,7 +572,7 @@ End #tag Event Sub Change() if DoStuff Then - BEAM.NSC(NSC_Index).MZONE_TYPE=me.ListIndex + BEAM.NSC(NSC_Index).MZONE_TYPE=me.SelectedRowIndex Update_Listbox end End Sub @@ -604,17 +604,17 @@ End if Beam.NSC(NSC_Index).MZONE_TYPE=2 Then if row=0 Then - Beam.NSC(NSC_Index).XMIN_ZOne=val(Listbox_ZOnes.Cell(0,1)) - Beam.NSC(NSC_Index).XMAX_Zone=val(Listbox_ZOnes.Cell(0,2)) - Beam.NSC(NSC_Index).NX_Zone=val(Listbox_ZOnes.Cell(0,3)) + Beam.NSC(NSC_Index).XMIN_ZOne=val(Listbox_ZOnes.CellValueAt(0,1)) + Beam.NSC(NSC_Index).XMAX_Zone=val(Listbox_ZOnes.CellValueAt(0,2)) + Beam.NSC(NSC_Index).NX_Zone=val(Listbox_ZOnes.CellValueAt(0,3)) else - Beam.NSC(NSC_Index).yMIN_ZOne=val(Listbox_ZOnes.Cell(1,1)) - Beam.NSC(NSC_Index).yMAX_Zone=val(Listbox_ZOnes.Cell(1,2)) - Beam.NSC(NSC_Index).NY_Zone=val(Listbox_ZOnes.Cell(1,3)) + Beam.NSC(NSC_Index).yMIN_ZOne=val(Listbox_ZOnes.CellValueAt(1,1)) + Beam.NSC(NSC_Index).yMAX_Zone=val(Listbox_ZOnes.CellValueAt(1,2)) + Beam.NSC(NSC_Index).NY_Zone=val(Listbox_ZOnes.CellValueAt(1,3)) end ELSE if column=1 Then - Beam.NSC(NSC_Index).RSCORE_ZONE(row)=val(me.Cell(row,column)) + Beam.NSC(NSC_Index).RSCORE_ZONE(row)=val(me.CellValueAt(row,column)) end END diff --git a/BEAMnrc/Window_BEAM_Options_TOMOMLC.xojo_window b/BEAMnrc/Window_BEAM_Options_TOMOMLC.xojo_window index 075677f..c8994e3 100644 --- a/BEAMnrc/Window_BEAM_Options_TOMOMLC.xojo_window +++ b/BEAMnrc/Window_BEAM_Options_TOMOMLC.xojo_window @@ -1584,7 +1584,7 @@ End donothing=True - i= Window_BEAM_MainInputs.Listbox_CMs.ListIndex + i= Window_BEAM_MainInputs.Listbox_CMs.SelectedRowIndex MLC=Window_BEAM_MainInputs.BEAM.CMs(i).TOMO diff --git a/BEAMnrc/Window_BEAM_Options_WEDGE.xojo_window b/BEAMnrc/Window_BEAM_Options_WEDGE.xojo_window index b4c103b..3df2028 100644 --- a/BEAMnrc/Window_BEAM_Options_WEDGE.xojo_window +++ b/BEAMnrc/Window_BEAM_Options_WEDGE.xojo_window @@ -2511,7 +2511,7 @@ End Dim i as Integer donothing=True - i= Window_BEAM_MainInputs.Listbox_CMs.ListIndex + i= Window_BEAM_MainInputs.Listbox_CMs.SelectedRowIndex W=Window_BEAM_MainInputs.BEAM.CMs(i).WEDGE Refresh_window donothing=False @@ -2560,12 +2560,12 @@ End Listbox_Coordinates.DeleteAllRows - Listbox_Coordinates.Heading(0)="Point" - Listbox_Coordinates.Heading(1)="Coordinates in the wedge direction" + Listbox_Coordinates.HeaderAt(0)="Point" + Listbox_Coordinates.HeaderAt(1)="Coordinates in the wedge direction" Listbox_Coordinates.ColumnWidths="20%,80%" for i=0 to UBound(w.D) Listbox_Coordinates.AddRow str(i+1) - Listbox_Coordinates.Cell(i,1)= Format(w.D(i),"-#.######") + Listbox_Coordinates.CellValueAt(i,1)= Format(w.D(i),"-#.######") Listbox_Coordinates.ColumnType(1)=3 next @@ -2573,16 +2573,16 @@ End Listbox_Profiles.DeleteAllRows - Listbox_Profiles.Heading(0)="1" - Listbox_Profiles.Heading(1)="2" - Listbox_Profiles.Heading(2)="3" - Listbox_Profiles.Heading(3)="4" - Listbox_Profiles.Heading(4)="5" - Listbox_Profiles.Heading(5)="6" - Listbox_Profiles.Heading(6)="7" - Listbox_Profiles.Heading(7)="8" - Listbox_Profiles.Heading(8)="9" - Listbox_Profiles.Heading(9)="10" + Listbox_Profiles.HeaderAt(0)="1" + Listbox_Profiles.HeaderAt(1)="2" + Listbox_Profiles.HeaderAt(2)="3" + Listbox_Profiles.HeaderAt(3)="4" + Listbox_Profiles.HeaderAt(4)="5" + Listbox_Profiles.HeaderAt(5)="6" + Listbox_Profiles.HeaderAt(6)="7" + Listbox_Profiles.HeaderAt(7)="8" + Listbox_Profiles.HeaderAt(8)="9" + Listbox_Profiles.HeaderAt(9)="10" Listbox_Profiles.ColumnType(1)=3 Listbox_Profiles.ColumnType(2)=3 @@ -2597,15 +2597,15 @@ End for i=0 to w.NProf-1 Listbox_Profiles.AddRow Format(w.A_Profile(i).A(0),"-#.######") - Listbox_Profiles.Cell(i,1)= Format(w.A_Profile(i).A(1),"-#.######") - Listbox_Profiles.Cell(i,2)= Format(w.A_Profile(i).A(2),"-#.######") - Listbox_Profiles.Cell(i,3)= Format(w.A_Profile(i).A(3),"-#.######") - Listbox_Profiles.Cell(i,4)= Format(w.A_Profile(i).A(4),"-#.######") - Listbox_Profiles.Cell(i,5)= Format(w.A_Profile(i).A(5),"-#.######") - Listbox_Profiles.Cell(i,6)= Format(w.A_Profile(i).A(6),"-#.######") - Listbox_Profiles.Cell(i,7)= Format(w.A_Profile(i).A(7),"-#.######") - Listbox_Profiles.Cell(i,8)= Format(w.A_Profile(i).A(8),"-#.######") - Listbox_Profiles.Cell(i,9)= Format(w.A_Profile(i).A(9),"-#.######") + Listbox_Profiles.CellValueAt(i,1)= Format(w.A_Profile(i).A(1),"-#.######") + Listbox_Profiles.CellValueAt(i,2)= Format(w.A_Profile(i).A(2),"-#.######") + Listbox_Profiles.CellValueAt(i,3)= Format(w.A_Profile(i).A(3),"-#.######") + Listbox_Profiles.CellValueAt(i,4)= Format(w.A_Profile(i).A(4),"-#.######") + Listbox_Profiles.CellValueAt(i,5)= Format(w.A_Profile(i).A(5),"-#.######") + Listbox_Profiles.CellValueAt(i,6)= Format(w.A_Profile(i).A(6),"-#.######") + Listbox_Profiles.CellValueAt(i,7)= Format(w.A_Profile(i).A(7),"-#.######") + Listbox_Profiles.CellValueAt(i,8)= Format(w.A_Profile(i).A(8),"-#.######") + Listbox_Profiles.CellValueAt(i,9)= Format(w.A_Profile(i).A(9),"-#.######") next diff --git a/BEAMnrc/Window_BEAM_Phsp_Information.xojo_window b/BEAMnrc/Window_BEAM_Phsp_Information.xojo_window index 61fd01e..c446197 100644 --- a/BEAMnrc/Window_BEAM_Phsp_Information.xojo_window +++ b/BEAMnrc/Window_BEAM_Phsp_Information.xojo_window @@ -1493,12 +1493,12 @@ End Sub Open() app.which_window_BEAM_Phsp=True pop_beam - ListBox_Phspfiles.Heading(0)="File Number" - ListBox_Phspfiles.Heading(1)="Link File (yes/no)" - ListBox_Phspfiles.Heading(2)="File Name" - ListBox_Phspfiles.Heading(3)="Date" - ListBox_Phspfiles.Heading(4)="Time" - ListBox_Phspfiles.Heading(5)="File Size (Bytes)" + ListBox_Phspfiles.HeaderAt(0)="File Number" + ListBox_Phspfiles.HeaderAt(1)="Link File (yes/no)" + ListBox_Phspfiles.HeaderAt(2)="File Name" + ListBox_Phspfiles.HeaderAt(3)="Date" + ListBox_Phspfiles.HeaderAt(4)="Time" + ListBox_Phspfiles.HeaderAt(5)="File Size (Bytes)" ListBox_Phspfiles.ColumnWidths="10%,15%,30%,10%,10%,25%" @@ -1519,7 +1519,7 @@ End for i =0 to ListBox_Phspfiles.ListCount-1 if ListBox_Phspfiles.CellCheck(i,1) then - copy_file=Trim(ListBox_Phspfiles.Cell(i,2)) + copy_file=Trim(ListBox_Phspfiles.CellValueAt(i,2)) gBEAM.Beams(beam_index).egs_Phsp_name=copy_file gBEAM.Beams(beam_index).egs_Phsp_link=True gBEAM.Beams(beam_index).egs_BEAMnrc_active_jobs=0 @@ -1660,16 +1660,16 @@ End Date1=Date1+" - " +one_line(gBEAM.cc.shell.listfiles_dateb-1) end - ListBox_Phspfiles.Cell(row,3)=Date1 + ListBox_Phspfiles.CellValueAt(row,3)=Date1 end if (gBEAM.cc.shell.listfiles_time-1)<=UBound(one_line) and (gBEAM.cc.shell.listfiles_time-1)>-1Then - ListBox_Phspfiles.Cell(row,4)=one_line(gBEAM.cc.shell.listfiles_time-1) + ListBox_Phspfiles.CellValueAt(row,4)=one_line(gBEAM.cc.shell.listfiles_time-1) end if (gBEAM.cc.shell.listfiles_column_num-1)<=UBound(one_line) and (gBEAM.cc.shell.listfiles_column_num-1)>-1 Then test=val(one_line(gBEAM.cc.shell.listfiles_column_num-1)) - ListBox_Phspfiles.Cell(row,5)=Format(test,"###,###,###,###") + ListBox_Phspfiles.CellValueAt(row,5)=Format(test,"###,###,###,###") end - ListBox_Phspfiles.Cell(row,2)=one_line(gBEAM.cc.shell.listfiles_name-1) + ListBox_Phspfiles.CellValueAt(row,2)=one_line(gBEAM.cc.shell.listfiles_name-1) end next end @@ -1697,62 +1697,62 @@ End // // //--------------------------------- - Dim i as Integer - Dim sql,name,eng,opening,linac,shell,mode,jaw,mlc,app,wedge as String - Dim rs as RecordSet - Dim bb as Boolean + 'Dim i as Integer + 'Dim sql,name,eng,opening,linac,shell,mode,jaw,mlc,app,wedge as String + 'Dim rs as RecordSet + 'Dim bb as Boolean //--------------------------------- - Listbox_PhaseSpace.DeleteAllRows + Listbox_PhaseSpace.RemoveAllRows Listbox_PhaseSpace.ColumnCount=10 - Listbox_PhaseSpace.Heading(0)="Mode" - Listbox_PhaseSpace.Heading(1)="File Name" - Listbox_PhaseSpace.Heading(2)="Beam Energy" - Listbox_PhaseSpace.Heading(3)="FLEC Opening (x1,x2,y1,y2)" - Listbox_PhaseSpace.Heading(4)="Linac Name" - Listbox_PhaseSpace.Heading(5)="Shell" - Listbox_PhaseSpace.Heading(6)="Jaw Opening (x1,x2,y1,y2)" - Listbox_PhaseSpace.Heading(7)="WEDGE" - Listbox_PhaseSpace.Heading(8)="APPLICATOR" - Listbox_PhaseSpace.Heading(9)="MLC Opening" + Listbox_PhaseSpace.HeaderAt(0)="Mode" + Listbox_PhaseSpace.HeaderAt(1)="File Name" + Listbox_PhaseSpace.HeaderAt(2)="Beam Energy" + Listbox_PhaseSpace.HeaderAt(3)="FLEC Opening (x1,x2,y1,y2)" + Listbox_PhaseSpace.HeaderAt(4)="Linac Name" + Listbox_PhaseSpace.HeaderAt(5)="Shell" + Listbox_PhaseSpace.HeaderAt(6)="Jaw Opening (x1,x2,y1,y2)" + Listbox_PhaseSpace.HeaderAt(7)="WEDGE" + Listbox_PhaseSpace.HeaderAt(8)="APPLICATOR" + Listbox_PhaseSpace.HeaderAt(9)="MLC Opening" Listbox_PhaseSpace.ColumnWidths="10%,20%,10%,20%,20%,10%,20%,10%,10%,50%" - sql="select BeamMode,FileName,BeamEnergy,FLECOpening,LinacName,Shell,JawOpening,MLCOpening,WEDGE,APP from PhaseSpaces" + Var sql as String = "select BeamMode,FileName,BeamEnergy,FLECOpening," _ + + "LinacName,Shell,JawOpening,MLCOpening,WEDGE,APP from PhaseSpaces" - if gBEAM.PhaseSpace.Connect Then - rs=gBEAM.PhaseSpace.SQLSelect(sql) - if rs=nil Then + If gBEAM.PhaseSpace.Connect Then + + Var rs As RowSet = gBEAM.PhaseSpace.SelectSQL(sql) + + If rs = Nil Then + Return - end - While not rs.eof - name=rs.Field("FileName").StringValue - eng=rs.Field("BeamEnergy").StringValue - opening=rs.Field("FLECOpening").StringValue - linac=rs.Field("LinacName").StringValue - shell=rs.Field("Shell").StringValue - mode=rs.Field("BeamMode").StringValue - jaw=rs.Field("JawOpening").StringValue - mlc=rs.Field("MLCOpening").StringValue - wedge=rs.Field("WEDGE").StringValue - app=rs.Field("APP").StringValue - if InStr(mode+" "+jaw+" "+name+" "+eng+" "+opening+" "+linac+" "+Shell,EditField_Filter.Text)>0 or EditField_Filter.value = "" Then - Listbox_PhaseSpace.AddRow mode - Listbox_PhaseSpace.Cell(Listbox_PhaseSpace.LastIndex,1)=name - Listbox_PhaseSpace.Cell(Listbox_PhaseSpace.LastIndex,2)=eng - Listbox_PhaseSpace.Cell(Listbox_PhaseSpace.LastIndex,3) =opening - Listbox_PhaseSpace.Cell(Listbox_PhaseSpace.LastIndex,4) =linac - Listbox_PhaseSpace.Cell(Listbox_PhaseSpace.LastIndex,5)=Shell - Listbox_PhaseSpace.Cell(Listbox_PhaseSpace.LastIndex,6)=jaw - Listbox_PhaseSpace.Cell(Listbox_PhaseSpace.LastIndex,7)=wedge - Listbox_PhaseSpace.Cell(Listbox_PhaseSpace.LastIndex,8)=App - Listbox_PhaseSpace.Cell(Listbox_PhaseSpace.LastIndex,9)=mlc - end - rs.MoveNext + End + + While Not rs.AfterLastRow + + Var name As String = rs.Column("FileName").StringValue + Var eng As String = rs.Column("BeamEnergy").StringValue + Var opening As String = rs.Column("FLECOpening").StringValue + Var linac As String = rs.Column("LinacName").StringValue + Var shell As String = rs.Column("Shell").StringValue + Var mode As String = rs.Column("BeamMode").StringValue + Var jaw As String = rs.Column("JawOpening").StringValue + Var mlc As String = rs.Column("MLCOpening").StringValue + Var wedge As String = rs.Column("WEDGE").StringValue + Var app As String = rs.Column("APP").StringValue + + If InStr(mode+" "+jaw+" "+name+" "+eng+" "+opening+" "+linac+" "+Shell,EditField_Filter.Text)>0 Or EditField_Filter.value = "" Then + + Listbox_PhaseSpace.AddRow( mode, name, eng, opening, linac, Shell, _ + jaw, wedge, App, mlc) + End + rs.MoveToNextRow Wend rs.Close - end + End End Sub #tag EndMethod @@ -1832,50 +1832,90 @@ End //---------------------------------- // Update database //---------------------------------- - dim resultd as Integer - dim sql as String - dim dr as DatabaseRecord - dim db as SQLiteDatabase //Changed to "SQLiteDatabase by William Davis after REAQLSQPDatabase was found to have been deprecated - dim rs as RecordSet - dim i as Integer + 'dim resultd as Integer + 'dim sql as String + 'dim dr as DatabaseRecord + 'dim db as SQLiteDatabase //Changed to "SQLiteDatabase by William Davis after REAQLSQPDatabase was found to have been deprecated + 'dim rs as RecordSet + 'dim i as Integer //---------------------------------- Select Case hitItem.Text Case "Delete Record" - resultd=MsgBox("Do you want to remove this record?",36) - // Remove RecordSet - if resultd=6 Then - db= new SQLiteDatabase //Changed to "SQLiteDatabase by William Davis after REAQLSQPDatabase was found to have been deprecated - db=gBEAM.PhaseSpace - if db.Connect Then - sql="select BeamMode,FileName,BeamEnergy,FLECOpening,LinacName,Shell,JawOpening,MLCOpening from PhaseSpaces" - rs=db.SQLSelect(sql) - While not rs.EOF - if rs.Field("BeamMode").StringValue=Listbox_PhaseSpace.Cell(Listbox_PhaseSpace.ListIndex,0) and _ - rs.Field("FileName").StringValue=Listbox_PhaseSpace.Cell(Listbox_PhaseSpace.ListIndex,1) and _ - rs.Field("BeamEnergy").IntegerValue=val(Listbox_PhaseSpace.Cell(Listbox_PhaseSpace.ListIndex,2)) and _ - rs.Field("FLECOpening").StringValue=Listbox_PhaseSpace.Cell(Listbox_PhaseSpace.ListIndex,3) and _ - rs.Field("LinacName").StringValue=Listbox_PhaseSpace.Cell(Listbox_PhaseSpace.ListIndex,4) and _ - rs.Field("Shell").StringValue=Listbox_PhaseSpace.Cell(Listbox_PhaseSpace.ListIndex,5) and _ - rs.Field("JawOpening").StringValue=Listbox_PhaseSpace.Cell(Listbox_PhaseSpace.ListIndex,6) and _ - rs.Field("MLCOpening").StringValue=Listbox_PhaseSpace.Cell(Listbox_PhaseSpace.ListIndex,7) Then - if rs<> nil Then - rs.DeleteRecord - if db.Error=False Then - db.Commit - end - end - end - rs.MoveNext + Var d As New MessageDialog // declare the MessageDialog object + Var b As MessageDialogButton // for handling the result + d.Icon = MessageDialog.GraphicCaution // display warning icon + d.ActionButton.Caption = "Delete" + d.CancelButton.Visible = True // show the Cancel button + d.AlternateActionButton.Visible = True // show the "Don't Save" button + d.AlternateActionButton.Caption = "Don't delete" + d.Message = "Do you want to delete this record?" + 'd.Explanation = "If you don't save, your changes will be lost. " + + b = d.ShowModal // display the dialog + Select Case b // determine which button was pressed. + Case d.ActionButton + + Var db As SQLiteDatabase = gBEAM.PhaseSpace + If db.Connect Then + Var sql as String = "select BeamMode,FileName,BeamEnergy,FLECOpening," _ + + "LinacName,Shell,JawOpening,MLCOpening from PhaseSpaces" + + Var rs As RowSet = db.SelectSQL(sql) + + While Not rs.AfterLastRow + + If rs.Column("BeamMode").StringValue = _ + Listbox_PhaseSpace.CellValueAt(Listbox_PhaseSpace.SelectedRowIndex,0) And _ + rs.Column("FileName").StringValue = _ + Listbox_PhaseSpace.CellValueAt(Listbox_PhaseSpace.SelectedRowIndex,1) And _ + rs.Column("BeamEnergy").IntegerValue = _ + Val(Listbox_PhaseSpace.CellValueAt(Listbox_PhaseSpace.SelectedRowIndex,2)) And _ + rs.Column("FLECOpening").StringValue = _ + Listbox_PhaseSpace.CellValueAt(Listbox_PhaseSpace.SelectedRowIndex,3) And _ + rs.Column("LinacName").StringValue = _ + Listbox_PhaseSpace.CellValueAt(Listbox_PhaseSpace.SelectedRowIndex,4) And _ + rs.Column("Shell").StringValue = _ + Listbox_PhaseSpace.CellValueAt(Listbox_PhaseSpace.SelectedRowIndex,5) And _ + rs.Column("JawOpening").StringValue = _ + Listbox_PhaseSpace.CellValueAt(Listbox_PhaseSpace.SelectedRowIndex,6) And _ + rs.Column("MLCOpening").StringValue = _ + Listbox_PhaseSpace.CellValueAt(Listbox_PhaseSpace.SelectedRowIndex,7) Then + + If rs<> Nil Then + Try + + rs.RemoveRow + db.CommitTransaction + + Catch error As IOException + + MessageBox(error.Message) + + End Try + End If + End + rs.MoveToNextRow Wend - end - end - db.Close - Update_PhaseSpace - end + db.Close + Update_PhaseSpace + + + End If + + + + // user pressed Save + Case d.AlternateActionButton + // user pressed Don't Save + Case d.CancelButton + // user pressed Cancel + End Select + + End Select Return True End Function #tag EndEvent @@ -1886,53 +1926,55 @@ End //---------------------------------- // Update database //---------------------------------- - dim dr as DatabaseRecord - dim f as FolderItem - dim i as Integer - dim ss,sql,r1,r2 as String - dim tt,record_found as Boolean - dim db as SQLiteDatabase //Changed to "SQLiteDatabase by William Davis after REAQLSQPDatabase was found to have been deprecated - dim rs as RecordSet + 'dim dr as DatabaseRecord + 'dim f as FolderItem + 'dim i as Integer + 'dim ss,sql,r1,r2 as String + 'dim tt,record_found as Boolean + 'dim db as SQLiteDatabase //Changed to "SQLiteDatabase by William Davis after REAQLSQPDatabase was found to have been deprecated + 'dim rs as RecordSet //---------------------------------- - r1=EditField_PhSr1.Text - r2=EditField_PhSr2.Text + Var r1 As String = EditField_PhSr1.Text + Var r2 As String = EditField_PhSr2.Text - db= new SQLiteDatabase //Changed to "SQLiteDatabase by William Davis after REAQLSQPDatabase was found to have been deprecated + Var db As New SQLiteDatabase - f=gPref.BEAMnrc_fi.Child("PhaseSpace.rsd") - db.DatabaseFile=f + db.DatabaseFile = gPref.BEAMnrc_fi.Child("PhaseSpace.rsd") //Changed to "SQLiteDatabase by William Davis after REAQLSQPDatabase was found to have been deprecated - if db.Connect Then - dr = new DatabaseRecord + If db.Connect Then + + Var dr As New DatabaseRow - sql="select BeamMode,FileName,BeamEnergy,FLECOpening,LinacName,Shell from PhaseSpaces" - rs=db.SQLSelect(sql) + Var sql As String = "select BeamMode,FileName,BeamEnergy,FLECOpening," _ + + "LinacName,Shell from PhaseSpaces" + Var rs As RowSet = db.SelectSQL(sql) - While not rs.EOF - if rs.Field("LinacName").StringValue=r1 Then - rs.Edit - rs.Field("LinacName").StringValue=r2 - rs.Update + While Not rs.AfterLastRow + + If rs.Column("LinacName").StringValue = r1 Then + rs.EditRow + rs.Column("LinacName").StringValue = r2 + rs.SaveRow - //rs.Field("BeamMode").StringValue="FLEC" and _ - //rs.Field("BeamEnergy").IntegerValue=val(bb.Beam_Energy) and _ - //rs.Field("FLECOpening").StringValue=ss and _ + //rs.Column("BeamMode").StringValue="FLEC" and _ + //rs.Column("BeamEnergy").IntegerValue=val(bb.Beam_Energy) and _ + //rs.Column("FLECOpening").StringValue=ss and _ - //rs.Field("FileName").StringValue+".egsphsp1" - //rs.Field("Shell").StringValue + //rs.Column("FileName").StringValue+".egsphsp1" + //rs.Column("Shell").StringValue - end - rs.MoveNext + End + rs.MoveToNextRow Wend rs.Close - end + End db.Close Update_PhaseSpace diff --git a/Commissioning/Class_Profile_One.xojo_code b/Commissioning/Class_Profile_One.xojo_code index f903006..ef66f10 100644 --- a/Commissioning/Class_Profile_One.xojo_code +++ b/Commissioning/Class_Profile_One.xojo_code @@ -11,7 +11,7 @@ Protected Class Class_Profile_One if a=nil or b=nil Then - MsgBox "Error within Distance function" + MessageBox "Error within Distance function" Return -1 end @@ -126,7 +126,7 @@ Protected Class Class_Profile_One Catch err As NilObjectException - MsgBox("Nil Object Error within Get Field Width") + MessageBox("Nil Object Error within Get Field Width") End Sub #tag EndMethod @@ -190,7 +190,7 @@ Protected Class Class_Profile_One Catch err As NilObjectException - MsgBox("Error within Get Flatness") + MessageBox("Error within Get Flatness") End Sub #tag EndMethod @@ -309,7 +309,7 @@ Protected Class Class_Profile_One Exception errs As NilObjectException - MsgBox("Nil Object Error within Class Profile One - Get Point") + MessageBox("Nil Object Error within Class Profile One - Get Point") @@ -423,7 +423,7 @@ Protected Class Class_Profile_One 'Wend ' 'sym=sym/count - 'ListBox_Profiles.Cell(0,1)=str(sym) + 'ListBox_Profiles.CellValueAt(0,1)=str(sym) ' 'x_value=dx 'count=0 diff --git a/Commissioning/Window_CSV_Import.xojo_window b/Commissioning/Window_CSV_Import.xojo_window index e4fdea3..a8eddb3 100644 --- a/Commissioning/Window_CSV_Import.xojo_window +++ b/Commissioning/Window_CSV_Import.xojo_window @@ -1385,7 +1385,7 @@ End Sub Pop_Info() Dim k,i as Integer - k=PopupMenu_list.ListIndex + k=PopupMenu_list.SelectedRowIndex @@ -1396,18 +1396,18 @@ End gg=CSV.Graphs(k) Listbox_Points.DeleteAllRows - Listbox_Points.Heading(0)="Point" - Listbox_Points.Heading(1)="X" - Listbox_Points.Heading(2)="Y" - Listbox_Points.Heading(3)="Z" - Listbox_Points.Heading(4)="Value" + Listbox_Points.HeaderAt(0)="Point" + Listbox_Points.HeaderAt(1)="X" + Listbox_Points.HeaderAt(2)="Y" + Listbox_Points.HeaderAt(3)="Z" + Listbox_Points.HeaderAt(4)="Value" for i=0 to UBound(CSV.Graphs(k).Points) Listbox_Points.AddRow str(i+1) - Listbox_Points.Cell(i,1)=str(gg.Points(i).x_cm) - Listbox_Points.Cell(i,2)=str(gg.Points(i).y_cm) - Listbox_Points.Cell(i,3)=str(gg.Points(i).z_cm) - Listbox_Points.Cell(i,4)=str(gg.Points(i).value) + Listbox_Points.CellValueAt(i,1)=str(gg.Points(i).x_cm) + Listbox_Points.CellValueAt(i,2)=str(gg.Points(i).y_cm) + Listbox_Points.CellValueAt(i,3)=str(gg.Points(i).z_cm) + Listbox_Points.CellValueAt(i,4)=str(gg.Points(i).value) next EditField_Date.value = gg.Date @@ -1496,7 +1496,7 @@ End Dim k as Integer - k=PopupMenu_list.ListIndex + k=PopupMenu_list.SelectedRowIndex CSV_Import(k) if app.which_window_Commission Then Window_Commisssioning.Update_Profile diff --git a/Commissioning/Window_Commisssioning.xojo_window b/Commissioning/Window_Commisssioning.xojo_window index 497b90b..52011b2 100644 --- a/Commissioning/Window_Commisssioning.xojo_window +++ b/Commissioning/Window_Commisssioning.xojo_window @@ -1269,7 +1269,7 @@ End Canvas_Graph.Profiles=new Class_Profiles_All for i=0 to ListBox_Dose_profiles.ListCount-1 if ListBox_Dose_profiles.CellCheck(i,0) Then - j=val(ListBox_Dose_profiles.Cell(i,Index_gProfile_Index)) + j=val(ListBox_Dose_profiles.CellValueAt(i,Index_gProfile_Index)) pp=new Class_Profile_One pp=gProfiles.One_Profile(j) pp.Show=True @@ -1391,26 +1391,26 @@ End ListBox_Dose_profiles.ColumnCount=i ListBox_Dose_profiles.ColumnWidths="5%,10%,8%,8%,10%,10%,10%,10%,10%,10%,10%,10%,10%,10%,10%,10%,10%,10%,10%" - ListBox_Dose_profiles.Heading(0)="Profile" - ListBox_Dose_profiles.Heading(Index_Label)="Label" - ListBox_Dose_profiles.Heading(Index_Type)="Profile Type" - ListBox_Dose_profiles.Heading(Index_Energy)="Energy" - ListBox_Dose_profiles.Heading(Index_SSD)="SSD (cm)" - ListBox_Dose_profiles.Heading(Index_FieldSize)="Field Size x,y (cm)" - ListBox_Dose_profiles.Heading(Index_Addon)="Add-on" - ListBox_Dose_profiles.Heading(Index_Algor)="Algorithm" - ListBox_Dose_profiles.Heading(Index_Pointa)="Point 1" - ListBox_Dose_profiles.Heading(Index_Pointb)="Point 2" - ListBox_Dose_profiles.Heading(Index_Norm_Value)="Norm Value" - ListBox_Dose_profiles.Heading(Index_Colour)="Colour" - ListBox_Dose_profiles.Heading(Index_Maxvalue)="Max Value" - ListBox_Dose_profiles.Heading(Index_Norm)="Normalize" - ListBox_Dose_profiles.Heading(Index_Norm_Value)="Norm Value" - ListBox_Dose_profiles.Heading(Index_Show_Points)="Show Points" - ListBox_Dose_profiles.Heading(Index_Show_Line)="Show Line" - ListBox_Dose_profiles.Heading(Index_gProfile_Index)="gProfileIndex" - ListBox_Dose_profiles.Heading(Index_Unit)="Machine" - ListBox_Dose_profiles.Heading(Index_Depth)="Depth (cm)" + ListBox_Dose_profiles.HeaderAt(0)="Profile" + ListBox_Dose_profiles.HeaderAt(Index_Label)="Label" + ListBox_Dose_profiles.HeaderAt(Index_Type)="Profile Type" + ListBox_Dose_profiles.HeaderAt(Index_Energy)="Energy" + ListBox_Dose_profiles.HeaderAt(Index_SSD)="SSD (cm)" + ListBox_Dose_profiles.HeaderAt(Index_FieldSize)="Field Size x,y (cm)" + ListBox_Dose_profiles.HeaderAt(Index_Addon)="Add-on" + ListBox_Dose_profiles.HeaderAt(Index_Algor)="Algorithm" + ListBox_Dose_profiles.HeaderAt(Index_Pointa)="Point 1" + ListBox_Dose_profiles.HeaderAt(Index_Pointb)="Point 2" + ListBox_Dose_profiles.HeaderAt(Index_Norm_Value)="Norm Value" + ListBox_Dose_profiles.HeaderAt(Index_Colour)="Colour" + ListBox_Dose_profiles.HeaderAt(Index_Maxvalue)="Max Value" + ListBox_Dose_profiles.HeaderAt(Index_Norm)="Normalize" + ListBox_Dose_profiles.HeaderAt(Index_Norm_Value)="Norm Value" + ListBox_Dose_profiles.HeaderAt(Index_Show_Points)="Show Points" + ListBox_Dose_profiles.HeaderAt(Index_Show_Line)="Show Line" + ListBox_Dose_profiles.HeaderAt(Index_gProfile_Index)="gProfileIndex" + ListBox_Dose_profiles.HeaderAt(Index_Unit)="Machine" + ListBox_Dose_profiles.HeaderAt(Index_Depth)="Depth (cm)" ListBox_Dose_profiles.ColumnType(Index_Norm)=2 ListBox_Dose_profiles.ColumnType(Index_Norm_Value)=3 @@ -1483,14 +1483,14 @@ End pp=gProfiles.One_Profile(i) if pp.Show_Commissioning Then ListBox_Dose_profiles.AddRow Str(listrow+1) - ListBox_Dose_profiles.Cell(listrow,Index_Label)=gProfiles.One_Profile(i).Label - ListBox_Dose_profiles.Cell(listrow,Index_Energy)=gProfiles.Get_String_Energy(gProfiles.One_Profile(i)) - ListBox_Dose_profiles.Cell(listrow,Index_FieldSize)=gProfiles.Get_String_FS(gProfiles.One_Profile(i)) - ListBox_Dose_profiles.Cell(listrow,Index_SSD)=Get_String_SSD(gProfiles.One_Profile(i)) - ListBox_Dose_profiles.Cell(listrow,Index_Algor)=gProfiles.One_Profile(i).Algorithm - ListBox_Dose_profiles.Cell(listrow,Index_Unit)=gProfiles.One_Profile(i).Linac - ListBox_Dose_profiles.Cell(listrow,Index_Depth)=Get_String_Depth(gProfiles.One_Profile(i)) - ListBox_Dose_profiles.Cell(listrow,Index_Addon)=gProfiles.One_Profile(i).AddOn + ListBox_Dose_profiles.CellValueAt(listrow,Index_Label)=gProfiles.One_Profile(i).Label + ListBox_Dose_profiles.CellValueAt(listrow,Index_Energy)=gProfiles.Get_String_Energy(gProfiles.One_Profile(i)) + ListBox_Dose_profiles.CellValueAt(listrow,Index_FieldSize)=gProfiles.Get_String_FS(gProfiles.One_Profile(i)) + ListBox_Dose_profiles.CellValueAt(listrow,Index_SSD)=Get_String_SSD(gProfiles.One_Profile(i)) + ListBox_Dose_profiles.CellValueAt(listrow,Index_Algor)=gProfiles.One_Profile(i).Algorithm + ListBox_Dose_profiles.CellValueAt(listrow,Index_Unit)=gProfiles.One_Profile(i).Linac + ListBox_Dose_profiles.CellValueAt(listrow,Index_Depth)=Get_String_Depth(gProfiles.One_Profile(i)) + ListBox_Dose_profiles.CellValueAt(listrow,Index_Addon)=gProfiles.One_Profile(i).AddOn // 0 = User // 1 = PDD @@ -1510,21 +1510,21 @@ End gProfiles.One_Profile(i).Update_Profile end - ListBox_Dose_profiles.Cell(listrow,Index_Type)=ss - ListBox_Dose_profiles.Cell(listrow,Index_Pointa)=Format(gProfiles.One_Profile(i).Pointa.x_cm,"-#.##")+", "+Format(gProfiles.One_Profile(i).Pointa.y_cm,"-#.##")+", "+Format(gProfiles.One_Profile(i).Pointa.z_cm,"-#.##") - ListBox_Dose_profiles.Cell(listrow,Index_Pointb)= Format(gProfiles.One_Profile(i).Pointb.x_cm,"-#.##")+", "+Format(gProfiles.One_Profile(i).Pointb.y_cm,"-#.##")+", "+Format(gProfiles.One_Profile(i).Pointb.z_cm,"-#.##") - ListBox_Dose_profiles.Cell(listrow,Index_Maxvalue)=Format(gProfiles.One_Profile(i).MaxPoint.value, "-#.#####e") - ListBox_Dose_profiles.Cell(listrow,Index_Norm_Value)=Format(gProfiles.One_Profile(i).Normalize_value, "-#.#####e") + ListBox_Dose_profiles.CellValueAt(listrow,Index_Type)=ss + ListBox_Dose_profiles.CellValueAt(listrow,Index_Pointa)=Format(gProfiles.One_Profile(i).Pointa.x_cm,"-#.##")+", "+Format(gProfiles.One_Profile(i).Pointa.y_cm,"-#.##")+", "+Format(gProfiles.One_Profile(i).Pointa.z_cm,"-#.##") + ListBox_Dose_profiles.CellValueAt(listrow,Index_Pointb)= Format(gProfiles.One_Profile(i).Pointb.x_cm,"-#.##")+", "+Format(gProfiles.One_Profile(i).Pointb.y_cm,"-#.##")+", "+Format(gProfiles.One_Profile(i).Pointb.z_cm,"-#.##") + ListBox_Dose_profiles.CellValueAt(listrow,Index_Maxvalue)=Format(gProfiles.One_Profile(i).MaxPoint.value, "-#.#####e") + ListBox_Dose_profiles.CellValueAt(listrow,Index_Norm_Value)=Format(gProfiles.One_Profile(i).Normalize_value, "-#.#####e") if gProfiles.One_Profile(i).Norm Then ListBox_Dose_profiles.CellCheck(listrow,Index_Norm)=True end ListBox_Dose_profiles.CellCheck(listrow,Index_Show_Points)=gProfiles.One_Profile(i).Show_Marker ListBox_Dose_profiles.CellCheck(listrow,Index_Show_Line)=gProfiles.One_Profile(i).show_line - ListBox_Dose_profiles.Cell(listrow,Index_gProfile_Index)= Format(i,"#") + ListBox_Dose_profiles.CellValueAt(listrow,Index_gProfile_Index)= Format(i,"#") listrow=listrow+1 end Next - ListBox_Dose_profiles.ListIndex=0 + ListBox_Dose_profiles.SelectedRowIndex=0 End Sub #tag EndMethod @@ -1542,17 +1542,17 @@ End ListBox_Dose_OutPut.DeleteAllRows ListBox_Dose_OutPut.ColumnCount=11 - ListBox_Dose_OutPut.Heading(0)="Linac" - ListBox_Dose_OutPut.Heading(1)="Energy" - ListBox_Dose_OutPut.Heading(2)="Algorithm" - ListBox_Dose_OutPut.Heading(3)="Mode" - ListBox_Dose_OutPut.Heading(4)="Detector Depth" - ListBox_Dose_OutPut.Heading(5)="SSD" - ListBox_Dose_OutPut.Heading(6)="Label" - ListBox_Dose_OutPut.Heading(7)="Add-On" - ListBox_Dose_OutPut.Heading(8)="Date" - ListBox_Dose_OutPut.Heading(9)="Normalization" - ListBox_Dose_OutPut.Heading(10)="Calculation Shell" + ListBox_Dose_OutPut.HeaderAt(0)="Linac" + ListBox_Dose_OutPut.HeaderAt(1)="Energy" + ListBox_Dose_OutPut.HeaderAt(2)="Algorithm" + ListBox_Dose_OutPut.HeaderAt(3)="Mode" + ListBox_Dose_OutPut.HeaderAt(4)="Detector Depth" + ListBox_Dose_OutPut.HeaderAt(5)="SSD" + ListBox_Dose_OutPut.HeaderAt(6)="Label" + ListBox_Dose_OutPut.HeaderAt(7)="Add-On" + ListBox_Dose_OutPut.HeaderAt(8)="Date" + ListBox_Dose_OutPut.HeaderAt(9)="Normalization" + ListBox_Dose_OutPut.HeaderAt(10)="Calculation Shell" ListBox_Dose_OutPut.ColumnType(0)=3 ListBox_Dose_OutPut.ColumnType(1)=3 @@ -1568,16 +1568,16 @@ End for i=0 to UBound(gOutput.One) ListBox_Dose_OutPut.AddRow gOutput.One(i).Machine - ListBox_Dose_OutPut.Cell(i,1)= gOutput.One(i).energy - ListBox_Dose_OutPut.Cell(i,2)= gOutput.One(i).Algorithm - ListBox_Dose_OutPut.Cell(i,3)= gOutput.One(i).Mode - ListBox_Dose_OutPut.Cell(i,4)= Format(gOutput.One(i).Detectordepthsurface,"-#.#####") - ListBox_Dose_OutPut.Cell(i,5)= Format(gOutput.One(i).SSD,"-#.###") - ListBox_Dose_OutPut.Cell(i,6)= gOutput.One(i).Data_Label - ListBox_Dose_OutPut.Cell(i,7)= gOutput.One(i).Add_On - ListBox_Dose_OutPut.Cell(i,8)= gOutput.One(i).Date - ListBox_Dose_OutPut.Cell(i,9)= Format(gOutput.One(i).Normalization,"-#.#####e") - ListBox_Dose_OutPut.Cell(i,10)= gOutput.One(i).Calculation_Machine + ListBox_Dose_OutPut.CellValueAt(i,1)= gOutput.One(i).energy + ListBox_Dose_OutPut.CellValueAt(i,2)= gOutput.One(i).Algorithm + ListBox_Dose_OutPut.CellValueAt(i,3)= gOutput.One(i).Mode + ListBox_Dose_OutPut.CellValueAt(i,4)= Format(gOutput.One(i).Detectordepthsurface,"-#.#####") + ListBox_Dose_OutPut.CellValueAt(i,5)= Format(gOutput.One(i).SSD,"-#.###") + ListBox_Dose_OutPut.CellValueAt(i,6)= gOutput.One(i).Data_Label + ListBox_Dose_OutPut.CellValueAt(i,7)= gOutput.One(i).Add_On + ListBox_Dose_OutPut.CellValueAt(i,8)= gOutput.One(i).Date + ListBox_Dose_OutPut.CellValueAt(i,9)= Format(gOutput.One(i).Normalization,"-#.#####e") + ListBox_Dose_OutPut.CellValueAt(i,10)= gOutput.One(i).Calculation_Machine next End Sub #tag EndMethod @@ -1774,7 +1774,7 @@ End end if if me.ColumnCount>=10 and column=Index_Colour and row>=0 and row<=(me.ListCount-1)Then - pindex=val(me.Cell(row,Index_gProfile_Index)) + pindex=val(me.CellValueAt(row,Index_gProfile_Index)) if pindex>=0 and pindex<=UBound(gProfiles.One_Profile) Then g.ForeColor=gProfiles.One_Profile(pindex).Colour g.FillRect 0,0,g.Width,g.Height @@ -1797,40 +1797,40 @@ End Dim tts as Boolean //------------------------- - pindex=val(me.Cell(row,Index_gProfile_Index)) + pindex=val(me.CellValueAt(row,Index_gProfile_Index)) if column=Index_Norm Then // Normalize Profile gProfiles.One_Profile(pindex).Norm=me.CellCheck(row,column) elseif column=Index_Norm_Value Then // Normalize Value - if me.Cell(row,column)="max" Then + if me.CellValueAt(row,column)="max" Then // Use max value - gProfiles.One_Profile(pindex).Normalize_value=val(me.Cell(row,Index_Maxvalue)) + gProfiles.One_Profile(pindex).Normalize_value=val(me.CellValueAt(row,Index_Maxvalue)) - elseif InStr(me.Cell(row,column),"=")>0 Then + elseif InStr(me.CellValueAt(row,column),"=")>0 Then // Interpolate new value - ff=me.Cell(row,column) + ff=me.CellValueAt(row,column) gg=val(NthField(ff,"=",2)) - if InStr(me.Cell(row,column),"z=")>0 Then //Normalize at z=? + if InStr(me.CellValueAt(row,column),"z=")>0 Then //Normalize at z=? z=gg x=gProfiles.One_Profile(pindex).Pointa.x_cm y=gProfiles.One_Profile(pindex).Pointa.y_cm - elseif InStr(me.Cell(row,column),"x=")>0 Then //Normalize at x=? + elseif InStr(me.CellValueAt(row,column),"x=")>0 Then //Normalize at x=? x=gg z=gProfiles.One_Profile(pindex).Pointa.z_cm y=gProfiles.One_Profile(pindex).Pointa.y_cm - elseif InStr(me.Cell(row,column),"y=")>0 Then //Normalize at y=? + elseif InStr(me.CellValueAt(row,column),"y=")>0 Then //Normalize at y=? y=gg x=gProfiles.One_Profile(pindex).Pointa.x_cm z=gProfiles.One_Profile(pindex).Pointa.z_cm end gProfiles.One_Profile(pindex).Normalize_value=gProfiles.One_Profile(pindex).Get_Value_at_Point(x,y,z,true) - elseif val(me.Cell(row,column))<>0 Then + elseif val(me.CellValueAt(row,column))<>0 Then // Use user defined value - gProfiles.One_Profile(pindex).Normalize_value=val(me.Cell(row,column)) + gProfiles.One_Profile(pindex).Normalize_value=val(me.CellValueAt(row,column)) end - me.Cell(row,column)=Format(gProfiles.One_Profile(pindex).Normalize_value,"-#.###e") + me.CellValueAt(row,column)=Format(gProfiles.One_Profile(pindex).Normalize_value,"-#.###e") elseif column=Index_Show_Points Then // Show Marker Profile tts=me.CellCheck(row,column) @@ -1858,7 +1858,7 @@ End Results_Mouse_Column=column - pindex=val(me.Cell(row,Index_gProfile_Index)) + pindex=val(me.CellValueAt(row,Index_gProfile_Index)) if column=Index_Colour and row>=0 and pindex<=UBound(gProfiles.One_Profile) Then c= gProfiles.One_Profile(pindex).Colour//choose the default color shown in color picker @@ -2029,7 +2029,7 @@ End Dim i as Integer Dim ww as Window_OutPut - i=me.ListIndex + i=me.SelectedRowIndex if i>=0 and i<=(UBound(gOutput.One)) Then ww = new Window_OutPut @@ -2046,33 +2046,33 @@ End if column=0 Then - gOutput.One(row).Machine=me.Cell(row,column) + gOutput.One(row).Machine=me.CellValueAt(row,column) elseif column=1 Then - gOutput.One(row).energy=Trim(me.Cell(row,column)) + gOutput.One(row).energy=Trim(me.CellValueAt(row,column)) elseif column=2 Then - gOutput.One(row).Algorithm=me.Cell(row,column) + gOutput.One(row).Algorithm=me.CellValueAt(row,column) elseif column=3 Then - gOutput.One(row).Mode=me.Cell(row,column) + gOutput.One(row).Mode=me.CellValueAt(row,column) elseif column=4 Then - gOutput.One(row).Detectordepthsurface=val(me.Cell(row,column)) + gOutput.One(row).Detectordepthsurface=val(me.CellValueAt(row,column)) elseif column=5 Then - gOutput.One(row).SSD=val(me.Cell(row,column)) + gOutput.One(row).SSD=val(me.CellValueAt(row,column)) elseif column=6 Then - gOutput.One(row).Data_Label=(me.Cell(row,column)) + gOutput.One(row).Data_Label=(me.CellValueAt(row,column)) elseif column=7 Then - gOutput.One(row).Add_On=(me.Cell(row,column)) + gOutput.One(row).Add_On=(me.CellValueAt(row,column)) elseif column=8 Then - gOutput.One(row).Date=(me.Cell(row,column)) + gOutput.One(row).Date=(me.CellValueAt(row,column)) elseif column=9 Then - gOutput.One(row).Normalization=val(me.Cell(row,column)) + gOutput.One(row).Normalization=val(me.CellValueAt(row,column)) elseif column=10 Then - gOutput.One(row).Calculation_Machine=(me.Cell(row,column)) + gOutput.One(row).Calculation_Machine=(me.CellValueAt(row,column)) end @@ -2133,7 +2133,7 @@ End for i=ListBox_Dose_Profiles.ListCount-1 DownTo 0 if ListBox_Dose_profiles.CellCheck(i,0) Then - k=val(ListBox_Dose_Profiles.Cell(i,Index_gProfile_Index) ) + k=val(ListBox_Dose_Profiles.CellValueAt(i,Index_gProfile_Index) ) gProfiles.One_Profile.Remove k end next @@ -2150,7 +2150,7 @@ End p_index=-1 for i =0 to Window_Commisssioning.ListBox_Dose_Profiles.ListCount-1 if Window_Commisssioning.ListBox_Dose_Profiles.CellCheck(i,0) Then - p_index=val(Window_Commisssioning.ListBox_Dose_Profiles.Cell(i,Index_gProfile_Index)) + p_index=val(Window_Commisssioning.ListBox_Dose_Profiles.CellValueAt(i,Index_gProfile_Index)) Window_Profile_Properties.Show Window_Profile_Properties.One=gProfiles.One_Profile(p_index) Window_Profile_Properties.Open_Pro @@ -2170,7 +2170,7 @@ End Dim k,i as Integer - k=ListBox_Dose_OutPut.ListIndex + k=ListBox_Dose_OutPut.SelectedRowIndex if k>-1 and k<=UBound(gOutput.One) Then gOutput.One.Remove k @@ -2197,8 +2197,8 @@ End next if i>-1 Then - Canvas_Graph.Analysis.PopupMenu_Calculated.ListIndex=0 - Canvas_Graph.Analysis.PopupMenu_Measured.ListIndex=1 + Canvas_Graph.Analysis.PopupMenu_Calculated.SelectedRowIndex=0 + Canvas_Graph.Analysis.PopupMenu_Measured.SelectedRowIndex=1 end Canvas_Graph.Analysis.Show @@ -2286,7 +2286,7 @@ End - Canvas_Graph.xyz_index=me.ListIndex + Canvas_Graph.xyz_index=me.SelectedRowIndex @@ -2354,22 +2354,22 @@ End if Canvas_Graph.Interactive_index>=0 and Canvas_Graph.Interactive_index<=UBound(Canvas_Graph.Profiles.One_Profile) Then - if PopupMenu_XAxis.ListIndex=0 Then + if PopupMenu_XAxis.SelectedRowIndex=0 Then x=Val(gg) y=Canvas_Graph.Profiles.One_Profile(Canvas_Graph.Interactive_index).Get_Y_at_X(x) z=Canvas_Graph.Profiles.One_Profile(Canvas_Graph.Interactive_index).Get_Z_at_X(x) - elseif PopupMenu_XAxis.ListIndex=1 Then + elseif PopupMenu_XAxis.SelectedRowIndex=1 Then y=Val(gg) x=Canvas_Graph.Profiles.One_Profile(Canvas_Graph.Interactive_index).Get_X_at_Y(y) z=Canvas_Graph.Profiles.One_Profile(Canvas_Graph.Interactive_index).Get_Z_at_Y(y) - elseif PopupMenu_XAxis.ListIndex=2 Then + elseif PopupMenu_XAxis.SelectedRowIndex=2 Then z=Val((gg)) x=Canvas_Graph.Profiles.One_Profile(Canvas_Graph.Interactive_index).Get_X_at_Z(z) y=Canvas_Graph.Profiles.One_Profile(Canvas_Graph.Interactive_index).Get_Y_at_Z(x) - elseif PopupMenu_XAxis.ListIndex=3 Then + elseif PopupMenu_XAxis.SelectedRowIndex=3 Then pp=Canvas_Graph.Profiles.One_Profile(Canvas_Graph.Interactive_index).Get_Point_at_Distance(val(gg)) x=pp.X_cm y=pp.Y_cm @@ -2391,7 +2391,7 @@ End end Catch err As NilObjectException - MsgBox("Nil Object Error within Window Commissioning") + MessageBox("Nil Object Error within Window Commissioning") End Sub #tag EndEvent #tag EndEvents diff --git a/Commissioning/Window_Eclipse_Import.xojo_window b/Commissioning/Window_Eclipse_Import.xojo_window index c1646e1..bf3df90 100644 --- a/Commissioning/Window_Eclipse_Import.xojo_window +++ b/Commissioning/Window_Eclipse_Import.xojo_window @@ -1330,25 +1330,25 @@ End Sub Pop_Info() Dim k,i as Integer - k=PopupMenu_list.ListIndex + k=PopupMenu_list.SelectedRowIndex if k>-1 and k<=UBound(data.Graphs) Then Listbox_Points.DeleteAllRows - Listbox_Points.Heading(0)="Point #" - Listbox_Points.Heading(1)="Point X" - Listbox_Points.Heading(2)="Point Y" - Listbox_Points.Heading(3)="Point Z" - Listbox_Points.Heading(4)="Dose" + Listbox_Points.HeaderAt(0)="Point #" + Listbox_Points.HeaderAt(1)="Point X" + Listbox_Points.HeaderAt(2)="Point Y" + Listbox_Points.HeaderAt(3)="Point Z" + Listbox_Points.HeaderAt(4)="Dose" for i=0 to UBound(Data.Graphs(k).Points) Listbox_Points.AddRow str(i+1) - Listbox_Points.Cell(i,1)=str(data.Graphs(k).Points(i).x_cm) - Listbox_Points.Cell(i,2)=str(data.Graphs(k).Points(i).y_cm) - Listbox_Points.Cell(i,3)=str(data.Graphs(k).Points(i).z_cm) - Listbox_Points.Cell(i,4)=str(data.Graphs(k).Points(i).value) + Listbox_Points.CellValueAt(i,1)=str(data.Graphs(k).Points(i).x_cm) + Listbox_Points.CellValueAt(i,2)=str(data.Graphs(k).Points(i).y_cm) + Listbox_Points.CellValueAt(i,3)=str(data.Graphs(k).Points(i).z_cm) + Listbox_Points.CellValueAt(i,4)=str(data.Graphs(k).Points(i).value) next EditField_FS.value = DATA.Graphs(k).FLSZ end @@ -1523,7 +1523,7 @@ End #tag Events PushButton_Import #tag Event Sub Action() - data_Import(PopupMenu_list.ListIndex) + data_Import(PopupMenu_list.SelectedRowIndex) End Sub #tag EndEvent #tag EndEvents diff --git a/Commissioning/Window_Excel_Import.xojo_window b/Commissioning/Window_Excel_Import.xojo_window index bb3a4a1..94e8cb1 100644 --- a/Commissioning/Window_Excel_Import.xojo_window +++ b/Commissioning/Window_Excel_Import.xojo_window @@ -451,10 +451,10 @@ End #tag WindowCode #tag Event Sub Open() - ListBox1.Heading(0)="Poistion X" - ListBox1.Heading(1)="Poistion Y" - ListBox1.Heading(2)="Poistion Z" - ListBox1.Heading(3)="Dose" + ListBox1.HeaderAt(0)="Poistion X" + ListBox1.HeaderAt(1)="Poistion Y" + ListBox1.HeaderAt(2)="Poistion Z" + ListBox1.HeaderAt(3)="Dose" End Sub #tag EndEvent @@ -467,39 +467,39 @@ End for i=0 to UBound(x_cm) if ListBox1.ListCount-1>=i Then - Listbox1.Cell(i,0)=x_cm(i) + Listbox1.CellValueAt(i,0)=x_cm(i) else Listbox1.AddRow x_cm(i) end next for i=i to ListBox1.ListCount-1 - Listbox1.Cell(i,0)="" + Listbox1.CellValueAt(i,0)="" next for i=0 to UBound(y_cm) if ListBox1.ListCount-1>=i Then - Listbox1.Cell(i,1)=y_cm(i) + Listbox1.CellValueAt(i,1)=y_cm(i) else Listbox1.AddRow y_cm(i) end next for i=i to ListBox1.ListCount-1 - Listbox1.Cell(i,1)="" + Listbox1.CellValueAt(i,1)="" next for i=0 to UBound(z_cm) if ListBox1.ListCount-1>=i Then - Listbox1.Cell(i,2)=z_cm(i) + Listbox1.CellValueAt(i,2)=z_cm(i) else Listbox1.AddRow z_cm(i) end next for i=i to ListBox1.ListCount-1 - Listbox1.Cell(i,2)="" + Listbox1.CellValueAt(i,2)="" next @@ -510,20 +510,20 @@ End for i=0 to UBound(dose) if ListBox1.ListCount-1>=i Then - Listbox1.Cell(i,3)=dose(i) + Listbox1.CellValueAt(i,3)=dose(i) else Listbox1.AddRow "" - Listbox1.Cell(i,3)=dose(i) + Listbox1.CellValueAt(i,3)=dose(i) end next for i=i to ListBox1.ListCount-1 - Listbox1.Cell(i,3)="" + Listbox1.CellValueAt(i,3)="" next for i= ListBox1.ListCount-1 downto 0 - if Listbox1.Cell(i,0)="" and Listbox1.Cell(i,1)="" and Listbox1.Cell(i,2)="" and Listbox1.Cell(i,3)="" Then + if Listbox1.CellValueAt(i,0)="" and Listbox1.CellValueAt(i,1)="" and Listbox1.CellValueAt(i,2)="" and Listbox1.CellValueAt(i,3)="" Then Listbox1.RemoveRow i end @@ -592,10 +592,10 @@ End for i =0 to ListBox1.ListCount-1 pps=new Class_Points - pps.X_cm=Val(ListBox1.Cell(i,0)) - pps.Y_cm=Val(ListBox1.Cell(i,1)) - pps.z_cm=Val(ListBox1.Cell(i,2)) - pps.Value=Val(ListBox1.Cell(i,3)) + pps.X_cm=Val(ListBox1.CellValueAt(i,0)) + pps.Y_cm=Val(ListBox1.CellValueAt(i,1)) + pps.z_cm=Val(ListBox1.CellValueAt(i,2)) + pps.Value=Val(ListBox1.CellValueAt(i,3)) pp.Points.Append pps next @@ -612,7 +612,7 @@ End Exception err as NilObjectException - MsgBox "Error within Excel data import." + MessageBox "Error within Excel data import." End Sub #tag EndEvent #tag EndEvents diff --git a/Commissioning/Window_MEPHYSTO_Import.xojo_window b/Commissioning/Window_MEPHYSTO_Import.xojo_window index 9039d2e..16d7240 100644 --- a/Commissioning/Window_MEPHYSTO_Import.xojo_window +++ b/Commissioning/Window_MEPHYSTO_Import.xojo_window @@ -1739,7 +1739,7 @@ End Sub Pop_Info() Dim k,i as Integer - k=PopupMenu_list.ListIndex + k=PopupMenu_list.SelectedRowIndex @@ -1750,18 +1750,18 @@ End gg=mcc.Graphs(k) Listbox_Points.DeleteAllRows - Listbox_Points.Heading(0)="Point" - Listbox_Points.Heading(1)="X" - Listbox_Points.Heading(2)="Y" - Listbox_Points.Heading(3)="Z" - Listbox_Points.Heading(4)="Value" + Listbox_Points.HeaderAt(0)="Point" + Listbox_Points.HeaderAt(1)="X" + Listbox_Points.HeaderAt(2)="Y" + Listbox_Points.HeaderAt(3)="Z" + Listbox_Points.HeaderAt(4)="Value" for i=0 to UBound(mcc.Graphs(k).Points) Listbox_Points.AddRow str(i+1) - Listbox_Points.Cell(i,1)=str(mcc.Graphs(k).Points(i).x_cm) - Listbox_Points.Cell(i,2)=str(mcc.Graphs(k).Points(i).y_cm) - Listbox_Points.Cell(i,3)=str(mcc.Graphs(k).Points(i).z_cm) - Listbox_Points.Cell(i,4)=str(mcc.Graphs(k).Points(i).value) + Listbox_Points.CellValueAt(i,1)=str(mcc.Graphs(k).Points(i).x_cm) + Listbox_Points.CellValueAt(i,2)=str(mcc.Graphs(k).Points(i).y_cm) + Listbox_Points.CellValueAt(i,3)=str(mcc.Graphs(k).Points(i).z_cm) + Listbox_Points.CellValueAt(i,4)=str(mcc.Graphs(k).Points(i).value) next EditField_Date.value = mcc.Graphs(k).Date @@ -1917,7 +1917,7 @@ End Dim k as Integer - k=PopupMenu_list.ListIndex + k=PopupMenu_list.SelectedRowIndex if k>-1 and k<=PopupMenu_list.ListCount Then mcc_Import(k) diff --git a/Commissioning/Window_OutPut.xojo_window b/Commissioning/Window_OutPut.xojo_window index 4d9f54d..2883b73 100644 --- a/Commissioning/Window_OutPut.xojo_window +++ b/Commissioning/Window_OutPut.xojo_window @@ -112,10 +112,10 @@ End end for i=0 to num - ListBox_Dose_OutPut.Heading(i+1)=str(one.FSX(i)) + ListBox_Dose_OutPut.HeaderAt(i+1)=str(one.FSX(i)) ListBox_Dose_OutPut.AddRow str(One.FSY(i)) for k=0 to num - ListBox_Dose_OutPut.Cell(i,k+1)=Format(100*One.OutPut(i,k)/norm,"-#.##") + ListBox_Dose_OutPut.CellValueAt(i,k+1)=Format(100*One.OutPut(i,k)/norm,"-#.##") next next End Sub @@ -154,7 +154,7 @@ End if (column-1)>=0 and (column-1)<=UBound(one.OutPut,2) Then i=One.OutPut(row,column-1) e=One.uncertainty(row,column-1) - MsgBox"Output X "+Str(One.FSX(row))+", Y "+str(One.FSY(column-1))+" : "+Format(i,"-#.####e")+", "+Format(e,"-#.####") + MessageBox"Output X "+Str(One.FSX(row))+", Y "+str(One.FSY(column-1))+" : "+Format(i,"-#.####e")+", "+Format(e,"-#.####") end end End Function diff --git a/Commissioning/Window_Profile_Properties.xojo_window b/Commissioning/Window_Profile_Properties.xojo_window index b3013cd..9a2efc8 100644 --- a/Commissioning/Window_Profile_Properties.xojo_window +++ b/Commissioning/Window_Profile_Properties.xojo_window @@ -1668,44 +1668,44 @@ End ListBox_Profiles.DeleteAllRows ListBox_Profiles.ColumnCount=2 - ListBox_Profiles.Heading(0)="Property" - ListBox_Profiles.Heading(1)="Value" + ListBox_Profiles.HeaderAt(0)="Property" + ListBox_Profiles.HeaderAt(1)="Value" ListBox_Profiles.AddRow "Number of Points" - ListBox_Profiles.Cell(0,1)=str(UBound(One.Points)+1) + ListBox_Profiles.CellValueAt(0,1)=str(UBound(One.Points)+1) ListBox_Profiles.AddRow "Symmetry (%)" - ListBox_Profiles.Cell(1,1)=str(One.Symmetry) + ListBox_Profiles.CellValueAt(1,1)=str(One.Symmetry) ListBox_Profiles.AddRow "50% Field Width (cm)" - ListBox_Profiles.Cell(2,1)=str(One.FieldWidth) + ListBox_Profiles.CellValueAt(2,1)=str(One.FieldWidth) ListBox_Profiles.AddRow "Flatness (80% of FieldWidth) (%)" - ListBox_Profiles.Cell(3,1)=str(One.Flatness) + ListBox_Profiles.CellValueAt(3,1)=str(One.Flatness) ListBox_Profiles.AddRow "Penumbra (20%-80%) (mm)" - ListBox_Profiles.Cell(4,1)=Format(One.Penumbra_a*10,"#.##")+", "+Format(One.Penumbra_b*10,"#.##") + ListBox_Profiles.CellValueAt(4,1)=Format(One.Penumbra_a*10,"#.##")+", "+Format(One.Penumbra_b*10,"#.##") ListBox_Profiles.AddRow "Center (cm)" - ListBox_Profiles.Cell(5,1)=Format(One.Centre,"-#.##") + ListBox_Profiles.CellValueAt(5,1)=Format(One.Centre,"-#.##") ListBox_Profiles.AddRow "Z max (cm)" - ListBox_Profiles.Cell(6,1)=Format(One.MaxPoint.Z_cm,"-#.##") + ListBox_Profiles.CellValueAt(6,1)=Format(One.MaxPoint.Z_cm,"-#.##") ListBox_Profiles.AddRow "D max" - ListBox_Profiles.Cell(7,1)=Format(One.MaxPoint.Value,"-#.##e") + ListBox_Profiles.CellValueAt(7,1)=Format(One.MaxPoint.Value,"-#.##e") ListBox_Profiles.AddRow "D 5 cm (%)" - ListBox_Profiles.Cell(8,1)=Format(One.D_5,"-#.##") + ListBox_Profiles.CellValueAt(8,1)=Format(One.D_5,"-#.##") ListBox_Profiles.AddRow "D 10 cm (%)" - ListBox_Profiles.Cell(9,1)=Format(One.D_10,"-#.##") + ListBox_Profiles.CellValueAt(9,1)=Format(One.D_10,"-#.##") ListBox_Profiles.AddRow "D 15 cm (%)" - ListBox_Profiles.Cell(10,1)=Format(One.D_15,"-#.##") + ListBox_Profiles.CellValueAt(10,1)=Format(One.D_15,"-#.##") ListBox_Profiles.AddRow "D 20 cm (%)" - ListBox_Profiles.Cell(11,1)=Format(One.D_20,"-#.##") + ListBox_Profiles.CellValueAt(11,1)=Format(One.D_20,"-#.##") End Sub #tag EndMethod @@ -1722,20 +1722,20 @@ End Listbox_Points.DeleteAllRows - Listbox_Points.Heading(0)="Point #" - Listbox_Points.Heading(1)="Point X" - Listbox_Points.Heading(2)="Point Y" - Listbox_Points.Heading(3)="Point Z" - Listbox_Points.Heading(4)="Dose" + Listbox_Points.HeaderAt(0)="Point #" + Listbox_Points.HeaderAt(1)="Point X" + Listbox_Points.HeaderAt(2)="Point Y" + Listbox_Points.HeaderAt(3)="Point Z" + Listbox_Points.HeaderAt(4)="Dose" for i=0 to UBound(One.Points) Listbox_Points.AddRow str(i+1) - Listbox_Points.Cell(i,1)=str(One.Points(i).x_cm) - Listbox_Points.Cell(i,2)=str(One.Points(i).y_cm) - Listbox_Points.Cell(i,3)=str(One.Points(i).z_cm) - Listbox_Points.Cell(i,4)=str(One.Points(i).value) + Listbox_Points.CellValueAt(i,1)=str(One.Points(i).x_cm) + Listbox_Points.CellValueAt(i,2)=str(One.Points(i).y_cm) + Listbox_Points.CellValueAt(i,3)=str(One.Points(i).z_cm) + Listbox_Points.CellValueAt(i,4)=str(One.Points(i).value) next diff --git a/Commissioning/Window_Profile_analysis.xojo_window b/Commissioning/Window_Profile_analysis.xojo_window index 840ec51..72f7dd7 100644 --- a/Commissioning/Window_Profile_analysis.xojo_window +++ b/Commissioning/Window_Profile_analysis.xojo_window @@ -1006,9 +1006,9 @@ End Update_Dictionary_Keys - Listbox_Data_A.Heading(0)="Algorithm" - Listbox_Data_E.Heading(0)="Energy" - Listbox_Data_U.Heading(0)="Unit" + Listbox_Data_A.HeaderAt(0)="Algorithm" + Listbox_Data_E.HeaderAt(0)="Energy" + Listbox_Data_U.HeaderAt(0)="Unit" for i=0 to Dic_Algorithm.Count-1 @@ -1027,8 +1027,8 @@ End Next Listbox_Test.DeleteAllRows - Listbox_Test.Heading(0)="Area" - Listbox_Test.Heading(1)="Tolerance" + Listbox_Test.HeaderAt(0)="Area" + Listbox_Test.HeaderAt(1)="Tolerance" Listbox_Test.AddRow("Central beam axis data, high dose, small gradient","2%") Listbox_Test.AddRow("Build-up, penumbra region of profiles, high dose, large gradient","2 mm") @@ -1127,8 +1127,8 @@ End //----------------------------------------- kk=CheckBox_abs.Value - ppa=Profiles(PopupMenu_Measured.ListIndex) - ppb=Profiles(PopupMenu_Calculated.ListIndex) + ppa=Profiles(PopupMenu_Measured.SelectedRowIndex) + ppb=Profiles(PopupMenu_Calculated.SelectedRowIndex) pp=Gamma_1D(delD,dta,ppa,ppb) EditField_GammaPass.value = Format(pp.Gamma_Value,"#.#") @@ -1188,9 +1188,9 @@ End if Listbox_Data_A.CellCheck(i,0) Then if al_1="" Then - al_1=Listbox_Data_A.Cell(i,0) + al_1=Listbox_Data_A.CellValueAt(i,0) elseif al_1<>"" Then - al_2=Listbox_Data_A.Cell(i,0) + al_2=Listbox_Data_A.CellValueAt(i,0) end end Next @@ -1201,16 +1201,16 @@ End for i =0 to Listbox_Data_E.ListCount-1 if Listbox_Data_E.CellCheck(i,0) Then - if ee.HasKey(Listbox_Data_E.Cell(i,0))= False Then - ee.Value(Listbox_Data_E.Cell(i,0))=1 + if ee.HasKey(Listbox_Data_E.CellValueAt(i,0))= False Then + ee.Value(Listbox_Data_E.CellValueAt(i,0))=1 end end Next for i =0 to Listbox_Data_U.ListCount-1 if Listbox_Data_U.CellCheck(i,0) Then - if uu.HasKey(Listbox_Data_U.Cell(i,0))= False Then - uu.Value(Listbox_Data_U.Cell(i,0))=1 + if uu.HasKey(Listbox_Data_U.CellValueAt(i,0))= False Then + uu.Value(Listbox_Data_U.CellValueAt(i,0))=1 end end Next @@ -1271,14 +1271,14 @@ End Listbox_Results.DeleteAllRows - Listbox_Results.Heading(0)="Profile" - Listbox_Results.Heading(1)="FS" - Listbox_Results.Heading(2)="Depth" - Listbox_Results.Heading(3)="Mean Difference" - Listbox_Results.Heading(4)="Mean DTA" - Listbox_Results.Heading(5)="SD" - Listbox_Results.Heading(6)="Max Difference" - Listbox_Results.Heading(7)="Min Difference" + Listbox_Results.HeaderAt(0)="Profile" + Listbox_Results.HeaderAt(1)="FS" + Listbox_Results.HeaderAt(2)="Depth" + Listbox_Results.HeaderAt(3)="Mean Difference" + Listbox_Results.HeaderAt(4)="Mean DTA" + Listbox_Results.HeaderAt(5)="SD" + Listbox_Results.HeaderAt(6)="Max Difference" + Listbox_Results.HeaderAt(7)="Min Difference" for i=0 to UBound(list_fs) diff --git a/Commissioning/Window_RFA_Import.xojo_window b/Commissioning/Window_RFA_Import.xojo_window index 330d02a..04d04d9 100644 --- a/Commissioning/Window_RFA_Import.xojo_window +++ b/Commissioning/Window_RFA_Import.xojo_window @@ -2324,7 +2324,7 @@ End - k=PopupMenu_list.ListIndex + k=PopupMenu_list.SelectedRowIndex ReDim pp.Points(UBound(RFA.Graphs(k).Points)) @@ -2386,7 +2386,7 @@ End Dim GRAD,a,b,c,d,e,f,g,h as Single Dim pp as new Class_Profile_One - k=PopupMenu_list.ListIndex + k=PopupMenu_list.SelectedRowIndex grad=val(EditField_Gradient.Text) for i=0 to UBound(RFA.Graphs(k).Points) @@ -2412,7 +2412,7 @@ End Sub Pop_Info() Dim k,i as Integer - k=PopupMenu_list.ListIndex + k=PopupMenu_list.SelectedRowIndex @@ -2423,18 +2423,18 @@ End gg=rfa.Graphs(k) Listbox_Points.DeleteAllRows - Listbox_Points.Heading(0)="Point" - Listbox_Points.Heading(1)="X" - Listbox_Points.Heading(2)="Y" - Listbox_Points.Heading(3)="Z" - Listbox_Points.Heading(4)="Value" + Listbox_Points.HeaderAt(0)="Point" + Listbox_Points.HeaderAt(1)="X" + Listbox_Points.HeaderAt(2)="Y" + Listbox_Points.HeaderAt(3)="Z" + Listbox_Points.HeaderAt(4)="Value" for i=0 to UBound(rfa.Graphs(k).Points) Listbox_Points.AddRow str(i+1) - Listbox_Points.Cell(i,1)=str(rfa.Graphs(k).Points(i).x_cm) - Listbox_Points.Cell(i,2)=str(rfa.Graphs(k).Points(i).y_cm) - Listbox_Points.Cell(i,3)=str(rfa.Graphs(k).Points(i).z_cm) - Listbox_Points.Cell(i,4)=str(rfa.Graphs(k).Points(i).value) + Listbox_Points.CellValueAt(i,1)=str(rfa.Graphs(k).Points(i).x_cm) + Listbox_Points.CellValueAt(i,2)=str(rfa.Graphs(k).Points(i).y_cm) + Listbox_Points.CellValueAt(i,3)=str(rfa.Graphs(k).Points(i).z_cm) + Listbox_Points.CellValueAt(i,4)=str(rfa.Graphs(k).Points(i).value) next EditField_Date.value = RFA.Graphs(k).Date @@ -2828,7 +2828,7 @@ End Dim x,y,z as Single Dim pp as new Class_Profile_One - k=PopupMenu_list.ListIndex + k=PopupMenu_list.SelectedRowIndex z=val(EditField_Z.Text) @@ -2998,7 +2998,7 @@ End Dim k as Integer - k=PopupMenu_list.ListIndex + k=PopupMenu_list.SelectedRowIndex RFA_Import(k) diff --git a/Commissioning/Window_XiO_Import.xojo_window b/Commissioning/Window_XiO_Import.xojo_window index 2348c28..41a4c2f 100644 --- a/Commissioning/Window_XiO_Import.xojo_window +++ b/Commissioning/Window_XiO_Import.xojo_window @@ -1475,19 +1475,19 @@ End Listbox_Points.DeleteAllRows - k=PopupMenu_list.ListIndex + k=PopupMenu_list.SelectedRowIndex if k>-1 and k<=UBound(data.Graphs) Then - Listbox_Points.Heading(0)="Point #" - Listbox_Points.Heading(1)="Point X" - Listbox_Points.Heading(2)="Point Y" - Listbox_Points.Heading(3)="Point Z" - Listbox_Points.Heading(4)="Dose" + Listbox_Points.HeaderAt(0)="Point #" + Listbox_Points.HeaderAt(1)="Point X" + Listbox_Points.HeaderAt(2)="Point Y" + Listbox_Points.HeaderAt(3)="Point Z" + Listbox_Points.HeaderAt(4)="Dose" for i=0 to UBound(Data.Graphs(k).Points) Listbox_Points.AddRow str(i+1) - Listbox_Points.Cell(i,1)=str(data.Graphs(k).Points(i).x_cm) - Listbox_Points.Cell(i,2)=str(data.Graphs(k).Points(i).y_cm) - Listbox_Points.Cell(i,3)=str(data.Graphs(k).Points(i).z_cm) - Listbox_Points.Cell(i,4)=str(data.Graphs(k).Points(i).value) + Listbox_Points.CellValueAt(i,1)=str(data.Graphs(k).Points(i).x_cm) + Listbox_Points.CellValueAt(i,2)=str(data.Graphs(k).Points(i).y_cm) + Listbox_Points.CellValueAt(i,3)=str(data.Graphs(k).Points(i).z_cm) + Listbox_Points.CellValueAt(i,4)=str(data.Graphs(k).Points(i).value) next EditField_Date.value = data.exportingdate EditField_Depth.value = str(data.Graphs(k).DPTH) @@ -1629,7 +1629,7 @@ End #tag Events PushButton_Import #tag Event Sub Action() - data_Import(PopupMenu_list.ListIndex) + data_Import(PopupMenu_list.SelectedRowIndex) End Sub #tag EndEvent #tag EndEvents diff --git a/DICOM/Class_DICOM_File.xojo_code b/DICOM/Class_DICOM_File.xojo_code index 65c37c5..45b61bf 100644 --- a/DICOM/Class_DICOM_File.xojo_code +++ b/DICOM/Class_DICOM_File.xojo_code @@ -56,28 +56,28 @@ Protected Class Class_DICOM_File ww=Window_DICOM_View ww.Listbox_DICOM.DeleteAllRows ww.Name=file.Name - ww.Listbox_DICOM.Heading(0)="Tag a" - ww.Listbox_DICOM.Heading(1)="Tag b" - ww.Listbox_DICOM.Heading(2)="VR" - ww.Listbox_DICOM.Heading(3)="VM" - ww.Listbox_DICOM.Heading(4)="Info" - ww.Listbox_DICOM.Heading(5)="Value" - ww.Listbox_DICOM.Heading(6)="Byte Position" - ww.Listbox_DICOM.Heading(7)="Value Byte Length" - ww.Listbox_DICOM.Heading(8)="Element Length" + ww.Listbox_DICOM.HeaderAt(0)="Tag a" + ww.Listbox_DICOM.HeaderAt(1)="Tag b" + ww.Listbox_DICOM.HeaderAt(2)="VR" + ww.Listbox_DICOM.HeaderAt(3)="VM" + ww.Listbox_DICOM.HeaderAt(4)="Info" + ww.Listbox_DICOM.HeaderAt(5)="Value" + ww.Listbox_DICOM.HeaderAt(6)="Byte Position" + ww.Listbox_DICOM.HeaderAt(7)="Value Byte Length" + ww.Listbox_DICOM.HeaderAt(8)="Element Length" ww.Listbox_DICOM.ColumnWidths="7%,8%,7%,8%,20%,35%,7%,8%,8%" for i=0 to UBound(Elements) ww.Listbox_DICOM.AddRow Elements(i).Tag_a - ww.Listbox_DICOM.Cell(i,1)=Elements(i).Tag_b - ww.Listbox_DICOM.Cell(i,2)=Elements(i).VR - ww.Listbox_DICOM.Cell(i,3)=str(Elements(i).VM) - ww.Listbox_DICOM.Cell(i,4)=Elements(i).Info - ww.Listbox_DICOM.Cell(i,5)=Elements(i).Value + ww.Listbox_DICOM.CellValueAt(i,1)=Elements(i).Tag_b + ww.Listbox_DICOM.CellValueAt(i,2)=Elements(i).VR + ww.Listbox_DICOM.CellValueAt(i,3)=str(Elements(i).VM) + ww.Listbox_DICOM.CellValueAt(i,4)=Elements(i).Info + ww.Listbox_DICOM.CellValueAt(i,5)=Elements(i).Value ww.Listbox_DICOM.CellType(i,5)=3 - ww.Listbox_DICOM.Cell(i,6)=str(Elements(i).byte_position) - ww.Listbox_DICOM.Cell(i,7)=str(Elements(i).Value_Length) - ww.Listbox_DICOM.Cell(i,8)=str(Elements(i).Element_Length) + ww.Listbox_DICOM.CellValueAt(i,6)=str(Elements(i).byte_position) + ww.Listbox_DICOM.CellValueAt(i,7)=str(Elements(i).Value_Length) + ww.Listbox_DICOM.CellValueAt(i,8)=str(Elements(i).Element_Length) next ww.Title="DICOM file : "+file.Name @@ -241,7 +241,7 @@ Protected Class Class_DICOM_File end if else valid = false - //msgBox " is not a valid DICOM file." + //MessageBox " is not a valid DICOM file." Return False end if end if diff --git a/DICOM/Thread_DICOM_Object.xojo_code b/DICOM/Thread_DICOM_Object.xojo_code index 9e538d4..af0978e 100644 --- a/DICOM/Thread_DICOM_Object.xojo_code +++ b/DICOM/Thread_DICOM_Object.xojo_code @@ -2417,7 +2417,7 @@ Inherits Thread d_value =file.thismemblock.ushort(vv) end else - MsgBox "Could not readin DICOM Dose voxels, error with 16 bit voxels" + MessageBox "Could not readin DICOM Dose voxels, error with 16 bit voxels" Return False end @@ -2430,7 +2430,7 @@ Inherits Thread d_value =file.thismemblock.UInt32Value(vv) end else - MsgBox "Could not readin DICOM Dose voxels, error with 32 bit voxels" + MessageBox "Could not readin DICOM Dose voxels, error with 32 bit voxels" Return False end end if diff --git a/DICOM/Window_DICOM_View.xojo_window b/DICOM/Window_DICOM_View.xojo_window index 637901b..e0239bc 100644 --- a/DICOM/Window_DICOM_View.xojo_window +++ b/DICOM/Window_DICOM_View.xojo_window @@ -148,7 +148,7 @@ End out.WriteLine "Tag a,Tag b,VR,VM,Info,Value" for i=0 to Listbox_DICOM.ListCount-1 - out.WriteLine Listbox_DICOM.Cell(i,0)+","+Listbox_DICOM.Cell(i,1)+","+Listbox_DICOM.Cell(i,2)+","+Listbox_DICOM.Cell(i,3)+","+Listbox_DICOM.Cell(i,4)+","+Listbox_DICOM.Cell(i,5) + out.WriteLine Listbox_DICOM.CellValueAt(i,0)+","+Listbox_DICOM.CellValueAt(i,1)+","+Listbox_DICOM.CellValueAt(i,2)+","+Listbox_DICOM.CellValueAt(i,3)+","+Listbox_DICOM.CellValueAt(i,4)+","+Listbox_DICOM.CellValueAt(i,5) Next out.Close diff --git a/DOSXYZnrc/Class_DOSXYZ.xojo_code b/DOSXYZnrc/Class_DOSXYZ.xojo_code index 98b898a..937f1df 100644 --- a/DOSXYZnrc/Class_DOSXYZ.xojo_code +++ b/DOSXYZnrc/Class_DOSXYZ.xojo_code @@ -305,7 +305,7 @@ Protected Class Class_DOSXYZ end if f.Exists=False Then - MsgBox "Could not find file : "+f.Name+chr(13) +"Under : "+f.ShellPath + MessageBox "Could not find file : "+f.Name+chr(13) +"Under : "+f.ShellPath Return False end @@ -762,7 +762,7 @@ Protected Class Class_DOSXYZ if ts=nil Then Return - MsgBox "Could not create file : "+g.Name + MessageBox "Could not create file : "+g.Name end diff --git a/DOSXYZnrc/Class_DOSXYZ_3ddose.xojo_code b/DOSXYZnrc/Class_DOSXYZ_3ddose.xojo_code index 9594eaf..6ef392c 100644 --- a/DOSXYZnrc/Class_DOSXYZ_3ddose.xojo_code +++ b/DOSXYZnrc/Class_DOSXYZ_3ddose.xojo_code @@ -345,7 +345,7 @@ Protected Class Class_DOSXYZ_3ddose end d2 = new Date - //MsgBox "N = " + str(N) + ". Total time..." + Str(d2.TotalSeconds - d1.TotalSeconds ) + " s" + //MessageBox "N = " + str(N) + ". Total time..." + Str(d2.TotalSeconds - d1.TotalSeconds ) + " s" Return True @@ -397,7 +397,7 @@ Protected Class Class_DOSXYZ_3ddose myMatch = rg.Search nz = CDbl(myMatch.SubExpressionString(0)) - 'MsgBox("nx = " + Str(nx) + ", ny = " + Str(ny) + ", nz = " + Str(nz)) + 'MessageBox("nx = " + Str(nx) + ", ny = " + Str(ny) + ", nz = " + Str(nz)) // Resize the boundary arrays and the dose array @@ -542,7 +542,7 @@ Protected Class Class_DOSXYZ_3ddose PW_Show=false ts.Close d2 = new Date - MsgBox "N = " + str(N) + ". Total time..." + Str(d2.TotalSeconds - d1.TotalSeconds ) + " s" + MessageBox "N = " + str(N) + ". Total time..." + Str(d2.TotalSeconds - d1.TotalSeconds ) + " s" Return True @@ -624,7 +624,7 @@ Protected Class Class_DOSXYZ_3ddose nz = CDbl(myMatch.SubExpressionString(0)) myMatch = rg.Search // Searches for the next match in "line" - //MsgBox("nx = " + Str(nx) + ", ny = " + Str(ny) + ", nz = " + Str(nz)) + //MessageBox("nx = " + Str(nx) + ", ny = " + Str(ny) + ", nz = " + Str(nz)) // Resize the boundary arrays and the dose array @@ -762,7 +762,7 @@ Protected Class Class_DOSXYZ_3ddose next // all d2 = new Date - //MsgBox "N = " + str(N) + ". Total time..." + Str(d2.TotalSeconds - d1.TotalSeconds ) + " s" + //MessageBox "N = " + str(N) + ". Total time..." + Str(d2.TotalSeconds - d1.TotalSeconds ) + " s" Return True End Function #tag EndMethod @@ -1067,7 +1067,7 @@ Protected Class Class_DOSXYZ_3ddose end d2 = new Date - //MsgBox "N = " + str(N) + ". Total time..." + Str(d2.TotalSeconds - d1.TotalSeconds ) + " s" + //MessageBox "N = " + str(N) + ". Total time..." + Str(d2.TotalSeconds - d1.TotalSeconds ) + " s" Return True End Function #tag EndMethod @@ -1375,7 +1375,7 @@ Protected Class Class_DOSXYZ_3ddose end d2 = new Date - //MsgBox "N = " + str(N) + ". Total time..." + Str(d2.TotalSeconds - d1.TotalSeconds ) + " s" + //MessageBox "N = " + str(N) + ". Total time..." + Str(d2.TotalSeconds - d1.TotalSeconds ) + " s" Return True End Function #tag EndMethod @@ -1667,7 +1667,7 @@ Protected Class Class_DOSXYZ_3ddose end d2 = new Date - //MsgBox "N = " + str(N) + ". Total time..." + Str(d2.TotalSeconds - d1.TotalSeconds ) + " s" + //MessageBox "N = " + str(N) + ". Total time..." + Str(d2.TotalSeconds - d1.TotalSeconds ) + " s" Return True End Function #tag EndMethod @@ -1730,7 +1730,7 @@ Protected Class Class_DOSXYZ_3ddose nz = CDbl(myMatch.SubExpressionString(0)) myMatch = rg.Search // Searches for the next match in "line" - //MsgBox("nx = " + Str(nx) + ", ny = " + Str(ny) + ", nz = " + Str(nz)) + //MessageBox("nx = " + Str(nx) + ", ny = " + Str(ny) + ", nz = " + Str(nz)) // Resize the boundary arrays and the dose array @@ -1868,7 +1868,7 @@ Protected Class Class_DOSXYZ_3ddose next // all d2 = new Date - //MsgBox "N = " + str(N) + ". Total time..." + Str(d2.TotalSeconds - d1.TotalSeconds ) + " s" + //MessageBox "N = " + str(N) + ". Total time..." + Str(d2.TotalSeconds - d1.TotalSeconds ) + " s" mb = new memoryblock(0) Return True diff --git a/DOSXYZnrc/Thread_DOSXYZ.xojo_code b/DOSXYZnrc/Thread_DOSXYZ.xojo_code index 5af10e3..3f74e33 100644 --- a/DOSXYZnrc/Thread_DOSXYZ.xojo_code +++ b/DOSXYZnrc/Thread_DOSXYZ.xojo_code @@ -156,7 +156,7 @@ Inherits Thread // Determine if Beams have been selected if UBound(egsphants)=-1 Then - MsgBox "No Beams Selected" + MessageBox "No Beams Selected" Return end @@ -521,100 +521,145 @@ Inherits Thread //----------------------------- // //----------------------------- - Dim f as FolderItem - Dim i,k,m,l as Integer - Dim temp,dosename as String + 'Dim f as FolderItem + 'Dim i,k,m,l as Integer + 'Dim temp,dosename as String //----------------------------- - if eindex>-1 and eindex<=UBound(gDOSXYZ.DOSXYZ) Then - - i=MsgBox("Are you sure you want to delete the EGSPhant file "+chr(13)+gDOSXYZ.DOSXYZ(eindex).EGSPhantSettings.name +"?",1,"Warning") - - if i<>1 Then - Return - end - k=eindex - f=gRTOG.Path.Child("McGill_RT") - - f=f.Child(gRTOG.Patient_ID+"_"+gRTOG.StudyID+grtog.seriesnumber+"_"+DOSXYZ(k).EGSPhantSettings.name+".egsphant") - if f.Exists Then - f.Delete - end - - f=gRTOG.Path.Child("McGill_RT") - - f=f.Child(gRTOG.Patient_ID+"_"+gRTOG.StudyID+grtog.seriesnumber+"_"+DOSXYZ(k).EGSPhantSettings.name+".egsphanthed") - if f.Exists Then - f.Delete - end - - f=gRTOG.Path.Child("McGill_RT") - - f=f.Child(gRTOG.Patient_ID+"_"+gRTOG.StudyID+grtog.seriesnumber+"_"+DOSXYZ(k).EGSPhantSettings.name+".default") - if f.Exists Then - f.Delete - end - - - - - for m= 0 to UBound(gRTOG.Plan) - f=gRTOG.Plan(m).Path + If eindex >- 1 And eindex <= gDOSXYZ.DOSXYZ.LastRowIndex Then + + + Var d As New MessageDialog // declare the MessageDialog object + Var b As MessageDialogButton // for handling the result + d.Icon = MessageDialog.GraphicCaution // display warning icon + d.ActionButton.Caption = "Delete" + d.CancelButton.Visible = True // show the Cancel button + d.AlternateActionButton.Visible = True // show the "Don't Save" button + d.AlternateActionButton.Caption = "Don't Delete" + d.Message = "Are you sure you want to delete the EGSPhant file " _ + + Chr(13) + gDOSXYZ.DOSXYZ(eindex).EGSPhantSettings.name +"?" + + 'd.Explanation = "If you don't save, your changes will be lost. " + + b = d.ShowModal // display the dialog + Select Case b // determine which button was pressed. + Case d.ActionButton + // user pressek=eindex + Var k As Integer = eindex + Var f As FolderItem = gRTOG.Path.Child("McGill_RT").Child(gRTOG.Patient_ID _ + + "_" + gRTOG.StudyID+grtog.seriesnumber _ + + "_" + DOSXYZ(k).EGSPhantSettings.name+".egsphant") - f=f.Child("DOSXYZ_"+DOSXYZ(k).EGSPhantSettings.name+".txt") - if f.Exists Then + If f.Exists Then + f.Delete - end + + End If + + f = Nil + f = gRTOG.Path.Child("McGill_RT").Child(gRTOG.Patient_ID _ + + "_" + gRTOG.StudyID+grtog.seriesnumber _ + + "_" + DOSXYZ(k).EGSPhantSettings.name + ".egsphanthed") - for l=0 to UBound(gRTOG.Plan(m).Beam) - temp=str(m+1) + If f.Exists Then - While Len(Temp)<3 - Temp="0"+Temp - Wend + f.Delete - temp=gRTOG.Patient_ID+"_"+gRTOG.StudyID+gRTOG.SeriesNumber+"_p"+Temp+str(l)+"_"+DOSXYZ(k).EGSPhantSettings.name + End If + + f = Nil + f = gRTOG.Path.Child("McGill_RT").Child(gRTOG.Patient_ID _ + + "_" + gRTOG.StudyID+grtog.seriesnumber _ + + "_" + DOSXYZ(k).EGSPhantSettings.name+".default") + + If f.Exists Then - f=gRTOG.Plan(m).Path - f=f.Child(temp+".egsinp") - if f.Exists Then - f.Delete - end + f.Delete - f=gRTOG.Plan(m).Path - f=f.Child(temp+".3ddose") - if f.Exists Then - f.Delete - end + End If + + For m As Integer = 0 To gRTOG.Plan.LastRowIndex + f = Nil + f = gRTOG.Plan(m).Path.Child("DOSXYZ_"+DOSXYZ(k).EGSPhantSettings.name+".txt") - f=gRTOG.Plan(m).Path - f=f.Child(temp+".egslst") - if f.Exists Then + If f.Exists Then + f.Delete - end + + End If + For l As Integer =0 To gRTOG.Plan(m).Beam.LastRowIndex + + Var Temp As String = Str(m+1) + + While temp.Length < 3 + + Temp="0"+Temp + + Wend + + Temp = gRTOG.Patient_ID _ + + "_" + gRTOG.StudyID+gRTOG.SeriesNumber _ + + "_p" +Temp+Str(l)+"_"+DOSXYZ(k).EGSPhantSettings.name + + f = Nil + f = gRTOG.Plan(m).Path.Child(temp+".egsinp") + + If f.Exists Then + + f.Delete + + End If + + f = Nil + f = gRTOG.Plan(m).Path.Child(temp+".3ddose") + + If f.Exists Then + + f.Delete + + End If + + f = Nil + f = gRTOG.Plan(m).Path.Child(temp+".egslst") + + If f.Exists Then + + f.Delete + + End If + + + + Next - next + Next - next - - - - - if gPref.DVH_clean Then - // - // Find a name for this dose distribution, assume it is the default one - // - dosename="DOS-"+DOSXYZ(k).EGSPhantSettings.name+"- Total" - gDVH.Delete_DVH_Set(dosename) - Window_Treatment.Dose_DVH - end - + + + + If gPref.DVH_clean Then + // + // Find a name for this dose distribution, assume it is the default one + // + Var dosename As String = "DOS-"+DOSXYZ(k).EGSPhantSettings.name+"- Total" + gDVH.Delete_DVH_Set(dosename) + Window_Treatment.Dose_DVH + End + + + DOSXYZ.Remove( k ) + 'Window_Treatment.MC_dosxyz_beam_progress + Window_Treatment.MC_dosxyz_beam_progress + + Case d.AlternateActionButton + // user pressed Don't Save + Case d.CancelButton + // user pressed Cancel + End Select - DOSXYZ.Remove k - Window_Treatment.MC_dosxyz_beam_progress - end + End End Sub #tag EndMethod @@ -1000,7 +1045,7 @@ Inherits Thread dd.Read_DOSXYZ gDOSXYZ.DOSXYZ.Append dd - //MsgBox "About to run gdosxyz" + //MessageBox "About to run gdosxyz" gDOSXYZ.dosxyz_run_egsphant_CT=True gDOSXYZ.dosxyz_run_egsphant_index=UBound(DOSXYZ) if gDOSXYZ.State=4 Then @@ -1138,7 +1183,7 @@ Inherits Thread // finished egsphant header '=========================Make Phantom - //MsgBox "Make Phantom" + //MessageBox "Make Phantom" if ee.nz<=0 Then Errors.append "Error Making EGSPhant file" //Changed to Errors.append by William Davis to avoid crash due to exception @@ -1295,7 +1340,7 @@ Inherits Thread // finished egsphant header '=========================Make Phantom - //MsgBox "Make Phantom" + //MessageBox "Make Phantom" if ee.nz<=0 Then Return end @@ -1812,7 +1857,7 @@ Inherits Thread f=f.Child(MC_file_name+name+"_"+DOSXYZ(egsphant_index).egsphantsettings.name+".3ddose") if f.Exists=False Then - MsgBox "Could not find file : "+f.Name + MessageBox "Could not find file : "+f.Name PW_Show=false Return end @@ -1971,7 +2016,7 @@ Inherits Thread f=f.Child(MC_file_name+name+"_"+DOSXYZ(egsphant_index).egsphantsettings.name+".3ddose") if f.Exists=False Then - MsgBox "Could not find file : "+f.Name + MessageBox "Could not find file : "+f.Name PW_Show=false Return end @@ -3169,7 +3214,7 @@ Inherits Thread end next if found=False Then - MsgBox "Run Test run could not find a shell to run on" + MessageBox "Run Test run could not find a shell to run on" Return end end diff --git a/DOSXYZnrc/Window_DOSXYZ_EGSPhant_Materials.xojo_window b/DOSXYZnrc/Window_DOSXYZ_EGSPhant_Materials.xojo_window index 3b7b101..77ba384 100644 --- a/DOSXYZnrc/Window_DOSXYZ_EGSPhant_Materials.xojo_window +++ b/DOSXYZnrc/Window_DOSXYZ_EGSPhant_Materials.xojo_window @@ -1826,13 +1826,13 @@ End PopupMenu_CTModel.AddRow gCT.All_CT(i).Model_name next - PopupMenu_CTModel.ListIndex=gDOSXYZ.EGSPhantSettings.CT_model + PopupMenu_CTModel.SelectedRowIndex=gDOSXYZ.EGSPhantSettings.CT_model for i=0 to UBound(grtog.Structures.Structures) PopupMenu_CleanContour.AddRow grtog.Structures.Structures(i).Structure_Name next - PopupMenu_CleanContour.ListIndex=gDOSXYZ.EGSPhantSettings.Cleancontour_index + PopupMenu_CleanContour.SelectedRowIndex=gDOSXYZ.EGSPhantSettings.Cleancontour_index Checkbox_dosxyz_Clean_Contours.Value=gDOSXYZ.EGSPhantSettings.Cleancontours @@ -1844,7 +1844,7 @@ End next for i=0 to UBound(gDOSXYZ.dosxyz_materials) if mm=gDOSXYZ.dosxyz_materials(i).Material_Name Then - PopupMenu_MediumOutside.ListIndex=i + PopupMenu_MediumOutside.SelectedRowIndex=i exit end next @@ -1864,8 +1864,8 @@ End EditField_egsphantname.value = gDOSXYZ.EGSPhantSettings.Name EditField_outsidemedium.value = egsphant.media_of_outside - Listbox_Materials.Heading(0)="Index" - Listbox_Materials.Heading(1)="Material" + Listbox_Materials.HeaderAt(0)="Index" + Listbox_Materials.HeaderAt(1)="Material" UpDate_Manual_List egsphant.Update_MaterialsUD @@ -1883,12 +1883,12 @@ End ListBox_ContourFill.DeleteAllRows - ListBox_ContourFill.heading(0)="Fill Order Large->Small" - ListBox_ContourFill.heading(1)="Structure Name" + ListBox_ContourFill.HeaderAt(0)="Fill Order Large->Small" + ListBox_ContourFill.HeaderAt(1)="Structure Name" - ListBox_ContourFill.heading(3)="Material Name" - ListBox_ContourFill.heading(2)="Use this Material and Density else autofill" - ListBox_ContourFill.heading(4)="Density g/cm^3" + ListBox_ContourFill.HeaderAt(3)="Material Name" + ListBox_ContourFill.HeaderAt(2)="Use this Material and Density else autofill" + ListBox_ContourFill.HeaderAt(4)="Density g/cm^3" ListBox_ContourFill.columntype(0)=1 @@ -1901,10 +1901,10 @@ End for i=0 to ubound(gDOSXYZ.EGSPhantSettings.Contous) ListBox_ContourFill.addrow str(i+1) x=gDOSXYZ.EGSPhantSettings.Contous(i).RTOG_Contour_Index - ListBox_ContourFill.Cell(i,1)=grtog.Structures.Structures(x).Structure_Name - ListBox_ContourFill.cell(i,3)=gDOSXYZ.EGSPhantSettings.Contous(i).materials + ListBox_ContourFill.CellValueAt(i,1)=grtog.Structures.Structures(x).Structure_Name + ListBox_ContourFill.CellValueAt(i,3)=gDOSXYZ.EGSPhantSettings.Contous(i).materials ListBox_ContourFill.CellCheck(i,2)=gDOSXYZ.EGSPhantSettings.Contous(i).Use_Material - ListBox_ContourFill.cell(i,4)=Format(gDOSXYZ.EGSPhantSettings.Contous(i).density,"#.###") + ListBox_ContourFill.CellValueAt(i,4)=Format(gDOSXYZ.EGSPhantSettings.Contous(i).density,"#.###") next @@ -1918,7 +1918,7 @@ End Listbox_Materials.DeleteAllRows for i=0 to UBound(gDOSXYZ.EGSPhantSettings.Materials) Listbox_Materials.AddRow str(i) - Listbox_Materials.Cell(i,1)=gDOSXYZ.EGSPhantSettings.Materials(i) + Listbox_Materials.CellValueAt(i,1)=gDOSXYZ.EGSPhantSettings.Materials(i) next End Sub #tag EndMethod @@ -1930,14 +1930,14 @@ End Listbox_Manual.DeleteAllRows - Listbox_Manual.Heading(0)="Material" - Listbox_Manual.Heading(1)="X from" - Listbox_Manual.Heading(2)="X to" - Listbox_Manual.Heading(3)="Y from" - Listbox_Manual.Heading(4)="Y to" - Listbox_Manual.Heading(5)="Z from" - Listbox_Manual.Heading(6)="Z to" - Listbox_Manual.Heading(7)="Density (g/cc)" + Listbox_Manual.HeaderAt(0)="Material" + Listbox_Manual.HeaderAt(1)="X from" + Listbox_Manual.HeaderAt(2)="X to" + Listbox_Manual.HeaderAt(3)="Y from" + Listbox_Manual.HeaderAt(4)="Y to" + Listbox_Manual.HeaderAt(5)="Z from" + Listbox_Manual.HeaderAt(6)="Z to" + Listbox_Manual.HeaderAt(7)="Density (g/cc)" if egsphant.Del_X>0 Then egsphant.Nx=Round((gDOSXYZ.EGSPhantSettings.X_Max-gDOSXYZ.EGSPhantSettings.X_min)/gDOSXYZ.EGSPhantSettings.Del_X) @@ -2025,16 +2025,16 @@ End for i=0 to UBound(egsphant.Voxels) Listbox_Manual.AddRow egsphant.Voxels(i).Material - Listbox_Manual.Cell(i,1)=Str(egsphant.Voxels(i).X_From) - Listbox_Manual.Cell(i,2)=Str(egsphant.Voxels(i).X_To) + Listbox_Manual.CellValueAt(i,1)=Str(egsphant.Voxels(i).X_From) + Listbox_Manual.CellValueAt(i,2)=Str(egsphant.Voxels(i).X_To) - Listbox_Manual.Cell(i,3)=Str(egsphant.Voxels(i).Y_From) - Listbox_Manual.Cell(i,4)=Str(egsphant.Voxels(i).Y_To) + Listbox_Manual.CellValueAt(i,3)=Str(egsphant.Voxels(i).Y_From) + Listbox_Manual.CellValueAt(i,4)=Str(egsphant.Voxels(i).Y_To) - Listbox_Manual.Cell(i,5)=Str(egsphant.Voxels(i).Z_From) - Listbox_Manual.Cell(i,6)=Str(egsphant.Voxels(i).Z_To) - Listbox_Manual.Cell(i,7)=Format(egsphant.Voxels(i).density,"-#.######") + Listbox_Manual.CellValueAt(i,5)=Str(egsphant.Voxels(i).Z_From) + Listbox_Manual.CellValueAt(i,6)=Str(egsphant.Voxels(i).Z_To) + Listbox_Manual.CellValueAt(i,7)=Format(egsphant.Voxels(i).density,"-#.######") next @@ -2060,7 +2060,7 @@ End - if me.ListIndex>-1 then + if me.SelectedRowIndex>-1 then for i=0 to UBound(gDOSXYZ.dosxyz_materials) MI = New MenuItem MI.Text = gDOSXYZ.dosxyz_materials(i).Material_Name @@ -2078,8 +2078,8 @@ End for i=0 to UBound(gDOSXYZ.dosxyz_materials) if hitItem.Text = gDOSXYZ.dosxyz_materials(i).Material_Name then - gDOSXYZ.EGSPhantSettings.Contous(me.ListIndex).materials=gDOSXYZ.dosxyz_materials(i).Material_Name - gDOSXYZ.EGSPhantSettings.Contous(me.ListIndex).density=gDOSXYZ.dosxyz_materials(i).Material_Density + gDOSXYZ.EGSPhantSettings.Contous(me.SelectedRowIndex).materials=gDOSXYZ.dosxyz_materials(i).Material_Name + gDOSXYZ.EGSPhantSettings.Contous(me.SelectedRowIndex).density=gDOSXYZ.dosxyz_materials(i).Material_Density exit end next @@ -2097,9 +2097,9 @@ End Sub CellTextChange(row as Integer, column as Integer) if row <= UBound(grtog.Structures.Structures) then if column=4 Then - gDOSXYZ.EGSPhantSettings.Contous(row).density=val(me.cell(row,4)) + gDOSXYZ.EGSPhantSettings.Contous(row).density=val(me.CellValueAt(row,4)) elseif column=3 then - gDOSXYZ.EGSPhantSettings.Contous(row).materials=trim(me.cell(row,3)) + gDOSXYZ.EGSPhantSettings.Contous(row).materials=trim(me.CellValueAt(row,3)) end @@ -2122,14 +2122,14 @@ End Dim i as Integer Dim cc as Class_DOSXYZ_EGSPhant_Contour - i=ListBox_ContourFill.ListIndex + i=ListBox_ContourFill.SelectedRowIndex if i>0 and i<=UBound(gDOSXYZ.EGSPhantSettings.Contous) Then cc = new Class_DOSXYZ_EGSPhant_Contour cc=gDOSXYZ.EGSPhantSettings.Contous(i) gDOSXYZ.EGSPhantSettings.Contous.Remove i gDOSXYZ.EGSPhantSettings.Contous.Insert i-1, cc Load_listbox - ListBox_ContourFill.ListIndex=i-1 + ListBox_ContourFill.SelectedRowIndex=i-1 end End Sub @@ -2139,14 +2139,14 @@ End Dim i as Integer Dim cc as Class_DOSXYZ_EGSPhant_Contour - i=ListBox_ContourFill.ListIndex + i=ListBox_ContourFill.SelectedRowIndex if i>=0 and i-1 and i<=UBound(gCT.All_CT) Then EditField_Pegs4.value = gct.All_CT(i).Pegs_file @@ -2327,9 +2327,9 @@ End Sub CellTextChange(row as Integer, column as Integer) if row<=(UBound(egsphant.Voxels)) Then if column=0 Then - egsphant.Voxels(row).Material=Trim(me.Cell(row,0)) + egsphant.Voxels(row).Material=Trim(me.CellValueAt(row,0)) elseif column=7 Then - egsphant.Voxels(row).density=Val(me.Cell(row,7)) + egsphant.Voxels(row).density=Val(me.CellValueAt(row,7)) end egsphant.Update_MaterialsUD Materials_Listbox diff --git a/DOSXYZnrc/Window_DOSXYZ_Import.xojo_window b/DOSXYZnrc/Window_DOSXYZ_Import.xojo_window index 93373a6..2104624 100644 --- a/DOSXYZnrc/Window_DOSXYZ_Import.xojo_window +++ b/DOSXYZnrc/Window_DOSXYZ_Import.xojo_window @@ -1455,15 +1455,15 @@ End #tag Events PopupMenu_x_3ddose #tag Event Sub Change() - if me.ListIndex=0 Then + if me.SelectedRowIndex=0 Then EditField_X_Grid.value = Format(dddose.dx,"-#.#####") EditField_X_coord.value = Format(dddose.Coord_X+X_off,"-#.#####") - elseif me.ListIndex=1 Then + elseif me.SelectedRowIndex=1 Then EditField_X_Grid.value = Format(dddose.dy,"-#.#####") EditField_X_coord.value = Format(dddose.Coord_y+X_off,"-#.#####") - elseif me.ListIndex=2 Then + elseif me.SelectedRowIndex=2 Then EditField_X_Grid.value = Format(dddose.dz,"-#.#####") EditField_X_coord.value = Format(dddose.Coord_z+X_off,"-#.#####") @@ -1476,15 +1476,15 @@ End Sub TextChange() X_off=Val(me.Text) - if PopupMenu_x_3ddose.ListIndex=0 Then + if PopupMenu_x_3ddose.SelectedRowIndex=0 Then EditField_X_Grid.value = Format(dddose.dx,"-#.#####") EditField_X_coord.value = Format(dddose.Coord_X+X_off,"-#.#####") - elseif PopupMenu_x_3ddose.ListIndex=1 Then + elseif PopupMenu_x_3ddose.SelectedRowIndex=1 Then EditField_X_Grid.value = Format(dddose.dy,"-#.#####") EditField_X_coord.value = Format(dddose.Coord_y+X_off,"-#.#####") - elseif PopupMenu_x_3ddose.ListIndex=2 Then + elseif PopupMenu_x_3ddose.SelectedRowIndex=2 Then EditField_X_Grid.value = Format(dddose.dz,"-#.#####") EditField_X_coord.value = Format(dddose.Coord_z+X_off,"-#.#####") @@ -1497,15 +1497,15 @@ End Sub TextChange() Y_off=val(me.Text) - if PopupMenu_y_3ddose.ListIndex=0 Then + if PopupMenu_y_3ddose.SelectedRowIndex=0 Then EditField_y_Grid.value = Format(dddose.dx,"-#.#####") EditField_y_coord.value = Format(dddose.Coord_X+y_off,"-#.#####") - elseif PopupMenu_y_3ddose.ListIndex=1 Then + elseif PopupMenu_y_3ddose.SelectedRowIndex=1 Then EditField_y_Grid.value = Format(dddose.dy,"-#.#####") EditField_y_coord.value = Format(dddose.Coord_y+y_off,"-#.#####") - elseif PopupMenu_y_3ddose.ListIndex=2 Then + elseif PopupMenu_y_3ddose.SelectedRowIndex=2 Then EditField_y_Grid.value = Format(dddose.dz,"-#.#####") EditField_y_coord.value = Format(dddose.Coord_z+y_off,"-#.#####") @@ -1516,13 +1516,13 @@ End #tag Events PopupMenu_y_3ddose #tag Event Sub Change() - if me.ListIndex=0 Then + if me.SelectedRowIndex=0 Then EditField_y_Grid.value = Format(dddose.dx,"-#.#####") EditField_Y_coord.value = Format(dddose.Coord_x+Y_off,"-#.###") - elseif me.ListIndex=1 Then + elseif me.SelectedRowIndex=1 Then EditField_y_Grid.value = Format(dddose.dy,"-#.#####") EditField_Y_coord.value = Format(dddose.Coord_y+Y_off,"-#.###") - elseif me.ListIndex=2 Then + elseif me.SelectedRowIndex=2 Then EditField_y_Grid.value = Format(dddose.dz,"-#.#####") EditField_Y_coord.value = Format(dddose.Coord_z+Y_off,"-#.###") end @@ -1534,15 +1534,15 @@ End Sub TextChange() Z_off=val(me.Text) - if PopupMenu_z_3ddose.ListIndex=0 Then + if PopupMenu_z_3ddose.SelectedRowIndex=0 Then EditField_z_Grid.value = Format(dddose.dx,"-#.#####") EditField_z_coord.value = Format(dddose.Coord_X+z_off,"-#.#####") - elseif PopupMenu_z_3ddose.ListIndex=1 Then + elseif PopupMenu_z_3ddose.SelectedRowIndex=1 Then EditField_z_Grid.value = Format(dddose.dy,"-#.#####") EditField_z_coord.value = Format(dddose.Coord_y+z_off,"-#.#####") - elseif PopupMenu_z_3ddose.ListIndex=2 Then + elseif PopupMenu_z_3ddose.SelectedRowIndex=2 Then EditField_z_Grid.value = Format(dddose.dz,"-#.#####") EditField_z_coord.value = Format(dddose.Coord_z+z_off,"-#.#####") @@ -1553,15 +1553,15 @@ End #tag Events PopupMenu_z_3ddose #tag Event Sub Change() - if me.ListIndex=0 Then + if me.SelectedRowIndex=0 Then EditField_z_Grid.value = Format(dddose.dx,"-#.#####") EditField_z_coord.value = Format(dddose.Coord_x+z_off,"-#.###") - elseif me.ListIndex=1 Then + elseif me.SelectedRowIndex=1 Then EditField_z_Grid.value = Format(dddose.dy,"-#.#####") EditField_z_coord.value = Format(dddose.Coord_y+z_off,"-#.###") - elseif me.ListIndex=2 Then + elseif me.SelectedRowIndex=2 Then EditField_z_Grid.value = Format(dddose.dz,"-#.#####") EditField_z_coord.value = Format(dddose.Coord_z+z_off,"-#.###") @@ -1582,9 +1582,9 @@ End //------------------------------------ - if PopupMenu_x_3ddose.ListIndex<>PopupMenu_y_3ddose.ListIndex and _ - PopupMenu_x_3ddose.ListIndex<>PopupMenu_z_3ddose.ListIndex and _ - PopupMenu_y_3ddose.ListIndex<>PopupMenu_z_3ddose.ListIndex then + if PopupMenu_x_3ddose.SelectedRowIndex<>PopupMenu_y_3ddose.SelectedRowIndex and _ + PopupMenu_x_3ddose.SelectedRowIndex<>PopupMenu_z_3ddose.SelectedRowIndex and _ + PopupMenu_y_3ddose.SelectedRowIndex<>PopupMenu_z_3ddose.SelectedRowIndex then norm=100/val(EditField_Dose_Norm.Text) @@ -1594,45 +1594,45 @@ End // Determine which is the Z axis - if PopupMenu_z_3ddose.ListIndex=0 Then + if PopupMenu_z_3ddose.SelectedRowIndex=0 Then mcgill_dose.Size_of_Dimension3=dddose.Nx mcgill_dose.Depth_Grid=dddose.dx mcgill_dose.Coord_3_1st_point=dddose.boundaryX(0)+mcgill_dose.Depth_Grid/2+z_off - elseif PopupMenu_z_3ddose.ListIndex=1 Then + elseif PopupMenu_z_3ddose.SelectedRowIndex=1 Then mcgill_dose.Size_of_Dimension3=dddose.Ny mcgill_dose.Depth_Grid=dddose.dy mcgill_dose.Coord_3_1st_point=dddose.boundaryy(0)+mcgill_dose.Depth_Grid/2+z_off - elseif PopupMenu_z_3ddose.ListIndex=2 Then + elseif PopupMenu_z_3ddose.SelectedRowIndex=2 Then mcgill_dose.Size_of_Dimension3=dddose.Nz mcgill_dose.Depth_Grid=dddose.dz mcgill_dose.Coord_3_1st_point=dddose.boundaryz(0)+mcgill_dose.Depth_Grid/2+z_off end // Determine which is the X axis - if PopupMenu_x_3ddose.ListIndex=0 Then + if PopupMenu_x_3ddose.SelectedRowIndex=0 Then mcgill_dose.Size_of_Dimension1=dddose.Nx mcgill_dose.Horizontal_Grid=dddose.dx mcgill_dose.Coord_1_1st_point=dddose.boundaryX(0)+mcgill_dose.Horizontal_Grid/2+x_off - elseif PopupMenu_x_3ddose.ListIndex=1 Then + elseif PopupMenu_x_3ddose.SelectedRowIndex=1 Then mcgill_dose.Size_of_Dimension1=dddose.Ny mcgill_dose.Horizontal_Grid=dddose.dy mcgill_dose.Coord_1_1st_point=dddose.boundaryy(0)+mcgill_dose.Horizontal_Grid/2+x_off - elseif PopupMenu_x_3ddose.ListIndex=2 Then + elseif PopupMenu_x_3ddose.SelectedRowIndex=2 Then mcgill_dose.Size_of_Dimension1=dddose.Nz mcgill_dose.Horizontal_Grid=dddose.dz mcgill_dose.Coord_1_1st_point=dddose.boundaryz(0)+mcgill_dose.Horizontal_Grid/2+x_off end // Determine which is the Y axis - if PopupMenu_y_3ddose.ListIndex=0 Then + if PopupMenu_y_3ddose.SelectedRowIndex=0 Then mcgill_dose.Size_of_Dimension2=dddose.Nx mcgill_dose.Vertical_Grid=dddose.dx mcgill_dose.Coord_2_1st_point=dddose.boundaryX(0)+mcgill_dose.Vertical_Grid/2+y_off - elseif PopupMenu_y_3ddose.ListIndex=1 Then + elseif PopupMenu_y_3ddose.SelectedRowIndex=1 Then mcgill_dose.Size_of_Dimension2=dddose.Ny mcgill_dose.Vertical_Grid=dddose.dy mcgill_dose.Coord_2_1st_point=dddose.boundaryy(0)+mcgill_dose.Vertical_Grid/2+y_off - elseif PopupMenu_y_3ddose.ListIndex=2 Then + elseif PopupMenu_y_3ddose.SelectedRowIndex=2 Then mcgill_dose.Size_of_Dimension2=dddose.Nz mcgill_dose.Vertical_Grid=dddose.dz mcgill_dose.Coord_2_1st_point=dddose.boundaryz(0)+mcgill_dose.Vertical_Grid/2+y_off @@ -1662,33 +1662,33 @@ End for j=0 to mcgill_dose.Size_of_Dimension2-1 // Determine which 3ddose axis is correct - if PopupMenu_z_3ddose.ListIndex=0 Then - if PopupMenu_x_3ddose.ListIndex=1 Then - if PopupMenu_y_3ddose.ListIndex=2 Then + if PopupMenu_z_3ddose.SelectedRowIndex=0 Then + if PopupMenu_x_3ddose.SelectedRowIndex=1 Then + if PopupMenu_y_3ddose.SelectedRowIndex=2 Then value=dddose.dose(k,i,j) end - elseif PopupMenu_x_3ddose.ListIndex=2 Then - if PopupMenu_y_3ddose.ListIndex=1 Then + elseif PopupMenu_x_3ddose.SelectedRowIndex=2 Then + if PopupMenu_y_3ddose.SelectedRowIndex=1 Then value=dddose.dose(k,j,i) end end - elseif PopupMenu_z_3ddose.ListIndex=1 Then - if PopupMenu_x_3ddose.ListIndex=0 Then - if PopupMenu_y_3ddose.ListIndex=2 Then + elseif PopupMenu_z_3ddose.SelectedRowIndex=1 Then + if PopupMenu_x_3ddose.SelectedRowIndex=0 Then + if PopupMenu_y_3ddose.SelectedRowIndex=2 Then value=dddose.dose(i,k,j) end - elseif PopupMenu_x_3ddose.ListIndex=2 Then - if PopupMenu_y_3ddose.ListIndex=0 Then + elseif PopupMenu_x_3ddose.SelectedRowIndex=2 Then + if PopupMenu_y_3ddose.SelectedRowIndex=0 Then value=dddose.dose(j,k,i) end end - elseif PopupMenu_z_3ddose.ListIndex=2 Then - if PopupMenu_x_3ddose.ListIndex=0 Then - if PopupMenu_y_3ddose.ListIndex=1 Then + elseif PopupMenu_z_3ddose.SelectedRowIndex=2 Then + if PopupMenu_x_3ddose.SelectedRowIndex=0 Then + if PopupMenu_y_3ddose.SelectedRowIndex=1 Then value=dddose.dose(i,j,k) end - elseif PopupMenu_x_3ddose.ListIndex=1 Then - if PopupMenu_y_3ddose.ListIndex=0 Then + elseif PopupMenu_x_3ddose.SelectedRowIndex=1 Then + if PopupMenu_y_3ddose.SelectedRowIndex=0 Then value=dddose.dose(j,i,k) end end diff --git a/DOSXYZnrc/Window_DOSXYZ_Maininputs.xojo_window b/DOSXYZnrc/Window_DOSXYZ_Maininputs.xojo_window index 1d09e4f..48ade80 100644 --- a/DOSXYZnrc/Window_DOSXYZ_Maininputs.xojo_window +++ b/DOSXYZnrc/Window_DOSXYZ_Maininputs.xojo_window @@ -1853,57 +1853,57 @@ End if dosxyz_input.isource=1 Then - PopupMenu_source.ListIndex=0 + PopupMenu_source.SelectedRowIndex=0 elseif dosxyz_input.isource=2 Then - PopupMenu_source.ListIndex=1 + PopupMenu_source.SelectedRowIndex=1 elseif dosxyz_input.isource=3 Then - PopupMenu_source.ListIndex=2 + PopupMenu_source.SelectedRowIndex=2 elseif dosxyz_input.isource=8 Then - PopupMenu_source.ListIndex=3 + PopupMenu_source.SelectedRowIndex=3 elseif dosxyz_input.isource=9 Then - PopupMenu_source.ListIndex=4 + PopupMenu_source.SelectedRowIndex=4 elseif dosxyz_input.isource=10 Then - PopupMenu_source.ListIndex=5 + PopupMenu_source.SelectedRowIndex=5 elseif dosxyz_input.isource=11 Then - PopupMenu_source.ListIndex=6 + PopupMenu_source.SelectedRowIndex=6 elseif dosxyz_input.isource=20 Then - PopupMenu_source.ListIndex=7 + PopupMenu_source.SelectedRowIndex=7 elseif dosxyz_input.isource=21 Then - PopupMenu_source.ListIndex=8 + PopupMenu_source.SelectedRowIndex=8 end - PopupMenu_Idat.ListIndex=dosxyz_input.IDAT + PopupMenu_Idat.SelectedRowIndex=dosxyz_input.IDAT - PopupMenu_RunOptions.ListIndex=dosxyz_input.IRESTART + PopupMenu_RunOptions.SelectedRowIndex=dosxyz_input.IRESTART if dosxyz_input.IQIN=-1 Then - PopupMenu_incident_part.ListIndex=0 + PopupMenu_incident_part.SelectedRowIndex=0 Elseif dosxyz_input.IQIN=0 Then - PopupMenu_incident_part.ListIndex=1 + PopupMenu_incident_part.SelectedRowIndex=1 Elseif dosxyz_input.IQIN=1 Then - PopupMenu_incident_part.ListIndex=2 + PopupMenu_incident_part.SelectedRowIndex=2 Elseif dosxyz_input.IQIN=2 Then - PopupMenu_incident_part.ListIndex=3 + PopupMenu_incident_part.SelectedRowIndex=3 end - PopupMenu_howfar.ListIndex=dosxyz_input.ihowfarless + PopupMenu_howfar.SelectedRowIndex=dosxyz_input.ihowfarless if dosxyz_input.Max20=0 Then - PopupMenu_Print20Dose.ListIndex=0 + PopupMenu_Print20Dose.SelectedRowIndex=0 else - PopupMenu_Print20Dose.ListIndex=1 + PopupMenu_Print20Dose.SelectedRowIndex=1 end - PopupMenu_rangeR.ListIndex= dosxyz_input.IREJECT + PopupMenu_rangeR.SelectedRowIndex= dosxyz_input.IREJECT if dosxyz_input.dos_Non_CT=false Then @@ -1918,7 +1918,7 @@ End CheckBox_auto_mmctp.Value=False end - PopupMenu_mediumthickness.ListIndex=dosxyz_input.dflag + PopupMenu_mediumthickness.SelectedRowIndex=dosxyz_input.dflag EditField_title.value = dosxyz_input.TITLE EditField_nrcycl.value = Format(dosxyz_input.NRCYCL,"#") @@ -1946,9 +1946,9 @@ End end if dosxyz_input.medsur>=0 and dosxyz_input.medsur<=PopupMenu_mediumoutside.ListCount Then - PopupMenu_mediumoutside.ListIndex=dosxyz_input.medsur + PopupMenu_mediumoutside.SelectedRowIndex=dosxyz_input.medsur else - PopupMenu_mediumoutside.ListIndex=0 + PopupMenu_mediumoutside.SelectedRowIndex=0 end do_nothing=False @@ -1988,9 +1988,9 @@ End #tag Events PopupMenu_Print20Dose #tag Event Sub Change() - if me.ListIndex=0 Then + if me.SelectedRowIndex=0 Then dosxyz_input.Max20=0 - elseif me.ListIndex=1 Then + elseif me.SelectedRowIndex=1 Then dosxyz_input.Max20=1 end @@ -2041,13 +2041,13 @@ End #tag Events PopupMenu_incident_part #tag Event Sub Change() - if me.ListIndex=0 Then + if me.SelectedRowIndex=0 Then dosxyz_input.IQIN=-1 - elseif me.ListIndex=1 Then + elseif me.SelectedRowIndex=1 Then dosxyz_input.IQIN=0 - elseif me.ListIndex=2 Then + elseif me.SelectedRowIndex=2 Then dosxyz_input.IQIN=1 - elseif me.ListIndex=3 Then + elseif me.SelectedRowIndex=3 Then dosxyz_input.IQIN=2 end @@ -2064,44 +2064,44 @@ End Sub Change() if do_nothing=False Then - if me.ListIndex=0 then + if me.SelectedRowIndex=0 then dosxyz_input.isource=1 Window_DOSXYZ_Maininputs_source1.Show - ElseIf me.ListIndex=1 Then + ElseIf me.SelectedRowIndex=1 Then //PopupMenu_source.value = "2 - Full phase-space source file" Then dosxyz_input.isource=2 Window_DOSXYZ_Maininputs_source2.Show - ElseIf me.ListIndex=2 Then + ElseIf me.SelectedRowIndex=2 Then //PopupMenu_source.value = "3 - Point source from front" Then dosxyz_input.isource=3 Window_DOSXYZ_Maininputs_source3.Show - ElseIf me.ListIndex=3 Then + ElseIf me.SelectedRowIndex=3 Then //PopupMenu_source.value = "3 - Point source from front" Then dosxyz_input.isource=8 Window_DOSXYZ_Maininputs_source8.Show - elseif me.ListIndex=4 Then + elseif me.SelectedRowIndex=4 Then dosxyz_input.isource=9 Window_DOSXYZ_Maininputs_source9.Show - elseif me.ListIndex=5 Then + elseif me.SelectedRowIndex=5 Then dosxyz_input.isource=10 Window_DOSXYZ_Maininputs_source10.Show - elseif me.ListIndex=6 Then + elseif me.SelectedRowIndex=6 Then dosxyz_input.isource=11 Window_DOSXYZ_Maininputs_source11.Show - elseif me.ListIndex=7 Then //20 - Simulation through moving MLC with multiple variable settins" + elseif me.SelectedRowIndex=7 Then //20 - Simulation through moving MLC with multiple variable settins" dosxyz_input.isource=20 Window_DOSXYZ_Maininputs_source20.Show - elseif me.ListIndex=8 Then // "21 - BEAM treatment head simulation through moving MLC with multiple variable settings" + elseif me.SelectedRowIndex=8 Then // "21 - BEAM treatment head simulation through moving MLC with multiple variable settings" dosxyz_input.isource=21 Window_DOSXYZ_Maininputs_source21.Show @@ -2111,7 +2111,7 @@ End #tag EndEvent #tag Event Function MouseDown(X As Integer, Y As Integer) As Boolean - me.ListIndex=-1 + me.SelectedRowIndex=-1 End Function #tag EndEvent #tag EndEvents @@ -2209,7 +2209,7 @@ End #tag Event Sub Change() if do_nothing=False Then - dosxyz_input.IREJECT=me.ListIndex + dosxyz_input.IREJECT=me.SelectedRowIndex end End Sub #tag EndEvent @@ -2218,7 +2218,7 @@ End #tag Event Sub Change() if do_nothing=False Then - dosxyz_input.medsur=me.ListIndex + dosxyz_input.medsur=me.SelectedRowIndex end End Sub #tag EndEvent @@ -2227,7 +2227,7 @@ End #tag Event Sub Change() if do_nothing=False Then - dosxyz_input.dflag=me.ListIndex + dosxyz_input.dflag=me.SelectedRowIndex Window_DOSXYZ_Maininputs_Thickness.Show end End Sub @@ -2237,7 +2237,7 @@ End #tag Event Sub Change() if do_nothing=False Then - dosxyz_input.IRESTART=me.ListIndex + dosxyz_input.IRESTART=me.SelectedRowIndex end End Sub #tag EndEvent @@ -2246,7 +2246,7 @@ End #tag Event Sub Change() if do_nothing=False Then - dosxyz_input.ihowfarless=me.ListIndex + dosxyz_input.ihowfarless=me.SelectedRowIndex end End Sub @@ -2264,48 +2264,76 @@ End Sub Action() //-------------------------- // + '//-------------------------- + 'Dim fs as FolderItem + 'Dim temp_Name,file_name,name as String + 'Dim i as Integer + 'Dim bb as Boolean //-------------------------- - Dim fs as FolderItem - Dim temp_Name,file_name,name as String - Dim i as Integer - Dim bb as Boolean - //-------------------------- - - i=MsgBox( "Overwrite existing template input file?" ,1) - - if i =1 Then - i=Window_DOSXYZ_Properties.beam - bb=gDOSXYZ.dosxyz_Input_file(egsphant_index,Window_DOSXYZ_Properties.beam) - name=str(i+1) - While Len(name)<3 - name="0"+name + Var d As New MessageDialog // declare the MessageDialog object + Var b As MessageDialogButton // for handling the result + d.Icon = MessageDialog.GraphicCaution // display warning icon + d.ActionButton.Caption = "Yes" + d.CancelButton.Visible = True // show the Cancel button + d.AlternateActionButton.Visible = True // show the "Don't Save" button + d.AlternateActionButton.Caption = "No" + d.Message = "Overwrite existing template input file?" + 'd.Explanation = "If you don't save, your changes will be lost. " + + b = d.ShowModal // display the dialog + Select Case b // determine which button was pressed. + Case d.ActionButton + + Var bb As Boolean = gDOSXYZ.dosxyz_Input_file(egsphant_index,Window_DOSXYZ_Properties.beam) + Var name As String = Str(Window_DOSXYZ_Properties.beam + 1) + + While name.Length < 3 + + name = "0" + name + Wend - file_name=MC_file_name+name+"_"+gDOSXYZ.DOSXYZ(egsphant_index).EGSPhantSettings.name +".egsinp" - temp_Name=gDOSXYZ.DOSXYZ(egsphant_index).EGSPhantSettings.name+".default" - fs= new FolderItem - fs=gRTOG.path.Child("McGill_RT") - fs=fs.Child(temp_Name) - if fs.Exists Then - fs.Delete - end + Var file_name As String = MC_file_name+name _ + + "_" + gDOSXYZ.DOSXYZ(egsphant_index).EGSPhantSettings.name _ + + ".egsinp" + Var temp_Name As String = gDOSXYZ.DOSXYZ(egsphant_index).EGSPhantSettings.name _ + + ".default" - fs= new FolderItem - fs=gRTOG.Plan(Plan_Index).Path.Child(temp_Name) - if fs.Exists Then - fs.Delete - end + Var f As FolderItem = gRTOG.path.Child("McGill_RT").Child(temp_Name) + + If f.Exists Then + + f.Delete + + End If + + f = Nil + f = gRTOG.Plan(Plan_Index).Path.Child(temp_Name) - fs= new FolderItem - fs=gRTOG.Plan(Plan_Index).Path - fs=fs.Child(file_name) - fs.Name=temp_Name + If f.Exists Then + + f.Delete + + End If + f= Nil + f = gRTOG.Plan(Plan_Index).Path.Child(file_name) + f.Name=temp_Name - if fs.Exists Then - fs.MoveFileTo gRTOG.path.Child("McGill_RT") - end - end + + If f.Exists Then + + f.MoveTo( gRTOG.path.Child("McGill_RT") ) + + + End If + + Case d.AlternateActionButton + // user pressed Don't Save + Case d.CancelButton + // user pressed Cancel + End Select + End Sub #tag EndEvent #tag EndEvents @@ -2346,7 +2374,7 @@ End #tag Event Sub Change() if do_nothing=False Then - dosxyz_input.IDAT=me.ListIndex + dosxyz_input.IDAT=me.SelectedRowIndex end End Sub #tag EndEvent diff --git a/DOSXYZnrc/Window_DOSXYZ_Maininputs_Phantom.xojo_window b/DOSXYZnrc/Window_DOSXYZ_Maininputs_Phantom.xojo_window index 58f0733..14a8db3 100644 --- a/DOSXYZnrc/Window_DOSXYZ_Maininputs_Phantom.xojo_window +++ b/DOSXYZnrc/Window_DOSXYZ_Maininputs_Phantom.xojo_window @@ -883,7 +883,7 @@ End - mindex=PopupMenu_medium_Number.ListIndex + mindex=PopupMenu_medium_Number.SelectedRowIndex if mindex>=0 and mindex<=UBound(gDOSXYZ.dosxyz_materials) Then if dosxyz_input.dos_Non_CT=True Then @@ -891,7 +891,7 @@ End for i=0 to UBound(gDOSXYZ.dosxyz_materials) if name=gDOSXYZ.dosxyz_materials(i).Material_Name Then do_nothing=True - PopupMenu_All_Medium.ListIndex=i + PopupMenu_All_Medium.SelectedRowIndex=i do_nothing=False Return @@ -912,16 +912,16 @@ End if dosxyz_input.zeroairdose=0 Then - PopupMenu_airdose.ListIndex=0 + PopupMenu_airdose.SelectedRowIndex=0 else - PopupMenu_airdose.ListIndex=1 + PopupMenu_airdose.SelectedRowIndex=1 end if dosxyz_input.doseprint=0 Then - PopupMenu_dose_output.ListIndex=0 + PopupMenu_dose_output.SelectedRowIndex=0 else - PopupMenu_dose_output.listIndex=1 + PopupMenu_dose_output.SelectedRowIndex=1 end @@ -949,8 +949,8 @@ End do_nothing=False - PopupMenu_medium_Number.ListIndex=0 - PopupMenu_mediuminside.ListIndex=dosxyz_input.MEDIUM-1 + PopupMenu_medium_Number.SelectedRowIndex=0 + PopupMenu_mediuminside.SelectedRowIndex=dosxyz_input.MEDIUM-1 End Sub #tag EndMethod @@ -1128,9 +1128,9 @@ End 'PopupMenu_airdose.AddRow "no" 'PopupMenu_airdose.AddRow "yes" - if me.ListIndex=0 Then + if me.SelectedRowIndex=0 Then dosxyz_input.zeroairdose=0 - elseif me.ListIndex=1 Then + elseif me.SelectedRowIndex=1 Then dosxyz_input.zeroairdose=1 end @@ -1142,9 +1142,9 @@ End #tag Events PopupMenu_dose_output #tag Event Sub Change() - if me.ListIndex=0 Then + if me.SelectedRowIndex=0 Then dosxyz_input.doseprint=0 - elseif me.ListIndex=1 Then + elseif me.SelectedRowIndex=1 Then dosxyz_input.doseprint=1 end @@ -1215,7 +1215,7 @@ End Sub Change() Dim i,k as Integer - k=PopupMenu_mediuminside.ListIndex+1 + k=PopupMenu_mediuminside.SelectedRowIndex+1 if do_nothing=False Then if k>=1 and k<= dosxyz_input.NMED Then @@ -1260,7 +1260,7 @@ End if do_nothing=False Then if dosxyz_input.dos_Non_CT=True Then - mindex=PopupMenu_medium_Number.ListIndex + mindex=PopupMenu_medium_Number.SelectedRowIndex name=me.Text if mindex>=0 and mindex<=UBound(dosxyz_input.NMedium) Then dosxyz_input.NMedium(mindex)=name diff --git a/DOSXYZnrc/Window_DOSXYZ_Maininputs_Phantom_View.xojo_window b/DOSXYZnrc/Window_DOSXYZ_Maininputs_Phantom_View.xojo_window index 8c6d041..3d65f94 100644 --- a/DOSXYZnrc/Window_DOSXYZ_Maininputs_Phantom_View.xojo_window +++ b/DOSXYZnrc/Window_DOSXYZ_Maininputs_Phantom_View.xojo_window @@ -1188,8 +1188,8 @@ End Display.graphics.penWidth=1 Display.graphics.penheight=1 - Listbox_Materials.Heading(0)="Material" - Listbox_Materials.Heading(1)="Colour" + Listbox_Materials.HeaderAt(0)="Material" + Listbox_Materials.HeaderAt(1)="Colour" for i=0 to UBound(Egsphant.Materials) diff --git a/DOSXYZnrc/Window_DOSXYZ_Maininputs_Phantom_Voxels.xojo_window b/DOSXYZnrc/Window_DOSXYZ_Maininputs_Phantom_Voxels.xojo_window index 0905e06..bdee510 100644 --- a/DOSXYZnrc/Window_DOSXYZ_Maininputs_Phantom_Voxels.xojo_window +++ b/DOSXYZnrc/Window_DOSXYZ_Maininputs_Phantom_Voxels.xojo_window @@ -1202,15 +1202,15 @@ End Dim s,min as Single Dim i as Integer - Listbox_Voxels.Heading(0)="Width" - Listbox_Voxels.Heading(1)="Number in group" + Listbox_Voxels.HeaderAt(0)="Width" + Listbox_Voxels.HeaderAt(1)="Number in group" Listbox_Voxels.DeleteAllRows if Z_Pro Then for i=1 to abs(dosxyz_input.kMAX) Listbox_Voxels.AddRow str(dosxyz_input.kMAX_Group(i-1)) - Listbox_Voxels.Cell(i-1,1) =str(dosxyz_input.KMAX_Group_Num(i-1)) + Listbox_Voxels.CellValueAt(i-1,1) =str(dosxyz_input.KMAX_Group_Num(i-1)) Listbox_Voxels.CellType(i-1,0) =3 Listbox_Voxels.CellType(i-1,1) =3 next @@ -1230,7 +1230,7 @@ End elseif x_Pro Then for i=1 to abs(dosxyz_input.iMAX) Listbox_Voxels.AddRow str(dosxyz_input.iMAX_Group(i-1)) - Listbox_Voxels.Cell(i-1,1) =str(dosxyz_input.iMAX_Group_Num(i-1)) + Listbox_Voxels.CellValueAt(i-1,1) =str(dosxyz_input.iMAX_Group_Num(i-1)) Listbox_Voxels.CellType(i-1,0) =3 Listbox_Voxels.CellType(i-1,1) =3 next @@ -1244,7 +1244,7 @@ End elseif y_Pro Then for i=1 to abs(dosxyz_input.jMAX) Listbox_Voxels.AddRow str(dosxyz_input.jMAX_Group(i-1)) - Listbox_Voxels.Cell(i-1,1) =str(dosxyz_input.jMAX_Group_Num(i-1)) + Listbox_Voxels.CellValueAt(i-1,1) =str(dosxyz_input.jMAX_Group_Num(i-1)) Listbox_Voxels.CellType(i-1,0) =3 Listbox_Voxels.CellType(i-1,1) =3 next @@ -1441,21 +1441,21 @@ End if column=0 Then if X_Pro Then - dosxyz_input.iMAX_Group(row)=val(me.Cell(row,column)) + dosxyz_input.iMAX_Group(row)=val(me.CellValueAt(row,column)) elseif Y_Pro Then - dosxyz_input.jMAX_Group(row)=val(me.Cell(row,column)) + dosxyz_input.jMAX_Group(row)=val(me.CellValueAt(row,column)) elseif Z_Pro Then - dosxyz_input.KMAX_Group(row)=val(me.Cell(row,column)) + dosxyz_input.KMAX_Group(row)=val(me.CellValueAt(row,column)) end elseif column=1 Then if X_Pro Then - dosxyz_input.iMAX_Group_Num(row)=val(me.Cell(row,column)) + dosxyz_input.iMAX_Group_Num(row)=val(me.CellValueAt(row,column)) elseif Y_Pro Then - dosxyz_input.jMAX_Group_Num(row)=val(me.Cell(row,column)) + dosxyz_input.jMAX_Group_Num(row)=val(me.CellValueAt(row,column)) elseif Z_Pro Then - dosxyz_input.KMAX_Group_Num(row)=val(me.Cell(row,column)) + dosxyz_input.KMAX_Group_Num(row)=val(me.CellValueAt(row,column)) end end diff --git a/DOSXYZnrc/Window_DOSXYZ_Maininputs_source10.xojo_window b/DOSXYZnrc/Window_DOSXYZ_Maininputs_source10.xojo_window index 5a3cfac..2a17358 100644 --- a/DOSXYZnrc/Window_DOSXYZ_Maininputs_source10.xojo_window +++ b/DOSXYZnrc/Window_DOSXYZ_Maininputs_source10.xojo_window @@ -756,16 +756,16 @@ End PopupMenu_ScoreLastZ.AddRow "no ZLAST" PopupMenu_ScoreLastZ.AddRow "with ZLAST" if dosxyz_input.mode=0 Then - PopupMenu_ScoreLastZ.ListIndex=0 + PopupMenu_ScoreLastZ.SelectedRowIndex=0 Else - PopupMenu_ScoreLastZ.ListIndex=1 + PopupMenu_ScoreLastZ.SelectedRowIndex=1 end PopupMenu_phasespace.DeleteAllRows PopupMenu_phasespace.AddRow "do not redistribute" PopupMenu_phasespace.AddRow "redistribute" - PopupMenu_phasespace.ListIndex=dosxyz_input.ISMOOTH + PopupMenu_phasespace.SelectedRowIndex=dosxyz_input.ISMOOTH if dosxyz_input.nang>-1 Then RadioButton_pairs.Value=True @@ -799,21 +799,21 @@ End Listbox_Theta.ColumnType(2)=3 - Listbox_Theta.Heading(0)="Theta (degrees)" - Listbox_Theta.Heading(1)="Phi (degrees)" - Listbox_Theta.Heading(2)="Probability" + Listbox_Theta.HeaderAt(0)="Theta (degrees)" + Listbox_Theta.HeaderAt(1)="Phi (degrees)" + Listbox_Theta.HeaderAt(2)="Probability" for i=0 to UBound(dosxyz_input.theta) Listbox_Theta.AddRow(str(dosxyz_input.theta(i))) Listbox_Theta.CellType(i,0)=3 if UBound(dosxyz_input.phi)>=i Then - Listbox_Theta.Cell(i,1)=str(dosxyz_input.phi(i)) + Listbox_Theta.CellValueAt(i,1)=str(dosxyz_input.phi(i)) end Listbox_Theta.CellType(i,1)=3 if UBound(dosxyz_input.pang)>=i Then - Listbox_Theta.Cell(i,2)=str(dosxyz_input.pang(i)) + Listbox_Theta.CellValueAt(i,2)=str(dosxyz_input.pang(i)) end Listbox_Theta.CellType(i,2)=3 Next @@ -837,13 +837,13 @@ End - Listbox_Theta.Heading(0)="vary phi" - Listbox_Theta.Heading(1)="vary theta" - Listbox_Theta.Heading(2)="fixed angle" - Listbox_Theta.Heading(3)="min angle" - Listbox_Theta.Heading(4)="max angle" - Listbox_Theta.Heading(5)="number of beams" - Listbox_Theta.Heading(6)="probability" + Listbox_Theta.HeaderAt(0)="vary phi" + Listbox_Theta.HeaderAt(1)="vary theta" + Listbox_Theta.HeaderAt(2)="fixed angle" + Listbox_Theta.HeaderAt(3)="min angle" + Listbox_Theta.HeaderAt(4)="max angle" + Listbox_Theta.HeaderAt(5)="number of beams" + Listbox_Theta.HeaderAt(6)="probability" for i=0 to UBound(dosxyz_input.ivary) @@ -859,11 +859,11 @@ End - Listbox_Theta.Cell(i,2)=Format(dosxyz_input.angfixed(i),"-#.##") - Listbox_Theta.Cell(i,3)=Format(dosxyz_input.angmin(i),"-#.##") - Listbox_Theta.Cell(i,4)=Format(dosxyz_input.angmax(i),"-#.##") - Listbox_Theta.Cell(i,5)=Format(dosxyz_input.ngang(i),"#") - Listbox_Theta.Cell(i,6)=Format(dosxyz_input.pgang(i),"-#.##") + Listbox_Theta.CellValueAt(i,2)=Format(dosxyz_input.angfixed(i),"-#.##") + Listbox_Theta.CellValueAt(i,3)=Format(dosxyz_input.angmin(i),"-#.##") + Listbox_Theta.CellValueAt(i,4)=Format(dosxyz_input.angmax(i),"-#.##") + Listbox_Theta.CellValueAt(i,5)=Format(dosxyz_input.ngang(i),"#") + Listbox_Theta.CellValueAt(i,6)=Format(dosxyz_input.pgang(i),"-#.##") Next @@ -916,9 +916,9 @@ End #tag Event Sub Change() if do_nothing=False Then - if me.ListIndex=0 Then + if me.SelectedRowIndex=0 Then dosxyz_input.mode=0 - Elseif me.ListIndex=1 Then + Elseif me.SelectedRowIndex=1 Then dosxyz_input.mode=2 end end @@ -929,7 +929,7 @@ End #tag Event Sub Change() if do_nothing=False Then - dosxyz_input.ISMOOTH= me.ListIndex + dosxyz_input.ISMOOTH= me.SelectedRowIndex end End Sub #tag EndEvent @@ -975,8 +975,6 @@ End #tag EndEvent #tag Event Function ContextualMenuAction(hitItem as MenuItem) As Boolean - Dim i as Integer - Select Case hitItem.Text Case "Add row" @@ -986,7 +984,8 @@ End dosxyz_input.pang.Append 1 dosxyz_input.nang=dosxyz_input.nang+1 - else + Else + dosxyz_input.nang=dosxyz_input.nang-1 dosxyz_input.angfixed.Append 0 dosxyz_input.angmax.Append 0 @@ -996,31 +995,49 @@ End dosxyz_input.ivary.Append 0 - - end + End If PopListbox Case "Delete row" - i=MsgBox("Are you sure you want to delete plan "+chr(13)+gRTOG.Plan(Plan_Index).Plan_ID +"?",1,"Warning") - if RadioButton_pairs.Value Then - dosxyz_input.theta.Remove me.ListIndex - dosxyz_input.phi.Remove me.ListIndex - dosxyz_input.pang.Remove me.ListIndex - dosxyz_input.nang=dosxyz_input.nang-1 - - else - dosxyz_input.nang=dosxyz_input.nang+1 - dosxyz_input.angfixed.Remove me.ListIndex - dosxyz_input.angmax.Remove me.ListIndex - dosxyz_input.angmin.Remove me.ListIndex - dosxyz_input.pgang.Remove me.ListIndex - dosxyz_input.ngang.Remove me.ListIndex - dosxyz_input.ivary.Remove me.ListIndex - end - PopListbox + Var d As New MessageDialog // declare the MessageDialog object + Var b As MessageDialogButton // for handling the result + d.Icon = MessageDialog.GraphicCaution // display warning icon + d.ActionButton.Caption = "Delete" + d.CancelButton.Visible = True // show the Cancel button + d.AlternateActionButton.Visible = True // show the "Don't Save" button + d.AlternateActionButton.Caption = "Don't delete" + d.Message = "Are you sure you want to delete plan " _ + + Chr(13)+gRTOG.Plan(Plan_Index).Plan_ID +"?" + 'd.Explanation = "If you don't save, your changes will be lost. " + + b = d.ShowModal // display the dialog + Select Case b // determine which button was pressed. + Case d.ActionButton + If RadioButton_pairs.Value Then + dosxyz_input.theta.Remove Me.SelectedRowIndex + dosxyz_input.phi.Remove Me.SelectedRowIndex + dosxyz_input.pang.Remove Me.SelectedRowIndex + dosxyz_input.nang=dosxyz_input.nang-1 + + Else + dosxyz_input.nang=dosxyz_input.nang+1 + dosxyz_input.angfixed.Remove Me.SelectedRowIndex + dosxyz_input.angmax.Remove Me.SelectedRowIndex + dosxyz_input.angmin.Remove Me.SelectedRowIndex + dosxyz_input.pgang.Remove Me.SelectedRowIndex + dosxyz_input.ngang.Remove Me.SelectedRowIndex + dosxyz_input.ivary.Remove Me.SelectedRowIndex + End + PopListbox + Case d.AlternateActionButton + // user pressed Don't Save + Case d.CancelButton + // user pressed Cancel + End Select + @@ -1032,9 +1049,9 @@ End Sub CellTextChange(row as Integer, column as Integer) if RadioButton_pairs.Value Then - dosxyz_input.theta(row)=Val(me.Cell(row,0)) - dosxyz_input.phi(row)=Val(me.Cell(row,1)) - dosxyz_input.pang(row)=Val(me.Cell(row,2)) + dosxyz_input.theta(row)=Val(me.CellValueAt(row,0)) + dosxyz_input.phi(row)=Val(me.CellValueAt(row,1)) + dosxyz_input.pang(row)=Val(me.CellValueAt(row,2)) @@ -1042,11 +1059,11 @@ End else - dosxyz_input.angfixed(row)=Val(me.Cell(row,2)) - dosxyz_input.angmax(row)=Val(me.Cell(row,4)) - dosxyz_input.angmin(row)=Val(me.Cell(row,3)) - dosxyz_input.ngang(row)=Val(me.Cell(row,5)) - dosxyz_input.pgang(row)=Val(me.Cell(row,6)) + dosxyz_input.angfixed(row)=Val(me.CellValueAt(row,2)) + dosxyz_input.angmax(row)=Val(me.CellValueAt(row,4)) + dosxyz_input.angmin(row)=Val(me.CellValueAt(row,3)) + dosxyz_input.ngang(row)=Val(me.CellValueAt(row,5)) + dosxyz_input.pgang(row)=Val(me.CellValueAt(row,6)) diff --git a/DOSXYZnrc/Window_DOSXYZ_Maininputs_source11.xojo_window b/DOSXYZnrc/Window_DOSXYZ_Maininputs_source11.xojo_window index 1d3f3cf..357ee08 100644 --- a/DOSXYZnrc/Window_DOSXYZ_Maininputs_source11.xojo_window +++ b/DOSXYZnrc/Window_DOSXYZ_Maininputs_source11.xojo_window @@ -1152,7 +1152,7 @@ End PopupMenu_LatchBitFilter.AddRow "I BIT FILTER=2" PopupMenu_LatchBitFilter.AddRow "I BIT FILTER=3" - PopupMenu_LatchBitFilter.ListIndex=dosxyz_input.I_bit_filter + PopupMenu_LatchBitFilter.SelectedRowIndex=dosxyz_input.I_bit_filter End Sub #tag EndEvent @@ -1277,7 +1277,7 @@ End #tag Events PopupMenu_LatchBitFilter #tag Event Sub Change() - dosxyz_input.I_bit_filter=me.ListIndex + dosxyz_input.I_bit_filter=me.SelectedRowIndex End Sub #tag EndEvent #tag EndEvents diff --git a/DOSXYZnrc/Window_DOSXYZ_Maininputs_source2.xojo_window b/DOSXYZnrc/Window_DOSXYZ_Maininputs_source2.xojo_window index 86969a6..7d9dcde 100644 --- a/DOSXYZnrc/Window_DOSXYZ_Maininputs_source2.xojo_window +++ b/DOSXYZnrc/Window_DOSXYZ_Maininputs_source2.xojo_window @@ -1025,16 +1025,16 @@ End PopupMenu_ScoreLastZ.AddRow "no ZLAST" PopupMenu_ScoreLastZ.AddRow "with ZLAST" if dosxyz_input.mode=0 Then - PopupMenu_ScoreLastZ.ListIndex=0 + PopupMenu_ScoreLastZ.SelectedRowIndex=0 Else - PopupMenu_ScoreLastZ.ListIndex=1 + PopupMenu_ScoreLastZ.SelectedRowIndex=1 end PopupMenu_phasespace.DeleteAllRows PopupMenu_phasespace.AddRow "do not redistribute" PopupMenu_phasespace.AddRow "redistribute" - PopupMenu_phasespace.ListIndex=dosxyz_input.ISMOOTH + PopupMenu_phasespace.SelectedRowIndex=dosxyz_input.ISMOOTH @@ -1066,9 +1066,9 @@ End #tag Event Sub Change() if do_nothing=False Then - if me.ListIndex=0 Then + if me.SelectedRowIndex=0 Then dosxyz_input.mode=0 - Elseif me.ListIndex=1 Then + Elseif me.SelectedRowIndex=1 Then dosxyz_input.mode=2 end end @@ -1079,7 +1079,7 @@ End #tag Event Sub Change() if do_nothing=False Then - dosxyz_input.ISMOOTH= me.ListIndex + dosxyz_input.ISMOOTH= me.SelectedRowIndex end End Sub #tag EndEvent diff --git a/DOSXYZnrc/Window_DOSXYZ_Maininputs_source20.xojo_window b/DOSXYZnrc/Window_DOSXYZ_Maininputs_source20.xojo_window index 41b8469..65e8c04 100644 --- a/DOSXYZnrc/Window_DOSXYZ_Maininputs_source20.xojo_window +++ b/DOSXYZnrc/Window_DOSXYZ_Maininputs_source20.xojo_window @@ -1012,28 +1012,28 @@ End for i=0 to (dosxyz_input.nset-1) Listbox_Points.AddRow - Listbox_Points.Cell(i,0)=Format(dosxyz_input.isox(i),"-#.####") - Listbox_Points.Cell(i,1)=Format(dosxyz_input.isoy(i),"-#.####") - Listbox_Points.Cell(i,2)=Format(dosxyz_input.isoz(i),"-#.####") - Listbox_Points.Cell(i,3)=Format(dosxyz_input.theta(i),"-#.####") - Listbox_Points.Cell(i,4)=Format(dosxyz_input.phi(i),"-#.####") - Listbox_Points.Cell(i,5)=Format(dosxyz_input.phicol(i),"-#.####") - Listbox_Points.Cell(i,6)=Format(dosxyz_input.dsources(i),"#.###") - Listbox_Points.Cell(i,7)=Format(dosxyz_input.muIndex(i),"#.#####") + Listbox_Points.CellValueAt(i,0)=Format(dosxyz_input.isox(i),"-#.####") + Listbox_Points.CellValueAt(i,1)=Format(dosxyz_input.isoy(i),"-#.####") + Listbox_Points.CellValueAt(i,2)=Format(dosxyz_input.isoz(i),"-#.####") + Listbox_Points.CellValueAt(i,3)=Format(dosxyz_input.theta(i),"-#.####") + Listbox_Points.CellValueAt(i,4)=Format(dosxyz_input.phi(i),"-#.####") + Listbox_Points.CellValueAt(i,5)=Format(dosxyz_input.phicol(i),"-#.####") + Listbox_Points.CellValueAt(i,6)=Format(dosxyz_input.dsources(i),"#.###") + Listbox_Points.CellValueAt(i,7)=Format(dosxyz_input.muIndex(i),"#.#####") Next Listbox_Points.HasHeading=True Listbox_Points.HasHeading=True - Listbox_Points.heading(0)="Iso X" - Listbox_Points.heading(1)="Iso Y" - Listbox_Points.heading(2)="Iso Z" - Listbox_Points.heading(3)="Theta" - Listbox_Points.heading(4)="Phi" - Listbox_Points.heading(5)="Phicol" - Listbox_Points.heading(6)="D-Source" - Listbox_Points.heading(7)="MU Index" + Listbox_Points.HeaderAt(0)="Iso X" + Listbox_Points.HeaderAt(1)="Iso Y" + Listbox_Points.HeaderAt(2)="Iso Z" + Listbox_Points.HeaderAt(3)="Theta" + Listbox_Points.HeaderAt(4)="Phi" + Listbox_Points.HeaderAt(5)="Phicol" + Listbox_Points.HeaderAt(6)="D-Source" + Listbox_Points.HeaderAt(7)="MU Index" End Sub #tag EndMethod @@ -1101,14 +1101,14 @@ End #tag Events Listbox_Points #tag Event Sub CellTextChange(row as Integer, column as Integer) - dosxyz_input.isox(row) =val( Listbox_Points.Cell(row,0)) - dosxyz_input.isoy(row) =val( Listbox_Points.Cell(row,1)) - dosxyz_input.isoz(row) = val(Listbox_Points.Cell(row,2)) - dosxyz_input.theta(row) = val(Listbox_Points.Cell(row,3)) - dosxyz_input.phi(row) = val(Listbox_Points.Cell(row,4)) - dosxyz_input.phicol(row) = val(Listbox_Points.Cell(row,5)) - dosxyz_input.dsources(row) =val( Listbox_Points.Cell(row,6)) - dosxyz_input.muIndex(row) = val(Listbox_Points.Cell(row,7)) + dosxyz_input.isox(row) =val( Listbox_Points.CellValueAt(row,0)) + dosxyz_input.isoy(row) =val( Listbox_Points.CellValueAt(row,1)) + dosxyz_input.isoz(row) = val(Listbox_Points.CellValueAt(row,2)) + dosxyz_input.theta(row) = val(Listbox_Points.CellValueAt(row,3)) + dosxyz_input.phi(row) = val(Listbox_Points.CellValueAt(row,4)) + dosxyz_input.phicol(row) = val(Listbox_Points.CellValueAt(row,5)) + dosxyz_input.dsources(row) =val( Listbox_Points.CellValueAt(row,6)) + dosxyz_input.muIndex(row) = val(Listbox_Points.CellValueAt(row,7)) End Sub #tag EndEvent #tag EndEvents diff --git a/DOSXYZnrc/Window_DOSXYZ_Maininputs_source21.xojo_window b/DOSXYZnrc/Window_DOSXYZ_Maininputs_source21.xojo_window index 8335f8a..3b99940 100644 --- a/DOSXYZnrc/Window_DOSXYZ_Maininputs_source21.xojo_window +++ b/DOSXYZnrc/Window_DOSXYZ_Maininputs_source21.xojo_window @@ -820,7 +820,7 @@ End PopupMenu_LatchBitFilter.AddRow "I BIT FILTER=2" PopupMenu_LatchBitFilter.AddRow "I BIT FILTER=3" - PopupMenu_LatchBitFilter.ListIndex=dosxyz_input.I_bit_filter + PopupMenu_LatchBitFilter.SelectedRowIndex=dosxyz_input.I_bit_filter EditField_vcu_code.value = dosxyz_input.the_vcu_code EditField_vcu_file.value = dosxyz_input.the_vcu_input_file @@ -847,28 +847,28 @@ End for i=0 to (dosxyz_input.nset-1) Listbox_Points.AddRow - Listbox_Points.Cell(i,0)=Format(dosxyz_input.isox(i),"-#.####") - Listbox_Points.Cell(i,1)=Format(dosxyz_input.isoy(i),"-#.####") - Listbox_Points.Cell(i,2)=Format(dosxyz_input.isoz(i),"-#.####") - Listbox_Points.Cell(i,3)=Format(dosxyz_input.theta(i),"-#.####") - Listbox_Points.Cell(i,4)=Format(dosxyz_input.phi(i),"-#.####") - Listbox_Points.Cell(i,5)=Format(dosxyz_input.phicol(i),"-#.####") - Listbox_Points.Cell(i,6)=Format(dosxyz_input.dsources(i),"#.###") - Listbox_Points.Cell(i,7)=Format(dosxyz_input.muIndex(i),"#.#####") + Listbox_Points.CellValueAt(i,0)=Format(dosxyz_input.isox(i),"-#.####") + Listbox_Points.CellValueAt(i,1)=Format(dosxyz_input.isoy(i),"-#.####") + Listbox_Points.CellValueAt(i,2)=Format(dosxyz_input.isoz(i),"-#.####") + Listbox_Points.CellValueAt(i,3)=Format(dosxyz_input.theta(i),"-#.####") + Listbox_Points.CellValueAt(i,4)=Format(dosxyz_input.phi(i),"-#.####") + Listbox_Points.CellValueAt(i,5)=Format(dosxyz_input.phicol(i),"-#.####") + Listbox_Points.CellValueAt(i,6)=Format(dosxyz_input.dsources(i),"#.###") + Listbox_Points.CellValueAt(i,7)=Format(dosxyz_input.muIndex(i),"#.#####") Next Listbox_Points.HasHeading=True Listbox_Points.HasHeading=True - Listbox_Points.heading(0)="Iso X" - Listbox_Points.heading(1)="Iso Y" - Listbox_Points.heading(2)="Iso Z" - Listbox_Points.heading(3)="Theta" - Listbox_Points.heading(4)="Phi" - Listbox_Points.heading(5)="Phicol" - Listbox_Points.heading(6)="D-Source" - Listbox_Points.heading(7)="MU Index" + Listbox_Points.HeaderAt(0)="Iso X" + Listbox_Points.HeaderAt(1)="Iso Y" + Listbox_Points.HeaderAt(2)="Iso Z" + Listbox_Points.HeaderAt(3)="Theta" + Listbox_Points.HeaderAt(4)="Phi" + Listbox_Points.HeaderAt(5)="Phicol" + Listbox_Points.HeaderAt(6)="D-Source" + Listbox_Points.HeaderAt(7)="MU Index" End Sub #tag EndMethod @@ -976,21 +976,21 @@ End #tag Events PopupMenu_LatchBitFilter #tag Event Sub Change() - dosxyz_input.I_bit_filter=me.ListIndex + dosxyz_input.I_bit_filter=me.SelectedRowIndex End Sub #tag EndEvent #tag EndEvents #tag Events Listbox_Points #tag Event Sub CellTextChange(row as Integer, column as Integer) - dosxyz_input.isox(row) =val( Listbox_Points.Cell(row,0)) - dosxyz_input.isoy(row) =val( Listbox_Points.Cell(row,1)) - dosxyz_input.isoz(row) = val(Listbox_Points.Cell(row,2)) - dosxyz_input.theta(row) = val(Listbox_Points.Cell(row,3)) - dosxyz_input.phi(row) = val(Listbox_Points.Cell(row,4)) - dosxyz_input.phicol(row) = val(Listbox_Points.Cell(row,5)) - dosxyz_input.dsources(row) =val( Listbox_Points.Cell(row,6)) - dosxyz_input.muIndex(row) = val(Listbox_Points.Cell(row,7)) + dosxyz_input.isox(row) =val( Listbox_Points.CellValueAt(row,0)) + dosxyz_input.isoy(row) =val( Listbox_Points.CellValueAt(row,1)) + dosxyz_input.isoz(row) = val(Listbox_Points.CellValueAt(row,2)) + dosxyz_input.theta(row) = val(Listbox_Points.CellValueAt(row,3)) + dosxyz_input.phi(row) = val(Listbox_Points.CellValueAt(row,4)) + dosxyz_input.phicol(row) = val(Listbox_Points.CellValueAt(row,5)) + dosxyz_input.dsources(row) =val( Listbox_Points.CellValueAt(row,6)) + dosxyz_input.muIndex(row) = val(Listbox_Points.CellValueAt(row,7)) End Sub #tag EndEvent #tag EndEvents diff --git a/DOSXYZnrc/Window_DOSXYZ_Maininputs_source8.xojo_window b/DOSXYZnrc/Window_DOSXYZ_Maininputs_source8.xojo_window index ac5a0de..64138b1 100644 --- a/DOSXYZnrc/Window_DOSXYZ_Maininputs_source8.xojo_window +++ b/DOSXYZnrc/Window_DOSXYZ_Maininputs_source8.xojo_window @@ -756,16 +756,16 @@ End PopupMenu_ScoreLastZ.AddRow "no ZLAST" PopupMenu_ScoreLastZ.AddRow "with ZLAST" if dosxyz_input.mode=0 Then - PopupMenu_ScoreLastZ.ListIndex=0 + PopupMenu_ScoreLastZ.SelectedRowIndex=0 Else - PopupMenu_ScoreLastZ.ListIndex=1 + PopupMenu_ScoreLastZ.SelectedRowIndex=1 end PopupMenu_phasespace.DeleteAllRows PopupMenu_phasespace.AddRow "do not redistribute" PopupMenu_phasespace.AddRow "redistribute" - PopupMenu_phasespace.ListIndex=dosxyz_input.ISMOOTH + PopupMenu_phasespace.SelectedRowIndex=dosxyz_input.ISMOOTH if dosxyz_input.nang>-1 Then RadioButton_pairs.Value=True @@ -799,21 +799,21 @@ End Listbox_Theta.ColumnType(2)=3 - Listbox_Theta.Heading(0)="Theta (degrees)" - Listbox_Theta.Heading(1)="Phi (degrees)" - Listbox_Theta.Heading(2)="Probability" + Listbox_Theta.HeaderAt(0)="Theta (degrees)" + Listbox_Theta.HeaderAt(1)="Phi (degrees)" + Listbox_Theta.HeaderAt(2)="Probability" for i=0 to UBound(dosxyz_input.theta) Listbox_Theta.AddRow(str(dosxyz_input.theta(i))) Listbox_Theta.CellType(i,0)=3 if UBound(dosxyz_input.phi)>=i Then - Listbox_Theta.Cell(i,1)=str(dosxyz_input.phi(i)) + Listbox_Theta.CellValueAt(i,1)=str(dosxyz_input.phi(i)) end Listbox_Theta.CellType(i,1)=3 if UBound(dosxyz_input.pang)>=i Then - Listbox_Theta.Cell(i,2)=str(dosxyz_input.pang(i)) + Listbox_Theta.CellValueAt(i,2)=str(dosxyz_input.pang(i)) end Listbox_Theta.CellType(i,2)=3 Next @@ -837,13 +837,13 @@ End - Listbox_Theta.Heading(0)="vary phi" - Listbox_Theta.Heading(1)="vary theta" - Listbox_Theta.Heading(2)="fixed angle" - Listbox_Theta.Heading(3)="min angle" - Listbox_Theta.Heading(4)="max angle" - Listbox_Theta.Heading(5)="number of beams" - Listbox_Theta.Heading(6)="probability" + Listbox_Theta.HeaderAt(0)="vary phi" + Listbox_Theta.HeaderAt(1)="vary theta" + Listbox_Theta.HeaderAt(2)="fixed angle" + Listbox_Theta.HeaderAt(3)="min angle" + Listbox_Theta.HeaderAt(4)="max angle" + Listbox_Theta.HeaderAt(5)="number of beams" + Listbox_Theta.HeaderAt(6)="probability" for i=0 to UBound(dosxyz_input.ivary) @@ -859,11 +859,11 @@ End - Listbox_Theta.Cell(i,2)=Format(dosxyz_input.angfixed(i),"-#.##") - Listbox_Theta.Cell(i,3)=Format(dosxyz_input.angmin(i),"-#.##") - Listbox_Theta.Cell(i,4)=Format(dosxyz_input.angmax(i),"-#.##") - Listbox_Theta.Cell(i,5)=Format(dosxyz_input.ngang(i),"#") - Listbox_Theta.Cell(i,6)=Format(dosxyz_input.pgang(i),"-#.##") + Listbox_Theta.CellValueAt(i,2)=Format(dosxyz_input.angfixed(i),"-#.##") + Listbox_Theta.CellValueAt(i,3)=Format(dosxyz_input.angmin(i),"-#.##") + Listbox_Theta.CellValueAt(i,4)=Format(dosxyz_input.angmax(i),"-#.##") + Listbox_Theta.CellValueAt(i,5)=Format(dosxyz_input.ngang(i),"#") + Listbox_Theta.CellValueAt(i,6)=Format(dosxyz_input.pgang(i),"-#.##") Next @@ -916,9 +916,9 @@ End #tag Event Sub Change() if do_nothing=False Then - if me.ListIndex=0 Then + if me.SelectedRowIndex=0 Then dosxyz_input.mode=0 - Elseif me.ListIndex=1 Then + Elseif me.SelectedRowIndex=1 Then dosxyz_input.mode=2 end end @@ -929,7 +929,7 @@ End #tag Event Sub Change() if do_nothing=False Then - dosxyz_input.ISMOOTH= me.ListIndex + dosxyz_input.ISMOOTH= me.SelectedRowIndex end End Sub #tag EndEvent @@ -975,18 +975,17 @@ End #tag EndEvent #tag Event Function ContextualMenuAction(hitItem as MenuItem) As Boolean - Dim i as Integer - Select Case hitItem.Text Case "Add row" - if RadioButton_pairs.Value Then + If RadioButton_pairs.Value Then dosxyz_input.theta.Append 0 dosxyz_input.phi.Append 0 dosxyz_input.pang.Append 1 dosxyz_input.nang=dosxyz_input.nang+1 - else + Else + dosxyz_input.nang=dosxyz_input.nang-1 dosxyz_input.angfixed.Append 0 dosxyz_input.angmax.Append 0 @@ -995,32 +994,52 @@ End dosxyz_input.ngang.Append 2 dosxyz_input.ivary.Append 0 - - - end + End PopListbox Case "Delete row" - i=MsgBox("Are you sure you want to delete plan "+chr(13)+gRTOG.Plan(Plan_Index).Plan_ID +"?",1,"Warning") - if RadioButton_pairs.Value Then - dosxyz_input.theta.Remove me.ListIndex - dosxyz_input.phi.Remove me.ListIndex - dosxyz_input.pang.Remove me.ListIndex - dosxyz_input.nang=dosxyz_input.nang-1 - - else - dosxyz_input.nang=dosxyz_input.nang+1 - dosxyz_input.angfixed.Remove me.ListIndex - dosxyz_input.angmax.Remove me.ListIndex - dosxyz_input.angmin.Remove me.ListIndex - dosxyz_input.pgang.Remove me.ListIndex - dosxyz_input.ngang.Remove me.ListIndex - dosxyz_input.ivary.Remove me.ListIndex - end - PopListbox + Var d As New MessageDialog // declare the MessageDialog object + Var b As MessageDialogButton // for handling the result + d.Icon = MessageDialog.GraphicCaution // display warning icon + d.ActionButton.Caption = "Delete" + d.CancelButton.Visible = True // show the Cancel button + d.AlternateActionButton.Visible = True // show the "Don't Save" button + d.AlternateActionButton.Caption = "Don't Delete" + d.Message = "Are you sure you want to delete plan " _ + + Chr(13) + gRTOG.Plan(Plan_Index).Plan_ID + "?" + 'd.Explanation = "If you don't save, your changes will be lost. " + + b = d.ShowModal // display the dialog + Select Case b // determine which button was pressed. + Case d.ActionButton + If RadioButton_pairs.Value Then + dosxyz_input.theta.Remove Me.SelectedRowIndex + dosxyz_input.phi.Remove Me.SelectedRowIndex + dosxyz_input.pang.Remove Me.SelectedRowIndex + dosxyz_input.nang=dosxyz_input.nang-1 + + Else + dosxyz_input.nang=dosxyz_input.nang+1 + dosxyz_input.angfixed.Remove Me.SelectedRowIndex + dosxyz_input.angmax.Remove Me.SelectedRowIndex + dosxyz_input.angmin.Remove Me.SelectedRowIndex + dosxyz_input.pgang.Remove Me.SelectedRowIndex + dosxyz_input.ngang.Remove Me.SelectedRowIndex + dosxyz_input.ivary.Remove Me.SelectedRowIndex + End + PopListbox + Case d.AlternateActionButton + // user pressed Don't Save + Case d.CancelButton + // user pressed Cancel + End Select + + + + @@ -1032,9 +1051,9 @@ End Sub CellTextChange(row as Integer, column as Integer) if RadioButton_pairs.Value Then - dosxyz_input.theta(row)=Val(me.Cell(row,0)) - dosxyz_input.phi(row)=Val(me.Cell(row,1)) - dosxyz_input.pang(row)=Val(me.Cell(row,2)) + dosxyz_input.theta(row)=Val(me.CellValueAt(row,0)) + dosxyz_input.phi(row)=Val(me.CellValueAt(row,1)) + dosxyz_input.pang(row)=Val(me.CellValueAt(row,2)) @@ -1042,11 +1061,11 @@ End else - dosxyz_input.angfixed(row)=Val(me.Cell(row,2)) - dosxyz_input.angmax(row)=Val(me.Cell(row,4)) - dosxyz_input.angmin(row)=Val(me.Cell(row,3)) - dosxyz_input.ngang(row)=Val(me.Cell(row,5)) - dosxyz_input.pgang(row)=Val(me.Cell(row,6)) + dosxyz_input.angfixed(row)=Val(me.CellValueAt(row,2)) + dosxyz_input.angmax(row)=Val(me.CellValueAt(row,4)) + dosxyz_input.angmin(row)=Val(me.CellValueAt(row,3)) + dosxyz_input.ngang(row)=Val(me.CellValueAt(row,5)) + dosxyz_input.pgang(row)=Val(me.CellValueAt(row,6)) diff --git a/DOSXYZnrc/Window_DOSXYZ_Maininputs_source9.xojo_window b/DOSXYZnrc/Window_DOSXYZ_Maininputs_source9.xojo_window index f79bc17..9fca270 100644 --- a/DOSXYZnrc/Window_DOSXYZ_Maininputs_source9.xojo_window +++ b/DOSXYZnrc/Window_DOSXYZ_Maininputs_source9.xojo_window @@ -949,7 +949,7 @@ End PopupMenu_LatchBitFilter.AddRow "I BIT FILTER=2" PopupMenu_LatchBitFilter.AddRow "I BIT FILTER=3" - PopupMenu_LatchBitFilter.ListIndex=dosxyz_input.I_bit_filter + PopupMenu_LatchBitFilter.SelectedRowIndex=dosxyz_input.I_bit_filter End Sub #tag EndEvent @@ -1081,7 +1081,7 @@ End #tag Events PopupMenu_LatchBitFilter #tag Event Sub Change() - dosxyz_input.I_bit_filter=me.ListIndex + dosxyz_input.I_bit_filter=me.SelectedRowIndex End Sub #tag EndEvent #tag EndEvents diff --git a/DOSXYZnrc/Window_DOSXYZ_Properties.xojo_window b/DOSXYZnrc/Window_DOSXYZ_Properties.xojo_window index 7f5157c..ddb3500 100644 --- a/DOSXYZnrc/Window_DOSXYZ_Properties.xojo_window +++ b/DOSXYZnrc/Window_DOSXYZ_Properties.xojo_window @@ -1635,7 +1635,7 @@ End EditField_MU_BS.value = Format(dosxyz.DOSXYZ_Input(beam).dos_MU_BS,"-#.###") - PopupMenu_Shell.ListIndex=dosxyz.DOSXYZ_Input(beam).dos_Shell_Index + PopupMenu_Shell.SelectedRowIndex=dosxyz.DOSXYZ_Input(beam).dos_Shell_Index dosxyz.DOSXYZ_Input(beam).dos_Shell=PopupMenu_Shell.Text CheckBox_Detected.Value=dosxyz.DOSXYZ_Input(beam).dos_3ddose_detected @@ -1802,7 +1802,7 @@ End Sub Change() if do_nothing=False Then dosxyz.DOSXYZ_Input(beam).dos_Shell = me.text - dosxyz.DOSXYZ_Input(beam).dos_Shell_Index = me.ListIndex + dosxyz.DOSXYZ_Input(beam).dos_Shell_Index = me.SelectedRowIndex MC_Get_Linac_Properties_for_patientdose(beam) end End Sub diff --git a/DVH/Window_DVH_Plot.xojo_window b/DVH/Window_DVH_Plot.xojo_window index 485e2e7..3f35615 100644 --- a/DVH/Window_DVH_Plot.xojo_window +++ b/DVH/Window_DVH_Plot.xojo_window @@ -1089,7 +1089,7 @@ End DVHGraph.Default_Settings - DVH_index=Listbox_Graphs.ListIndex + DVH_index=Listbox_Graphs.SelectedRowIndex if Len(TextField_Xmax.Text)>0 Then DVHGraph.x_Maximum=val(TextField_Xmax.Text) @@ -1178,7 +1178,7 @@ End for i=0 to ubound(grtog.Structures.Structures) if Window_Treatment.ListBox_DVH_Graphs.CellCheck(i,k) then for x=0 to UBound(gDVH.All_DVH) - if gDVH.All_DVH(x).Name=Window_Treatment.ListBox_DVH_Graphs.Heading(k) and _ + if gDVH.All_DVH(x).Name=Window_Treatment.ListBox_DVH_Graphs.HeaderAt(k) and _ gDVH.All_DVH(x).struc_names=grtog.Structures.Structures(i).Structure_Name Then temp_DVH=gDVH.All_DVH(x) DVH.Append temp_DVH @@ -1196,18 +1196,18 @@ End DVHGraph.Default_Settings Listbox_Graphs.deleteAllRows - Listbox_Graphs.Heading(0)="Name" - Listbox_Graphs.Heading(1)="col" - Listbox_Graphs.Heading(2)="show" - Listbox_Graphs.Heading(3)="mean dose" - Listbox_Graphs.Heading(4)="mean uncer" - Listbox_Graphs.Heading(5)="stdev dose" - Listbox_Graphs.Heading(6)="min dose" - Listbox_Graphs.Heading(7)="max dose" - Listbox_Graphs.Heading(8)="D50" - Listbox_Graphs.Heading(9)="Unit voxel Vol cm^3" - Listbox_Graphs.Heading(10)="Total voxel Vol cm^3" - Listbox_Graphs.Heading(11)="Geo Vol cm^3" + Listbox_Graphs.HeaderAt(0)="Name" + Listbox_Graphs.HeaderAt(1)="col" + Listbox_Graphs.HeaderAt(2)="show" + Listbox_Graphs.HeaderAt(3)="mean dose" + Listbox_Graphs.HeaderAt(4)="mean uncer" + Listbox_Graphs.HeaderAt(5)="stdev dose" + Listbox_Graphs.HeaderAt(6)="min dose" + Listbox_Graphs.HeaderAt(7)="max dose" + Listbox_Graphs.HeaderAt(8)="D50" + Listbox_Graphs.HeaderAt(9)="Unit voxel Vol cm^3" + Listbox_Graphs.HeaderAt(10)="Total voxel Vol cm^3" + Listbox_Graphs.HeaderAt(11)="Geo Vol cm^3" Listbox_Graphs.ColumnWidths="25%,5%,5%,10%,10%,10%,10%,10%,10%,10%,10%,10%" @@ -1218,64 +1218,64 @@ End Listbox_Graphs.CellCheck(i,2)=DVHGraph.Profiles.One_Profile(i).Show if abs(DVH(i).avgdose)<0.001 Then - Listbox_Graphs.Cell(i,3)=Format(DVH(i).avgdose,"-0.00###e") + Listbox_Graphs.CellValueAt(i,3)=Format(DVH(i).avgdose,"-0.00###e") else - Listbox_Graphs.Cell(i,3)=Format(DVH(i).avgdose,"-0.00##") + Listbox_Graphs.CellValueAt(i,3)=Format(DVH(i).avgdose,"-0.00##") end if abs(DVH(i).avg_error)<0.001 Then - Listbox_Graphs.Cell(i,4)=Format(DVH(i).avg_error,"-0.00###e") + Listbox_Graphs.CellValueAt(i,4)=Format(DVH(i).avg_error,"-0.00###e") else - Listbox_Graphs.Cell(i,4)=Format(DVH(i).avg_error,"-0.00##") + Listbox_Graphs.CellValueAt(i,4)=Format(DVH(i).avg_error,"-0.00##") end if abs(DVH(i).stdev)<0.01 Then - Listbox_Graphs.Cell(i,5)=Format(DVH(i).stdev,"-0.00###e") + Listbox_Graphs.CellValueAt(i,5)=Format(DVH(i).stdev,"-0.00###e") else - Listbox_Graphs.Cell(i,5)=Format(DVH(i).stdev,"-0.00##") + Listbox_Graphs.CellValueAt(i,5)=Format(DVH(i).stdev,"-0.00##") end if abs(DVH(i).mindose)<0.01 Then - Listbox_Graphs.Cell(i,6)=Format(DVH(i).mindose,"-0.00###e") + Listbox_Graphs.CellValueAt(i,6)=Format(DVH(i).mindose,"-0.00###e") else - Listbox_Graphs.Cell(i,6)=Format(DVH(i).mindose,"-0.00##") + Listbox_Graphs.CellValueAt(i,6)=Format(DVH(i).mindose,"-0.00##") end if abs(DVH(i).maxdose)<0.001 Then - Listbox_Graphs.Cell(i,7)=Format(DVH(i).maxdose,"-0.00###e") + Listbox_Graphs.CellValueAt(i,7)=Format(DVH(i).maxdose,"-0.00###e") else - Listbox_Graphs.Cell(i,7)=Format(DVH(i).maxdose,"-0.00##") + Listbox_Graphs.CellValueAt(i,7)=Format(DVH(i).maxdose,"-0.00##") end if abs(DVH(i).D50)<0.001 Then - Listbox_Graphs.Cell(i,8)=Format(DVH(i).D50,"-0.00###e") + Listbox_Graphs.CellValueAt(i,8)=Format(DVH(i).D50,"-0.00###e") else - Listbox_Graphs.Cell(i,8)=Format(DVH(i).D50,"-0.00##") + Listbox_Graphs.CellValueAt(i,8)=Format(DVH(i).D50,"-0.00##") end if abs(DVH(i).pixelvolume)>0.001 Then - Listbox_Graphs.Cell(i,9)=Format(DVH(i).pixelvolume,"-0.00###") + Listbox_Graphs.CellValueAt(i,9)=Format(DVH(i).pixelvolume,"-0.00###") else - Listbox_Graphs.Cell(i,9)=Format(DVH(i).pixelvolume,"-0.00###e") + Listbox_Graphs.CellValueAt(i,9)=Format(DVH(i).pixelvolume,"-0.00###e") end if abs(DVH(i).pixelvolume*DVH(i).NumberofPixels)>0.001 Then - Listbox_Graphs.Cell(i,10)=Format(DVH(i).pixelvolume*DVH(i).NumberofPixels,"-0.00###") + Listbox_Graphs.CellValueAt(i,10)=Format(DVH(i).pixelvolume*DVH(i).NumberofPixels,"-0.00###") else - Listbox_Graphs.Cell(i,10)=Format(DVH(i).pixelvolume*DVH(i).NumberofPixels,"-0.00###e") + Listbox_Graphs.CellValueAt(i,10)=Format(DVH(i).pixelvolume*DVH(i).NumberofPixels,"-0.00###e") end if abs(DVH(i).svolume)>0.001 Then - Listbox_Graphs.Cell(i,11)=Format(DVH(i).svolume,"-0.00###") + Listbox_Graphs.CellValueAt(i,11)=Format(DVH(i).svolume,"-0.00###") else - Listbox_Graphs.Cell(i,11)=Format(DVH(i).svolume,"-0.00###e") + Listbox_Graphs.CellValueAt(i,11)=Format(DVH(i).svolume,"-0.00###e") end next - Listbox_Graphs.listIndex=-1 + Listbox_Graphs.SelectedRowIndex=-1 @@ -1504,13 +1504,13 @@ End //------------------------------- - if Listbox_Graphs.ListIndex <>-1 then - j=Listbox_Graphs.ListIndex + if Listbox_Graphs.SelectedRowIndex <>-1 then + j=Listbox_Graphs.SelectedRowIndex if j>-1 and j<=UBound(DVH) Then gDVH.Export_DVH_Text(DVH(j)) end else - MsgBox "1st, select a graph" + MessageBox "1st, select a graph" end End Sub #tag EndEvent diff --git a/EGSnrc/Window_EGSnrc_Inputs.xojo_window b/EGSnrc/Window_EGSnrc_Inputs.xojo_window index 250cc77..e6f389e 100644 --- a/EGSnrc/Window_EGSnrc_Inputs.xojo_window +++ b/EGSnrc/Window_EGSnrc_Inputs.xojo_window @@ -1210,7 +1210,7 @@ End PopupMenu_BcA.AddRow "PRESTA-I" for i=0 to PopupMenu_BcA.ListCount-1 if EGSnrc.BcA=PopupMenu_BcA.List(i) Then - PopupMenu_BcA.ListIndex=i + PopupMenu_BcA.SelectedRowIndex=i end next @@ -1221,7 +1221,7 @@ End PopupMenu_EsA.AddRow "PRESTA-I" for i=0 to PopupMenu_EsA.ListCount-1 if EGSnrc.Electron_Step_Algorithm=PopupMenu_EsA.List(i) Then - PopupMenu_EsA.ListIndex=i + PopupMenu_EsA.SelectedRowIndex=i end next @@ -1233,7 +1233,7 @@ End PopupMenu_Spin.AddRow "On" for i=0 to PopupMenu_Spin.ListCount-1 if EGSnrc.Spin_effects=PopupMenu_Spin.List(i) Then - PopupMenu_Spin.ListIndex=i + PopupMenu_Spin.SelectedRowIndex=i end next @@ -1243,7 +1243,7 @@ End PopupMenu_Bremsangular.AddRow "KM" for i=0 to PopupMenu_Bremsangular.ListCount-1 if EGSnrc.Brems_angular_sampling=PopupMenu_Bremsangular.List(i) Then - PopupMenu_Bremsangular.ListIndex=i + PopupMenu_Bremsangular.SelectedRowIndex=i end next @@ -1254,7 +1254,7 @@ End PopupMenu_BremsCrossSections.AddRow "NRC" for i=0 to PopupMenu_BremsCrossSections.ListCount-1 if EGSnrc.Brems_cross_sections=PopupMenu_BremsCrossSections.List(i) Then - PopupMenu_BremsCrossSections.ListIndex=i + PopupMenu_BremsCrossSections.SelectedRowIndex=i end next @@ -1266,7 +1266,7 @@ End PopupMenu_BoundComptonScattering.AddRow "Off in regions" for i=0 to PopupMenu_BoundComptonScattering.ListCount-1 if EGSnrc.BoundComptonscattering=PopupMenu_BoundComptonScattering.List(i) Then - PopupMenu_BoundComptonScattering.ListIndex=i + PopupMenu_BoundComptonScattering.SelectedRowIndex=i end next @@ -1279,7 +1279,7 @@ End PopupMenu_Electron_Impact_Ionization.AddRow "Gryzinski" for i=0 to PopupMenu_Electron_Impact_Ionization.ListCount-1 if EGSnrc.Electronimpactionization=PopupMenu_Electron_Impact_Ionization.List(i) Then - PopupMenu_Electron_Impact_Ionization.ListIndex=i + PopupMenu_Electron_Impact_Ionization.SelectedRowIndex=i end next @@ -1293,7 +1293,7 @@ End PopupMenu_Rayleigh.AddRow "Off in regions" for i=0 to PopupMenu_Rayleigh.ListCount-1 if EGSnrc.Rayleighscattering=PopupMenu_Rayleigh.List(i) Then - PopupMenu_Rayleigh.ListIndex=i + PopupMenu_Rayleigh.SelectedRowIndex=i end next @@ -1304,7 +1304,7 @@ End PopupMenu_Pairangularsampling.AddRow "KM" for i=0 to PopupMenu_Pairangularsampling.ListCount-1 if EGSnrc.Pairangularsampling=PopupMenu_Pairangularsampling.List(i) Then - PopupMenu_Pairangularsampling.ListIndex=i + PopupMenu_Pairangularsampling.SelectedRowIndex=i end next @@ -1316,7 +1316,7 @@ End PopupMenu_atomicrelax.AddRow "Off in regions" for i=0 to PopupMenu_atomicrelax.ListCount-1 if EGSnrc.Atomicrelaxations=PopupMenu_atomicrelax.List(i) Then - PopupMenu_atomicrelax.ListIndex=i + PopupMenu_atomicrelax.SelectedRowIndex=i end next @@ -1327,7 +1327,7 @@ End PopupMenu_Photon_Cross_Sections.AddRow "xcom" for i=0 to PopupMenu_Photon_Cross_Sections.ListCount-1 if EGSnrc.Photoncrosssections=PopupMenu_Photon_Cross_Sections.List(i) Then - PopupMenu_Photon_Cross_Sections.ListIndex=i + PopupMenu_Photon_Cross_Sections.SelectedRowIndex=i end next @@ -1338,7 +1338,7 @@ End PopupMenu_Photoelectron_angular.AddRow "Off in regions" for i=0 to PopupMenu_Photoelectron_angular.ListCount-1 if EGSnrc.Photoelectronangularsampling=PopupMenu_Photoelectron_angular.List(i) Then - PopupMenu_Photoelectron_angular.ListIndex=i + PopupMenu_Photoelectron_angular.SelectedRowIndex=i end next diff --git a/Gamma/WindowGamma.xojo_window b/Gamma/WindowGamma.xojo_window index 238b7e2..d1a09e2 100644 --- a/Gamma/WindowGamma.xojo_window +++ b/Gamma/WindowGamma.xojo_window @@ -202,7 +202,7 @@ End else - MsgBox "Error: Picture is Nil" + MessageBox "Error: Picture is Nil" end if End Sub @@ -259,7 +259,7 @@ End ' else - MsgBox "Error: Picture is Nil" + MessageBox "Error: Picture is Nil" end if End Sub @@ -322,7 +322,7 @@ End ' else - MsgBox "Error: Picture is Nil" + MessageBox "Error: Picture is Nil" end if End Sub diff --git a/Gamma/Window_dose.xojo_window b/Gamma/Window_dose.xojo_window index 244d053..98e864d 100644 --- a/Gamma/Window_dose.xojo_window +++ b/Gamma/Window_dose.xojo_window @@ -973,8 +973,8 @@ End Listbox_DoseA.DeleteAllRows Listbox_DoseB.DeleteAllRows - Listbox_DoseA.Heading(0)="Reference Dose Distribution" - Listbox_DoseB.Heading(0)="Evaluation Dose Distribution" + Listbox_DoseA.HeaderAt(0)="Reference Dose Distribution" + Listbox_DoseB.HeaderAt(0)="Evaluation Dose Distribution" for i=0 to UBound(gRTOG.Plan) @@ -1012,7 +1012,7 @@ End for k=0 to UBound(gRTOG.Plan(i).Dose) - if Listbox_DoseA.cell(Listbox_DoseA.ListIndex,0)=gRTOG.Plan(i).Dose(k).dose_name Then + if Listbox_DoseA.CellValueAt(Listbox_DoseA.SelectedRowIndex,0)=gRTOG.Plan(i).Dose(k).dose_name Then planindex_a=i doseindex_a=k @@ -1164,7 +1164,7 @@ End for k=0 to UBound(gRTOG.Plan(i).Dose) - if Listbox_DoseB.cell(Listbox_DoseB.ListIndex,0)=gRTOG.Plan(i).Dose(k).dose_name Then + if Listbox_DoseB.CellValueAt(Listbox_DoseB.SelectedRowIndex,0)=gRTOG.Plan(i).Dose(k).dose_name Then planindex_b=i doseindex_b=k @@ -1331,13 +1331,13 @@ End for k=0 to UBound(gRTOG.Plan(i).Dose) - if Listbox_DoseA.cell(Listbox_DoseA.ListIndex,0)=gRTOG.Plan(i).Dose(k).dose_name Then + if Listbox_DoseA.CellValueAt(Listbox_DoseA.SelectedRowIndex,0)=gRTOG.Plan(i).Dose(k).dose_name Then planindex_a=i doseindex_a=k flagtestA=true end - if Listbox_DoseB.Cell(Listbox_DoseB.ListIndex,0)=gRTOG.Plan(i).Dose(k).dose_name Then + if Listbox_DoseB.CellValueAt(Listbox_DoseB.SelectedRowIndex,0)=gRTOG.Plan(i).Dose(k).dose_name Then planindex_b=i doseindex_b=k flagtestB=true @@ -1667,7 +1667,7 @@ End else - MsgBox("Please insert missing parameters") + MessageBox("Please insert missing parameters") end if @@ -1677,7 +1677,7 @@ End else - MsgBox("Please choose either gamma or dose difference calculation.") + MessageBox("Please choose either gamma or dose difference calculation.") end if @@ -1686,7 +1686,7 @@ End else - MsgBox("Please choose two dose distributions") + MessageBox("Please choose two dose distributions") end if @@ -1817,7 +1817,7 @@ End for k=0 to UBound(gRTOG.Plan(i).Dose) - if Listbox_DoseA.cell(Listbox_DoseA.ListIndex,0)=gRTOG.Plan(i).Dose(k).dose_name Then + if Listbox_DoseA.CellValueAt(Listbox_DoseA.SelectedRowIndex,0)=gRTOG.Plan(i).Dose(k).dose_name Then planindex_a=i doseindex_a=k @@ -1851,7 +1851,7 @@ End If Keyboard.AsyncKeyDown(124) and CanvasA_Flag then //do something with the right arrow key... - MsgBox("right") + MessageBox("right") if slice_numberAUBound(gRTOG.Plan(Plan_Index).Beam) Then - 'MsgBox "Error within DAO Jaw program. Cannot matched index of beam to exisiting beam within gopt.IPbeams" + 'MessageBox "Error within DAO Jaw program. Cannot matched index of beam to exisiting beam within gopt.IPbeams" 'Break 'end ' diff --git a/MERT/GradDVH/Class_MERT_GradDVH.xojo_code b/MERT/GradDVH/Class_MERT_GradDVH.xojo_code index e31af13..9198b2a 100644 --- a/MERT/GradDVH/Class_MERT_GradDVH.xojo_code +++ b/MERT/GradDVH/Class_MERT_GradDVH.xojo_code @@ -362,7 +362,7 @@ Protected Class Class_MERT_GradDVH dvh_bin=gOpt.dvh_bin bb=Write_GradDVH_Input if bb=False Then - MsgBox "Could not Write input file" + MessageBox "Could not Write input file" Return end @@ -382,7 +382,7 @@ Protected Class Class_MERT_GradDVH g=g.Child("GradRun") ts=g.CreateTextFile if ts=nil Then - MsgBox "Could not Write GradRun file" + MessageBox "Could not Write GradRun file" Return end diff --git a/MERT/NLODVH/Class_MERT_NLODVH.xojo_code b/MERT/NLODVH/Class_MERT_NLODVH.xojo_code index 094814a..ad75635 100644 --- a/MERT/NLODVH/Class_MERT_NLODVH.xojo_code +++ b/MERT/NLODVH/Class_MERT_NLODVH.xojo_code @@ -326,7 +326,7 @@ Protected Class Class_MERT_NLODVH 'Delete_NLO_files 'bb=Write_NLO_Input 'if bb=False Then - 'MsgBox "Could not write NLO input file!" + 'MessageBox "Could not write NLO input file!" 'Return 'end ' @@ -349,7 +349,7 @@ Protected Class Class_MERT_NLODVH 'g=g.Child("NLORun") 'ts=g.CreateTextFile 'if ts=nil Then - 'MsgBox "Could not write NLORun file" + 'MessageBox "Could not write NLORun file" 'Return 'end ' diff --git a/MERT/Thread_Optimization.xojo_code b/MERT/Thread_Optimization.xojo_code index 9314ece..d332f8e 100644 --- a/MERT/Thread_Optimization.xojo_code +++ b/MERT/Thread_Optimization.xojo_code @@ -650,7 +650,7 @@ Inherits Thread next ts.Close else - MsgBox "Could not write Fields.dat!" + MessageBox "Could not write Fields.dat!" end End Sub diff --git a/MERT/Window_EMET_Results.xojo_window b/MERT/Window_EMET_Results.xojo_window index 089f1eb..b0e70ea 100644 --- a/MERT/Window_EMET_Results.xojo_window +++ b/MERT/Window_EMET_Results.xojo_window @@ -1486,7 +1486,7 @@ End PopupMenu_DVH.addRow grtog.Structures.Structures(i).Structure_Name next - PopupMenu_DVH.ListIndex=0 + PopupMenu_DVH.SelectedRowIndex=0 End Sub #tag EndEvent @@ -1608,7 +1608,7 @@ End pp.Label = DVHs.All_DVH(k).Name + " " + DVHs.All_DVH(k).struc_names If PopupMenu_DVH.SelectedRowValue = "ALL" Or _ - PopupMenu_DVH.SelectedRowValue = DVHs.All_DVH(k).struc_names Then + PopupMenu_DVH.SelectedRowValue = DVHs.All_DVH(k).struc_names Then pp.Show=True @@ -1683,7 +1683,7 @@ End ' ' 'dvh_dosecount=0 - 'i=Listbox_Results.ListIndex + 'i=Listbox_Results.SelectedRowIndex 'ReDim DVHs.All_DVH(-1) 'dvhsim=0 'for i=0 to Listbox_Results.ListCount @@ -1693,7 +1693,7 @@ End 'dvh_dosecount=dvh_dosecount+1 ' 'dvhsim=dvhsim+1 - 'temp=Listbox_Results.Cell(i,8) + 'temp=Listbox_Results.CellValueAt(i,8) 'splitf=split(temp,"~~~") 'splitf.Remove UBound(splitf) ' @@ -1703,7 +1703,7 @@ End 'normDVH.Append UBound(DVHs.All_DVH) 'dd.StringFile=splitf(k) 'DVHs.Read_DVH_String(dd) - 'dd.Name=Listbox_Results.Cell(i,13) + 'dd.Name=Listbox_Results.CellValueAt(i,13) 'dd.DVH_Symbol=dvhsim 'dd.Dose_Name=dd.Name ' @@ -1739,7 +1739,7 @@ End Sub Load_Inputfile() Dim i as Integer - i=Listbox_Results.ListIndex + i=Listbox_Results.SelectedRowIndex TextArea_Input.value = "" TextArea_Output.value = "" @@ -1747,11 +1747,11 @@ End if i>=0 and i<=Listbox_Results.ListCount Then - TextArea_Input.value = Listbox_Results.Cell(i,5)+Chr(10)+"----Organ & Target Values ------ "+chr(10)+Listbox_Results.Cell(i,9) - TextArea_Output.value = Listbox_Results.Cell(i,6)+Chr(10)+"----Fluence File------ "+chr(10)+Listbox_Results.Cell(i,7)+Chr(10)+"----DVH File------ "+chr(10)+Listbox_Results.Cell(i,8) - TextArea_Output.value = Listbox_Results.Cell(i,6)+Chr(10)+"----Fluence File------ "+chr(10)+Listbox_Results.Cell(i,7)+Chr(10)+"----DVH File------ "+chr(10)+Listbox_Results.Cell(i,8) + TextArea_Input.value = Listbox_Results.CellValueAt(i,5)+Chr(10)+"----Organ & Target Values ------ "+chr(10)+Listbox_Results.CellValueAt(i,9) + TextArea_Output.value = Listbox_Results.CellValueAt(i,6)+Chr(10)+"----Fluence File------ "+chr(10)+Listbox_Results.CellValueAt(i,7)+Chr(10)+"----DVH File------ "+chr(10)+Listbox_Results.CellValueAt(i,8) + TextArea_Output.value = Listbox_Results.CellValueAt(i,6)+Chr(10)+"----Fluence File------ "+chr(10)+Listbox_Results.CellValueAt(i,7)+Chr(10)+"----DVH File------ "+chr(10)+Listbox_Results.CellValueAt(i,8) DoNot=True - TextArea_Note.value = Listbox_Results.Cell(i,12) + TextArea_Note.value = Listbox_Results.CellValueAt(i,12) DoNot=False end @@ -1768,8 +1768,8 @@ End 'Dim ostring as String '//-------------------- ' - 'if Listbox_Results.ListIndex>=0 and Listbox_Results.ListIndex<=Listbox_Results.ListCount Then - 'ostring=Listbox_Results.Cell(Listbox_Results.ListIndex,9) + 'if Listbox_Results.SelectedRowIndex>=0 and Listbox_Results.SelectedRowIndex<=Listbox_Results.ListCount Then + 'ostring=Listbox_Results.CellValueAt(Listbox_Results.SelectedRowIndex,9) 'gOpt.Read_DV_Contraints_String(Oarray, ostring) 'end End Sub @@ -1788,9 +1788,9 @@ End ReDim IPbeams(-1) - i=Listbox_Results.ListIndex + i=Listbox_Results.SelectedRowIndex if i>=0 and i<=Listbox_Results.ListCount Then - PB_Data=Listbox_Results.Cell(i,10) + PB_Data=Listbox_Results.CellValueAt(i,10) line=Split(PB_Data,chr(10)) ReDim line(UBound(line)-1) For i=0 to UBound(line) @@ -1842,7 +1842,7 @@ End for i=0 to Listbox_PBSum.ListCount-1 for x=1 to Listbox_PBSum.ColumnCount if Listbox_PBSum.CellCheck(i,x) Then - field.Append Listbox_PBSum.Cell(i,0) + field.Append Listbox_PBSum.CellValueAt(i,0) pb_rows.Append i Exit end @@ -1851,9 +1851,9 @@ End for x=0 to UBound(field) for k=1 to Listbox_PBSum.ColumnCount if Listbox_PBSum.CellCheck(pb_rows(x),k) Then - temp=Listbox_PBSum.Heading(k) + temp=Listbox_PBSum.HeaderAt(k) for i=0 to UBound(IPbeams) - if field(x)=IPbeams(i).Beam_Description and IPbeams(i).Energy=Listbox_PBSum.Heading(k) Then + if field(x)=IPbeams(i).Beam_Description and IPbeams(i).Energy=Listbox_PBSum.HeaderAt(k) Then index.Append i total_MU_Grad=total_MU_Grad+IPbeams(i).MUs_Grad total_Grad_W=total_Grad_W+IPbeams(i).Weight_Grad @@ -1896,75 +1896,67 @@ End // // //--------------------------------- - Dim i as Integer - Dim sql,icvalue,cvalue,ddate,mertP,infile,outfile,fluenceF,dvhf,organCon,plan,PB_Data,note,label, time as String - Dim rs as RecordSet - Dim bb as Boolean + 'Dim i as Integer + 'Dim sql,icvalue,cvalue,ddate,mertP,infile,outfile,fluenceF,dvhf,organCon,plan,PB_Data,note,label, time as String + 'Dim rs As RecordSet + 'Dim bb as Boolean //--------------------------------- - Listbox_Results.DeleteAllRows + Listbox_Results.RemoveAllRows Listbox_Results.ColumnCount=14 - Listbox_Results.Heading(0)="InitialCostValue" - Listbox_Results.Heading(1)="FinialCostValue" - Listbox_Results.Heading(2)="Date" - Listbox_Results.Heading(3)="MERTProgram" - Listbox_Results.Heading(4)="Time (min)" - Listbox_Results.Heading(5)="InputFile" - Listbox_Results.Heading(6)="OutputFile" - Listbox_Results.Heading(7)="Fluence" - Listbox_Results.Heading(8)="DVHs" - Listbox_Results.Heading(9)="InputConstraints" - Listbox_Results.Heading(10)="PB Data" - Listbox_Results.Heading(11)="Plan" - Listbox_Results.Heading(12)="Note" - Listbox_Results.Heading(13)="Label" - - listbox_Results.ColumnWidths="10%,10%,15%,10%,8%,0%,0%,0%,0%,0%,0%,12%,35%,10%" - - - sql="select CostValue, Date, MERTProgram, Time, InputFile, OutputFile, Fluence, DVHs, InputConstraints, PB_Data, Plan, Note, Label, InitialScore from Results" - - if gOpt.results.Connect Then - rs=gOpt.results.SQLSelect(sql) - if rs=nil Then + Listbox_Results.HeaderAt(0)="InitialCostValue" + Listbox_Results.HeaderAt(1)="FinialCostValue" + Listbox_Results.HeaderAt(2)="Date" + Listbox_Results.HeaderAt(3)="MERTProgram" + Listbox_Results.HeaderAt(4)="Time (min)" + Listbox_Results.HeaderAt(5)="InputFile" + Listbox_Results.HeaderAt(6)="OutputFile" + Listbox_Results.HeaderAt(7)="Fluence" + Listbox_Results.HeaderAt(8)="DVHs" + Listbox_Results.HeaderAt(9)="InputConstraints" + Listbox_Results.HeaderAt(10)="PB Data" + Listbox_Results.HeaderAt(11)="Plan" + Listbox_Results.HeaderAt(12)="Note" + Listbox_Results.HeaderAt(13)="Label" + + listbox_Results.ColumnWidths = "10%,10%,15%,10%,8%,0%,0%,0%,0%,0%,0%,12%,35%,10%" + + + Var sql As String = "select CostValue, Date, MERTProgram, " _ + + "Time, InputFile, OutputFile, Fluence, DVHs, InputConstraints, " _ + + "PB_Data, Plan, Note, Label, InitialScore from Results" + + If gOpt.results.Connect Then + Var rs As RowSet = gOpt.results.SelectSQL(sql) + If rs = Nil Then Return - end - While not rs.eof - icvalue=rs.Field("InitialScore").StringValue - cvalue=rs.Field("CostValue").StringValue - ddate=rs.Field("Date").StringValue - mertP=rs.Field("MERTProgram").StringValue - time=rs.Field("Time").StringValue - infile=rs.Field("InputFile").StringValue - outfile=rs.Field("OutputFile").StringValue - fluenceF=rs.Field("Fluence").StringValue - dvhf=rs.Field("DVHs").StringValue - organCon=rs.Field("InputConstraints").StringValue - PB_Data=rs.Field("PB_Data").StringValue - Plan=rs.Field("Plan").StringValue - note=rs.Field("Note").StringValue - label=rs.Field("Label").StringValue - Listbox_Results.AddRow "" - Listbox_Results.Cell(Listbox_Results.LastIndex,0)=icvalue - Listbox_Results.Cell(Listbox_Results.LastIndex,1)=cvalue - Listbox_Results.Cell(Listbox_Results.LastIndex,2)=ddate - Listbox_Results.Cell(Listbox_Results.LastIndex,3) =mertP - Listbox_Results.Cell(Listbox_Results.LastIndex,4) =time - Listbox_Results.Cell(Listbox_Results.LastIndex,5) =infile - Listbox_Results.Cell(Listbox_Results.LastIndex,6)=outfile - Listbox_Results.Cell(Listbox_Results.LastIndex,7)=fluenceF - Listbox_Results.Cell(Listbox_Results.LastIndex,8)=dvhf - Listbox_Results.Cell(Listbox_Results.LastIndex,9)=organCon - Listbox_Results.Cell(Listbox_Results.LastIndex,10)=PB_Data - Listbox_Results.Cell(Listbox_Results.LastIndex,11)=Plan - Listbox_Results.Cell(Listbox_Results.LastIndex,12)=note - Listbox_Results.Cell(Listbox_Results.LastIndex,13)=label + End If + + While Not rs.AfterLastRow - Listbox_Results.CellType(Listbox_Results.LastIndex,13)=3 - Listbox_Results.CellType(Listbox_Results.LastIndex,11)=3 + Var icvalue As String = rs.Column("InitialScore").StringValue + Var cvalue As String = rs.Column("CostValue").StringValue + Var ddate As String = rs.Column("Date").StringValue + Var mertP As String = rs.Column("MERTProgram").StringValue + Var time As String = rs.Column("Time").StringValue + Var infile As String = rs.Column("InputFile").StringValue + Var outfile As String = rs.Column("OutputFile").StringValue + Var fluenceF As String = rs.Column("Fluence").StringValue + Var dvhf As String = rs.Column("DVHs").StringValue + Var organCon As String =rs.Column("InputConstraints").StringValue + Var PB_Data As String = rs.Column("PB_Data").StringValue + Var Plan As String = rs.Column("Plan").StringValue + Var note As String = rs.Column("Note").StringValue + Var label As String = rs.Column("Label").StringValue - rs.MoveNext + Listbox_Results.AddRow( icvalue, cvalue, ddate, mertP, time, _ + infile, outfile, fluenceF, dvhf, organCon, PB_Data, Plan, Note, label) + + Listbox_Results.CellTypeAt(Listbox_Results.LastRowIndex,13) = Listbox.CellTypes.TextField + Listbox_Results.CellTypeAt(Listbox_Results.LastRowIndex,11) = Listbox.CellTypes.TextField + + rs.MoveToNextRow Wend rs.Close end @@ -1985,27 +1977,27 @@ End Listbox_DOSE.DeleteAllRows - Listbox_DOSE.Heading(0)="PB Num" - Listbox_DOSE.Heading(1)="Dose Name" - Listbox_DOSE.Heading(2)="Weight" - Listbox_DOSE.Heading(3)="MU-Weight" - Listbox_DOSE.Heading(4)="Energy" - Listbox_DOSE.Heading(5)="FLEC" - Listbox_DOSE.Heading(6)="Norm" + Listbox_DOSE.HeaderAt(0)="PB Num" + Listbox_DOSE.HeaderAt(1)="Dose Name" + Listbox_DOSE.HeaderAt(2)="Weight" + Listbox_DOSE.HeaderAt(3)="MU-Weight" + Listbox_DOSE.HeaderAt(4)="Energy" + Listbox_DOSE.HeaderAt(5)="FLEC" + Listbox_DOSE.HeaderAt(6)="Norm" temp="10%,20%,10%,10%,10%,30%,10%" Listbox_DOSE.columnwidths=Temp for i=0 to UBound(IPbeams) Listbox_DOSE.AddRow str(i+1) - Listbox_DOSE.Cell(i,1)=IPbeams(i).FIdID_Name - Listbox_DOSE.Cell(i,2)=Format(IPbeams(i).Weight_Grad,"#.#####") - Listbox_DOSE.Cell(i,3)=Format(IPbeams(i).MUs_Grad,"-#") + Listbox_DOSE.CellValueAt(i,1)=IPbeams(i).FIdID_Name + Listbox_DOSE.CellValueAt(i,2)=Format(IPbeams(i).Weight_Grad,"#.#####") + Listbox_DOSE.CellValueAt(i,3)=Format(IPbeams(i).MUs_Grad,"-#") // Energy - Listbox_DOSE.Cell(i,4)=IPbeams(i).Energy + Listbox_DOSE.CellValueAt(i,4)=IPbeams(i).Energy //Flec open - Listbox_DOSE.Cell(i,5)=Format(IPbeams(i).X1,"-0.0000")+" "+ Format(IPbeams(i).x2,"-0.0000")+" "+ Format(IPbeams(i).y1,"-0.0000")+" "+ Format(IPbeams(i).Y2,"-0.0000") - Listbox_DOSE.Cell(i,6)=Format(IPbeams(i).Norm_Value,"-#.##e") + Listbox_DOSE.CellValueAt(i,5)=Format(IPbeams(i).X1,"-0.0000")+" "+ Format(IPbeams(i).x2,"-0.0000")+" "+ Format(IPbeams(i).y1,"-0.0000")+" "+ Format(IPbeams(i).Y2,"-0.0000") + Listbox_DOSE.CellValueAt(i,6)=Format(IPbeams(i).Norm_Value,"-#.##e") Next @@ -2028,7 +2020,7 @@ End Listbox_PBSum.DeleteAllRows - Listbox_PBSum.Heading(0)="Field ID" + Listbox_PBSum.HeaderAt(0)="Field ID" for i=0 to UBound(IPbeams) found=False @@ -2048,13 +2040,13 @@ End Listbox_PBSum.ColumnCount=UBound(eng)+3 for i=0 to UBound(eng) - Listbox_PBSum.Heading(i+1)=eng(i) + Listbox_PBSum.HeaderAt(i+1)=eng(i) Listbox_PBSum.ColumnType(i+1)=2 engw(i)=0.0 Next rowtotal=i+1 - Listbox_PBSum.Heading(rowtotal)="Total" + Listbox_PBSum.HeaderAt(rowtotal)="Total" for i=0 to UBound(IPbeams) found=False @@ -2088,9 +2080,9 @@ End end end next - Listbox_PBSum.Cell(i,k+1)=str(num) + Listbox_PBSum.CellValueAt(i,k+1)=str(num) next - Listbox_PBSum.Cell(i,rowtotal)=str(rtotal) + Listbox_PBSum.CellValueAt(i,rowtotal)=str(rtotal) next // Summarize the rows for number of beamlets @@ -2098,27 +2090,27 @@ End for i=1 to Listbox_PBSum.ColumnCount ctotal=0 for x=0 to Listbox_PBSum.ListCount-1 - ctotal=ctotal+val(Listbox_PBSum.Cell(x,i)) + ctotal=ctotal+val(Listbox_PBSum.CellValueAt(x,i)) next - Listbox_PBSum.Cell(Listbox_PBSum.ListCount-1,i)=str(ctotal) + Listbox_PBSum.CellValueAt(Listbox_PBSum.ListCount-1,i)=str(ctotal) Next // Summarize the rows for weight of eneries Listbox_PBSum.AddRow "Total weight" wtotal=0 for i=0 to UBound(engw) - Listbox_PBSum.Cell(Listbox_PBSum.ListCount-1,i+1)=Format(engw(i),"#.##e") + Listbox_PBSum.CellValueAt(Listbox_PBSum.ListCount-1,i+1)=Format(engw(i),"#.##e") Listbox_PBSum.CellType(Listbox_PBSum.ListCount-1,i+1)=3 wtotal=engw(i)+wtotal Next Listbox_PBSum.CellType(Listbox_PBSum.ListCount-1,i+1)=3 - Listbox_PBSum.Cell(Listbox_PBSum.ListCount-1,i+1)=Format(wtotal,"#.##e") + Listbox_PBSum.CellValueAt(Listbox_PBSum.ListCount-1,i+1)=Format(wtotal,"#.##e") // Summarize the rows for weight of eneries fraction % Listbox_PBSum.AddRow "Total %" for i=0 to UBound(engw) - Listbox_PBSum.Cell(Listbox_PBSum.ListCount-1,i+1)=Format(100*engw(i)/wtotal,"#.###") + Listbox_PBSum.CellValueAt(Listbox_PBSum.ListCount-1,i+1)=Format(100*engw(i)/wtotal,"#.###") Listbox_PBSum.CellType(Listbox_PBSum.ListCount-1,i+1)=3 Next @@ -2140,7 +2132,7 @@ End Next avgFS=avgFS/(UBound(FS_List)+1) if UBound(FS_List)>-1 Then - Listbox_PBSum.Cell(Listbox_PBSum.ListCount-1,x+1)=Format(FS_List(0),"#.###")+", "+Format(FS_List(UBound(FS_List)),"#.###")+", "+Format(avgFS,"#.###") + Listbox_PBSum.CellValueAt(Listbox_PBSum.ListCount-1,x+1)=Format(FS_List(0),"#.###")+", "+Format(FS_List(UBound(FS_List)),"#.###")+", "+Format(avgFS,"#.###") end Listbox_PBSum.CellType(Listbox_PBSum.ListCount-1,x+1)=3 @@ -2547,14 +2539,14 @@ End if DoNot=False Then - x=Listbox_Results.ListIndex + x=Listbox_Results.SelectedRowIndex If rs <> Nil then if Listbox_Results.SelCount=1 Then for i=1 to rs.FieldCount if rs.IdxField(i).Name="Note" Then - Listbox_Results.Cell(x,12)=me.Text + Listbox_Results.CellValueAt(x,12)=me.Text rs.Edit rs.IdxField(i).Value=me.Text rs.Update @@ -2612,45 +2604,50 @@ End #tag Events Listbox_Results #tag Event Sub Change() - Dim sql as String - Dim found as Boolean + Load_Oarray Load_DVH_Strings Load_Inputfile Load_PBs - found=False + Var found As Boolean = False - if gOpt.results.Connect Then - sql="select CostValue,Date,MERTProgram,Time,InputFile,OutputFile,Fluence,DVHs,InputConstraints,PB_Data,Plan,Note,Label,InitialScore from Results" - rs=gOpt.results.SQLSelect(sql) + If gOpt.results.Connect Then + + Var sql as String = "select CostValue,Date,MERTProgram,Time,InputFile," _ + + "OutputFile,Fluence,DVHs,InputConstraints,PB_Data,Plan,Note," _ + + "Label,InitialScore from Results" + Var rs As RowSet = gOpt.results.SelectSQL(sql) - While not rs.EOF - if rs.Field("InitialScore").StringValue=Listbox_Results.Cell(Listbox_Results.ListIndex,0) and _ - rs.Field("CostValue").StringValue=Listbox_Results.Cell(Listbox_Results.ListIndex,1) and _ - rs.Field("Date").StringValue=Listbox_Results.Cell(Listbox_Results.ListIndex,2) and _ - rs.Field("MERTProgram").StringValue=Listbox_Results.Cell(Listbox_Results.ListIndex,3) and _ - rs.Field("Time").StringValue=Listbox_Results.Cell(Listbox_Results.ListIndex,4) and _ - rs.Field("InputFile").StringValue=Listbox_Results.Cell(Listbox_Results.ListIndex,5) and _ - rs.Field("OutputFile").StringValue=Listbox_Results.Cell(Listbox_Results.ListIndex,6) and _ - rs.Field("Fluence").StringValue=Listbox_Results.Cell(Listbox_Results.ListIndex,7) and _ - rs.Field("DVHs").StringValue=Listbox_Results.Cell(Listbox_Results.ListIndex,8) and _ - rs.Field("InputConstraints").StringValue=Listbox_Results.Cell(Listbox_Results.ListIndex,9) and _ - rs.Field("PB_Data").StringValue=Listbox_Results.Cell(Listbox_Results.ListIndex,10) and _ - rs.Field("Plan").StringValue=Listbox_Results.Cell(Listbox_Results.ListIndex,11) and _ - rs.Field("Note").StringValue=Listbox_Results.Cell(Listbox_Results.ListIndex,12) and _ - rs.Field("Label").StringValue=Listbox_Results.Cell(Listbox_Results.ListIndex,13) Then + While Not rs.AfterLastRow + + If rs.Column("InitialScore").StringValue=Listbox_Results.CellValueAt(Listbox_Results.SelectedRowIndex,0) And _ + rs.Column("CostValue").StringValue=Listbox_Results.CellValueAt(Listbox_Results.SelectedRowIndex,1) and _ + rs.Column("Date").StringValue=Listbox_Results.CellValueAt(Listbox_Results.SelectedRowIndex,2) and _ + rs.Column("MERTProgram").StringValue=Listbox_Results.CellValueAt(Listbox_Results.SelectedRowIndex,3) and _ + rs.Column("Time").StringValue=Listbox_Results.CellValueAt(Listbox_Results.SelectedRowIndex,4) and _ + rs.Column("InputFile").StringValue=Listbox_Results.CellValueAt(Listbox_Results.SelectedRowIndex,5) and _ + rs.Column("OutputFile").StringValue=Listbox_Results.CellValueAt(Listbox_Results.SelectedRowIndex,6) and _ + rs.Column("Fluence").StringValue=Listbox_Results.CellValueAt(Listbox_Results.SelectedRowIndex,7) and _ + rs.Column("DVHs").StringValue=Listbox_Results.CellValueAt(Listbox_Results.SelectedRowIndex,8) and _ + rs.Column("InputConstraints").StringValue=Listbox_Results.CellValueAt(Listbox_Results.SelectedRowIndex,9) and _ + rs.Column("PB_Data").StringValue=Listbox_Results.CellValueAt(Listbox_Results.SelectedRowIndex,10) and _ + rs.Column("Plan").StringValue=Listbox_Results.CellValueAt(Listbox_Results.SelectedRowIndex,11) and _ + rs.Column("Note").StringValue=Listbox_Results.CellValueAt(Listbox_Results.SelectedRowIndex,12) And _ + rs.Column("Label").StringValue=Listbox_Results.CellValueAt(Listbox_Results.SelectedRowIndex,13) Then found=True Exit - end - rs.MoveNext + + End If + rs.MoveToNextRow Wend - end + + End If - if found=False Then - rs=nil - end + If found = False Then + rs = Nil + End End Sub #tag EndEvent #tag Event @@ -2658,12 +2655,12 @@ End //---------------------------------- // Update database //---------------------------------- - dim resultd as Integer - dim sql as String - dim dr as DatabaseRecord - dim db as SQLiteDatabase //Changed to "SQLiteDatabase by William Davis after REAQLSQPDatabase was found to have been deprecated - dim rs as RecordSet - dim i as Integer + 'dim resultd as Integer + 'dim sql as String + 'dim dr as DatabaseRecord + 'dim db as SQLiteDatabase //Changed to "SQLiteDatabase by William Davis after REAQLSQPDatabase was found to have been deprecated + 'dim rs as RecordSet + 'dim i as Integer //---------------------------------- @@ -2674,48 +2671,87 @@ End Case "Delete Record" - resultd=MsgBox("Do you want to remove this record?",36) + Var d As New MessageDialog // declare the MessageDialog object + Var b As MessageDialogButton // for handling the result + d.Icon = MessageDialog.GraphicCaution // display warning icon + d.ActionButton.Caption = "Delete" + d.CancelButton.Visible = True // show the Cancel button + d.AlternateActionButton.Visible = True // show the "Don't Save" button + d.AlternateActionButton.Caption = "Don't Delete" + d.Message = "Do you want to remove this record?" + 'd.Explanation = "If you don't save, your changes will be lost. " - // Remove RecordSet - if resultd=6 Then - db= new SQLiteDatabase //Changed to "SQLiteDatabase by William Davis after REAQLSQPDatabase was found to have been deprecated - db=gOpt.results - if db.Connect Then - sql="select CostValue,Date,MERTProgram,Time,InputFile,OutputFile,Fluence,DVHs,InputConstraints,PB_Data,Plan,Note,Label,InitialScore from Results" - rs=db.SQLSelect(sql) + b = d.ShowModal // display the dialog + Select Case b // determine which button was pressed. + Case d.ActionButton + // usedb= new SQLiteDatabase //Changed to "SQLiteDatabase by William Davis after REAQLSQPDatabase was found to have been deprecated + Var db As SQLiteDatabase = gOpt.results + + If db.Connect Then + + Var sql as String = "select CostValue,Date,MERTProgram,Time,InputFile,OutputFile," _ + + "Fluence,DVHs,InputConstraints,PB_Data,Plan,Note,Label,InitialScore from Results" + + Var rs As RowSet = db.SelectSQL(sql) - While not rs.EOF - if rs.Field("InitialScore").StringValue=Listbox_Results.Cell(Listbox_Results.ListIndex,0) and _ - rs.Field("CostValue").StringValue=Listbox_Results.Cell(Listbox_Results.ListIndex,1) and _ - rs.Field("Date").StringValue=Listbox_Results.Cell(Listbox_Results.ListIndex,2) and _ - rs.Field("MERTProgram").StringValue=Listbox_Results.Cell(Listbox_Results.ListIndex,3) and _ - rs.Field("Time").StringValue=Listbox_Results.Cell(Listbox_Results.ListIndex,4) and _ - rs.Field("InputFile").StringValue=Listbox_Results.Cell(Listbox_Results.ListIndex,5) and _ - rs.Field("OutputFile").StringValue=Listbox_Results.Cell(Listbox_Results.ListIndex,6) and _ - rs.Field("Fluence").StringValue=Listbox_Results.Cell(Listbox_Results.ListIndex,7) and _ - rs.Field("DVHs").StringValue=Listbox_Results.Cell(Listbox_Results.ListIndex,8) and _ - rs.Field("InputConstraints").StringValue=Listbox_Results.Cell(Listbox_Results.ListIndex,9) and _ - rs.Field("PB_Data").StringValue=Listbox_Results.Cell(Listbox_Results.ListIndex,10) and _ - rs.Field("Plan").StringValue=Listbox_Results.Cell(Listbox_Results.ListIndex,11) and _ - rs.Field("Note").StringValue=Listbox_Results.Cell(Listbox_Results.ListIndex,12) and _ - rs.Field("Label").StringValue=Listbox_Results.Cell(Listbox_Results.ListIndex,13) Then + While Not rs.AfterLastRow + + If rs.Column("InitialScore").StringValue = _ + Listbox_Results.CellValueAt(Listbox_Results.SelectedRowIndex,0) And _ + rs.Column("CostValue").StringValue = _ + Listbox_Results.CellValueAt(Listbox_Results.SelectedRowIndex,1) And _ + rs.Column("Date").StringValue = _ + Listbox_Results.CellValueAt(Listbox_Results.SelectedRowIndex,2) And _ + rs.Column("MERTProgram").StringValue = _ + Listbox_Results.CellValueAt(Listbox_Results.SelectedRowIndex,3) And _ + rs.Column("Time").StringValue = _ + Listbox_Results.CellValueAt(Listbox_Results.SelectedRowIndex,4) And _ + rs.Column("InputFile").StringValue = _ + Listbox_Results.CellValueAt(Listbox_Results.SelectedRowIndex,5) And _ + rs.Column("OutputFile").StringValue = _ + Listbox_Results.CellValueAt(Listbox_Results.SelectedRowIndex,6) And _ + rs.Column("Fluence").StringValue = _ + Listbox_Results.CellValueAt(Listbox_Results.SelectedRowIndex,7) And _ + rs.Column("DVHs").StringValue = _ + Listbox_Results.CellValueAt(Listbox_Results.SelectedRowIndex,8) And _ + rs.Column("InputConstraints").StringValue = _ + Listbox_Results.CellValueAt(Listbox_Results.SelectedRowIndex,9) And _ + rs.Column("PB_Data").StringValue = _ + Listbox_Results.CellValueAt(Listbox_Results.SelectedRowIndex,10) And _ + rs.Column("Plan").StringValue = _ + Listbox_Results.CellValueAt(Listbox_Results.SelectedRowIndex,11) And _ + rs.Column("Note").StringValue = _ + Listbox_Results.CellValueAt(Listbox_Results.SelectedRowIndex,12) And _ + rs.Column("Label").StringValue = _ + Listbox_Results.CellValueAt(Listbox_Results.SelectedRowIndex,13) Then - rs.Edit - if rs<> nil Then - rs.DeleteRecord - if db.Error=False Then - db.Commit - end - end - end - rs.MoveNext + rs.EditRow + If rs <> Nil Then + Try + rs.RemoveRow + db.CommitTransaction + Catch error As IOException + + MessageBox(error.Message) + + End Try + + End If + + + End If + rs.MoveToNextRow Wend - end + End db.Close Update_DataBase - end + Case d.AlternateActionButton + // user pressed Don't Save + Case d.CancelButton + // user pressed Cancel + End Select - end + End Select End Function #tag EndEvent #tag Event @@ -2746,13 +2782,13 @@ End if column=13 Then for i=1 to rs.FieldCount if rs.IdxField(i).Name="Label" Then - rs.IdxField(i).Value =me.Cell(row,column) + rs.IdxField(i).Value =me.CellValueAt(row,column) end Next elseif column=11 Then for i=1 to rs.FieldCount if rs.IdxField(i).Name="Plan" Then - rs.IdxField(i).Value =me.Cell(row,column) + rs.IdxField(i).Value =me.CellValueAt(row,column) end Next End if diff --git a/MERT/Window_EMET_Run.xojo_window b/MERT/Window_EMET_Run.xojo_window index 046df23..a1c447c 100644 --- a/MERT/Window_EMET_Run.xojo_window +++ b/MERT/Window_EMET_Run.xojo_window @@ -8272,11 +8272,11 @@ End //--------------------------------- Listbox_Optimization_Results.DeleteAllRows - Listbox_Optimization_Results.Heading(0)="Energy" - Listbox_Optimization_Results.Heading(1)="Gantry" - Listbox_Optimization_Results.Heading(2)="Iso" - Listbox_Optimization_Results.Heading(3)="Mode" - Listbox_Optimization_Results.Heading(4)="Weight" + Listbox_Optimization_Results.HeaderAt(0)="Energy" + Listbox_Optimization_Results.HeaderAt(1)="Gantry" + Listbox_Optimization_Results.HeaderAt(2)="Iso" + Listbox_Optimization_Results.HeaderAt(3)="Mode" + Listbox_Optimization_Results.HeaderAt(4)="Weight" line="" pb_count=0 @@ -8302,25 +8302,25 @@ End cc=cc+1 Listbox_Optimization_Results.AddRow gOpt.IPbeams(i).Energy - Listbox_Optimization_Results.Cell(cc,1)=Format(gOpt.IPbeams(i).Gantry_Angle,"-#.##") - Listbox_Optimization_Results.Cell(cc,2)=Format(gopt.IPbeams(i).Iso_X,"-#.##")+", "+Format(gopt.IPbeams(i).Iso_Y,"-#.##")+", "+Format(gopt.IPbeams(i).Iso_Z,"-#.##") - Listbox_Optimization_Results.Cell(cc,3)=gOpt.IPbeams(i).Mode + Listbox_Optimization_Results.CellValueAt(cc,1)=Format(gOpt.IPbeams(i).Gantry_Angle,"-#.##") + Listbox_Optimization_Results.CellValueAt(cc,2)=Format(gopt.IPbeams(i).Iso_X,"-#.##")+", "+Format(gopt.IPbeams(i).Iso_Y,"-#.##")+", "+Format(gopt.IPbeams(i).Iso_Z,"-#.##") + Listbox_Optimization_Results.CellValueAt(cc,3)=gOpt.IPbeams(i).Mode if RadioButton_Map_Grad_W.Value Then - Listbox_Optimization_Results.Cell(cc,4)=Format(gOpt.IPbeams(i).Weight_Grad,"-#.###") + Listbox_Optimization_Results.CellValueAt(cc,4)=Format(gOpt.IPbeams(i).Weight_Grad,"-#.###") elseif RadioButton_MAP_Grad_MU.Value Then - Listbox_Optimization_Results.Cell(cc,4)=Format(gOpt.IPbeams(i).MUs_Grad,"-#.###") + Listbox_Optimization_Results.CellValueAt(cc,4)=Format(gOpt.IPbeams(i).MUs_Grad,"-#.###") elseif RadioButton_MAP_SAJAW_W.Value Then - Listbox_Optimization_Results.Cell(cc,4)=Format(gOpt.IPbeams(i).Weight_JAW,"-#.###") + Listbox_Optimization_Results.CellValueAt(cc,4)=Format(gOpt.IPbeams(i).Weight_JAW,"-#.###") elseif RadioButton_MAP_SA_W.Value Then - Listbox_Optimization_Results.Cell(cc,4)=Format(gOpt.IPbeams(i).Weight_SA,"-#.###") + Listbox_Optimization_Results.CellValueAt(cc,4)=Format(gOpt.IPbeams(i).Weight_SA,"-#.###") elseif RadioButton_MAP_SA_MU.Value Then - Listbox_Optimization_Results.Cell(cc,4)=Format(gOpt.IPbeams(i).MUs_SA,"-#.###") + Listbox_Optimization_Results.CellValueAt(cc,4)=Format(gOpt.IPbeams(i).MUs_SA,"-#.###") elseif RadioButton_MAP_NLO.Value Then if gOpt.IPbeams(i).Weight_NLO>0.001 Then - Listbox_Optimization_Results.Cell(cc,4)=Format(gOpt.IPbeams(i).Weight_NLO,"-#.###") + Listbox_Optimization_Results.CellValueAt(cc,4)=Format(gOpt.IPbeams(i).Weight_NLO,"-#.###") else - Listbox_Optimization_Results.Cell(cc,4)=Format(gOpt.IPbeams(i).Weight_NLO,"-#.###e") + Listbox_Optimization_Results.CellValueAt(cc,4)=Format(gOpt.IPbeams(i).Weight_NLO,"-#.###e") end end @@ -8731,26 +8731,26 @@ End #tag Method, Flags = &h0 Sub Update_GradDVH_Status() if gOpt.Grad.Running Then - Listbox_GradDVH_Status.Cell(0,1)="Running" + Listbox_GradDVH_Status.CellValueAt(0,1)="Running" else - Listbox_GradDVH_Status.Cell(0,1)="Stopped" + Listbox_GradDVH_Status.CellValueAt(0,1)="Stopped" end - Listbox_GradDVH_Status.Cell(1,1)=gOpt.Grad.Submit_Date - Listbox_GradDVH_Status.Cell(2,1)=gOpt.Grad.Time - Listbox_GradDVH_Status.Cell(3,1)=Format(gOpt.Grad.Score,"0.000000e") - Listbox_GradDVH_Status.Cell(4,1)=Format(gOpt.Grad.Score_Inti,"0.000000e") - Listbox_GradDVH_Status.Cell(5,1)=Format(gOpt.Grad.Score_Previous,"0.000000e") - Listbox_GradDVH_Status.Cell(6,1)=str(gOpt.Grad.dvh_bin) - Listbox_GradDVH_Status.Cell(7,1)=Format(gOpt.Grad.Iterations,"#") - Listbox_GradDVH_Status.Cell(8,1)=str(gOpt.Grad.stepsize) - Listbox_GradDVH_Status.Cell(9,1)=str(gOpt.Grad.Grow) - Listbox_GradDVH_Status.Cell(10,1)=str(gOpt.Grad.Shrink) - Listbox_GradDVH_Status.Cell(11,1)=str(gOpt.Grad.Min_W) - Listbox_GradDVH_Status.Cell(12,1)=str(gOpt.Grad.Max_W) + Listbox_GradDVH_Status.CellValueAt(1,1)=gOpt.Grad.Submit_Date + Listbox_GradDVH_Status.CellValueAt(2,1)=gOpt.Grad.Time + Listbox_GradDVH_Status.CellValueAt(3,1)=Format(gOpt.Grad.Score,"0.000000e") + Listbox_GradDVH_Status.CellValueAt(4,1)=Format(gOpt.Grad.Score_Inti,"0.000000e") + Listbox_GradDVH_Status.CellValueAt(5,1)=Format(gOpt.Grad.Score_Previous,"0.000000e") + Listbox_GradDVH_Status.CellValueAt(6,1)=str(gOpt.Grad.dvh_bin) + Listbox_GradDVH_Status.CellValueAt(7,1)=Format(gOpt.Grad.Iterations,"#") + Listbox_GradDVH_Status.CellValueAt(8,1)=str(gOpt.Grad.stepsize) + Listbox_GradDVH_Status.CellValueAt(9,1)=str(gOpt.Grad.Grow) + Listbox_GradDVH_Status.CellValueAt(10,1)=str(gOpt.Grad.Shrink) + Listbox_GradDVH_Status.CellValueAt(11,1)=str(gOpt.Grad.Min_W) + Listbox_GradDVH_Status.CellValueAt(12,1)=str(gOpt.Grad.Max_W) Listbox_GradDVH_Status.CellCheck(13,0)=gOpt.Grad.NormDD Listbox_GradDVH_Status.CellCheck(14,0)=gOpt.Grad.WriteDose - Listbox_GradDVH_Status.Cell(14,1)=gOpt.Grad.DoseOutputName + Listbox_GradDVH_Status.CellValueAt(14,1)=gOpt.Grad.DoseOutputName Window_EMET_Run.EditField_Grad_Weight_Value.value = str(gOpt.Grad.Init_Weight) End Sub #tag EndMethod @@ -8816,48 +8816,48 @@ End j=j+1 if i>-1 and i<=UBound(gOpt.IPbeams) and j>=0 and j<=Listbox_DOSE.ListCount Then - Listbox_DOSE.Cell(j,1)=gOpt.IPbeams(i).FIdID_Name + Listbox_DOSE.CellValueAt(j,1)=gOpt.IPbeams(i).FIdID_Name - Listbox_DOSE.Cell(j,2)=Format(gopt.IPbeams(i).Weight_Grad,"#.#####") - Listbox_DOSE.Cell(j,3)=Format(gopt.IPbeams(i).MUs_Grad,"-#") + Listbox_DOSE.CellValueAt(j,2)=Format(gopt.IPbeams(i).Weight_Grad,"#.#####") + Listbox_DOSE.CellValueAt(j,3)=Format(gopt.IPbeams(i).MUs_Grad,"-#") - Listbox_DOSE.Cell(j,4)=Format(gopt.IPbeams(i).Weight_SA,"#.#####") - Listbox_DOSE.Cell(j,5)=Format(gopt.IPbeams(i).MUs_SA,"-#") + Listbox_DOSE.CellValueAt(j,4)=Format(gopt.IPbeams(i).Weight_SA,"#.#####") + Listbox_DOSE.CellValueAt(j,5)=Format(gopt.IPbeams(i).MUs_SA,"-#") - Listbox_DOSE.Cell(j,6)=Format(gopt.IPbeams(i).Weight_JAW,"#.#####") - Listbox_DOSE.Cell(j,7)=Format(gopt.IPbeams(i).MUs_Jaw,"-#") + Listbox_DOSE.CellValueAt(j,6)=Format(gopt.IPbeams(i).Weight_JAW,"#.#####") + Listbox_DOSE.CellValueAt(j,7)=Format(gopt.IPbeams(i).MUs_Jaw,"-#") - Listbox_DOSE.Cell(j,19)=Format(gopt.IPbeams(i).Weight_NLO,"#.#####") + Listbox_DOSE.CellValueAt(j,19)=Format(gopt.IPbeams(i).Weight_NLO,"#.#####") // Energy - Listbox_DOSE.Cell(j,8)=gOpt.ipbeams(i).energy + Listbox_DOSE.CellValueAt(j,8)=gOpt.ipbeams(i).energy //Opening - Listbox_DOSE.Cell(j,9)=Format(gopt.IPbeams(i).x1,"-#.##")+", "+Format(gopt.IPbeams(i).x2,"-#.##")+", "+Format(gopt.IPbeams(i).y1,"-#.##")+", "+Format(gopt.IPbeams(i).y2,"-#.##") + Listbox_DOSE.CellValueAt(j,9)=Format(gopt.IPbeams(i).x1,"-#.##")+", "+Format(gopt.IPbeams(i).x2,"-#.##")+", "+Format(gopt.IPbeams(i).y1,"-#.##")+", "+Format(gopt.IPbeams(i).y2,"-#.##") - Listbox_DOSE.Cell(j,10)=Format(gopt.IPbeams(i).Norm_Value,"-#.##e") + Listbox_DOSE.CellValueAt(j,10)=Format(gopt.IPbeams(i).Norm_Value,"-#.##e") Listbox_DOSE.CellType(j,1)=2 if gopt.IPbeams(i).Use Then Listbox_DOSE.CellCheck(j,1)=True - Listbox_DOSE.Cell(j,0)=Format(gopt.IPbeams(i).PB_Index,"-0000") + Listbox_DOSE.CellValueAt(j,0)=Format(gopt.IPbeams(i).PB_Index,"-0000") end // Pencil beam index Number - Listbox_DOSE.cell(j,11)=str(gopt.IPbeams(i).PB_Index) + Listbox_DOSE.CellValueAt(j,11)=str(gopt.IPbeams(i).PB_Index) // Place the opt.Beam Index - Listbox_DOSE.cell(j,12)=str(i) - Listbox_DOSE.Cell(j,13)=Format(gopt.IPbeams(i).RTOG_Beam,"-0000") - Listbox_DOSE.Cell(j,14)=Format(gopt.IPbeams(i).Gantry_Angle,"-#.##") - Listbox_DOSE.Cell(j,15)=Format(gopt.IPbeams(i).Iso_X,"-#.##") - Listbox_DOSE.Cell(j,16)=Format(gopt.IPbeams(i).Iso_Y,"-#.##") - Listbox_DOSE.Cell(j,17)=Format(gopt.IPbeams(i).Iso_z,"-#.##") - Listbox_DOSE.Cell(j,18)=gopt.IPbeams(i).Mode + Listbox_DOSE.CellValueAt(j,12)=str(i) + Listbox_DOSE.CellValueAt(j,13)=Format(gopt.IPbeams(i).RTOG_Beam,"-0000") + Listbox_DOSE.CellValueAt(j,14)=Format(gopt.IPbeams(i).Gantry_Angle,"-#.##") + Listbox_DOSE.CellValueAt(j,15)=Format(gopt.IPbeams(i).Iso_X,"-#.##") + Listbox_DOSE.CellValueAt(j,16)=Format(gopt.IPbeams(i).Iso_Y,"-#.##") + Listbox_DOSE.CellValueAt(j,17)=Format(gopt.IPbeams(i).Iso_z,"-#.##") + Listbox_DOSE.CellValueAt(j,18)=gopt.IPbeams(i).Mode // Update dose volume stats for each ROI and Target volume for k=0 to UBound(gOpt.IPbeams(i).VolumeStats) - Listbox_DOSE.Cell(j,20+k)=Format(gopt.IPbeams(i).VolumeStats(k).minDose,"-#.##")+", "+Format(gopt.IPbeams(i).VolumeStats(k).maxDose,"-#.##")+", "+Format(gopt.IPbeams(i).VolumeStats(k).AvgDose,"-#.##") + Listbox_DOSE.CellValueAt(j,20+k)=Format(gopt.IPbeams(i).VolumeStats(k).minDose,"-#.##")+", "+Format(gopt.IPbeams(i).VolumeStats(k).maxDose,"-#.##")+", "+Format(gopt.IPbeams(i).VolumeStats(k).AvgDose,"-#.##") Next end end @@ -8878,12 +8878,12 @@ End Listbox_Score.ColumnCount=6 - Listbox_Score.Heading(0)="Organ" - Listbox_Score.Heading(1)="Parameters" - Listbox_Score.Heading(2)="GradDVH Value" - Listbox_Score.Heading(3)="SADVH Value" - Listbox_Score.Heading(4)="NLO Value" - Listbox_Score.Heading(5)="DJAW Value" + Listbox_Score.HeaderAt(0)="Organ" + Listbox_Score.HeaderAt(1)="Parameters" + Listbox_Score.HeaderAt(2)="GradDVH Value" + Listbox_Score.HeaderAt(3)="SADVH Value" + Listbox_Score.HeaderAt(4)="NLO Value" + Listbox_Score.HeaderAt(5)="DJAW Value" Listbox_Score.DeleteAllRows if gOpt.Grad.GradOArray=nil or gOpt.SA.SAOArray=nil or gOpt.NLO.s=nil or gOpt.JAW.S=nil Then @@ -8896,10 +8896,10 @@ End rrindex=rrindex+1 // Current score Listbox_Score.AddRow "Total Score" - Listbox_Score.Cell(rrindex,2)=Format(gOpt.Grad.Score,"-#.###e") - Listbox_Score.Cell(rrindex,3)=Format(gOpt.SA.Score,"-#.###e") - Listbox_Score.Cell(rrindex,4)=Format(gOpt.NLO.Score,"-#.###e") - Listbox_Score.Cell(rrindex,5)=Format(gOpt.JAW.Score,"-#.###e") + Listbox_Score.CellValueAt(rrindex,2)=Format(gOpt.Grad.Score,"-#.###e") + Listbox_Score.CellValueAt(rrindex,3)=Format(gOpt.SA.Score,"-#.###e") + Listbox_Score.CellValueAt(rrindex,4)=Format(gOpt.NLO.Score,"-#.###e") + Listbox_Score.CellValueAt(rrindex,5)=Format(gOpt.JAW.Score,"-#.###e") @@ -8961,40 +8961,40 @@ End rrindex=rrindex+1 Listbox_Score.AddRow grtog.Structures.Structures(i).Structure_Name - Listbox_Score.Cell(rrindex,1)="Wanted minimum dose" + Listbox_Score.CellValueAt(rrindex,1)="Wanted minimum dose" rrindex=rrindex+1 Listbox_Score.AddRow grtog.Structures.Structures(i).Structure_Name - Listbox_Score.Cell(rrindex,1)="Actual minimum dose" + Listbox_Score.CellValueAt(rrindex,1)="Actual minimum dose" rrindex=rrindex+1 Listbox_Score.AddRow grtog.Structures.Structures(i).Structure_Name - Listbox_Score.Cell(rrindex,1)="Minimum dose score" + Listbox_Score.CellValueAt(rrindex,1)="Minimum dose score" if InStr(ssvalue,"GR")>0 Then temp=NthField(ssvalue,"GR",2) - Listbox_Score.Cell(rrindex-2,2)=d.Key(k) - Listbox_Score.Cell(rrindex-1,2)=NthField(temp,",",1) - Listbox_Score.Cell(rrindex,2)=NthField(temp,",",2) + Listbox_Score.CellValueAt(rrindex-2,2)=d.Key(k) + Listbox_Score.CellValueAt(rrindex-1,2)=NthField(temp,",",1) + Listbox_Score.CellValueAt(rrindex,2)=NthField(temp,",",2) end if InStr(ssvalue,"SA")>0 Then temp=NthField(ssvalue,"SA",2) - Listbox_Score.Cell(rrindex-2,3)=d.Key(k) - Listbox_Score.Cell(rrindex-1,3)=NthField(temp,",",1) - Listbox_Score.Cell(rrindex,3)=NthField(temp,",",2) + Listbox_Score.CellValueAt(rrindex-2,3)=d.Key(k) + Listbox_Score.CellValueAt(rrindex-1,3)=NthField(temp,",",1) + Listbox_Score.CellValueAt(rrindex,3)=NthField(temp,",",2) end if InStr(ssvalue,"NL")>0 Then temp=NthField(ssvalue,"NL",2) - Listbox_Score.Cell(rrindex-2,4)=d.Key(k) - Listbox_Score.Cell(rrindex-1,4)=NthField(temp,",",1) - Listbox_Score.Cell(rrindex,4)=NthField(temp,",",2) + Listbox_Score.CellValueAt(rrindex-2,4)=d.Key(k) + Listbox_Score.CellValueAt(rrindex-1,4)=NthField(temp,",",1) + Listbox_Score.CellValueAt(rrindex,4)=NthField(temp,",",2) end if InStr(ssvalue,"DJ")>0 Then temp=NthField(ssvalue,"DJ",2) - Listbox_Score.Cell(rrindex-2,5)=d.Key(k) - Listbox_Score.Cell(rrindex-1,5)=NthField(temp,",",1) - Listbox_Score.Cell(rrindex,5)=NthField(temp,",",2) + Listbox_Score.CellValueAt(rrindex-2,5)=d.Key(k) + Listbox_Score.CellValueAt(rrindex-1,5)=NthField(temp,",",1) + Listbox_Score.CellValueAt(rrindex,5)=NthField(temp,",",2) end @@ -9054,40 +9054,40 @@ End rrindex=rrindex+1 Listbox_Score.AddRow grtog.Structures.Structures(i).Structure_Name - Listbox_Score.Cell(rrindex,1)="Wanted maximum dose" + Listbox_Score.CellValueAt(rrindex,1)="Wanted maximum dose" rrindex=rrindex+1 Listbox_Score.AddRow grtog.Structures.Structures(i).Structure_Name - Listbox_Score.Cell(rrindex,1)="Actual maximum dose" + Listbox_Score.CellValueAt(rrindex,1)="Actual maximum dose" rrindex=rrindex+1 Listbox_Score.AddRow grtog.Structures.Structures(i).Structure_Name - Listbox_Score.Cell(rrindex,1)="Maximum dose score" + Listbox_Score.CellValueAt(rrindex,1)="Maximum dose score" if InStr(ssvalue,"GR")>0 Then temp=NthField(ssvalue,"GR",2) - Listbox_Score.Cell(rrindex-2,2)=d.Key(k) - Listbox_Score.Cell(rrindex-1,2)=NthField(temp,",",1) - Listbox_Score.Cell(rrindex,2)=NthField(temp,",",2) + Listbox_Score.CellValueAt(rrindex-2,2)=d.Key(k) + Listbox_Score.CellValueAt(rrindex-1,2)=NthField(temp,",",1) + Listbox_Score.CellValueAt(rrindex,2)=NthField(temp,",",2) end if InStr(ssvalue,"SA")>0 Then temp=NthField(ssvalue,"SA",2) - Listbox_Score.Cell(rrindex-2,3)=d.Key(k) - Listbox_Score.Cell(rrindex-1,3)=NthField(temp,",",1) - Listbox_Score.Cell(rrindex,3)=NthField(temp,",",2) + Listbox_Score.CellValueAt(rrindex-2,3)=d.Key(k) + Listbox_Score.CellValueAt(rrindex-1,3)=NthField(temp,",",1) + Listbox_Score.CellValueAt(rrindex,3)=NthField(temp,",",2) end if InStr(ssvalue,"NL")>0 Then temp=NthField(ssvalue,"NL",2) - Listbox_Score.Cell(rrindex-2,4)=d.Key(k) - Listbox_Score.Cell(rrindex-1,4)=NthField(temp,",",1) - Listbox_Score.Cell(rrindex,4)=NthField(temp,",",2) + Listbox_Score.CellValueAt(rrindex-2,4)=d.Key(k) + Listbox_Score.CellValueAt(rrindex-1,4)=NthField(temp,",",1) + Listbox_Score.CellValueAt(rrindex,4)=NthField(temp,",",2) end if InStr(ssvalue,"DJ")>0 Then temp=NthField(ssvalue,"DJ",2) - Listbox_Score.Cell(rrindex-2,5)=d.Key(k) - Listbox_Score.Cell(rrindex-1,5)=NthField(temp,",",1) - Listbox_Score.Cell(rrindex,5)=NthField(temp,",",2) + Listbox_Score.CellValueAt(rrindex-2,5)=d.Key(k) + Listbox_Score.CellValueAt(rrindex-1,5)=NthField(temp,",",1) + Listbox_Score.CellValueAt(rrindex,5)=NthField(temp,",",2) end @@ -9155,40 +9155,40 @@ End rrindex=rrindex+1 Listbox_Score.AddRow grtog.Structures.Structures(i).Structure_Name - Listbox_Score.Cell(rrindex,1)="Dose" + Listbox_Score.CellValueAt(rrindex,1)="Dose" rrindex=rrindex+1 Listbox_Score.AddRow grtog.Structures.Structures(i).Structure_Name - Listbox_Score.Cell(rrindex,1)="Volume" + Listbox_Score.CellValueAt(rrindex,1)="Volume" rrindex=rrindex+1 Listbox_Score.AddRow grtog.Structures.Structures(i).Structure_Name - Listbox_Score.Cell(rrindex,1)="Actual score" + Listbox_Score.CellValueAt(rrindex,1)="Actual score" if InStr(ssvalue,"GR")>0 Then temp=NthField(ssvalue,"GR",2) - Listbox_Score.Cell(rrindex-2,2)=NthField(NthField(d.Key(k),"D",2),"V",1) - Listbox_Score.Cell(rrindex-1,2)=NthField(d.Key(k),"<",2) - Listbox_Score.Cell(rrindex,2)=NthField(temp,",",1) + Listbox_Score.CellValueAt(rrindex-2,2)=NthField(NthField(d.Key(k),"D",2),"V",1) + Listbox_Score.CellValueAt(rrindex-1,2)=NthField(d.Key(k),"<",2) + Listbox_Score.CellValueAt(rrindex,2)=NthField(temp,",",1) end if InStr(ssvalue,"SA")>0 Then temp=NthField(ssvalue,"SA",2) - Listbox_Score.Cell(rrindex-2,3)=NthField(NthField(d.Key(k),"D",2),"V",1) - Listbox_Score.Cell(rrindex-1,3)=NthField(d.Key(k),"<",2) - Listbox_Score.Cell(rrindex,3)=NthField(temp,",",1) + Listbox_Score.CellValueAt(rrindex-2,3)=NthField(NthField(d.Key(k),"D",2),"V",1) + Listbox_Score.CellValueAt(rrindex-1,3)=NthField(d.Key(k),"<",2) + Listbox_Score.CellValueAt(rrindex,3)=NthField(temp,",",1) end if InStr(ssvalue,"NL")>0 Then temp=NthField(ssvalue,"NL",2) - Listbox_Score.Cell(rrindex-2,4)=NthField(NthField(d.Key(k),"D",2),"V",1) - Listbox_Score.Cell(rrindex-1,4)=NthField(d.Key(k),"<",2) - Listbox_Score.Cell(rrindex,4)=NthField(temp,",",1) + Listbox_Score.CellValueAt(rrindex-2,4)=NthField(NthField(d.Key(k),"D",2),"V",1) + Listbox_Score.CellValueAt(rrindex-1,4)=NthField(d.Key(k),"<",2) + Listbox_Score.CellValueAt(rrindex,4)=NthField(temp,",",1) end if InStr(ssvalue,"DJ")>0 Then temp=NthField(ssvalue,"DJ",2) - Listbox_Score.Cell(rrindex-2,5)=NthField(NthField(d.Key(k),"D",2),"V",1) - Listbox_Score.Cell(rrindex-1,5)=NthField(d.Key(k),"<",2) - Listbox_Score.Cell(rrindex,5)=NthField(temp,",",1) + Listbox_Score.CellValueAt(rrindex-2,5)=NthField(NthField(d.Key(k),"D",2),"V",1) + Listbox_Score.CellValueAt(rrindex-1,5)=NthField(d.Key(k),"<",2) + Listbox_Score.CellValueAt(rrindex,5)=NthField(temp,",",1) end Next end @@ -9200,24 +9200,24 @@ End Sub Update_NLO_Status() if gOpt.NLO.Running Then - Listbox_NLO_Status.Cell(0,1)="Running" + Listbox_NLO_Status.CellValueAt(0,1)="Running" else - Listbox_NLO_Status.Cell(0,1)="Stopped" + Listbox_NLO_Status.CellValueAt(0,1)="Stopped" end - Listbox_NLO_Status.Cell(1,1)=gOpt.NLO.Submit_Date - Listbox_NLO_Status.Cell(2,1)=gOpt.NLO.Time - Listbox_NLO_Status.Cell(3,1)=Format(gOpt.NLO.Score,"0.000000e") - Listbox_NLO_Status.Cell(4,1)=Format(gOpt.NLO.Score_Initial,"0.000000e") - Listbox_NLO_Status.Cell(5,1)=Format(gOpt.NLO.Score_Previous,"0.000000e") + Listbox_NLO_Status.CellValueAt(1,1)=gOpt.NLO.Submit_Date + Listbox_NLO_Status.CellValueAt(2,1)=gOpt.NLO.Time + Listbox_NLO_Status.CellValueAt(3,1)=Format(gOpt.NLO.Score,"0.000000e") + Listbox_NLO_Status.CellValueAt(4,1)=Format(gOpt.NLO.Score_Initial,"0.000000e") + Listbox_NLO_Status.CellValueAt(5,1)=Format(gOpt.NLO.Score_Previous,"0.000000e") - Listbox_NLO_Status.Cell(6,1)=str(gOpt.NLO.dvh_bin) - Listbox_NLO_Status.Cell(7,1)=Format(gOpt.NLO.Iterations,"#") - Listbox_NLO_Status.Cell(8,1)=str(gOpt.NLO.Min_W) - Listbox_NLO_Status.Cell(9,1)=str(gOpt.NLO.Max_W) + Listbox_NLO_Status.CellValueAt(6,1)=str(gOpt.NLO.dvh_bin) + Listbox_NLO_Status.CellValueAt(7,1)=Format(gOpt.NLO.Iterations,"#") + Listbox_NLO_Status.CellValueAt(8,1)=str(gOpt.NLO.Min_W) + Listbox_NLO_Status.CellValueAt(9,1)=str(gOpt.NLO.Max_W) Listbox_NLO_Status.CellCheck(10,0)=gOpt.NLO.NormDD Listbox_NLO_Status.CellCheck(11,0)=gOpt.NLO.WriteDose - Listbox_NLO_Status.Cell(11,1)=gOpt.NLO.OutputName + Listbox_NLO_Status.CellValueAt(11,1)=gOpt.NLO.OutputName @@ -9286,7 +9286,7 @@ End pp.Colour=grtog.Structures.Structures(i).scolor DVHGraph.Profiles.One_Profile.Append pp next - PopupMenu_DVH.listIndex=0 + PopupMenu_DVH.SelectedRowIndex=0 //------------------------------Beam Settings-------------------------------- @@ -9297,30 +9297,30 @@ End Next temp="10%,30%,10%,10%,10%,10%,10%,10%,10%,20%,10%,0%,0%,10%,10%,10%,10%,10%,10%,10%" Listbox_DOSE.columnwidths=Temp+temp2 - Listbox_DOSE.Heading(0)="PB Num" - Listbox_DOSE.Heading(1)="Doses and PB" - Listbox_DOSE.Heading(2)="GradDVH" + Listbox_DOSE.HeaderAt(0)="PB Num" + Listbox_DOSE.HeaderAt(1)="Doses and PB" + Listbox_DOSE.HeaderAt(2)="GradDVH" Listbox_DOSE.ColumnType(2)=3 - Listbox_DOSE.Heading(3)="MU-Grad" - Listbox_DOSE.Heading(4)="SADVH" - Listbox_DOSE.Heading(5)="MU-SA" - Listbox_DOSE.Heading(6)="JAWDVH" - Listbox_DOSE.Heading(7)="MU-JAW" - Listbox_DOSE.Heading(8)="Energy" - Listbox_DOSE.Heading(9)="Opening" - Listbox_DOSE.Heading(10)="Norm" - Listbox_DOSE.Heading(11)="Pencil beam index" - Listbox_DOSE.Heading(12)="opt.Beam Index" - Listbox_DOSE.Heading(13)="Beam #" - Listbox_DOSE.Heading(14)="Gantry" - Listbox_DOSE.Heading(15)="Iso X" - Listbox_DOSE.Heading(16)="Iso Y" - Listbox_DOSE.Heading(17)="Iso Z" - Listbox_DOSE.Heading(18)="Mode" - Listbox_DOSE.Heading(19)="NLO" + Listbox_DOSE.HeaderAt(3)="MU-Grad" + Listbox_DOSE.HeaderAt(4)="SADVH" + Listbox_DOSE.HeaderAt(5)="MU-SA" + Listbox_DOSE.HeaderAt(6)="JAWDVH" + Listbox_DOSE.HeaderAt(7)="MU-JAW" + Listbox_DOSE.HeaderAt(8)="Energy" + Listbox_DOSE.HeaderAt(9)="Opening" + Listbox_DOSE.HeaderAt(10)="Norm" + Listbox_DOSE.HeaderAt(11)="Pencil beam index" + Listbox_DOSE.HeaderAt(12)="opt.Beam Index" + Listbox_DOSE.HeaderAt(13)="Beam #" + Listbox_DOSE.HeaderAt(14)="Gantry" + Listbox_DOSE.HeaderAt(15)="Iso X" + Listbox_DOSE.HeaderAt(16)="Iso Y" + Listbox_DOSE.HeaderAt(17)="Iso Z" + Listbox_DOSE.HeaderAt(18)="Mode" + Listbox_DOSE.HeaderAt(19)="NLO" for i=0 to UBound(gOpt.Plan.Structure_Dose) - Listbox_DOSE.Heading(19+(i+1))=gOpt.Plan.Structure_Dose(i).Organ_Name + Listbox_DOSE.HeaderAt(19+(i+1))=gOpt.Plan.Structure_Dose(i).Organ_Name next //----------------------------------------------------- @@ -9437,7 +9437,7 @@ End PopupMenu_Beam_EGSPhant.AddRow DMXName(i) Next - PopupMenu_Beam_EGSPhant.ListIndex=0 + PopupMenu_Beam_EGSPhant.SelectedRowIndex=0 //---------------------------------DVH Settings-------------------------------- DVH_Default_SettingsGraphs @@ -9775,8 +9775,8 @@ End #tag Events Listbox_GradDVH_Status #tag Event Sub Open() - me.Heading(0)="Metric" - me.Heading(1)="Results" + me.HeaderAt(0)="Metric" + me.HeaderAt(1)="Results" me.AddRow "Status" me.AddRow "Time submitted" @@ -9807,7 +9807,7 @@ End me.AddRow "Normalize dose distributions" me.CellType(13,0)=2 - me.Cell(13,1)="Yes/No" + me.CellValueAt(13,1)="Yes/No" me.AddRow "Sum final dose distributions label" @@ -9820,13 +9820,13 @@ End Dim i as Boolean - gOpt.Grad.Iterations=val(me.Cell(7,1)) - gOpt.Grad.stepsize=val(me.Cell(8,1)) - gOpt.Grad.Grow=val(me.Cell(9,1)) - gOpt.Grad.Shrink=val(me.Cell(10,1)) - gOpt.Grad.Min_W=val(me.Cell(11,1)) - gOpt.Grad.Max_W=val(me.Cell(12,1)) - gOpt.Grad.DoseOutputName=Trim(me.Cell(14,1)) + gOpt.Grad.Iterations=val(me.CellValueAt(7,1)) + gOpt.Grad.stepsize=val(me.CellValueAt(8,1)) + gOpt.Grad.Grow=val(me.CellValueAt(9,1)) + gOpt.Grad.Shrink=val(me.CellValueAt(10,1)) + gOpt.Grad.Min_W=val(me.CellValueAt(11,1)) + gOpt.Grad.Max_W=val(me.CellValueAt(12,1)) + gOpt.Grad.DoseOutputName=Trim(me.CellValueAt(14,1)) i=gOpt.Grad.Write_GradDVH_Input @@ -9900,9 +9900,9 @@ End 'Dim i as Integer 'Dim DVH as Class_DVH_One ' - 'if PopupMenu_DVH.text<>"ALL" and me.ListIndex >-1 then - 'DVHGraph.Interactive_index=me.ListIndex-1 - 'DVH_index=me.ListIndex-1 + 'if PopupMenu_DVH.text<>"ALL" and me.SelectedRowIndex >-1 then + 'DVHGraph.Interactive_index=me.SelectedRowIndex-1 + 'DVH_index=me.SelectedRowIndex-1 'DVHGraph.Interactive=True 'DVH=gopt.Oarray.organ(DVH_index).DVH 'StaticText_DVH_Stat.value = "Max dose : "+Format(dvh.maxdose,"-#.#####e")+" "+dvh.Dose_Units+" "+"Min dose : "+Format(dvh.mindose,"-#.#####e")+" "+dvh.Dose_Units+" "+"Avg dose : "+Format(dvh.avgdose,"-#.#####e")+" "+dvh.Dose_Units @@ -10127,14 +10127,14 @@ End Sub CellAction(row As Integer, column As Integer) Dim beamindex,i as Integer - beamindex=val(me.Cell(row,12)) + beamindex=val(me.CellValueAt(row,12)) if beamindex>-1 and beamindex<= UBound(gopt.IPbeams) Then if column=1 Then gopt.IPbeams(beamindex).Use=me.CellCheck(row,column) Update_PB_Use ElseIf column=2 Then // Update Grad weights - gopt.IPbeams(beamindex).Weight_Grad=Val(me.Cell(row,column)) + gopt.IPbeams(beamindex).Weight_Grad=Val(me.CellValueAt(row,column)) end end End Sub @@ -10164,13 +10164,13 @@ End Case "Check Dose" For i=0 to me.ListCount if me.Selected(i) Then - do_index=val(me.cell(i,12)) + do_index=val(me.CellValueAt(i,12)) gOpt.IPbeams(do_index).Use=True end Next Case "Uncheck Dose" if me.Selected(i) Then - do_index=val(me.cell(i,12)) + do_index=val(me.CellValueAt(i,12)) gOpt.IPbeams(do_index).Use=False end end @@ -10217,8 +10217,8 @@ End #tag Events Listbox_NLO_Status #tag Event Sub Open() - me.Heading(0)="Metric" - me.Heading(1)="Results" + me.HeaderAt(0)="Metric" + me.HeaderAt(1)="Results" me.AddRow "Status" me.AddRow "Time submitted" @@ -10240,7 +10240,7 @@ End me.AddRow "Normalize dose distributions" me.CellType(10,0)=2 - me.Cell(10,1)="Yes/No" + me.CellValueAt(10,1)="Yes/No" me.AddRow "Sum final dose distributions label" @@ -10265,10 +10265,10 @@ End Dim i as Boolean - gOpt.NLO.Iterations=val(me.Cell(7,1)) - gOpt.NLO.Min_W=val(me.Cell(8,1)) - gOpt.NLO.Max_W=val(me.Cell(9,1)) - gOpt.NLO.OutputName=Trim(me.Cell(10,1)) + gOpt.NLO.Iterations=val(me.CellValueAt(7,1)) + gOpt.NLO.Min_W=val(me.CellValueAt(8,1)) + gOpt.NLO.Max_W=val(me.CellValueAt(9,1)) + gOpt.NLO.OutputName=Trim(me.CellValueAt(10,1)) i=gOpt.nlo.Write_NLO_Input diff --git a/MERT/Window_EMET_Setup.xojo_window b/MERT/Window_EMET_Setup.xojo_window index a97a712..f4cc208 100644 --- a/MERT/Window_EMET_Setup.xojo_window +++ b/MERT/Window_EMET_Setup.xojo_window @@ -6521,9 +6521,9 @@ End ReDim Iso_Values.values(-1) ReDim Iso_Values.each_show(-1) - Listbox_Depths.Heading(0)="Depth (cm)" + Listbox_Depths.HeaderAt(0)="Depth (cm)" Listbox_Depths.ColumnType(0)=3 - Listbox_Depths.Heading(1)="Colour" + Listbox_Depths.HeaderAt(1)="Colour" Listbox_Depths.DeleteAllRows @@ -7052,13 +7052,13 @@ End // Get Target contour if UBound(file.Segments)>0 Then - MsgBox "Error! More than one target segment at slice "+str(i+1) + MessageBox "Error! More than one target segment at slice "+str(i+1) Return end // Get external contour if UBound(file_ex.segments)>0 Then - MsgBox "Error! More than one external segment at slice "+str(i+1) + MessageBox "Error! More than one external segment at slice "+str(i+1) Return end next @@ -7794,8 +7794,8 @@ End temp_beam.FLEC.y1=flec_a.y1 temp_beam.FLEC.y2=flec_a.y2 - temp_beam.RT_name= ListBox_Linac_Energies.Cell(i,0) - temp_beam.Beam_Energy= ListBox_Linac_Energies.Cell(i,1) + temp_beam.RT_name= ListBox_Linac_Energies.CellValueAt(i,0) + temp_beam.Beam_Energy= ListBox_Linac_Energies.CellValueAt(i,1) temp_beam.Beam_Mode="FLEC" temp_beam.Nominal_Isocenter=100 temp_beam.Beam_Num=UBound(gRTOG.Plan(Plan_Index).Beam)+2 @@ -7863,8 +7863,8 @@ End for i=0 to ListBox_Linac_Energies.ListCount-1 if ListBox_Linac_Energies.CellCheck(i,2)=True then - rt_eng.Append ListBox_Linac_Energies.Cell(i,1) - rt_name.Append ListBox_Linac_Energies.Cell(i,0) + rt_eng.Append ListBox_Linac_Energies.CellValueAt(i,1) + rt_name.Append ListBox_Linac_Energies.CellValueAt(i,0) end Next @@ -7876,7 +7876,7 @@ End beami.Append i Next else - beami.Append PopupMenu_FLEC_Beam.ListIndex + beami.Append PopupMenu_FLEC_Beam.SelectedRowIndex end if CheckBox_FLEC_Batch_ARC.Value Then @@ -7977,9 +7977,9 @@ End '======FLEC Populate===== ListBox_Linac_Energies.DeleteAllRows ListBox_Linac_Energies.ColumnWidths="33%,33%,33%" - ListBox_Linac_Energies.heading(0)="Linac" - ListBox_Linac_Energies.heading(1)="Energy" - ListBox_Linac_Energies.heading(2)="yes/no" + ListBox_Linac_Energies.HeaderAt(0)="Linac" + ListBox_Linac_Energies.HeaderAt(1)="Energy" + ListBox_Linac_Energies.HeaderAt(2)="yes/no" ListBox_Linac_Energies.ColumnType(2)=2 j=-1 @@ -7987,7 +7987,7 @@ End if "FLEC"=gLinacs.all_linacs(x).Mode then j=j+1 ListBox_Linac_Energies.AddRow gLinacs.all_linacs(x).RT_name - ListBox_Linac_Energies.Cell(j,1)=gLinacs.all_linacs(x).Energy + ListBox_Linac_Energies.CellValueAt(j,1)=gLinacs.all_linacs(x).Energy end next @@ -8020,7 +8020,7 @@ End Dim model_beam as RTOG_Beam_Geometry //------------------------------------------ - ffindex=Listbox_Depths_Results.ListIndex + ffindex=Listbox_Depths_Results.SelectedRowIndex if RadioButton_Depth_1.Value Then @@ -8071,11 +8071,11 @@ End gRTOG.Plan(Plan_Index).Add_Beam k=UBound(gRTOG.Plan(Plan_Index).Beam) bb=gRTOG.Plan(Plan_Index).Beam(k) - bb.RT_name= ListBox_Linac_Energies.Cell(o,0) - bb.Beam_Energy= ListBox_Linac_Energies.Cell(o,1) + bb.RT_name= ListBox_Linac_Energies.CellValueAt(o,0) + bb.Beam_Energy= ListBox_Linac_Energies.CellValueAt(o,1) bb.Beam_Mode="FLEC" bb.Aperture_ID=Beam.Aperture_ID - m=Listbox_Depths_Results.ListIndex + m=Listbox_Depths_Results.SelectedRowIndex bb.Collimator.Fields(0).Gantry_Angle=Depth_Fields.All(m).Gantry bb.Collimator.Fields(0).isocenter.X=Depth_Fields.All(m).isox bb.Collimator.Fields(0).isocenter.y=Depth_Fields.All(m).isoy @@ -8095,7 +8095,7 @@ End else - m=Listbox_Depths_Results.ListIndex + m=Listbox_Depths_Results.SelectedRowIndex for i=0 to UBound(Depth_Fields.All(m).Rect_Depth_Fields) for o=0 to ListBox_Linac_Energies.ListCount-1 @@ -8103,8 +8103,8 @@ End gRTOG.Plan(Plan_Index).Add_Beam k=UBound(gRTOG.Plan(Plan_Index).Beam) bb=gRTOG.Plan(Plan_Index).Beam(k) - bb.RT_name= ListBox_Linac_Energies.Cell(o,0) - bb.Beam_Energy= ListBox_Linac_Energies.Cell(o,1) + bb.RT_name= ListBox_Linac_Energies.CellValueAt(o,0) + bb.Beam_Energy= ListBox_Linac_Energies.CellValueAt(o,1) bb.Beam_Mode="FLEC" bb.Aperture_ID=Beam.Aperture_ID bb.Collimator.Fields(0).Gantry_Angle=Depth_Fields.All(m).Gantry @@ -8141,8 +8141,8 @@ End PopupMenu_Depth_Beam.AddRow "Beam ("+str(j+1)+") - "+gRTOG.Plan(Plan_Index).Beam(j).RT_Name+", "+gRTOG.Plan(Plan_Index).Beam(j).beam_energy PopupMenu_FLEC_Beam.AddRow "Beam ("+str(j+1)+") - "+gRTOG.Plan(Plan_Index).Beam(j).RT_Name+", "+gRTOG.Plan(Plan_Index).Beam(j).beam_energy next - PopupMenu_Depth_Beam.ListIndex=0 - PopupMenu_FLEC_Beam.ListIndex=0 + PopupMenu_Depth_Beam.SelectedRowIndex=0 + PopupMenu_FLEC_Beam.SelectedRowIndex=0 end @@ -8159,57 +8159,57 @@ End me.SetFocus Canvas_Projection.Refresh - i=Listbox_Map.ListIndex + i=Listbox_Map.SelectedRowIndex projection_index=i Listbox_Map.DeleteAllRows Listbox_Map.ColumnCount=15 Listbox_Map.ColumnWidths="10%,20%,20%,20%,20%,20%,20%,20%,20%,20%,20%,20%,20%,20%,20%" - Listbox_Map.Heading(0)="Number" + Listbox_Map.HeaderAt(0)="Number" - Listbox_Map.Heading(1)="Angle Score" + Listbox_Map.HeaderAt(1)="Angle Score" - Listbox_Map.Heading(2)="Target Z/Y Width" - Listbox_Map.Heading(3)="Target X Width" - Listbox_Map.Heading(4)="Distance from CM to Body" + Listbox_Map.HeaderAt(2)="Target Z/Y Width" + Listbox_Map.HeaderAt(3)="Target X Width" + Listbox_Map.HeaderAt(4)="Distance from CM to Body" - Listbox_Map.Heading(5)="Iso X" - Listbox_Map.Heading(6)="Iso Y" - Listbox_Map.Heading(7)="Iso Z" + Listbox_Map.HeaderAt(5)="Iso X" + Listbox_Map.HeaderAt(6)="Iso Y" + Listbox_Map.HeaderAt(7)="Iso Z" - Listbox_Map.Heading(8)="T above" - Listbox_Map.Heading(9)="T below" + Listbox_Map.HeaderAt(8)="T above" + Listbox_Map.HeaderAt(9)="T below" - Listbox_Map.Heading(10)="FX1" - Listbox_Map.Heading(11)="FX2" - Listbox_Map.Heading(12)="FY1" - Listbox_Map.Heading(13)="FY2" + Listbox_Map.HeaderAt(10)="FX1" + Listbox_Map.HeaderAt(11)="FX2" + Listbox_Map.HeaderAt(12)="FY1" + Listbox_Map.HeaderAt(13)="FY2" - Listbox_Map.Heading(14)="Gantry Angle" + Listbox_Map.HeaderAt(14)="Gantry Angle" for i=0 to UBound(Projections) Listbox_Map.AddRow str(i+1) - Listbox_Map.Cell(i,1)=Format(projections(i).weight_Z_Field_Size*projections(i).weight_center*Projections(i).weight_distance*Projections(i).weight_X_Field_Size/100000000,"#.###") - Listbox_Map.Cell(i,2)=Format(projections(i).Max_Z_Field_Opening,"#.###") - Listbox_Map.Cell(i,3)=Format(projections(i).Max_X_Field_Width,"#.###") - Listbox_Map.Cell(i,4)=Format(projections(i).External_Distance,"#.###") + Listbox_Map.CellValueAt(i,1)=Format(projections(i).weight_Z_Field_Size*projections(i).weight_center*Projections(i).weight_distance*Projections(i).weight_X_Field_Size/100000000,"#.###") + Listbox_Map.CellValueAt(i,2)=Format(projections(i).Max_Z_Field_Opening,"#.###") + Listbox_Map.CellValueAt(i,3)=Format(projections(i).Max_X_Field_Width,"#.###") + Listbox_Map.CellValueAt(i,4)=Format(projections(i).External_Distance,"#.###") - Listbox_Map.Cell(i,5)=Format(projections(i).iso_x,"-#.##") - Listbox_Map.Cell(i,6)=Format(projections(i).iso_y,"-#.##") - Listbox_Map.Cell(i,7)=Format(projections(i).iso_Z,"-#.##") + Listbox_Map.CellValueAt(i,5)=Format(projections(i).iso_x,"-#.##") + Listbox_Map.CellValueAt(i,6)=Format(projections(i).iso_y,"-#.##") + Listbox_Map.CellValueAt(i,7)=Format(projections(i).iso_Z,"-#.##") - Listbox_Map.Cell(i,8)=Format(projections(i).Target_Z_Pluse,"-#.##") - Listbox_Map.Cell(i,9)=Format(projections(i).Target_Z_Minus,"-#.##") + Listbox_Map.CellValueAt(i,8)=Format(projections(i).Target_Z_Pluse,"-#.##") + Listbox_Map.CellValueAt(i,9)=Format(projections(i).Target_Z_Minus,"-#.##") - Listbox_Map.Cell(i,10)=Format(projections(i).Max_x1,"-#.##") - Listbox_Map.Cell(i,11)=Format(projections(i).Max_x2,"-#.##") - Listbox_Map.Cell(i,12)=Format(projections(i).Max_y1,"-#.##") - Listbox_Map.Cell(i,13)=Format(projections(i).Max_y2,"-#.##") + Listbox_Map.CellValueAt(i,10)=Format(projections(i).Max_x1,"-#.##") + Listbox_Map.CellValueAt(i,11)=Format(projections(i).Max_x2,"-#.##") + Listbox_Map.CellValueAt(i,12)=Format(projections(i).Max_y1,"-#.##") + Listbox_Map.CellValueAt(i,13)=Format(projections(i).Max_y2,"-#.##") - Listbox_Map.Cell(i,14)=Format(projections(i).Gantry_Angle,"-000.##") + Listbox_Map.CellValueAt(i,14)=Format(projections(i).Gantry_Angle,"-000.##") Next @@ -8222,21 +8222,21 @@ End Listbox_Depths_Results.DeleteAllRows Listbox_Depths_Results.ColumnCount=6 - Listbox_Depths_Results.Heading(0)="Num" - Listbox_Depths_Results.Heading(1)="Min Depth (cm)" - Listbox_Depths_Results.Heading(2)="Max Depth (cm)" - Listbox_Depths_Results.Heading(3)="Avg Depth (cm)" - Listbox_Depths_Results.Heading(4)="Res X (cm)" - Listbox_Depths_Results.Heading(5)="Res Y (cm)" + Listbox_Depths_Results.HeaderAt(0)="Num" + Listbox_Depths_Results.HeaderAt(1)="Min Depth (cm)" + Listbox_Depths_Results.HeaderAt(2)="Max Depth (cm)" + Listbox_Depths_Results.HeaderAt(3)="Avg Depth (cm)" + Listbox_Depths_Results.HeaderAt(4)="Res X (cm)" + Listbox_Depths_Results.HeaderAt(5)="Res Y (cm)" for i=0 to UBound(Depth_Fields.All) Listbox_Depths_Results.AddRow str(i+1) - Listbox_Depths_Results.Cell(i,1)=Format(Depth_Fields.All(i).MinDistalDepth,"-#.###") - Listbox_Depths_Results.Cell(i,2)=Format(Depth_Fields.All(i).MaxDistalDepth,"-#.###") - Listbox_Depths_Results.Cell(i,3)=Format(Depth_Fields.All(i).AvgDistDepth,"-#.###") - Listbox_Depths_Results.Cell(i,4)=Format(Depth_Fields.All(i).Del_x,"-#.###") - Listbox_Depths_Results.Cell(i,5)=Format(Depth_Fields.All(i).Del_Y,"-#.###") + Listbox_Depths_Results.CellValueAt(i,1)=Format(Depth_Fields.All(i).MinDistalDepth,"-#.###") + Listbox_Depths_Results.CellValueAt(i,2)=Format(Depth_Fields.All(i).MaxDistalDepth,"-#.###") + Listbox_Depths_Results.CellValueAt(i,3)=Format(Depth_Fields.All(i).AvgDistDepth,"-#.###") + Listbox_Depths_Results.CellValueAt(i,4)=Format(Depth_Fields.All(i).Del_x,"-#.###") + Listbox_Depths_Results.CellValueAt(i,5)=Format(Depth_Fields.All(i).Del_Y,"-#.###") Next End Sub #tag EndMethod @@ -8307,9 +8307,9 @@ End target_index=i end next - PopupMenu_SC_Target.ListIndex=target_index - PopupMenu_Target.ListIndex=target_index - PopupMenu_External.ListIndex=external_index + PopupMenu_SC_Target.SelectedRowIndex=target_index + PopupMenu_Target.SelectedRowIndex=target_index + PopupMenu_External.SelectedRowIndex=external_index EditField_Angle_nx.value = str(nx) @@ -8676,7 +8676,7 @@ End #tag Events PopupMenu_SC_Target #tag Event Sub Change() - target_index=me.ListIndex + target_index=me.SelectedRowIndex End Sub #tag EndEvent #tag EndEvents @@ -8690,7 +8690,7 @@ End #tag Events PopupMenu_SC_External #tag Event Sub Change() - external_index=me.ListIndex + external_index=me.SelectedRowIndex End Sub #tag EndEvent #tag EndEvents @@ -8768,8 +8768,8 @@ End #tag Events PopupMenu_Depth_Beam #tag Event Sub Change() - if me.ListIndex>-1 Then - Beam=gRTOG.Plan(Plan_Index).Beam(me.ListIndex) + if me.SelectedRowIndex>-1 Then + Beam=gRTOG.Plan(Plan_Index).Beam(me.SelectedRowIndex) StaticText_Depth_OneBeam.value = "Isocenter X,Y,Z : ("+Format(Beam.Collimator.Fields(0).isocenter.X,"-#.###")+", "+Format(Beam.Collimator.Fields(0).isocenter.y,"-#.###")+", "+Format(Beam.Collimator.Fields(0).isocenter.z,"-#.###")+")" StaticText_Depth_OneBeam.value = StaticText_Depth_OneBeam.Text+chr(10)+"Gantry angle : "+Format(Beam.Collimator.Fields(0).Gantry_Angle,"-#.###") @@ -8820,7 +8820,7 @@ End if column=0 Then if row>-1 and row<=UBound(Iso_Values.values) Then - Iso_Values.values(row)=Val(me.Cell(row,column)) + Iso_Values.values(row)=Val(me.CellValueAt(row,column)) end end @@ -8854,7 +8854,7 @@ End Case "Remove Depth" - i=me.ListIndex + i=me.SelectedRowIndex if i>=0 and i<=UBound(Iso_Values.values) Then Iso_Values.values.Remove i Iso_Values.colours.Remove i @@ -8968,8 +8968,8 @@ End #tag Events PopupMenu_FLEC_Beam #tag Event Sub Change() - if me.ListIndex>-1 Then - Beam=gRTOG.Plan(Plan_Index).Beam(me.ListIndex) + if me.SelectedRowIndex>-1 Then + Beam=gRTOG.Plan(Plan_Index).Beam(me.SelectedRowIndex) FLEC=Beam.FLEC FLEC_Populate_Beam end @@ -9009,8 +9009,8 @@ End startnum=val(EditField_Photon_Copy1.Text)-1 finnum=val(EditField_Photon_Copy2.Text)-1 else - startnum=PopupMenu_Photon_Beam.ListIndex - finnum=PopupMenu_Photon_Beam.ListIndex + startnum=PopupMenu_Photon_Beam.SelectedRowIndex + finnum=PopupMenu_Photon_Beam.SelectedRowIndex end dely=val(TextField_Photon_dely.Text) @@ -9020,7 +9020,7 @@ End delx=val(TextField_Photon_delX.Text) xmin=val(TextField_Photon_xmin.Text) xmax=val(TextField_Photon_Xmax.Text) - beam_index=PopupMenu_Photon_Beam.ListIndex + beam_index=PopupMenu_Photon_Beam.SelectedRowIndex if CheckBox_Photon_Arc_Batch.Value Then @@ -9160,14 +9160,14 @@ End #tag Events PopupMenu_Target #tag Event Sub Change() - target_index=me.ListIndex + target_index=me.SelectedRowIndex End Sub #tag EndEvent #tag EndEvents #tag Events PopupMenu_External #tag Event Sub Change() - external_index=me.ListIndex + external_index=me.SelectedRowIndex End Sub #tag EndEvent #tag EndEvents @@ -9241,10 +9241,10 @@ End Dim lbindex as Integer Dim realindex as Integer - lbindex=me.ListIndex + lbindex=me.SelectedRowIndex if lbindex>-1 And lbindex<=UBound(Projections) Then - realindex=val(Listbox_Map.Cell(lbindex,0))-1 + realindex=val(Listbox_Map.CellValueAt(lbindex,0))-1 projection_index=realindex end @@ -9331,7 +9331,7 @@ End f=f.Parent - i=Listbox_Depths_Results.ListIndex + i=Listbox_Depths_Results.SelectedRowIndex if i>=0 and i<=UBound(Depth_Fields.All) then @@ -9407,7 +9407,7 @@ End 'del_x=val(TextField_X.Text) 'del_y=val(TextField_y.Text) ' - 'i=Listbox_Depths_Results.ListIndex + 'i=Listbox_Depths_Results.SelectedRowIndex 'g.UseOldRenderer=True ' 'if i>=0 and i<=UBound(Depth_Fields.All) then @@ -9521,7 +9521,7 @@ End 'del_x=val(TextField_X.Text) 'del_y=val(TextField_y.Text) ' - 'i=Listbox_Depths_Results.ListIndex + 'i=Listbox_Depths_Results.SelectedRowIndex ' ' 'if i>=0 and i<=UBound(Depth_Fields.All) then diff --git a/McGill_Cutout/Class_Cutout.xojo_code b/McGill_Cutout/Class_Cutout.xojo_code index a6b18d7..6c1ced6 100644 --- a/McGill_Cutout/Class_Cutout.xojo_code +++ b/McGill_Cutout/Class_Cutout.xojo_code @@ -165,11 +165,11 @@ Protected Class Class_Cutout next cutOutfile.close else - MsgBox "coould not open egscutoutdata file" + MessageBox "coould not open egscutoutdata file" end else - MsgBox "problem with file name...egscutoutdata file does not exist" - MsgBox "absolute path of egscutoutdata name="+g.NativePath + MessageBox "problem with file name...egscutoutdata file does not exist" + MessageBox "absolute path of egscutoutdata name="+g.NativePath end else @@ -307,7 +307,7 @@ Protected Class Class_Cutout end cutOutfile=f.createTextFile if cutOutfile=nil then - MsgBox "Could not create cutout file!" + MessageBox "Could not create cutout file!" Return end diff --git a/McGill_Cutout/Window_Cutout_Options.xojo_window b/McGill_Cutout/Window_Cutout_Options.xojo_window index b339117..7a51512 100644 --- a/McGill_Cutout/Window_Cutout_Options.xojo_window +++ b/McGill_Cutout/Window_Cutout_Options.xojo_window @@ -2021,7 +2021,7 @@ End if Plan_Index>=0 Then - beam_index=Window_Treatment.ListBox_MC_Cutout.ListIndex + beam_index=Window_Treatment.ListBox_MC_Cutout.SelectedRowIndex if beam_index >= 0 and beam_index<= UBound(gRTOG.Plan(Plan_Index).Beam) Then else @@ -2059,7 +2059,7 @@ End list_index=i end next - PopupMenu_cutout_mat.ListIndex=list_index + PopupMenu_cutout_mat.SelectedRowIndex=list_index '=================== PopupMenu_Gap_Material.DeleteAllRows @@ -2070,7 +2070,7 @@ End list_index=i end next - PopupMenu_Gap_Material.ListIndex=list_index + PopupMenu_Gap_Material.SelectedRowIndex=list_index //EditField_cutout_thick.value = str(Cutout.CutOutThickness) @@ -2084,15 +2084,15 @@ End list_index=i end next - PopupMenu_phantom_mat.ListIndex=list_index + PopupMenu_phantom_mat.SelectedRowIndex=list_index '=================== PopupMenu_Backscatter.DeleteAllRows PopupMenu_Backscatter.AddRow "No" PopupMenu_Backscatter.AddRow "Yes" if Cutout.BackscatterType=0 then - PopupMenu_Backscatter.ListIndex=0 + PopupMenu_Backscatter.SelectedRowIndex=0 else - PopupMenu_Backscatter.ListIndex=1 + PopupMenu_Backscatter.SelectedRowIndex=1 end '=================== @@ -2100,7 +2100,7 @@ End EditField_jobs.value = Format(Cutout.jobs,"#") EditField_pegs.value = Cutout.pegsfile EditField_CutoutThickness.value = Format(Cutout.CutOutThickness,"-#.####") - PopupMenu_Shell.ListIndex=Cutout.Shell_Index + PopupMenu_Shell.SelectedRowIndex=Cutout.Shell_Index EditField_ECUT.value = Format(Cutout.ECUT,"-#.####") EditField_PCUT.value = Format(Cutout.PCUT,"-#.####") EditField_airgapthickness.value = Format(Cutout.GapThickness,"-#.####") @@ -2246,7 +2246,7 @@ End #tag Events PopupMenu_Backscatter #tag Event Sub Change() - Cutout.BackscatterType=me.ListIndex + Cutout.BackscatterType=me.SelectedRowIndex End Sub #tag EndEvent #tag EndEvents @@ -2303,7 +2303,7 @@ End #tag Events PopupMenu_Shell #tag Event Sub Change() - Cutout.shell_index = me.ListIndex + Cutout.shell_index = me.SelectedRowIndex End Sub #tag EndEvent diff --git a/RTOG Class/RTOG Beam Geometry/RTOG_Beam_Geometry.xojo_code b/RTOG Class/RTOG Beam Geometry/RTOG_Beam_Geometry.xojo_code index 49d3382..8bfc275 100644 --- a/RTOG Class/RTOG Beam Geometry/RTOG_Beam_Geometry.xojo_code +++ b/RTOG Class/RTOG Beam Geometry/RTOG_Beam_Geometry.xojo_code @@ -124,7 +124,7 @@ Protected Class RTOG_Beam_Geometry if ((StartPos<-20) or (StartPos>10) or (EndPos<-20) or (EndPos>10)) Then - MsgBox("Try again, Jaw Positions exceed limits (-20;10)") + MessageBox("Try again, Jaw Positions exceed limits (-20;10)") Return end diff --git a/RTOG Class/RTOG Plan/RTOG_Plan.xojo_code b/RTOG Class/RTOG Plan/RTOG_Plan.xojo_code index 7197227..363ebea 100644 --- a/RTOG Class/RTOG Plan/RTOG_Plan.xojo_code +++ b/RTOG Class/RTOG Plan/RTOG_Plan.xojo_code @@ -2300,7 +2300,7 @@ Protected Class RTOG_Plan if i<=UBound(beam.MLC.Fields) Then dd=beam.MLC.Fields(i).Indexnum else - MsgBox("Error within method split dynamic fields") + MessageBox("Error within method split dynamic fields") Return end @@ -2311,7 +2311,7 @@ Protected Class RTOG_Plan if i<=UBound(beam.Collimator.Fields) Then dd=beam.Collimator.Fields(i).Index else - MsgBox("Error within method split dynamic fields") + MessageBox("Error within method split dynamic fields") Return end @@ -2328,7 +2328,7 @@ Protected Class RTOG_Plan if mutotal<=0.0 Then - MsgBox("Error within method split dynamic fields") + MessageBox("Error within method split dynamic fields") Return end @@ -2440,7 +2440,7 @@ Protected Class RTOG_Plan elseif beam.Collimator.NumFields=1 and (i-1)<=UBound(beam.MLC.Fields) then dd=beam.MLC.Fields(i).Indexnum-beam.MLC.Fields(i-1).Indexnum else - MsgBox("Error within method split dynamic fields") + MessageBox("Error within method split dynamic fields") Return end bbnew.MU=dd*beam.MU @@ -2800,7 +2800,7 @@ Protected Class RTOG_Plan end ts=f.createTextFile if ts=nil then - MsgBox "Could not write "+f.Name + MessageBox "Could not write "+f.Name Exit end @@ -3118,7 +3118,7 @@ Protected Class RTOG_Plan Spaces(ts,"Operator",20,mlc.Fields(i-1).Operator) Spaces(ts,"Collimator",20,mlc.Fields(i-1).Collimator) if UBound(mlc.Fields(i-1).Leaf_A)<>(mlc.NumberofLeafPairs-1) Then - MsgBox "Could not write MLC file for beam "+f.Name + MessageBox "Could not write MLC file for beam "+f.Name ts.Close Return end @@ -3283,7 +3283,7 @@ Protected Class RTOG_Plan //for each structure //initialize the stuff if Structure_Dose(i).Voxel_REs<=0 Then - MsgBox "Wrong voxel size for organ "+str(i+1)+" set at "+str(Structure_Dose(i).Voxel_REs) + MessageBox "Wrong voxel size for organ "+str(i+1)+" set at "+str(Structure_Dose(i).Voxel_REs) Return end diff --git a/RTOG Class/Thread_RTOG.xojo_code b/RTOG Class/Thread_RTOG.xojo_code index 54fe370..8b161ff 100644 --- a/RTOG Class/Thread_RTOG.xojo_code +++ b/RTOG Class/Thread_RTOG.xojo_code @@ -379,7 +379,7 @@ Inherits Thread end end if Scan(0).Slice_Thickness=0 Then - MsgBox "DICOM import error: Can not determine image slice thickness" + MessageBox "DICOM import error: Can not determine image slice thickness" end end diff --git a/Treatment Planning/Canvas_TP.xojo_code b/Treatment Planning/Canvas_TP.xojo_code index 8cff684..f7a878d 100644 --- a/Treatment Planning/Canvas_TP.xojo_code +++ b/Treatment Planning/Canvas_TP.xojo_code @@ -1026,7 +1026,7 @@ Inherits Canvas if dose_data_index<0 then - 'MsgBox "Could not find correct Z plane" + 'MessageBox "Could not find correct Z plane" Return end diff --git a/Treatment Planning/Window_3DView.xojo_window b/Treatment Planning/Window_3DView.xojo_window index 4faa84e..52b30f0 100644 --- a/Treatment Planning/Window_3DView.xojo_window +++ b/Treatment Planning/Window_3DView.xojo_window @@ -27,7 +27,6 @@ Begin Window Window_3DView Width = 745 Begin Rb3dSpace_MMCTP Canvas_3D canvas_scale = 0.0 - Enabled = True Index = 0 InitialParent = "" JAW_Index = 0 @@ -880,7 +879,6 @@ Begin Window Window_3DView Scope = 0 TabIndex = 18 TabPanelIndex = 1 - TabStop = "True" Top = 393 TopLeftColor = &c00000000 Transparent = False @@ -1062,12 +1060,15 @@ End #tag WindowCode #tag Event Sub Close() - app.which_window_3d=False + app.which_window_3d = False - if TargetWindows Then - Task_3DViewer.Enabled=False - MsgBox "The 3D viwer on Windows is not stable, please close MMCTP before opening the 3D viewer again." - end + #If TargetWindows Then + + Task_3DViewer.Enabled = False + MessageBox("The 3D viwer on Windows is not stable, "_ + + "please close MMCTP before opening the 3D viewer again.") + + #EndIf End Sub #tag EndEvent diff --git a/Treatment Planning/Window_AddDose.xojo_window b/Treatment Planning/Window_AddDose.xojo_window index 85cd802..3385947 100644 --- a/Treatment Planning/Window_AddDose.xojo_window +++ b/Treatment Planning/Window_AddDose.xojo_window @@ -534,18 +534,36 @@ End #tag WindowCode #tag Event Function CancelClose(appQuitting as Boolean) As Boolean - Dim i as Integer - if AddDose.State<>4 Then + If AddDose.State <> 4 Then - i=MsgBox("Stop adddose process and close window (yes/no)?",4) - if i=6 Then + + Var d As New MessageDialog + Var b As MessageDialogButton + d.Message = "Stop adddose process and close window? " + d.IconType = MessageDialog.IconTypes.Caution + d.ActionButton.Caption = "Yes" + d.CancelButton.Visible = True + d.AlternateActionButton.Visible = False + d.CancelButton.Visible = True + d.CancelButton.Caption = "No" + + b=d.ShowModal + Select Case b + Case d.ActionButton + AddDose.Kill Return False - else + + Case d.AlternateActionButton + + + Case d.CancelButton Return True - end - end + + End Select + + End If End Function #tag EndEvent @@ -572,8 +590,8 @@ End ListBox_Dose.DeleteAllRows ListBox_Dose.ColumnCount=4 - ListBox_Dose.Heading(0)="Dose Distribution" - ListBox_Dose.Heading(1)="Add (yes/no)" + ListBox_Dose.HeaderAt(0)="Dose Distribution" + ListBox_Dose.HeaderAt(1)="Add (yes/no)" ListBox_Dose.ColumnWidths="80%,20%" row=-1 @@ -582,8 +600,8 @@ End row=row+1 ListBox_Dose.AddRow gRTOG.Plan(j).Dose(a).dose_name ListBox_Dose.CellType(row,1)=2 - ListBox_Dose.Cell(row,2)=str(j) - ListBox_Dose.Cell(row,3)=str(a) + ListBox_Dose.CellValueAt(row,2)=str(j) + ListBox_Dose.CellValueAt(row,3)=str(a) next next @@ -694,8 +712,8 @@ End for a=0 to ListBox_Dose.ListCount-1 if ListBox_Dose.CellCheck(a,1) then - AddDose.plan.Append val(ListBox_Dose.Cell(a,2)) - AddDose.dosenum.Append val(ListBox_Dose.Cell(a,3)) + AddDose.plan.Append val(ListBox_Dose.CellValueAt(a,2)) + AddDose.dosenum.Append val(ListBox_Dose.CellValueAt(a,3)) end next diff --git a/Treatment Planning/Window_Beam_Cutout.xojo_window b/Treatment Planning/Window_Beam_Cutout.xojo_window index ec47fdf..9dfd1c1 100644 --- a/Treatment Planning/Window_Beam_Cutout.xojo_window +++ b/Treatment Planning/Window_Beam_Cutout.xojo_window @@ -768,15 +768,44 @@ End #tag Events BevelButton_erase #tag Event Sub Action() - Dim i as Integer + 'Dim i As Integer + ' + 'if ubound(cutout.Pair)>=0 and BevelButton_penbutton.value=false then + 'i=MessageBox("Delete cutout shape ?", 1,"Warning" ) + 'if i=1 Then + 'redim cutout.Pair(-1) + 'end + 'me.Value=False + 'end + ' + 'Canvas_digitizer.refresh(False) - if ubound(cutout.Pair)>=0 and BevelButton_penbutton.value=false then - i=MsgBox("Delete cutout shape ?", 1,"Warning" ) - if i=1 Then - redim cutout.Pair(-1) - end - me.Value=False - end + + If cutout.Pair.LastRowIndex >= 0 And BevelButton_penbutton.value=False Then + + Var d As New MessageDialog // declare the MessageDialog object + Var b As MessageDialogButton // for handling the result + d.Icon = MessageDialog.GraphicCaution // display warning icon + d.ActionButton.Caption = "Save" + d.CancelButton.Visible = True // show the Cancel button + d.AlternateActionButton.Visible = True // show the "Don't Save" button + d.AlternateActionButton.Caption = "Don't Save" + d.Message = "Delete cutout shape ?" + 'd.Explanation = "If you don't save, your changes will be lost. " + + b = d.ShowModal // display the dialog + Select Case b // determine which button was pressed. + Case d.ActionButton + // user pressed Save + cutout.Pair.ResizeTo(-1) + + Case d.AlternateActionButton + // user pressed Don't Save + Case d.CancelButton + // user pressed Cancel + End Select + Me.Value = False + End Canvas_digitizer.refresh(False) diff --git a/Treatment Planning/Window_Beam_MLC_Properties.xojo_window b/Treatment Planning/Window_Beam_MLC_Properties.xojo_window index 4ea3a37..a3d03b5 100644 --- a/Treatment Planning/Window_Beam_MLC_Properties.xojo_window +++ b/Treatment Planning/Window_Beam_MLC_Properties.xojo_window @@ -245,16 +245,16 @@ End Listbox_MLC.ColumnCount=3 - Listbox_MLC.Heading(0)="Leaf #" - Listbox_MLC.Heading(2)="Bank A" - Listbox_MLC.Heading(1)="Bank B" + Listbox_MLC.HeaderAt(0)="Leaf #" + Listbox_MLC.HeaderAt(2)="Bank A" + Listbox_MLC.HeaderAt(1)="Bank B" else TextField_B.Enabled=False Listbox_MLC.ColumnCount=2 - Listbox_MLC.Heading(0)="Leaf #" - Listbox_MLC.Heading(1)="Bank" + Listbox_MLC.HeaderAt(0)="Leaf #" + Listbox_MLC.HeaderAt(1)="Bank" end @@ -276,8 +276,8 @@ End if field_index>-1 and field_index<=UBound(MLC.Fields) Then for i=mlc.NumberofLeafPairs DownTo 1 Listbox_MLC.AddRow str(i) - Listbox_MLC.Cell(mlc.NumberofLeafPairs-i,2)=Format(mlc.Fields(field_index).Leaf_A(i-1),"-#.###") - Listbox_MLC.Cell(mlc.NumberofLeafPairs-i,1)=Format(mlc.Fields(field_index).Leaf_b(i-1),"-#.###") + Listbox_MLC.CellValueAt(mlc.NumberofLeafPairs-i,2)=Format(mlc.Fields(field_index).Leaf_A(i-1),"-#.###") + Listbox_MLC.CellValueAt(mlc.NumberofLeafPairs-i,1)=Format(mlc.Fields(field_index).Leaf_b(i-1),"-#.###") Next end @@ -286,7 +286,7 @@ End if field_index>-1 and field_index<=UBound(MLC.Fields) Then for i=mlc.NumberofLeafPairs DownTo 1 Listbox_MLC.AddRow str(i) - Listbox_MLC.Cell(mlc.NumberofLeafPairs-i,1)=Format(mlc.Fields(field_index).Leaf_A(i-1),"-#.###") + Listbox_MLC.CellValueAt(mlc.NumberofLeafPairs-i,1)=Format(mlc.Fields(field_index).Leaf_A(i-1),"-#.###") Next end end @@ -319,15 +319,15 @@ End if MLC.Model_Type=0 Then // Normal Leafpair MLC n=mlc.NumberofLeafPairs-1 if column=2 Then - MLC.Fields(field_index).Leaf_A(n-row)=val(me.Cell(row,column)) + MLC.Fields(field_index).Leaf_A(n-row)=val(me.CellValueAt(row,column)) elseif column=1 Then - MLC.Fields(field_index).Leaf_b(n-row)=val(me.Cell(row,column)) + MLC.Fields(field_index).Leaf_b(n-row)=val(me.CellValueAt(row,column)) end else // Binary MLC n=mlc.NumberofLeafPairs-1 - vv=val(me.Cell(row,column)) + vv=val(me.CellValueAt(row,column)) if column=1 Then if vv<>0 and vv<>1 Then vv=0 @@ -352,9 +352,9 @@ End for i=0 to Listbox_MLC.ListCount if Listbox_MLC.Selected(i) Then - k=val(Listbox_MLC.Cell(i,0))-1 + k=val(Listbox_MLC.CellValueAt(i,0))-1 MLC.Fields(field_index).Leaf_b(k)=val(me.Text) - Listbox_MLC.Cell(i,1)=Format(mlc.Fields(field_index).Leaf_b(k),"-#.###") + Listbox_MLC.CellValueAt(i,1)=Format(mlc.Fields(field_index).Leaf_b(k),"-#.###") end next @@ -369,7 +369,7 @@ End for i=0 to Listbox_MLC.ListCount if Listbox_MLC.Selected(i) Then - k=val(Listbox_MLC.Cell(i,0))-1 + k=val(Listbox_MLC.CellValueAt(i,0))-1 vv=val(me.Text) if MLC.Model_Type=1 Then @@ -379,7 +379,7 @@ End end MLC.Fields(field_index).Leaf_A(k)=vv - Listbox_MLC.Cell(i,2)=Format(mlc.Fields(field_index).Leaf_A(k),"-#.###") + Listbox_MLC.CellValueAt(i,2)=Format(mlc.Fields(field_index).Leaf_A(k),"-#.###") end next End Sub diff --git a/Treatment Planning/Window_Beam_Properties.xojo_window b/Treatment Planning/Window_Beam_Properties.xojo_window index 58cbbc3..3f6aacd 100644 --- a/Treatment Planning/Window_Beam_Properties.xojo_window +++ b/Treatment Planning/Window_Beam_Properties.xojo_window @@ -4309,7 +4309,7 @@ End wo_match=False for i=0 to PopupMenu_Wedge_Dynamic_Or.ListCount-1 if wedge_rot=PopupMenu_Wedge_Dynamic_Or.list(i) then - PopupMenu_Wedge_Dynamic_Or.ListIndex=i + PopupMenu_Wedge_Dynamic_Or.SelectedRowIndex=i wo_match=True Exit end @@ -4330,7 +4330,7 @@ End w_match=False for i=0 to PopupMenu_Wedge_static_Ang.ListCount-1 if wedge=PopupMenu_Wedge_static_Ang.list(i) then - PopupMenu_Wedge_static_Ang.ListIndex=i + PopupMenu_Wedge_static_Ang.SelectedRowIndex=i w_match=True Exit end @@ -4340,7 +4340,7 @@ End wo_match=False for i=0 to PopupMenu_Wedge_static_Or.ListCount-1 if wedge_rot=PopupMenu_Wedge_static_Or.list(i) then - PopupMenu_Wedge_static_Or.ListIndex=i + PopupMenu_Wedge_static_Or.SelectedRowIndex=i wo_match=True Exit end @@ -4371,7 +4371,7 @@ End for i=0 to PopupMenu_Wedge_Dynamic_Or.ListCount-1 if PopupMenu_Wedge_Dynamic_Or.List(i)=beam.Wedge_Rotation Then - PopupMenu_Wedge_Dynamic_Or.ListIndex=i + PopupMenu_Wedge_Dynamic_Or.SelectedRowIndex=i Exit end Next @@ -4461,7 +4461,7 @@ End for j=0 to PopupMenu_BMod.ListCount-1 if beam_mode = PopupMenu_BMod.list(j) then - PopupMenu_BMod.ListIndex=j + PopupMenu_BMod.SelectedRowIndex=j end next General_pop_linac_name @@ -4474,12 +4474,12 @@ End for i =0 to PopupMenu_E_RT.ListCount-1 temp=PopupMenu_E_RT.list(i) if name=PopupMenu_E_RT.list(i) then - PopupMenu_E_RT.ListIndex=i + PopupMenu_E_RT.SelectedRowIndex=i n_match=True General_pop_beam_energy for j=0 to PopupMenu_E_BE.ListCount-1 if energy=PopupMenu_E_BE.list(j) then - PopupMenu_E_BE.ListIndex=j + PopupMenu_E_BE.SelectedRowIndex=j e_match=True PopupMenu_E_BA.Enabled=True @@ -4487,7 +4487,7 @@ End // Accessories tab for k=0 to PopupMenu_E_BA.ListCount-1 if app=PopupMenu_E_BA.List(k) then - PopupMenu_E_BA.ListIndex=k + PopupMenu_E_BA.SelectedRowIndex=k Exit end next @@ -4498,10 +4498,10 @@ End next if n_match=False then - PopupMenu_E_RT.ListIndex=0 + PopupMenu_E_RT.SelectedRowIndex=0 end if e_match=false then - PopupMenu_E_BE.ListIndex=0 + PopupMenu_E_BE.SelectedRowIndex=0 end '==============END Linac and energy set=========== @@ -4680,7 +4680,7 @@ End - PopupMenu_Beam.ListIndex=j + PopupMenu_Beam.SelectedRowIndex=j General_populate @@ -4994,7 +4994,7 @@ End if gRTOG.Plan(Plan_Index).Read_McGill_MLC(beam_index,f) Then gRTOG.Plan(Plan_Index).Write_McGill_MLC(beam_index) Else - MsgBox "Problem with "+f.Name + MessageBox "Problem with "+f.Name end Accessories_MLC_info Canvas_MLC.Refresh @@ -5174,7 +5174,7 @@ End #tag Event Function KeyDown(Key As String) As Boolean if val(me.text)<0.001 or val(me.text)>2.0 then - MsgBox "cut out thickness has to be between 0.001 and 2.0 cm" + MessageBox "cut out thickness has to be between 0.001 and 2.0 cm" me.value = "1.5" me.refresh end if @@ -5545,9 +5545,9 @@ End #tag Events PopupMenu_Beam #tag Event Sub Change() - beam = gRTOG.Plan(Plan_Index).beam(PopupMenu_Beam.ListIndex) + beam = gRTOG.Plan(Plan_Index).beam(PopupMenu_Beam.SelectedRowIndex) - beam_index=PopupMenu_Beam.ListIndex + beam_index=PopupMenu_Beam.SelectedRowIndex if TabPanel.Value=0 then General_populate diff --git a/Treatment Planning/Window_CopyBeam.xojo_window b/Treatment Planning/Window_CopyBeam.xojo_window index 143a5fd..1746e3d 100644 --- a/Treatment Planning/Window_CopyBeam.xojo_window +++ b/Treatment Planning/Window_CopyBeam.xojo_window @@ -161,20 +161,20 @@ End ListBox_BEAMs.ColumnWidths=s - ListBox_BEAMs.Heading(0)="Plan Name" + ListBox_BEAMs.HeaderAt(0)="Plan Name" for i=1 to num_col - ListBox_BEAMs.Heading(i)="Beam "+str(i) + ListBox_BEAMs.HeaderAt(i)="Beam "+str(i) next for i=0 to UBound(gRTOG.Plan) ListBox_BEAMs.AddRow"" - ListBox_BEAMs.Cell(i,0)=gRTOG.Plan(i).Plan_ID + ListBox_BEAMs.CellValueAt(i,0)=gRTOG.Plan(i).Plan_ID for k=0 to UBound(gRTOG.Plan(i).beam) if k1 Then Canvas_Graph.Profiles.One_Profile(i).Norm=True @@ -714,9 +714,9 @@ End #tag Events Canvas_Graph #tag Event Sub GotFocus() - if ListBox_Profiles.ListIndex>-1 and ListBox_Profiles.ListIndex<=UBound(Canvas_Graph.Profiles.One_Profile) Then + if ListBox_Profiles.SelectedRowIndex>-1 and ListBox_Profiles.SelectedRowIndex<=UBound(Canvas_Graph.Profiles.One_Profile) Then Canvas_Graph.Interactive=True - Canvas_Graph.Interactive_index=ListBox_Profiles.ListIndex + Canvas_Graph.Interactive_index=ListBox_Profiles.SelectedRowIndex else Canvas_Graph.Interactive=False end @@ -788,27 +788,27 @@ End elseif column=4 Then // Normalize Value - if me.Cell(row,4)="max" Then - Canvas_Graph.Profiles.One_Profile(row).Normalize_value=val(me.Cell(row,2)) + if me.CellValueAt(row,4)="max" Then + Canvas_Graph.Profiles.One_Profile(row).Normalize_value=val(me.CellValueAt(row,2)) - elseif InStr(me.Cell(row,4),"=")>0 Then - ff=me.Cell(row,4) + elseif InStr(me.CellValueAt(row,4),"=")>0 Then + ff=me.CellValueAt(row,4) gg=val(NthField(ff,"=",2)) x=0 y=0 z=0 - if InStr(me.Cell(row,4),"z=")>0 Then //Normalize at z=? + if InStr(me.CellValueAt(row,4),"z=")>0 Then //Normalize at z=? z=gg - elseif InStr(me.Cell(row,4),"x=")>0 Then //Normalize at x=? + elseif InStr(me.CellValueAt(row,4),"x=")>0 Then //Normalize at x=? x=gg - elseif InStr(me.Cell(row,4),"y=")>0 Then //Normalize at y=? + elseif InStr(me.CellValueAt(row,4),"y=")>0 Then //Normalize at y=? y=gg end Canvas_Graph.Profiles.One_Profile(row).Normalize_value=Canvas_Graph.Profiles.One_Profile(row).Get_Value_at_Point(x,y,z,true) - elseif val(me.Cell(row,4))<>0 Then - Canvas_Graph.Profiles.One_Profile(row).Normalize_value=val(me.Cell(row,4)) + elseif val(me.CellValueAt(row,4))<>0 Then + Canvas_Graph.Profiles.One_Profile(row).Normalize_value=val(me.CellValueAt(row,4)) end diff --git a/Treatment Planning/Window_IsoDose.xojo_window b/Treatment Planning/Window_IsoDose.xojo_window index 453a4a4..6e5d2e0 100644 --- a/Treatment Planning/Window_IsoDose.xojo_window +++ b/Treatment Planning/Window_IsoDose.xojo_window @@ -1038,8 +1038,8 @@ End #tag Event Sub Open() - ListBox_Isodose.heading(1)="Colour" - ListBox_Isodose.heading(2)="Show" + ListBox_Isodose.HeaderAt(1)="Colour" + ListBox_Isodose.HeaderAt(2)="Show" EditField_LineThickness.value = str(gvis.Iso.thickness) EditField_Font.value = (gvis.Iso.FONT) EditField_Font_Size.value = str(gvis.Iso.FONT_Size) @@ -1062,7 +1062,7 @@ End if gvis.Iso.Show_Type=1 then RadioButton_abs.Value=True Iso=gVis.Iso.Abs - ListBox_Isodose.heading(0)="Value" + ListBox_Isodose.HeaderAt(0)="Value" GroupBox_Relative.Enabled=False RadioButton_max.Value=False @@ -1071,7 +1071,7 @@ End else GroupBox_Relative.Enabled=True Iso=gVis.Iso.Relative - ListBox_Isodose.heading(0)="%" + ListBox_Isodose.HeaderAt(0)="%" RadioButton_Relative.Value=True end @@ -1228,7 +1228,7 @@ End #tag Event Sub CellTextChange(row as Integer, column as Integer) if column=0 Then - Iso.values(row)=val(me.Cell(row,column)) + Iso.values(row)=val(me.CellValueAt(row,column)) end End Sub #tag EndEvent @@ -1253,7 +1253,7 @@ End initialsize=ListBox_Isodose.listCount - whichone=ListBox_Isodose.listindex + whichone=ListBox_Isodose.SelectedRowIndex if whichone<0 then return end diff --git a/Treatment Planning/Window_Plan_Info.xojo_window b/Treatment Planning/Window_Plan_Info.xojo_window index b5d1d50..02fd446 100644 --- a/Treatment Planning/Window_Plan_Info.xojo_window +++ b/Treatment Planning/Window_Plan_Info.xojo_window @@ -243,11 +243,11 @@ End app.which_window_planinfo=True MC_Count_Number_Jobs - Listbox_MC_Running.Heading(0)="Shell" - Listbox_MC_Running.Heading(1)="BEAMnrc Jobs" - Listbox_MC_Running.Heading(2)="DOSXYZnrc Jobs" - Listbox_MC_Running.Heading(3)="VMC Jobs" - Listbox_MC_Running.Heading(4)="On-line?" + Listbox_MC_Running.HeaderAt(0)="Shell" + Listbox_MC_Running.HeaderAt(1)="BEAMnrc Jobs" + Listbox_MC_Running.HeaderAt(2)="DOSXYZnrc Jobs" + Listbox_MC_Running.HeaderAt(3)="VMC Jobs" + Listbox_MC_Running.HeaderAt(4)="On-line?" MC_Jobs_Open @@ -260,8 +260,8 @@ End else Window_Plan_Info.Close End - Listbox_Plan.Heading(0)="Plan Settings" - Listbox_Plan.Heading(1)="Current Status" + Listbox_Plan.HeaderAt(0)="Plan Settings" + Listbox_Plan.HeaderAt(1)="Current Status" Listbox_Plan.ColumnType(1)=3 Listbox_Plan.AddRow ( "SOP Instance UID", gRTOG.Plan(Plan_Index).DICOM_SOPInstanceUID) @@ -291,13 +291,13 @@ End for i=0 to UBound(gShells.Shells) Listbox_MC_Running.AddRow gShells.Shells(i).title if gBEAM<> nil Then - Listbox_MC_Running.Cell(i,1)=str(gShells.Shells(i).BeamnrcJobs) + Listbox_MC_Running.CellValueAt(i,1)=str(gShells.Shells(i).BeamnrcJobs) end if gDOSXYZ<> nil Then - Listbox_MC_Running.Cell(i,2)=str(gShells.Shells(i).DosxyznrcJobs) + Listbox_MC_Running.CellValueAt(i,2)=str(gShells.Shells(i).DosxyznrcJobs) end if gVMC<> nil Then - Listbox_MC_Running.Cell(i,3)=str(gShells.Shells(i).VMCJobs) + Listbox_MC_Running.CellValueAt(i,3)=str(gShells.Shells(i).VMCJobs) end Listbox_MC_Running.CellType(i,4)=2 Listbox_MC_Running.CellCheck(i,4)=gShells.Shells(i).online @@ -343,46 +343,46 @@ End #tag Event Sub CellTextChange(row as Integer, column as Integer) if row=0 Then - gRTOG.Plan(Plan_Index).Plan_Name=Trim(me.Cell(row,column)) + gRTOG.Plan(Plan_Index).Plan_Name=Trim(me.CellValueAt(row,column)) SaveChange=True elseif row=1 then - gRTOG.Plan(Plan_Index).DICOM_SOPInstanceUID=Trim(me.Cell(row,column)) + gRTOG.Plan(Plan_Index).DICOM_SOPInstanceUID=Trim(me.CellValueAt(row,column)) SaveChange=True elseif row=2 then SaveChange=True - gRTOG.Plan(Plan_Index).DICOM_SeriesInstanceUID=Trim(me.Cell(row,column)) + gRTOG.Plan(Plan_Index).DICOM_SeriesInstanceUID=Trim(me.CellValueAt(row,column)) elseif row=3 then - gRTOG.Plan(Plan_Index).SeriesDescription=Trim(me.Cell(row,column)) + gRTOG.Plan(Plan_Index).SeriesDescription=Trim(me.CellValueAt(row,column)) SaveChange=True elseif row=4 then - gRTOG.Plan(Plan_Index).DICOM_SeriesNumber=Val(me.Cell(row,column)) + gRTOG.Plan(Plan_Index).DICOM_SeriesNumber=Val(me.CellValueAt(row,column)) SaveChange=True elseif row=5 then - gRTOG.Plan(Plan_Index).Plan_Date=Trim(me.Cell(row,column)) + gRTOG.Plan(Plan_Index).Plan_Date=Trim(me.CellValueAt(row,column)) SaveChange=True elseif row=6 then - gRTOG.Plan(Plan_Index).Plan_Time=Trim(me.Cell(row,column)) + gRTOG.Plan(Plan_Index).Plan_Time=Trim(me.CellValueAt(row,column)) SaveChange=True elseif row=7 then - gRTOG.Plan(Plan_Index).ReviewerName=Trim(me.Cell(row,column)) + gRTOG.Plan(Plan_Index).ReviewerName=Trim(me.CellValueAt(row,column)) SaveChange=True elseif row=8 then - gRTOG.Plan(Plan_Index).ReviewDate=Trim(me.Cell(row,column)) + gRTOG.Plan(Plan_Index).ReviewDate=Trim(me.CellValueAt(row,column)) SaveChange=True elseif row=9 then - gRTOG.Plan(Plan_Index).ReviewTime=Trim(me.Cell(row,column)) + gRTOG.Plan(Plan_Index).ReviewTime=Trim(me.CellValueAt(row,column)) SaveChange=True elseif row=10 then - gRTOG.Plan(Plan_Index).ApprovalStatus=Trim(me.Cell(row,column)) + gRTOG.Plan(Plan_Index).ApprovalStatus=Trim(me.CellValueAt(row,column)) SaveChange=True end diff --git a/Treatment Planning/Window_Prescription.xojo_window b/Treatment Planning/Window_Prescription.xojo_window index 80a4df9..83acaee 100644 --- a/Treatment Planning/Window_Prescription.xojo_window +++ b/Treatment Planning/Window_Prescription.xojo_window @@ -746,29 +746,29 @@ End Listbox_Organ_Constraints.ColumnCount=15 // DV values - Listbox_Organ_Constraints.Heading(0)="Organ" - Listbox_Organ_Constraints.Heading(1)="Dose Limit (Gy)" - Listbox_Organ_Constraints.Heading(2)="Vol Limit (%)" - Listbox_Organ_Constraints.Heading(3)="Penalty" + Listbox_Organ_Constraints.HeaderAt(0)="Organ" + Listbox_Organ_Constraints.HeaderAt(1)="Dose Limit (Gy)" + Listbox_Organ_Constraints.HeaderAt(2)="Vol Limit (%)" + Listbox_Organ_Constraints.HeaderAt(3)="Penalty" //Average Dose - Listbox_Organ_Constraints.Heading(4)="Average Dose Constraint" - Listbox_Organ_Constraints.Heading(5)="Max Avg Dose (Gy)" - Listbox_Organ_Constraints.Heading(6)="Max Avg Dose Pen" + Listbox_Organ_Constraints.HeaderAt(4)="Average Dose Constraint" + Listbox_Organ_Constraints.HeaderAt(5)="Max Avg Dose (Gy)" + Listbox_Organ_Constraints.HeaderAt(6)="Max Avg Dose Pen" //Max Dose - Listbox_Organ_Constraints.Heading(7)="Max Dose Constraint" - Listbox_Organ_Constraints.Heading(8)="Max Dose (Gy)" - Listbox_Organ_Constraints.Heading(9)="Max Dose Pen" + Listbox_Organ_Constraints.HeaderAt(7)="Max Dose Constraint" + Listbox_Organ_Constraints.HeaderAt(8)="Max Dose (Gy)" + Listbox_Organ_Constraints.HeaderAt(9)="Max Dose Pen" // System Placeholders - Listbox_Organ_Constraints.Heading(10)="Organ Constraints 7" - Listbox_Organ_Constraints.Heading(11)="Index 8" - Listbox_Organ_Constraints.Heading(12)="Constaint Index 9" + Listbox_Organ_Constraints.HeaderAt(10)="Organ Constraints 7" + Listbox_Organ_Constraints.HeaderAt(11)="Index 8" + Listbox_Organ_Constraints.HeaderAt(12)="Constaint Index 9" // System Placeholders - Listbox_Organ_Constraints.Heading(13)="Importance" - Listbox_Organ_Constraints.Heading(14)="Overlap Pri." + Listbox_Organ_Constraints.HeaderAt(13)="Importance" + Listbox_Organ_Constraints.HeaderAt(14)="Overlap Pri." temp="10%,7%,7%,5%,10%,10%,10%,10%,8%,8%,0%,0%,0%,7%,8%" Listbox_Organ_Constraints.columnwidths=Temp @@ -805,7 +805,7 @@ End Listbox_Organ_Constraints.addfolder "" temp=NthField(s1,",",i) // Place the Organ and name - Listbox_Organ_Constraints.cell(i-1,0)=NthField(temp,"%",1) + Listbox_Organ_Constraints.CellValueAt(i-1,0)=NthField(temp,"%",1) Listbox_Organ_Constraints.CellType(i-1,0)=2 @@ -820,8 +820,8 @@ End if Plan.Structure_Dose(i-1).AvgDose_Use Then Listbox_Organ_Constraints.CellCheck(i-1,4)=True end - Listbox_Organ_Constraints.Cell(i-1,5)=Format(Plan.Structure_Dose(i-1).AvgDose,"-#.###") - Listbox_Organ_Constraints.Cell(i-1,6)=Format(Plan.Structure_Dose(i-1).AvgDosePen,"-#.###") + Listbox_Organ_Constraints.CellValueAt(i-1,5)=Format(Plan.Structure_Dose(i-1).AvgDose,"-#.###") + Listbox_Organ_Constraints.CellValueAt(i-1,6)=Format(Plan.Structure_Dose(i-1).AvgDosePen,"-#.###") // Max dose contraint info Listbox_Organ_Constraints.CellType(i-1,7)=2 @@ -830,21 +830,21 @@ End if Plan.Structure_Dose(i-1).Use_Max_Dose Then Listbox_Organ_Constraints.CellCheck(i-1,7)=True end - Listbox_Organ_Constraints.Cell(i-1,8)=Format(Plan.Structure_Dose(i-1).MaxDose,"-#.###") - Listbox_Organ_Constraints.Cell(i-1,9)=Format(Plan.Structure_Dose(i-1).Max_Priority,"-#.###") + Listbox_Organ_Constraints.CellValueAt(i-1,8)=Format(Plan.Structure_Dose(i-1).MaxDose,"-#.###") + Listbox_Organ_Constraints.CellValueAt(i-1,9)=Format(Plan.Structure_Dose(i-1).Max_Priority,"-#.###") // number - Listbox_Organ_Constraints.cell(i-1,10)=NthField(sub1,";",i) + Listbox_Organ_Constraints.CellValueAt(i-1,10)=NthField(sub1,";",i) // Place the Organ index - Listbox_Organ_Constraints.cell(i-1,11)=NthField(temp,"%",2) + Listbox_Organ_Constraints.CellValueAt(i-1,11)=NthField(temp,"%",2) // Place the Organ importance and Overlap Listbox_Organ_Constraints.CellType(i-1,13)=3 Listbox_Organ_Constraints.CellType(i-1,14)=3 - Listbox_Organ_Constraints.cell(i-1,13)=Format(Plan.Structure_Dose(i-1).Importance,"#") - Listbox_Organ_Constraints.cell(i-1,14)=Format(Plan.Structure_Dose(i-1).OverlapPriority,"#") + Listbox_Organ_Constraints.CellValueAt(i-1,13)=Format(Plan.Structure_Dose(i-1).Importance,"#") + Listbox_Organ_Constraints.CellValueAt(i-1,14)=Format(Plan.Structure_Dose(i-1).OverlapPriority,"#") Next Listbox_Organ_Constraints.hierarchical=true @@ -866,12 +866,12 @@ End '===================================== Listbox_Organ_Target.ColumnCount=8 - Listbox_Organ_Target.Heading(0)="Target Volume" - Listbox_Organ_Target.Heading(1)="Min Dose (Gy)" - Listbox_Organ_Target.Heading(2)="Min Dose Penalty" - Listbox_Organ_Target.Heading(3)="Norm Vol %" - Listbox_Organ_Target.Heading(4)="Norm Gy" - Listbox_Organ_Target.Heading(5)="Number" + Listbox_Organ_Target.HeaderAt(0)="Target Volume" + Listbox_Organ_Target.HeaderAt(1)="Min Dose (Gy)" + Listbox_Organ_Target.HeaderAt(2)="Min Dose Penalty" + Listbox_Organ_Target.HeaderAt(3)="Norm Vol %" + Listbox_Organ_Target.HeaderAt(4)="Norm Gy" + Listbox_Organ_Target.HeaderAt(5)="Number" temp="25%,18%,18%,17%,17%,5%" @@ -881,11 +881,11 @@ End for i=0 to UBound(Plan.Structure_Dose) Listbox_Organ_Target.AddRow Plan.Structure_Dose(i).Organ_Name - Listbox_Organ_Target.Cell(i,1)=Format(Plan.Structure_Dose(i).MinDose,"-#.####") - Listbox_Organ_Target.Cell(i,2)=Format(Plan.Structure_Dose(i).Min_Priority,"-#.####") - Listbox_Organ_Target.Cell(i,3)=Format(Plan.Structure_Dose(i).Target_Norm_Volume,"-#.####") - Listbox_Organ_Target.Cell(i,4)=Format(Plan.Structure_Dose(i).Target_Norm_Dose,"-#.####") - Listbox_Organ_Target.Cell(i,5)=Format(i+1,"#") + Listbox_Organ_Target.CellValueAt(i,1)=Format(Plan.Structure_Dose(i).MinDose,"-#.####") + Listbox_Organ_Target.CellValueAt(i,2)=Format(Plan.Structure_Dose(i).Min_Priority,"-#.####") + Listbox_Organ_Target.CellValueAt(i,3)=Format(Plan.Structure_Dose(i).Target_Norm_Volume,"-#.####") + Listbox_Organ_Target.CellValueAt(i,4)=Format(Plan.Structure_Dose(i).Target_Norm_Dose,"-#.####") + Listbox_Organ_Target.CellValueAt(i,5)=Format(i+1,"#") Listbox_Organ_Target.CellType(i,0)=2 Listbox_Organ_Target.CellType(i,1)=3 @@ -916,21 +916,21 @@ End '===================================== Listbox_Volumes.ColumnCount=6 - Listbox_Volumes.Heading(0)="Organ" - Listbox_Volumes.Heading(1)="Voxel (x,y) resolution" - Listbox_Volumes.Heading(2)="Voxel size x (cm)" - Listbox_Volumes.Heading(3)="Voxel size y (cm)" - Listbox_Volumes.Heading(4)="Number of voxels" - Listbox_Volumes.Heading(5)="Trim cutoff value %" + Listbox_Volumes.HeaderAt(0)="Organ" + Listbox_Volumes.HeaderAt(1)="Voxel (x,y) resolution" + Listbox_Volumes.HeaderAt(2)="Voxel size x (cm)" + Listbox_Volumes.HeaderAt(3)="Voxel size y (cm)" + Listbox_Volumes.HeaderAt(4)="Number of voxels" + Listbox_Volumes.HeaderAt(5)="Trim cutoff value %" Listbox_Volumes.DeleteAllRows for i=0 to UBound(Plan.Structure_Dose) Listbox_Volumes.AddRow Plan.Structure_Dose(i).Organ_Name - Listbox_Volumes.Cell(i,1)=Format(Plan.Structure_Dose(i).Voxel_REs,"#") - Listbox_Volumes.Cell(i,2)=Format(Plan.Structure_Dose(i).Voxel_Size_x,"-#.####") - Listbox_Volumes.Cell(i,3)=Format(Plan.Structure_Dose(i).Voxel_Size_y,"-#.####") - Listbox_Volumes.Cell(i,4)=Format(Plan.Structure_Dose(i).Num_Points,"#") - Listbox_Volumes.Cell(i,5)=Format(Plan.Structure_Dose(i).CutoffDose,"#.#####") + Listbox_Volumes.CellValueAt(i,1)=Format(Plan.Structure_Dose(i).Voxel_REs,"#") + Listbox_Volumes.CellValueAt(i,2)=Format(Plan.Structure_Dose(i).Voxel_Size_x,"-#.####") + Listbox_Volumes.CellValueAt(i,3)=Format(Plan.Structure_Dose(i).Voxel_Size_y,"-#.####") + Listbox_Volumes.CellValueAt(i,4)=Format(Plan.Structure_Dose(i).Num_Points,"#") + Listbox_Volumes.CellValueAt(i,5)=Format(Plan.Structure_Dose(i).CutoffDose,"#.#####") Listbox_Volumes.CellType(i,0)=0 Listbox_Volumes.CellType(i,1)=3 Listbox_Volumes.CellType(i,2)=0 @@ -997,12 +997,12 @@ End old=organ_index old_d=constraint_index - if me.ListIndex=-1 Then + if me.SelectedRowIndex=-1 Then Return end 'Find Organ index - s=Listbox_Organ_Constraints.Cell(Listbox_Organ_Constraints.ListIndex,11) + s=Listbox_Organ_Constraints.CellValueAt(Listbox_Organ_Constraints.SelectedRowIndex,11) if len(s)=0 Then temp_plan_index=-1 else @@ -1012,7 +1012,7 @@ End organ_index=temp_plan_index 'Find Constraint index - s=Listbox_Organ_Constraints.Cell(Listbox_Organ_Constraints.ListIndex,12) + s=Listbox_Organ_Constraints.CellValueAt(Listbox_Organ_Constraints.SelectedRowIndex,12) if len(s)=0 Then constraint_index=-1 else @@ -1024,7 +1024,7 @@ End Sub CollapseRow(row As Integer) Dim i,u,NSubRows as Integer - NSubRows=CountFields(Me.cell(row,10),",") + NSubRows=CountFields(Me.CellValueAt(row,10),",") u=row+1 For i=row+NSubRows downto u Me.removerow i @@ -1058,26 +1058,26 @@ End if organ_index>-1 and organ_index<=UBound(Plan.Structure_Dose) Then if constraint_index>-1 and constraint_index<=UBound(Plan.Structure_Dose(organ_index).Constraints) Then if column=1 Then - Plan.Structure_Dose(organ_index).Constraints(constraint_index).dose=val(me.Cell(row,column)) + Plan.Structure_Dose(organ_index).Constraints(constraint_index).dose=val(me.CellValueAt(row,column)) elseif column=2 Then - Plan.Structure_Dose(organ_index).Constraints(constraint_index).volume=val(me.Cell(row,column)) + Plan.Structure_Dose(organ_index).Constraints(constraint_index).volume=val(me.CellValueAt(row,column)) elseif column=3 Then - Plan.Structure_Dose(organ_index).Constraints(constraint_index).Priority=val(me.Cell(row,column)) + Plan.Structure_Dose(organ_index).Constraints(constraint_index).Priority=val(me.CellValueAt(row,column)) end end if column=5 Then - Plan.Structure_Dose(organ_index).AvgDose=val(me.Cell(row,column)) + Plan.Structure_Dose(organ_index).AvgDose=val(me.CellValueAt(row,column)) elseif column=6 Then - Plan.Structure_Dose(organ_index).AvgDosePen=val(me.Cell(row,column)) + Plan.Structure_Dose(organ_index).AvgDosePen=val(me.CellValueAt(row,column)) elseif column=8 Then - Plan.Structure_Dose(organ_index).MaxDose=val(me.Cell(row,column)) + Plan.Structure_Dose(organ_index).MaxDose=val(me.CellValueAt(row,column)) elseif column=9 Then - Plan.Structure_Dose(organ_index).Max_Priority=val(me.Cell(row,column)) + Plan.Structure_Dose(organ_index).Max_Priority=val(me.CellValueAt(row,column)) elseif column=13 Then - Plan.Structure_Dose(organ_index).Importance=val(me.Cell(row,column)) + Plan.Structure_Dose(organ_index).Importance=val(me.CellValueAt(row,column)) elseif column=14 Then - Plan.Structure_Dose(organ_index).OverlapPriority=val(me.Cell(row,column)) + Plan.Structure_Dose(organ_index).OverlapPriority=val(me.CellValueAt(row,column)) end end End Sub @@ -1087,7 +1087,7 @@ End Dim i as Integer // Get organ index value - i=val(me.Cell(row,11)) + i=val(me.CellValueAt(row,11)) if column=0 and i>-1 and i<= UBound(Plan.Structure_Dose) Then Plan.Structure_Dose(i).Use_DV_Constraint=me.CellCheck(row,column) @@ -1140,36 +1140,39 @@ End //---------------------------- // //---------------------------- - Dim s1,temp as String - Dim i,u, Organindex as Integer + 'Dim s1,temp as String + 'Dim i,u, Organindex as Integer //---------------------------- - s1=me.cell(row,10) - u=CountFields(s1,",") - temp=NthField(s1,",",1) - Organindex=val(me.Cell(row,11)) + Var s1 As String = Me.CellValueAt(row,10) + Var u As Integer = CountFields(s1,",") + Var temp As String = NthField(s1,",",1) + Var Organindex As Integer = Val(Me.CellValueAt(row,11)) - For i=1 to u + For i As Integer = 1 To u temp=NthField(s1,",",i) Me.addrow "" - Me.cell(me.lastIndex,0)=NthField(temp,"%",1) - Me.CellType(me.LastIndex,0)=0 + Me.CellValueAt(Me.LastRowIndex,0)=NthField(temp,"%",1) + Me.CellTypeAt(Me.LastRowIndex,0) = Listbox.CellTypes.Default - if UBound(Plan.Structure_Dose(Organindex).Constraints)>-1 Then - Me.Cell(me.LastIndex,1)=Format(Plan.Structure_Dose(Organindex).Constraints(i-1).dose,"-###") - Me.Cell(me.LastIndex,2)=Format(Plan.Structure_Dose(Organindex).Constraints(i-1).volume,"-###") - Me.Cell(me.LastIndex,3)=Format(Plan.Structure_Dose(Organindex).Constraints(i-1).Priority,"-###") + If Plan.Structure_Dose(Organindex).Constraints.LastRowIndex > -1 Then + Me.CellValueAt(Me.LastRowIndex,1) = _ + Format(Plan.Structure_Dose(Organindex).Constraints(i-1).dose,"-###") + Me.CellValueAt(Me.LastRowIndex,2) = _ + Format(Plan.Structure_Dose(Organindex).Constraints(i-1).Volume,"-###") + Me.CellValueAt(Me.LastRowIndex,3) = _ + Format(Plan.Structure_Dose(Organindex).Constraints(i-1).Priority,"-###") - Me.CellType(me.LastIndex,1)=3 - Me.CellType(me.LastIndex,2)=3 - Me.CellType(me.LastIndex,3)=3 - end + Me.CellTypeAt(Me.LastRowIndex,1) = Listbox.CellTypes.TextField + Me.CellTypeAt(Me.LastRowIndex,2) = Listbox.CellTypes.TextField + Me.CellTypeAt(Me.LastRowIndex,3) = Listbox.CellTypes.TextField + End // Place Organ index - Me.Cell(me.lastIndex,11)=str(Organindex) + Me.CellValueAt(Me.LastRowIndex,11)=Str(Organindex) //Place the Constraint index - me.cell(me.LastIndex,12)=str(i-1) + Me.CellValueAt(Me.LastRowIndex,12)=Str(i-1) Next End Sub #tag EndEvent @@ -1178,7 +1181,7 @@ End #tag Event Sub CellTextChange(row as Integer, column as Integer) if column=1 Then - Plan.Structure_Dose(row).Voxel_REs=val(me.Cell(row,column)) + Plan.Structure_Dose(row).Voxel_REs=val(me.CellValueAt(row,column)) end End Sub #tag EndEvent @@ -1207,13 +1210,13 @@ End Sub CellTextChange(row as Integer, column as Integer) if row>-1 and row<=UBound(Plan.Structure_Dose) Then if column=1 Then - Plan.Structure_Dose(row).MinDose=val(me.Cell(row,column)) + Plan.Structure_Dose(row).MinDose=val(me.CellValueAt(row,column)) elseif column=2 Then - Plan.Structure_Dose(row).Min_Priority=val(me.Cell(row,column)) + Plan.Structure_Dose(row).Min_Priority=val(me.CellValueAt(row,column)) elseif column=3 Then - Plan.Structure_Dose(row).Target_Norm_Volume=val(me.Cell(row,column)) + Plan.Structure_Dose(row).Target_Norm_Volume=val(me.CellValueAt(row,column)) elseif column=4 Then - Plan.Structure_Dose(row).Target_Norm_Dose=val(me.Cell(row,column)) + Plan.Structure_Dose(row).Target_Norm_Dose=val(me.CellValueAt(row,column)) end end diff --git a/Treatment Planning/Window_Treatment.xojo_window b/Treatment Planning/Window_Treatment.xojo_window index 86f29c5..c76c3c2 100644 --- a/Treatment Planning/Window_Treatment.xojo_window +++ b/Treatment Planning/Window_Treatment.xojo_window @@ -3769,41 +3769,108 @@ End #tag WindowCode #tag Event Function CancelClose(appQuitting as Boolean) As Boolean - //-------------------------- - // - // - //-------------------------- - Dim i as Integer - Dim j as Boolean - Dim fname as String - //-------------------------- + '//-------------------------- + '// + '// + '//-------------------------- + ''Dim i as Integer + ''Dim j as Boolean + ''Dim fname as String + '//-------------------------- + ' + 'if UBound(MMCTP_Shell_Refresh.All)<>-1 Then + 'MessageBox "Application can not close while SSH REFRESH shell is still running" + 'Return True + 'elseif UBound(MMCTP_Shell_Run.All)<>-1 Then + 'MessageBox "Application can not close while SSH RUN shell is still running" + 'Return True + 'elseif UBound(MMCTP_Download.All)<>-1 Then + 'MessageBox "Application can not close while FTP shell is still running" + 'Return True + 'Elseif Save_Beams=True Then + 'i=MessageBox("Save Plan Changes Before Exiting?" ,3) + 'if i=6 Then // yes pressed + 'app.MMCTP_Save_Plan + 'elseif i=7 Then // no pressed + 'elseif i=2 Then //Cancell + 'Return True + 'end + 'Elseif Save_Dose=True Then + 'i=MessageBox( "Save Dose Distrbution Changes Before Exiting?" ,3) + 'if i=6 Then // yes pressed + 'App.MMCTP_Save_Dose + 'elseif i=7 Then // no pressed + 'elseif i=2 Then //Cancell + 'Return True + 'end + 'end - if UBound(MMCTP_Shell_Refresh.All)<>-1 Then - MsgBox "Application can not close while SSH REFRESH shell is still running" + If MMCTP_Shell_Refresh.All.LastRowIndex <> -1 Then + + MessageBox "Application can not close while SSH REFRESH shell is still running" Return True - elseif UBound(MMCTP_Shell_Run.All)<>-1 Then - MsgBox "Application can not close while SSH RUN shell is still running" + + Elseif MMCTP_Shell_Run.All.LastRowIndex <> -1 Then + + MessageBox "Application can not close while SSH RUN shell is still running" Return True - elseif UBound(MMCTP_Download.All)<>-1 Then - MsgBox "Application can not close while FTP shell is still running" + + Elseif MMCTP_Download.All.LastRowIndex <> -1 Then + + MessageBox "Application can not close while FTP shell is still running" Return True - Elseif Save_Beams=True Then - i=MsgBox("Save Plan Changes Before Exiting?" ,3) - if i=6 Then // yes pressed + + Elseif Save_Beams Then + + Var d As New MessageDialog // declare the MessageDialog object + Var b As MessageDialogButton // for handling the result + d.Icon = MessageDialog.GraphicCaution // display warning icon + d.ActionButton.Caption = "Save" + d.CancelButton.Visible = True // show the Cancel button + d.AlternateActionButton.Visible = True // show the "Don't Save" button + d.AlternateActionButton.Caption = "Don't Save" + d.Message = "Save Plan Changes Before Exiting?" + 'd.Explanation = "If you don't save, your changes will be lost. " + + b = d.ShowModal // display the dialog + Select Case b // determine which button was pressed. + Case d.ActionButton + // user pressed Save app.MMCTP_Save_Plan - elseif i=7 Then // no pressed - elseif i=2 Then //Cancell + + Case d.AlternateActionButton + // user pressed Don't Save + Case d.CancelButton + // user pressed Cancel Return True - end - Elseif Save_Dose=True Then - i=MsgBox( "Save Dose Distrbution Changes Before Exiting?" ,3) - if i=6 Then // yes pressed + + End Select + + Elseif Save_Dose Then + + Var d As New MessageDialog // declare the MessageDialog object + Var b As MessageDialogButton // for handling the result + d.Icon = MessageDialog.GraphicCaution // display warning icon + d.ActionButton.Caption = "Save" + d.CancelButton.Visible = True // show the Cancel button + d.AlternateActionButton.Visible = True // show the "Don't Save" button + d.AlternateActionButton.Caption = "Don't Save" + d.Message = "Save Dose Distrbution Changes Before Exiting?" + 'd.Explanation = "If you don't save, your changes will be lost. " + + b = d.ShowModal // display the dialog + Select Case b // determine which button was pressed. + Case d.ActionButton + // user pressed Save App.MMCTP_Save_Dose - elseif i=7 Then // no pressed - elseif i=2 Then //Cancell - Return True - end - end + + Case d.AlternateActionButton + // user pressed Don't Save + Case d.CancelButton + // user pressed Cancel + End Select + + End End Function #tag EndEvent @@ -4109,34 +4176,34 @@ End k=plan_index if col=8 then - gRTOG.Plan(k).beam(num_beam).Collimator.fields(0).X1=val(ListBox_Beam.Cell(num_beam,8))/2 - gRTOG.Plan(k).beam(num_beam).Collimator.fields(0).X2 =val(ListBox_Beam.Cell(num_beam,8))/2 + gRTOG.Plan(k).beam(num_beam).Collimator.fields(0).X1=val(ListBox_Beam.CellValueAt(num_beam,8))/2 + gRTOG.Plan(k).beam(num_beam).Collimator.fields(0).X2 =val(ListBox_Beam.CellValueAt(num_beam,8))/2 elseif col=11 then - gRTOG.Plan(k).beam(num_beam).Collimator.fields(0).Y1=val(ListBox_Beam.Cell(num_beam,11))/2 - gRTOG.Plan(k).beam(num_beam).Collimator.fields(0).Y2=val(ListBox_Beam.Cell(num_beam,11))/2 + gRTOG.Plan(k).beam(num_beam).Collimator.fields(0).Y1=val(ListBox_Beam.CellValueAt(num_beam,11))/2 + gRTOG.Plan(k).beam(num_beam).Collimator.fields(0).Y2=val(ListBox_Beam.CellValueAt(num_beam,11))/2 else - gRTOG.Plan(k).beam(num_beam).beam_Description=ListBox_Beam.Cell(num_beam,1) - gRTOG.Plan(k).beam(num_beam).beam_weight= val(ListBox_Beam.Cell(num_beam,3)) + gRTOG.Plan(k).beam(num_beam).beam_Description=ListBox_Beam.CellValueAt(num_beam,1) + gRTOG.Plan(k).beam(num_beam).beam_weight= val(ListBox_Beam.CellValueAt(num_beam,3)) - gRTOG.Plan(k).beam(num_beam).Collimator.Fields(0).collimator_angle=val(ListBox_Beam.Cell(num_beam,5) ) - gRTOG.Plan(k).beam(num_beam).Collimator.Fields(0).gantry_Angle=val(ListBox_Beam.Cell(num_beam,4)) - gRTOG.Plan(k).beam(num_beam).Collimator.Fields(0).couch_Angle=val(ListBox_Beam.Cell(num_beam,6) ) + gRTOG.Plan(k).beam(num_beam).Collimator.Fields(0).collimator_angle=val(ListBox_Beam.CellValueAt(num_beam,5) ) + gRTOG.Plan(k).beam(num_beam).Collimator.Fields(0).gantry_Angle=val(ListBox_Beam.CellValueAt(num_beam,4)) + gRTOG.Plan(k).beam(num_beam).Collimator.Fields(0).couch_Angle=val(ListBox_Beam.CellValueAt(num_beam,6) ) - gRTOG.Plan(k).beam(num_beam).Collimator.fields(0).X1=val(ListBox_Beam.Cell(num_beam,9)) - gRTOG.Plan(k).beam(num_beam).Collimator.fields(0).X2 =val(ListBox_Beam.Cell(num_beam,10)) - gRTOG.Plan(k).beam(num_beam).Collimator.fields(0).Y1=val(ListBox_Beam.Cell(num_beam,12)) - gRTOG.Plan(k).beam(num_beam).Collimator.fields(0).Y2=val(ListBox_Beam.Cell(num_beam,13)) + gRTOG.Plan(k).beam(num_beam).Collimator.fields(0).X1=val(ListBox_Beam.CellValueAt(num_beam,9)) + gRTOG.Plan(k).beam(num_beam).Collimator.fields(0).X2 =val(ListBox_Beam.CellValueAt(num_beam,10)) + gRTOG.Plan(k).beam(num_beam).Collimator.fields(0).Y1=val(ListBox_Beam.CellValueAt(num_beam,12)) + gRTOG.Plan(k).beam(num_beam).Collimator.fields(0).Y2=val(ListBox_Beam.CellValueAt(num_beam,13)) - gRTOG.Plan(k).beam(num_beam).Collimator.Fields(0).isocenter.x=val(ListBox_Beam.Cell(num_beam,14)) - gRTOG.Plan(k).beam(num_beam).Collimator.Fields(0).isocenter.y=val(ListBox_Beam.Cell(num_beam,15)) - gRTOG.Plan(k).beam(num_beam).Collimator.Fields(0).isocenter.z=val(ListBox_Beam.Cell(num_beam,16)) - gRTOG.Plan(k).beam(num_beam).mu=val(ListBox_Beam.Cell(num_beam,18)) - gRTOG.Plan(k).beam(num_beam).ssd=val(ListBox_Beam.Cell(num_beam,17)) + gRTOG.Plan(k).beam(num_beam).Collimator.Fields(0).isocenter.x=val(ListBox_Beam.CellValueAt(num_beam,14)) + gRTOG.Plan(k).beam(num_beam).Collimator.Fields(0).isocenter.y=val(ListBox_Beam.CellValueAt(num_beam,15)) + gRTOG.Plan(k).beam(num_beam).Collimator.Fields(0).isocenter.z=val(ListBox_Beam.CellValueAt(num_beam,16)) + gRTOG.Plan(k).beam(num_beam).mu=val(ListBox_Beam.CellValueAt(num_beam,18)) + gRTOG.Plan(k).beam(num_beam).ssd=val(ListBox_Beam.CellValueAt(num_beam,17)) end @@ -4161,25 +4228,25 @@ End ListBox_Beam.DeleteAllRows ListBox_Beam.ColumnCount=19 - ListBox_Beam.Heading(0)="ID" - ListBox_Beam.Heading(1)="Description" - ListBox_Beam.Heading(2)="Machine/Energy" - ListBox_Beam.Heading(3)="Weight" - ListBox_Beam.Heading(4)="Gantry Rtn" - ListBox_Beam.Heading(5)="Coll Rtn" - ListBox_Beam.Heading(6)="Couch Rtn" - ListBox_Beam.Heading(7)="Wedge" - ListBox_Beam.Heading(8)="Field X (cm)" - ListBox_Beam.Heading(9)="X1 (cm)" - ListBox_Beam.Heading(10)="X2 (cm)" - ListBox_Beam.Heading(11)="Field Y (cm)" - ListBox_Beam.Heading(12)="Y1 (cm)" - ListBox_Beam.Heading(13)="Y2 (cm)" - ListBox_Beam.Heading(14)="X (cm)" - ListBox_Beam.Heading(15)="Y (cm)" - ListBox_Beam.Heading(16)="Z (cm)" - ListBox_Beam.Heading(17)="SSD (cm)" - ListBox_Beam.Heading(18)="MU" + ListBox_Beam.HeaderAt(0)="ID" + ListBox_Beam.HeaderAt(1)="Description" + ListBox_Beam.HeaderAt(2)="Machine/Energy" + ListBox_Beam.HeaderAt(3)="Weight" + ListBox_Beam.HeaderAt(4)="Gantry Rtn" + ListBox_Beam.HeaderAt(5)="Coll Rtn" + ListBox_Beam.HeaderAt(6)="Couch Rtn" + ListBox_Beam.HeaderAt(7)="Wedge" + ListBox_Beam.HeaderAt(8)="Field X (cm)" + ListBox_Beam.HeaderAt(9)="X1 (cm)" + ListBox_Beam.HeaderAt(10)="X2 (cm)" + ListBox_Beam.HeaderAt(11)="Field Y (cm)" + ListBox_Beam.HeaderAt(12)="Y1 (cm)" + ListBox_Beam.HeaderAt(13)="Y2 (cm)" + ListBox_Beam.HeaderAt(14)="X (cm)" + ListBox_Beam.HeaderAt(15)="Y (cm)" + ListBox_Beam.HeaderAt(16)="Z (cm)" + ListBox_Beam.HeaderAt(17)="SSD (cm)" + ListBox_Beam.HeaderAt(18)="MU" @@ -4190,46 +4257,46 @@ End col=gRTOG.Plan(k).beam(i).collimator.fields(0) ListBox_Beam.AddRow Format(gRTOG.Plan(k).beam(i).beam_num,"#") - ListBox_Beam.Cell(i,1) =gRTOG.Plan(k).beam(i).beam_description + ListBox_Beam.CellValueAt(i,1) =gRTOG.Plan(k).beam(i).beam_description ListBox_Beam.CellType(i,1)=3 - ListBox_Beam.Cell(i,2) =gRTOG.Plan(k).beam(i).RT_name +" "+(gRTOG.Plan(k).beam(i).beam_energy ) - ListBox_Beam.Cell(i,3) =Format(gRTOG.Plan(k).beam(i).beam_weight,"-#.##") + ListBox_Beam.CellValueAt(i,2) =gRTOG.Plan(k).beam(i).RT_name +" "+(gRTOG.Plan(k).beam(i).beam_energy ) + ListBox_Beam.CellValueAt(i,3) =Format(gRTOG.Plan(k).beam(i).beam_weight,"-#.##") ListBox_Beam.CellType(i,3)=3 - ListBox_Beam.Cell(i,4) =Format(gRTOG.Plan(k).beam(i).Collimator.Fields(0).gantry_Angle,"-#.##") + ListBox_Beam.CellValueAt(i,4) =Format(gRTOG.Plan(k).beam(i).Collimator.Fields(0).gantry_Angle,"-#.##") ListBox_Beam.CellType(i,4)=3 - ListBox_Beam.Cell(i,5) =Format(gRTOG.Plan(k).beam(i).Collimator.Fields(0).collimator_angle,"-#.##") + ListBox_Beam.CellValueAt(i,5) =Format(gRTOG.Plan(k).beam(i).Collimator.Fields(0).collimator_angle,"-#.##") ListBox_Beam.CellType(i,5)=3 - ListBox_Beam.Cell(i,6) =Format(gRTOG.Plan(k).beam(i).Collimator.Fields(0).couch_Angle,"-#.##") + ListBox_Beam.CellValueAt(i,6) =Format(gRTOG.Plan(k).beam(i).Collimator.Fields(0).couch_Angle,"-#.##") ListBox_Beam.CellType(i,6)=3 if gRTOG.Plan(k).Beam(i).Wedge_type ="Dynamic" then - ListBox_Beam.Cell(i,7) =gRTOG.Plan(k).Beam(i).Wedge_Angle +" "+left(gRTOG.Plan(k).Beam(i).Wedge_Rotation,1)+" Dyn" + ListBox_Beam.CellValueAt(i,7) =gRTOG.Plan(k).Beam(i).Wedge_Angle +" "+left(gRTOG.Plan(k).Beam(i).Wedge_Rotation,1)+" Dyn" elseif gRTOG.Plan(k).Beam(i).Wedge_type ="Static" then - ListBox_Beam.Cell(i,7) =gRTOG.Plan(k).Beam(i).Wedge_Angle +" "+left(gRTOG.Plan(k).Beam(i).Wedge_Rotation,1)+" Sta" + ListBox_Beam.CellValueAt(i,7) =gRTOG.Plan(k).Beam(i).Wedge_Angle +" "+left(gRTOG.Plan(k).Beam(i).Wedge_Rotation,1)+" Sta" end - ListBox_Beam.Cell(i,8)=Format(col.X1+col.x2,"-#.##") + ListBox_Beam.CellValueAt(i,8)=Format(col.X1+col.x2,"-#.##") ListBox_Beam.CellType(i,8)=3 - ListBox_Beam.Cell(i,11)=Format(col.y1+col.y2,"-#.##") + ListBox_Beam.CellValueAt(i,11)=Format(col.y1+col.y2,"-#.##") ListBox_Beam.CellType(i,11)=3 - ListBox_Beam.Cell(i,9)=Format(col.X1,"-#.##") + ListBox_Beam.CellValueAt(i,9)=Format(col.X1,"-#.##") ListBox_Beam.CellType(i,9)=3 - ListBox_Beam.Cell(i,10)=Format(col.x2,"-#.##") + ListBox_Beam.CellValueAt(i,10)=Format(col.x2,"-#.##") ListBox_Beam.CellType(i,10)=3 - ListBox_Beam.Cell(i,12)=Format(col.y1,"-#.##") + ListBox_Beam.CellValueAt(i,12)=Format(col.y1,"-#.##") ListBox_Beam.CellType(i,12)=3 - ListBox_Beam.Cell(i,13)=Format(col.y2,"-#.##") + ListBox_Beam.CellValueAt(i,13)=Format(col.y2,"-#.##") ListBox_Beam.CellType(i,13)=3 - ListBox_Beam.Cell(i,14)=Format(gRTOG.Plan(k).beam(i).Collimator.Fields(0).isocenter.x,"-#.##") + ListBox_Beam.CellValueAt(i,14)=Format(gRTOG.Plan(k).beam(i).Collimator.Fields(0).isocenter.x,"-#.##") ListBox_Beam.CellType(i,14)=3 - ListBox_Beam.Cell(i,15)=Format(gRTOG.Plan(k).beam(i).Collimator.Fields(0).isocenter.y,"-#.##") + ListBox_Beam.CellValueAt(i,15)=Format(gRTOG.Plan(k).beam(i).Collimator.Fields(0).isocenter.y,"-#.##") ListBox_Beam.CellType(i,15)=3 - ListBox_Beam.Cell(i,16)=Format(gRTOG.Plan(k).beam(i).Collimator.Fields(0).isocenter.z,"-#.##") + ListBox_Beam.CellValueAt(i,16)=Format(gRTOG.Plan(k).beam(i).Collimator.Fields(0).isocenter.z,"-#.##") ListBox_Beam.CellType(i,16)=3 - ListBox_Beam.Cell(i,17)=Format(gRTOG.Plan(k).beam(i).ssd,"-#.##") + ListBox_Beam.CellValueAt(i,17)=Format(gRTOG.Plan(k).beam(i).ssd,"-#.##") ListBox_Beam.CellType(i,17)=3 - ListBox_Beam.Cell(i,18)=Format(gRTOG.Plan(k).beam(i).MU,"-#.##") + ListBox_Beam.CellValueAt(i,18)=Format(gRTOG.Plan(k).beam(i).MU,"-#.##") ListBox_Beam.CellType(i,18)=3 next end @@ -4280,13 +4347,13 @@ End for k=0 to UBound(Dose_distr) if ListBox_DVH_Graphs.ColumnCount>k Then - ListBox_DVH_Graphs.Heading(k)=Dose_distr(k) + ListBox_DVH_Graphs.HeaderAt(k)=Dose_distr(k) for x= 0 to UBound(gDVH.All_DVH) if gDVH.All_DVH(x).Name=Dose_distr(k) then for i=0 to ubound(grtog.Structures.Structures) if gDVH.All_DVH(x).struc_names=grtog.Structures.Structures(i).Structure_Name then ListBox_DVH_Graphs.CellType(i,k)=2 - ListBox_DVH_Graphs.Cell(i,k)=grtog.Structures.Structures(i).Structure_Name + ListBox_DVH_Graphs.CellValueAt(i,k)=grtog.Structures.Structures(i).Structure_Name end next end @@ -4307,7 +4374,7 @@ End ListBox_DVH_Struc.deleteAllRows - ListBox_DVH_Struc.heading(0)="Structure" + ListBox_DVH_Struc.HeaderAt(0)="Structure" for i=0 to ubound(grtog.Structures.Structures) ListBox_DVH_Struc.addrow grtog.Structures.Structures(i).Structure_Name ListBox_DVH_Struc.CellType(i,0)=2 @@ -4350,7 +4417,7 @@ End end if dd=nil Then - MsgBox "Could not create dose plane" + MessageBox "Could not create dose plane" Return end @@ -4416,11 +4483,11 @@ End Listbox_Dose_Values.DeleteAllRows Listbox_Dose_Values.ColumnCount=5 - Listbox_Dose_Values.Heading(0)="Number" - Listbox_Dose_Values.Heading(1)="Dose (Gy)" - Listbox_Dose_Values.Heading(2)="x (cm)" - Listbox_Dose_Values.Heading(3)="y (cm)" - Listbox_Dose_Values.Heading(4)="z (cm)" + Listbox_Dose_Values.HeaderAt(0)="Number" + Listbox_Dose_Values.HeaderAt(1)="Dose (Gy)" + Listbox_Dose_Values.HeaderAt(2)="x (cm)" + Listbox_Dose_Values.HeaderAt(3)="y (cm)" + Listbox_Dose_Values.HeaderAt(4)="z (cm)" count=-1 for i = 0 to UBound(Da.Dose_Distribution) @@ -4439,10 +4506,10 @@ End if value>=dmin and value<=dmax Then count=count+1 Listbox_Dose_Values.AddRow Format(count+1,"000000") - Listbox_Dose_Values.Cell(count,1)=Format(value,"-#.###") - Listbox_Dose_Values.Cell(count,2)=Format(x,"-#.###") - Listbox_Dose_Values.Cell(count,3)=Format(y,"-#.###") - Listbox_Dose_Values.Cell(count,4)=Format(z,"-#.###") + Listbox_Dose_Values.CellValueAt(count,1)=Format(value,"-#.###") + Listbox_Dose_Values.CellValueAt(count,2)=Format(x,"-#.###") + Listbox_Dose_Values.CellValueAt(count,3)=Format(y,"-#.###") + Listbox_Dose_Values.CellValueAt(count,4)=Format(z,"-#.###") end next'end h next'end k @@ -4474,8 +4541,8 @@ End dose_paint_index=old if dose_paint_index>-1 and dose_paint_index<=PopupMenu_Dose_ListStruc.ListCount Then - PopupMenu_Dose_ListStruc.ListIndex=dose_paint_index - PopupMenu_Dose_ListStruc2.ListIndex=dose_paint_index + PopupMenu_Dose_ListStruc.SelectedRowIndex=dose_paint_index + PopupMenu_Dose_ListStruc2.SelectedRowIndex=dose_paint_index end @@ -4493,25 +4560,25 @@ End Listbox_DosePoints.ColumnType(1)=3 Listbox_DosePoints.ColumnType(2)=3 Listbox_DosePoints.ColumnType(3)=3 - Listbox_DosePoints.Heading(0)="Number" - Listbox_DosePoints.Heading(1)="x (cm)" - Listbox_DosePoints.Heading(2)="y (cm)" - Listbox_DosePoints.Heading(3)="z (cm)" + Listbox_DosePoints.HeaderAt(0)="Number" + Listbox_DosePoints.HeaderAt(1)="x (cm)" + Listbox_DosePoints.HeaderAt(2)="y (cm)" + Listbox_DosePoints.HeaderAt(3)="z (cm)" count=0 for i=0 to UBound(gRTOG.Plan) for k=0 to UBound(gRTOG.Plan(i).Dose) count=count+1 Listbox_DosePoints.ColumnCount=count+4 - Listbox_DosePoints.Heading(Listbox_DosePoints.ColumnCount-1)=gRTOG.Plan(i).Dose(k).dose_name + Listbox_DosePoints.HeaderAt(Listbox_DosePoints.ColumnCount-1)=gRTOG.Plan(i).Dose(k).dose_name Next Next for i=0 to UBound(gRTOG.Points) Listbox_DosePoints.AddRow Format(i+1,"000") - Listbox_DosePoints.Cell(i,1)=Format(gRTOG.Points(i).X_cm,"-##.##") - Listbox_DosePoints.Cell(i,2)=Format(gRTOG.Points(i).y_cm,"-##.##") - Listbox_DosePoints.Cell(i,3)=Format(gRTOG.Points(i).z_cm,"-##.##") + Listbox_DosePoints.CellValueAt(i,1)=Format(gRTOG.Points(i).X_cm,"-##.##") + Listbox_DosePoints.CellValueAt(i,2)=Format(gRTOG.Points(i).y_cm,"-##.##") + Listbox_DosePoints.CellValueAt(i,3)=Format(gRTOG.Points(i).z_cm,"-##.##") Next @@ -4560,7 +4627,7 @@ End end count=count+1 - Listbox_DosePoints.Cell(m,count+4)=Format(gRTOG.Plan(i).Dose(k).Points(m).value,"-##.####") + Listbox_DosePoints.CellValueAt(m,count+4)=Format(gRTOG.Plan(i).Dose(k).Points(m).value,"-##.####") Next Next Next @@ -4594,10 +4661,10 @@ End ListBox_Struc.columnwidths="60%,10%,15%,15%" - ListBox_Struc.heading(0)="Structure" - ListBox_Struc.heading(1)=" " - ListBox_Struc.Heading(2)="Fill" - ListBox_Struc.heading(3)="Show" + ListBox_Struc.HeaderAt(0)="Structure" + ListBox_Struc.HeaderAt(1)=" " + ListBox_Struc.HeaderAt(2)="Fill" + ListBox_Struc.HeaderAt(3)="Show" ListBox_Struc.deleteAllRows @@ -4632,8 +4699,8 @@ End ListBox_MC_Cutout.columnwidths="30%,70%" - ListBox_MC_Cutout.Heading(0)="Calculate Beam" - ListBox_MC_Cutout.Heading(1)="Cutout Progress" + ListBox_MC_Cutout.HeaderAt(0)="Calculate Beam" + ListBox_MC_Cutout.HeaderAt(1)="Cutout Progress" ListBox_MC_Cutout.DeleteAllRows k=plan_index @@ -4667,7 +4734,7 @@ End ListBox_MC_DOS.DeleteAllRows ListBox_MC_DOS.ColumnCount=UBound(gDOSXYZ.DOSXYZ)+2 - ListBox_MC_DOS.Heading(0)="Beam Number" + ListBox_MC_DOS.HeaderAt(0)="Beam Number" length= p.Graphics.StringWidth("Beam Number")+50 @@ -4675,8 +4742,8 @@ End for i =0 to UBound(gDOSXYZ.DOSXYZ) - ListBox_MC_DOS.Heading(i+1)=gDOSXYZ.dosxyz(i).egsphantsettings.name +" ("+Format(gDOSXYZ.DOSXYZ(i).Complete,"#.#")+")" - length= p.Graphics.StringWidth(ListBox_MC_DOS.Heading(i+1))+50 + ListBox_MC_DOS.HeaderAt(i+1)=gDOSXYZ.dosxyz(i).egsphantsettings.name +" ("+Format(gDOSXYZ.DOSXYZ(i).Complete,"#.#")+")" + length= p.Graphics.StringWidth(ListBox_MC_DOS.HeaderAt(i+1))+50 if i= UBound(gDOSXYZ.DOSXYZ) Then temp=temp+str(length) else @@ -4712,8 +4779,8 @@ End ListBox_MC_Beam.columnwidths="30%,70%" //These listboxes cause crashes-William Davis - ListBox_MC_Beam.Heading(0)="Calculate Beam" - ListBox_MC_Beam.Heading(1)="BEAMnrc Progress" + ListBox_MC_Beam.HeaderAt(0)="Calculate Beam" + ListBox_MC_Beam.HeaderAt(1)="BEAMnrc Progress" ListBox_MC_Beam.DeleteAllRows k=plan_index @@ -4739,10 +4806,10 @@ End ListBox_MC_VMC.ColumnCount=UBound(gVMC.vmc)+2 - ListBox_MC_vmc.Heading(0)="Beam Number" + ListBox_MC_vmc.HeaderAt(0)="Beam Number" for i =0 to UBound(gVMC.vmc) gVMC.VMC(i).Calculate_Complete - ListBox_MC_vmc.Heading(i+1)=gVMC.vmc(i).DMX.dmx_name+" ("+Format(gVMC.vmc(i).Complete,"#.#")+")" + ListBox_MC_vmc.HeaderAt(i+1)=gVMC.vmc(i).DMX.dmx_name+" ("+Format(gVMC.vmc(i).Complete,"#.#")+")" next ListBox_MC_vmc.DeleteAllRows j=plan_index @@ -4750,7 +4817,7 @@ End for i =0 to UBound(gRTOG.Plan(j).beam) ListBox_MC_vmc.AddRow str(i+1) for k=1 to UBound(gVMC.vmc)+1 - ListBox_MC_vmc.Cell(i,k) =Str(gVMC.vmc(k-1).BEAMS(i).progress)+" %" + ListBox_MC_vmc.CellValueAt(i,k) =Str(gVMC.vmc(k-1).BEAMS(i).progress)+" %" ListBox_MC_VMC.CellCheck(i,k)=gVMC.VMC(k-1).BEAMS(i).calculate ListBox_MC_vmc.celltype(i,k)=2 ListBox_MC_vmc.CellAlignment(i,k)=2 @@ -4772,8 +4839,8 @@ End //------------------------------------- ListBox_Dose_profiles_Result.DeleteAllRows - ListBox_Dose_profiles_Result.Heading(1)="Point 1" - ListBox_Dose_profiles_Result.Heading(2)="Point 2" + ListBox_Dose_profiles_Result.HeaderAt(1)="Point 1" + ListBox_Dose_profiles_Result.HeaderAt(2)="Point 2" @@ -4795,13 +4862,13 @@ End end ListBox_Dose_profiles_Result.AddRow name(i) ListBox_Dose_profiles_Result.CellType(i,0)=2 - ListBox_Dose_profiles_Result.Cell(i,1)=Format(gRTOG.Profiles.One_Profile(index(i)).Pointa.x_cm,"-#.##")+", "+Format(gRTOG.Profiles.One_Profile(index(i)).Pointa.y_cm,"-#.##")+", "+Format(gRTOG.Profiles.One_Profile(index(i)).Pointa.z_cm,"-#.##") - ListBox_Dose_profiles_Result.Cell(i,2)= Format(gRTOG.Profiles.One_Profile(index(i)).Pointb.x_cm,"-#.##")+", "+Format(gRTOG.Profiles.One_Profile(index(i)).Pointb.y_cm,"-#.##")+", "+Format(gRTOG.Profiles.One_Profile(index(i)).Pointb.z_cm,"-#.##") - ListBox_Dose_profiles_Result.Cell(i,3)= Format(index(i),"#") + ListBox_Dose_profiles_Result.CellValueAt(i,1)=Format(gRTOG.Profiles.One_Profile(index(i)).Pointa.x_cm,"-#.##")+", "+Format(gRTOG.Profiles.One_Profile(index(i)).Pointa.y_cm,"-#.##")+", "+Format(gRTOG.Profiles.One_Profile(index(i)).Pointa.z_cm,"-#.##") + ListBox_Dose_profiles_Result.CellValueAt(i,2)= Format(gRTOG.Profiles.One_Profile(index(i)).Pointb.x_cm,"-#.##")+", "+Format(gRTOG.Profiles.One_Profile(index(i)).Pointb.y_cm,"-#.##")+", "+Format(gRTOG.Profiles.One_Profile(index(i)).Pointb.z_cm,"-#.##") + ListBox_Dose_profiles_Result.CellValueAt(i,3)= Format(index(i),"#") Next ListBox_Dose_profiles_Result.ColumnWidths=str(width*10)+",100,100,0" - ListBox_Dose_profiles_Result.ListIndex=0 + ListBox_Dose_profiles_Result.SelectedRowIndex=0 End Sub #tag EndMethod @@ -5126,10 +5193,10 @@ End ListBox_Plan.addfolder "" temp=NthField(s1,",",i) // Place the plan number and name - ListBox_Plan.cell(i-1,0)=NthField(temp,"%",1) - ListBox_Plan.cell(i-1,1)=NthField(sub1,";",i) + ListBox_Plan.CellValueAt(i-1,0)=NthField(temp,"%",1) + ListBox_Plan.CellValueAt(i-1,1)=NthField(sub1,";",i) //Place the plan index - ListBox_Plan.cell(i-1,2)=NthField(temp,"%",2) + ListBox_Plan.CellValueAt(i-1,2)=NthField(temp,"%",2) Next @@ -5240,12 +5307,12 @@ End Sub CollapseRow(row As Integer) Dim i,u,NSubRows,ppp_index as Integer - NSubRows=CountFields(Me.cell(row,1),",") + NSubRows=CountFields(Me.CellValueAt(row,1),",") u=row+1 For i=row+NSubRows downto u Me.removerow i Next - ppp_index=val(me.Cell(me.ListIndex,2)) + ppp_index=val(me.CellValueAt(me.SelectedRowIndex,2)) if ppp_index<=UBound(gRTOG.Plan) Then Plan_Expanded_Listbox(ppp_index)=False @@ -5256,30 +5323,30 @@ End #tag EndEvent #tag Event Sub DoubleClick() - Me.expanded(Me.listindex)=Not Me.expanded(Me.listindex) + Me.expanded(Me.SelectedRowIndex)=Not Me.expanded(Me.SelectedRowIndex) End Sub #tag EndEvent #tag Event Sub ExpandRow(row As Integer) - Dim s1,temp as String - Dim i,u, ppindex as Integer + 'Dim s1,temp as String + 'Dim i,u, ppindex as Integer - s1=me.cell(row,1) - u=CountFields(s1,",") - temp=NthField(s1,",",1) - ppindex=val(me.Cell(row,2)) + Var s1 As String = Me.CellValueAt(row,1) + Var u As Integer = CountFields(s1,",") + Var temp As String = NthField(s1,",",1) + Var ppindex As Integer = Val(Me.CellValueAt(row,2)) - For i=1 to u - temp=NthField(s1,",",i) + For i As Integer = 1 To u + temp = NthField(s1,",",i) Me.addrow "" - Me.cell(me.lastIndex,0)=NthField(temp,"%",1) + Me.CellValueAt(Me.LastRowIndex,0) = NthField(temp,"%",1) // Place Plan index - Me.Cell(me.lastIndex,2)=str(ppindex) + Me.CellValueAt(Me.LastRowIndex,2) = Str(ppindex) //Place the dose index - me.cell(me.LastIndex,3)=str(i-1) + Me.CellValueAt(Me.LastRowIndex,3) = Str(i-1) Next Plan_Expanded_Listbox(ppindex)=True @@ -5307,13 +5374,13 @@ End old=plan_index old_d=dose_index - if me.ListIndex=-1 Then + if me.SelectedRowIndex=-1 Then dose_index=-1 Return end // Find plan index - s=ListBox_Plan.Cell(ListBox_Plan.ListIndex,2) + s=ListBox_Plan.CellValueAt(ListBox_Plan.SelectedRowIndex,2) if len(s)=0 Then temp_plan_index=-1 else @@ -5336,8 +5403,8 @@ End if temp_plan_index<>Plan_Index Then //Loop to find old plan index for i=0 to ListBox_Plan.ListCount-1 - if val(ListBox_Plan.Cell(i,2))=old Then - ListBox_Plan.ListIndex=i + if val(ListBox_Plan.CellValueAt(i,2))=old Then + ListBox_Plan.SelectedRowIndex=i Return end next @@ -5346,7 +5413,7 @@ End 'FInd dose index - s=ListBox_Plan.Cell(ListBox_Plan.ListIndex,3) + s=ListBox_Plan.CellValueAt(ListBox_Plan.SelectedRowIndex,3) if len(s)=0 Then dose_index=-1 else @@ -5445,7 +5512,7 @@ End #tag Event Function CellTextPaint(g As Graphics, row As Integer, column As Integer, x as Integer, y as Integer) As Boolean - if len(me.Cell(row,3))>0 then + if len(me.CellValueAt(row,3))>0 then g.foreColor=rgb(102,30,31) else g.foreColor=rgb(0,0,255) @@ -5454,56 +5521,167 @@ End #tag EndEvent #tag Event Function KeyDown(Key As String) As Boolean - Dim i as Integer - Dim s as String + ''Dim i as Integer + ''Dim s as String + ' + 'If Key = Chr(127) Or Key = Chr(8) Then + ' + 'If dose_index> -1 Then // "Dose Delete" + 'If Plan_Index> -1 And Plan_Index <= gRTOG.Plan.LastRowIndex Then + 'If dose_index<=UBound(gRTOG.Plan(Plan_Index).Dose) Then + 'i=MessageBox("Delete dose : "+gRTOG.Plan(Plan_Index).Dose(dose_index).Dose_name+" ?", 1,"Warning" ) + 'if i=1 Then + 'if gPref.DVH_clean Then + 'gDVH.Delete_DVH_Set(gRTOG.Plan(Plan_Index).Dose(dose_index).Dose_name) + 'Dose_DVH + 'end + 'gRTOG.Plan(Plan_Index).Delete_Dose(plan_index, dose_index) + 'Window_Treatment.dose_index=-1 + 'Window_Treatment.window_update_plan + 'Window_Treatment.beam_update_beam + 'end + 'end + 'end + ' + 'else //Plan Delete" + ' + 'if uBound(MMCTP_Shell_Refresh.All)<>-1 or uBound(MMCTP_Shell_Run.All)<>-1 Then + 'MessageBox "Can not delete plan while SSH shell is still running" + 'Return True + 'end + ' + 'if UBound(MMCTP_Download.All)<>-1 Then + 'MessageBox "Can not delete plan while FTP shell is still running" + 'Return True + 'end + ' + 'i=MessageBox("Are you sure you want to delete Plan "+chr(13)+gRTOG.Plan(Plan_Index).Plan_ID +" "+gRTOG.Plan(Plan_Index).Plan_Name+"?",1,"Warning") + ' + 'if i=1 Then + 'if Plan_Index>-1 and Plan_Index<=UBound(gRTOG.Plan) Then + 'gRTOG.Delete_Plan(Plan_Index) + 'Plan_Expanded_Listbox.Remove Plan_Index + 'Plan_Index=-1 + 'window_update_plan + 'beam_update_beam + 'end + 'end + ' + ' + ' + 'end + 'end + - if Key=Chr(127) or Key=Chr(8) Then + 'Dim i as Integer + 'Dim s as String + + If Key = Chr(127) Or Key = Chr(8) Then - if dose_index>-1 Then // "Dose Delete" - if Plan_Index>-1 and Plan_Index<=UBound(gRTOG.Plan) Then - if dose_index<=UBound(gRTOG.Plan(Plan_Index).Dose) Then - i=MsgBox("Delete dose : "+gRTOG.Plan(Plan_Index).Dose(dose_index).Dose_name+" ?", 1,"Warning" ) - if i=1 Then - if gPref.DVH_clean Then + If dose_index> -1 Then // "Dose Delete" + + If Plan_Index> -1 And Plan_Index <= gRTOG.Plan.LastRowIndex Then + + If dose_index <= gRTOG.Plan(Plan_Index).Dose.LastRowIndex Then + + Var d As New MessageDialog // declare the MessageDialog object + Var b As MessageDialogButton // for handling the result + d.Icon = MessageDialog.GraphicCaution // display warning icon + d.ActionButton.Caption = "Save" + d.CancelButton.Visible = True // show the Cancel button + d.AlternateActionButton.Visible = True // show the "Don't Save" button + d.AlternateActionButton.Caption = "Don't Save" + d.Message = "Delete dose : " _ + + gRTOG.Plan(Plan_Index).Dose(dose_index).Dose_name + " ?" + 'd.Explanation = "If you don't save, your changes will be lost. " + + b = d.ShowModal // display the dialog + Select Case b // determine which button was pressed. + Case d.ActionButton + + + If gPref.DVH_clean Then + gDVH.Delete_DVH_Set(gRTOG.Plan(Plan_Index).Dose(dose_index).Dose_name) Dose_DVH - end + + End If + gRTOG.Plan(Plan_Index).Delete_Dose(plan_index, dose_index) Window_Treatment.dose_index=-1 Window_Treatment.window_update_plan Window_Treatment.beam_update_beam - end - end - end - - else //Plan Delete" - - if uBound(MMCTP_Shell_Refresh.All)<>-1 or uBound(MMCTP_Shell_Run.All)<>-1 Then - MsgBox "Can not delete plan while SSH shell is still running" - Return True - end + + Case d.AlternateActionButton + // user pressed Don't Save + Case d.CancelButton + // user pressed Cancel + End Select + + + + + End If + + End If - if UBound(MMCTP_Download.All)<>-1 Then - MsgBox "Can not delete plan while FTP shell is still running" - Return True - end + End If + + + Else //Plan Delete" + + If MMCTP_Shell_Refresh.All.LastRowIndex <> -1 Or _ + MMCTP_Shell_Run.All.LastRowIndex <> -1 Then - i=MsgBox("Are you sure you want to delete Plan "+chr(13)+gRTOG.Plan(Plan_Index).Plan_ID +" "+gRTOG.Plan(Plan_Index).Plan_Name+"?",1,"Warning") + MessageBox "Can not delete plan while SSH shell is still running" + Return True - if i=1 Then - if Plan_Index>-1 and Plan_Index<=UBound(gRTOG.Plan) Then - gRTOG.Delete_Plan(Plan_Index) - Plan_Expanded_Listbox.Remove Plan_Index - Plan_Index=-1 - window_update_plan - beam_update_beam - end - end + End If + + If MMCTP_Download.All.LastRowIndex <> -1 Then + MessageBox "Can not delete plan while FTP shell is still running" + Return True + End + + Var d As New MessageDialog // declare the MessageDialog object + Var b As MessageDialogButton // for handling the result + d.Icon = MessageDialog.GraphicCaution // display warning icon + d.ActionButton.Caption = "Delete" + d.CancelButton.Visible = True // show the Cancel button + d.AlternateActionButton.Visible = True // show the "Don't Save" button + d.AlternateActionButton.Caption = "Don't Delete" + d.Message = "Are you sure you want to delete Plan " _ + + Chr(13) + gRTOG.Plan(Plan_Index).Plan_ID + " " _ + + gRTOG.Plan(Plan_Index).Plan_Name + "?" + + 'd.Explanation = "If you don't save, your changes will be lost. " + + b = d.ShowModal // display the dialog + Select Case b // determine which button was pressed. + Case d.ActionButton + // user pressed Save + If Plan_Index > -1 And Plan_Index <= gRTOG.Plan.LastRowIndex Then + + gRTOG.Delete_Plan(Plan_Index) + Plan_Expanded_Listbox.Remove Plan_Index + Plan_Index = -1 + window_update_plan + beam_update_beam + + End If - end - end + Case d.AlternateActionButton + // user pressed Don't Save + Case d.CancelButton + // user pressed Cancel + End Select + + + End If + + End Function #tag EndEvent #tag EndEvents @@ -5619,7 +5797,7 @@ End gRTOG.Plan(plan_index).Add_Beam Case "Delete Beam" - if ListBox_Beam.ListIndex>-1 and UBound(MMCTP_Shell_Refresh.All) =-1 and UBound(MMCTP_Shell_Run.All) =-1 then + if ListBox_Beam.SelectedRowIndex>-1 and UBound(MMCTP_Shell_Refresh.All) =-1 and UBound(MMCTP_Shell_Run.All) =-1 then for i=me.ListCount DownTo 0 if me.Selected(i) Then gRTOG.Plan(plan_index).Delete_Beam(i) @@ -5628,7 +5806,7 @@ End MC_Save_settings elseif UBound(MMCTP_Shell_Refresh.All) >-1 or UBound(MMCTP_Shell_Run.All) >-1 Then - MsgBox "Can not delete while shell is active" + MessageBox "Can not delete while shell is active" end Case "Copy Beam" @@ -5695,7 +5873,7 @@ End #tag EndEvent #tag Event Sub Change() - RTOGBeam_Index=me.ListIndex + RTOGBeam_Index=me.SelectedRowIndex if DoNothing=False Then if app.which_window_3d Then @@ -5744,13 +5922,13 @@ End g.ForeColor=RGB(255,0,0) g.fillrect 0,0, g.width, g.height if pro= -1 then - me.Cell(row,column) ="Not Started" + me.CellValueAt(row,column) ="Not Started" elseif pro=100 then - me.Cell(row,1) ="Complete" + me.CellValueAt(row,1) ="Complete" elseif gBEAM.Beams(row).Beamnrc_error Then - me.Cell(row,1) ="BEAMnrc simulation error" + me.CellValueAt(row,1) ="BEAMnrc simulation error" else - me.Cell(row,1) =Format(pro,"#.#")+" %" + me.CellValueAt(row,1) =Format(pro,"#.#")+" %" end g.ForeColor=RGB(0,255,0) g.fillrect 0,0, g.width*pro/100, g.height @@ -5780,7 +5958,7 @@ End Dim i, k, index as Integer - index=me.ListIndex + index=me.SelectedRowIndex if Plan_Index>=0 and gBEAM.State=4 Then if index>=0 and index<= UBound(gRTOG.Plan(Plan_Index).Beam) Then Window_BEAM_Options.Show @@ -5871,7 +6049,7 @@ End row=Me.RowFromXY(System.MouseX - Me.Left - Self.Left,System.MouseY - Me.Top - Self.Top) column=Me.ColumnFromXY(System.MouseX - Me.Left - Self.Left,System.MouseY - Me.Top - Self.Top) - //MsgBox "You double-clicked in cell "+Str(row)+", "+Str(column) + //MessageBox "You double-clicked in cell "+Str(row)+", "+Str(column) if Plan_Index>=0 Then @@ -5982,7 +6160,7 @@ End for i=Window_Treatment.ListBox_Dose_profiles_Result.ListCount-1 DownTo 0 if Window_Treatment.ListBox_Dose_profiles_Result.CellCheck(i,0) Then - k=val(ListBox_Dose_profiles_Result.Cell(i,3) ) + k=val(ListBox_Dose_profiles_Result.CellValueAt(i,3) ) gRTOG.Profiles.One_Profile.Remove k end next @@ -6164,14 +6342,14 @@ End if gDOSXYZ.DOSXYZ(column-1).DOSXYZ_Input(Row).dos_simulation_error=False Then pro=gDOSXYZ.DOSXYZ(column-1).DOSXYZ_Input(Row).dos_progress - me.Cell(row,column) =Format(pro,"#.##")+" %" + me.CellValueAt(row,column) =Format(pro,"#.##")+" %" g.ForeColor=RGB(255,0,0) g.fillrect 0,0, g.width, g.height g.ForeColor=RGB(0,255,0) g.fillrect 0,0, Round(g.width*pro/100), g.height else - me.Cell(row,column) ="DOSXYZnrc Simulation error !" + me.CellValueAt(row,column) ="DOSXYZnrc Simulation error !" g.ForeColor=RGB(255,255,0) g.fillrect 0,0, g.width, g.height @@ -6199,10 +6377,10 @@ End Dim row,column as Integer //------------------------------------------ - row=me.ListIndex + row=me.SelectedRowIndex column=Me.User_column - //MsgBox "You double-clicked in cell row "+Str(row)+", column "+Str(column) + //MessageBox "You double-clicked in cell row "+Str(row)+", column "+Str(column) if column>0 Then @@ -6276,7 +6454,7 @@ End Case"3ddose to MMCTP" - Beam=me.ListIndex + Beam=me.SelectedRowIndex if Plan_Index>=0 Then gDOSXYZ.dosxyz_AddDose=True @@ -6416,7 +6594,7 @@ End Select Case hitItem.Text Case "Selecte all column" - sname=me.Heading(DVH_Column) + sname=me.HeaderAt(DVH_Column) for i=0 to me.ListCount-1 me.CellCheck(i,DVH_Column)=True Next @@ -6517,7 +6695,7 @@ End for i=0 to ubound(grtog.Structures.Structures) if Window_Treatment.ListBox_DVH_Graphs.CellCheck(i,k) then for x=0 to UBound(gDVH.All_DVH) - if gDVH.All_DVH(x).Name=Window_Treatment.ListBox_DVH_Graphs.Heading(k) and _ + if gDVH.All_DVH(x).Name=Window_Treatment.ListBox_DVH_Graphs.HeaderAt(k) and _ gDVH.All_DVH(x).struc_names=grtog.Structures.Structures(i).Structure_Name Then gDVH.Delete_DVH(x) Exit @@ -6943,13 +7121,13 @@ End g.ForeColor=RGB(255,0,0) g.fillrect 0,0, g.width, g.height if pro= -1 then - me.Cell(row,column) ="Not Started" + me.CellValueAt(row,column) ="Not Started" elseif pro=100 then - me.Cell(row,1) ="Complete" + me.CellValueAt(row,1) ="Complete" elseif gCutout.Beams(row).error Then - me.Cell(row,1) ="Cutout simulation error" + me.CellValueAt(row,1) ="Cutout simulation error" else - me.Cell(row,1) =Format(pro,"#.#")+" %" + me.CellValueAt(row,1) =Format(pro,"#.#")+" %" end g.ForeColor=RGB(0,255,0) g.fillrect 0,0, g.width*pro/100, g.height @@ -6968,7 +7146,7 @@ End Dim i, k, index as Integer - index=me.ListIndex + index=me.SelectedRowIndex if Plan_Index>=0 and gCutout.State=4 Then if index>=0 and index<= UBound(gRTOG.Plan(Plan_Index).Beam) Then Window_Cutout_Options.Show @@ -7086,11 +7264,11 @@ End if column=1 Then - gRTOG.Points(row).X_cm=val(me.Cell(row,column)) + gRTOG.Points(row).X_cm=val(me.CellValueAt(row,column)) elseif column=2 Then - gRTOG.Points(row).y_cm=val(me.Cell(row,column)) + gRTOG.Points(row).y_cm=val(me.CellValueAt(row,column)) elseif column=3 Then - gRTOG.Points(row).z_cm=val(me.Cell(row,column)) + gRTOG.Points(row).z_cm=val(me.CellValueAt(row,column)) end @@ -7110,7 +7288,7 @@ End #tag Events PopupMenu_Dose_ListStruc2 #tag Event Sub Change() - dose_paint_index=me.ListIndex + dose_paint_index=me.SelectedRowIndex End Sub #tag EndEvent #tag EndEvents @@ -7139,7 +7317,7 @@ End if RadioButton_Norm_MaxDose.Value Then Nornum=1/gRTOG.Plan(Plan_Index).Dose(dose_index).dmax elseif RadioButton_Norm_Struc.Value Then - sindex=PopupMenu_Dose_ListStruc2.ListIndex + sindex=PopupMenu_Dose_ListStruc2.SelectedRowIndex if sindex>-1 and sindex<=UBound(grtog.Structures.Structures) Then kk=gDVH.Calculate_DVH(sindex,Plan_Index,dose_index,True) temp=gRTOG.Plan(Plan_Index).Plan_ID+String_Separate+gRTOG.Plan(Plan_Index).Dose(dose_index).dose_name @@ -7154,12 +7332,12 @@ End Next if kk=False Then - MsgBox "Error : Can not find DVH "+temp + MessageBox "Error : Can not find DVH "+temp Return end else - MsgBox "Error : structure selected" + MessageBox "Error : structure selected" Return end @@ -7167,7 +7345,7 @@ End if RTOGBeam_Index>-1 and RTOGBeam_Index<=UBound(gRTOG.Plan(Plan_Index).Beam) Then Nornum=RTOG_Dose_Interpolate(gRTOG.Plan(Plan_Index).Beam(RTOGBeam_Index).Collimator.fields(0).isocenter.x,gRTOG.Plan(Plan_Index).Beam(RTOGBeam_Index).Collimator.fields(0).isocenter.y,gRTOG.Plan(Plan_Index).Beam(RTOGBeam_Index).Collimator.fields(0).isocenter.z, gRTOG.Plan(Plan_Index).Dose(dose_index)) else - MsgBox "Error : no beam selected" + MessageBox "Error : no beam selected" Return end Elseif RadioButton_Nor_DValue.Value Then @@ -7199,7 +7377,7 @@ End value=val(EditField_Dose_SetValue.Text) - sindex=PopupMenu_Dose_ListStruc.ListIndex + sindex=PopupMenu_Dose_ListStruc.SelectedRowIndex if sindex>=0 and sindex<=UBound(grtog.Structures.Structures) Then @@ -7311,7 +7489,7 @@ End #tag Events PopupMenu_Dose_ListStruc #tag Event Sub Change() - dose_paint_index=me.ListIndex + dose_paint_index=me.SelectedRowIndex End Sub #tag EndEvent #tag EndEvents diff --git a/Utility/App.xojo_code b/Utility/App.xojo_code index 96e142f..3a15548 100644 --- a/Utility/App.xojo_code +++ b/Utility/App.xojo_code @@ -148,11 +148,11 @@ Inherits Application #tag Event Function UnhandledException(error As RuntimeException) As Boolean If error IsA OutOfBoundsException Then - MsgBox("An OutOfBounds Exception has occurred") + MessageBox("An OutOfBounds Exception has occurred") Elseif error IsA OutOfMemoryException Then - MsgBox("An OutOf Memory Exception has occurred") + MessageBox("An OutOf Memory Exception has occurred") Else - MsgBox("An error has occured : "+error.Reason) + MessageBox("An error has occured : "+error.Reason) End End Function #tag EndEvent @@ -556,7 +556,7 @@ Inherits Application else PW_Show=false - MsgBox "Unable to import file "+f.Name+" as RTDose" + MessageBox "Unable to import file "+f.Name+" as RTDose" Return yy end @@ -605,7 +605,7 @@ Inherits Application else PW_Show=false - MsgBox "Unable to import file "+f.Name+" as RT Plan" + MessageBox "Unable to import file "+f.Name+" as RT Plan" Return yy end End Function @@ -1373,7 +1373,7 @@ Inherits Application Else - MsgBox "Error, could not find User folder"+Chr(13)+"Goodbye" + MessageBox "Error, could not find User folder"+Chr(13)+"Goodbye" Quit End diff --git a/Utility/Class_Linacs.xojo_code b/Utility/Class_Linacs.xojo_code index 763e761..c1fb9ba 100644 --- a/Utility/Class_Linacs.xojo_code +++ b/Utility/Class_Linacs.xojo_code @@ -181,7 +181,7 @@ Protected Class Class_Linacs if f.Exists=False then Return - MsgBox "Could not find file : "+f.Name + MessageBox "Could not find file : "+f.Name end diff --git a/Utility/Class_MMCTP_Timer_Windows.xojo_code b/Utility/Class_MMCTP_Timer_Windows.xojo_code index 4e719a0..35aa5f3 100644 --- a/Utility/Class_MMCTP_Timer_Windows.xojo_code +++ b/Utility/Class_MMCTP_Timer_Windows.xojo_code @@ -17,7 +17,7 @@ Inherits Timer ss=ss+Errors(0)+chr(13) Errors.Remove(0) Wend - MsgBox ss + MessageBox ss end @@ -29,7 +29,7 @@ Inherits Timer ss=ss+App.Error_Msg(0)+chr(13) App.Error_Msg.Remove(0) Wend - MsgBox ss + MessageBox ss end diff --git a/Utility/Class_Preference.xojo_code b/Utility/Class_Preference.xojo_code index 7398397..14d282e 100644 --- a/Utility/Class_Preference.xojo_code +++ b/Utility/Class_Preference.xojo_code @@ -6,7 +6,7 @@ Protected Class Class_Preference // FIND config folder, reset all folder paths // // Alexander 2011 - // Update MsgBox for confi folder + // Update MessageBox for confi folder //------------------- Dim fi as FolderItem Dim eb as Boolean @@ -30,7 +30,7 @@ Protected Class Class_Preference if fi.Exists Then Config_fi=fi else // Could not find Configurations folder - //MsgBox("MMCTP not installed. Application could not find folder : "+fi.Name+chr(13)+"At location : "+fi.ShellPath) + //MessageBox("MMCTP not installed. Application could not find folder : "+fi.Name+chr(13)+"At location : "+fi.ShellPath) //Quit end @@ -45,7 +45,7 @@ Protected Class Class_Preference // FIND MMCTP Main folder // // A Alexander 2012 - // Update MsgBox for main folder location + // Update MessageBox for main folder location //------------------------------------------------- Var fi,b,c As FolderItem //--------------------------------------------------- @@ -58,7 +58,7 @@ Protected Class Class_Preference If b= Nil Then - MsgBox("MMCTP not installed. The folder called 'McGill Medical Physics' was not found within applications folder " +fi.name+ ". Nil object returned.") + MessageBox("MMCTP not installed. The folder called 'McGill Medical Physics' was not found within applications folder " +fi.name+ ". Nil object returned.") Quit Else @@ -67,7 +67,7 @@ Protected Class Class_Preference If c=Nil Then - MsgBox("MMCTP not installed. The folder called MMCTP was not found within applications folder " +b.name+ ". Nil object returned.") + MessageBox("MMCTP not installed. The folder called MMCTP was not found within applications folder " +b.name+ ". Nil object returned.") Quit Else @@ -93,20 +93,20 @@ Protected Class Class_Preference #Else - MsgBox("OS not determined!") + MessageBox("OS not determined!") Quit #EndIf If b=Nil Then - MsgBox("MMCTP not installed. The folder called MMCTP was not found within applications folder " +fi.name+ ". Nil object returned.") + MessageBox("MMCTP not installed. The folder called MMCTP was not found within applications folder " +fi.name+ ". Nil object returned.") Quit End If b.Exists=False Then - MsgBox("MMCTP not installed, app folder at location "+b.ShellPath+" does not exist") + MessageBox("MMCTP not installed, app folder at location "+b.ShellPath+" does not exist") Quit Else diff --git a/Utility/Class_Shell_One.xojo_code b/Utility/Class_Shell_One.xojo_code index 5a4ac97..e812687 100644 --- a/Utility/Class_Shell_One.xojo_code +++ b/Utility/Class_Shell_One.xojo_code @@ -24,7 +24,7 @@ Protected Class Class_Shell_One command="sbatch "+inputfile+ " -srun" Else - MsgBox "Error: No command line for batch = "+batch + MessageBox "Error: No command line for batch = "+batch End Return command diff --git a/Utility/Shell_MMCTP_Download.xojo_code b/Utility/Shell_MMCTP_Download.xojo_code index a0de2e3..6c08fe0 100644 --- a/Utility/Shell_MMCTP_Download.xojo_code +++ b/Utility/Shell_MMCTP_Download.xojo_code @@ -24,7 +24,7 @@ Inherits Shell // Error Check if ErrorCode=255 Then - MsgBox "Shell Error code : "+s + MessageBox "Shell Error code : "+s ReDim All(-1) Return end @@ -161,7 +161,7 @@ Inherits Shell pscp=gShells.pscp+"\pscp.exe" f=new FolderItem (pscp) if f.Exists=False Then - MsgBox "pscp not found at : "+pscp + MessageBox "pscp not found at : "+pscp close Kill_All Return diff --git a/Utility/Shell_MMCTP_Refresh.xojo_code b/Utility/Shell_MMCTP_Refresh.xojo_code index 84ef484..c423441 100644 --- a/Utility/Shell_MMCTP_Refresh.xojo_code +++ b/Utility/Shell_MMCTP_Refresh.xojo_code @@ -24,7 +24,7 @@ Inherits Shell // Error Check if ErrorCode=255 Then - MsgBox "Shell Error code : "+s + MessageBox "Shell Error code : "+s ReDim All(-1) Return end @@ -218,7 +218,7 @@ Inherits Shell plink=gShells.plink+"\plink.exe" f=new FolderItem (plink) if f.Exists=False Then - MsgBox "plink not found at : "+plink + MessageBox "plink not found at : "+plink close Kill_All Return @@ -227,7 +227,7 @@ Inherits Shell pscp=gShells.pscp+"\pscp.exe" f=new FolderItem (pscp) if f.Exists=False Then - MsgBox "pscp not found at : "+pscp + MessageBox "pscp not found at : "+pscp close Kill_All Return @@ -436,7 +436,7 @@ Inherits Shell // Error Check if ErrorCode=255 Then // Time-out error code - //MsgBox "Shell Error code : "+s + //MessageBox "Shell Error code : "+s for i=0 to UBound(gShells.Shells) if gShells.Shells(i).title=all(0).shell.title and all(0).shell.title<>"8CORE" Then gShells.Shells(i).online=False diff --git a/Utility/Shell_MMCTP_Run.xojo_code b/Utility/Shell_MMCTP_Run.xojo_code index 23cd881..88a9466 100644 --- a/Utility/Shell_MMCTP_Run.xojo_code +++ b/Utility/Shell_MMCTP_Run.xojo_code @@ -25,7 +25,7 @@ Inherits Shell // Error Check if ErrorCode=255 Then - MsgBox "Shell Error code : "+s + MessageBox "Shell Error code : "+s ReDim All(-1) Return end @@ -603,7 +603,7 @@ Inherits Shell // Error Check if ErrorCode=255 Then // Time-out error code - //MsgBox "Shell Error code : "+s + //MessageBox "Shell Error code : "+s for i=0 to UBound(gShells.Shells) if gShells.Shells(i).title=all(0).shell.title and all(0).shell.title<>"8CORE" Then gShells.Shells(i).online=False diff --git a/Utility/Window_Configurations_Beam_Model.xojo_window b/Utility/Window_Configurations_Beam_Model.xojo_window index 618d92b..4175f04 100644 --- a/Utility/Window_Configurations_Beam_Model.xojo_window +++ b/Utility/Window_Configurations_Beam_Model.xojo_window @@ -2654,11 +2654,11 @@ End for i =0 to UBound(Linac.Applicator) Listbox_Linac_applicators.AddRow str(i+1) - Listbox_Linac_applicators.Cell(i,1)= Linac.Applicator(i) + Listbox_Linac_applicators.CellValueAt(i,1)= Linac.Applicator(i) Listbox_Linac_applicators.CellType(i,1)=3 - Listbox_Linac_applicators.Cell(i,2)= Linac.BEAMnrcApplicatorCM(i) + Listbox_Linac_applicators.CellValueAt(i,2)= Linac.BEAMnrcApplicatorCM(i) Listbox_Linac_applicators.CellType(i,2)=3 - Listbox_Linac_applicators.Cell(i,3)= Linac.BEAMnrcApplicatorLabel(i) + Listbox_Linac_applicators.CellValueAt(i,3)= Linac.BEAMnrcApplicatorLabel(i) Listbox_Linac_applicators.CellType(i,3)=3 next End Sub @@ -2676,8 +2676,8 @@ End DoNothing=True - old_mode=PopupMenu_Linac_Mode_Top.ListIndex - old_linac_mode=PopupMenu_Linac_Mode.ListIndex + old_mode=PopupMenu_Linac_Mode_Top.SelectedRowIndex + old_linac_mode=PopupMenu_Linac_Mode.SelectedRowIndex PopupMenu_Linac_Mode.DeleteAllRows PopupMenu_Linac_Mode_Top.DeleteAllRows @@ -2698,12 +2698,12 @@ End DoNothing=False if Linac_Mode_Change=False Then if old_mode>-1 and old_mode<=PopupMenu_Linac_Mode_Top.ListCount Then - PopupMenu_Linac_Mode_Top.ListIndex=old_mode + PopupMenu_Linac_Mode_Top.SelectedRowIndex=old_mode else - PopupMenu_Linac_Mode_Top.ListIndex=0 + PopupMenu_Linac_Mode_Top.SelectedRowIndex=0 end else - PopupMenu_Linac_Mode_Top.ListIndex=old_linac_mode + PopupMenu_Linac_Mode_Top.SelectedRowIndex=old_linac_mode end End Sub @@ -2723,7 +2723,7 @@ End DoNothing=True old_name=PopupMenu_Linac_Energy.Text - old_index=PopupMenu_Linac_Energy.ListIndex + old_index=PopupMenu_Linac_Energy.SelectedRowIndex PopupMenu_Linac_Energy.DeleteAllRows @@ -2740,13 +2740,13 @@ End if Linac_Energy_Change=False Then for i = 1 to PopupMenu_Linac_Energy.ListCount if PopupMenu_Linac_Energy.List(i-1)=old_name Then - PopupMenu_Linac_Energy.ListIndex=i-1 + PopupMenu_Linac_Energy.SelectedRowIndex=i-1 Return end next - PopupMenu_Linac_Energy.ListIndex=0 + PopupMenu_Linac_Energy.SelectedRowIndex=0 else - PopupMenu_Linac_Energy.ListIndex=old_index + PopupMenu_Linac_Energy.SelectedRowIndex=old_index end End Sub #tag EndMethod @@ -2777,7 +2777,7 @@ End old_name=PopupMenu_Linac_Name.Text - old_index=PopupMenu_Linac_Name.ListIndex + old_index=PopupMenu_Linac_Name.SelectedRowIndex PopupMenu_Linac_Name.DeleteAllRows @@ -2804,14 +2804,14 @@ End if Name_Change=False Then for i = 1 to PopupMenu_Linac_Name.ListCount if PopupMenu_Linac_Name.List(i-1)=old_name Then - PopupMenu_Linac_Name.ListIndex=i-1 + PopupMenu_Linac_Name.SelectedRowIndex=i-1 Return end next - PopupMenu_Linac_Name.ListIndex=0 + PopupMenu_Linac_Name.SelectedRowIndex=0 else - PopupMenu_Linac_Name.ListIndex=old_index + PopupMenu_Linac_Name.SelectedRowIndex=old_index end End Sub @@ -2841,20 +2841,20 @@ End ListBox_Linacs_MC.ColumnType(4)=3 - ListBox_Linacs_MC.Heading(0)="Shell" - ListBox_Linacs_MC.Heading(1)="BEAMnrc folder name" - ListBox_Linacs_MC.Heading(2)="DOSXYZnrc dose value" - ListBox_Linacs_MC.Heading(3)="VMC dose value" - ListBox_Linacs_MC.Heading(4)="BEAMnrc phsp file name" + ListBox_Linacs_MC.HeaderAt(0)="Shell" + ListBox_Linacs_MC.HeaderAt(1)="BEAMnrc folder name" + ListBox_Linacs_MC.HeaderAt(2)="DOSXYZnrc dose value" + ListBox_Linacs_MC.HeaderAt(3)="VMC dose value" + ListBox_Linacs_MC.HeaderAt(4)="BEAMnrc phsp file name" ListBox_Linacs_MC.ColumnWidths="20%,20%,20%,20%,20%" if Linac<> Nil Then for i=0 to UBound(Linac.MC_BEAMnrc_path) ListBox_Linacs_MC.AddRow gShells.Shells(i).title - ListBox_Linacs_MC.Cell(i,1) = Linac.MC_BEAMnrc_path(i) - ListBox_Linacs_MC.Cell(i,2)=Format(Linac.MC_dosxyz_dose(i),"-#.######e") - ListBox_Linacs_MC.Cell(i,3)=Format(Linac.MC_VMC_dose(i),"-#.######e") - ListBox_Linacs_MC.Cell(i,4)=Linac.MC_BEAMnrc_phsp_file(i) + ListBox_Linacs_MC.CellValueAt(i,1) = Linac.MC_BEAMnrc_path(i) + ListBox_Linacs_MC.CellValueAt(i,2)=Format(Linac.MC_dosxyz_dose(i),"-#.######e") + ListBox_Linacs_MC.CellValueAt(i,3)=Format(Linac.MC_VMC_dose(i),"-#.######e") + ListBox_Linacs_MC.CellValueAt(i,4)=Linac.MC_BEAMnrc_phsp_file(i) Next @@ -2868,7 +2868,7 @@ End for i=1 to PopupMenu_Linac_Mode.ListCount if Linac.Mode=PopupMenu_Linac_Mode.List(i-1) Then - PopupMenu_Linac_Mode.ListIndex=i-1 + PopupMenu_Linac_Mode.SelectedRowIndex=i-1 exit for i end next @@ -2908,12 +2908,12 @@ End for i=0 to UBound(gLinacs.All_MLCs) PopupMenu_Linac_MLC.AddRow gLinacs.All_MLCs(i).MLC_Name next - PopupMenu_Linac_MLC.ListIndex=0 + PopupMenu_Linac_MLC.SelectedRowIndex=0 if Linac.MLC.MLC_Use=1 Then for i=0 to UBound(gLinacs.All_MLCs) if Linac.MLC.MLC_Name=gLinacs.All_MLCs(i).MLC_Name Then - PopupMenu_Linac_MLC.ListIndex=i+1 + PopupMenu_Linac_MLC.SelectedRowIndex=i+1 exit end next @@ -2922,17 +2922,17 @@ End Listbox_Linac_applicators.DeleteAllRows - Listbox_Linac_applicators.Heading(0)="Number" - Listbox_Linac_applicators.Heading(1)="Size #x#" - Listbox_Linac_applicators.Heading(2)="BEAMnrc CM name" - Listbox_Linac_applicators.Heading(3)="BEAMnrc CM label" + Listbox_Linac_applicators.HeaderAt(0)="Number" + Listbox_Linac_applicators.HeaderAt(1)="Size #x#" + Listbox_Linac_applicators.HeaderAt(2)="BEAMnrc CM name" + Listbox_Linac_applicators.HeaderAt(3)="BEAMnrc CM label" EditField_Linac_App.value = str(UBound(Linac.Applicator)+1) Linac_Applicator EditField_Linac_Num_Wedge.value = str(UBound(Linac.Wedges)+1) Linac_Pop_PhotonWedges - PopupMenu_Linac_Wedge.ListIndex=0 + PopupMenu_Linac_Wedge.SelectedRowIndex=0 end DoNothing=False @@ -2952,8 +2952,8 @@ End DoNothing=True PopupMenu_Linac_Wedge.DeleteAllRows - Listbox_Linac_Wedge.Heading(0)="Index" - Listbox_Linac_Wedge.Heading(1)="Orientation" + Listbox_Linac_Wedge.HeaderAt(0)="Index" + Listbox_Linac_Wedge.HeaderAt(1)="Orientation" for i =0 to UBound(Linac.Wedges) PopupMenu_Linac_Wedge.AddRow str(i+1)+" - "+Linac.Wedges(i).Angle next @@ -2965,13 +2965,13 @@ End Sub Linac_Pop_PhotonWedgesOri() Dim i,w as Integer - i=PopupMenu_Linac_Wedge.ListIndex + i=PopupMenu_Linac_Wedge.SelectedRowIndex Listbox_Linac_Wedge.DeleteAllRows if i>=0 and i<=UBound(Linac.Wedges) Then for w =0 to UBound(Linac.Wedges(i).Rotations) Listbox_Linac_Wedge.AddRow str(w+1) - Listbox_Linac_Wedge.Cell(w,1)= Linac.Wedges(i).Rotations(w) + Listbox_Linac_Wedge.CellValueAt(w,1)= Linac.Wedges(i).Rotations(w) Listbox_Linac_Wedge.CellType(w,1)= 3 next @@ -2986,11 +2986,11 @@ End DoNothing=True Listbox_MLC.DeleteAllRows - Listbox_MLC.Heading(0)="Bounds" - Listbox_MLC.Heading(1)="Value (cm)" + Listbox_MLC.HeaderAt(0)="Bounds" + Listbox_MLC.HeaderAt(1)="Value (cm)" MLC= new Class_Linacs_MLC - oldi=PopupMenu_MLC_All.ListIndex + oldi=PopupMenu_MLC_All.SelectedRowIndex PopupMenu_MLC_All.DeleteAllRows for i =0 to UBound(gLinacs.All_MLCs) @@ -3000,9 +3000,9 @@ End DoNothing=False if oldi>-1 and oldi<=UBound(gLinacs.All_MLCs) Then - PopupMenu_MLC_All.ListIndex=oldi + PopupMenu_MLC_All.SelectedRowIndex=oldi elseif PopupMenu_MLC_All.ListCount>=0 Then - PopupMenu_MLC_All.ListIndex=0 + PopupMenu_MLC_All.SelectedRowIndex=0 end End Sub @@ -3019,7 +3019,7 @@ End if MLC.Type=0 Then for i=0 to UBound(mlc.Boundaries) Listbox_MLC.AddRow str(i+1) - Listbox_MLC.Cell(i,1)=str(mlc.Boundaries(i)) + Listbox_MLC.CellValueAt(i,1)=str(mlc.Boundaries(i)) Listbox_MLC.CellType(i,1)=3 next @@ -3028,7 +3028,7 @@ End for i=0 to UBound(mlc.Boundaries) Listbox_MLC.AddRow str(i+1) - Listbox_MLC.Cell(i,1)=str(mlc.Boundaries(i)) + Listbox_MLC.CellValueAt(i,1)=str(mlc.Boundaries(i)) Listbox_MLC.CellType(i,1)=3 next @@ -3162,17 +3162,17 @@ End end if column=1 Then - Linac.MC_BEAMnrc_path(row)=me.Cell(row,1) + Linac.MC_BEAMnrc_path(row)=me.CellValueAt(row,1) elseif column=2 Then - Linac.MC_dosxyz_dose(row)=val(me.Cell(row,2)) + Linac.MC_dosxyz_dose(row)=val(me.CellValueAt(row,2)) elseif column=3 Then - Linac.MC_VMC_dose(row)=val(me.Cell(row,3)) + Linac.MC_VMC_dose(row)=val(me.CellValueAt(row,3)) elseif column=4 Then - Linac.MC_BEAMnrc_phsp_file(row)=Trim(me.Cell(row,4)) + Linac.MC_BEAMnrc_phsp_file(row)=Trim(me.CellValueAt(row,4)) end @@ -3252,7 +3252,7 @@ End end Next Linac_Pop_PhotonWedges - PopupMenu_Linac_Wedge.ListIndex=0 + PopupMenu_Linac_Wedge.SelectedRowIndex=0 end save_linac=True end @@ -3263,10 +3263,10 @@ End #tag Event Sub CellTextChange(row as Integer, column as Integer) Dim i as Integer - i=PopupMenu_Linac_Wedge.ListIndex + i=PopupMenu_Linac_Wedge.SelectedRowIndex if i>=0 and i<=UBound(Linac.Wedges) Then - Linac.Wedges(i).Rotations(row)=Trim(me.Cell(row,column)) + Linac.Wedges(i).Rotations(row)=Trim(me.CellValueAt(row,column)) save_linac=True end End Sub @@ -3280,11 +3280,11 @@ End if DoNothing=False Then Linac_Wedge_Edit=True - i=PopupMenu_Linac_Wedge.ListIndex + i=PopupMenu_Linac_Wedge.SelectedRowIndex if i>=0 and i<=UBound(Linac.Wedges) Then Linac.Wedges(i).Angle=Trim(me.Text) Linac_Pop_PhotonWedges - PopupMenu_Linac_Wedge.ListIndex=i + PopupMenu_Linac_Wedge.SelectedRowIndex=i end Linac_Wedge_Edit=False save_linac=True @@ -3298,7 +3298,7 @@ End Dim w,i as Integer - w=me.ListIndex + w=me.SelectedRowIndex if w>=0 and w<=UBound(Linac.Wedges) Then EditField_Linac_Wedge_Orientations.value = str(UBound(Linac.Wedges(w).Rotations)+1) if Linac_Wedge_Edit=False Then @@ -3316,7 +3316,7 @@ End if DoNothing=False Then kk=val(me.Text) - i=PopupMenu_Linac_Wedge.ListIndex + i=PopupMenu_Linac_Wedge.SelectedRowIndex if i>=0 and i<= UBound(Linac.Wedges) Then ReDim Linac.Wedges(i).Rotations(kk-1) @@ -3356,11 +3356,11 @@ End if i>=0 and i<=UBound(Linac.Applicator) Then if column=1 Then - Linac.Applicator(i)=Trim(me.Cell(row,column)) + Linac.Applicator(i)=Trim(me.CellValueAt(row,column)) elseif column=2 Then - Linac.BEAMnrcApplicatorCM(i)=Trim(me.Cell(row,column)) + Linac.BEAMnrcApplicatorCM(i)=Trim(me.CellValueAt(row,column)) elseif column=3 Then - Linac.BEAMnrcApplicatorLabel(i)=Trim(me.Cell(row,column)) + Linac.BEAMnrcApplicatorLabel(i)=Trim(me.CellValueAt(row,column)) end end End Sub @@ -3395,7 +3395,7 @@ End #tag Event Sub CellTextChange(row as Integer, column as Integer) if column=1 Then - mlc.Boundaries(row)=val(me.Cell(row,column)) + mlc.Boundaries(row)=val(me.CellValueAt(row,column)) end End Sub #tag EndEvent @@ -3487,7 +3487,7 @@ End Sub Change() Dim i as Integer - i=me.ListIndex + i=me.SelectedRowIndex if DoNothing=False Then if i>-1 and i<=UBound(gLinacs.All_MLCs) Then MLC=gLinacs.All_MLCs(i) @@ -3517,7 +3517,7 @@ End Sub Action() Dim i as Integer - i=PopupMenu_MLC_All.ListIndex + i=PopupMenu_MLC_All.SelectedRowIndex if i>=0 and i<=UBound(gLinacs.All_MLCs) Then gLinacs.All_MLCs.Remove (i) @@ -3533,7 +3533,7 @@ End Sub Change() Dim i as Integer - i=me.ListIndex-1 + i=me.SelectedRowIndex-1 if DoNothing=False Then if i>-1 and i<=UBound(gLinacs.All_MLCs) Then Linac.MLC.MLC_Name=gLinacs.All_MLCs(i).MLC_Name diff --git a/Utility/Window_Configurations_CTModels.xojo_window b/Utility/Window_Configurations_CTModels.xojo_window index b9c47fc..d3124c1 100644 --- a/Utility/Window_Configurations_CTModels.xojo_window +++ b/Utility/Window_Configurations_CTModels.xojo_window @@ -541,11 +541,11 @@ End PopupMenu_CT_Model.SelectedRowIndex = 0 - Listbox_CT_Materials.Heading(0)="Material" - Listbox_CT_Materials.Heading(1)="HU Low" - Listbox_CT_Materials.Heading(2)="HU High" - Listbox_CT_Materials.Heading(3)="Density Low (g/cc)" - Listbox_CT_Materials.Heading(4)="Density High (g/cc)" + Listbox_CT_Materials.HeaderAt(0)="Material" + Listbox_CT_Materials.HeaderAt(1)="HU Low" + Listbox_CT_Materials.HeaderAt(2)="HU High" + Listbox_CT_Materials.HeaderAt(3)="Density Low (g/cc)" + Listbox_CT_Materials.HeaderAt(4)="Density High (g/cc)" DoNothing=False @@ -716,9 +716,9 @@ End end Name_Change=True CT_Model.Model_name=me.Text - i=PopupMenu_CT_Model.ListIndex + i=PopupMenu_CT_Model.SelectedRowIndex CT_Open - PopupMenu_CT_Model.ListIndex=i + PopupMenu_CT_Model.SelectedRowIndex=i Name_Change=False Save_Model=True End Sub @@ -812,7 +812,7 @@ End Sub Action() DIm i as Integer - i=PopupMenu_CT_Model.ListIndex + i=PopupMenu_CT_Model.SelectedRowIndex if i>=0 and i<=UBound(gCT.All_CT) Then gCT.All_CT.Remove i diff --git a/Utility/Window_Configurations_DOSXYZnrcSettings.xojo_window b/Utility/Window_Configurations_DOSXYZnrcSettings.xojo_window index 3ca1148..d252fa9 100644 --- a/Utility/Window_Configurations_DOSXYZnrcSettings.xojo_window +++ b/Utility/Window_Configurations_DOSXYZnrcSettings.xojo_window @@ -1263,12 +1263,12 @@ End - Listbox_MC_DOSMat.Heading(0)="Material" - Listbox_MC_DOSMat.Heading(1)="Density" + Listbox_MC_DOSMat.HeaderAt(0)="Material" + Listbox_MC_DOSMat.HeaderAt(1)="Density" if gDOSXYZ<> nil Then Listbox_MC_DOS_Egsphant.DeleteAllRows - Listbox_MC_DOS_Egsphant.Heading(0)="Properties" + Listbox_MC_DOS_Egsphant.HeaderAt(0)="Properties" Listbox_MC_DOS_Egsphant.AddRow "EGSPhant Name" Listbox_MC_DOS_Egsphant.AddRow "CT Ramp Index" Listbox_MC_DOS_Egsphant.AddRow "Outside Material" @@ -1341,25 +1341,25 @@ End ss="33%" Listbox_MC_DOS_Egsphant.ColumnCount=UBound(gDOSXYZ.Auto_EGSPhantSettings)+2 for i=0 to UBound(gDOSXYZ.Auto_EGSPhantSettings) - Listbox_MC_DOS_Egsphant.Cell(0,i+1)= gDOSXYZ.Auto_EGSPhantSettings(i).Name + Listbox_MC_DOS_Egsphant.CellValueAt(0,i+1)= gDOSXYZ.Auto_EGSPhantSettings(i).Name Listbox_MC_DOS_Egsphant.CellType(0,i+1)=3 - Listbox_MC_DOS_Egsphant.Cell(1,i+1)= str(gDOSXYZ.Auto_EGSPhantSettings(i).CT_model+1) + Listbox_MC_DOS_Egsphant.CellValueAt(1,i+1)= str(gDOSXYZ.Auto_EGSPhantSettings(i).CT_model+1) Listbox_MC_DOS_Egsphant.CellType(1,i+1)=3 - Listbox_MC_DOS_Egsphant.Cell(2,i+1)= gDOSXYZ.Auto_EGSPhantSettings(i).Clean_material + Listbox_MC_DOS_Egsphant.CellValueAt(2,i+1)= gDOSXYZ.Auto_EGSPhantSettings(i).Clean_material Listbox_MC_DOS_Egsphant.CellType(2,i+1)=3 - Listbox_MC_DOS_Egsphant.Cell(3,i+1)= gDOSXYZ.Auto_EGSPhantSettings(i).Cleancontour_Name + Listbox_MC_DOS_Egsphant.CellValueAt(3,i+1)= gDOSXYZ.Auto_EGSPhantSettings(i).Cleancontour_Name Listbox_MC_DOS_Egsphant.CellType(3,i+1)=3 - Listbox_MC_DOS_Egsphant.Cell(4,i+1)= Format(gDOSXYZ.Auto_EGSPhantSettings(i).Del_X,"-#.####") + Listbox_MC_DOS_Egsphant.CellValueAt(4,i+1)= Format(gDOSXYZ.Auto_EGSPhantSettings(i).Del_X,"-#.####") Listbox_MC_DOS_Egsphant.CellType(4,i+1)=3 - Listbox_MC_DOS_Egsphant.Cell(5,i+1)= Format(gDOSXYZ.Auto_EGSPhantSettings(i).Del_Y,"-#.####") + Listbox_MC_DOS_Egsphant.CellValueAt(5,i+1)= Format(gDOSXYZ.Auto_EGSPhantSettings(i).Del_Y,"-#.####") Listbox_MC_DOS_Egsphant.CellType(5,i+1)=3 - Listbox_MC_DOS_Egsphant.Cell(6,i+1)= Format(gDOSXYZ.Auto_EGSPhantSettings(i).Del_Z,"-#.####") + Listbox_MC_DOS_Egsphant.CellValueAt(6,i+1)= Format(gDOSXYZ.Auto_EGSPhantSettings(i).Del_Z,"-#.####") Listbox_MC_DOS_Egsphant.CellType(6,i+1)=3 Listbox_MC_DOS_Egsphant.CellCheck(7,i+1)= gDOSXYZ.Auto_EGSPhantSettings(i).Auto_Make @@ -1380,7 +1380,7 @@ End for i=0 to UBound(gDOSXYZ.dosxyz_materials) Listbox_MC_DOSMat.AddRow gDOSXYZ.dosxyz_materials(i).Material_Name - Listbox_MC_DOSMat.Cell(i,1) =str(gDOSXYZ.dosxyz_materials(i).Material_Density) + Listbox_MC_DOSMat.CellValueAt(i,1) =str(gDOSXYZ.dosxyz_materials(i).Material_Density) if i>0 Then Listbox_MC_DOSMat.CellType(i,0)=3 @@ -1527,22 +1527,22 @@ End if column-1>=0 and column-1<=UBound(gDOSXYZ.Auto_EGSPhantSettings) Then if row=0 Then - gDOSXYZ.Auto_EGSPhantSettings(column-1).Name=Trim(me.Cell(row,column)) + gDOSXYZ.Auto_EGSPhantSettings(column-1).Name=Trim(me.CellValueAt(row,column)) elseif row=1 Then - gDOSXYZ.Auto_EGSPhantSettings(column-1).CT_model=val(me.Cell(row,column))-1 + gDOSXYZ.Auto_EGSPhantSettings(column-1).CT_model=val(me.CellValueAt(row,column))-1 elseif row=2 Then - gDOSXYZ.Auto_EGSPhantSettings(column-1).Clean_material=Trim(me.Cell(row,column)) + gDOSXYZ.Auto_EGSPhantSettings(column-1).Clean_material=Trim(me.CellValueAt(row,column)) elseif row=3 Then - gDOSXYZ.Auto_EGSPhantSettings(column-1).Cleancontour_Name=Trim(me.Cell(row,column)) + gDOSXYZ.Auto_EGSPhantSettings(column-1).Cleancontour_Name=Trim(me.CellValueAt(row,column)) elseif row=4 Then - gDOSXYZ.Auto_EGSPhantSettings(column-1).Del_X=val(me.Cell(row,column)) + gDOSXYZ.Auto_EGSPhantSettings(column-1).Del_X=val(me.CellValueAt(row,column)) elseif row=5 Then - gDOSXYZ.Auto_EGSPhantSettings(column-1).Del_y=val(me.Cell(row,column)) + gDOSXYZ.Auto_EGSPhantSettings(column-1).Del_y=val(me.CellValueAt(row,column)) elseif row=6 Then - gDOSXYZ.Auto_EGSPhantSettings(column-1).Del_z=val(me.Cell(row,column)) + gDOSXYZ.Auto_EGSPhantSettings(column-1).Del_z=val(me.CellValueAt(row,column)) end @@ -1723,9 +1723,9 @@ End if row>=0 and row<=UBound(gDOSXYZ.dosxyz_materials) Then if column=0 Then - gDOSXYZ.dosxyz_materials(row).Material_Name=Trim(me.Cell(row,column)) + gDOSXYZ.dosxyz_materials(row).Material_Name=Trim(me.CellValueAt(row,column)) elseif column=1 Then - gDOSXYZ.dosxyz_materials(row).Material_Density=val(me.Cell(row,column)) + gDOSXYZ.dosxyz_materials(row).Material_Density=val(me.CellValueAt(row,column)) end gDOSXYZ.dosxyz_Writematerials @@ -1764,7 +1764,7 @@ End Case "Delete row" - i=me.ListIndex + i=me.SelectedRowIndex if i>0 Then if me.Selected(i) Then gDOSXYZ.dosxyz_materials.Remove i diff --git a/Utility/Window_Configurations_Shell.xojo_window b/Utility/Window_Configurations_Shell.xojo_window index a424174..6b0ee9a 100644 --- a/Utility/Window_Configurations_Shell.xojo_window +++ b/Utility/Window_Configurations_Shell.xojo_window @@ -4040,7 +4040,7 @@ End PopupMenu_Shell.AddRow gShells.shells(i).title Next PopupMenu_Shell.AddRow "Add new Shell" - PopupMenu_Shell.ListIndex=0 + PopupMenu_Shell.SelectedRowIndex=0 PopupMenu_Batch.DeleteAllRows PopupMenu_Batch.AddRow "at" @@ -4118,7 +4118,7 @@ End If ss.batch="at" Then PopupMenu_Batch.SelectedRowIndex = 0 - + Elseif ss.batch="nqs" Then PopupMenu_Batch.SelectedRowIndex=1 @@ -4278,7 +4278,7 @@ End Sub Action() DIm i as Integer - i=PopupMenu_Shell.ListIndex + i=PopupMenu_Shell.SelectedRowIndex if i>=0 and i<=UBound(gShells.Shells) Then gShells.Shells.Remove i @@ -4331,9 +4331,9 @@ End end Name_Change=True ss.title=me.Text - i=PopupMenu_Shell.ListIndex + i=PopupMenu_Shell.SelectedRowIndex Login_Open - PopupMenu_Shell.ListIndex=i + PopupMenu_Shell.SelectedRowIndex=i Name_Change=False Save_Login=True @@ -4625,14 +4625,14 @@ End f=gPref.Settings_fi f=f.Child("MMCTP-FTP-Test") if f= Nil Then - MsgBox("Error 1: Could not create FTP test file") + MessageBox("Error 1: Could not create FTP test file") Return end ts=f.CreateTextFile if ts=nil Then - MsgBox("Error 2: Could not create FTP test file") + MessageBox("Error 2: Could not create FTP test file") Return end @@ -4677,7 +4677,7 @@ End end if Name_Change=False Then - i=me.ListIndex + i=me.SelectedRowIndex if i>=0 and i<= UBound(ss.Queue) Then EditField_QueueName.value = ss.Queue(i) EditField_QueueName1.value = Str(ss.QueueTime(i)) @@ -4693,12 +4693,12 @@ End Dim i as Integer if DoNothing=False Then - i=PopupMenu_Shell_Queue.ListIndex + i=PopupMenu_Shell_Queue.SelectedRowIndex if i>=0 and i<= UBound(ss.Queue) Then Name_Change=True ss.Queue(i)=me.Text Login_Popup - PopupMenu_Shell_Queue.ListIndex=i + PopupMenu_Shell_Queue.SelectedRowIndex=i Name_Change=False Save_Login=True end @@ -4773,12 +4773,12 @@ End Dim i as Integer if DoNothing=False Then - i=PopupMenu_Shell_Queue.ListIndex + i=PopupMenu_Shell_Queue.SelectedRowIndex if i>=0 and i<= UBound(ss.Queue) Then Name_Change=True ss.QueueTime(i)=val(me.Text) Login_Popup - PopupMenu_Shell_Queue.ListIndex=i + PopupMenu_Shell_Queue.SelectedRowIndex=i Name_Change=False Save_Login=True end diff --git a/Utility/Window_Configurations_TPS_System.xojo_window b/Utility/Window_Configurations_TPS_System.xojo_window index cc28a66..1603d3d 100644 --- a/Utility/Window_Configurations_TPS_System.xojo_window +++ b/Utility/Window_Configurations_TPS_System.xojo_window @@ -3159,13 +3159,13 @@ End //----------------------------- Listbox_Stat_DoseatVolume.DeleteAllRows - Listbox_Stat_DoseatVolume.Heading(0)="Dose at Volume (%)" + Listbox_Stat_DoseatVolume.HeaderAt(0)="Dose at Volume (%)" - Listbox_Stat_DoseatVolumeCC.Heading(0)="Dose at Volume (cc)" + Listbox_Stat_DoseatVolumeCC.HeaderAt(0)="Dose at Volume (cc)" Listbox_Stat_DoseatVolumeCC.DeleteAllRows - Listbox_Stat_VolumeatGY.Heading(0)="Volume at Dose (Gy)" + Listbox_Stat_VolumeatGY.HeaderAt(0)="Volume at Dose (Gy)" Listbox_Stat_VolumeatGY.DeleteAllRows if gDoseStats.MaxDose Then @@ -3245,8 +3245,8 @@ End end Listbox_DICOM_Tags.DeleteAllRows - Listbox_DICOM_Tags.Heading(0)="Tag" - Listbox_DICOM_Tags.Heading(1)="Value" + Listbox_DICOM_Tags.HeaderAt(0)="Tag" + Listbox_DICOM_Tags.HeaderAt(1)="Value" Listbox_DICOM_Tags.ColumnType(1)=3 Listbox_DICOM_Tags.AddRow("Manufacturer",gPref.Manufacturer) @@ -3643,8 +3643,8 @@ End gDoseStats.DoseVolume.append 0 Save_DoseStat=True Case "Remove" - if me.ListIndex>-1 and me.ListIndex<=UBound(gDoseStats.DoseVolume) Then - gDoseStats.DoseVolume.remove me.ListIndex + if me.SelectedRowIndex>-1 and me.SelectedRowIndex<=UBound(gDoseStats.DoseVolume) Then + gDoseStats.DoseVolume.remove me.SelectedRowIndex end Save_DoseStat=True @@ -3656,7 +3656,7 @@ End #tag EndEvent #tag Event Sub CellTextChange(row as Integer, column as Integer) - gDoseStats.DoseVolume(row)=val(me.Cell(row,column)) + gDoseStats.DoseVolume(row)=val(me.CellValueAt(row,column)) Save_DoseStat=True End Sub #tag EndEvent @@ -3685,8 +3685,8 @@ End gDoseStats.VolumeDose.append 0 Save_DoseStat=True Case "Remove" - if me.ListIndex>-1 and me.ListIndex<=UBound(gDoseStats.VolumeDose) Then - gDoseStats.VolumeDose.remove me.ListIndex + if me.SelectedRowIndex>-1 and me.SelectedRowIndex<=UBound(gDoseStats.VolumeDose) Then + gDoseStats.VolumeDose.remove me.SelectedRowIndex end Save_DoseStat=True @@ -3698,7 +3698,7 @@ End #tag EndEvent #tag Event Sub CellTextChange(row as Integer, column as Integer) - gDoseStats.VolumeDose(row)=val(me.Cell(row,column)) + gDoseStats.VolumeDose(row)=val(me.CellValueAt(row,column)) Save_DoseStat=True End Sub #tag EndEvent @@ -3751,8 +3751,8 @@ End gDoseStats.DoseatVolumecc.append 0 Save_DoseStat=True Case "Remove" - if me.ListIndex>-1 and me.ListIndex<=UBound(gDoseStats.DoseatVolumecc) Then - gDoseStats.DoseatVolumecc.remove me.ListIndex + if me.SelectedRowIndex>-1 and me.SelectedRowIndex<=UBound(gDoseStats.DoseatVolumecc) Then + gDoseStats.DoseatVolumecc.remove me.SelectedRowIndex end Save_DoseStat=True @@ -3764,7 +3764,7 @@ End #tag EndEvent #tag Event Sub CellTextChange(row as Integer, column as Integer) - gDoseStats.DoseatVolumecc(row)=val(me.Cell(row,column)) + gDoseStats.DoseatVolumecc(row)=val(me.CellValueAt(row,column)) Save_DoseStat=True End Sub #tag EndEvent @@ -3831,13 +3831,13 @@ End #tag Event Sub CellTextChange(row as Integer, column as Integer) if row=0 Then - gPref.Manufacturer=me.Cell(row,column) + gPref.Manufacturer=me.CellValueAt(row,column) elseif row=1 Then - gPref.ManufacturerName=me.Cell(row,column) + gPref.ManufacturerName=me.CellValueAt(row,column) elseif row=3 Then - gPref.SoftwareVersion=me.Cell(row,column) + gPref.SoftwareVersion=me.CellValueAt(row,column) end gPref.Write_Pref diff --git a/Utility/Window_CreatBox.xojo_window b/Utility/Window_CreatBox.xojo_window index 9724030..ee82d5a 100644 --- a/Utility/Window_CreatBox.xojo_window +++ b/Utility/Window_CreatBox.xojo_window @@ -1373,8 +1373,8 @@ End Sub Open() Listbox_Gradient.DeleteAllRows - Listbox_Gradient.Heading(0)= "Parameter" - Listbox_Gradient.Heading(1)= "Value" + Listbox_Gradient.HeaderAt(0)= "Parameter" + Listbox_Gradient.HeaderAt(1)= "Value" Listbox_Gradient.ColumnType(1)=3 Listbox_Gradient.AddRow "Initial HU value","-1000" @@ -1498,9 +1498,9 @@ End Image.voxel.Append hu next else - hu_s=val(Listbox_Gradient.Cell(0,1)) - hu_del=val(Listbox_Gradient.Cell(2,1)) - v_del=val(Listbox_Gradient.Cell(1,1)) + hu_s=val(Listbox_Gradient.CellValueAt(0,1)) + hu_del=val(Listbox_Gradient.CellValueAt(2,1)) + v_del=val(Listbox_Gradient.CellValueAt(1,1)) hu=hu_s for j=1 to ny if (j mod v_del) =0 Then diff --git a/Utility/Window_Import_Changes.xojo_window b/Utility/Window_Import_Changes.xojo_window index 82ba26e..2c27d22 100644 --- a/Utility/Window_Import_Changes.xojo_window +++ b/Utility/Window_Import_Changes.xojo_window @@ -484,7 +484,7 @@ End if Len(trim(EditField_id.Text))>=9 then - MsgBox "Patient ID is too long!" + MessageBox "Patient ID is too long!" else edit_rtog.Patient_Surname=EditField_last.Text edit_rtog.Patient_Name=EditField_first.Text diff --git a/Utility/Window_OpenPatient.xojo_window b/Utility/Window_OpenPatient.xojo_window index 5e3f336..8590918 100644 --- a/Utility/Window_OpenPatient.xojo_window +++ b/Utility/Window_OpenPatient.xojo_window @@ -416,9 +416,9 @@ End f=gPref.mcgillfi - index=Window_OpenPatient.ListBox_Mcgill.ListIndex - name=Window_OpenPatient.ListBox_Mcgill.Cell(index,0) - pindex=val(Window_OpenPatient.ListBox_Mcgill.Cell(index,4)) + index=Window_OpenPatient.ListBox_Mcgill.SelectedRowIndex + name=Window_OpenPatient.ListBox_Mcgill.CellValueAt(index,0) + pindex=val(Window_OpenPatient.ListBox_Mcgill.CellValueAt(index,4)) pname=NthField(Row_Header,",",pindex) @@ -449,9 +449,9 @@ End filter=Trim(EditField_Filter.Text) ListBox_Mcgill.DeleteAllRows - ListBox_Mcgill.Heading(0)="Forename" - ListBox_Mcgill.Heading(1)="Surname" - ListBox_Mcgill.Heading(2)="ID number" + ListBox_Mcgill.HeaderAt(0)="Forename" + ListBox_Mcgill.HeaderAt(1)="Surname" + ListBox_Mcgill.HeaderAt(2)="ID number" ListBox_Mcgill.columnwidths="34%,33%,33%" ret=gPref.Read_mcgill @@ -475,10 +475,10 @@ End if InStr(text,Filter)>0 or len(Filter)=0 Then count=count+1 ListBox_Mcgill.addfolder "" - ListBox_Mcgill.cell(count,4)=NthField(dataset,";",i) - ListBox_Mcgill.cell(count,0)=fname - ListBox_Mcgill.cell(count,1)=lname - ListBox_Mcgill.cell(count,2)=id + ListBox_Mcgill.CellValueAt(count,4)=NthField(dataset,";",i) + ListBox_Mcgill.CellValueAt(count,0)=fname + ListBox_Mcgill.CellValueAt(count,1)=lname + ListBox_Mcgill.CellValueAt(count,2)=id end end if Next @@ -502,7 +502,7 @@ End Sub CollapseRow(row As Integer) Dim i,u,NSubRows as Integer - NSubRows=CountFields(Me.cell(row,1),",") + NSubRows=CountFields(Me.CellValueAt(row,1),",") u=row+1 For i=row+NSubRows downto u @@ -512,26 +512,26 @@ End #tag EndEvent #tag Event Sub DoubleClick() - Me.expanded(Me.listindex)=Not Me.expanded(Me.listindex) + Me.expanded(Me.SelectedRowIndex)=Not Me.expanded(Me.SelectedRowIndex) Open_Patient End Sub #tag EndEvent #tag Event Sub ExpandRow(row As Integer) - Dim s1,temp as String - Dim i,u as Integer + 'Dim s1,temp As String + 'Dim i,u as Integer - s1=me.cell(row,4) - u=CountFields(s1,",") + Var s1 As String = Me.CellValueAt(row,4) + Var u As Integer = CountFields(s1,",") - For i=1 to u + For i As Integer = 1 To u Me.addrow "" - temp=NthField(s1,",",i) - Me.cell(me.lastIndex,0)=NthField(temp,"%%",1) - Me.cell(me.lastIndex,4)=NthField(temp,"%%",2) + Var temp As String = NthField(s1,",",i) + Me.CellValueAt(Me.LastRowIndex,0)=NthField(temp,"%%",1) + Me.CellValueAt(Me.LastRowIndex,4)=NthField(temp,"%%",2) Next End Sub #tag EndEvent diff --git a/Utility/Window_Transfer.xojo_window b/Utility/Window_Transfer.xojo_window index a72e9c9..c6b8bd3 100644 --- a/Utility/Window_Transfer.xojo_window +++ b/Utility/Window_Transfer.xojo_window @@ -492,9 +492,9 @@ End Window_Transfer.ListBox_import.columncount=3 Window_Transfer.ListBox_import.columnwidths="32.5%,32.5% , 35%," - Window_Transfer.ListBox_import.heading(0)= "Last" - Window_Transfer.ListBox_import.heading(1)= "First" - Window_Transfer.ListBox_import.heading(2)= "Patient ID" + Window_Transfer.ListBox_import.HeaderAt(0)= "Last" + Window_Transfer.ListBox_import.HeaderAt(1)= "First" + Window_Transfer.ListBox_import.HeaderAt(2)= "Patient ID" PW_Title="Scanning CADPLAN folder..." @@ -521,9 +521,9 @@ End //show in the listbox the ID and patient name ListBox_import.addrow NthField(patientname,"^",1)'1st name - ListBox_import.cell(thisrow,1)=NthField(patientname,"^",2)'last name - ListBox_import.cell(thisrow,2) = left(ID,7) - ListBox_import.cell(thisrow,3) = ID + ListBox_import.CellValueAt(thisrow,1)=NthField(patientname,"^",2)'last name + ListBox_import.CellValueAt(thisrow,2) = left(ID,7) + ListBox_import.CellValueAt(thisrow,3) = ID @@ -544,13 +544,13 @@ End Window_Transfer.ListBox_import.DeleteAllRows Window_Transfer.ListBox_import.columncount=2 Window_Transfer.ListBox_import.columnwidths="65%,35%," - Window_Transfer.ListBox_import.heading(0)= "Patient name" - Window_Transfer.ListBox_import.heading(1)= "Patient ID" + Window_Transfer.ListBox_import.HeaderAt(0)= "Patient name" + Window_Transfer.ListBox_import.HeaderAt(1)= "Patient ID" for i=0 to UBound(DICOM_P) Window_Transfer.ListBox_import.AddRow NthField(DICOM_P(i),"%%",1) - Window_Transfer.ListBox_import.Cell(i,1) =NthField(DICOM_P(i),"%%",2) + Window_Transfer.ListBox_import.CellValueAt(i,1) =NthField(DICOM_P(i),"%%",2) Next UpdateDICOM=False @@ -619,8 +619,8 @@ End u=CountFields(name_id,",") For i=1 to u ListBox_Mcgill.addfolder "" - ListBox_Mcgill.cell(i-1,1)=NthField(datasets,";",i) - ListBox_Mcgill.cell(i-1,0)=NthField(NthField(name_id,",",i),String_Separate,1) +" "+NthField(NthField(name_id,",",i),String_Separate,2)+ " " +NthField(NthField(name_id,",",i),String_Separate,3) + ListBox_Mcgill.CellValueAt(i-1,1)=NthField(datasets,";",i) + ListBox_Mcgill.CellValueAt(i-1,0)=NthField(NthField(name_id,",",i),String_Separate,1) +" "+NthField(NthField(name_id,",",i),String_Separate,2)+ " " +NthField(NthField(name_id,",",i),String_Separate,3) Next ListBox_Mcgill.ColumnCount=1 ListBox_Mcgill.hierarchical=true @@ -645,8 +645,8 @@ End g=gPref.rtogfi Window_Transfer.ListBox_import.columncount=2 Window_Transfer.ListBox_import.columnwidths="50%,50%," - Window_Transfer.ListBox_import.heading(0)= "Last Name" - Window_Transfer.ListBox_import.heading(1)= "First Name" + Window_Transfer.ListBox_import.HeaderAt(0)= "Last Name" + Window_Transfer.ListBox_import.HeaderAt(1)= "First Name" row=-1 for i = 1 to g.count @@ -659,7 +659,7 @@ End row=row+1 temp2=Trim(NthField(Temp,":=",2)) Window_Transfer.ListBox_import.addrow Trim(NthField(temp2,",",1)) - Window_Transfer.ListBox_import.cell(row,1)= Trim(NthField(temp2,",",2)) + Window_Transfer.ListBox_import.CellValueAt(row,1)= Trim(NthField(temp2,",",2)) exit end wend @@ -724,23 +724,24 @@ End #tag Events ListBox_Mcgill #tag Event Sub DoubleClick() - Me.expanded(Me.listindex)=Not Me.expanded(Me.listindex) + Me.expanded(Me.SelectedRowIndex)=Not Me.expanded(Me.SelectedRowIndex) End Sub #tag EndEvent #tag Event Sub ExpandRow(row As Integer) - Dim s1 as String - Dim i,u as Integer - Dim b as Boolean - Dim g as Graphics + 'Dim s1 as String + 'Dim i,u as Integer + 'Dim b as Boolean + 'Dim g as Graphics - s1=me.cell(row,1) - u=CountFields(s1,",") + Var s1 As String = Me.CellValueAt(row,1) + Var u As Integer = CountFields(s1,",") - For i=1 to u + For i As Integer = 1 To u + Me.addrow "" - Me.cell(me.lastIndex,0)=NthField(s1,",",i) + Me.CellValueAt(Me.LastRowIndex,0) = NthField(s1,",",i) Next End Sub @@ -749,7 +750,7 @@ End Sub CollapseRow(row As Integer) Dim i,j,u,NSubRows as Integer - NSubRows=CountFields(Me.cell(row,1),",") + NSubRows=CountFields(Me.CellValueAt(row,1),",") u=row+1 For i=row+NSubRows downto u @@ -900,8 +901,8 @@ End DICOM = New Thread_DICOM_Object DICOM.File= New Class_DICOM_File - Var id_string As String = ListBox_import.cell(ListBox_import.SelectedRowIndex, 1) - Var fname As String = ListBox_import.cell(ListBox_import.SelectedRowIndex, 0) + Var id_string As String = ListBox_import.CellValueAt(ListBox_import.SelectedRowIndex, 1) + Var fname As String = ListBox_import.CellValueAt(ListBox_import.SelectedRowIndex, 0) DICOM.Import_ID = id_string DICOM.Import_Name = fname Dicom.TaskNum = 1 diff --git a/VMC/Thread_VMC.xojo_code b/VMC/Thread_VMC.xojo_code index cfc9e0a..06dc1e8 100644 --- a/VMC/Thread_VMC.xojo_code +++ b/VMC/Thread_VMC.xojo_code @@ -345,36 +345,62 @@ Inherits Thread // Delete One DMX file // //----------------------------------------------------- - Dim f as FolderItem - Dim i as Integer + 'Dim f as FolderItem + 'Dim i as Integer //----------------------------------------------------- - if k>=0 and k<=UBound(VMC) Then - i=MsgBox("Are you sure you want to delete the DMX file "+chr(13)+VMC(k).DMX.dmx_name +"?",1,"Warning") - if i<>1 Then - Return - end + If k >= 0 And k <= VMC.LastRowIndex Then - f=gRTOG.Path.Child("McGill_RT") - f=f.Child(gRTOG.Patient_ID+gRTOG.StudyID+gRTOG.SeriesNumber+"_"+vmc(k).dmx.dmx_name+".dmx") - if f.Exists Then - f.Delete - end + Var d As New MessageDialog + Var b As MessageDialogButton + d.Message = "Are you sure you want to delete the DMX file " _ + + Chr(13) + VMC(k).DMX.dmx_name + "?" + d.IconType = MessageDialog.IconTypes.Caution + d.ActionButton.Caption = "Delete" + d.CancelButton.Visible = True + d.AlternateActionButton.Visible = True + d.AlternateActionButton.Caption = "Don't delete" + d.CancelButton.Visible = False + d.CancelButton.Caption = "Cancel" + + b=d.ShowModal + + Select Case b + Case d.ActionButton + + Var f As FolderItem = gRTOG.Path.Child("McGill_RT") + f=f.Child(gRTOG.Patient_ID+gRTOG.StudyID+gRTOG.SeriesNumber+"_"+vmc(k).dmx.dmx_name+".dmx") + If f.Exists Then + f.Delete + End + + f = gRTOG.Path.Child("McGill_RT") + f = f.Child(gRTOG.Patient_ID+gRTOG.StudyID+gRTOG.SeriesNumber+"_"+vmc(k).dmx.dmx_name+".hed") + If f.Exists Then + f.Delete + End + + f = gRTOG.Path.Child("McGill_RT") + f = f.Child(gRTOG.Patient_ID+gRTOG.StudyID+gRTOG.SeriesNumber+"_"+vmc(k).dmx.dmx_name+".txt") + If f.Exists Then + f.Delete + End + + vmc.Remove( k ) + + Case d.AlternateActionButton + + Return + + Case d.CancelButton + + Return + + End Select - f=gRTOG.Path.Child("McGill_RT") - f=f.Child(gRTOG.Patient_ID+gRTOG.StudyID+gRTOG.SeriesNumber+"_"+vmc(k).dmx.dmx_name+".hed") - if f.Exists Then - f.Delete - end - f=gRTOG.Path.Child("McGill_RT") - f=f.Child(gRTOG.Patient_ID+gRTOG.StudyID+gRTOG.SeriesNumber+"_"+vmc(k).dmx.dmx_name+".txt") - if f.Exists Then - f.Delete - end - vmc.Remove k end MC_Save_settings diff --git a/VMC/Window_VMC_AdvancedOptions.xojo_window b/VMC/Window_VMC_AdvancedOptions.xojo_window index 732ea86..bb42b4b 100644 --- a/VMC/Window_VMC_AdvancedOptions.xojo_window +++ b/VMC/Window_VMC_AdvancedOptions.xojo_window @@ -2794,8 +2794,8 @@ End DoNothing=True - Listbox_Irregular.Heading(0)="X" - Listbox_Irregular.Heading(1)="Y" + Listbox_Irregular.HeaderAt(0)="X" + Listbox_Irregular.HeaderAt(1)="Y" Listbox_Irregular.ColumnType(0)=3 Listbox_Irregular.ColumnType(1)=3 @@ -2919,15 +2919,15 @@ End if vmc_inputfile.PriCharge=-1 Then - PopupMenu_Charge.ListIndex=0 + PopupMenu_Charge.SelectedRowIndex=0 elseif vmc_inputfile.PriCharge=0 Then - PopupMenu_Charge.ListIndex=1 + PopupMenu_Charge.SelectedRowIndex=1 elseif vmc_inputfile.PriCharge=2 Then - PopupMenu_Charge.ListIndex=2 + PopupMenu_Charge.SelectedRowIndex=2 end - PopupMenu_Write.ListIndex=vmc_inputfile.Write3dDose+2 - PopupMenu_Norm.ListIndex=vmc_inputfile.Normtype_1 + PopupMenu_Write.SelectedRowIndex=vmc_inputfile.Write3dDose+2 + PopupMenu_Norm.SelectedRowIndex=vmc_inputfile.Normtype_1 if vmc_inputfile.num_histories<0 Then RadioButton_stat.Value=True @@ -2943,43 +2943,43 @@ End end if vmc_inputfile.DEVICETYPE=-3 Then - PopupMenu_DeviceType.ListIndex=0 + PopupMenu_DeviceType.SelectedRowIndex=0 elseif vmc_inputfile.DEVICETYPE=-2 Then - PopupMenu_DeviceType.ListIndex=1 + PopupMenu_DeviceType.SelectedRowIndex=1 elseif vmc_inputfile.DEVICETYPE=0 Then - PopupMenu_DeviceType.ListIndex=2 + PopupMenu_DeviceType.SelectedRowIndex=2 elseif vmc_inputfile.DEVICETYPE=1 Then - PopupMenu_DeviceType.ListIndex=3 + PopupMenu_DeviceType.SelectedRowIndex=3 elseif vmc_inputfile.DEVICETYPE=2 Then - PopupMenu_DeviceType.ListIndex=4 + PopupMenu_DeviceType.SelectedRowIndex=4 elseif vmc_inputfile.DEVICETYPE=3 Then - PopupMenu_DeviceType.ListIndex=5 + PopupMenu_DeviceType.SelectedRowIndex=5 elseif vmc_inputfile.DEVICETYPE=10 Then - PopupMenu_DeviceType.ListIndex=6 + PopupMenu_DeviceType.SelectedRowIndex=6 elseif vmc_inputfile.DEVICETYPE=100 Then - PopupMenu_DeviceType.ListIndex=7 + PopupMenu_DeviceType.SelectedRowIndex=7 elseif vmc_inputfile.DEVICETYPE=101 Then - PopupMenu_DeviceType.ListIndex=8 + PopupMenu_DeviceType.SelectedRowIndex=8 elseif vmc_inputfile.DEVICETYPE=110 Then - PopupMenu_DeviceType.ListIndex=9 + PopupMenu_DeviceType.SelectedRowIndex=9 elseif vmc_inputfile.DEVICETYPE=200 Then - PopupMenu_DeviceType.ListIndex=10 + PopupMenu_DeviceType.SelectedRowIndex=10 elseif vmc_inputfile.DEVICETYPE=2001 Then - PopupMenu_DeviceType.ListIndex=11 + PopupMenu_DeviceType.SelectedRowIndex=11 elseif vmc_inputfile.DEVICETYPE=202 Then - PopupMenu_DeviceType.ListIndex=12 + PopupMenu_DeviceType.SelectedRowIndex=12 elseif vmc_inputfile.DEVICETYPE=2003 Then - PopupMenu_DeviceType.ListIndex=13 + PopupMenu_DeviceType.SelectedRowIndex=13 elseif vmc_inputfile.DEVICETYPE=11 Then // Electron beam head - PopupMenu_DeviceType.ListIndex=14 + PopupMenu_DeviceType.SelectedRowIndex=14 elseif vmc_inputfile.DEVICETYPE=111 Then // Photon beam head - PopupMenu_DeviceType.ListIndex=15 + PopupMenu_DeviceType.SelectedRowIndex=15 end Listbox_Irregular.DeleteAllRows for i=0 to vmc_inputfile.IRREGULAR_Num-1 Listbox_Irregular.AddRow str(vmc_inputfile.IRREGULAR_X(i)) - Listbox_Irregular.Cell(i,1)= str(vmc_inputfile.IRREGULAR_y(i)) + Listbox_Irregular.CellValueAt(i,1)= str(vmc_inputfile.IRREGULAR_y(i)) next @@ -3048,7 +3048,7 @@ End #tag Event Sub Change() if DoNothing=False Then - vmc_inputfile.Write3dDose=PopupMenu_Write.ListIndex-2 + vmc_inputfile.Write3dDose=PopupMenu_Write.SelectedRowIndex-2 end End Sub #tag EndEvent @@ -3057,7 +3057,7 @@ End #tag Event Sub Change() if DoNothing=False Then - vmc_inputfile.Normtype_1=me.ListIndex + vmc_inputfile.Normtype_1=me.SelectedRowIndex end End Sub #tag EndEvent @@ -3259,38 +3259,38 @@ End Sub Change() if DoNothing=False Then - if PopupMenu_DeviceType.ListIndex=0 Then + if PopupMenu_DeviceType.SelectedRowIndex=0 Then vmc_inputfile.DEVICETYPE=-3 - elseif PopupMenu_DeviceType.ListIndex=1 Then + elseif PopupMenu_DeviceType.SelectedRowIndex=1 Then vmc_inputfile.DEVICETYPE=-2 - elseif PopupMenu_DeviceType.ListIndex=2 Then + elseif PopupMenu_DeviceType.SelectedRowIndex=2 Then vmc_inputfile.DEVICETYPE=0 - elseif PopupMenu_DeviceType.ListIndex=3 Then + elseif PopupMenu_DeviceType.SelectedRowIndex=3 Then vmc_inputfile.DEVICETYPE=1 - elseif PopupMenu_DeviceType.ListIndex=4 Then + elseif PopupMenu_DeviceType.SelectedRowIndex=4 Then vmc_inputfile.DEVICETYPE=2 - elseif PopupMenu_DeviceType.ListIndex=5 Then + elseif PopupMenu_DeviceType.SelectedRowIndex=5 Then vmc_inputfile.DEVICETYPE=3 - elseif PopupMenu_DeviceType.ListIndex=6 Then + elseif PopupMenu_DeviceType.SelectedRowIndex=6 Then vmc_inputfile.DEVICETYPE=10 - elseif PopupMenu_DeviceType.ListIndex=7 Then + elseif PopupMenu_DeviceType.SelectedRowIndex=7 Then vmc_inputfile.DEVICETYPE=100 - elseif PopupMenu_DeviceType.ListIndex=8 Then + elseif PopupMenu_DeviceType.SelectedRowIndex=8 Then vmc_inputfile.DEVICETYPE=101 - elseif PopupMenu_DeviceType.ListIndex= 9 Then + elseif PopupMenu_DeviceType.SelectedRowIndex= 9 Then vmc_inputfile.DEVICETYPE=110 - elseif PopupMenu_DeviceType.ListIndex=10 Then + elseif PopupMenu_DeviceType.SelectedRowIndex=10 Then vmc_inputfile.DEVICETYPE=200 - elseif PopupMenu_DeviceType.ListIndex=11 Then + elseif PopupMenu_DeviceType.SelectedRowIndex=11 Then vmc_inputfile.DEVICETYPE=2001 - elseif PopupMenu_DeviceType.ListIndex=12 Then + elseif PopupMenu_DeviceType.SelectedRowIndex=12 Then vmc_inputfile.DEVICETYPE=202 - elseif PopupMenu_DeviceType.ListIndex=13 Then + elseif PopupMenu_DeviceType.SelectedRowIndex=13 Then vmc_inputfile.DEVICETYPE=2003 - elseif PopupMenu_DeviceType.ListIndex=14 Then + elseif PopupMenu_DeviceType.SelectedRowIndex=14 Then vmc_inputfile.DEVICETYPE=11 // Beam head electron - elseif PopupMenu_DeviceType.ListIndex=15 Then + elseif PopupMenu_DeviceType.SelectedRowIndex=15 Then vmc_inputfile.DEVICETYPE=111 // Beam head photon end @@ -3309,9 +3309,9 @@ End #tag Event Sub Change() if DoNothing=False Then - if me.ListIndex=0 Then + if me.SelectedRowIndex=0 Then vmc_inputfile.PriCharge=-1 - elseif me.ListIndex=1 Then + elseif me.SelectedRowIndex=1 Then vmc_inputfile.PriCharge=0 else vmc_inputfile.PriCharge=2 @@ -3389,9 +3389,9 @@ End Sub CellTextChange(row as Integer, column as Integer) if column=0 Then - vmc_inputfile.IRREGULAR_X(row)=val(me.Cell(row,column)) + vmc_inputfile.IRREGULAR_X(row)=val(me.CellValueAt(row,column)) else - vmc_inputfile.IRREGULAR_y(row)=val(me.Cell(row,column)) + vmc_inputfile.IRREGULAR_y(row)=val(me.CellValueAt(row,column)) end diff --git a/VMC/Window_VMC_DMXSettings.xojo_window b/VMC/Window_VMC_DMXSettings.xojo_window index c26eace..8a1add6 100644 --- a/VMC/Window_VMC_DMXSettings.xojo_window +++ b/VMC/Window_VMC_DMXSettings.xojo_window @@ -1302,7 +1302,7 @@ End next - PopupMenu_CleanContour.ListIndex=DMX.Cleancontour + PopupMenu_CleanContour.SelectedRowIndex=DMX.Cleancontour Checkbox_dosxyz_Clean1.Value=DMX.Cleancontours @@ -1332,10 +1332,10 @@ End ListBox_Fill.DeleteAllRows - ListBox_Fill.heading(0)="Fill Order Large->Small" - ListBox_Fill.heading(1)="Structure Name" - ListBox_Fill.heading(2)="Use this Density else autofill" - ListBox_Fill.heading(3)="Density g/cm^3" + ListBox_Fill.HeaderAt(0)="Fill Order Large->Small" + ListBox_Fill.HeaderAt(1)="Structure Name" + ListBox_Fill.HeaderAt(2)="Use this Density else autofill" + ListBox_Fill.HeaderAt(3)="Density g/cm^3" ListBox_Fill.columntype(0)=1 @@ -1347,9 +1347,9 @@ End for i=0 to UBound(gVMC.DMXSettings.Contours) ListBox_Fill.addrow str(i+1) x=gVMC.DMXSettings.Contours(i).RTOG_Contour_Index - ListBox_Fill.Cell(i,1)=grtog.Structures.Structures(x).Structure_Name + ListBox_Fill.CellValueAt(i,1)=grtog.Structures.Structures(x).Structure_Name ListBox_Fill.CellCheck(i,2)=gVMC.DMXSettings.Contours(i).use_density - ListBox_Fill.cell(i,3)=Format(gVMC.DMXSettings.Contours(i).density,"#.###") + ListBox_Fill.CellValueAt(i,3)=Format(gVMC.DMXSettings.Contours(i).density,"#.###") next @@ -1376,7 +1376,7 @@ End if column=3 Then - dmx.Contours(row).density=val(ListBox_Fill.cell(row,3)) + dmx.Contours(row).density=val(ListBox_Fill.CellValueAt(row,3)) end end @@ -1403,14 +1403,14 @@ End Dim i as Integer Dim cc as Class_VMC_DMX_Contour - i=ListBox_Fill.ListIndex + i=ListBox_Fill.SelectedRowIndex if i>0 and i<=UBound(gVMC.DMXSettings.Contours) Then cc = new Class_VMC_DMX_Contour cc=dmx.Contours(i) dmx.Contours.Remove i dmx.Contours.Insert i-1, cc Load_listbox - ListBox_Fill.ListIndex=i-1 + ListBox_Fill.SelectedRowIndex=i-1 end End Sub @@ -1420,14 +1420,14 @@ End Dim i as Integer Dim cc as Class_VMC_DMX_Contour - i=ListBox_Fill.ListIndex + i=ListBox_Fill.SelectedRowIndex if i>=0 and i nil then //Tanner: This is necessary to avoid the nil exception as gpoly doesn't always exist for every case where Pop_Segments is called if gpoly.Struct.Structure_Data(slice) <> nil then @@ -1171,9 +1171,9 @@ End Options=1 end if PopupMenu_Segments.ListCount >= start and start <>-1 Then - PopupMenu_Segments.ListIndex=start + PopupMenu_Segments.SelectedRowIndex=start else - PopupMenu_Segments.ListIndex=0 + PopupMenu_Segments.SelectedRowIndex=0 end end end @@ -1225,7 +1225,7 @@ End // Paint the points of the contour which is selected if BevelButton_edit.Value then - gpoly.Paint_Poly(g,slice,PopupMenu_segments.ListIndex,g.Width,g.Height,Pan_X,Pan_Y,scale) + gpoly.Paint_Poly(g,slice,PopupMenu_segments.SelectedRowIndex,g.Width,g.Height,Pan_X,Pan_Y,scale) g.ForeColor=RGB(255,0,0) g.DrawRect ROI_min_X,ROI_min_Y,ROI_width,ROI_height end @@ -1496,7 +1496,7 @@ End else - Segment=PopupMenu_Segments.listIndex + Segment=PopupMenu_Segments.SelectedRowIndex buffer_offx=round((cw-gvis.nx*scale)/2+0.5*gvis.scale_width)-Pan_X buffer_offy=round((ch-gvis.ny*scale)/2+0.5*gvis.scale_height)-Pan_Y @@ -1523,7 +1523,7 @@ End if bevelButton_Edit.value=true then gPoly.scan_index =Slice - Segment=PopupMenu_segments.listIndex + Segment=PopupMenu_segments.SelectedRowIndex if Segment>=0 then if options = 1 then ' "Add Point" then @@ -1628,7 +1628,7 @@ End ch=Canvas.Height - Segment=PopupMenu_Segments.listIndex + Segment=PopupMenu_Segments.SelectedRowIndex buffer_offx=round((cw-gvis.nx*scale)/2+0.5*gvis.scale_width)-Pan_X buffer_offy=round((ch-gvis.ny*scale)/2+0.5*gvis.scale_height)-Pan_Y @@ -1795,7 +1795,7 @@ End #tag EndEvent #tag Event Sub Change() - if ListBox_Struc.ListIndex=-1 then + if ListBox_Struc.SelectedRowIndex=-1 then BevelButton_edit.Enabled=False end @@ -1823,27 +1823,45 @@ End #tag EndEvent #tag Event Function ContextualMenuAction(hitItem as MenuItem) As Boolean - Dim StructureNum,i as Integer + //Dim StructureNum,i as Integer Select Case hitItem.Text Case "Add New Structure" + gRTOG.Add_Structure Case "Delete Structure" - StructureNum=me.ListIndex - - if StructureNum>-1 and StructureNum<=UBound(grtog.Structures.Structures) Then + If Me.SelectedRowIndex > -1 And _ + Me.SelectedRowIndex <= grtog.Structures.Structures.LastRowIndex Then - i=MsgBox("Are you sure you want to delete Structure "+chr(13)+grtog.Structures.Structures(StructureNum).Structure_Name+" ?",1,"Warning") + Var d As New MessageDialog // declare the MessageDialog object + Var b As MessageDialogButton // for handling the result + d.Icon = MessageDialog.GraphicCaution // display warning icon + d.ActionButton.Caption = "Delete" + d.CancelButton.Visible = False // show the Cancel button + d.AlternateActionButton.Visible = True // show the "Don't Save" button + d.AlternateActionButton.Caption = "Don't Delete" + d.Message = "Are you sure you want To delete Structure " _ + + Chr(13) + grtog.Structures.Structures(Me.SelectedRowIndex).Structure_Name + " ?" - if i=1 Then - gRTOG.Delete_Structure(StructureNum) + b = d.ShowModal // display the dialog + + Select Case b // determine which button was pressed. + Case d.ActionButton + + gRTOG.Delete_Structure(Me.SelectedRowIndex) Window_Contouring.Pop_listbox - end - end + + Case d.AlternateActionButton + // user pressed Don't Save + Case d.CancelButton + // user pressed Cancel + End Select + + End End Select gvis.Structure_colour @@ -1855,9 +1873,9 @@ End #tag Event Sub CellTextChange(row as Integer, column as Integer) if column=0 then - grtog.Structures.Structures(row).Structure_Name=ListBox_Struc.Cell(row,column) + grtog.Structures.Structures(row).Structure_Name=ListBox_Struc.CellValueAt(row,column) elseif column=5 Then - grtog.Structures.Structures(row).ElectronDensity=val(me.Cell(row,column)) + grtog.Structures.Structures(row).ElectronDensity=val(me.CellValueAt(row,column)) end End Sub #tag EndEvent @@ -1874,9 +1892,9 @@ End if bevelButton_Edit.value =true then gpoly=new Class_Structures - if ListBox_Struc.ListIndex>-1 Then - gpoly.Load(ListBox_Struc.ListIndex) - Edit_Contour_Index=ListBox_Struc.ListIndex + if ListBox_Struc.SelectedRowIndex>-1 Then + gpoly.Load(ListBox_Struc.SelectedRowIndex) + Edit_Contour_Index=ListBox_Struc.SelectedRowIndex //CheckBox_Structures.Enabled=False //Tanner //ListBox_Struc.enabled=false //Tanner PopupMenu_segments.Enabled=true @@ -1958,10 +1976,10 @@ End temp = new RTOG_Structure_Segment gpoly.Struct.Structure_Data(slice).segments.append Temp Pop_Segments - Window_Contouring.PopupMenu_Segments.listIndex=i + Window_Contouring.PopupMenu_Segments.SelectedRowIndex=i case "Delete Segment" - i=Window_Contouring.PopupMenu_Segments.listIndex + i=Window_Contouring.PopupMenu_Segments.SelectedRowIndex if i>-1 then gpoly.Struct.Structure_Data(slice).segments.remove i Pop_Segments diff --git a/Windows Functionality Suite 2.4/InternetSession.xojo_code b/Windows Functionality Suite 2.4/InternetSession.xojo_code index 08184c6..995b048 100644 --- a/Windows Functionality Suite 2.4/InternetSession.xojo_code +++ b/Windows Functionality Suite 2.4/InternetSession.xojo_code @@ -120,11 +120,11 @@ Protected Class InternetSession raise r Exception err as TypeMismatchException - MsgBox "Tried to retype an object! "+r.Message + MessageBox "Tried to retype an object! "+r.Message Exception err as NilObjectException - MsgBox "Tried to access a Nil object! "+r.Message + MessageBox "Tried to access a Nil object! "+r.Message Exception err as RuntimeException // NOT RECOMMENDED - MsgBox "Another exception "+r.Message + MessageBox "Another exception "+r.Message From cf84ca0f375b86b5bb433b05537f90c2732aa229 Mon Sep 17 00:00:00 2001 From: wabdel Date: Thu, 23 Jul 2020 01:37:14 +0300 Subject: [PATCH 6/7] July 22 PM --- .DS_Store | Bin 6148 -> 6148 bytes 3D/Rb3DSpace.xojo_code | 216 ++--- 3D/Rb3DSpace_MMCTP.xojo_code | 216 ++--- BEAMnrc/Thread_BEAM.xojo_code | 322 +++++--- BEAMnrc/Window_BEAM_Options.xojo_window | 153 ++-- .../Window_BEAM_Phsp_Information.xojo_window | 273 +++--- Commissioning/Canvas_Plot.xojo_code | 6 +- .../Window_Commisssioning.xojo_window | 2 +- DICOM/Thread_DICOM_Object.xojo_code | 776 +++++++++--------- DOSXYZnrc/Thread_DOSXYZ.xojo_code | 20 +- ...ndow_DOSXYZ_EGSPhant_Materials.xojo_window | 2 +- ...dow_DOSXYZ_Maininputs_source10.xojo_window | 4 +- ...ndow_DOSXYZ_Maininputs_source8.xojo_window | 4 +- MERT/Window_EMET_Results.xojo_window | 6 +- MERT/Window_EMET_Run.xojo_window | 6 +- MERT/Window_EMET_Setup.xojo_window | 4 +- McGill_Cutout/Thread_Cutout.xojo_code | 14 +- Treatment Planning/Canvas_TP.xojo_code | 16 +- Treatment Planning/Window_3DView.xojo_window | 4 +- .../Window_Prescription.xojo_window | 4 +- .../Window_Treatment.xojo_window | 68 +- ...nfigurations_DOSXYZnrcSettings.xojo_window | 8 +- .../Window_Configurations_Shell.xojo_window | 4 +- ...ndow_Configurations_TPS_System.xojo_window | 12 +- VMC/Thread_VMC.xojo_code | 20 +- Visualization/Thread_Visualization.xojo_code | 10 +- Visualization/Window_Contouring.xojo_window | 22 +- 27 files changed, 1178 insertions(+), 1014 deletions(-) diff --git a/.DS_Store b/.DS_Store index e010e7cd0903a1db96f8737325be04533911b777..254823f48fb3fcdee37e3636cff5176dc66a4340 100644 GIT binary patch delta 26 icmZoMXffCj!_3t3VR9U^0i(m_iOgjzn^`&j^8)~Uc?jYF delta 26 hcmZoMXffCj!^~7yFgcFdfU#inMCLM<&8!^%`2lsE2#f## diff --git a/3D/Rb3DSpace.xojo_code b/3D/Rb3DSpace.xojo_code index 57c002b..fb17115 100644 --- a/3D/Rb3DSpace.xojo_code +++ b/3D/Rb3DSpace.xojo_code @@ -757,147 +757,147 @@ Protected Class Rb3DSpace '//check left 'if tmpsurf.Pixel(ii-1,jj).red<>255 then //means this current pixel is black but on the left it is white then close left '///------------------ - 'allx.Append (centerx-pixdx) - 'ally.Append (centery-pixdy) - 'allz.Append z1 - 'allx.Append (centerx-pixdx) - 'ally.Append (centery+pixdy) - 'allz.Append z1 - 'allx.Append (centerx-pixdx) - 'ally.Append (centery+pixdy) - 'allz.Append z2 + 'allx.addrow( centerx-pixdx) + 'ally.addrow( centery-pixdy) + 'allz.addrow( z1 ) + 'allx.addrow( centerx-pixdx) + 'ally.Addrow( centery+pixdy ) + 'allz.addrow( z1 ) + 'allx.addrow( centerx-pixdx) + 'ally.Addrow( centery+pixdy ) + 'allz.addrow( z2 ) '///------------------- - 'allx.Append (centerx-pixdx) - 'ally.Append (centery-pixdy) - 'allz.Append z2 - 'allx.Append (centerx-pixdx) - 'ally.Append (centery-pixdy) - 'allz.Append z1 - 'allx.Append (centerx-pixdx) - 'ally.Append (centery+pixdy) - 'allz.Append z2 + 'allx.addrow( centerx-pixdx) + 'ally.addrow( centery-pixdy) + 'allz.addrow( z2 ) + 'allx.addrow( centerx-pixdx) + 'ally.Addrow( centery-pixdy ) + 'allz.addrow( z1 ) + 'allx.addrow( centerx-pixdx) + 'ally.Addrow( centery+pixdy ) + 'allz.addrow( z2 ) ' 'end if ' '//check right 'if tmpsurf.Pixel(ii+1,jj).red<>255 then //means this current pixel is black but on the right it is white then close right '///------------------ - 'allx.Append (centerx+pixdx) - 'ally.Append (centery-pixdy) - 'allz.Append z1 - 'allx.Append (centerx+pixdx) - 'ally.Append (centery+pixdy) - 'allz.Append z1 - 'allx.Append (centerx+pixdx) - 'ally.Append (centery+pixdy) - 'allz.Append z2 + 'allx.addrow( centerx+pixdx) + 'ally.addrow( centery-pixdy) + 'allz.addrow( z1 ) + 'allx.addrow( centerx+pixdx) + 'ally.Addrow( centery+pixdy ) + 'allz.addrow( z1 ) + 'allx.addrow( centerx+pixdx) + 'ally.Addrow( centery+pixdy ) + 'allz.addrow( z2 ) '///------------------- - 'allx.Append (centerx+pixdx) - 'ally.Append (centery-pixdy) - 'allz.Append z2 - 'allx.Append (centerx+pixdx) - 'ally.Append (centery-pixdy) - 'allz.Append z1 - 'allx.Append (centerx+pixdx) - 'ally.Append (centery+pixdy) - 'allz.Append z2 + 'allx.addrow( centerx+pixdx) + 'ally.addrow( centery-pixdy) + 'allz.addrow( z2 ) + 'allx.addrow( centerx+pixdx) + 'ally.Addrow( centery-pixdy ) + 'allz.addrow( z1 ) + 'allx.addrow( centerx+pixdx) + 'ally.Addrow( centery+pixdy ) + 'allz.addrow( z2 ) 'end if ' ' '//check bottom 'if tmpsurf.Pixel(ii,jj+1).red<>255 then //means this current pixel is black but the bottom one is white then close bottom - 'allx.Append (centerx-pixdx) - 'ally.Append (centery-pixdy) - 'allz.Append z1 - 'allx.Append (centerx+pixdx) - 'ally.Append (centery-pixdy) - 'allz.Append z1 - 'allx.Append (centerx-pixdx) - 'ally.Append (centery-pixdy) - 'allz.Append z2 + 'allx.addrow( centerx-pixdx) + 'ally.addrow( centery-pixdy) + 'allz.addrow( z1 ) + 'allx.addrow( centerx+pixdx) + 'ally.Addrow( centery-pixdy ) + 'allz.addrow( z1 ) + 'allx.addrow( centerx-pixdx) + 'ally.Addrow( centery-pixdy ) + 'allz.addrow( z2 ) '///------------------- - 'allx.Append (centerx-pixdx) - 'ally.Append (centery-pixdy) - 'allz.Append z2 - 'allx.Append (centerx+pixdx) - 'ally.Append (centery-pixdy) - 'allz.Append z1 - 'allx.Append (centerx+pixdx) - 'ally.Append (centery-pixdy) - 'allz.Append z2 + 'allx.addrow( centerx-pixdx) + 'ally.addrow( centery-pixdy) + 'allz.addrow( z2 ) + 'allx.addrow( centerx+pixdx) + 'ally.Addrow( centery-pixdy ) + 'allz.addrow( z1 ) + 'allx.addrow( centerx+pixdx) + 'ally.Addrow( centery-pixdy ) + 'allz.addrow( z2 ) 'end if ' ' '//check top 'if tmpsurf.Pixel(ii,jj-1).red<>255 then //means this current pixel is black but on the top is white then close top - 'allx.Append (centerx-pixdx) - 'ally.Append (centery+pixdy) - 'allz.Append z1 - 'allx.Append (centerx+pixdx) - 'ally.Append (centery+pixdy) - 'allz.Append z1 - 'allx.Append (centerx-pixdx) - 'ally.Append (centery+pixdy) - 'allz.Append z2 + 'allx.addrow( centerx-pixdx) + 'ally.addrow( centery+pixdy) + 'allz.addrow( z1 ) + 'allx.addrow( centerx+pixdx) + 'ally.Addrow( centery+pixdy ) + 'allz.addrow( z1 ) + 'allx.addrow( centerx-pixdx) + 'ally.Addrow( centery+pixdy ) + 'allz.addrow( z2 ) '///------------------- - 'allx.Append (centerx-pixdx) - 'ally.Append (centery+pixdy) - 'allz.Append z2 - 'allx.Append (centerx+pixdx) - 'ally.Append (centery+pixdy) - 'allz.Append z1 - 'allx.Append (centerx+pixdx) - 'ally.Append (centery+pixdy) - 'allz.Append z2 + 'allx.addrow( centerx-pixdx) + 'ally.addrow( centery+pixdy) + 'allz.addrow( z2 ) + 'allx.addrow( centerx+pixdx) + 'ally.Addrow( centery+pixdy ) + 'allz.addrow( z1 ) + 'allx.addrow( centerx+pixdx) + 'ally.Addrow( centery+pixdy ) + 'allz.addrow( z2 ) ' 'end if ' '//check back 'if tmpsurf2.Pixel(ii,jj).red<>255 then //means this current pixel is black but on the top is white then close top ' - 'allx.Append (centerx-pixdx) - 'ally.Append (centery+pixdy) - 'allz.Append z2 - 'allx.Append (centerx-pixdx) - 'ally.Append (centery-pixdy) - 'allz.Append z2 - 'allx.Append (centerx+pixdx) - 'ally.Append (centery-pixdy) - 'allz.Append z2 + 'allx.addrow( centerx-pixdx) + 'ally.addrow( centery+pixdy) + 'allz.addrow( z2 ) + 'allx.addrow( centerx-pixdx) + 'ally.Addrow( centery-pixdy ) + 'allz.addrow( z2 ) + 'allx.addrow( centerx+pixdx) + 'ally.Addrow( centery-pixdy ) + 'allz.addrow( z2 ) '///------------------- - 'allx.Append (centerx+pixdx) - 'ally.Append (centery+pixdy) - 'allz.Append z2 - 'allx.Append (centerx-pixdx) - 'ally.Append (centery+pixdy) - 'allz.Append z2 - 'allx.Append (centerx+pixdx) - 'ally.Append (centery-pixdy) - 'allz.Append z2 + 'allx.addrow( centerx+pixdx) + 'ally.addrow( centery+pixdy) + 'allz.addrow( z2 ) + 'allx.addrow( centerx-pixdx) + 'ally.Addrow( centery+pixdy ) + 'allz.addrow( z2 ) + 'allx.addrow( centerx+pixdx) + 'ally.Addrow( centery-pixdy ) + 'allz.addrow( z2 ) 'end if ' '//check front 'if tmpsurf3.Pixel(ii,jj).red<>255 then //means this current pixel is black but the one before was white then close top ' - 'allx.Append (centerx-pixdx) - 'ally.Append (centery+pixdy) - 'allz.Append z1 - 'allx.Append (centerx-pixdx) - 'ally.Append (centery-pixdy) - 'allz.Append z1 - 'allx.Append (centerx+pixdx) - 'ally.Append (centery-pixdy) - 'allz.Append z1 + 'allx.addrow( centerx-pixdx) + 'ally.addrow( centery+pixdy) + 'allz.addrow( z1 ) + 'allx.addrow( centerx-pixdx) + 'ally.Addrow( centery-pixdy ) + 'allz.addrow( z1 ) + 'allx.addrow( centerx+pixdx) + 'ally.Addrow( centery-pixdy ) + 'allz.addrow( z1 ) '///------------------- - 'allx.Append (centerx+pixdx) - 'ally.Append (centery+pixdy) - 'allz.Append z1 - 'allx.Append (centerx-pixdx) - 'ally.Append (centery+pixdy) - 'allz.Append z1 - 'allx.Append (centerx+pixdx) - 'ally.Append (centery-pixdy) - 'allz.Append z1 + 'allx.addrow( centerx+pixdx) + 'ally.addrow( centery+pixdy) + 'allz.addrow( z1 ) + 'allx.addrow( centerx-pixdx) + 'ally.Addrow( centery+pixdy ) + 'allz.addrow( z1 ) + 'allx.addrow( centerx+pixdx) + 'ally.Addrow( centery-pixdy ) + 'allz.addrow( z1 ) ' ' ' diff --git a/3D/Rb3DSpace_MMCTP.xojo_code b/3D/Rb3DSpace_MMCTP.xojo_code index fbd6e1c..53e0a01 100644 --- a/3D/Rb3DSpace_MMCTP.xojo_code +++ b/3D/Rb3DSpace_MMCTP.xojo_code @@ -757,147 +757,147 @@ Protected Class Rb3DSpace_MMCTP '//check left 'if tmpsurf.Pixel(ii-1,jj).red<>255 then //means this current pixel is black but on the left it is white then close left '///------------------ - 'allx.Append (centerx-pixdx) - 'ally.Append (centery-pixdy) - 'allz.Append z1 - 'allx.Append (centerx-pixdx) - 'ally.Append (centery+pixdy) - 'allz.Append z1 - 'allx.Append (centerx-pixdx) - 'ally.Append (centery+pixdy) - 'allz.Append z2 + 'allx.addrow( centerx-pixdx) + 'ally.addrow( centery-pixdy) + 'allz.addrow( z1 ) + 'allx.addrow( centerx-pixdx) + 'ally.Addrow( centery+pixdy ) + 'allz.addrow( z1 ) + 'allx.addrow( centerx-pixdx) + 'ally.Addrow( centery+pixdy ) + 'allz.addrow( z2 ) '///------------------- - 'allx.Append (centerx-pixdx) - 'ally.Append (centery-pixdy) - 'allz.Append z2 - 'allx.Append (centerx-pixdx) - 'ally.Append (centery-pixdy) - 'allz.Append z1 - 'allx.Append (centerx-pixdx) - 'ally.Append (centery+pixdy) - 'allz.Append z2 + 'allx.addrow( centerx-pixdx) + 'ally.addrow( centery-pixdy) + 'allz.addrow( z2 ) + 'allx.addrow( centerx-pixdx) + 'ally.Addrow( centery-pixdy ) + 'allz.addrow( z1 ) + 'allx.addrow( centerx-pixdx) + 'ally.Addrow( centery+pixdy ) + 'allz.addrow( z2 ) ' 'end if ' '//check right 'if tmpsurf.Pixel(ii+1,jj).red<>255 then //means this current pixel is black but on the right it is white then close right '///------------------ - 'allx.Append (centerx+pixdx) - 'ally.Append (centery-pixdy) - 'allz.Append z1 - 'allx.Append (centerx+pixdx) - 'ally.Append (centery+pixdy) - 'allz.Append z1 - 'allx.Append (centerx+pixdx) - 'ally.Append (centery+pixdy) - 'allz.Append z2 + 'allx.addrow( centerx+pixdx) + 'ally.addrow( centery-pixdy) + 'allz.addrow( z1 ) + 'allx.addrow( centerx+pixdx) + 'ally.Addrow( centery+pixdy ) + 'allz.addrow( z1 ) + 'allx.addrow( centerx+pixdx) + 'ally.Addrow( centery+pixdy ) + 'allz.addrow( z2 ) '///------------------- - 'allx.Append (centerx+pixdx) - 'ally.Append (centery-pixdy) - 'allz.Append z2 - 'allx.Append (centerx+pixdx) - 'ally.Append (centery-pixdy) - 'allz.Append z1 - 'allx.Append (centerx+pixdx) - 'ally.Append (centery+pixdy) - 'allz.Append z2 + 'allx.addrow( centerx+pixdx) + 'ally.addrow( centery-pixdy) + 'allz.addrow( z2 ) + 'allx.addrow( centerx+pixdx) + 'ally.Addrow( centery-pixdy ) + 'allz.addrow( z1 ) + 'allx.addrow( centerx+pixdx) + 'ally.Addrow( centery+pixdy ) + 'allz.addrow( z2 ) 'end if ' ' '//check bottom 'if tmpsurf.Pixel(ii,jj+1).red<>255 then //means this current pixel is black but the bottom one is white then close bottom - 'allx.Append (centerx-pixdx) - 'ally.Append (centery-pixdy) - 'allz.Append z1 - 'allx.Append (centerx+pixdx) - 'ally.Append (centery-pixdy) - 'allz.Append z1 - 'allx.Append (centerx-pixdx) - 'ally.Append (centery-pixdy) - 'allz.Append z2 + 'allx.addrow( centerx-pixdx) + 'ally.addrow( centery-pixdy) + 'allz.addrow( z1 ) + 'allx.addrow( centerx+pixdx) + 'ally.Addrow( centery-pixdy ) + 'allz.addrow( z1 ) + 'allx.addrow( centerx-pixdx) + 'ally.Addrow( centery-pixdy ) + 'allz.addrow( z2 ) '///------------------- - 'allx.Append (centerx-pixdx) - 'ally.Append (centery-pixdy) - 'allz.Append z2 - 'allx.Append (centerx+pixdx) - 'ally.Append (centery-pixdy) - 'allz.Append z1 - 'allx.Append (centerx+pixdx) - 'ally.Append (centery-pixdy) - 'allz.Append z2 + 'allx.addrow( centerx-pixdx) + 'ally.addrow( centery-pixdy) + 'allz.addrow( z2 ) + 'allx.addrow( centerx+pixdx) + 'ally.Addrow( centery-pixdy ) + 'allz.addrow( z1 ) + 'allx.addrow( centerx+pixdx) + 'ally.Addrow( centery-pixdy ) + 'allz.addrow( z2 ) 'end if ' ' '//check top 'if tmpsurf.Pixel(ii,jj-1).red<>255 then //means this current pixel is black but on the top is white then close top - 'allx.Append (centerx-pixdx) - 'ally.Append (centery+pixdy) - 'allz.Append z1 - 'allx.Append (centerx+pixdx) - 'ally.Append (centery+pixdy) - 'allz.Append z1 - 'allx.Append (centerx-pixdx) - 'ally.Append (centery+pixdy) - 'allz.Append z2 + 'allx.addrow( centerx-pixdx) + 'ally.addrow( centery+pixdy) + 'allz.addrow( z1 ) + 'allx.addrow( centerx+pixdx) + 'ally.Addrow( centery+pixdy ) + 'allz.addrow( z1 ) + 'allx.addrow( centerx-pixdx) + 'ally.Addrow( centery+pixdy ) + 'allz.addrow( z2 ) '///------------------- - 'allx.Append (centerx-pixdx) - 'ally.Append (centery+pixdy) - 'allz.Append z2 - 'allx.Append (centerx+pixdx) - 'ally.Append (centery+pixdy) - 'allz.Append z1 - 'allx.Append (centerx+pixdx) - 'ally.Append (centery+pixdy) - 'allz.Append z2 + 'allx.addrow( centerx-pixdx) + 'ally.addrow( centery+pixdy) + 'allz.addrow( z2 ) + 'allx.addrow( centerx+pixdx) + 'ally.Addrow( centery+pixdy ) + 'allz.addrow( z1 ) + 'allx.addrow( centerx+pixdx) + 'ally.Addrow( centery+pixdy ) + 'allz.addrow( z2 ) ' 'end if ' '//check back 'if tmpsurf2.Pixel(ii,jj).red<>255 then //means this current pixel is black but on the top is white then close top ' - 'allx.Append (centerx-pixdx) - 'ally.Append (centery+pixdy) - 'allz.Append z2 - 'allx.Append (centerx-pixdx) - 'ally.Append (centery-pixdy) - 'allz.Append z2 - 'allx.Append (centerx+pixdx) - 'ally.Append (centery-pixdy) - 'allz.Append z2 + 'allx.addrow( centerx-pixdx) + 'ally.addrow( centery+pixdy) + 'allz.addrow( z2 ) + 'allx.addrow( centerx-pixdx) + 'ally.Addrow( centery-pixdy ) + 'allz.addrow( z2 ) + 'allx.addrow( centerx+pixdx) + 'ally.Addrow( centery-pixdy ) + 'allz.addrow( z2 ) '///------------------- - 'allx.Append (centerx+pixdx) - 'ally.Append (centery+pixdy) - 'allz.Append z2 - 'allx.Append (centerx-pixdx) - 'ally.Append (centery+pixdy) - 'allz.Append z2 - 'allx.Append (centerx+pixdx) - 'ally.Append (centery-pixdy) - 'allz.Append z2 + 'allx.addrow( centerx+pixdx) + 'ally.addrow( centery+pixdy) + 'allz.addrow( z2 ) + 'allx.addrow( centerx-pixdx) + 'ally.Addrow( centery+pixdy ) + 'allz.addrow( z2 ) + 'allx.addrow( centerx+pixdx) + 'ally.Addrow( centery-pixdy ) + 'allz.addrow( z2 ) 'end if ' '//check front 'if tmpsurf3.Pixel(ii,jj).red<>255 then //means this current pixel is black but the one before was white then close top ' - 'allx.Append (centerx-pixdx) - 'ally.Append (centery+pixdy) - 'allz.Append z1 - 'allx.Append (centerx-pixdx) - 'ally.Append (centery-pixdy) - 'allz.Append z1 - 'allx.Append (centerx+pixdx) - 'ally.Append (centery-pixdy) - 'allz.Append z1 + 'allx.addrow( centerx-pixdx) + 'ally.addrow( centery+pixdy) + 'allz.addrow( z1 ) + 'allx.addrow( centerx-pixdx) + 'ally.Addrow( centery-pixdy ) + 'allz.addrow( z1 ) + 'allx.addrow( centerx+pixdx) + 'ally.Addrow( centery-pixdy ) + 'allz.addrow( z1 ) '///------------------- - 'allx.Append (centerx+pixdx) - 'ally.Append (centery+pixdy) - 'allz.Append z1 - 'allx.Append (centerx-pixdx) - 'ally.Append (centery+pixdy) - 'allz.Append z1 - 'allx.Append (centerx+pixdx) - 'ally.Append (centery-pixdy) - 'allz.Append z1 + 'allx.addrow( centerx+pixdx) + 'ally.addrow( centery+pixdy) + 'allz.addrow( z1 ) + 'allx.addrow( centerx-pixdx) + 'ally.Addrow( centery+pixdy ) + 'allz.addrow( z1 ) + 'allx.addrow( centerx+pixdx) + 'ally.Addrow( centery-pixdy ) + 'allz.addrow( z1 ) ' ' ' diff --git a/BEAMnrc/Thread_BEAM.xojo_code b/BEAMnrc/Thread_BEAM.xojo_code index e841d46..c987098 100644 --- a/BEAMnrc/Thread_BEAM.xojo_code +++ b/BEAMnrc/Thread_BEAM.xojo_code @@ -7,63 +7,76 @@ Inherits Thread // // //-------------------------------------- - Dim beam as integer + 'Dim beam as integer //-------------------------------------- - if egs_run1 then - egs_Run1 =False - for beam=0 to UBound(gRTOG.Plan(Plan_Index).beam) - if Window_Treatment.ListBox_MC_Beam.Cellcheck(beam,0) then + If egs_run1 Then + + egs_Run1 = False + + For beam As Integer =0 To gRTOG.Plan(Plan_Index).beam.LastRowIndex + + If Window_Treatment.ListBox_MC_Beam.Cellcheck(beam,0) Then egs_Run(beam,True) - exit - end - next + Exit + End If + Next Window_Treatment.mc_egs_Beam_Progress_update=True - elseif egs_status then + Elseif egs_status Then + egs_status=False - for beam=0 to UBound(gRTOG.Plan(Plan_Index).beam) - if egs_Refresh(beam) =False Then + + For beam As Integer = 0 To gRTOG.Plan(Plan_Index).beam.LastRowIndex + + If egs_Refresh(beam) =False Then + Exit - end - next + + End If + Next - for beam=0 to UBound(gRTOG.Plan(Plan_Index).beam) - if egs_Refresh_PhaseSpace(beam)=False Then + For beam As Integer = 0 To gRTOG.Plan(Plan_Index).beam.LastRowIndex + + If egs_Refresh_PhaseSpace(beam)=False Then + Exit - end - next + + End If + Next - elseif egs_phsp_list then + Elseif egs_phsp_list Then + egs_phsp_list=False egs_Read_Phsp_Properties(Window_BEAM_Phsp_Information.beam_index) egs_Run_beamdp(Window_BEAM_Phsp_Information.beam_index) egs_Read_all_phsp_files - elseif egs_build Then + Elseif egs_build Then + egs_build=False egs_Make_Module(Window_BEAM_Options.beam_num) + Elseif egs_exbeam Then // Run a text simulation - - elseif egs_exbeam Then // Run a text simulation egs_exbeam=False egs_Run_Test(Window_BEAM_Options.beam_num) + Elseif egs_addphsp Then - elseif egs_addphsp Then egs_addphsp=False - beam=Window_BEAM_Options.beam_num + Var beam As Integer = Window_BEAM_Options.beam_num egs_AddPhSp(beam) beams(beam).egs_progress=100 egs_Write Window_Treatment.MC_egs_beam_progress_update=True - end + + End If gTimer_Refresh.Period=1000 gTimer_Refresh.Reset @@ -73,12 +86,12 @@ Inherits Thread - Exception err as TypeMismatchException - Errors.Append "Error within BEAM thread: Tried to retype an object!" - Exception err as NilObjectException - Errors.Append "Error within BEAM thread: Tried to access a Nil object!" - Exception err as RuntimeException // NOT RECOMMENDED - Errors.Append "Error within BEAM thread: Another exception" + Exception err As TypeMismatchException + Errors.AddRow( "Error within BEAM thread: Tried to retype an object!") + 'Exception err As NilObjectException + Errors.AddRow( "Error within BEAM thread: Tried to access a Nil object!") + Exception err As RuntimeException // NOT RECOMMENDED + Errors.AddRow( "Error within BEAM thread: Another exception" ) End Sub #tag EndEvent @@ -115,60 +128,69 @@ Inherits Thread // add phase space files // //--------------------------- - Dim f as FolderItem - Dim location(-1),path,command,line,temp,egs_jobq, i_iaea , istart, iscore,file_extension as String - Dim ts as TextOutputStream - Dim i as integer - Dim good as Boolean + 'Dim f as FolderItem + 'Dim location(-1),path,command,line,temp,egs_jobq, i_iaea , istart, iscore,file_extension As String + 'Dim ts as TextOutputStream + 'Dim i as integer + 'Dim good as Boolean //---------------------------- - good=egs_get_directory(Beam) - temp=str(beam+1) - temp=MC_file_name+temp + Var good As Boolean = egs_get_directory(Beam) + Var temp As String = Str(beam+1) + temp = MC_file_name+temp // Use full path for addphsp - if egs_Addphsp_fullpath Then - temp=cc.dir+"/"+temp - end + If egs_Addphsp_fullpath Then + + temp = cc.dir+"/"+temp + + End - if gBEAM.beams(beam).egs_jobs<=1 Then + If gBEAM.beams(beam).egs_jobs <= 1 Then // do not need to addphsp for single runs Return - end + + End // Assume there are no longer any jobs running - gBEAM.Beams(beam).egs_BEAMnrc_active_jobs=0 + gBEAM.Beams(beam).egs_BEAMnrc_active_jobs = 0 - if gBEAM.Beams(beam).Inputfile.IO_OPT=4 Then + Var i_iaea As String + If gBEAM.Beams(beam).Inputfile.IO_OPT = 4 Then + i_iaea="1" - else + + Else + i_iaea="0" - end - istart="1" - iscore="1" + + End + + Var istart As String = "1" + Var iscore As String = "1" - file_extension=".egsphsp1" + Var file_extension As String = ".egsphsp1" //remove any old phsp files, addphsp and delete w files and addphsp log - line= "rm -f "+temp+file_extension+transfer_endline+_ - "addphsp "+temp+ " "+temp+" "+Format(gBEAM.beams(beam).egs_jobs,"#")+ " "+istart+" "+iscore+" "+i_iaea+" > "+temp+".addphsptxt" + Var line As String = "rm -f "+temp+file_extension+transfer_endline+_ + "addphsp " + temp + " " + temp + " "+Format(gBEAM.beams(beam).egs_jobs,"#") + " " _ + + istart+" " + iscore+" " + i_iaea+" > "+temp+".addphsptxt" //Looks to me like this is the section that runs Addphsp. In Shell Refresh, there's no evidence that this section ever happens. //Is this actually being sent to the command line? Well, obviously it's not, but is the command to make it do so here? //Alternatively, could it just run the executable? //Observations by William Davis - f=gRTOG.Plan(Plan_Index).Path - f=f.Child("j"+MC_file_name+str(Beam+1)+".addphsp") - ts=f.CreateTextFile - if ts=nil Then - Return - end + Var f As FolderItem = gRTOG.Plan(Plan_Index).Path.Child("j"+MC_file_name+Str(Beam+1)+".addphsp") + Var ts As TextOutputStream = f.CreateTextFile + + If ts = Nil Then Return + ts.Write line ts.Close - path=f.ShellPath + Var path As String = f.ShellPath // FTP addphsp line to cluster - good=egs_get_directory(Beam) + good = egs_get_directory(Beam) cc.command="put "+path+" "+cc.dir+"/"+f.Name cc.FTP_Now=True cc.egs_addphsp1=True @@ -177,21 +199,21 @@ Inherits Thread cc.FTP_Put_file=True cc.FTP_Local_Path=path cc.FTP_Remote_Path=cc.dir+"/"+f.Name - MMCTP_Shell_Refresh.All.Append cc + MMCTP_Shell_Refresh.All.AddRow( cc ) // Change mode to exe and execute good=egs_get_directory(Beam) cc.command="chmod u+x " +f.Name - MMCTP_Shell_Refresh.All.Append cc + MMCTP_Shell_Refresh.All.AddRow( cc ) // determine how to submit job to batch - good=egs_get_directory(Beam) - egs_jobq=MC_Autoqueue(10, cc.shell) - command=cc.shell.Queue_Submit(egs_jobq, f.Name) - cc.command=command - cc.egs_addphsp1=True - cc.inpfilename=MC_file_name+str(Beam+1) - MMCTP_Shell_Refresh.All.Append cc + good = egs_get_directory(Beam) + Var egs_jobq As String = MC_Autoqueue(10, cc.shell) + Var command As String = cc.shell.Queue_Submit(egs_jobq, f.Name) + cc.command = command + cc.egs_addphsp1 = True + cc.inpfilename=MC_file_name+Str(Beam+1) + MMCTP_Shell_Refresh.All.AddRow( cc ) End Sub #tag EndMethod @@ -346,7 +368,7 @@ Inherits Thread temp = MC_file_name + Str(beam+1) + "_* "+MC_file_name+temp _ + ".* "+MC_file_name+temp+"*djaws " cc.command= "rm -f "+temp - MMCTP_Shell_Run.All.Append cc + MMCTP_Shell_Run.All.Addrow( cc ) // Remove beam from database Var bb As RTOG_Beam_Geometry = gRTOG.Plan(Plan_Index).Beam(Beam) @@ -402,7 +424,7 @@ Inherits Thread Return end cc.command ="ln -s "+file_name +" "+MC_file_name+str(beam+1)+".egsphsp1" - MMCTP_Shell_Run.All.Append cc + MMCTP_Shell_Run.All.Addrow( cc ) gBEAM.beams(beam).egs_progress=100 gBEAM.beams(beam).egs_phsp_link=True gBEAM.beams(beam).egs_phsp_name=file_name @@ -530,97 +552,127 @@ Inherits Thread // Updated for DOSXYZnrc isource 20 phsp file runs 2017 //------------------------------------------------- - dim i,x as integer - dim name,energy,mode,temp as String + 'dim i,x as integer + 'dim name,energy,mode,temp as String //------------------------------------------------- - if Plan_Index<0 or Plan_Index>UBound(gRTOG.Plan) Then + If Plan_Index <0 Or Plan_Index > gRTOG.Plan.LastRowIndex Then + Return False - end + + End If - if beam<0 or beam>UBound(gRTOG.Plan(Plan_Index).Beam) Then + If beam <0 Or beam > gRTOG.Plan(Plan_Index).Beam.LastRowIndex Then + Return False - end + + End If - if Beams(beam).Beamnrc_error Then + If Beams(beam).Beamnrc_error Then + Return False - end + + End If - name=gRTOG.Plan(Plan_Index).beam(beam).rt_name - energy=gRTOG.Plan(Plan_Index).Beam(beam).beam_energy - mode=gRTOG.Plan(Plan_Index).Beam(beam).beam_mode + Var name As String = gRTOG.Plan(Plan_Index).beam(beam).rt_name + Var energy As String = gRTOG.Plan(Plan_Index).Beam(beam).beam_energy + Var mode as String = gRTOG.Plan(Plan_Index).Beam(beam).beam_mode - if beam> UBound(Beams) or beam< 0 Then + If beam > Beams.LastRowIndex Or beam< 0 Then + Return False - end + + End If - Beams(beam).egs_linac_index=-1 + Beams(beam).egs_linac_index = -1 // Update the Linac link - for i=0 to UBound(gLinacs.All_Linacs) - if mode= gLinacs.All_Linacs(i).Mode and _ - gLinacs.All_Linacs(i).RT_name =name and _ - gLinacs.All_Linacs(i).Energy = energy then - Beams(beam).egs_linac_index=i - exit for i - end - next + For i As Integer = 0 To gLinacs.All_Linacs.LastRowIndex + + If mode= gLinacs.All_Linacs(i).Mode And _ + gLinacs.All_Linacs(i).RT_name =name And _ + gLinacs.All_Linacs(i).Energy = energy Then + + Beams(beam).egs_linac_index = i + Exit For + + End If + Next - if Beams(beam).egs_linac_index=-1 Then - Errors.append "Error : beam "+str(beam+1)+" is not defined within the list of linacs" //Changed to "Errors.append" by William Davis to avert crashing due to exception + If Beams(beam).egs_linac_index=-1 Then + + Errors.append "Error : beam "+Str(beam+1)+" is not defined within the list of linacs" //Changed to "Errors.append" by William Davis to avert crashing due to exception Beams(beam).Beamnrc_error=True Return False - end + + End If - if Beams(beam).egs_Shell_Index>-1 and Beams(beam).egs_Shell_Index<=UBound(gShells.Shells) Then - cc = new Class_MMCTP_Commands + If Beams(beam).egs_Shell_Index>-1 And _ + Beams(beam).egs_Shell_Index <= gShells.Shells.LastRowIndex Then + cc = New Class_MMCTP_Commands cc.shell=gShells.Shells(Beams(beam).egs_Shell_Index) // Update the BEAMnrc directory Beams(beam).egs_BEAMnrc_dir="" - Beams(beam).egs_BEAMnrc_dir=gLinacs.All_Linacs(Beams(beam).egs_linac_index).MC_BEAMnrc_path(Beams(beam).egs_Shell_Index) - Beams(beam).egs_BEAMnrc_Source_phsp_name=gLinacs.All_Linacs(Beams(beam).egs_linac_index).MC_BEAMnrc_phsp_file(Beams(beam).egs_Shell_Index) - + Beams(beam).egs_BEAMnrc_dir = _ + gLinacs.All_Linacs(Beams(beam).egs_linac_index).MC_BEAMnrc_path(Beams(beam).egs_Shell_Index) + Beams(beam).egs_BEAMnrc_Source_phsp_name = _ + gLinacs.All_Linacs(Beams(beam).egs_linac_index).MC_BEAMnrc_phsp_file(Beams(beam).egs_Shell_Index) - if Beams(beam).egs_BEAMnrc_dir="" Then - Errors.append "Error : beam "+str(beam+1)+" is not configured on shell "+gShells.Shells(Beams(Beam).egs_Shell_Index).title //Changed to "Errors.append" by William Davis to prevent crash due to exception + If Beams(beam).egs_BEAMnrc_dir="" Then + + Errors.append "Error : beam " + Str(beam+1) + " is not configured on shell " _ + + gShells.Shells(Beams(Beam).egs_Shell_Index).title //Changed to "Errors.append" by William Davis to prevent crash due to exception Beams(beam).Beamnrc_error=True Return False - end + + End If cc.egsnrc_folder_path=gShells.Shells(Beams(beam).egs_Shell_Index).egsnrc_folder_path - if cc.shell.OS=3 Then - cc.dir=gShells.Shells(Beams(beam).egs_Shell_Index).egsnrc_folder_path+"\"+Beams(beam).egs_BEAMnrc_dir+"\" - else - cc.dir=gShells.Shells(Beams(beam).egs_Shell_Index).egsnrc_folder_path+"/"+Beams(beam).egs_BEAMnrc_dir+"/" - end + If cc.shell.OS = 3 Then + + cc.dir = gShells.Shells(Beams(beam).egs_Shell_Index).egsnrc_folder_path _ + + "\"+Beams(beam).egs_BEAMnrc_dir+"\" + + Else + + cc.dir=gShells.Shells(Beams(beam).egs_Shell_Index).egsnrc_folder_path _ + + "/"+Beams(beam).egs_BEAMnrc_dir+"/" + + End If - While InStr(cc.dir,"//")>0 - cc.dir=Replace(cc.dir,"//","/") + While cc.dir.IndexOf( "//")> 0 + + cc.dir = cc.dir.Replace("//","/") + Wend - gVMC.cc = new Class_MMCTP_Commands //Changed from BEAM to VMC to match mod c by William Davis - gBEAM.cc.shell= new Class_Shell_One - gBEAM.cc.shell=gShells.Shells(Beams(beam).egs_Shell_Index) + gVMC.cc = New Class_MMCTP_Commands //Changed from BEAM to VMC to match mod c by William Davis + gBEAM.cc.shell = New Class_Shell_One + gBEAM.cc.shell = gShells.Shells(Beams(beam).egs_Shell_Index) - for x=0 to UBound(gDOSXYZ.DOSXYZ) - if UBound(gDOSXYZ.DOSXYZ(x).DOSXYZ_Input)>=beam Then - if gDOSXYZ.DOSXYZ(x).DOSXYZ_Input(beam).isource=2 Then - temp=cc.shell.title + For x As Integer = 0 To gDOSXYZ.DOSXYZ.LastRowIndex + + If gDOSXYZ.DOSXYZ(x).DOSXYZ_Input.LastRowIndex >= beam Then + + If gDOSXYZ.DOSXYZ(x).DOSXYZ_Input(beam).isource=2 Then + + Var temp as String = cc.shell.title gDOSXYZ.DOSXYZ(x).DOSXYZ_Input(beam).dos_shell=cc.shell.title gDOSXYZ.DOSXYZ(x).DOSXYZ_Input(beam).dos_shell_index=Beams(beam).egs_Shell_Index - end - end - next + End If + End If + Next Return True - else - Errors.append "Error : beam "+str(beam+1)+" is not defined within the list of shells" //Changed to "Errors.append" by William Davis to prevent crash due to exception + Else + + Errors.append "Error : beam "+Str(beam+1)+" is not defined within the list of shells" //Changed to "Errors.append" by William Davis to prevent crash due to exception Beams(beam).Beamnrc_error=True Return False - end + End End Function #tag EndMethod @@ -801,19 +853,19 @@ Inherits Thread cc.FTP_Put_file=True cc.FTP_Local_Path=path cc.FTP_Remote_Path=rrpath - MMCTP_Shell_Run.All.Append cc + MMCTP_Shell_Run.All.Addrow( cc ) //Build the lianc dir tt=egs_Get_Directory(beam) cc.command="beam_build.exe " +inputfileN - MMCTP_Shell_Run.All.Append cc + MMCTP_Shell_Run.All.Addrow( cc ) //Run make on linac tt=egs_Get_Directory(beam) cc.command="make " - MMCTP_Shell_Run.All.Append cc + MMCTP_Shell_Run.All.Addrow( cc ) End Sub @@ -857,12 +909,12 @@ Inherits Thread cc.FTP_Put_file=True cc.FTP_Local_Path=path cc.FTP_Remote_Path=cc.dir+"/"+f.Name - MMCTP_Shell_Run.All.Append cc + MMCTP_Shell_Run.All.Addrow( cc ) //Change mode to exe tt=egs_Get_Directory(beam) cc.command="chmod u+x " +f.Name - MMCTP_Shell_Run.All.Append cc + MMCTP_Shell_Run.All.Addrow( cc ) End Sub #tag EndMethod @@ -1548,7 +1600,7 @@ Inherits Thread cc.command =line cc.egs_run=True cc.inpfilename=input_file - MMCTP_Shell_Run.All.Append cc + MMCTP_Shell_Run.All.Addrow( cc ) End Sub #tag EndMethod @@ -1707,7 +1759,7 @@ Inherits Thread cc.inpfilename=inpfilename cc.egs_exbeam=True cc.OutPutWindow=1 - MMCTP_Shell_Run.All.Append cc + MMCTP_Shell_Run.All.Addrow( cc ) End Sub #tag EndMethod @@ -1875,7 +1927,7 @@ Inherits Thread Return True Elseif typea=2 Then - // FLEC logic If the number of available jobs is greater than 0, DOSYXZnrc logic + // FLEC logic If the number of available jobs is greater than 0, DOSYXZnrc logic For i As Integer = 0 To found_file.LastRowIndex @@ -2055,7 +2107,7 @@ Inherits Thread cc.FTP_Files= egsinp cc.inpfilename=egsinp.Name cc.egs_uploade_inp=True - MMCTP_Shell_Run.All.Append cc + MMCTP_Shell_Run.All.Addrow( cc ) end // Upload MLC file @@ -2072,7 +2124,7 @@ Inherits Thread cc.FTP_Files= mlc cc.inpfilename=mlc.Name cc.egs_uploade_inp=True - MMCTP_Shell_Run.All.Append cc + MMCTP_Shell_Run.All.Addrow( cc ) end // Upload djaws file @@ -2089,7 +2141,7 @@ Inherits Thread cc.command= "put "+path_jaws+" "+cc.dir+"/"+DJAWS.Name cc.FTP_Files= DJAWS cc.inpfilename=DJAWS.Name - MMCTP_Shell_Run.All.Append cc + MMCTP_Shell_Run.All.Addrow( cc ) end End Sub #tag EndMethod diff --git a/BEAMnrc/Window_BEAM_Options.xojo_window b/BEAMnrc/Window_BEAM_Options.xojo_window index 7d47d2b..8128615 100644 --- a/BEAMnrc/Window_BEAM_Options.xojo_window +++ b/BEAMnrc/Window_BEAM_Options.xojo_window @@ -1461,27 +1461,39 @@ End #tag Method, Flags = &h0 Sub Cal_time() - Dim Time as Single - time=gBEAM.Beams(beam_num).egs_CPU_time_per_hist*gBEAM.beams(beam_num).egs_num_histories/gBEAM.Beams(beam_num).egs_jobs + Var time as Single = gBEAM.Beams(beam_num).egs_CPU_time_per_hist _ + * gBEAM.beams(beam_num).egs_num_histories _ + / gBEAM.Beams(beam_num).egs_jobs - if Time >60 Then - Time=Time/60 // Minutes - if Time>90 Then + If Time > 60 Then + + Time =Time/60 // Minutes + + If Time>90 Then + Time=Time/60 // Hours - if time> 36 Then + + If Time> 36 Then + Time=Time/24 // days StaticText_TotalTime.value = "Approx CPU time per job (day) "+Format(time,"###,###,###.##") - else + + Else StaticText_TotalTime.value = "Approx CPU time per job (hr) "+Format(time,"###,###,###.##") - end - else + + End If + Else + StaticText_TotalTime.value = "Approx CPU time per job (min) "+Format(time,"###,###,###.##") - end - else + + End If + Else + StaticText_TotalTime.value = "Approx CPU time per job (sec) "+Format(time,"###,###,###.##") - end + + End If End Sub #tag EndMethod @@ -1491,74 +1503,97 @@ End // // //-------------------------------- - Dim jarea,time as Single - Dim i as Integer + 'Dim jarea,time as Single + 'Dim i as Integer //-------------------------------- - Main_Refresh=True + Main_Refresh = True UpdateWindow=False - for i = 0 to PopupMenu_JobType.ListCount-1 - if PopupMenu_JobType.List(i)= gBEAM.Beams(beam_num).egs_queue then + For i As Integer = 0 To PopupMenu_JobType.LastRowIndex + + If PopupMenu_JobType.List(i)= gBEAM.Beams(beam_num).egs_queue Then + PopupMenu_JobType.SelectedRowIndex = i - end if - next i + + End If + + Next - PopupMenu_Shell.SelectedRowIndex=gBEAM.Beams(beam_num).egs_Shell_Index + PopupMenu_Shell.SelectedRowIndex = gBEAM.Beams(beam_num).egs_Shell_Index EditField_testrun.value = Format(gBEAM.Beams(beam_num).Num_test_hist,"#") - CheckBox_Simulation_Start.Caption="Started "+gBEAM.Beams(beam_num).egs_Start_Time+" active jobs : "+str(gBEAM.Beams(beam_num).egs_BEAMnrc_active_jobs) + CheckBox_Simulation_Start.Caption = "Started " + gBEAM.Beams(beam_num).egs_Start_Time _ + + " active jobs : "+str(gBEAM.Beams(beam_num).egs_BEAMnrc_active_jobs) - StaticText_part_per_history.Text ="Number particles per history "+Format(gBEAM.Beams(beam_num).egs_particle_per_history,"-#.######") - StaticText_beamid.value = "Beam ID: "+str(gRTOG.Plan(Plan_Index).Beam(beam_num).beam_num) - StaticText_CPU.value = "CPU time per history (s) "+Format(gBEAM.Beams(beam_num).egs_CPU_time_per_hist,"-#.######") - StaticText_phsp_num_part.value = "Number particles in PhSp file "+Format(gBEAM.Beams(beam_num).egs_phsp_num_particles,"###,###,###,###") + StaticText_part_per_history.value = "Number particles per history " _ + + Format(gBEAM.Beams(beam_num).egs_particle_per_history,"-#.######") + StaticText_beamid.value = "Beam ID: " + Str(gRTOG.Plan(Plan_Index).Beam(beam_num).beam_num) + StaticText_CPU.value = "CPU time per history (s) " + _ + Format(gBEAM.Beams(beam_num).egs_CPU_time_per_hist,"-#.######") + StaticText_phsp_num_part.value = "Number particles in PhSp file " _ + + Format(gBEAM.Beams(beam_num).egs_phsp_num_particles,"###,###,###,###") - if gBEAM.Beams(beam_num).egs_CPU_time_per_hist>0 Then - StaticText_part_per_s.value = "Particles per second "+Format(gBEAM.Beams(beam_num).egs_particle_per_history/gBEAM.Beams(beam_num).egs_CPU_time_per_hist,"###,###,###.##") - else + If gBEAM.Beams(beam_num).egs_CPU_time_per_hist>0 Then + + StaticText_part_per_s.value = "Particles per second " _ + + Format(gBEAM.Beams(beam_num).egs_particle_per_history _ + / gBEAM.Beams(beam_num).egs_CPU_time_per_hist,"###,###,###.##") + + Else + StaticText_part_per_s.value = "Particles per second Unknown" - end + + End If - jarea=gBEAM.egs_Calculate_Area(beam_num) + Var jarea As Single = gBEAM.egs_Calculate_Area(beam_num) StaticText_jawarea.value = "Aperture area cm^2 "+Format(jarea,"###,###.##") EditField_numhist.value = Format(gBEAM.Beams(beam_num).egs_num_histories,"###,###,###,###") - EditField_desired.value = Format(gBEAM.Beams(beam_num).egs_desired_phsp_particle_density,"###,###,###,###") + EditField_desired.value = _ + Format(gBEAM.Beams(beam_num).egs_desired_phsp_particle_density,"###,###,###,###") - EditField_jobs.value = str(gBEAM.Beams(beam_num).egs_jobs) + EditField_jobs.value = gBEAM.Beams(beam_num).egs_jobs.ToString EditField_pegs.value = gBEAM.Beams(beam_num).egs_pegs_file EditField_progress.value = Format(gBEAM.Beams(beam_num).egs_progress,"-#.#") - if gBEAM.Beams(beam_num).egs_BEAMnrc_started Then - CheckBox_Simulation_Start.Value=True - else - CheckBox_Simulation_Start.Value=False - end - if gBEAM.Beams(beam_num).egs_AddPhsp_Finished Then - CheckBox_AddPhsp_Finished.Value=True - else - CheckBox_AddPhsp_Finished.Value=False - end + CheckBox_Simulation_Start.Value = gBEAM.Beams(beam_num).egs_BEAMnrc_started + CheckBox_AddPhsp_Finished.Value = gBEAM.Beams(beam_num).egs_AddPhsp_Finished + + Var time As Single = gBEAM.Beams(beam_num).egs_Sim_Time - time=gBEAM.Beams(beam_num).egs_Sim_Time - if Time >60 Then + If Time >60 Then + Time=Time/60 // Minutes - if Time>90 Then - Time=Time/60 // Hours - if time> 36 Then + + If Time>90 Then + + Time =Time/60 // Hours + + If Time> 36 Then + Time=Time/24 // days - CheckBox_AddPhsp_Finished.Caption="Addphsp finished, Total time (day) "+Format(time,"###,###,###.##") - else - CheckBox_AddPhsp_Finished.Caption="Addphsp finished, Total time (hr) "+Format(time,"###,###,###.##") - end - else - CheckBox_AddPhsp_Finished.Caption="Addphsp finished, Total time (min) "+Format(time,"###,###,###.##") - end - else - CheckBox_AddPhsp_Finished.Caption="Addphsp finished, Total time (sec) "+Format(time,"###,###,###.##") - end + CheckBox_AddPhsp_Finished.Caption="Addphsp finished, Total time (day) " _ + +Format(time,"###,###,###.##") + + Else + + CheckBox_AddPhsp_Finished.Caption="Addphsp finished, Total time (hr) " _ + +Format(time,"###,###,###.##") + + End If + Else + + CheckBox_AddPhsp_Finished.Caption="Addphsp finished, Total time (min) " _ + +Format(time,"###,###,###.##") + + End If + Else + + CheckBox_AddPhsp_Finished.Caption="Addphsp finished, Total time (sec) " _ + +Format(time,"###,###,###.##") + End If CheckBox_AutoQueue.Value=gBEAM.Beams(beam_num).auto_queue CheckBox_AutoShell.Value=gBEAM.Beams(beam_num).egs_auto_shell @@ -1566,9 +1601,9 @@ End Main_Refresh=False Exception err - If err IsA OutOfBoundsException then + If err IsA OutOfBoundsException Then MessageBox "OutOfBoundsException in Refresh Window method" - end if + End If End Sub #tag EndMethod diff --git a/BEAMnrc/Window_BEAM_Phsp_Information.xojo_window b/BEAMnrc/Window_BEAM_Phsp_Information.xojo_window index c446197..bc2f590 100644 --- a/BEAMnrc/Window_BEAM_Phsp_Information.xojo_window +++ b/BEAMnrc/Window_BEAM_Phsp_Information.xojo_window @@ -1477,6 +1477,38 @@ Begin Window Window_BEAM_Phsp_Information Visible = True Width = 67 End + Begin PushButton PushButton_Refresh + AllowAutoDeactivate= True + Bold = False + Cancel = False + Caption = "Refresh" + Default = False + Enabled = True + FontName = "System" + FontSize = 0.0 + FontUnit = 0 + Height = 22 + Index = -2147483648 + InitialParent = "TabPanel1" + Italic = False + Left = 792 + LockBottom = False + LockedInPosition= False + LockLeft = False + LockRight = False + LockTop = False + MacButtonStyle = "0" + Scope = 0 + TabIndex = 9 + TabPanelIndex = 2 + TabStop = True + Tooltip = "" + Top = 267 + Transparent = False + Underline = False + Visible = True + Width = 121 + End End End #tag EndWindow @@ -1512,31 +1544,31 @@ End #tag Method, Flags = &h0 Sub copy_phsp1() - Dim i as integer - - - - for i =0 to ListBox_Phspfiles.ListCount-1 + For i As Integer = 0 To ListBox_Phspfiles.LastRowIndex - if ListBox_Phspfiles.CellCheck(i,1) then - copy_file=Trim(ListBox_Phspfiles.CellValueAt(i,2)) - gBEAM.Beams(beam_index).egs_Phsp_name=copy_file - gBEAM.Beams(beam_index).egs_Phsp_link=True - gBEAM.Beams(beam_index).egs_BEAMnrc_active_jobs=0 - gBEAM.Beams(beam_index).egs_progress=100 + If ListBox_Phspfiles.CellCheckBoxValueAt(i,1) Then + + copy_file =ListBox_Phspfiles.CellValueAt(i,2).Trim + gBEAM.Beams(beam_index).egs_Phsp_name = copy_file + gBEAM.Beams(beam_index).egs_Phsp_link = True + gBEAM.Beams(beam_index).egs_BEAMnrc_active_jobs = 0 + gBEAM.Beams(beam_index).egs_progress = 100 - if gBEAM.State=4 Then + + If gBEAM.State = 4 Then + gBEAM.egs_phsp_list=True gBEAM.Run ProgressWheel_phsp.Visible=True - end - exit - end + + End If + Exit + End If - next + Next @@ -1547,132 +1579,163 @@ End Sub pop_beam() 'Display the current beams in the beam listbox '================================== - Dim i,k as Integer - Dim col as Class_Collimator_Fields - Dim ss as String + 'Dim i,k as Integer + 'Dim col as Class_Collimator_Fields + 'Dim ss as String '================================ - k=plan_index - col = new Class_Collimator_Fields - if plan_index >-1 then - i=beam_index - - col=gRTOG.Plan(k).beam(i).collimator.fields(0) - + + If plan_index >-1 Then + Var Collimator_Fields as Class_Collimator_Fields = _ + gRTOG.Plan(Plan_Index).beam(beam_index).collimator.fields(0) - StaticText_linac_name.Text =gRTOG.Plan(k).beam(i).RT_name - StaticText_beam_energy.value = (gRTOG.Plan(k).beam(i).beam_energy ) + StaticText_linac_name.Value =gRTOG.Plan(Plan_Index).beam( beam_index).RT_name + StaticText_beam_energy.Value = (gRTOG.Plan( Plan_Index).beam(beam_index ).beam_energy ) //StaticText_ganty_rtn.value = str(gRTOG.Plan(k).beam(i).gantry_Angle) //StaticText_coll_rtn.value = str(gRTOG.Plan(k).beam(i).collimator_angle) //StaticText_couch_rtn.value = str(gRTOG.Plan(k).beam(i).couch_Angle) - StaticText_Phsp_name.value = gBEAM.Beams(i).egs_Phsp_name + StaticText_Phsp_name.value = gBEAM.Beams( beam_index ).egs_Phsp_name - StaticText_Phsp_size.value = Format(gBEAM.Beams(i).egs_phsp_size,"###,###,###,###") + StaticText_Phsp_size.value = Format(gBEAM.Beams( beam_index ).egs_phsp_size,"###,###,###,###") - if gBEAM.Beams(i).egs_phsp_size>0 Then - StaticText_Phsp_found.TextColor=RGB(0,255,0) + If gBEAM.Beams( beam_index ).egs_phsp_size > 0 Then + + StaticText_Phsp_found.TextColor = RGB(0,255,0) StaticText_Phsp_found.value = "Yes" - else + + Else + StaticText_Phsp_found.TextColor=RGB(255,0,0) StaticText_Phsp_found.value = "No" - end - - + + End If - if gBEAM.Beams(i).egs_phsp_link Then + If gBEAM.Beams(beam_index).egs_phsp_link Then + StaticText_Phsp_linkyn.TextColor=RGB(0,0,255) StaticText_Phsp_linkyn.value = "Yes" - StaticText_Phsp_linkyname.value = gBEAM.Beams(i).egs_phsp_name - else + StaticText_Phsp_linkyname.value = gBEAM.Beams( beam_index).egs_phsp_name + + Else + StaticText_Phsp_linkyn.TextColor=RGB(0,0,0) StaticText_Phsp_linkyn.value = "No" StaticText_Phsp_linkyname.value = "" - end - - - StaticText_wedge.text =gRTOG.Plan(k).Beam(i).Wedge_Angle +" "+left(gRTOG.Plan(k).Beam(i).Wedge_Rotation,1) + + End If + StaticText_wedge.Value = gRTOG.Plan(Plan_Index).Beam(beam_index).Wedge_Angle + " " _ + + Left(gRTOG.Plan( Plan_Index ).Beam(beam_index).Wedge_Rotation,1) - StaticText_beam_mode.value = gRTOG.Plan(k).Beam(i).beam_mode + StaticText_beam_mode.value = gRTOG.Plan( Plan_Index ).Beam( beam_index ).beam_mode - StaticText_Beam_Number.value = str(beam_index+1) + StaticText_Beam_Number.value = Str(beam_index+1) - StaticText_xjaws.value = str(col.X1+col.x2) + StaticText_xjaws.value = Str(Collimator_Fields.X1 + Collimator_Fields.X2) - StaticText_yjaws.value = str(col.y1+col.y2) + StaticText_yjaws.value = Str(Collimator_Fields.y1 + Collimator_Fields.y2) - end + End If End Sub #tag EndMethod #tag Method, Flags = &h0 Sub pop_listbox() - Dim i,row,k as integer - Dim test as Int64 - Dim ls(-1),one_line(-1),Date1 as string + 'Dim i,row,k As Integer + 'Dim test as Int64 + 'Dim ls(-1),one_line(-1),Date1 as string //---------------------------------------------- - ListBox_Phspfiles.ColumnAlignment(0)=1 - ListBox_Phspfiles.ColumnAlignment(1)=1 - ListBox_Phspfiles.ColumnAlignment(2)=1 - ListBox_Phspfiles.ColumnAlignment(3)=1 - ListBox_Phspfiles.ColumnAlignment(4)=1 - ListBox_Phspfiles.ColumnAlignment(5)=4 - ListBox_Phspfiles.ColumnAlignmentOffset(5)=0 + ListBox_Phspfiles.ColumnAlignmentAt(0) = Listbox.Alignments.Left + ListBox_Phspfiles.ColumnAlignmentAt(1) = Listbox.Alignments.Left + ListBox_Phspfiles.ColumnAlignmentAt(2) = Listbox.Alignments.Left + ListBox_Phspfiles.ColumnAlignmentAt(3) = Listbox.Alignments.Left + ListBox_Phspfiles.ColumnAlignmentAt(4) = Listbox.Alignments.Left + ListBox_Phspfiles.ColumnAlignmentAt(5) = Listbox.Alignments.Decimal + ListBox_Phspfiles.ColumnAlignmentOffsetAt(5) = 0 - if InStr(ls_list,"No such")=0 Then + If ls_list.IndexOf("No such") = 0 Then - While InStr(ls_list,chr(10))>0 - ls_list=Replace(ls_list,chr(10),chr(13)) + While ls_list.IndexOf( Chr(10)) > 0 + + ls_list=ls_list.Replace( Chr(10), Chr(13)) + Wend - ls=Split(ls_list,chr(13)) - ListBox_Phspfiles.DeleteAllRows - row=-1 + Var ls() As String = ls_list.Split( Chr(13) ) - for i=0 to UBound(ls) - One_Line=Split(ls(i)," ") + ListBox_Phspfiles.RemoveAllRows + Var row As Integer = -1 + + For i As Integer = 0 To ls.LastRowIndex + + Var One_Line() As String = ls(i).Split(" ") + + For k As Integer = one_line.LastRowIndex DownTo 0 + + one_line(k) = one_line(k).Trim + + If one_line(k).Length = 0 Then + + one_line.RemoveRowAt( k ) + + Elseif one_line(k) = Chr(13) Or one_line(k) = Chr(10) Then + + one_line.RemoveRowAt( k ) + + End If + Next - for k=UBound(one_line) DownTo 0 - one_line(k)=Trim(one_line(k)) - if Len(one_line(k))=0 Then - one_line.Remove k - elseif one_line(k)=chr(13) or one_line(k)=chr(10) Then - one_line.Remove k - end - next - if UBound(one_line)= (gBEAM.cc.shell.listfiles_name-1 )Then + If one_line.LastRowIndex = (gBEAM.cc.shell.listfiles_name-1 )Then + row=row+1 - ListBox_Phspfiles.AddRow Format(row+1,"00") - ListBox_Phspfiles.CellType(row,1)=2 - if (gBEAM.cc.shell.listfiles_dateA-1)<=UBound(one_line) and (gBEAM.cc.shell.listfiles_dateA-1)>=0 Then - Date1=one_line(gBEAM.cc.shell.listfiles_dateA-1) - if (gBEAM.cc.shell.listfiles_dateB-1)<=UBound(one_line) and (gBEAM.cc.shell.listfiles_dateB-1)>=0Then - Date1=Date1+" - " +one_line(gBEAM.cc.shell.listfiles_dateb-1) - end + ListBox_Phspfiles.AddRow( Format(row+1,"00") ) + ListBox_Phspfiles.CellTypeAt(row,1) = Listbox.CellTypes.CheckBox + + If (gBEAM.cc.shell.listfiles_dateA-1) <= one_line.LastRowIndex And _ + (gBEAM.cc.shell.listfiles_dateA-1) >= 0 Then - ListBox_Phspfiles.CellValueAt(row,3)=Date1 - end - if (gBEAM.cc.shell.listfiles_time-1)<=UBound(one_line) and (gBEAM.cc.shell.listfiles_time-1)>-1Then - ListBox_Phspfiles.CellValueAt(row,4)=one_line(gBEAM.cc.shell.listfiles_time-1) - end - if (gBEAM.cc.shell.listfiles_column_num-1)<=UBound(one_line) and (gBEAM.cc.shell.listfiles_column_num-1)>-1 Then - test=val(one_line(gBEAM.cc.shell.listfiles_column_num-1)) - ListBox_Phspfiles.CellValueAt(row,5)=Format(test,"###,###,###,###") - end - ListBox_Phspfiles.CellValueAt(row,2)=one_line(gBEAM.cc.shell.listfiles_name-1) - end - next - end + Var Date1 As String = one_line(gBEAM.cc.shell.listfiles_dateA-1) + + if (gBEAM.cc.shell.listfiles_dateB-1) <= one_line.LastRowIndex and _ + (gBEAM.cc.shell.listfiles_dateB-1) >= 0 Then + + Date1 = Date1 + " - " +one_line(gBEAM.cc.shell.listfiles_dateb-1) + + End If + + ListBox_Phspfiles.CellValueAt(row,3) = Date1 + + End If + + If (gBEAM.cc.shell.listfiles_time-1) <= one_line.LastRowIndex And _ + (gBEAM.cc.shell.listfiles_time-1) > -1Then + + ListBox_Phspfiles.CellValueAt(row,4) = one_line(gBEAM.cc.shell.listfiles_time-1) + + End If + + if (gBEAM.cc.shell.listfiles_column_num-1) <= one_line.LastRowIndex and _ + (gBEAM.cc.shell.listfiles_column_num-1)>-1 Then + Var test As Int64 = Val(one_line(gBEAM.cc.shell.listfiles_column_num-1)) + ListBox_Phspfiles.CellValueAt(row,5) = Format(test,"###,###,###,###") + + End If + + ListBox_Phspfiles.CellValueAt(row,2) = one_line(gBEAM.cc.shell.listfiles_name-1) + End If + Next + End If + ProgressWheel_phsp.Visible=False @@ -1681,11 +1744,13 @@ End #tag Method, Flags = &h0 Sub Refresh_BEAMnrcDir() - if gBEAM.State=4 then + If gBEAM.State = 4 Then + gBEAM.egs_phsp_list=True gBEAM.Run ProgressWheel_phsp.Visible=True - end + + End If End Sub #tag EndMethod @@ -1732,7 +1797,7 @@ End End While Not rs.AfterLastRow - + Var name As String = rs.Column("FileName").StringValue Var eng As String = rs.Column("BeamEnergy").StringValue Var opening As String = rs.Column("FLECOpening").StringValue @@ -1823,7 +1888,7 @@ End MI = New MenuItem MI.Text = "Delete Record" - base.Append MI + base.addmenu( MI ) End Function #tag EndEvent #tag Event @@ -1994,6 +2059,16 @@ End End Sub #tag EndEvent #tag EndEvents +#tag Events PushButton_Refresh + #tag Event + Sub Action() + Dim bb as Boolean + + bb=gBEAM.egs_Search_for_Opening(beam_index,1,"") + Refresh + End Sub + #tag EndEvent +#tag EndEvents #tag ViewBehavior #tag ViewProperty Name="MinimumWidth" diff --git a/Commissioning/Canvas_Plot.xojo_code b/Commissioning/Canvas_Plot.xojo_code index 48301bd..1ebf916 100644 --- a/Commissioning/Canvas_Plot.xojo_code +++ b/Commissioning/Canvas_Plot.xojo_code @@ -7,13 +7,13 @@ Inherits Canvas MI = New MenuItem MI.Text = "Change Colour" - base.Append MI + base.addmenu( MI ) MI = New MenuItem MI.Text = "Change BG Colour" - base.Append MI + base.addmenu( MI ) MI = New MenuItem MI.Text = "Rescale" - base.Append MI + base.addmenu( MI ) Return True diff --git a/Commissioning/Window_Commisssioning.xojo_window b/Commissioning/Window_Commisssioning.xojo_window index 52011b2..a7d3581 100644 --- a/Commissioning/Window_Commisssioning.xojo_window +++ b/Commissioning/Window_Commisssioning.xojo_window @@ -2087,7 +2087,7 @@ End MI = New MenuItem MI.Text = "Add Table" - base.Append MI + base.addmenu( MI ) Return True diff --git a/DICOM/Thread_DICOM_Object.xojo_code b/DICOM/Thread_DICOM_Object.xojo_code index af0978e..13aad7e 100644 --- a/DICOM/Thread_DICOM_Object.xojo_code +++ b/DICOM/Thread_DICOM_Object.xojo_code @@ -4026,7 +4026,7 @@ Inherits Thread ee.Tag_a="0002" ee.Tag_b="0000" cc=ee.Update - File.Elements.Append ee + File.elements.addrow( ee ) // FileMetaInfoVersion ee= new Class_DICOM_Element @@ -4034,7 +4034,7 @@ Inherits Thread ee.Tag_b="0001" ee.Value="256" cc=ee.Update - File.Elements.Append ee + File.elements.addrow( ee ) // MediaStorageSOPClassUID ee= new Class_DICOM_Element @@ -4042,7 +4042,7 @@ Inherits Thread ee.Tag_b="0002" ee.Value=dose.MediaStorageSOPClassUID cc=ee.Update - File.Elements.Append ee + File.elements.addrow( ee ) // MediaStorageSOPInstanceUID ee= new Class_DICOM_Element @@ -4050,7 +4050,7 @@ Inherits Thread ee.Tag_b="0003" ee.Value=dose.MediaStorageSOPInstanceUID cc=ee.Update - File.Elements.Append ee + File.elements.addrow( ee ) // TransferSyntax ee= new Class_DICOM_Element @@ -4058,7 +4058,7 @@ Inherits Thread ee.Tag_b="0010" ee.Value=dose.TransferSyntaxUID cc=ee.Update - File.Elements.Append ee + File.elements.addrow( ee ) // ImplementationClassUID ee= new Class_DICOM_Element @@ -4066,7 +4066,7 @@ Inherits Thread ee.Tag_b="0012" ee.Value=dose.ImplementationClassUID cc=ee.Update - File.Elements.Append ee + File.elements.addrow( ee ) // Image type @@ -4075,7 +4075,7 @@ Inherits Thread ee.Tag_b="0008" ee.Value=dose.ImageType cc=ee.Update - File.Elements.Append ee + File.elements.addrow( ee ) // Instance Creation Date ee= new Class_DICOM_Element @@ -4083,7 +4083,7 @@ Inherits Thread ee.Tag_b="0012" ee.Value=dose.InstanceCreationDate cc=ee.Update - File.Elements.Append ee + File.elements.addrow( ee ) // Instance creation time ee= new Class_DICOM_Element @@ -4091,7 +4091,7 @@ Inherits Thread ee.Tag_b="0013" ee.Value=dose.InstanceCreationTime cc=ee.Update - File.Elements.Append ee + File.elements.addrow( ee ) // SOPClassUID ee= new Class_DICOM_Element @@ -4099,7 +4099,7 @@ Inherits Thread ee.Tag_b="0016" ee.Value=dose.SOPClassUID cc=ee.Update - File.Elements.Append ee + File.elements.addrow( ee ) // SOPInstanceUID ee= new Class_DICOM_Element @@ -4107,7 +4107,7 @@ Inherits Thread ee.Tag_b="0018" ee.Value=dose.SOPInstanceUID cc=ee.Update - File.Elements.Append ee + File.elements.addrow( ee ) File.UID_Name=dose.SOPInstanceUID // StudyDate @@ -4115,7 +4115,7 @@ Inherits Thread ee.Tag_a="0008" ee.Tag_b="0020" ee.Value=dose.StudyDate - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update // Accession Date @@ -4123,7 +4123,7 @@ Inherits Thread ee.Tag_a="0008" ee.Tag_b="0022" ee.Value=CStr(dose.AcquistionDate) - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update // StudyTime @@ -4131,7 +4131,7 @@ Inherits Thread ee.Tag_a="0008" ee.Tag_b="0030" ee.Value=dose.StudyTime - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update @@ -4140,7 +4140,7 @@ Inherits Thread ee.Tag_a="0008" ee.Tag_b="0032" ee.Value=CStr(dose.AcquistionTime) - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update // AccessionNumber @@ -4148,7 +4148,7 @@ Inherits Thread ee.Tag_a="0008" ee.Tag_b="0050" ee.Value=dose.AccessionNumber - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update // Modality @@ -4156,7 +4156,7 @@ Inherits Thread ee.Tag_a="0008" ee.Tag_b="0060" ee.Value=dose.Modality - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update // Manufacutre @@ -4164,7 +4164,7 @@ Inherits Thread ee.Tag_a="0008" ee.Tag_b="0070" ee.Value=dose.Manufacturer - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update // RP name @@ -4172,7 +4172,7 @@ Inherits Thread ee.Tag_a="0008" ee.Tag_b="0090" ee.Value=dose.ReferringPhysicianName - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update // Station name @@ -4180,7 +4180,7 @@ Inherits Thread ee.Tag_a="0008" ee.Tag_b="1010" ee.Value=dose.StationName - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update // Study Description name @@ -4188,7 +4188,7 @@ Inherits Thread ee.Tag_a="0008" ee.Tag_b="1030" ee.Value=dose.StudyDescription - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update // Series Description name @@ -4196,7 +4196,7 @@ Inherits Thread ee.Tag_a="0008" ee.Tag_b="103E" ee.Value=dose.SeriesDescription - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update if gPref.DICOM_Format=1 Then @@ -4205,7 +4205,7 @@ Inherits Thread ee.Tag_a="0008" ee.Tag_b="1048" ee.Value=dose.Physician - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update end @@ -4214,7 +4214,7 @@ Inherits Thread ee.Tag_a="0008" ee.Tag_b="1090" ee.Value=dose.Manufacturer_Model_Name - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update //---------------------------------------------------- @@ -4224,7 +4224,7 @@ Inherits Thread ee.Tag_a="0010" ee.Tag_b="0010" ee.Value=dose.PatientName - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update // Patient ID @@ -4232,7 +4232,7 @@ Inherits Thread ee.Tag_a="0010" ee.Tag_b="0020" ee.Value=dose.PatientID - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update // Patient Birthdate @@ -4240,7 +4240,7 @@ Inherits Thread ee.Tag_a="0010" ee.Tag_b="0030" ee.Value=dose.PatientBirthDate - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update // Patient Sex @@ -4248,7 +4248,7 @@ Inherits Thread ee.Tag_a="0010" ee.Tag_b="0040" ee.Value=dose.Sex - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update // Patient Age @@ -4256,7 +4256,7 @@ Inherits Thread ee.Tag_a="0010" ee.Tag_b="1010" ee.Value=dose.Age - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update @@ -4266,7 +4266,7 @@ Inherits Thread ee.Tag_a="0018" ee.Tag_b="0050" ee.Value=str(dose.SliceThickness) - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update // Software Version @@ -4274,7 +4274,7 @@ Inherits Thread ee.Tag_a="0018" ee.Tag_b="1020" ee.Value=dose.Software_Version - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update @@ -4284,7 +4284,7 @@ Inherits Thread ee.Tag_a="0020" ee.Tag_b="000D" ee.Value=dose.StudyInstanceUID - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update // Series Instance UID @@ -4292,7 +4292,7 @@ Inherits Thread ee.Tag_a="0020" ee.Tag_b="000E" ee.Value=dose.SeriesInstanceUID - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update // Study ID @@ -4300,7 +4300,7 @@ Inherits Thread ee.Tag_a="0020" ee.Tag_b="0010" ee.Value=dose.StudyID - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update // Series Number @@ -4308,7 +4308,7 @@ Inherits Thread ee.Tag_a="0020" ee.Tag_b="0011" ee.Value=dose.SeriesNumber - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update // Instance Number @@ -4316,7 +4316,7 @@ Inherits Thread ee.Tag_a="0020" ee.Tag_b="0013" ee.Value=dose.InstanceNumber - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update // Image Position Patient @@ -4324,7 +4324,7 @@ Inherits Thread ee.Tag_a="0020" ee.Tag_b="0032" ee.Value=dose.ImagePositionPatient - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update // Image Orientation Patient @@ -4332,7 +4332,7 @@ Inherits Thread ee.Tag_a="0020" ee.Tag_b="0037" ee.Value=dose.ImageOrientationPatient - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update // Frame of reference UID @@ -4340,7 +4340,7 @@ Inherits Thread ee.Tag_a="0020" ee.Tag_b="0052" ee.Value=dose.FrameOfReferenceUID - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update // Images in acquistion @@ -4348,7 +4348,7 @@ Inherits Thread ee.Tag_a="0020" ee.Tag_b="1002" ee.Value=CStr(dose.ImagesInAcquistion) - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update // PositionReferenceIndicator @@ -4356,7 +4356,7 @@ Inherits Thread ee.Tag_a="0020" ee.Tag_b="1040" ee.Value=dose.PositionReferenceIndicator - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update // Slice Location @@ -4364,7 +4364,7 @@ Inherits Thread ee.Tag_a="0020" ee.Tag_b="1041" ee.Value=Format(dose.SliceLocation,"-0.0") - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update //----------------------------------------------- @@ -4373,7 +4373,7 @@ Inherits Thread ee.Tag_a="0028" ee.Tag_b="0000" ee.Value=CStr(dose.Image_Presentation_Group_Length) - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update // SamplesPerPixel @@ -4381,7 +4381,7 @@ Inherits Thread ee.Tag_a="0028" ee.Tag_b="0002" ee.Value=dose.SamplesPerPixel - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update // Photometric @@ -4389,7 +4389,7 @@ Inherits Thread ee.Tag_a="0028" ee.Tag_b="0004" ee.Value=dose.PhotometrixInter - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update // Number of Frames @@ -4397,7 +4397,7 @@ Inherits Thread ee.Tag_a="0028" ee.Tag_b="0008" ee.Value=Format(dose.NumberofFrames,"#") - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update // Frame Pointer @@ -4405,7 +4405,7 @@ Inherits Thread ee.Tag_a="0028" ee.Tag_b="0009" ee.Value=dose.FrameIncrementPointer - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update // Rows @@ -4413,7 +4413,7 @@ Inherits Thread ee.Tag_a="0028" ee.Tag_b="0010" ee.Value=Format(dose.rows,"#") - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update // Columns @@ -4421,7 +4421,7 @@ Inherits Thread ee.Tag_a="0028" ee.Tag_b="0011" ee.Value=Format(dose.columns,"#") - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update // Pixel Spacing @@ -4429,7 +4429,7 @@ Inherits Thread ee.Tag_a="0028" ee.Tag_b="0030" ee.Value=dose.PixelSpacing - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update // BitsAllocated @@ -4437,7 +4437,7 @@ Inherits Thread ee.Tag_a="0028" ee.Tag_b="0100" ee.Value=Format(dose.BitsAllocated,"#") - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update // BitsStored @@ -4445,7 +4445,7 @@ Inherits Thread ee.Tag_a="0028" ee.Tag_b="0101" ee.Value=Format(dose.BitsStored,"#") - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update // HighBit @@ -4453,14 +4453,14 @@ Inherits Thread ee.Tag_a="0028" ee.Tag_b="0102" ee.Value=Format(dose.HighBit,"#") - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update // PixelRepresentation ee= new Class_DICOM_Element ee.Tag_a="0028" ee.Tag_b="0103" - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update // Smallest Image Pixel Value @@ -4468,7 +4468,7 @@ Inherits Thread ee.Tag_a="0028" ee.Tag_b="0106" ee.Value=Format(dose.Smallest_Image_Pixel_Value,"-#") - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update //----------------------------------------------- @@ -4477,7 +4477,7 @@ Inherits Thread ee.Tag_a="3004" ee.Tag_b="0002" ee.Value=dose.DoseUnits - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update // DoseTypes @@ -4485,7 +4485,7 @@ Inherits Thread ee.Tag_a="3004" ee.Tag_b="0004" ee.Value=dose.DoseType - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update // DoseComment @@ -4493,7 +4493,7 @@ Inherits Thread ee.Tag_a="3004" ee.Tag_b="0006" ee.Value=dose.DoseComment - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update // DoseSummationType @@ -4501,7 +4501,7 @@ Inherits Thread ee.Tag_a="3004" ee.Tag_b="000A" ee.Value=dose.DoseSummationType - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update // GridFrameOfffset Vector @@ -4510,7 +4510,7 @@ Inherits Thread ee.Tag_b="000C" ee.VM=InStr(dose.GridFrameOffsetVector,"\")+1 ee.Value=dose.GridFrameOffsetVector - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update // DoseGridScaling @@ -4518,7 +4518,7 @@ Inherits Thread ee.Tag_a="3004" ee.Tag_b="000E" ee.Value=Format(dose.DoseGridScaling,"-#.##########") - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update // Reference plan sequence @@ -4528,7 +4528,7 @@ Inherits Thread ee.Tag_a="300C" ee.Tag_b="0002" ee.Value="1" - File.Elements.Append ee + File.elements.addrow( ee ) level1_index=UBound(File.Elements) length_level1=0 cc=ee.Update @@ -4538,7 +4538,7 @@ Inherits Thread ee= new Class_DICOM_Element ee.Tag_a="FFFE" ee.Tag_b="E000" - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update item_level1_length=0 item_level1_index=UBound(File.Elements) @@ -4548,7 +4548,7 @@ Inherits Thread ee.Tag_b="1150" ee.Value=dose.ReferencedRTPSequence(k).ReferencedSOPClassUID cc=ee.Update - File.Elements.Append ee + File.elements.addrow( ee ) item_level1_length=item_level1_length+ee.Element_Length ee= new Class_DICOM_Element @@ -4556,7 +4556,7 @@ Inherits Thread ee.Tag_b="1155" ee.Value=dose.ReferencedRTPSequence(k).ReferencedSOPInstanceUID cc=ee.Update - File.Elements.Append ee + File.elements.addrow( ee ) item_level1_length=item_level1_length+ee.Element_Length File.Elements(item_level1_index).Sequence_Length=item_level1_length @@ -4575,7 +4575,7 @@ Inherits Thread ee.Tag_b="0060" ee.Value="1" cc=ee.Update - File.Elements.Append ee + File.elements.addrow( ee ) level1_index=UBound(File.Elements) length_level1=0 @@ -4584,7 +4584,7 @@ Inherits Thread ee= new Class_DICOM_Element ee.Tag_a="FFFE" ee.Tag_b="E000" - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update item_level1_length=0 @@ -4595,7 +4595,7 @@ Inherits Thread ee.Tag_b="1150" ee.Value=dose.ReferencedStructureSetSeq(k).ReferencedSOPClassUID cc=ee.Update - File.Elements.Append ee + File.elements.addrow( ee ) item_level1_length=item_level1_length+ee.Element_Length ee= new Class_DICOM_Element @@ -4603,7 +4603,7 @@ Inherits Thread ee.Tag_b="1155" ee.Value=dose.ReferencedStructureSetSeq(k).ReferencedSOPInstanceUID cc=ee.Update - File.Elements.Append ee + File.elements.addrow( ee ) item_level1_length=item_level1_length+ee.Element_Length File.Elements(item_level1_index).Sequence_Length=item_level1_length @@ -4631,7 +4631,7 @@ Inherits Thread ee.Value_length=4*(UBound(ee.PixelData)+1) end - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update File.UID_Name=dose.SOPInstanceUID @@ -4660,413 +4660,413 @@ Inherits Thread for i=0 to UBound(RT_Images) // look for Image .dcm files File=new Class_DICOM_File ee=new Class_DICOM_Element - File.Elements.Append ee + File.elements.addrow( ee ) ee.Tag_a="0008" ee.Tag_b="0000" ee.Value=RT_Images(i).IdentifyingGroupLength found=ee.Update ee=new Class_DICOM_Element - File.Elements.Append ee + File.elements.addrow( ee ) ee.Tag_a="0008" ee.Tag_b="0008" ee.Value=RT_Images(i).Image_Type found=ee.Update ee=new Class_DICOM_Element - File.Elements.Append ee + File.elements.addrow( ee ) ee.Tag_a="0008" ee.Tag_b="0012" ee.Value=str(RT_Images(i).InstanceCreationDate) found=ee.Update ee=new Class_DICOM_Element - File.Elements.Append ee + File.elements.addrow( ee ) ee.Tag_a="0008" ee.Tag_b="0013" ee.Value=RT_Images(i).InstanceCreationTime found=ee.Update ee=new Class_DICOM_Element - File.Elements.Append ee + File.elements.addrow( ee ) ee.Tag_a="0008" ee.Tag_b="0016" ee.Value=RT_Images(i).SOPClassUID found=ee.Update ee=new Class_DICOM_Element - File.Elements.Append ee + File.elements.addrow( ee ) ee.Tag_a="0008" ee.Tag_b="0018" ee.Value=RT_Images(i).SOPInstanceUID found=ee.Update ee=new Class_DICOM_Element - File.Elements.Append ee + File.elements.addrow( ee ) ee.Tag_a="0008" ee.Tag_b="0020" ee.Value=RT_Images(i).StudyDate found=ee.Update ee=new Class_DICOM_Element - File.Elements.Append ee + File.elements.addrow( ee ) ee.Tag_a="0008" ee.Tag_b="0021" ee.Value=RT_Images(i).SeriesDate found=ee.Update ee=new Class_DICOM_Element - File.Elements.Append ee + File.elements.addrow( ee ) ee.Tag_a="0008" ee.Tag_b="0022" ee.Value=RT_Images(i).AcquisitionDate found=ee.Update ee=new Class_DICOM_Element - File.Elements.Append ee + File.elements.addrow( ee ) ee.Tag_a="0008" ee.Tag_b="0030" ee.Value=RT_Images(i).StudyTime found=ee.Update ee=new Class_DICOM_Element - File.Elements.Append ee + File.elements.addrow( ee ) ee.Tag_a="0008" ee.Tag_b="0031" ee.Value=RT_Images(i).SeriesTime found=ee.Update ee=new Class_DICOM_Element - File.Elements.Append ee + File.elements.addrow( ee ) ee.Tag_a="0008" ee.Tag_b="0032" ee.Value=RT_Images(i).AcquisitionTime found=ee.Update ee=new Class_DICOM_Element - File.Elements.Append ee + File.elements.addrow( ee ) ee.Tag_a="0008" ee.Tag_b="0050" ee.Value=RT_Images(i).AccessionNumber found=ee.Update ee=new Class_DICOM_Element - File.Elements.Append ee + File.elements.addrow( ee ) ee.Tag_a="0008" ee.Tag_b="0060" ee.Value=RT_Images(i).Modality found=ee.Update ee=new Class_DICOM_Element - File.Elements.Append ee + File.elements.addrow( ee ) ee.Tag_a="0008" ee.Tag_b="0070" ee.Value=RT_Images(i).Manufacturer found=ee.Update ee=new Class_DICOM_Element - File.Elements.Append ee + File.elements.addrow( ee ) ee.Tag_a="0008" ee.Tag_b="0090" ee.Value=RT_Images(i).ReferringPhysician found=ee.Update ee=new Class_DICOM_Element - File.Elements.Append ee + File.elements.addrow( ee ) ee.Tag_a="0008" ee.Tag_b="1030" ee.Value=RT_Images(i).StudyDescription found=ee.Update ee=new Class_DICOM_Element - File.Elements.Append ee + File.elements.addrow( ee ) ee.Tag_a="0008" ee.Tag_b="103E" ee.Value=RT_Images(i).SeriesDescription found=ee.Update ee=new Class_DICOM_Element - File.Elements.Append ee + File.elements.addrow( ee ) ee.Tag_a="0008" ee.Tag_b="1048" ee.Value=RT_Images(i).Physician found=ee.Update ee=new Class_DICOM_Element - File.Elements.Append ee + File.elements.addrow( ee ) ee.Tag_a="0008" ee.Tag_b="2111" ee.Value=RT_Images(i).DerivationDescription found=ee.Update ee=new Class_DICOM_Element - File.Elements.Append ee + File.elements.addrow( ee ) ee.Tag_a="0010" ee.Tag_b="0000" ee.Value=str(RT_Images(i).PatientGroupLength) found=ee.Update ee=new Class_DICOM_Element - File.Elements.Append ee + File.elements.addrow( ee ) ee.Tag_a="0010" ee.Tag_b="0010" ee.Value=RT_Images(i).PatientName found=ee.Update ee=new Class_DICOM_Element - File.Elements.Append ee + File.elements.addrow( ee ) ee.Tag_a="0010" ee.Tag_b="0020" ee.Value=RT_Images(i).PatientID found=ee.Update ee=new Class_DICOM_Element - File.Elements.Append ee + File.elements.addrow( ee ) ee.Tag_a="0010" ee.Tag_b="0030" ee.Value=RT_Images(i).PatientBirthDate found=ee.Update ee=new Class_DICOM_Element - File.Elements.Append ee + File.elements.addrow( ee ) ee.Tag_a="0010" ee.Tag_b="0040" ee.Value=RT_Images(i).sex found=ee.Update ee=new Class_DICOM_Element - File.Elements.Append ee + File.elements.addrow( ee ) ee.Tag_a="0010" ee.Tag_b="1010" ee.Value=RT_Images(i).Age found=ee.Update ee=new Class_DICOM_Element - File.Elements.Append ee + File.elements.addrow( ee ) ee.Tag_a="0018" ee.Tag_b="0000" ee.Value=RT_Images(i).AcquisitionGroupLength found=ee.Update ee=new Class_DICOM_Element - File.Elements.Append ee + File.elements.addrow( ee ) ee.Tag_a="0018" ee.Tag_b="0050" ee.Value=Format(RT_Images(i).SliceThickness,"-0.0") found=ee.Update ee=new Class_DICOM_Element - File.Elements.Append ee + File.elements.addrow( ee ) ee.Tag_a="0018" ee.Tag_b="0060" ee.Value=RT_Images(i).Kvp found=ee.Update ee=new Class_DICOM_Element - File.Elements.Append ee + File.elements.addrow( ee ) ee.Tag_a="0018" ee.Tag_b="1020" ee.Value=RT_Images(i).SoftwareVersions found=ee.Update ee=new Class_DICOM_Element - File.Elements.Append ee + File.elements.addrow( ee ) ee.Tag_a="0018" ee.Tag_b="5100" ee.Value=RT_Images(i).patient_position found=ee.Update ee=new Class_DICOM_Element - File.Elements.Append ee + File.elements.addrow( ee ) ee.Tag_a="0020" ee.Tag_b="0000" ee.Value=RT_Images(i).RelationshipGroupLength found=ee.Update ee=new Class_DICOM_Element - File.Elements.Append ee + File.elements.addrow( ee ) ee.Tag_a="0020" ee.Tag_b="000D" ee.Value=RT_Images(i).StudyInstanceUID found=ee.Update ee=new Class_DICOM_Element - File.Elements.Append ee + File.elements.addrow( ee ) ee.Tag_a="0020" ee.Tag_b="000E" ee.Value=RT_Images(i).SeriesInstanceUID found=ee.Update ee=new Class_DICOM_Element - File.Elements.Append ee + File.elements.addrow( ee ) ee.Tag_a="0020" ee.Tag_b="0010" ee.Value=RT_Images(i).StudyID found=ee.Update ee=new Class_DICOM_Element - File.Elements.Append ee + File.elements.addrow( ee ) ee.Tag_a="0020" ee.Tag_b="0011" ee.Value=RT_Images(i).SeriesNumber found=ee.Update ee=new Class_DICOM_Element - File.Elements.Append ee + File.elements.addrow( ee ) ee.Tag_a="0020" ee.Tag_b="0012" ee.Value=str(RT_Images(i).AcquisitionNumber,"#") found=ee.Update ee=new Class_DICOM_Element - File.Elements.Append ee + File.elements.addrow( ee ) ee.Tag_a="0020" ee.Tag_b="0013" ee.Value=str(RT_Images(i).InstanceNumber,"#") found=ee.Update ee=new Class_DICOM_Element - File.Elements.Append ee + File.elements.addrow( ee ) ee.Tag_a="0020" ee.Tag_b="0032" ee.Value=RT_Images(i).ImagePositionPatient found=ee.Update ee=new Class_DICOM_Element - File.Elements.Append ee + File.elements.addrow( ee ) ee.Tag_a="0020" ee.Tag_b="0037" ee.Value=RT_Images(i).ImageOrientationPatient found=ee.Update ee=new Class_DICOM_Element - File.Elements.Append ee + File.elements.addrow( ee ) ee.Tag_a="0020" ee.Tag_b="0052" ee.Value=RT_Images(i).FrameOfReferenceUID found=ee.Update ee=new Class_DICOM_Element - File.Elements.Append ee + File.elements.addrow( ee ) ee.Tag_a="0020" ee.Tag_b="1002" ee.Value=Str(RT_Images(i).ImagesinAcquisition,"#") found=ee.Update ee=new Class_DICOM_Element - File.Elements.Append ee + File.elements.addrow( ee ) ee.Tag_a="0020" ee.Tag_b="1040" ee.Value=(RT_Images(i).PositionReferenceIndicator) found=ee.Update ee=new Class_DICOM_Element - File.Elements.Append ee + File.elements.addrow( ee ) ee.Tag_a="0020" ee.Tag_b="1041" ee.Value=Format(RT_Images(i).SliceLocation,"-0.0") found=ee.Update ee=new Class_DICOM_Element - File.Elements.Append ee + File.elements.addrow( ee ) ee.Tag_a="0028" ee.Tag_b="0000" ee.Value=Format(RT_Images(i).ImagePresenatationGroupLength,"#") found=ee.Update ee=new Class_DICOM_Element - File.Elements.Append ee + File.elements.addrow( ee ) ee.Tag_a="0028" ee.Tag_b="0002" ee.Value=RT_Images(i).SampleperPixel found=ee.Update ee=new Class_DICOM_Element - File.Elements.Append ee + File.elements.addrow( ee ) ee.Tag_a="0028" ee.Tag_b="0004" ee.Value=RT_Images(i).PhotometricInterpretation found=ee.Update ee=new Class_DICOM_Element - File.Elements.Append ee + File.elements.addrow( ee ) ee.Tag_a="0028" ee.Tag_b="0010" ee.Value=Format(RT_Images(i).row,"#") found=ee.Update ee=new Class_DICOM_Element - File.Elements.Append ee + File.elements.addrow( ee ) ee.Tag_a="0028" ee.Tag_b="0011" ee.Value=Format(RT_Images(i).Columns,"#") found=ee.Update ee=new Class_DICOM_Element - File.Elements.Append ee + File.elements.addrow( ee ) ee.Tag_a="0028" ee.Tag_b="0030" ee.Value=RT_Images(i).PixelSpacing found=ee.Update ee=new Class_DICOM_Element - File.Elements.Append ee + File.elements.addrow( ee ) ee.Tag_a="0028" ee.Tag_b="0100" ee.Value=Format(RT_Images(i).BitsAllocated,"#") found=ee.Update ee=new Class_DICOM_Element - File.Elements.Append ee + File.elements.addrow( ee ) ee.Tag_a="0028" ee.Tag_b="0101" ee.Value=Format(RT_Images(i).BitsStored,"#") found=ee.Update ee=new Class_DICOM_Element - File.Elements.Append ee + File.elements.addrow( ee ) ee.Tag_a="0028" ee.Tag_b="0102" ee.Value=Format(RT_Images(i).highbit,"#") found=ee.Update ee=new Class_DICOM_Element - File.Elements.Append ee + File.elements.addrow( ee ) ee.Tag_a="0028" ee.Tag_b="0103" ee.Value=Format(RT_Images(i).PixelRepresentation,"#") found=ee.Update ee=new Class_DICOM_Element - File.Elements.Append ee + File.elements.addrow( ee ) ee.Tag_a="0028" ee.Tag_b="0106" ee.Value=Format(RT_Images(i).SmallestImagePixelValue,"#") found=ee.Update ee=new Class_DICOM_Element - File.Elements.Append ee + File.elements.addrow( ee ) ee.Tag_a="0028" ee.Tag_b="1052" ee.Value=Format(RT_Images(i).rescaleintercept,"-#.0") found=ee.Update ee=new Class_DICOM_Element - File.Elements.Append ee + File.elements.addrow( ee ) ee.Tag_a="0028" ee.Tag_b="1053" ee.Value=Format(RT_Images(i).rescaleslope,"0.0") found=ee.Update ee=new Class_DICOM_Element - File.Elements.Append ee + File.elements.addrow( ee ) ee.Tag_a="7FE0" ee.Tag_b="0000" ee.Value=Format(RT_Images(i).PixelDataGroupLength,"#") found=ee.Update ee=new Class_DICOM_Element - File.Elements.Append ee + File.elements.addrow( ee ) ee.Tag_a="7FE0" ee.Tag_b="0010" ReDim ee.PixelData(UBound(RT_Images(i).PixelData)) @@ -5118,7 +5118,7 @@ Inherits Thread ee.Tag_a="0002" ee.Tag_b="0000" cc=ee.Update - File.Elements.Append ee + File.elements.addrow( ee ) // FileMetaInfoVersion ee= new Class_DICOM_Element @@ -5126,7 +5126,7 @@ Inherits Thread ee.Tag_b="0001" ee.Value="256" cc=ee.Update - File.Elements.Append ee + File.elements.addrow( ee ) // MediaStorageSOPClassUID ee= new Class_DICOM_Element @@ -5134,7 +5134,7 @@ Inherits Thread ee.Tag_b="0002" ee.Value=planclass.MediaStorageSOPClassUID cc=ee.Update - File.Elements.Append ee + File.elements.addrow( ee ) // MediaStorageSOPInstanceUID ee= new Class_DICOM_Element @@ -5142,7 +5142,7 @@ Inherits Thread ee.Tag_b="0003" ee.Value=planclass.MediaStorageSOPInstanceUID cc=ee.Update - File.Elements.Append ee + File.elements.addrow( ee ) // TransferSyntax ee= new Class_DICOM_Element @@ -5150,7 +5150,7 @@ Inherits Thread ee.Tag_b="0010" ee.Value=planclass.TransferSyntaxUID cc=ee.Update - File.Elements.Append ee + File.elements.addrow( ee ) // ImplementationClassUID ee= new Class_DICOM_Element @@ -5158,7 +5158,7 @@ Inherits Thread ee.Tag_b="0012" ee.Value=planclass.ImplementationClassUID cc=ee.Update - File.Elements.Append ee + File.elements.addrow( ee ) // Identifying group length @@ -5166,7 +5166,7 @@ Inherits Thread ee.Tag_a="0008" ee.Tag_b="0000" ee.Value="340" - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update // Instance Creation Date @@ -5175,7 +5175,7 @@ Inherits Thread ee.Tag_b="0012" ee.Value=planclass.InstanceCreationDate cc=ee.Update - File.Elements.Append ee + File.elements.addrow( ee ) // Instance creation time ee= new Class_DICOM_Element @@ -5183,7 +5183,7 @@ Inherits Thread ee.Tag_b="0013" ee.Value=planclass.InstanceCreationTime cc=ee.Update - File.Elements.Append ee + File.elements.addrow( ee ) // SOPClassUID ee= new Class_DICOM_Element @@ -5191,7 +5191,7 @@ Inherits Thread ee.Tag_b="0016" ee.Value=planclass.SOPClassUID cc=ee.Update - File.Elements.Append ee + File.elements.addrow( ee ) // SOPInstanceUID ee= new Class_DICOM_Element @@ -5199,7 +5199,7 @@ Inherits Thread ee.Tag_b="0018" ee.Value=planclass.SOPInstanceUID cc=ee.Update - File.Elements.Append ee + File.elements.addrow( ee ) File.UID_Name=planclass.SOPInstanceUID // StudyDate @@ -5207,7 +5207,7 @@ Inherits Thread ee.Tag_a="0008" ee.Tag_b="0020" ee.Value=planclass.StudyDate - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update // Accession Date @@ -5215,14 +5215,14 @@ Inherits Thread 'ee.Tag_a="0008" 'ee.Tag_b="0022" 'ee.Value=CStr(dose.AcquistionDate) - 'File.Elements.Append ee + 'File.elements.addrow( ee ) // StudyTime ee= new Class_DICOM_Element ee.Tag_a="0008" ee.Tag_b="0030" ee.Value=planclass.StudyTime - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update '// Acq time @@ -5230,14 +5230,14 @@ Inherits Thread 'ee.Tag_a="0008" 'ee.Tag_b="0032" 'ee.Value=CStr(dose.AcquistionTime) - 'File.Elements.Append ee + 'File.elements.addrow( ee ) // AccessionNumber ee= new Class_DICOM_Element ee.Tag_a="0008" ee.Tag_b="0050" ee.Value=planclass.AccessionNumber - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update // Modality @@ -5245,7 +5245,7 @@ Inherits Thread ee.Tag_a="0008" ee.Tag_b="0060" ee.Value=planclass.Modality - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update // Manufacutre @@ -5253,7 +5253,7 @@ Inherits Thread ee.Tag_a="0008" ee.Tag_b="0070" ee.Value=planclass.Manufacturer - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update // RP name @@ -5261,7 +5261,7 @@ Inherits Thread ee.Tag_a="0008" ee.Tag_b="0090" ee.Value=planclass.ReferringPhysicianName - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update // Station name @@ -5269,7 +5269,7 @@ Inherits Thread ee.Tag_a="0008" ee.Tag_b="1010" ee.Value=planclass.StationName - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update // Study Description name @@ -5277,7 +5277,7 @@ Inherits Thread ee.Tag_a="0008" ee.Tag_b="1030" ee.Value=planclass.StudyDescription - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update // Series Description name @@ -5285,7 +5285,7 @@ Inherits Thread ee.Tag_a="0008" ee.Tag_b="103E" ee.Value=planclass.SeriesDescription - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update // Series Description name @@ -5293,7 +5293,7 @@ Inherits Thread ee.Tag_a="0008" ee.Tag_b="1048" ee.Value=planclass.PhysicianofRecord - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update // Operator Name @@ -5301,7 +5301,7 @@ Inherits Thread ee.Tag_a="0008" ee.Tag_b="1070" ee.Value=planclass.OperatorsName - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update // Manufacture's Model Name @@ -5309,7 +5309,7 @@ Inherits Thread ee.Tag_a="0008" ee.Tag_b="1090" ee.Value=planclass.Manufacturer_Model_Name - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update //---------------------------------------------------- @@ -5319,7 +5319,7 @@ Inherits Thread ee.Tag_a="0010" ee.Tag_b="0000" ee.Value="80" - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update // Patient Name @@ -5327,7 +5327,7 @@ Inherits Thread ee.Tag_a="0010" ee.Tag_b="0010" ee.Value=planclass.PatientName - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update // Patient ID @@ -5335,7 +5335,7 @@ Inherits Thread ee.Tag_a="0010" ee.Tag_b="0020" ee.Value=planclass.PatientID - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update // Patient Birthdate @@ -5343,7 +5343,7 @@ Inherits Thread ee.Tag_a="0010" ee.Tag_b="0030" ee.Value=planclass.Birthdate - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update // Patient Sex @@ -5351,7 +5351,7 @@ Inherits Thread ee.Tag_a="0010" ee.Tag_b="0040" ee.Value=planclass.Sex - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update // Patient Age @@ -5359,7 +5359,7 @@ Inherits Thread ee.Tag_a="0010" ee.Tag_b="1010" ee.Value=planclass.Age - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update //----------------------------------------------- @@ -5368,7 +5368,7 @@ Inherits Thread ee.Tag_a="0018" ee.Tag_b="0000" ee.Value=str(32) - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update // Software Version @@ -5376,7 +5376,7 @@ Inherits Thread ee.Tag_a="0018" ee.Tag_b="1020" ee.Value=planclass.SoftwareVersions - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update //----------------------------------------------------- @@ -5385,7 +5385,7 @@ Inherits Thread ee.Tag_a="0020" ee.Tag_b="0000" ee.Value=planclass.RelationshipGroupLength - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update // Study Instance UID @@ -5393,7 +5393,7 @@ Inherits Thread ee.Tag_a="0020" ee.Tag_b="000D" ee.Value=planclass.StudyInstanceUID - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update // Series Instance UID @@ -5401,7 +5401,7 @@ Inherits Thread ee.Tag_a="0020" ee.Tag_b="000E" ee.Value=planclass.SeriesInstanceUID - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update // Study ID @@ -5409,7 +5409,7 @@ Inherits Thread ee.Tag_a="0020" ee.Tag_b="0010" ee.Value=planclass.StudyID - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update // Series Number @@ -5417,7 +5417,7 @@ Inherits Thread ee.Tag_a="0020" ee.Tag_b="0011" ee.Value=planclass.SeriesNumber - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update // Instance Number @@ -5425,7 +5425,7 @@ Inherits Thread ee.Tag_a="0020" ee.Tag_b="0013" ee.Value=planclass.InstanceNumber - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update '// Image Position Patient @@ -5434,7 +5434,7 @@ Inherits Thread 'ee.Tag_b="0032" ' 'ee.Value=planclass.ImagePositionPatient - 'File.Elements.Append ee + 'File.elements.addrow( ee ) '// Image Orientation Patient 'ee= new Class_DICOM_Element @@ -5442,14 +5442,14 @@ Inherits Thread 'ee.Tag_b="0037" ' 'ee.Value=dose.ImageOrientationPatient - 'File.Elements.Append ee + 'File.elements.addrow( ee ) // Frame of reference UID ee= new Class_DICOM_Element ee.Tag_a="0020" ee.Tag_b="0052" ee.Value=planclass.FrameOfReferenceUID - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update // PositionReferenceIndicator @@ -5457,7 +5457,7 @@ Inherits Thread ee.Tag_a="0020" ee.Tag_b="1040" ee.Value=planclass.PositionReferenceIndicator - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update //----------------------------------------------- @@ -5467,7 +5467,7 @@ Inherits Thread ee.Tag_a="300A" ee.Tag_b="0000" ee.Value="8 " - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update end @@ -5476,7 +5476,7 @@ Inherits Thread ee.Tag_a="300A" ee.Tag_b="0002" ee.Value=planclass.RTPlan_Label - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update // Plan Name @@ -5484,7 +5484,7 @@ Inherits Thread ee.Tag_a="300A" ee.Tag_b="0003" ee.Value=planclass.RTPlan_Name - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update // Plan RTPlan_Description @@ -5492,7 +5492,7 @@ Inherits Thread ee.Tag_a="300A" ee.Tag_b="0004" ee.Value=planclass.RTPlan_Description - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update // Plan RTPlan_Description @@ -5500,7 +5500,7 @@ Inherits Thread ee.Tag_a="300A" ee.Tag_b="0006" ee.Value=planclass.RTPlan_Date - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update // Plan RTPlan_Description @@ -5508,7 +5508,7 @@ Inherits Thread ee.Tag_a="300A" ee.Tag_b="0007" ee.Value=planclass.RTPlan_Time - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update // Plan RTPlan_Description @@ -5516,7 +5516,7 @@ Inherits Thread ee.Tag_a="300A" ee.Tag_b="000C" ee.Value=planclass.RTPlan_Geometry - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update // Plan RTPlan_Description @@ -5524,7 +5524,7 @@ Inherits Thread ee.Tag_a="300A" ee.Tag_b="000E" ee.Value=planclass.Prescription_Description - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update //--------------------------------------------------------------------------------------------------- @@ -5534,7 +5534,7 @@ Inherits Thread ee.Tag_a="300A" ee.Tag_b="0010" ee.Value="1" - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update level1_index=UBound(File.Elements) @@ -5544,7 +5544,7 @@ Inherits Thread ee= new Class_DICOM_Element ee.Tag_a="FFFE" ee.Tag_b="E000" - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update item_level1_index=UBound(File.Elements) @@ -5552,7 +5552,7 @@ Inherits Thread ee= new Class_DICOM_Element ee.Tag_a="3006" ee.Tag_b="0084" - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update ee.Value=Str(planclass.DoseReferenceSequence(k).ReferencedROINumb) cc=ee.Update @@ -5562,7 +5562,7 @@ Inherits Thread ee.Tag_a="300A" ee.Tag_b="0012" - File.Elements.Append ee + File.elements.addrow( ee ) ee.Value=Str(planclass.DoseReferenceSequence(k).DoseReferenceNumber) cc=ee.Update @@ -5570,7 +5570,7 @@ Inherits Thread ee= new Class_DICOM_Element ee.Tag_a="300A" ee.Tag_b="0014" - File.Elements.Append ee + File.elements.addrow( ee ) ee.Value=(planclass.DoseReferenceSequence(k).DoseReferenceStructureType) cc=ee.Update @@ -5578,7 +5578,7 @@ Inherits Thread ee= new Class_DICOM_Element ee.Tag_a="300A" ee.Tag_b="0016" - File.Elements.Append ee + File.elements.addrow( ee ) ee.Value=(planclass.DoseReferenceSequence(k).DoseReferenceDescription) cc=ee.Update @@ -5587,7 +5587,7 @@ Inherits Thread ee= new Class_DICOM_Element ee.Tag_a="300A" ee.Tag_b="0020" - File.Elements.Append ee + File.elements.addrow( ee ) ee.Value=(planclass.DoseReferenceSequence(k).DoseReferenceType) cc=ee.Update @@ -5596,7 +5596,7 @@ Inherits Thread ee= new Class_DICOM_Element ee.Tag_a="300A" ee.Tag_b="0021" - File.Elements.Append ee + File.elements.addrow( ee ) ee.Value=Format(planclass.DoseReferenceSequence(k).ConstraintWeight,"0.0") cc=ee.Update @@ -5607,7 +5607,7 @@ Inherits Thread ee= new Class_DICOM_Element ee.Tag_a="300A" ee.Tag_b="002A" - File.Elements.Append ee + File.elements.addrow( ee ) ee.Value=Format(planclass.DoseReferenceSequence(k).OrganatRiskFullVolumeDose,"0.0") cc=ee.Update @@ -5616,7 +5616,7 @@ Inherits Thread ee= new Class_DICOM_Element ee.Tag_a="300A" ee.Tag_b="002C" - File.Elements.Append ee + File.elements.addrow( ee ) ee.Value=Format(planclass.DoseReferenceSequence(k).OrganatRiskMaximumDose,"0.0") cc=ee.Update @@ -5625,7 +5625,7 @@ Inherits Thread ee= new Class_DICOM_Element ee.Tag_a="300A" ee.Tag_b="002D" - File.Elements.Append ee + File.elements.addrow( ee ) ee.Value=Format(planclass.DoseReferenceSequence(k).OrganatRiskOverdoseVolumeFraction,"0.00") cc=ee.Update @@ -5636,7 +5636,7 @@ Inherits Thread ee= new Class_DICOM_Element ee.Tag_a="300D" ee.Tag_b="0010" - File.Elements.Append ee + File.elements.addrow( ee ) ee.Value="TOMO_HA_01" cc=ee.Update @@ -5645,7 +5645,7 @@ Inherits Thread ee= new Class_DICOM_Element ee.Tag_a="300D" ee.Tag_b="1010" - File.Elements.Append ee + File.elements.addrow( ee ) ee.Value=(planclass.DoseReferenceSequence(k).Tomo_Blocked) cc=ee.Update @@ -5654,7 +5654,7 @@ Inherits Thread ee= new Class_DICOM_Element ee.Tag_a="300D" ee.Tag_b="1012" - File.Elements.Append ee + File.elements.addrow( ee ) ee.Value=Str(planclass.DoseReferenceSequence(k).Tomo_Overlap_Prio,"0") cc=ee.Update @@ -5663,7 +5663,7 @@ Inherits Thread ee= new Class_DICOM_Element ee.Tag_a="300D" ee.Tag_b="1018" - File.Elements.Append ee + File.elements.addrow( ee ) ee.Value=Str(planclass.DoseReferenceSequence(k).Tomo_DV_Pen,"0") cc=ee.Update @@ -5672,7 +5672,7 @@ Inherits Thread ee= new Class_DICOM_Element ee.Tag_a="300D" ee.Tag_b="1019" - File.Elements.Append ee + File.elements.addrow( ee ) ee.Value=Str(planclass.DoseReferenceSequence(k).Tomo_MaxDose_Pen,"0") cc=ee.Update @@ -5685,7 +5685,7 @@ Inherits Thread ee= new Class_DICOM_Element ee.Tag_a="300A" ee.Tag_b="0025" - File.Elements.Append ee + File.elements.addrow( ee ) ee.Value=Format(planclass.DoseReferenceSequence(k).TargetMinDose,"0.0") cc=ee.Update @@ -5694,7 +5694,7 @@ Inherits Thread ee= new Class_DICOM_Element ee.Tag_a="300A" ee.Tag_b="0026" - File.Elements.Append ee + File.elements.addrow( ee ) ee.Value=Format(planclass.DoseReferenceSequence(k).TargetPxDose,"0.0") cc=ee.Update @@ -5703,7 +5703,7 @@ Inherits Thread ee= new Class_DICOM_Element ee.Tag_a="300A" ee.Tag_b="0027" - File.Elements.Append ee + File.elements.addrow( ee ) ee.Value=Format(planclass.DoseReferenceSequence(k).TargetMaxDose,"0.0") cc=ee.Update @@ -5712,7 +5712,7 @@ Inherits Thread ee= new Class_DICOM_Element ee.Tag_a="300A" ee.Tag_b="0028" - File.Elements.Append ee + File.elements.addrow( ee ) ee.Value=Format(planclass.DoseReferenceSequence(k).TargetUnderDoseVolume,"0.000") cc=ee.Update @@ -5722,7 +5722,7 @@ Inherits Thread ee= new Class_DICOM_Element ee.Tag_a="300D" ee.Tag_b="0010" - File.Elements.Append ee + File.elements.addrow( ee ) ee.Value="TOMO_HA_01" cc=ee.Update @@ -5731,7 +5731,7 @@ Inherits Thread ee= new Class_DICOM_Element ee.Tag_a="300D" ee.Tag_b="1010" - File.Elements.Append ee + File.elements.addrow( ee ) ee.Value=(planclass.DoseReferenceSequence(k).Tomo_Blocked) cc=ee.Update @@ -5740,7 +5740,7 @@ Inherits Thread ee= new Class_DICOM_Element ee.Tag_a="300D" ee.Tag_b="1012" - File.Elements.Append ee + File.elements.addrow( ee ) ee.Value=Str(planclass.DoseReferenceSequence(k).Tomo_Overlap_Prio,"0") cc=ee.Update @@ -5749,7 +5749,7 @@ Inherits Thread ee= new Class_DICOM_Element ee.Tag_a="300D" ee.Tag_b="1016" - File.Elements.Append ee + File.elements.addrow( ee ) ee.Value=Str(planclass.DoseReferenceSequence(k).Tomo_MinDose_Pen,"0") cc=ee.Update @@ -5758,7 +5758,7 @@ Inherits Thread ee= new Class_DICOM_Element ee.Tag_a="300D" ee.Tag_b="1017" - File.Elements.Append ee + File.elements.addrow( ee ) ee.Value=Str(planclass.DoseReferenceSequence(k).Tomo_MaxDose_Pen,"0") cc=ee.Update @@ -5767,7 +5767,7 @@ Inherits Thread ee= new Class_DICOM_Element ee.Tag_a="300D" ee.Tag_b="101B" - File.Elements.Append ee + File.elements.addrow( ee ) ee.Value=planclass.DoseReferenceSequence(k).Tomo_101B cc=ee.Update @@ -5790,7 +5790,7 @@ Inherits Thread ee= new Class_DICOM_Element ee.Tag_a="300A" ee.Tag_b="0070" - File.Elements.Append ee + File.elements.addrow( ee ) level1_index=UBound(File.Elements) cc=ee.Update @@ -5800,7 +5800,7 @@ Inherits Thread ee.Tag_a="FFFE" ee.Tag_b="E000" cc=ee.Update - File.Elements.Append ee + File.elements.addrow( ee ) item_level1_index=UBound(File.Elements) // Fraction group number @@ -5808,7 +5808,7 @@ Inherits Thread ee.Tag_a="300A" ee.Tag_b="0071" ee.Value=Str(planclass.FractionGroupSequence(k).fractiongroupnumber) - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update // number of fractions planned @@ -5816,7 +5816,7 @@ Inherits Thread ee.Tag_a="300A" ee.Tag_b="0078" ee.Value=Str(planclass.FractionGroupSequence(k).numberoffractionsplanned) - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update // Number of beams @@ -5824,7 +5824,7 @@ Inherits Thread ee.Tag_a="300A" ee.Tag_b="0080" ee.Value=Str(planclass.FractionGroupSequence(k).numberofbeams) - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update // Number of brachy application @@ -5833,14 +5833,14 @@ Inherits Thread ee.Tag_b="00A0" ee.Value=Str(planclass.FractionGroupSequence(k).NumberofBrachyApp) cc=ee.Update - File.Elements.Append ee + File.elements.addrow( ee ) if UBound(planclass.FractionGroupSequence(k).Referencedbeamsequence)>-1 Then //Referemced beam sequence ee= new Class_DICOM_Element ee.Tag_a="300C" ee.Tag_b="0004" - File.Elements.Append ee + File.elements.addrow( ee ) level2_index=UBound(file.Elements) cc=ee.Update for tt=0 to UBound(planclass.FractionGroupSequence(k).Referencedbeamsequence) @@ -5849,7 +5849,7 @@ Inherits Thread ee.Tag_a="FFFE" ee.Tag_b="E000" cc=ee.Update - File.Elements.Append ee + File.elements.addrow( ee ) item_level2_index=UBound(File.Elements) // beam dose weight point @@ -5858,7 +5858,7 @@ Inherits Thread ee.Tag_b="0082" ee.Value=planclass.FractionGroupSequence(k).Referencedbeamsequence(tt).Beam_Dose_Point cc=ee.Update - File.Elements.Append ee + File.elements.addrow( ee ) // beam dose ee= new Class_DICOM_Element @@ -5866,7 +5866,7 @@ Inherits Thread ee.Tag_b="0084" ee.Value=Format(planclass.FractionGroupSequence(k).Referencedbeamsequence(tt).Beamdose,"-0.000") cc=ee.Update - File.Elements.Append ee + File.elements.addrow( ee ) // beam meterset ee= new Class_DICOM_Element @@ -5874,7 +5874,7 @@ Inherits Thread ee.Tag_b="0086" ee.Value=Str(planclass.FractionGroupSequence(k).Referencedbeamsequence(tt).BeamMeterset) cc=ee.Update - File.Elements.Append ee + File.elements.addrow( ee ) // beam Referencedbeamnumber ee= new Class_DICOM_Element @@ -5882,7 +5882,7 @@ Inherits Thread ee.Tag_b="0006" ee.Value=Str(planclass.FractionGroupSequence(k).Referencedbeamsequence(tt).Referencedbeamnumber) cc=ee.Update - File.Elements.Append ee + File.elements.addrow( ee ) if gPref.DICOM_FileStructure=1 Then // beam Tomo tag @@ -5891,7 +5891,7 @@ Inherits Thread ee.Tag_b="0010" ee.Value="TOMO_HA_01" cc=ee.Update - File.Elements.Append ee + File.elements.addrow( ee ) // beam Tomo tag ee= new Class_DICOM_Element @@ -5899,7 +5899,7 @@ Inherits Thread ee.Tag_b="1040" ee.Value="15.0" cc=ee.Update - File.Elements.Append ee + File.elements.addrow( ee ) // beam Tomo tag ee= new Class_DICOM_Element @@ -5907,7 +5907,7 @@ Inherits Thread ee.Tag_b="1080" ee.Value="0.478333" cc=ee.Update - File.Elements.Append ee + File.elements.addrow( ee ) end // calculate item length @@ -5938,7 +5938,7 @@ Inherits Thread ee= new Class_DICOM_Element ee.Tag_a="300A" ee.Tag_b="00B0" - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update level1_index=UBound(File.Elements) @@ -5948,7 +5948,7 @@ Inherits Thread ee= new Class_DICOM_Element ee.Tag_a="FFFE" ee.Tag_b="E000" - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update item_level1_index=UBound(File.Elements) @@ -5958,7 +5958,7 @@ Inherits Thread ee.Tag_a="0008" ee.Tag_b="0070" ee.Value=planclass.Manufacturer - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update @@ -5967,7 +5967,7 @@ Inherits Thread ee.Tag_a="0008" ee.Tag_b="1090" ee.Value=planclass.Manufacturer_Model_Name - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update @@ -5977,14 +5977,14 @@ Inherits Thread ee.Tag_b="0050" ee.Value="1" cc=ee.Update - File.Elements.Append ee + File.elements.addrow( ee ) level2_index=UBound(File.Elements) for c=0 to UBound(planclass.BeamSequence(k).FluenceModeSQ) // New Flence sequence item ee= new Class_DICOM_Element ee.Tag_a="FFFE" ee.Tag_b="E000" - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update item_level2_index=UBound(File.Elements) @@ -5992,7 +5992,7 @@ Inherits Thread ee.Tag_a="3002" ee.Tag_b="0051" ee.Value=planclass.BeamSequence(k).FluenceModeSQ(c).FluenceMode - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update File.Update_Item_Length(item_level2_index) @@ -6009,7 +6009,7 @@ Inherits Thread ee.Tag_a="300A" ee.Tag_b="00B2" ee.Value=planclass.BeamSequence(k).TreatmentMachineName - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update @@ -6018,7 +6018,7 @@ Inherits Thread ee.Tag_a="300A" ee.Tag_b="00B3" ee.Value=planclass.BeamSequence(k).PrimaryDosimeterUnit - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update @@ -6027,7 +6027,7 @@ Inherits Thread ee.Tag_a="300A" ee.Tag_b="00B4" ee.Value=Format(planclass.BeamSequence(k).SAD,"-0.0") - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update @@ -6039,7 +6039,7 @@ Inherits Thread ee.Tag_b="00B6" ee.Value="1" cc=ee.Update - File.Elements.Append ee + File.elements.addrow( ee ) level2_index=UBound(File.Elements) @@ -6048,7 +6048,7 @@ Inherits Thread ee= new Class_DICOM_Element ee.Tag_a="FFFE" ee.Tag_b="E000" - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update item_level2_index=UBound(File.Elements) @@ -6056,7 +6056,7 @@ Inherits Thread ee.Tag_a="300A" ee.Tag_b="00B8" ee.Value=planclass.BeamSequence(k).BeamLimitingDevice(c).RTBeamLimitingDeviceType - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update @@ -6066,7 +6066,7 @@ Inherits Thread ee.Tag_a="300A" ee.Tag_b="00BA" ee.Value=(planclass.BeamSequence(k).BeamLimitingDevice(c).SourceToBeamLimitingDeviceDistance) - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update @@ -6076,7 +6076,7 @@ Inherits Thread ee.Tag_a="300A" ee.Tag_b="00BC" ee.Value=(planclass.BeamSequence(k).BeamLimitingDevice(c).NumberofLeafjawPairs) - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update @@ -6086,7 +6086,7 @@ Inherits Thread ee.Tag_a="300A" ee.Tag_b="00BE" ee.Value=(planclass.BeamSequence(k).BeamLimitingDevice(c).LeafPositionBoundaries) - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update end @@ -6102,7 +6102,7 @@ Inherits Thread ee.Tag_a="300A" ee.Tag_b="00C0" ee.Value=Str(planclass.BeamSequence(k).BeamNumber,"0") - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update @@ -6111,7 +6111,7 @@ Inherits Thread ee.Tag_a="300A" ee.Tag_b="00C2" ee.Value=planclass.BeamSequence(k).BeamName - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update @@ -6120,7 +6120,7 @@ Inherits Thread ee.Tag_a="300A" ee.Tag_b="00C3" ee.Value=planclass.BeamSequence(k).BeamDescrip - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update @@ -6129,7 +6129,7 @@ Inherits Thread ee.Tag_a="300A" ee.Tag_b="00C4" ee.Value=planclass.BeamSequence(k).BeamType - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update @@ -6138,7 +6138,7 @@ Inherits Thread ee.Tag_a="300A" ee.Tag_b="00C6" ee.Value=planclass.BeamSequence(k).RadiationType - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update @@ -6147,7 +6147,7 @@ Inherits Thread ee.Tag_a="300A" ee.Tag_b="00CE" ee.Value=planclass.BeamSequence(k).TreatmentDeliveryType - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update @@ -6156,7 +6156,7 @@ Inherits Thread ee.Tag_a="300A" ee.Tag_b="00D0" ee.Value=Format(planclass.BeamSequence(k).NumberofWedges,"0") - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update @@ -6165,7 +6165,7 @@ Inherits Thread ee.Tag_a="300A" ee.Tag_b="00E0" ee.Value=Format(planclass.BeamSequence(k).NumberofCompensators,"#") - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update @@ -6174,7 +6174,7 @@ Inherits Thread ee.Tag_a="300A" ee.Tag_b="00ED" ee.Value=Format(planclass.BeamSequence(k).NumberofBoli,"#") - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update @@ -6183,7 +6183,7 @@ Inherits Thread ee.Tag_a="300A" ee.Tag_b="00F0" ee.Value=Format(planclass.BeamSequence(k).NumberofBlocks,"#") - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update @@ -6192,7 +6192,7 @@ Inherits Thread ee.Tag_a="300A" ee.Tag_b="010E" ee.Value=Format(planclass.BeamSequence(k).FinalCimulativeMetersetWeight,"0.0") - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update @@ -6201,7 +6201,7 @@ Inherits Thread ee.Tag_a="300A" ee.Tag_b="0110" ee.Value=Format(planclass.BeamSequence(k).NumberofControlPoints,"0") - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update @@ -6212,7 +6212,7 @@ Inherits Thread ee.Tag_a="300A" ee.Tag_b="0111" cc=ee.Update - File.Elements.Append ee + File.elements.addrow( ee ) level2_index=UBound(File.Elements) for c=0 to UBound(planclass.BeamSequence(k).ControlPointSequence) @@ -6221,7 +6221,7 @@ Inherits Thread ee.Tag_a="FFFE" ee.Tag_b="E000" - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update item_level2_index=UBound(File.Elements) @@ -6233,7 +6233,7 @@ Inherits Thread ee.Tag_b="0112" ee.Value=Format(cps.ControlPointIndex,"#") - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update @@ -6244,7 +6244,7 @@ Inherits Thread ee.Tag_a="300A" ee.Tag_b="0114" ee.Value=Format(cps.NominalBeamEnergy,"0.0") - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update end @@ -6258,7 +6258,7 @@ Inherits Thread ee.Tag_b="011A" ee.Value="1" cc=ee.Update - File.Elements.Append ee + File.elements.addrow( ee ) level3_index=UBound(File.Elements) @@ -6267,7 +6267,7 @@ Inherits Thread ee= new Class_DICOM_Element ee.Tag_a="FFFE" ee.Tag_b="E000" - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update item_level3_index=UBound(File.Elements) @@ -6277,7 +6277,7 @@ Inherits Thread ee.Tag_a="300A" ee.Tag_b="00B8" ee.Value=cps.BeamLimitingDevicePositionSequence(j).RTBeamLimitingDevice - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update @@ -6286,7 +6286,7 @@ Inherits Thread ee.Tag_a="300A" ee.Tag_b="011C" ee.Value=cps.BeamLimitingDevicePositionSequence(j).LeafjawPositions - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update @@ -6306,7 +6306,7 @@ Inherits Thread ee.Tag_a="300A" ee.Tag_b="011E" ee.Value=Format(cps.GantryAngle,"-#.000000") - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update end @@ -6319,7 +6319,7 @@ Inherits Thread ee.Tag_a="300A" ee.Tag_b="011F" ee.Value=cps.GantryRotationDirection - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update @@ -6329,7 +6329,7 @@ Inherits Thread ee.Tag_a="300A" ee.Tag_b="0120" ee.Value=Format(cps.Beamlimitngdeviceangle,"0.0") - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update @@ -6339,7 +6339,7 @@ Inherits Thread ee.Tag_a="300A" ee.Tag_b="0121" ee.Value=cps.BeamLimitingDeviceRotationDirection - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update @@ -6349,7 +6349,7 @@ Inherits Thread ee.Tag_a="300A" ee.Tag_b="0122" ee.Value=Format(cps.PatientSupportAngle,"0.0") - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update @@ -6360,7 +6360,7 @@ Inherits Thread ee.Tag_b="0123" ee.Value=cps.PatientSupportRotationDirection - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update @@ -6370,7 +6370,7 @@ Inherits Thread ee.Tag_b="0125" ee.Value=cps.TableTopEccentricAngle - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update @@ -6380,7 +6380,7 @@ Inherits Thread ee.Tag_b="0126" ee.Value=cps.TableTopEccentricRotationDirection - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update @@ -6389,7 +6389,7 @@ Inherits Thread ee.Tag_a="300A" ee.Tag_b="0128" ee.Value=cps.TableTopVerticalPosition - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update @@ -6399,7 +6399,7 @@ Inherits Thread ee.Tag_a="300A" ee.Tag_b="0129" ee.Value=cps.TableTopLongitudinalPosition - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update @@ -6411,7 +6411,7 @@ Inherits Thread ee.Tag_b="012A" ee.Value=cps.TableTopLateralPosition - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update @@ -6424,7 +6424,7 @@ Inherits Thread ee.Tag_a="300A" ee.Tag_b="012C" ee.Value=cps.IsocenterPosition - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update end @@ -6436,7 +6436,7 @@ Inherits Thread ee.Tag_a="300A" ee.Tag_b="0130" ee.Value=Format(cps.SSD,"0.0##") - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update end @@ -6448,7 +6448,7 @@ Inherits Thread ee.Tag_a="300A" ee.Tag_b="0134" ee.Value=Format(cps.CumulativeMetersetWeight,"0.0000000000") - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update @@ -6459,7 +6459,7 @@ Inherits Thread ee.Tag_a="300D" ee.Tag_b="0010" ee.Value="TOMO_HA_01" - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update @@ -6469,7 +6469,7 @@ Inherits Thread ee.Tag_a="300D" ee.Tag_b="10A7" ee.Value=cps.TomoSinogram - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update end @@ -6484,13 +6484,13 @@ Inherits Thread ee.Tag_a="300C" ee.Tag_b="0050" cc=ee.Update - File.Elements.Append ee + File.elements.addrow( ee ) level3_index=UBound(File.Elements) for g=0 to UBound(planclass.BeamSequence(k).ControlPointSequence(c).ReferencedDoseReferenceSequence) ee= new Class_DICOM_Element ee.Tag_a="FFFE" ee.Tag_b="E000" - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update item_level3_index=UBound(File.Elements) @@ -6499,7 +6499,7 @@ Inherits Thread ee.Tag_a="300A" ee.Tag_b="010C" ee.Value=Format(planclass.BeamSequence(k).ControlPointSequence(c).ReferencedDoseReferenceSequence(g).CumulativeDoseReferenceCoefficient,"0.0####") - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update @@ -6508,7 +6508,7 @@ Inherits Thread ee.Tag_a="300C" ee.Tag_b="0051" ee.Value=Format(planclass.BeamSequence(k).ControlPointSequence(c).ReferencedDoseReferenceSequence(g).ReferencedDoseReferenceNumber,"#") - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update File.Update_Item_Length(item_level3_index) @@ -6535,7 +6535,7 @@ Inherits Thread ee.Tag_a="300C" ee.Tag_b="006A" ee.Value="1" - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update @@ -6546,7 +6546,7 @@ Inherits Thread ee.Tag_a="300D" ee.Tag_b="0010" ee.Value="TOMO_HA_01" - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update @@ -6556,7 +6556,7 @@ Inherits Thread ee.Tag_a="300D" ee.Tag_b="1060" ee.Value="0.287" - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update end @@ -6582,7 +6582,7 @@ Inherits Thread ee.Tag_a="300A" ee.Tag_b="0180" cc=ee.Update - File.Elements.Append ee + File.elements.addrow( ee ) level1_index=UBound(File.Elements) @@ -6591,7 +6591,7 @@ Inherits Thread ee= new Class_DICOM_Element ee.Tag_a="FFFE" ee.Tag_b="E000" - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update item_level1_index=UBound(File.Elements) @@ -6601,7 +6601,7 @@ Inherits Thread ee.Tag_a="0018" ee.Tag_b="5100" ee.Value=planclass.PatientSetupSequence(k).PatientPosition - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update @@ -6610,7 +6610,7 @@ Inherits Thread ee.Tag_a="300A" ee.Tag_b="0182" ee.Value=str(planclass.PatientSetupSequence(k).PatientSetupNumber) - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update @@ -6619,7 +6619,7 @@ Inherits Thread ee.Tag_a="300A" ee.Tag_b="01B0" ee.Value=planclass.PatientSetupSequence(k).SetupTechnique - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update @@ -6629,7 +6629,7 @@ Inherits Thread ee.Tag_b="01B4" ee.Value="1" cc=ee.Update - File.Elements.Append ee + File.elements.addrow( ee ) level2_index=UBound(File.Elements) @@ -6638,7 +6638,7 @@ Inherits Thread ee= new Class_DICOM_Element ee.Tag_a="FFFE" ee.Tag_b="E000" - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update item_level2_index=UBound(File.Elements) @@ -6648,7 +6648,7 @@ Inherits Thread ee.Tag_a="300A" ee.Tag_b="01B6" ee.Value=planclass.PatientSetupSequence(k).SetupDeviceSequence(c).SetupDeviceType - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update @@ -6657,7 +6657,7 @@ Inherits Thread ee.Tag_a="300A" ee.Tag_b="01B8" ee.Value=planclass.PatientSetupSequence(k).SetupDeviceSequence(c).SetupDevicelabel - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update @@ -6666,7 +6666,7 @@ Inherits Thread ee.Tag_a="300A" ee.Tag_b="01BC" ee.Value=planclass.PatientSetupSequence(k).SetupDeviceSequence(c).SetupDeviceParameter - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update @@ -6688,7 +6688,7 @@ Inherits Thread ee.Tag_b="0000" ee.Value=" " cc=ee.Update - File.Elements.Append ee + File.elements.addrow( ee ) end //--------------------------------------------------------------------------------------------------- // Reference Structure Set sequence @@ -6697,7 +6697,7 @@ Inherits Thread ee.Tag_a="300C" ee.Tag_b="0060" cc=ee.Update - File.Elements.Append ee + File.elements.addrow( ee ) level1_index=UBound(File.Elements) for c=0 to UBound(planclass.ReferencedStructureSetSequence) @@ -6705,7 +6705,7 @@ Inherits Thread ee= new Class_DICOM_Element ee.Tag_a="FFFE" ee.Tag_b="E000" - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update item_level1_index=UBound(File.Elements) @@ -6714,14 +6714,14 @@ Inherits Thread ee.Tag_b="1150" ee.Value=planclass.ReferencedStructureSetSequence(0).ReferencedSOPClassUID cc=ee.Update - File.Elements.Append ee + File.elements.addrow( ee ) ee= new Class_DICOM_Element ee.Tag_a="0008" ee.Tag_b="1155" ee.Value=planclass.ReferencedStructureSetSequence(0).ReferencedSOPInstanceUID cc=ee.Update - File.Elements.Append ee + File.elements.addrow( ee ) File.Update_item_length(item_level1_index) @@ -6737,7 +6737,7 @@ Inherits Thread ee.Tag_a="300C" ee.Tag_b="0080" cc=ee.Update - File.Elements.Append ee + File.elements.addrow( ee ) level1_index=UBound(File.Elements) for c=0 to UBound(planclass.ReferencedDoseSequence) @@ -6745,7 +6745,7 @@ Inherits Thread ee= new Class_DICOM_Element ee.Tag_a="FFFE" ee.Tag_b="E000" - File.Elements.Append ee + File.elements.addrow( ee ) cc=ee.Update item_level1_index=UBound(File.Elements) @@ -6754,14 +6754,14 @@ Inherits Thread ee.Tag_b="1150" ee.Value=planclass.ReferencedDoseSequence(0).ReferencedSOPClassUID cc=ee.Update - File.Elements.Append ee + File.elements.addrow( ee ) ee= new Class_DICOM_Element ee.Tag_a="0008" ee.Tag_b="1155" ee.Value=planclass.ReferencedDoseSequence(0).ReferencedSOPInstanceUID cc=ee.Update - File.Elements.Append ee + File.elements.addrow( ee ) File.Update_item_length(item_level1_index) @@ -6778,42 +6778,42 @@ Inherits Thread ee.Tag_b="0000" ee.Value="T " cc=ee.Update - File.Elements.Append ee + File.elements.addrow( ee ) ee= new Class_DICOM_Element ee.Tag_a="300D" ee.Tag_b="0010" ee.Value="TOMO_HA_01" cc=ee.Update - File.Elements.Append ee + File.elements.addrow( ee ) ee= new Class_DICOM_Element ee.Tag_a="300D" ee.Tag_b="1014" ee.Value="2.4 " cc=ee.Update - File.Elements.Append ee + File.elements.addrow( ee ) ee= new Class_DICOM_Element ee.Tag_a="300D" ee.Tag_b="10A4" ee.Value="HELICAL " cc=ee.Update - File.Elements.Append ee + File.elements.addrow( ee ) ee= new Class_DICOM_Element ee.Tag_a="300D" ee.Tag_b="10A9" ee.Value="-0.34179688\69.6582\-52.500004" cc=ee.Update - File.Elements.Append ee + File.elements.addrow( ee ) ee= new Class_DICOM_Element ee.Tag_a="300E" ee.Tag_b="0000" ee.Value="F " cc=ee.Update - File.Elements.Append ee + File.elements.addrow( ee ) end //-------------------------------------------------------------------------------------------------- @@ -6822,28 +6822,28 @@ Inherits Thread ee.Tag_b="0002" ee.Value=planclass.ApprovalStatus cc=ee.Update - File.Elements.Append ee + File.elements.addrow( ee ) ee= new Class_DICOM_Element ee.Tag_a="300E" ee.Tag_b="0004" ee.Value=planclass.ReviewDate cc=ee.Update - File.Elements.Append ee + File.elements.addrow( ee ) ee= new Class_DICOM_Element ee.Tag_a="300E" ee.Tag_b="0005" ee.Value=planclass.ReviewTime cc=ee.Update - File.Elements.Append ee + File.elements.addrow( ee ) ' ee= new Class_DICOM_Element ee.Tag_a="300E" ee.Tag_b="0008" ee.Value=planclass.ReviewerName cc=ee.Update - File.Elements.Append ee + File.elements.addrow( ee ) File.UID_Name=planclass.SOPInstanceUID File.TempName="RTPLAN_"+File.UID_Name+".dcm" @@ -6874,238 +6874,238 @@ Inherits Thread for i=0 to UBound(RT_Structures) // look for Image .dcm files File=new Class_DICOM_File ee=new Class_DICOM_Element - File.Elements.Append ee + File.elements.addrow( ee ) ee.Tag_a="0008" ee.Tag_b="0000" ee.Value=RT_Structures(i).IdentifyingGroupLength found=ee.Update ee=new Class_DICOM_Element - File.Elements.Append ee + File.elements.addrow( ee ) ee.Tag_a="0008" ee.Tag_b="0012" ee.Value=RT_Structures(i).InstanceCreationDate found=ee.Update ee=new Class_DICOM_Element - File.Elements.Append ee + File.elements.addrow( ee ) ee.Tag_a="0008" ee.Tag_b="0013" ee.Value=RT_Structures(i).InstanceCreationTime found=ee.Update ee=new Class_DICOM_Element - File.Elements.Append ee + File.elements.addrow( ee ) ee.Tag_a="0008" ee.Tag_b="0016" ee.Value=RT_Structures(i).SOPClassUID found=ee.Update ee=new Class_DICOM_Element - File.Elements.Append ee + File.elements.addrow( ee ) ee.Tag_a="0008" ee.Tag_b="0018" ee.Value=RT_Structures(i).SOPInstanceUID found=ee.Update ee=new Class_DICOM_Element - File.Elements.Append ee + File.elements.addrow( ee ) ee.Tag_a="0008" ee.Tag_b="0020" ee.Value=RT_Structures(i).StudyDate found=ee.Update ee=new Class_DICOM_Element - File.Elements.Append ee + File.elements.addrow( ee ) ee.Tag_a="0008" ee.Tag_b="0030" ee.Value=RT_Structures(i).StudyTime found=ee.Update ee=new Class_DICOM_Element - File.Elements.Append ee + File.elements.addrow( ee ) ee.Tag_a="0008" ee.Tag_b="0050" ee.Value=RT_Structures(i).AcquisitionTime found=ee.Update ee=new Class_DICOM_Element - File.Elements.Append ee + File.elements.addrow( ee ) ee.Tag_a="0008" ee.Tag_b="0060" ee.Value=RT_Structures(i).Modality found=ee.Update ee=new Class_DICOM_Element - File.Elements.Append ee + File.elements.addrow( ee ) ee.Tag_a="0008" ee.Tag_b="0070" ee.Value=RT_Structures(i).Manufacturer found=ee.Update ee=new Class_DICOM_Element - File.Elements.Append ee + File.elements.addrow( ee ) ee.Tag_a="0008" ee.Tag_b="0090" ee.Value=RT_Structures(i).ReferringPhysician found=ee.Update ee=new Class_DICOM_Element - File.Elements.Append ee + File.elements.addrow( ee ) ee.Tag_a="0008" ee.Tag_b="1030" ee.Value=RT_Structures(i).StudyDescription found=ee.Update ee=new Class_DICOM_Element - File.Elements.Append ee + File.elements.addrow( ee ) ee.Tag_a="0008" ee.Tag_b="103E" ee.Value=RT_Structures(i).SeriesDescription found=ee.Update ee=new Class_DICOM_Element - File.Elements.Append ee + File.elements.addrow( ee ) ee.Tag_a="0008" ee.Tag_b="1048" ee.Value=RT_Structures(i).Physician found=ee.Update ee=new Class_DICOM_Element - File.Elements.Append ee + File.elements.addrow( ee ) ee.Tag_a="0010" ee.Tag_b="0000" ee.Value=str(RT_Structures(i).PatientGroupLength) found=ee.Update ee=new Class_DICOM_Element - File.Elements.Append ee + File.elements.addrow( ee ) ee.Tag_a="0010" ee.Tag_b="0010" ee.Value=RT_Structures(i).PatientName found=ee.Update ee=new Class_DICOM_Element - File.Elements.Append ee + File.elements.addrow( ee ) ee.Tag_a="0010" ee.Tag_b="0020" ee.Value=RT_Structures(i).PatientID found=ee.Update ee=new Class_DICOM_Element - File.Elements.Append ee + File.elements.addrow( ee ) ee.Tag_a="0010" ee.Tag_b="0030" ee.Value=RT_Structures(i).PatientBirthDate found=ee.Update ee=new Class_DICOM_Element - File.Elements.Append ee + File.elements.addrow( ee ) ee.Tag_a="0010" ee.Tag_b="0040" ee.Value=RT_Structures(i).sex found=ee.Update ee=new Class_DICOM_Element - File.Elements.Append ee + File.elements.addrow( ee ) ee.Tag_a="0010" ee.Tag_b="1010" ee.Value=RT_Structures(i).Age found=ee.Update ee=new Class_DICOM_Element - File.Elements.Append ee + File.elements.addrow( ee ) ee.Tag_a="0018" ee.Tag_b="0000" ee.Value=RT_Structures(i).AcquisitionGroupLength found=ee.Update ee=new Class_DICOM_Element - File.Elements.Append ee + File.elements.addrow( ee ) ee.Tag_a="0018" ee.Tag_b="1020" ee.Value=RT_Structures(i).SoftwareVersion found=ee.Update ee=new Class_DICOM_Element - File.Elements.Append ee + File.elements.addrow( ee ) ee.Tag_a="0020" ee.Tag_b="0000" ee.Value=RT_Structures(i).RelationshipGroupLength found=ee.Update ee=new Class_DICOM_Element - File.Elements.Append ee + File.elements.addrow( ee ) ee.Tag_a="0020" ee.Tag_b="000D" ee.Value=RT_Structures(i).StudyInstanceUID found=ee.Update ee=new Class_DICOM_Element - File.Elements.Append ee + File.elements.addrow( ee ) ee.Tag_a="0020" ee.Tag_b="000E" ee.Value=RT_Structures(i).SeriesInstanceUID found=ee.Update ee=new Class_DICOM_Element - File.Elements.Append ee + File.elements.addrow( ee ) ee.Tag_a="0020" ee.Tag_b="0010" ee.Value=RT_Structures(i).StudyID found=ee.Update ee=new Class_DICOM_Element - File.Elements.Append ee + File.elements.addrow( ee ) ee.Tag_a="0020" ee.Tag_b="0011" ee.Value=RT_Structures(i).SeriesNumber found=ee.Update ee=new Class_DICOM_Element - File.Elements.Append ee + File.elements.addrow( ee ) ee.Tag_a="0020" ee.Tag_b="0013" ee.Value=str(RT_Structures(i).InstanceNumber,"#") found=ee.Update ee=new Class_DICOM_Element - File.Elements.Append ee + File.elements.addrow( ee ) ee.Tag_a="3006" ee.Tag_b="0000" ee.Value=RT_Structures(i).Tomo3006 found=ee.Update ee=new Class_DICOM_Element - File.Elements.Append ee + File.elements.addrow( ee ) ee.Tag_a="3006" ee.Tag_b="0002" ee.Value=RT_Structures(i).StructureSetLabel found=ee.Update ee=new Class_DICOM_Element - File.Elements.Append ee + File.elements.addrow( ee ) ee.Tag_a="3006" ee.Tag_b="0004" ee.Value=RT_Structures(i).StructureSetName found=ee.Update ee=new Class_DICOM_Element - File.Elements.Append ee + File.elements.addrow( ee ) ee.Tag_a="3006" ee.Tag_b="0006" ee.Value=RT_Structures(i).StructureSetDescription found=ee.Update ee=new Class_DICOM_Element - File.Elements.Append ee + File.elements.addrow( ee ) ee.Tag_a="3006" ee.Tag_b="0008" ee.Value=RT_Structures(i).StrutureSetDate found=ee.Update ee=new Class_DICOM_Element - File.Elements.Append ee + File.elements.addrow( ee ) ee.Tag_a="3006" ee.Tag_b="0009" ee.Value=RT_Structures(i).StrutureSetTime @@ -7113,7 +7113,7 @@ Inherits Thread if UBound(RT_Structures(i).RFORS)>-1 Then ee=new Class_DICOM_Element - File.Elements.Append ee + File.elements.addrow( ee ) ee.Tag_a="3006" ee.Tag_b="0010" ee.Value="1" @@ -7123,7 +7123,7 @@ Inherits Thread for k=0 to UBound(RT_Structures(i).RFORS) ee=new Class_DICOM_Element - File.Elements.Append ee + File.elements.addrow( ee ) ee.Tag_a="FFFE" ee.Tag_b="E000" ee.Value="1" @@ -7132,7 +7132,7 @@ Inherits Thread item_level1_length=0 ee=new Class_DICOM_Element - File.Elements.Append ee + File.elements.addrow( ee ) ee.Tag_a="0020" ee.Tag_b="0052" ee.Value=RT_Structures(i).RFORS(k).FrameofReferenceUID @@ -7142,7 +7142,7 @@ Inherits Thread if UBound(RT_Structures(i).RFORS(k).ReferencedStudySequence)>-1 Then ee=new Class_DICOM_Element - File.Elements.Append ee + File.elements.addrow( ee ) ee.Tag_a="3006" ee.Tag_b="0012" ee.Value=RT_Structures(i).StrutureSetTime @@ -7152,7 +7152,7 @@ Inherits Thread for j=0 to UBound(RT_Structures(i).RFORS(k).ReferencedStudySequence) ee=new Class_DICOM_Element - File.Elements.Append ee + File.elements.addrow( ee ) ee.Tag_a="FFFE" ee.Tag_b="E000" ee.Value="1" @@ -7162,7 +7162,7 @@ Inherits Thread rstudys=RT_Structures(i).RFORS(k).ReferencedStudySequence(j) ee=new Class_DICOM_Element - File.Elements.Append ee + File.elements.addrow( ee ) ee.Tag_a="0008" ee.Tag_b="1150" ee.Value=rstudys.ReferencedSOPClassUID @@ -7170,7 +7170,7 @@ Inherits Thread item_level2_length=item_level2_length+ee.Element_Length ee=new Class_DICOM_Element - File.Elements.Append ee + File.elements.addrow( ee ) ee.Tag_a="0008" ee.Tag_b="1155" ee.Value=rstudys.ReferencedSOPInstanceUID @@ -7180,7 +7180,7 @@ Inherits Thread if UBound(rstudys.RTReferencedSeriesSequence)>-1 Then ee=new Class_DICOM_Element - File.Elements.Append ee + File.elements.addrow( ee ) ee.Tag_a="3006" ee.Tag_b="0014" ee.Value="1" @@ -7190,7 +7190,7 @@ Inherits Thread for x=0 to UBound(rstudys.RTReferencedSeriesSequence) ee=new Class_DICOM_Element - File.Elements.Append ee + File.elements.addrow( ee ) ee.Tag_a="FFFE" ee.Tag_b="E000" ee.Value="1" @@ -7199,7 +7199,7 @@ Inherits Thread item_level3_length=0 ee=new Class_DICOM_Element - File.Elements.Append ee + File.elements.addrow( ee ) ee.Tag_a="0020" ee.Tag_b="000E" ee.Value=rstudys.RTReferencedSeriesSequence(x).SeriesInstanceUID @@ -7209,7 +7209,7 @@ Inherits Thread if UBound(rstudys.RTReferencedSeriesSequence(x).ContourImageSequence)>-1 Then ee=new Class_DICOM_Element - File.Elements.Append ee + File.elements.addrow( ee ) ee.Tag_a="3006" ee.Tag_b="0016" ee.Value="1" @@ -7219,7 +7219,7 @@ Inherits Thread for y=0 to UBound(rstudys.RTReferencedSeriesSequence(x).ContourImageSequence) ee=new Class_DICOM_Element - File.Elements.Append ee + File.elements.addrow( ee ) ee.Tag_a="FFFE" ee.Tag_b="E000" ee.Value="1" @@ -7228,7 +7228,7 @@ Inherits Thread item_level4_length=0 ee=new Class_DICOM_Element - File.Elements.Append ee + File.elements.addrow( ee ) ee.Tag_a="0008" ee.Tag_b="1150" ee.Value=rstudys.RTReferencedSeriesSequence(x).ContourImageSequence(y).ReferencedSOPClassUID @@ -7236,7 +7236,7 @@ Inherits Thread item_level4_length=item_level4_length+ee.Element_Length ee=new Class_DICOM_Element - File.Elements.Append ee + File.elements.addrow( ee ) ee.Tag_a="0008" ee.Tag_b="1155" ee.Value=rstudys.RTReferencedSeriesSequence(x).ContourImageSequence(y).ReferencedSOPInstanceUID @@ -7279,7 +7279,7 @@ Inherits Thread if UBound(RT_Structures(i).SetROISequence)>-1 Then ee=new Class_DICOM_Element - File.Elements.Append ee + File.elements.addrow( ee ) ee.Tag_a="3006" ee.Tag_b="0020" ee.Value="1" @@ -7289,7 +7289,7 @@ Inherits Thread for x=0 to UBound(RT_Structures(i).SetROISequence) ee=new Class_DICOM_Element - File.Elements.Append ee + File.elements.addrow( ee ) ee.Tag_a="FFFE" ee.Tag_b="E000" ee.Value="1" @@ -7298,7 +7298,7 @@ Inherits Thread item_level1_length=0 ee=new Class_DICOM_Element - File.Elements.Append ee + File.elements.addrow( ee ) ee.Tag_a="3006" ee.Tag_b="0022" ee.Value=str(RT_Structures(i).SetROISequence(x).ROI_num) @@ -7306,7 +7306,7 @@ Inherits Thread item_level1_length=item_level1_length+ee.Element_Length ee=new Class_DICOM_Element - File.Elements.Append ee + File.elements.addrow( ee ) ee.Tag_a="3006" ee.Tag_b="0024" ee.Value=RT_Structures(i).SetROISequence(x).ReferencedFrameofRefUID @@ -7314,7 +7314,7 @@ Inherits Thread item_level1_length=item_level1_length+ee.Element_Length ee=new Class_DICOM_Element - File.Elements.Append ee + File.elements.addrow( ee ) ee.Tag_a="3006" ee.Tag_b="0026" ee.Value=RT_Structures(i).SetROISequence(x).ROIname @@ -7322,7 +7322,7 @@ Inherits Thread item_level1_length=item_level1_length+ee.Element_Length ee=new Class_DICOM_Element - File.Elements.Append ee + File.elements.addrow( ee ) ee.Tag_a="3006" ee.Tag_b="0036" ee.Value=(RT_Structures(i).SetROISequence(x).ROI_Algorithm) @@ -7344,7 +7344,7 @@ Inherits Thread if UBound(RT_Structures(i).ROIContourSequence)>-1 Then ee=new Class_DICOM_Element - File.Elements.Append ee + File.elements.addrow( ee ) ee.Tag_a="3006" ee.Tag_b="0039" ee.Value="1" @@ -7354,7 +7354,7 @@ Inherits Thread for x=0 to UBound(RT_Structures(i).ROIContourSequence) ee=new Class_DICOM_Element - File.Elements.Append ee + File.elements.addrow( ee ) ee.Tag_a="FFFE" ee.Tag_b="E000" ee.Value="1" @@ -7363,7 +7363,7 @@ Inherits Thread item_level1_length=0 ee=new Class_DICOM_Element - File.Elements.Append ee + File.elements.addrow( ee ) ee.Tag_a="3006" ee.Tag_b="002A" ee.Value=str(RT_Structures(i).ROIContourSequence(x).ROIColour.red)+"\"+str(RT_Structures(i).ROIContourSequence(x).ROIColour.green)+"\"+str(RT_Structures(i).ROIContourSequence(x).ROIColour.blue) @@ -7372,7 +7372,7 @@ Inherits Thread if UBound(RT_Structures(i).ROIContourSequence(x).ContourSequence)>-1 Then ee=new Class_DICOM_Element - File.Elements.Append ee + File.elements.addrow( ee ) ee.Tag_a="3006" ee.Tag_b="0040" ee.Value="1" @@ -7383,7 +7383,7 @@ Inherits Thread for j=0 to UBound(RT_Structures(i).ROIContourSequence(x).ContourSequence) cs=RT_Structures(i).ROIContourSequence(x).ContourSequence(j) ee=new Class_DICOM_Element - File.Elements.Append ee + File.elements.addrow( ee ) ee.Tag_a="FFFE" ee.Tag_b="E000" ee.Value="1" @@ -7393,7 +7393,7 @@ Inherits Thread if UBound(cs.contourimagesequence)>-1 Then ee=new Class_DICOM_Element - File.Elements.Append ee + File.elements.addrow( ee ) ee.Tag_a="3006" ee.Tag_b="0016" ee.Value="1" @@ -7403,7 +7403,7 @@ Inherits Thread for k=0 to UBound(cs.contourimagesequence) ee=new Class_DICOM_Element - File.Elements.Append ee + File.elements.addrow( ee ) ee.Tag_a="FFFE" ee.Tag_b="E000" ee.Value="1" @@ -7412,7 +7412,7 @@ Inherits Thread item_level3_length=0 ee=new Class_DICOM_Element - File.Elements.Append ee + File.elements.addrow( ee ) ee.Tag_a="0008" ee.Tag_b="1150" ee.Value=cs.contourimagesequence(k).ReferencedSOPClassUID @@ -7420,7 +7420,7 @@ Inherits Thread item_level3_length=item_level3_length+ee.Element_Length ee=new Class_DICOM_Element - File.Elements.Append ee + File.elements.addrow( ee ) ee.Tag_a="0008" ee.Tag_b="1155" ee.Value=cs.contourimagesequence(k).ReferencedSOPInstanceUID @@ -7436,7 +7436,7 @@ Inherits Thread end ee=new Class_DICOM_Element - File.Elements.Append ee + File.elements.addrow( ee ) ee.Tag_a="3006" ee.Tag_b="0042" ee.Value=cs.GeometricType @@ -7444,7 +7444,7 @@ Inherits Thread item_level2_length=item_level2_length+ee.Element_Length ee=new Class_DICOM_Element - File.Elements.Append ee + File.elements.addrow( ee ) ee.Tag_a="3006" ee.Tag_b="0044" ee.Value=cs.SlabThickness @@ -7452,7 +7452,7 @@ Inherits Thread item_level2_length=item_level2_length+ee.Element_Length ee=new Class_DICOM_Element - File.Elements.Append ee + File.elements.addrow( ee ) ee.Tag_a="3006" ee.Tag_b="0045" ee.Value=cs.OffsetVector @@ -7460,7 +7460,7 @@ Inherits Thread item_level2_length=item_level2_length+ee.Element_Length ee=new Class_DICOM_Element - File.Elements.Append ee + File.elements.addrow( ee ) ee.Tag_a="3006" ee.Tag_b="0046" ee.Value=str(cs.numberofcontourpoints) @@ -7468,7 +7468,7 @@ Inherits Thread item_level2_length=item_level2_length+ee.Element_Length ee=new Class_DICOM_Element - File.Elements.Append ee + File.elements.addrow( ee ) ee.Tag_a="3006" ee.Tag_b="0050" ee.Value=cs.data @@ -7487,7 +7487,7 @@ Inherits Thread ee=new Class_DICOM_Element - File.Elements.Append ee + File.elements.addrow( ee ) ee.Tag_a="3006" ee.Tag_b="0084" ee.Value=RT_Structures(i).ROIContourSequence(x).ReferencedROINumber @@ -7506,7 +7506,7 @@ Inherits Thread if UBound(RT_Structures(i).ROI_Obs_Seq)>-1 Then ee=new Class_DICOM_Element - File.Elements.Append ee + File.elements.addrow( ee ) ee.Tag_a="3006" ee.Tag_b="0080" ee.Value="1" @@ -7516,7 +7516,7 @@ Inherits Thread for k=0 to UBound(RT_Structures(i).ROI_Obs_Seq) ee=new Class_DICOM_Element - File.Elements.Append ee + File.elements.addrow( ee ) ee.Tag_a="FFFE" ee.Tag_b="E000" ee.Value="1" @@ -7525,7 +7525,7 @@ Inherits Thread item_level1_length=0 ee=new Class_DICOM_Element - File.Elements.Append ee + File.elements.addrow( ee ) ee.Tag_a="3006" ee.Tag_b="0082" ee.Value=str(RT_Structures(i).ROI_Obs_Seq(k).Ob_num) @@ -7533,7 +7533,7 @@ Inherits Thread item_level1_length=item_level1_length+ee.Element_Length ee=new Class_DICOM_Element - File.Elements.Append ee + File.elements.addrow( ee ) ee.Tag_a="3006" ee.Tag_b="0084" ee.Value=(RT_Structures(i).ROI_Obs_Seq(k).ReferencedROI_Num) @@ -7541,7 +7541,7 @@ Inherits Thread item_level1_length=item_level1_length+ee.Element_Length ee=new Class_DICOM_Element - File.Elements.Append ee + File.elements.addrow( ee ) ee.Tag_a="3006" ee.Tag_b="00A4" ee.Value=(RT_Structures(i).ROI_Obs_Seq(k).RT_ROI_Inter_Type) @@ -7549,7 +7549,7 @@ Inherits Thread item_level1_length=item_level1_length+ee.Element_Length ee=new Class_DICOM_Element - File.Elements.Append ee + File.elements.addrow( ee ) ee.Tag_a="3006" ee.Tag_b="00A6" ee.Value=(RT_Structures(i).ROI_Obs_Seq(k).ROI_Inter) @@ -7559,7 +7559,7 @@ Inherits Thread if UBound(RT_Structures(i).ROI_Obs_Seq(k).ROI_Phys_Prop_Sequ)>-1 Then ee=new Class_DICOM_Element - File.Elements.Append ee + File.elements.addrow( ee ) ee.Tag_a="3006" ee.Tag_b="00B0" ee.Value="1" @@ -7569,7 +7569,7 @@ Inherits Thread for x=0 to UBound(RT_Structures(i).ROI_Obs_Seq(k).ROI_Phys_Prop_Sequ) ee=new Class_DICOM_Element - File.Elements.Append ee + File.elements.addrow( ee ) ee.Tag_a="FFFE" ee.Tag_b="E000" ee.Value="1" @@ -7578,7 +7578,7 @@ Inherits Thread item_level2_length=0 ee=new Class_DICOM_Element - File.Elements.Append ee + File.elements.addrow( ee ) ee.Tag_a="3006" ee.Tag_b="00B2" ee.Value=(RT_Structures(i).ROI_Obs_Seq(k).ROI_Phys_Prop_Sequ(x).ROI_Phys_Prop) @@ -7586,7 +7586,7 @@ Inherits Thread item_level2_length=item_level2_length+ee.Element_Length ee=new Class_DICOM_Element - File.Elements.Append ee + File.elements.addrow( ee ) ee.Tag_a="3006" ee.Tag_b="00B4" ee.Value=(RT_Structures(i).ROI_Obs_Seq(k).ROI_Phys_Prop_Sequ(x).ROI_Phys_Prop_Value) diff --git a/DOSXYZnrc/Thread_DOSXYZ.xojo_code b/DOSXYZnrc/Thread_DOSXYZ.xojo_code index 3f74e33..c74bbd9 100644 --- a/DOSXYZnrc/Thread_DOSXYZ.xojo_code +++ b/DOSXYZnrc/Thread_DOSXYZ.xojo_code @@ -428,11 +428,11 @@ Inherits Thread ggo=dosxyz_get_shell_Variables(egsphant_index,beam) cc.command="rm -f "+name+"*" - MMCTP_Shell_Run.All.Append cc + MMCTP_Shell_Run.All.Addrow( cc ) ggo=dosxyz_get_shell_Variables(egsphant_index,beam) cc.command="rm -f -r *"+name+"*" if ggo Then - MMCTP_Shell_Run.All.Append cc + MMCTP_Shell_Run.All.Addrow( cc ) end elseif DOSXYZ(egsphant_index).DOSXYZ_Input(beam).IRESTART=4 Then @@ -448,7 +448,7 @@ Inherits Thread ggo=dosxyz_get_shell_Variables(egsphant_index,beam) if ggo Then cc.command="rm -f "+name - MMCTP_Shell_Run.All.Append cc + MMCTP_Shell_Run.All.Addrow( cc ) end end End Sub @@ -2601,7 +2601,7 @@ Inherits Thread else cc.FTP_Remote_Path=cc.shell.egsnrc_folder_path+"/dosxyznrc/"+f.Name end - MMCTP_Shell_Run.All.Append cc + MMCTP_Shell_Run.All.Addrow( cc ) '//Change mode to exe g=dosxyz_get_shell_Variables(egsphant,beam) @@ -2611,7 +2611,7 @@ Inherits Thread cc.dir=cc.shell.egsnrc_folder_path+"/dosxyznrc/" end cc.command="chmod u+x " +f.Name - MMCTP_Shell_Run.All.Append cc + MMCTP_Shell_Run.All.Addrow( cc ) End Sub #tag EndMethod @@ -3169,7 +3169,7 @@ Inherits Thread cc.inpfilename=name cc.dos_egsphant_index=egsphant_index cc.beam_num=beam - MMCTP_Shell_Run.All.Append cc + MMCTP_Shell_Run.All.Addrow( cc ) gDOSXYZ.DOSXYZ(egsphant_index).Write_DOSXYZ Window_Treatment.MC_dosxyz_beam_progress @@ -3286,7 +3286,7 @@ Inherits Thread cc.dos_egsphant_index=egs_index cc.beam_num=beam cc.inpfilename=inpfilename - MMCTP_Shell_Run.All.Append cc + MMCTP_Shell_Run.All.Addrow( cc ) End Sub #tag EndMethod @@ -3407,7 +3407,7 @@ Inherits Thread cc.FTP_Files=f cc.dos_inputfile=true cc.inpfilename=name - MMCTP_Shell_Run.All.Append cc + MMCTP_Shell_Run.All.Addrow( cc ) End Sub @@ -3454,7 +3454,7 @@ Inherits Thread cc.FTP_Local_Path=path cc.FTP_Remote_Path=cc.dir+name cc.FTP_Files=f - MMCTP_Shell_Run.All.Append cc + MMCTP_Shell_Run.All.Addrow( cc ) End Sub #tag EndMethod @@ -3489,7 +3489,7 @@ Inherits Thread cc.inpfilename=f.Name cc.dos_egsphant_index=egsphant_num cc.dos_egsphant_Upload=True - MMCTP_Shell_Run.All.Append cc + MMCTP_Shell_Run.All.Addrow( cc ) End Sub #tag EndMethod diff --git a/DOSXYZnrc/Window_DOSXYZ_EGSPhant_Materials.xojo_window b/DOSXYZnrc/Window_DOSXYZ_EGSPhant_Materials.xojo_window index 77ba384..0ffcea1 100644 --- a/DOSXYZnrc/Window_DOSXYZ_EGSPhant_Materials.xojo_window +++ b/DOSXYZnrc/Window_DOSXYZ_EGSPhant_Materials.xojo_window @@ -2064,7 +2064,7 @@ End for i=0 to UBound(gDOSXYZ.dosxyz_materials) MI = New MenuItem MI.Text = gDOSXYZ.dosxyz_materials(i).Material_Name - base.Append MI + base.addmenu( MI ) next Return True end diff --git a/DOSXYZnrc/Window_DOSXYZ_Maininputs_source10.xojo_window b/DOSXYZnrc/Window_DOSXYZ_Maininputs_source10.xojo_window index 2a17358..442a74e 100644 --- a/DOSXYZnrc/Window_DOSXYZ_Maininputs_source10.xojo_window +++ b/DOSXYZnrc/Window_DOSXYZ_Maininputs_source10.xojo_window @@ -967,10 +967,10 @@ End MI = New MenuItem MI.Text = "Add row" - base.Append MI + base.addmenu( MI ) MI = New MenuItem MI.Text = "Delete row" - base.Append MI + base.addmenu( MI ) End Function #tag EndEvent #tag Event diff --git a/DOSXYZnrc/Window_DOSXYZ_Maininputs_source8.xojo_window b/DOSXYZnrc/Window_DOSXYZ_Maininputs_source8.xojo_window index 64138b1..f49e3cf 100644 --- a/DOSXYZnrc/Window_DOSXYZ_Maininputs_source8.xojo_window +++ b/DOSXYZnrc/Window_DOSXYZ_Maininputs_source8.xojo_window @@ -967,10 +967,10 @@ End MI = New MenuItem MI.Text = "Add row" - base.Append MI + base.addmenu( MI ) MI = New MenuItem MI.Text = "Delete row" - base.Append MI + base.addmenu( MI ) End Function #tag EndEvent #tag Event diff --git a/MERT/Window_EMET_Results.xojo_window b/MERT/Window_EMET_Results.xojo_window index b0e70ea..4627603 100644 --- a/MERT/Window_EMET_Results.xojo_window +++ b/MERT/Window_EMET_Results.xojo_window @@ -2215,7 +2215,7 @@ End MI = New MenuItem MI.Text = "Change Colour" - base.Append MI + base.addmenu( MI ) Return True End Function #tag EndEvent @@ -2761,11 +2761,11 @@ End MI = New MenuItem MI.Text = "Refresh" - base.Append MI + base.addmenu( MI ) MI = New MenuItem MI.Text = "Delete Record" - base.Append MI + base.addmenu( MI ) End Function diff --git a/MERT/Window_EMET_Run.xojo_window b/MERT/Window_EMET_Run.xojo_window index a1c447c..d953125 100644 --- a/MERT/Window_EMET_Run.xojo_window +++ b/MERT/Window_EMET_Run.xojo_window @@ -9513,7 +9513,7 @@ End MI = New MenuItem MI.Text = "Change Colour" - base.Append MI + base.addmenu( MI ) Return True End Function #tag EndEvent @@ -10145,10 +10145,10 @@ End MI = New MenuItem MI.Text = "Check Dose" - base.Append MI + base.addmenu( MI ) MI = New MenuItem MI.Text = "Uncheck Dose" - base.Append MI + base.addmenu( MI ) End Function #tag EndEvent #tag Event diff --git a/MERT/Window_EMET_Setup.xojo_window b/MERT/Window_EMET_Setup.xojo_window index f4cc208..b577460 100644 --- a/MERT/Window_EMET_Setup.xojo_window +++ b/MERT/Window_EMET_Setup.xojo_window @@ -8832,10 +8832,10 @@ End MI = New MenuItem MI.Text = "Add Depth" - base.Append MI + base.addmenu( MI ) MI = New MenuItem MI.Text = "Remove Depth" - base.Append MI + base.addmenu( MI ) Return True diff --git a/McGill_Cutout/Thread_Cutout.xojo_code b/McGill_Cutout/Thread_Cutout.xojo_code index f036c3c..78e18ae 100644 --- a/McGill_Cutout/Thread_Cutout.xojo_code +++ b/McGill_Cutout/Thread_Cutout.xojo_code @@ -56,7 +56,7 @@ Inherits Thread temp="rm -f " +input_file+".* " + input_file+"-cutout*" cc.beam_num=Beam cc.command =temp - MMCTP_Shell_Run.All.Append cc + MMCTP_Shell_Run.All.Addrow( cc ) @@ -64,7 +64,7 @@ Inherits Thread temp="rm -f -r *" +input_file+"-cutout*" cc.beam_num=Beam cc.command =temp - MMCTP_Shell_Run.All.Append cc + MMCTP_Shell_Run.All.Addrow( cc ) End Sub #tag EndMethod @@ -324,14 +324,14 @@ Inherits Thread cc.FTP_Put_file=True cc.FTP_Local_Path=path cc.FTP_Remote_Path=cc.dir+"/"+f.Name - MMCTP_Shell_Run.All.Append cc + MMCTP_Shell_Run.All.Addrow( cc ) //Change mode to exe tt=Get_Directory(beam) cc.command="chmod u+x " +f.Name - MMCTP_Shell_Run.All.Append cc + MMCTP_Shell_Run.All.Addrow( cc ) End Sub #tag EndMethod @@ -479,7 +479,7 @@ Inherits Thread cc.command =line cc.cutout_run=True cc.inpfilename=input_file - MMCTP_Shell_Run.All.Append cc + MMCTP_Shell_Run.All.Addrow( cc ) End Sub #tag EndMethod @@ -514,7 +514,7 @@ Inherits Thread cc.command="put "+path_egsinp+" "+cc.dir+"/"+egsinp.Name cc.FTP_Files= egsinp cc.inpfilename=egsinp.Name - MMCTP_Shell_Run.All.Append cc + MMCTP_Shell_Run.All.Addrow( cc ) end f=gRTOG.Plan(Plan_Index).Path @@ -529,7 +529,7 @@ Inherits Thread cc.command="put "+path_egsinp+" "+cc.dir+"/"+egsinp.Name cc.FTP_Files= egsinp cc.inpfilename=egsinp.Name - MMCTP_Shell_Run.All.Append cc + MMCTP_Shell_Run.All.Addrow( cc ) end End Sub #tag EndMethod diff --git a/Treatment Planning/Canvas_TP.xojo_code b/Treatment Planning/Canvas_TP.xojo_code index f7a878d..56ccbf0 100644 --- a/Treatment Planning/Canvas_TP.xojo_code +++ b/Treatment Planning/Canvas_TP.xojo_code @@ -7,31 +7,31 @@ Inherits Canvas MI = New MenuItem MI.Text = "Axial" - base.Append MI + base.AddMenu( MI ) MI = New MenuItem MI.Text = "Sagittal" - base.Append MI + base.AddMenu( MI ) MI = New MenuItem MI.Text = "Coronal" - base.Append MI + base.AddMenu( MI ) 'MI = New MenuItem 'MI.Text = "BEV" - 'base.Append MI + 'base.addmenu( MI ) 'MI = New MenuItem 'MI.Text = "DRR" - 'base.Append MI + 'base.addmenu( MI ) 'MI = New MenuItem 'MI.Text = "REV" - 'base.Append MI + 'base.addmenu( MI ) MI = New MenuItem MI.Text = "Centre Image" - base.Append MI + 'base.addmenu( MI ) MI = New MenuItem MI.Text = "BG Colour" - base.Append MI + base.addmenu( MI ) Return True diff --git a/Treatment Planning/Window_3DView.xojo_window b/Treatment Planning/Window_3DView.xojo_window index 52b30f0..36b28a0 100644 --- a/Treatment Planning/Window_3DView.xojo_window +++ b/Treatment Planning/Window_3DView.xojo_window @@ -27,6 +27,7 @@ Begin Window Window_3DView Width = 745 Begin Rb3dSpace_MMCTP Canvas_3D canvas_scale = 0.0 + Enabled = True Index = 0 InitialParent = "" JAW_Index = 0 @@ -879,6 +880,7 @@ Begin Window Window_3DView Scope = 0 TabIndex = 18 TabPanelIndex = 1 + TabStop = True Top = 393 TopLeftColor = &c00000000 Transparent = False @@ -1066,7 +1068,7 @@ End Task_3DViewer.Enabled = False MessageBox("The 3D viwer on Windows is not stable, "_ - + "please close MMCTP before opening the 3D viewer again.") + + "please close MMCTP before opening the 3D viewer again.") #EndIf End Sub diff --git a/Treatment Planning/Window_Prescription.xojo_window b/Treatment Planning/Window_Prescription.xojo_window index 83acaee..1041b1a 100644 --- a/Treatment Planning/Window_Prescription.xojo_window +++ b/Treatment Planning/Window_Prescription.xojo_window @@ -1038,10 +1038,10 @@ End MI = New MenuItem MI.Text = "Add Constraint" - base.Append MI + base.addmenu( MI ) MI = New MenuItem MI.Text = "Delete Constraint" - base.Append MI + base.addmenu( MI ) Return True diff --git a/Treatment Planning/Window_Treatment.xojo_window b/Treatment Planning/Window_Treatment.xojo_window index c76c3c2..aa2c048 100644 --- a/Treatment Planning/Window_Treatment.xojo_window +++ b/Treatment Planning/Window_Treatment.xojo_window @@ -5452,10 +5452,10 @@ End MI = New MenuItem MI.Text = "Add Plan" - base.Append MI + base.addmenu( MI ) MI = New MenuItem MI.Text = "Rename" - base.Append MI + base.addmenu( MI ) Return True @@ -5771,19 +5771,19 @@ End MI = New MenuItem MI.Text = "Add Beam" - base.Append MI + base.addmenu( MI ) MI = New MenuItem MI.Text = "Delete Beam" - base.Append MI + base.addmenu( MI ) MI = New MenuItem MI.Text = "Copy Beam" - base.Append MI + base.addmenu( MI ) MI = New MenuItem MI.Text = "Merge Beams" - base.Append MI + base.addmenu( MI ) MI = New MenuItem MI.Text = "Separate dynamic fields" - base.Append MI + base.addmenu( MI ) Return True end End Function @@ -5972,10 +5972,10 @@ End MI = New MenuItem MI.Text = "Select all" - base.Append MI + base.addmenu( MI ) MI = New MenuItem MI.Text = "Deselect all" - base.Append MI + base.addmenu( MI ) Return True End Function @@ -6086,17 +6086,17 @@ End MI = New MenuItem MI.Text = "Delete DMX file" - base.Append MI + base.addmenu( MI ) MI = New MenuItem MI.Text = "Select all" - base.Append MI + base.addmenu( MI ) MI = New MenuItem MI.Text = "Deselect all" - base.Append MI + base.addmenu( MI ) Return True end @@ -6494,42 +6494,42 @@ End if gDOSXYZ.State= 4 Then MI = New MenuItem MI.Text = "Generate new EGSPhant file" - base.Append MI + base.addmenu( MI ) end if gDOSXYZ.State= 4 and column>=0 and UBound(MMCTP_Shell_Refresh.All)=-1 and UBound(MMCTP_Shell_Run.All)=-1 and UBound(MMCTP_Download.All)=-1 Then MI = New MenuItem MI.Text = "Delete EGSPhant file" - base.Append MI + base.addmenu( MI ) end MI = New MenuItem MI.Text = "View EGSPhant" - base.Append MI + base.addmenu( MI ) MI = New MenuItem MI.Text = "Select all" - base.Append MI + base.addmenu( MI ) MI = New MenuItem MI.Text = "Deselect all" - base.Append MI + base.addmenu( MI ) MI = New MenuItem MI.Text = "3ddose to MMCTP" - base.Append MI + base.addmenu( MI ) MI = New MenuItem MI.Text = "Add plan doses" - base.Append MI + base.addmenu( MI ) MI = New MenuItem MI.Text = "Add checked doses" - base.Append MI + base.addmenu( MI ) Return True @@ -6567,13 +6567,13 @@ End MI = New MenuItem MI.Text = "Selecte all row" - base.Append MI + base.addmenu( MI ) MI = New MenuItem MI.Text = "Selecte all column" - base.Append MI + base.addmenu( MI ) MI = New MenuItem MI.Text = "Deselecte all" - base.Append MI + base.addmenu( MI ) Return True @@ -6768,10 +6768,10 @@ End MI = New MenuItem MI.Text = "Select all" - base.Append MI + base.addmenu( MI ) MI = New MenuItem MI.Text = "Deselect all" - base.Append MI + base.addmenu( MI ) Return True End Function @@ -7168,10 +7168,10 @@ End MI = New MenuItem MI.Text = "Select all" - base.Append MI + base.addmenu( MI ) MI = New MenuItem MI.Text = "Deselect all" - base.Append MI + base.addmenu( MI ) Return True end @@ -7224,10 +7224,10 @@ End dim MI as MenuItem MI = New MenuItem MI.Text = "Add Point of Interest" - base.Append MI + base.addmenu( MI ) MI = New MenuItem MI.Text = "Delete Point of Interest" - base.Append MI + base.addmenu( MI ) Return True End Function #tag EndEvent @@ -7533,19 +7533,19 @@ End MI = New MenuItem MI.Text = "1x1" - base.Append MI + base.addmenu( MI ) MI = New MenuItem MI.Text = "2x2" - base.Append MI + base.addmenu( MI ) MI = New MenuItem MI.Text = "4x4" - base.Append MI + base.addmenu( MI ) MI = New MenuItem MI.Text = "8x8" - base.Append MI + base.addmenu( MI ) MI = New MenuItem MI.Text = "16x16" - base.Append MI + base.addmenu( MI ) Return True End Function diff --git a/Utility/Window_Configurations_DOSXYZnrcSettings.xojo_window b/Utility/Window_Configurations_DOSXYZnrcSettings.xojo_window index d252fa9..1d90207 100644 --- a/Utility/Window_Configurations_DOSXYZnrcSettings.xojo_window +++ b/Utility/Window_Configurations_DOSXYZnrcSettings.xojo_window @@ -1561,10 +1561,10 @@ End MI = New MenuItem MI.Text = "Add EGSPhant" - base.Append MI + base.addmenu( MI ) MI = New MenuItem MI.Text = "Delete EGSPhant" - base.Append MI + base.addmenu( MI ) end @@ -1742,10 +1742,10 @@ End MI = New MenuItem MI.Text = "Add row" - base.Append MI + base.addmenu( MI ) MI = New MenuItem MI.Text = "Delete row" - base.Append MI + base.addmenu( MI ) end diff --git a/Utility/Window_Configurations_Shell.xojo_window b/Utility/Window_Configurations_Shell.xojo_window index 6b0ee9a..336a4ab 100644 --- a/Utility/Window_Configurations_Shell.xojo_window +++ b/Utility/Window_Configurations_Shell.xojo_window @@ -4521,7 +4521,7 @@ End cc.shell=ss cc.command="ls" cc.shell_Test=True - MMCTP_Shell_Run.All.Append cc + MMCTP_Shell_Run.All.Addrow( cc ) gTimer_Run.Period=1000 gTimer_Run.Reset End Sub @@ -4658,7 +4658,7 @@ End cc.FTP_Remote_Path=f.Name cc.command="put "+path+" "+f.Name cc.FTP_Files= f - MMCTP_Shell_Run.All.Append cc + MMCTP_Shell_Run.All.Addrow( cc ) gTimer_Run.Period=1000 gTimer_Run.Reset diff --git a/Utility/Window_Configurations_TPS_System.xojo_window b/Utility/Window_Configurations_TPS_System.xojo_window index 1603d3d..30f4b8e 100644 --- a/Utility/Window_Configurations_TPS_System.xojo_window +++ b/Utility/Window_Configurations_TPS_System.xojo_window @@ -3624,10 +3624,10 @@ End MI = New MenuItem MI.Text = "Add Dose at Volume Point" - base.Append MI + base.addmenu( MI ) MI = New MenuItem MI.Text = "Remove" - base.Append MI + base.addmenu( MI ) Return True @@ -3668,10 +3668,10 @@ End MI = New MenuItem MI.Text = "Add Volume at Dose Point" - base.Append MI + base.addmenu( MI ) MI = New MenuItem MI.Text = "Remove" - base.Append MI + base.addmenu( MI ) Return True @@ -3734,10 +3734,10 @@ End MI = New MenuItem MI.Text = "Add Dose at Volume Point" - base.Append MI + base.addmenu( MI ) MI = New MenuItem MI.Text = "Remove" - base.Append MI + base.addmenu( MI ) Return True diff --git a/VMC/Thread_VMC.xojo_code b/VMC/Thread_VMC.xojo_code index 06dc1e8..0bbd793 100644 --- a/VMC/Thread_VMC.xojo_code +++ b/VMC/Thread_VMC.xojo_code @@ -1220,14 +1220,14 @@ Inherits Thread cc.FTP_Local_Path=f.ShellPath cc.FTP_Put_file=True cc.FTP_Remote_Path=VMC_dir+f.Name - MMCTP_Shell_Run.All.Append cc + MMCTP_Shell_Run.All.Addrow( cc ) end //Change mode to exe and execute if vmc_Get_Shell_Enviro(dmx_index,beam) Then cc.dir=VMC_dir cc.command="chmod u+x " +f.Name - MMCTP_Shell_Run.All.Append cc + MMCTP_Shell_Run.All.Addrow( cc ) end //determine how to submit job to batch @@ -1238,7 +1238,7 @@ Inherits Thread cc.vmc_dmx_index=dmx_index cc.beam_num=beam cc.command=cc.Shell.Queue_Submit(vmc(dmx_index).BEAMS(beam).queue,f.Name) - MMCTP_Shell_Run.All.Append cc + MMCTP_Shell_Run.All.Addrow( cc ) end End Sub #tag EndMethod @@ -1717,14 +1717,14 @@ Inherits Thread dir=xvmc_folder+"dat/" cc.dir=dir cc.command ="rm -f "+MC_file_name+str(beam+1)+".egs4phsp1" - MMCTP_Shell_Run.All.Append cc + MMCTP_Shell_Run.All.Addrow( cc ) end if vmc_Get_Shell_Enviro(dmx_index,beam) Then cc.dir=dir cc.command ="ln -s "+path - MMCTP_Shell_Run.All.Append cc + MMCTP_Shell_Run.All.Addrow( cc ) end end @@ -1757,7 +1757,7 @@ Inherits Thread if vmc_Get_Shell_Enviro(dmx_index,beam) Then cc.command ="mkdir "+gRTOG.Patient_ID+gRTOG.StudyID+gRTOG.SeriesNumber+"_"+vmc(dmx_index).DMX.dmx_name cc.dir=xvmc_folder - MMCTP_Shell_Run.All.Append cc + MMCTP_Shell_Run.All.Addrow( cc ) end @@ -1778,7 +1778,7 @@ Inherits Thread cc.vmc_dmx_upload=True cc.vmc_dmx_index=dmx_index cc.command="put "+f.ShellPath+" "+vmc_directoy+f.Name - MMCTP_Shell_Run.All.Append cc + MMCTP_Shell_Run.All.Addrow( cc ) end @@ -1801,7 +1801,7 @@ Inherits Thread cc.FTP_Now=True cc.inpfilename=f.Name cc.command="put "+f.ShellPath+" "+vmc_directoy+f.Name - MMCTP_Shell_Run.All.Append cc + MMCTP_Shell_Run.All.Addrow( cc ) end End Sub #tag EndMethod @@ -1830,7 +1830,7 @@ Inherits Thread if vmc_Get_Shell_Enviro(dmx_int,beam) Then cc.command="rm -f "+MC_file_name+str(beam+1)+".* " +"R"+MC_file_name+str(beam+1)+"_* " +MC_file_name+str(beam+1)+"00.*"+" "+MC_file_name+str(beam+1)+"_*" cc.dir=cd - MMCTP_Shell_Run.All.Append cc + MMCTP_Shell_Run.All.Addrow( cc ) end @@ -1846,7 +1846,7 @@ Inherits Thread cc.FTP_Put_file=True cc.FTP_Local_Path=f.ShellPath cc.FTP_Remote_Path=cd+f.Name - MMCTP_Shell_Run.All.Append cc + MMCTP_Shell_Run.All.Addrow( cc ) end End Sub #tag EndMethod diff --git a/Visualization/Thread_Visualization.xojo_code b/Visualization/Thread_Visualization.xojo_code index 41e30b0..21f8d4a 100644 --- a/Visualization/Thread_Visualization.xojo_code +++ b/Visualization/Thread_Visualization.xojo_code @@ -478,19 +478,19 @@ Inherits Thread MI = New MenuItem MI.Text = "CT Abdomen: W400, L50" - base.Append MI + base.addmenu( MI ) MI = New MenuItem MI.Text = "CT Bone: W1200, L350" - base.Append MI + base.addmenu( MI ) MI = New MenuItem MI.Text = "CT Head: W300, L120" - base.Append MI + base.addmenu( MI ) MI = New MenuItem MI.Text = "CT Lung: W1500, L-550" - base.Append MI + base.addmenu( MI ) MI = New MenuItem MI.Text = "Soft Tissue: W600, L40" - base.Append MI + base.addmenu( MI ) Return base End Function diff --git a/Visualization/Window_Contouring.xojo_window b/Visualization/Window_Contouring.xojo_window index 4f3d1c7..92fcf60 100644 --- a/Visualization/Window_Contouring.xojo_window +++ b/Visualization/Window_Contouring.xojo_window @@ -1408,31 +1408,31 @@ End MI = New MenuItem MI.Text = "Add Point" - base.Append MI + base.addmenu( MI ) MI = New MenuItem MI.Text = "Move Point" - base.Append MI + base.addmenu( MI ) MI = New MenuItem MI.Text = "Delete Point" - base.Append MI + base.addmenu( MI ) MI = New MenuItem MI.Text = "Scale" - base.Append MI + base.addmenu( MI ) MI = New MenuItem MI.Text = "Move Segment" - base.Append MI + base.addmenu( MI ) MI = New MenuItem MI.Text = "Copy Sup" - base.Append MI + base.addmenu( MI ) MI = New MenuItem MI.Text = "Copy Inf" - base.Append MI + base.addmenu( MI ) MI = New MenuItem MI.value = "Define ROI" - base.Append MI + base.addmenu( MI ) MI = New MenuItem MI.Text = "AutoContour" - base.Append MI + base.addmenu( MI ) Return True end @@ -1808,10 +1808,10 @@ End MI = New MenuItem MI.Text = "Add New Structure" - base.Append MI + base.addmenu( MI ) MI = New MenuItem MI.Text = "Delete Structure" - base.Append MI + base.addmenu( MI ) From 80372b5e56c271b6c1b98150da6fbcea7b13a24d Mon Sep 17 00:00:00 2001 From: Wamied Abdel-Rahman Date: Thu, 23 Jul 2020 16:46:31 +0300 Subject: [PATCH 7/7] 23 July --- .DS_Store | Bin 6148 -> 6148 bytes 3D/Rb3DSpace.xojo_code | 2 +- 3D/Rb3DSpace_MMCTP.xojo_code | 2 +- .../BEAMnrc-CMS/Class_BEAM_CM_JAWS.xojo_code | 14 ++-- .../BEAMnrc-CMS/Class_BEAM_CM_WEDGE.xojo_code | 26 +++---- BEAMnrc/Class_BEAM.xojo_code | 2 +- BEAMnrc/Thread_BEAM.xojo_code | 28 +++---- .../Window_BEAM_Phsp_Information.xojo_window | 2 +- DOSXYZnrc/Thread_DOSXYZ.xojo_code | 8 +- MERT/Window_EMET_Results.xojo_window | 2 +- MERT/Window_EMET_Setup.xojo_window | 4 +- McGill_Cutout/Thread_Cutout.xojo_code | 2 +- RTOG Class/Thread_RTOG.xojo_code | 73 ++++++++++-------- Treatment Planning/Window_3DView.xojo_window | 2 +- .../Window_Prescription.xojo_window | 1 - VMC/Thread_VMC.xojo_code | 4 +- 16 files changed, 89 insertions(+), 83 deletions(-) diff --git a/.DS_Store b/.DS_Store index 254823f48fb3fcdee37e3636cff5176dc66a4340..992c7905ad12b41e83de5c55b8d1d8fdbfa1a135 100644 GIT binary patch delta 25 gcmZoMXffCj%go3yIgZ(Yv0(E=<}#MetQ`OO0bKj%w;T_Svmgm0|0Qj2wngH diff --git a/3D/Rb3DSpace.xojo_code b/3D/Rb3DSpace.xojo_code index fb17115..e61378f 100644 --- a/3D/Rb3DSpace.xojo_code +++ b/3D/Rb3DSpace.xojo_code @@ -1121,7 +1121,7 @@ Protected Class Rb3DSpace 'if f.Exists Then 'modelcode = f.OpenAsBinaryFile(false).Read(f.Length) 'Object_axisX.AddShapeFromString modelcode - 'Objects.Append Object_axisx + 'Objects.Addrow( Object_axisx ) 'end 'end ' diff --git a/3D/Rb3DSpace_MMCTP.xojo_code b/3D/Rb3DSpace_MMCTP.xojo_code index 53e0a01..5e7315b 100644 --- a/3D/Rb3DSpace_MMCTP.xojo_code +++ b/3D/Rb3DSpace_MMCTP.xojo_code @@ -1121,7 +1121,7 @@ Protected Class Rb3DSpace_MMCTP 'if f.Exists Then 'modelcode = f.OpenAsBinaryFile(false).Read(f.Length) 'Object_axisX.AddShapeFromString modelcode - 'Objects.Append Object_axisx + 'Objects.Addrow( Object_axisx ) 'end 'end ' diff --git a/BEAMnrc/BEAMnrc-CMS/Class_BEAM_CM_JAWS.xojo_code b/BEAMnrc/BEAMnrc-CMS/Class_BEAM_CM_JAWS.xojo_code index 42b398a..b83cb6f 100644 --- a/BEAMnrc/BEAMnrc-CMS/Class_BEAM_CM_JAWS.xojo_code +++ b/BEAMnrc/BEAMnrc-CMS/Class_BEAM_CM_JAWS.xojo_code @@ -86,31 +86,31 @@ Protected Class Class_BEAM_CM_JAWS ReDim cm.text(-1) temp=Format(cm.JAWS.RMAX_CM,"-#.###")+", RMAX" - cm.text.Append temp + cm.text.AddRow( temp ) cm.text.Append cm.JAWS.Title_CM temp=Format(cm.JAWS.ISCM_MAX,"#")+", # PAIRED BARS OR JAWS" - cm.text.Append temp + cm.text.AddRow( temp ) for i=1 to cm.JAWS.ISCM_MAX temp=cm.JAWS.XY_Choice(i-1) - cm.text.Append temp + cm.text.AddRow( temp ) temp=Format(cm.JAWS.ZMIN_JAWS(i-1),"-#.####")+", "+Format(cm.JAWS.ZMAX_JAWS(i-1),"-#.####")+", "_ +Format(cm.JAWS.XFP_JAWS(i-1),"-#.####")+", "+Format(cm.JAWS.XBP_JAWS(i-1),"-#.####")+", "+_ Format(cm.JAWS.XFN_JAWS(i-1),"-#.####")+", "+Format(cm.JAWS.XBN_JAWS(i-1),"-#.####") - cm.text.Append temp + cm.text.AddRow( temp ) next temp=Format(cm.JAWS.ECUT_Openings ,"-#.####")+", "+Format(cm.JAWS.PCUT_Openings,"-#.###") +", "+Format(cm.JAWS.Dose_zone_opening,"#") +", "+Format(cm.JAWS.Iregion_opening,"#") - cm.text.Append temp + cm.text.AddRow( temp ) for i=1 to cm.JAWS.ISCM_MAX temp=Format(cm.JAWS.ECUT_Jaws(i-1) ,"-#.####")+", "+Format(cm.JAWS.PCUT_Jaws(i-1),"-#.###") +", "+Format(cm.JAWS.Dose_zone_Jaws(i-1),"#") +", "+Format(cm.JAWS.Iregion_Jaws(1-1),"#") - cm.text.Append temp + cm.text.AddRow( temp ) temp=cm.JAWS.Medium_Jaws(i-1) - cm.text.Append temp + cm.text.AddRow( temp ) next End Sub diff --git a/BEAMnrc/BEAMnrc-CMS/Class_BEAM_CM_WEDGE.xojo_code b/BEAMnrc/BEAMnrc-CMS/Class_BEAM_CM_WEDGE.xojo_code index 7df26eb..688cbbb 100644 --- a/BEAMnrc/BEAMnrc-CMS/Class_BEAM_CM_WEDGE.xojo_code +++ b/BEAMnrc/BEAMnrc-CMS/Class_BEAM_CM_WEDGE.xojo_code @@ -162,49 +162,49 @@ Protected Class Class_BEAM_CM_WEDGE temp=Format(RMAX_CM,"-#.####")+", RMAX" - cm.text.Append temp + cm.text.AddRow( temp ) cm.text.Append Title_CM //STATUS_$WEDGE, FRONT_$WEDGE, BACK_$WEDGE (3I5) //"I> wedge status (in=1, out=0), front and back //"I> plate (yes=1, no=0) temp=Format(Status,"#")+", "+Format(Front,"#")+", "+Format(Back,"#")+"," - cm.text.Append temp + cm.text.AddRow( temp ) temp=Format(Zmin,"-#.####") - cm.text.Append temp + cm.text.AddRow( temp ) if Front=1 Then temp=Format(DFront,"-#.#####")+", "+Format(TFront,"-#.#####") - cm.text.Append temp + cm.text.AddRow( temp ) temp=Format(ECutFront,"-#.#####")+", "+Format(PcutFront,"-#.#####")+", "+Format(DoseZoneFront,"#")+", "+Format(Iregion_to_bit_Front,"#")+", "+Format(ESaveIn_Front,"-0.0####")+", ECUT,PCUT etc" - cm.text.Append temp + cm.text.AddRow( temp ) cm.text.Append Medium_In_Front end if Status=1 Then temp=Format(WDir,"#")+", "+Format(WOr,"#")+", "+Format(WPos1,"-#.#####")+", "+Format(WPos2,"-#.#####")+", WDIR,WOR,WPOS(2) general wedge data" - cm.text.Append temp + cm.text.AddRow( temp ) temp=Format(ECutAir,"-#.#####")+", "+Format(PcutAir,"-#.#####")+", "+Format(DoseZoneAir,"#")+", "+Format(Iregion_to_bit_Air,"#")+", interior of CM wedge (assumed AIR)" - cm.text.Append temp + cm.text.AddRow( temp ) temp=Format(NProf,"#")+", "+Format(NPoint,"#")+", NPROF and NPOINTS for wedge geometry" - cm.text.Append temp + cm.text.AddRow( temp ) temp=Format(D(0),"-#.#####")+", "+Format(D(1),"-#.#####")+", "+Format(D(2),"-#.#####")+", "+Format(D(3),"-#.#####")+", "+Format(D(4),"-#.#####")+", "+Format(D(5),"-#.#####")+", "+Format(D(6),"-#.#####")+", "+Format(D(7),"-#.#####")+", "+Format(D(8),"-#.#####")+", "+Format(D(9),"-#.#####") - cm.text.Append temp + cm.text.AddRow( temp ) for i=1 to NProf temp=Format(A_Profile(i-1).A(0),"-#.#####")+", "+Format(A_Profile(i-1).A(1),"-#.#####")+", "+Format(A_Profile(i-1).A(2),"-#.#####")+", "+Format(A_Profile(i-1).A(3),"-#.#####")+", "+Format(A_Profile(i-1).A(4),"-#.#####")+", "+Format(A_Profile(i-1).A(5),"-#.#####")+", "+Format(A_Profile(i-1).A(6),"-#.#####")+", "+Format(A_Profile(i-1).A(7),"-#.#####")+", "+Format(A_Profile(i-1).A(8),"-#.#####")+", "+Format(A_Profile(i-1).A(9),"-#.#####") - cm.text.Append temp + cm.text.AddRow( temp ) next temp=Format(ECutWedge,"-0.0####")+","+Format(PcutWedge,"-0.0####")+","+Format(DoseZoneWedge,"#")+","+Format(Iregion_to_bit_Wedge,"#")+","+Format(ESaveIn_Wedge,"-0.0####")+", ECUT, PCUT for wedge" - cm.text.Append temp + cm.text.AddRow( temp ) cm.text.Append Medium_In_Wedge end if Back=1 Then temp=Format(DBack,"-#.#####")+", "+Format(TBack,"-#.#####") - cm.text.Append temp + cm.text.AddRow( temp ) temp=Format(ECutBack,"-#.#####")+", "+Format(PcutBack,"-#.#####")+", "+Format(DoseZoneBack,"#")+", "+Format(Iregion_to_bit_back,"#")+", "+Format(ESaveIn_Back,"-#.#####")+", ECUT,PCUT Back Plate" - cm.text.Append temp + cm.text.AddRow( temp ) cm.text.Append Medium_In_Back end End Sub diff --git a/BEAMnrc/Class_BEAM.xojo_code b/BEAMnrc/Class_BEAM.xojo_code index 2d3ca1e..b04ea6f 100644 --- a/BEAMnrc/Class_BEAM.xojo_code +++ b/BEAMnrc/Class_BEAM.xojo_code @@ -2459,7 +2459,7 @@ Protected Class Class_BEAM i=j-1 exit else - cm.text.Append temp + cm.text.AddRow( temp ) end next diff --git a/BEAMnrc/Thread_BEAM.xojo_code b/BEAMnrc/Thread_BEAM.xojo_code index c987098..2d42198 100644 --- a/BEAMnrc/Thread_BEAM.xojo_code +++ b/BEAMnrc/Thread_BEAM.xojo_code @@ -456,7 +456,7 @@ Inherits Thread temp=str(bindex+1) temp=MC_file_name+temp+"_w"+str(i+1)+".egsphsp1" cc.command= "rm -f -r "+temp - MMCTP_Shell_Refresh.All.Append cc + MMCTP_Shell_Refresh.All.AddRow( cc ) end Next End Sub @@ -1119,7 +1119,7 @@ Inherits Thread cc.beam_num=beam cc.egs_addphsp_check=True cc.inpfilename=MC_file_name+str(Beam+1) - MMCTP_Shell_Refresh.All.Append cc + MMCTP_Shell_Refresh.All.AddRow( cc ) @@ -1148,7 +1148,7 @@ Inherits Thread cc.beam_num=Window_BEAM_Phsp_Information.beam_index cc.command=cc.shell.listfiles +" *.egsphsp* *.1.IAEAphsp" cc.egs_phsp_list=True - MMCTP_Shell_Refresh.All.Append cc + MMCTP_Shell_Refresh.All.AddRow( cc ) End Sub #tag EndMethod @@ -1335,7 +1335,7 @@ Inherits Thread cc.egs_Read_Phsp_Properties=True cc.beam_num=beam cc.inpfilename=inpfilename - MMCTP_Shell_Refresh.All.Append cc + MMCTP_Shell_Refresh.All.AddRow( cc ) End Sub @@ -1378,7 +1378,7 @@ Inherits Thread cc.egs_refresh=True cc.beam_num=beam cc.inpfilename=inpfilename - MMCTP_Shell_Refresh.All.Append cc + MMCTP_Shell_Refresh.All.AddRow( cc ) end end @@ -1415,7 +1415,7 @@ Inherits Thread cc.command= "tail " + cc.inpfilename cc.egs_refresh_log=True cc.beam_num=beam - MMCTP_Shell_Refresh.All.Append cc + MMCTP_Shell_Refresh.All.AddRow( cc ) next else // For one running job @@ -1426,7 +1426,7 @@ Inherits Thread cc.command= "tail " + cc.inpfilename cc.egs_refresh_log=True cc.beam_num=beam - MMCTP_Shell_Refresh.All.Append cc + MMCTP_Shell_Refresh.All.AddRow( cc ) end End Sub #tag EndMethod @@ -1481,7 +1481,7 @@ Inherits Thread cc.command=cc.shell.listfiles +" egsrun*"+cc.inpfilename+"*" cc.egs_refresh_egsrun=True cc.beam_num=beam - MMCTP_Shell_Refresh.All.Append cc + MMCTP_Shell_Refresh.All.AddRow( cc ) end End Sub #tag EndMethod @@ -1500,7 +1500,7 @@ Inherits Thread name=MC_file_name+str(beam+1)+"_w*" hh=egs_Get_Directory(Beam) cc.command= "rm -f "+name - MMCTP_Shell_Refresh.All.Append cc + MMCTP_Shell_Refresh.All.AddRow( cc ) End Sub #tag EndMethod @@ -1657,19 +1657,19 @@ Inherits Thread cc.FTP_Remote_Path=cc.dir+"/"+f.Name cc.beam_num=Beam cc.egs_beamdp=True - MMCTP_Shell_Refresh.All.Append cc + MMCTP_Shell_Refresh.All.AddRow( cc ) // Change mode to exe good=egs_Get_Directory(beam) cc.command="chmod u+x " +f.Name - MMCTP_Shell_Refresh.All.Append cc + MMCTP_Shell_Refresh.All.AddRow( cc ) //and execute good=egs_Get_Directory(beam) cc.command="./"+f.Name - MMCTP_Shell_Refresh.All.Append cc + MMCTP_Shell_Refresh.All.AddRow( cc ) // Read beam dp file @@ -1677,12 +1677,12 @@ Inherits Thread cc.command="tail -25 beamdp_temp" cc.egs_beamdp=True cc.beam_num=beam - MMCTP_Shell_Refresh.All.Append cc + MMCTP_Shell_Refresh.All.AddRow( cc ) // Remove beamdp file good=egs_Get_Directory(beam) cc.command="rm -f beamdp_*" - MMCTP_Shell_Refresh.All.Append cc + MMCTP_Shell_Refresh.All.AddRow( cc ) End Sub #tag EndMethod diff --git a/BEAMnrc/Window_BEAM_Phsp_Information.xojo_window b/BEAMnrc/Window_BEAM_Phsp_Information.xojo_window index bc2f590..889eec3 100644 --- a/BEAMnrc/Window_BEAM_Phsp_Information.xojo_window +++ b/BEAMnrc/Window_BEAM_Phsp_Information.xojo_window @@ -1702,7 +1702,7 @@ End ListBox_Phspfiles.CellTypeAt(row,1) = Listbox.CellTypes.CheckBox If (gBEAM.cc.shell.listfiles_dateA-1) <= one_line.LastRowIndex And _ - (gBEAM.cc.shell.listfiles_dateA-1) >= 0 Then + (gBEAM.cc.shell.listfiles_dateA-1) >= 0 Then Var Date1 As String = one_line(gBEAM.cc.shell.listfiles_dateA-1) diff --git a/DOSXYZnrc/Thread_DOSXYZ.xojo_code b/DOSXYZnrc/Thread_DOSXYZ.xojo_code index c74bbd9..89ac3b8 100644 --- a/DOSXYZnrc/Thread_DOSXYZ.xojo_code +++ b/DOSXYZnrc/Thread_DOSXYZ.xojo_code @@ -2963,7 +2963,7 @@ Inherits Thread cc.dos_egsphant_index=egsphant_index cc.beam_num=beam cc.dos_refresh=True - MMCTP_Shell_Refresh.All.Append cc + MMCTP_Shell_Refresh.All.AddRow( cc ) elseif DOSXYZ(egsphant_index).DOSXYZ_Input(beam).dos_progress<>100 and DOSXYZ(egsphant_index).DOSXYZ_Input(beam).dos_jobs=1 Then dosxyz_Refresh_One(egsphant_index,beam) @@ -3015,7 +3015,7 @@ Inherits Thread cc.dos_egsphant_index=egsphant_index cc.beam_num=beam cc.dos_refresh_3ddose=True - MMCTP_Shell_Refresh.All.Append cc + MMCTP_Shell_Refresh.All.AddRow( cc ) End Sub #tag EndMethod @@ -3065,7 +3065,7 @@ Inherits Thread cc.dos_egsphant_index=egsphant_index cc.beam_num=beam cc.dos_refresh_One=True - MMCTP_Shell_Refresh.All.Append cc + MMCTP_Shell_Refresh.All.AddRow( cc ) end @@ -3094,7 +3094,7 @@ Inherits Thread inpfilename=MC_file_name+name+"_"+DOSXYZ(egsphant_index).EGSPhantSettings.name+"_w*" hh=dosxyz_get_shell_Variables(egsphant_index,Beam) cc.command="rm -f "+inpfilename - MMCTP_Shell_Refresh.All.Append cc + MMCTP_Shell_Refresh.All.AddRow( cc ) End Sub #tag EndMethod diff --git a/MERT/Window_EMET_Results.xojo_window b/MERT/Window_EMET_Results.xojo_window index 4627603..30007b4 100644 --- a/MERT/Window_EMET_Results.xojo_window +++ b/MERT/Window_EMET_Results.xojo_window @@ -1699,7 +1699,7 @@ End ' 'for k=0 to UBound(splitf) 'dd=new Class_DVH_One - 'DVHs.All_DVH.Append dd + 'DVHs.All_DVH.AddRow( dd ) 'normDVH.Append UBound(DVHs.All_DVH) 'dd.StringFile=splitf(k) 'DVHs.Read_DVH_String(dd) diff --git a/MERT/Window_EMET_Setup.xojo_window b/MERT/Window_EMET_Setup.xojo_window index b577460..fbfec1e 100644 --- a/MERT/Window_EMET_Setup.xojo_window +++ b/MERT/Window_EMET_Setup.xojo_window @@ -7315,8 +7315,8 @@ End 'pstrip.Graphics.DrawPicture(ff.Rotated_Slices(ff.nz-1-a),0,-y) 'Normal.Graphics.DrawPicture pstrip,0,a 'next - 'ff.Coronal_Slices.Append Normal - 'ff.Coronal_Depths.Append ((y-nx/2)*ff.del_x+100) + 'ff.Coronal_Slices.AddRow( Normal ) + 'ff.Coronal_Depths.AddRow( (y-nx/2)*ff.del_x+100) 'next ' diff --git a/McGill_Cutout/Thread_Cutout.xojo_code b/McGill_Cutout/Thread_Cutout.xojo_code index 78e18ae..3110439 100644 --- a/McGill_Cutout/Thread_Cutout.xojo_code +++ b/McGill_Cutout/Thread_Cutout.xojo_code @@ -425,7 +425,7 @@ Inherits Thread cc.beam_num=Beam cc.command="tail "+input_file cc.cutout_refresh=True - MMCTP_Shell_Refresh.All.Append cc + MMCTP_Shell_Refresh.All.AddRow( cc ) diff --git a/RTOG Class/Thread_RTOG.xojo_code b/RTOG Class/Thread_RTOG.xojo_code index 8b161ff..dccf654 100644 --- a/RTOG Class/Thread_RTOG.xojo_code +++ b/RTOG Class/Thread_RTOG.xojo_code @@ -1780,29 +1780,31 @@ Inherits Thread #tag Method, Flags = &h0 Sub Delete_Plan(num as integer) - Dim f,g as FolderItem - Dim i ,count as integer + 'Dim f,g As FolderItem + 'Dim i ,count as integer - f=Plan(num).Path - Plan.Remove num + Var f As FolderItem = Plan(num).Path + Plan.RemoveRowAt( num ) - if f<>Nil Then - if f.Exists Then - for i=f.Count DownTo 1 - //Must remove all files to delete folder - g=f.Item(i) - if g<>Nil Then - if g.Exists Then - g.Delete - end - end - Next - //now delete FolderI - f.Delete - end - end + If f <> Nil And f.Exists And f.IsFolder Then + + For i As Integer = f.Count DownTo 1 + //Must remove all files to delete folder + Var g As FolderItem = f.Item(i) + If g<>Nil Then + + If g.Exists Then + + g.Remove + + End If + End If + Next + //now delete FolderI + f.Remove + End If End Sub @@ -1810,31 +1812,36 @@ Inherits Thread #tag Method, Flags = &h0 Sub Delete_Structure(num as integer) - Dim i as Integer - Dim f as FolderItem + 'Dim i as Integer + 'Dim f as FolderItem - grtog.Structures.Structures.Remove num + grtog.Structures.Structures.RemoveRowAt( num ) - gvis.contour_fill.Remove num - gvis.contour_show.Remove num + gvis.contour_fill.RemoveRowAt( num ) + gvis.contour_show.RemoveRowAt( num ) - f=gRTOG.path - f=f.Child("McGill_RT") + Var f As Folderitem = gRTOG.path.Child("McGill_RT") - for i=1 to f.Count - if InStr(f.Item(i).Name,".struct")>0 Then - f.Item(i).Delete - end - next + For i As Integer = 1 To f.Count + + If f.ChildAt(i).Name.IndexOf(".struct") > 0 Then + + f.ChildAt(i).Remove + + End If + + Next - for i=0 to UBound(grtog.Structures.Structures) + For i As Integer = 0 To grtog.Structures.Structures.LastRowIndex + Write_McGill_Structures(grtog.Structures.Structures(i),f,i) - next + + Next diff --git a/Treatment Planning/Window_3DView.xojo_window b/Treatment Planning/Window_3DView.xojo_window index 36b28a0..de70cee 100644 --- a/Treatment Planning/Window_3DView.xojo_window +++ b/Treatment Planning/Window_3DView.xojo_window @@ -880,7 +880,7 @@ Begin Window Window_3DView Scope = 0 TabIndex = 18 TabPanelIndex = 1 - TabStop = True + TabStop = "True" Top = 393 TopLeftColor = &c00000000 Transparent = False diff --git a/Treatment Planning/Window_Prescription.xojo_window b/Treatment Planning/Window_Prescription.xojo_window index 1041b1a..8143980 100644 --- a/Treatment Planning/Window_Prescription.xojo_window +++ b/Treatment Planning/Window_Prescription.xojo_window @@ -459,7 +459,6 @@ Begin Window Window_Prescription Scope = 0 TabIndex = 7 TabPanelIndex = 1 - TabStop = "True" Top = 695 Transparent = False Value = 0.0 diff --git a/VMC/Thread_VMC.xojo_code b/VMC/Thread_VMC.xojo_code index 0bbd793..3284b96 100644 --- a/VMC/Thread_VMC.xojo_code +++ b/VMC/Thread_VMC.xojo_code @@ -1489,7 +1489,7 @@ Inherits Thread cc.vmc_dmx_index=a cc.beam_num=i cc.inpfilename=s - MMCTP_Shell_Refresh.All.Append cc + MMCTP_Shell_Refresh.All.AddRow( cc ) end End Sub #tag EndMethod @@ -1523,7 +1523,7 @@ Inherits Thread cc.dir=VMC_dir cc.vmc_refresh_pro=True cc.inpfilename=s - MMCTP_Shell_Refresh.All.Append cc + MMCTP_Shell_Refresh.All.AddRow( cc ) end gTimer_Refresh.Period=1