Datapolis Process System
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]
[0]
$keyName
=
"AllowCloseActionFormTimeout"
$ver
$host
| select version
.Version.Major -gt 1) {
.Runspace.ThreadOptions =
"ReuseThread"
}
((Get-PSSnapin
"Microsoft.SharePoint.PowerShell"
-ErrorAction Continue) -eq
$null
)
Add-PSSnapin
$dpcommonassembly
= [Reflection.Assembly]::Load(
"Datapolis.WorkBox.Common, Version=1.1.0.0, Culture=neutral, PublicKeyToken=2c03c3097ac016b8"
[Datapolis.WorkBox.Common.PowerShell.Configuration]::SetAllowCloseActionFormTimeout(
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: