Ignore:
Timestamp:
Jun 13, 2012, 12:08:42 PM (13 years ago)
Author:
Herwig Bauernfeind
Message:

GUI-Tools: Updates in EVFSGUI/SMBMON/Shared code

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/guitools/smbmon/smbmon.vrx

    r688 r703  
    112112    ok = VRMethod(Container, "GetFieldList", "Fields." )
    113113
    114     do I = 1 to 12
     114    do I = 1 to 14
     115        R2I = right("0"||I,2)
    115116        if I <= fields.0 then do
    116 /*          say "Columns_"||right("0"||I,2)' 'VRMethod(Container, "GetFieldAttr", fields.I, "Title" ) */
    117             ok = VRset("Columns_"||right("0"||I,2), "Visible", 1)
    118             ok = VRset("Columns_"||right("0"||I,2), "Caption", VRMethod(Container, "GetFieldAttr", fields.I, "Title" ))
    119             ok = VRset("Columns_"||right("0"||I,2), "Checked", VRMethod(Container, "GetFieldAttr", fields.I, "Visible" ))
    120             ok = VRset("Columns_"||right("0"||I,2), "Userdata", Container'|'fields.I'|'VRMethod(Container, "GetFieldAttr", fields.I, "Visible" ))
    121         end
    122         else ok = VRset("Columns_"||right("0"||I,2), "Visible", 0)
     117/*          say "Columns_"||R2I' 'VRMethod(Container, "GetFieldAttr", fields.I, "Title" ) */
     118            ok = VRset("Columns_"||R2I, "Visible", 1)
     119            ok = VRset("Columns_"||R2I, "Caption", VRMethod(Container, "GetFieldAttr", fields.I, "Title" ))
     120            ok = VRset("Columns_"||R2I, "Checked", VRMethod(Container, "GetFieldAttr", fields.I, "Visible" ))
     121            ok = VRset("Columns_"||R2I, "Userdata", Container'|'fields.I'|'VRMethod(Container, "GetFieldAttr", fields.I, "Visible" ))
     122        end
     123        else ok = VRset("Columns_"||R2I, "Visible", 0)
    123124    end
    124125    ok = VRMethod( "Columns", "Popup", , , "", "" )   
     
    12291230        if DRH <> "" then DaemonName = VRMethod("CN_Daemons", "GetRecordAttr", DRH, "Caption")
    12301231        select
    1231             when Words(DaemonName) = 3 then do
     1232            when Words(DaemonName) = 3 then do /* a child process with PID in name */
    12321233                DaemonName = word(DaemonName,2)
    12331234                ok = VRset("ContextMenu_Daemons_Sep1","Visible", 1 )
     1235                ok = VRSet("ContextMenu_Daemons_KillPID", "Caption", NLVGetMessage( 38, DaemonName))
     1236                ok = VRset("ContextMenu_Daemons_KillPID",  "Visible", 1 )
     1237                ok = VRset("ContextMenu_Daemons_Start", "Visible", 0 )
     1238                ok = VRset("ContextMenu_Daemons_Ping",  "Visible", 1 )
     1239                ok = VRset("ContextMenu_Daemons_Sep1",  "Visible", 1 )
    12341240            end
    1235             when Words(DaemonName) = 1 then do
     1241            when Words(DaemonName) = 1 then do /* on smbd.exe or nmbd.exe root processes */
    12361242                parse var DaemonName DaemonName'.exe'
    12371243                if strip(VRMethod("CN_Daemons", "GetFieldData", DRH, DPidsFH)) <> "" then do
     
    12441250                    ok = VRSet("ContextMenu_Daemons_Start", "Caption", NLVGetMessage( 36, DaemonName))
    12451251                    ok = VRset("ContextMenu_Daemons_Start", "Visible", 1 )
     1252                    ok = VRset("ContextMenu_Daemons_KillPID","Visible", 0 )
    12461253                    ok = VRset("ContextMenu_Daemons_Ping",  "Visible", 0 )
    12471254                    ok = VRset("ContextMenu_Daemons_Sep1",  "Visible", 1 )
     
    13951402return
    13961403
     1404/*:VRX         Columns_13_Click
     1405*/
     1406Columns_13_Click:
     1407    call _ColumnShow
     1408return
     1409
     1410/*:VRX         Columns_14_Click
     1411*/
     1412Columns_14_Click:
     1413    call _ColumnShow
     1414return
     1415
    13971416/*:VRX         ContextMenu_Daemons_Details_Click
    13981417*/
     
    14021421    ok = VRset("ContextMenu_Daemons_Details","Enabled",0)
    14031422    ok = VRSet("TM_refresh","Enabled", 1)
     1423return
     1424
     1425/*:VRX         ContextMenu_Daemons_KillPID_Click
     1426*/
     1427ContextMenu_Daemons_KillPID_Click:
     1428    Msg.Text = NLVGetMessage(39, DaemonName)
     1429    Msg.Type = 'Q'
     1430    if _MsgYesNo() = 1 then do
     1431        say 'kill -9 'DaemonName
     1432        address cmd 'kill -9 'DaemonName
     1433    end
     1434    ok = VRSet("TM_refresh","Enabled", 1)
     1435    call PB_PAUSEDISPLAY_Click
    14041436return
    14051437
     
    14351467    end
    14361468    ok = VRSet("TM_refresh","Enabled", 1)
     1469    call PB_PAUSEDISPLAY_Click
    14371470return
    14381471
     
    14531486    end
    14541487    ok = VRSet("TM_refresh","Enabled", 1)
     1488    call PB_PAUSEDISPLAY_Click
    14551489return
    14561490
     
    19431977    end
    19441978    ok = VRSet("TM_Refresh","Delay", 2000)
     1979    if \VRGet("TM_RefreshDaemons","Enabled") then call PB_PAUSEDISPLAY_Click
    19451980    call VRSet VRWindow(), 'Pointer', '<default>'
    19461981return
     
    19581993    end
    19591994    ok = VRSet("TM_Refresh","Delay", 1000)
     1995    if \VRGet("TM_RefreshDaemons","Enabled") then call PB_PAUSEDISPLAY_Click
    19601996    call VRSet VRWindow(), 'Pointer', '<default>'
    19611997return
     
    19912027    end
    19922028    ok = VRSet("TM_Refresh","Delay", 1000)
     2029    if \VRGet("TM_RefreshDaemons","Enabled") then call PB_PAUSEDISPLAY_Click
    19932030    call VRSet VRWindow(), 'Pointer', '<default>'
    19942031    say "IPB_Start_Click done"
     
    20072044    end
    20082045    ok = VRSet("TM_Refresh","Delay", 1000)
     2046    if \VRGet("TM_RefreshDaemons","Enabled") then call PB_PAUSEDISPLAY_Click
    20092047    call VRSet VRWindow(), 'Pointer', '<default>'
    20102048    say "IPB_Stop_Click done"
Note: See TracChangeset for help on using the changeset viewer.