Changeset 345 for branches/guitools-2.0/smbmon/smbmon.vrx
- Timestamp:
- Oct 30, 2009, 4:17:35 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/guitools-2.0/smbmon/smbmon.vrx
r334 r345 378 378 /* For Users page in case connections.tdb is not initialised */ 379 379 IgnoreSmbNoInit = 1 380 381 /* For Refresh tree display code */ 382 RefreshMode ="" 380 383 381 384 smbdpidhandle.0 = 0 … … 647 650 parse var Zeile FPid Uid DenyMode Access RW Oplock Sharepath Rest 648 651 TimeDate = right(rest,25) 649 Name = strip(left(Rest, length(Rest)-25))652 Name = strip(left(Rest,max(length(Rest)-25),1)) 650 653 I = I + 1 651 654 sharepath = strip(translate(left(sharepath,1))||translate(substr(SharePath,2),'\','/'),'T','\') … … 1097 1100 ok = VRset("ContextMenu_Daemons_Ping","Visible", (DRH <> "") ) 1098 1101 ok = VRset("ContextMenu_Daemons_Shutdown","Visible", 0 ) 1099 RecCap= ""1100 if DRH <> "" then RecCap= VRMethod("CN_Daemons", "GetRecordAttr", DRH, "Caption")1102 DaemonName = "" 1103 if DRH <> "" then DaemonName = VRMethod("CN_Daemons", "GetRecordAttr", DRH, "Caption") 1101 1104 select 1102 when Words( RecCap) = 3 then do1103 RecCap = word(RecCap,2)1105 when Words(DaemonName) = 3 then do 1106 DaemonName = word(DaemonName,2) 1104 1107 ok = VRset("ContextMenu_Daemons_Sep1","Visible", 1 ) 1105 1108 end 1106 when Words( RecCap) = 1 then do1107 parse var RecCap RecCap'.exe'1109 when Words(DaemonName) = 1 then do 1110 parse var DaemonName DaemonName'.exe' 1108 1111 if strip(VRMethod("CN_Daemons", "GetFieldData", DRH, DPidsFH)) <> "" then do 1109 ok = VRSet("ContextMenu_Daemons_Shutdown", "Caption", NLVGetMessage( 33, RecCap))1112 ok = VRSet("ContextMenu_Daemons_Shutdown", "Caption", NLVGetMessage( 33, DaemonName)) 1110 1113 ok = VRset("ContextMenu_Daemons_Shutdown", "Visible", 1 ) 1111 ok = VRset("ContextMenu_Daemons_Sep1","Visible", 1 ) 1114 ok = VRset("ContextMenu_Daemons_Start", "Visible", 0 ) 1115 ok = VRset("ContextMenu_Daemons_Sep1", "Visible", 1 ) 1112 1116 end 1113 else ok = VRset("ContextMenu_Daemons_Ping","Visible", 0 ) 1117 else do 1118 ok = VRSet("ContextMenu_Daemons_Start", "Caption", NLVGetMessage( 36, DaemonName)) 1119 ok = VRset("ContextMenu_Daemons_Start", "Visible", 1 ) 1120 ok = VRset("ContextMenu_Daemons_Ping", "Visible", 0 ) 1121 ok = VRset("ContextMenu_Daemons_Sep1", "Visible", 1 ) 1122 end 1114 1123 end 1115 1124 otherwise nop 1116 1125 end 1117 say ' Daemon is "' RecCap'"'1126 say ' Daemon is "'DaemonName'"' 1118 1127 ok = VRMethod( "ContextMenu_Daemons", "Popup", , , "", "" ) 1119 1128 end … … 1149 1158 return 1150 1159 1160 /*:VRX CN_smbtree_Click 1161 */ 1162 CN_smbtree_Click: 1163 rh = VRInfo('Record') 1164 if VRMethod( 'CN_SMBTREE', "ValidateRecord", rh) <> 1 then return 1165 userdata = VRMethod('CN_smbtree', 'GetRecordAttr', rh, 'UserData') 1166 parse var userdata . '|' userdata 1167 ok = VRset("Main","StatusText", userdata) 1168 1169 1170 return 1171 1151 1172 /*:VRX CN_smbtree_ContextMenu 1152 1173 */ … … 1272 1293 ContextMenu_Daemons_Ping_Click: 1273 1294 ok = VRSet("Main", 'Pointer', 'Wait' ) 1274 address cmd samba.!smbcontrolexe' ' RecCap' ping --timeout=3 --debuglevel=0 2>'samba.!error' 1>'samba.!msg1295 address cmd samba.!smbcontrolexe' 'DaemonName' ping --timeout=3 --debuglevel=0 2>'samba.!error' 1>'samba.!msg 1275 1296 call _SambaShowMsg "section table registered" 1276 1297 … … 1282 1303 */ 1283 1304 ContextMenu_Daemons_Shutdown_Click: 1284 Msg.Text = NLVGetMessage(34, RecCap)1305 Msg.Text = NLVGetMessage(34, DaemonName) 1285 1306 Msg.Type = 'Q' 1286 1307 if _MsgYesNo() = 1 then do 1287 address cmd samba.!smbcontrolexe' ' RecCap' shutdown 2>'samba.!error' 1>'samba.!msg1288 call _SambaShowMsg "section table registered "1308 address cmd samba.!smbcontrolexe' 'DaemonName' shutdown 2>'samba.!error' 1>'samba.!msg 1309 call _SambaShowMsg "section table registered tdb" 1289 1310 end 1290 1311 ok = VRSet("TM_refresh","Enabled", 1) … … 1295 1316 ContextMenu_Daemons_Sort_Click: 1296 1317 window = VRLoadSecondary( "SW_SORT", "W" ) 1318 return 1319 1320 /*:VRX ContextMenu_Daemons_Start_Click 1321 */ 1322 ContextMenu_Daemons_Start_Click: 1323 Msg.Text = NLVGetMessage(37, DaemonName) 1324 Msg.Type = 'Q' 1325 if _MsgYesNo() = 1 then do 1326 say samba.!smbcmd' start 'DaemonName 1327 address cmd samba.!smbcmd' start 'DaemonName 1328 end 1329 ok = VRSet("TM_refresh","Enabled", 1) 1297 1330 return 1298 1331 … … 1970 2003 */ 1971 2004 TM_RefreshTreeDisplay_Trigger: 1972 call _RefreshTreeDisplay 2005 select 2006 when RefreshMode = "TREE" then do 2007 call _RefreshTreeDisplay 2008 end 2009 when RefreshMode = "SHARE" then do 2010 call _AddSharesDisplay 2011 end 2012 otherwise say "RefreshMode = "RefreshMode 2013 end 1973 2014 return 1974 2015
Note:
See TracChangeset
for help on using the changeset viewer.