This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var htmlEncode = function htmlEncode(s) { | |
var ntable = { | |
"&": "amp", | |
"<": "lt", | |
">": "gt", | |
"\"": "quot" | |
}; | |
s = s.replace(/[&<>"]/g, function (ch) { | |
return "&" + ntable[ch] + ";"; | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var sleep = function sleep(ms) { | |
var date = Date.now(); | |
var currentDate = null; | |
do { | |
currentDate = Date.now(); | |
} while (currentDate - date < ms); | |
}; | |
var sleepPromise = function newSleep(ms) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Imports System.Threading | |
Class Application | |
''' if app is already running, exiting the application | |
Private Shared _mutex As System.Threading.Mutex = Nothing | |
Protected Overrides Sub OnStartup(e As StartupEventArgs) | |
Const appName As String = "SWD_IPConfigTool" | |
Dim createdNew As Boolean | |
_mutex = New Mutex(True, appName, createdNew) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Dim dpiWidthProperty = GetType(SystemParameters).GetProperty("DpiX", BindingFlags.NonPublic Or BindingFlags.[Static]) | |
Dim dpiHeightProperty = GetType(SystemParameters).GetProperty("Dpi", BindingFlags.NonPublic Or BindingFlags.[Static]) | |
Dim dpiX = CInt(dpiWidthProperty.GetValue(Nothing, Nothing)) | |
Dim dpiY = CInt(dpiHeightProperty.GetValue(Nothing, Nothing)) | |
Width = SystemParameters.PrimaryScreenWidth * (dpiX / 96) | |
Height = SystemParameters.PrimaryScreenHeight * (dpiY / 96) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Imports System.ComponentModel.DataAnnotations | |
Public Class EnumHelpers | |
Public Class RequiredEnumAttribute | |
Inherits RequiredAttribute | |
Public Overrides Function IsValid(ByVal value As Object) As Boolean | |
If value Is Nothing Then Return False | |
If CInt(value) = 0 Then Return False |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Imports log4net | |
Imports System.Management | |
Imports System.Linq | |
Namespace GhostImaging | |
Public Class WmiResult | |
Property Name As String | |
Property ProcessId As Int32 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- | |
Office CDN and fallback | |
CSS and JS are copies of referenced CDN's | |
If the CDN's change, the fallbacks must change' | |
--> | |
<link rel="preconnect" href="https://appsforoffice.microsoft.com"> | |
<script src="https://appsforoffice.microsoft.com/lib/1.1/hosted/office.js"></script> | |
<script> | |
if (!window.OSF) { | |
document.write('<script src="../../Scripts/Office/1/office.js">\x3C/script>'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var settingsManager = (function () { | |
"use strict"; | |
var settingsManager = {}; | |
var _settings; | |
settingsManager.initialize = function () { | |
//global for custom property |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function screenMultipliers (scaledForHeight, scaledForWidth) { | |
var _currentScreenHeight = screen.height; | |
var _currentScreenWidth = screen.width; | |
//reverse values of screen is in portrait mode | |
if (_currentScreenHeight > _currentScreenWidth) { | |
var tempHolder = _currentScreenHeight; | |
_currentScreenHeight = _currentScreenWidth; | |
_currentScreenWidth = tempHolder; |