- Timestamp:
- Oct 29, 2008 1:36:20 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sans/Dev/trunk/NCNR_User_Procedures/Common/NCNR_Package_Loader.ipf
r428 r433 39 39 SVAR gMenuStr1b = root:Packages:NCNRItemStr1b 40 40 41 String SANSAna_WinList = "wrapperPanel;Procedure_List;" 41 42 strswitch(itemStr) // string switch 42 43 case "Load NCNR Analysis Macros": … … 82 83 break 83 84 case "Hide NCNR Analysis Macros": 84 DoWindow wrapperPanel 85 if(V_Flag) 86 DoWindow/HIDE=1 wrapperPanel 87 endif 88 DoWindow Procedure_List 89 If(V_Flag) 90 DoWindow/HIDE=1 Procedure_List 91 endif 85 HideShowWindowsInList(SANSAna_WinList,1) 92 86 93 87 gMenuStr1a = "Show NCNR Analysis Macros" … … 97 91 98 92 break 99 case "Show NCNR Analysis Macros": 100 DoWindow wrapperPanel 101 if(V_Flag) 102 DoWindow/HIDE=0 wrapperPanel 103 endif 104 DoWindow Procedure_List 105 If(V_Flag) 106 DoWindow/HIDE=0 Procedure_List 107 endif 93 case "Show NCNR Analysis Macros": 94 HideShowWindowsInList(SANSAna_WinList,0) 108 95 109 96 gMenuStr1a = "Hide NCNR Analysis Macros" … … 134 121 SVAR gMenuStr2b = root:Packages:NCNRItemStr2b 135 122 123 String SANSRed_WinList = "Main_Panel;" 136 124 strswitch(itemStr) // string switch 137 125 case "Load NCNR SANS Reduction Macros": … … 161 149 162 150 break 163 case "Hide NCNR SANS Reduction Macros": 164 DoWindow Main_Panel 165 if(V_Flag) 166 DoWindow/HIDE=1 Main_Panel 167 endif 151 case "Hide NCNR SANS Reduction Macros": 152 HideShowWindowsInList(SANSRed_WinList,1) 168 153 169 154 gMenuStr2a = "Show NCNR SANS Reduction Macros" … … 174 159 break 175 160 case "Show NCNR SANS Reduction Macros": 176 DoWindow Main_Panel 177 if(V_Flag) 178 DoWindow/HIDE=0 Main_Panel 179 endif 161 HideShowWindowsInList(SANSRed_WinList,0) 180 162 181 163 gMenuStr2a = "Hide NCNR SANS Reduction Macros" … … 205 187 SVAR gMenuStr3b = root:Packages:NCNRItemStr3b 206 188 189 String USANS_WinList = "USANS_Panel;COR_Graph;RawDataWin;Desmear_Graph;" 190 207 191 strswitch(itemStr) // string switch 208 192 case "Load NCNR USANS Reduction Macros": … … 233 217 break 234 218 case "Hide NCNR USANS Reduction Macros": 235 DoWindow USANS_Panel 236 if(V_Flag) 237 DoWindow/HIDE=1 USANS_Panel 238 endif 219 HideShowWindowsInList(USANS_WinList,1) 239 220 240 221 gMenuStr3a = "Show NCNR USANS Reduction Macros" … … 244 225 245 226 break 246 case "Show NCNR USANS Reduction Macros": 247 DoWindow USANS_Panel 248 if(V_Flag) 249 DoWindow/HIDE=0 USANS_Panel 250 endif 251 227 case "Show NCNR USANS Reduction Macros": 228 HideShowWindowsInList(USANS_WinList,0) 229 252 230 gMenuStr3a = "Hide NCNR USANS Reduction Macros" 253 231 // gMenuStr3b = "Unload NCNR USANS Reduction Macros" … … 262 240 end 263 241 242 // 1 = hide, 0 = show 243 Function HideShowWindowsInList(list,hide) 244 String list 245 Variable hide 246 247 String item 248 Variable ii,num=ItemsinList(list) 249 for(ii=0;ii<num;ii+=1) 250 item = StringFromList(ii, list , ";") 251 DoWindow $item 252 if(V_Flag) 253 DoWindow/HIDE=(hide) $item 254 endif 255 endfor 256 return(0) 257 End
Note: See TracChangeset
for help on using the changeset viewer.