Changeset 562
- Timestamp:
- Feb 24, 2011, 8:31:39 AM (14 years ago)
- Location:
- branches/guitools-2.0/smbmon-2.1
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/guitools-2.0/smbmon-2.1/smbmon.VRP
r561 r562 8 8 VRXWindow: __VREMainWindow,1,2180,3710,903,8010 9 9 VRXWindow: __VRESectionListWindow,1,3589,11708,7938,3342 10 VRXWindow: __VREToolsWindow,1,3211,9877,648 0,166110 VRXWindow: __VREToolsWindow,1,3211,9877,6486,1665 11 11 VRXWindow: __VREWindListWindow,1,927,11708,2650,3324 12 12 UserFile: 1 -
branches/guitools-2.0/smbmon-2.1/smbmon.VRX
r561 r562 93 93 #append U:\Develop\Samba\guitools-2.0\shared\nlv.vrs 94 94 #append U:\Develop\Samba\guitools-2.0\shared\inittempdir.vrs 95 #append U:\Develop\Samba\guitools-1.0\shared\sambainit.vrs 95 96 */ 96 97 return … … 98 99 */ 99 100 _ContainerInit: 100 say '_ContainerInit() started.'101 if options.!debug == 1 THEN SAY time()' _ContainerInit() started.' 101 102 102 103 /* User */ … … 166 167 ok = VRMethod("CN_Daemons","SetRecordAttr","All", "Collapsed", 0 ) 167 168 168 say '_ContainerInit() done.'169 if options.!debug == 1 THEN SAY time()' _ContainerInit() done.' 169 170 return 170 171 … … 172 173 */ 173 174 _GUIInit: 174 FirstRun = 1 175 176 175 177 if datatype(Top) = 'NUM' then do 176 178 ok = VRset("Main","Top",Top) … … 179 181 ok = VRset("Main","Height",Height) 180 182 end 183 184 /* Initialize Notebook pages */ 185 186 wh.1 = VRLoad( "TDL_1", VRWindowPath(), "SW_1" ) /* Users */ 187 ok = VRMethod( "TDL_1", "InsertPage", wh.1, "+"NLVGetMessage(15) ) 188 189 wh.2 = VRLoad( "TDL_1", VRWindowPath(), "SW_2" ) /* Files */ 190 ok = VRMethod( "TDL_1", "InsertPage", wh.2, "+"NLVGetMessage(16) ) 191 192 wh.3 = VRLoad( "TDL_1", VRWindowPath(), "SW_3" ) /* Service */ 193 ok = VRMethod( "TDL_1", "InsertPage", wh.3, "+"NLVGetMessage(17) ) 194 195 wh.4 = VRLoad( "TDL_1", VRWindowPath(), "SW_4" ) /* Daemons */ 196 ok = VRMethod( "TDL_1", "InsertPage", wh.4, "+"NLVGetMessage(18) ) 197 198 wh.5 = VRLoad( "TDL_1", VRWindowPath(), "SW_5" ) /* Browse */ 199 ok = VRMethod( "TDL_1", "InsertPage", wh.5, "+"NLVGetMessage(19) ) 200 201 wh.6 = VRLoad( "TDL_1", VRWindowPath(), "SW_6" ) /* Settings */ 202 ok = VRMethod( "TDL_1", "InsertPage", wh.6, "+"NLVGetMessage(24) ) 203 204 call _ContainerInit 205 206 ok = VRSet("CB_Debug","set",options.!Debug) 207 if options.!Debug then ok = VRREdirectStdIO("ON") 208 else ok = VRREdirectStdIO("OFF") 209 ok = VRSet("SPIN_Intervall", "Value", settings.!intervall) 210 ok = VRSet("SPIN_IntervallMin","Value", settings.!intervallMin) 211 ok = VRSet("TM_Refresh","Delay", settings.!intervall * 1000) 212 213 ok = VRSet("CB_NoMsgBox","Set", settings.!NoMsgBox) 214 215 /* CALL NLVSetText 'SW_1', 'Userdata', 15 216 CALL NLVSetText 'SW_2', 'Userdata', 16 217 CALL NLVSetText 'SW_3', 'Userdata', 17 218 CALL NLVSetText 'SW_4', 'Userdata', 18 219 CALL NLVSetText 'SW_5', 'Userdata', 19 220 CALL NLVSetText 'SW_6', 'Userdata', 24 */ 221 222 CALL NLVSetText 'SW_1', 'Hinttext', 55 223 CALL NLVSetText 'SW_2', 'Hinttext', 56 224 CALL NLVSetText 'SW_3', 'Hinttext', 57 225 CALL NLVSetText 'SW_4', 'Hinttext', 58 226 CALL NLVSetText 'SW_5', 'Hinttext', 59 227 CALL NLVSetText 'SW_6', 'Hinttext', 60 228 229 CALL NLVSetText 'DT_Refresh', 'Caption', 25 230 CALL NLVSetText 'DT_RefreshMin', 'Caption', 25 231 CALL NLVSetText 'DT_Intervall', 'Caption', 26 232 ok = VRSet("DT_IntervallMin","Caption", NLVGetMessage(26)' 'NLVGetMessage(28)) 233 CALL NLVSetText 'CB_NoMsgBox', 'Caption', 27 181 234 return 182 235 … … 196 249 Width = VRGetIni( "Pos", "Width", OurINI , 'NoClose') 197 250 Height= VRGetIni( "Pos", "Height", OurINI , 'NoClose') 251 252 settings.!intervall = VRGetIni( "Settings", "Intervall", OurINI) 253 if settings.!intervall = "" then settings.!intervall = 60 254 255 settings.!intervallMin = VRGetIni( "Settings", "IntervallMin", OurINI) 256 if settings.!intervallMin = "" then settings.!intervallMin = 180 257 258 settings.!NoMsgBox = VRGetIni( "Settings", "NoMsgBox", OurINI) 259 if settings.!NoMsgBox = "" then settings.!NoMsgBox = 0 260 261 options.!debug = VRGetIni( "Options", "Debug", OurINI) 262 if options.!debug = "" then options.!debug = 0 198 263 199 264 if options.!debug == 1 THEN SAY time()' _INIRead() done' … … 208 273 ok = VRSetIni( "Pos", "Width", VRGet("Main","Width"), OurINI, 'NoClose' ) 209 274 ok = VRSetIni( "Pos", "Height", VRGet("Main","Height"), OurINI, 'NoClose' ) 275 276 ok = VRSetIni( "Settings", "Intervall", settings.!intervall, OurINI, 'NoClose' ) 277 ok = VRSetIni( "Settings", "IntervallMin", settings.!intervallmin, OurINI, 'NoClose' ) 278 ok = VRSetIni( "Settings", "NoMsgBox", settings.!NoMsgBox, OurINI, 'NoClose' ) 279 ok = VRSetIni( "Options", "Debug", options.!debug, OurINI, 'NoClose' ) 280 281 /* ok = VRSetIni( "Settings", "BigIcons", \VRGet("CN_SMBTREE", "MiniIcons"),OurINI,'NoClose') 282 ok = VRSetIni( "Settings", "CurrentPageNr",CurrentPageNr, OurINI,'NoClose') 283 ok = VRSetIni( "Settings", "DaemonView", VRGet("CN_Daemons","View"), OurINI,'NoClose') 284 ok = VRSetIni( "Settings", "TreeView", VRGet("CN_smbtree","View"), OurINI,'NoClose') */ 285 210 286 if options.!debug == 1 THEN SAY time()' _INIWrite() done' 287 return 288 289 /*:VRX _LoadOtherFuncs 290 */ 291 _LoadOtherFuncs: 292 if options.!debug == 1 then ok = VRRedirectStdIO("ON") 293 else ok = VRRedirectStdIO("OFF") 294 295 call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs' 296 call SysLoadFuncs 297 298 call RxFuncAdd 'PRLoadFuncs', 'PR1UTIL', 'PRLoadFuncs' 299 call PRLoadFuncs 300 return 301 302 /*:VRX _NLVSetup 303 */ 304 _NLVSetup: 305 if options.!debug == 1 THEN SAY time()' _NLVSetup() started' 306 call NLVSetup 307 Msg.Title = NLVGetMessage(1) 308 ok = VRSet("Main","helpFile", settings.!helpfile) 309 310 CALL NLVSetText 'PB_Refresh', 'Caption', 11 311 CALL NLVSetText 'PB_Cancel', 'Caption', 12 312 CALL NLVSetText 'PB_Help', 'Caption', 13 313 CALL NLVSetText 'PB_About', 'Caption', 14 314 315 CALL NLVSetText 'PB_Refresh', 'Hinttext', 51 316 CALL NLVSetText 'PB_Cancel', 'Hinttext', 54 317 CALL NLVSetText 'PB_Help', 'Hinttext', 52 318 CALL NLVSetText 'PB_About', 'Hinttext', 53 319 320 321 /* CALL NLVSetText 'ContextMenu_Daemons_Sort', 'Caption', 35 322 CALL NLVSetText 'ContextMenu_Daemons_Ping', 'Caption', 32 323 CALL NLVSetText 'ContextMenu_Daemons_Details','Caption', 118 324 CALL NLVSetText 'ContextMenu_Daemons_Tree', 'Caption', 120 325 326 CALL NLVSetText 'ContextMenu_Files_Sort', 'Caption', 35 327 328 CALL NLVSetText 'ContextMenu_Service_Sort', 'Caption', 35 329 CALL NLVSetText 'ContextMenu_Service_CloseSHare', 'Caption', 70 330 331 CALL NLVSetText 'ContextMenu_Users_SendMsg', 'Caption', 80 332 CALL NLVSetText 'ContextMenu_Users_Sort', 'Caption', 35 333 334 CALL NLVSetText 'ContextMenu_Tree_SendMsg', 'Caption', 80 335 CALL NLVSetText 'ContextMenu_Tree_Sort', 'Caption', 35 336 CALL NLVSetText 'ContextMenu_Tree_Tree', 'Caption', 120 337 CALL NLVSetText 'ContextMenu_Tree_Details', 'Caption', 118 */ 338 if options.!debug == 1 THEN SAY time()' _NLVSetup() done' 339 return 340 341 /*:VRX _SambaFindPIDFile 342 */ 343 _SambaFindPIDFile: 344 if options.!debug == 1 THEN SAY time()' _SambaFindPIDfile() started' 345 ok = SysFileTree(ETC'\samba\pid\nmbd*pid',nmbdpid.,'FO') 346 if nmbdpid.0 = 1 then nmbdpidfile = nmbdpid.1; else nmbdpidfile = "" 347 if options.!debug == 1 THEN SAY " nmbdpidfile = "nmbdpidfile 348 if options.!debug == 1 THEN SAY time()' _SambaFindPIDfile() done' 349 return 350 351 /*:VRX CB_Debug_Click 352 */ 353 CB_Debug_Click: 354 options.!debug = VRGet("CB_Debug","Set") 355 if options.!Debug then ok = VRREdirectStdIO("ON") 356 else ok = VRREdirectStdIO("OFF") 357 return 358 359 /*:VRX CB_NoMsgBox_Click 360 */ 361 CB_NoMsgBox_Click: 362 settings.!NoMsgBox = VRGet("CB_NoMsgBox","Set") 211 363 return 212 364 … … 244 396 */ 245 397 Main_Create: 398 options.!debug = 1 399 400 call _LoadOtherFuncs 401 call _InitTempDir 402 call _SambaInit 403 if _SambaRunning() then call _SambaFindPIDfile 246 404 call _INIRead 247 call NLVSetup405 call _NLVSetup 248 406 call _GUIInit 407 408 ok = VRMethod("PB_Refresh","SetFocus") 249 409 return 250 410 … … 265 425 266 426 ok = VRSet("PB_Refresh","Top", iHeight - ButtonVDist) 267 ok = VRSet("PB_Quit", "Top", iHeight - ButtonVDist)268 427 ok = VRSet("PB_About", "Top", iHeight - ButtonVDist) 269 428 ok = VRSet("PB_Help", "Top", iHeight - ButtonVDist) 429 ok = VRSet("PB_Cancel", "Top", iHeight - ButtonVDist) 270 430 271 431 ok = VRSEt("PB_Refresh","Left",ButtonHPos+ButtonHDist*(ButtonNr-4)) 272 ok = VRSEt("PB_ Quit","Left",ButtonHPos+ButtonHDist*(ButtonNr-3))273 ok = VRSEt("PB_ About","Left",ButtonHPos+ButtonHDist*(ButtonNr-2))274 ok = VRSEt("PB_ Help","Left",ButtonHPos+ButtonHDist*(ButtonNr-1))432 ok = VRSEt("PB_About", "Left",ButtonHPos+ButtonHDist*(ButtonNr-3)) 433 ok = VRSEt("PB_Help", "Left",ButtonHPos+ButtonHDist*(ButtonNr-2)) 434 ok = VRSEt("PB_Cancel", "Left",ButtonHPos+ButtonHDist*(ButtonNr-1)) 275 435 276 436 cLeft = 120 … … 317 477 return 318 478 319 /*:VRX PB_ Quit_Click320 */ 321 PB_ Quit_Click:479 /*:VRX PB_Cancel_Click 480 */ 481 PB_Cancel_Click: 322 482 call Quit 323 483 return … … 330 490 call VRSet window, "Shutdown", 1 331 491 drop window 492 return 493 494 /*:VRX SPIN_Intervall_Change 495 */ 496 SPIN_Intervall_Change: 497 settings.!intervall = VRget("SPIN_Intervall","Value") 498 ok = VRSet("TM_Refresh","Delay", settings.!intervall * 1000) 499 return 500 501 /*:VRX SPIN_IntervallMin_Change 502 */ 503 SPIN_IntervallMin_Change: 504 settings.!intervallmin = VRget("SPIN_IntervallMin","Value") 332 505 return 333 506 … … 518 691 return 519 692 520 /*:VRX TDL_1_PageSelected521 */522 TDL_1_PageSelected:523 if FirstRun = 1 then do524 ok = VRSet("TDL_1","Painting", 0)525 call _ContainerInit526 FirstRun = 0527 ok = VRSet("TDL_1","Painting", 1)528 end529 return530
Note:
See TracChangeset
for help on using the changeset viewer.