Datapolis Process System

Search:

Contents
:
IndexBookmarkPrint
Home > User Guide > Administration > Additional Configuration > Control visibility of Close button

Control visibility of Close button

 

Controlling visibility of Close button on progress bar when you are starting an action:

 

There is public class:

Datapolis.WorkBox.Common.PowerShell.Configuration

It contains:

public static string SetAllowCloseActionFormTimeount(int milliseconds)

You can use it to hide Close button or set time when it should appear.

 

When:

milliseconds < 0 - the Close button will be hidden.

milliseconds > 0 - the Close button will be visible after millisecond time, counted from commit.

Example in PowerShell:

 

if ($args.length -gt 0)
{
    $value = [int]$args[0]
    $keyName = "AllowCloseActionFormTimeout"
 
    $ver = $host | select version
    if ($ver.Version.Major -gt 1) {$host.Runspace.ThreadOptions = "ReuseThread"}
    if ((Get-PSSnapin "Microsoft.SharePoint.PowerShell" -ErrorAction Continue) -eq $null)
    {
        Add-PSSnapin "Microsoft.SharePoint.PowerShell"
    }
    $dpcommonassembly = [Reflection.Assembly]::Load("Datapolis.WorkBox.Common, Version=1.1.0.0, Culture=neutral, PublicKeyToken=2c03c3097ac016b8")
    [Datapolis.WorkBox.Common.PowerShell.Configuration]::SetAllowCloseActionFormTimeout($value)
}
else
{
    write-host "`n`nScript using: `n setAllowCloseButtonTimeout.ps1 <timeout in milisec.> `n  eq. setAllowCloseButtonTimeout.ps1 2000`n`n To hide close button set less than 0 value.`n`n"
}

It is possible to change the display setting of the button on the action execution form:

 

Follow the PowerShell script sample: