SEBWIN-581: Implemented new configuration option to control printing of web content.

This commit is contained in:
Damian Büchel 2022-07-25 20:25:42 +02:00
parent 9d7b89d36c
commit 32be808415
19 changed files with 1136 additions and 1126 deletions

View file

@ -81,7 +81,7 @@ namespace SafeExamBrowser.Browser
{
Task.Run(() => callback(new JavascriptResult
{
Message = "JavaScript can't be executed in the main frame!",
Message = "JavaScript can't be executed in main frame!",
Success = false
}));
}

View file

@ -150,7 +150,7 @@ namespace SafeExamBrowser.Browser
var downloadLogger = logger.CloneFor($"{nameof(DownloadHandler)} #{Id}");
var downloadHandler = new DownloadHandler(appConfig, downloadLogger, settings, WindowSettings);
var keyboardHandler = new KeyboardHandler();
var renderProcessMessageHandler = new RenderProcessMessageHandler(appConfig, keyGenerator, text);
var renderHandler = new RenderProcessMessageHandler(appConfig, keyGenerator, settings, text);
var requestFilter = new RequestFilter();
var requestLogger = logger.CloneFor($"{nameof(RequestHandler)} #{Id}");
var resourceHandler = new ResourceHandler(appConfig, requestFilter, keyGenerator, logger, settings, WindowSettings, text);
@ -187,7 +187,7 @@ namespace SafeExamBrowser.Browser
InitializeRequestFilter(requestFilter);
Control = new BrowserControl(cefSharpControl, dialogHandler, displayHandler, downloadHandler, keyboardHandler, renderProcessMessageHandler, requestHandler);
Control = new BrowserControl(cefSharpControl, dialogHandler, displayHandler, downloadHandler, keyboardHandler, renderHandler, requestHandler);
Control.AddressChanged += Control_AddressChanged;
Control.LoadFailed += Control_LoadFailed;
Control.LoadingStateChanged += Control_LoadingStateChanged;

View file

@ -11,6 +11,7 @@ using SafeExamBrowser.Browser.Content;
using SafeExamBrowser.Configuration.Contracts;
using SafeExamBrowser.Configuration.Contracts.Cryptography;
using SafeExamBrowser.I18n.Contracts;
using BrowserSettings = SafeExamBrowser.Settings.Browser.BrowserSettings;
namespace SafeExamBrowser.Browser.Handlers
{
@ -19,12 +20,16 @@ namespace SafeExamBrowser.Browser.Handlers
private readonly AppConfig appConfig;
private readonly ContentLoader contentLoader;
private readonly IKeyGenerator keyGenerator;
private readonly BrowserSettings settings;
private readonly IText text;
internal RenderProcessMessageHandler(AppConfig appConfig, IKeyGenerator keyGenerator, IText text)
internal RenderProcessMessageHandler(AppConfig appConfig, IKeyGenerator keyGenerator, BrowserSettings settings, IText text)
{
this.appConfig = appConfig;
this.contentLoader = new ContentLoader(text);
this.keyGenerator = keyGenerator;
this.settings = settings;
this.text = text;
}
public void OnContextCreated(IWebBrowser chromiumWebBrowser, IBrowser browser, IFrame frame)
@ -34,6 +39,11 @@ namespace SafeExamBrowser.Browser.Handlers
var api = contentLoader.LoadApi(browserExamKey, configurationKey, appConfig.ProgramBuildVersion);
frame.ExecuteJavaScriptAsync(api);
if (!settings.AllowPrint)
{
frame.ExecuteJavaScriptAsync($"window.print = function(){{ alert('{text.Get(TextKey.Browser_PrintNotAllowed)}') }}");
}
}
public void OnContextReleased(IWebBrowser chromiumWebBrowser, IBrowser browser, IFrame frame)

View file

@ -42,6 +42,9 @@ namespace SafeExamBrowser.Configuration.ConfigurationData.DataMapping
case Keys.Browser.AllowPdfReaderToolbar:
MapAllowPdfReaderToolbar(settings, value);
break;
case Keys.Browser.AllowPrint:
MapAllowPrint(settings, value);
break;
case Keys.Browser.AllowSpellChecking:
MapAllowSpellChecking(settings, value);
break;
@ -270,6 +273,14 @@ namespace SafeExamBrowser.Configuration.ConfigurationData.DataMapping
}
}
private void MapAllowPrint(AppSettings settings, object value)
{
if (value is bool allow)
{
settings.Browser.AllowPrint = allow;
}
}
private void MapAllowSpellChecking(AppSettings settings, object value)
{
if (value is bool allow)
@ -817,13 +828,13 @@ namespace SafeExamBrowser.Configuration.ConfigurationData.DataMapping
{
if (raw.EndsWith("%") && int.TryParse(raw.Replace("%", string.Empty), out var relativeHeight))
{
settings.Browser.AdditionalWindow.AbsoluteHeight = default(int?);
settings.Browser.AdditionalWindow.AbsoluteHeight = default;
settings.Browser.AdditionalWindow.RelativeHeight = relativeHeight;
}
else if (int.TryParse(raw, out var absoluteHeight))
{
settings.Browser.AdditionalWindow.AbsoluteHeight = absoluteHeight;
settings.Browser.AdditionalWindow.RelativeHeight = default(int?);
settings.Browser.AdditionalWindow.RelativeHeight = default;
}
}
}
@ -834,13 +845,13 @@ namespace SafeExamBrowser.Configuration.ConfigurationData.DataMapping
{
if (raw.EndsWith("%") && int.TryParse(raw.Replace("%", string.Empty), out var relativeHeight))
{
settings.Browser.MainWindow.AbsoluteHeight = default(int?);
settings.Browser.MainWindow.AbsoluteHeight = default;
settings.Browser.MainWindow.RelativeHeight = relativeHeight;
}
else if (int.TryParse(raw, out var absoluteHeight))
{
settings.Browser.MainWindow.AbsoluteHeight = absoluteHeight;
settings.Browser.MainWindow.RelativeHeight = default(int?);
settings.Browser.MainWindow.RelativeHeight = default;
}
}
}
@ -897,13 +908,13 @@ namespace SafeExamBrowser.Configuration.ConfigurationData.DataMapping
{
if (raw.EndsWith("%") && int.TryParse(raw.Replace("%", string.Empty), out var relativeWidth))
{
settings.Browser.AdditionalWindow.AbsoluteWidth = default(int?);
settings.Browser.AdditionalWindow.AbsoluteWidth = default;
settings.Browser.AdditionalWindow.RelativeWidth = relativeWidth;
}
else if (int.TryParse(raw, out var absoluteWidth))
{
settings.Browser.AdditionalWindow.AbsoluteWidth = absoluteWidth;
settings.Browser.AdditionalWindow.RelativeWidth = default(int?);
settings.Browser.AdditionalWindow.RelativeWidth = default;
}
}
}
@ -914,13 +925,13 @@ namespace SafeExamBrowser.Configuration.ConfigurationData.DataMapping
{
if (raw.EndsWith("%") && int.TryParse(raw.Replace("%", string.Empty), out var relativeWidth))
{
settings.Browser.MainWindow.AbsoluteWidth = default(int?);
settings.Browser.MainWindow.AbsoluteWidth = default;
settings.Browser.MainWindow.RelativeWidth = relativeWidth;
}
else if (int.TryParse(raw, out var absoluteWidth))
{
settings.Browser.MainWindow.AbsoluteWidth = absoluteWidth;
settings.Browser.MainWindow.RelativeWidth = default(int?);
settings.Browser.MainWindow.RelativeWidth = default;
}
}
}

View file

@ -164,6 +164,7 @@ namespace SafeExamBrowser.Configuration.ConfigurationData
settings.Browser.AllowPageZoom = true;
settings.Browser.AllowPdfReader = true;
settings.Browser.AllowPdfReaderToolbar = false;
settings.Browser.AllowPrint = false;
settings.Browser.AllowUploads = true;
settings.Browser.DeleteCacheOnShutdown = true;
settings.Browser.DeleteCookiesOnShutdown = true;

View file

@ -48,6 +48,7 @@ namespace SafeExamBrowser.Configuration.ConfigurationData
internal const string AllowFind = "allowFind";
internal const string AllowPageZoom = "enableZoomPage";
internal const string AllowPdfReaderToolbar = "allowPDFReaderToolbar";
internal const string AllowPrint = "allowPrint";
internal const string AllowSpellChecking = "allowSpellCheck";
internal const string CustomUserAgentDesktop = "browserUserAgentWinDesktopModeCustom";
internal const string CustomUserAgentMobile = "browserUserAgentWinTouchModeCustom";

View file

@ -23,6 +23,7 @@ namespace SafeExamBrowser.I18n.Contracts
Browser_LoadErrorMessage,
Browser_LoadErrorTitle,
Browser_Name,
Browser_PrintNotAllowed,
Browser_Tooltip,
BrowserWindow_BackwardButton,
BrowserWindow_DeveloperConsoleMenuItem,

View file

@ -27,6 +27,9 @@
<Entry key="Browser_Name">
Browser
</Entry>
<Entry key="Browser_PrintNotAllowed">
Drucken ist nicht erlaubt gemäss der aktiven Konfiguration.
</Entry>
<Entry key="Browser_Tooltip">
Browser Applikation
</Entry>

View file

@ -27,6 +27,9 @@
<Entry key="Browser_Name">
Browser
</Entry>
<Entry key="Browser_PrintNotAllowed">
Printing is not allowed according to the current configuration.
</Entry>
<Entry key="Browser_Tooltip">
Browser Application
</Entry>

View file

@ -27,6 +27,9 @@
<Entry key="Browser_Name">
Navigateur
</Entry>
<Entry key="Browser_PrintNotAllowed">
L'impression n'est pas autorisée par la configuration actuelle.
</Entry>
<Entry key="Browser_Tooltip">
Application du navigateur
</Entry>

View file

@ -27,6 +27,9 @@
<Entry key="Browser_Name">
Browser
</Entry>
<Entry key="Browser_PrintNotAllowed">
La stampa non è consentita in base alla configurazione corrente.
</Entry>
<Entry key="Browser_Tooltip">
Applicazione browser
</Entry>

View file

@ -30,6 +30,9 @@
<Entry key="Browser_Name">
浏览器
</Entry>
<Entry key="Browser_PrintNotAllowed">
根据当前配置不允许打印。
</Entry>
<Entry key="Browser_Tooltip">
浏览器应用程序
</Entry>

View file

@ -56,6 +56,11 @@ namespace SafeExamBrowser.Settings.Browser
/// </summary>
public bool AllowPdfReaderToolbar { get; set; }
/// <summary>
/// Determines whether the user will be allowed to print web content. To control printing in PDF documents, see <see cref="AllowPdfReaderToolbar"/>.
/// </summary>
public bool AllowPrint { get; set; }
/// <summary>
/// Determines whether spell checking is enabled for input fields.
/// </summary>

View file

@ -484,7 +484,7 @@ if (typeof __SEB_focusElement === 'undefined') {
{
if (!result.Success)
{
logger.Error($"Javascript error {result.Message}!");
logger.Error($"Failed to initialize JavaScript: {result.Message}");
}
});
@ -492,7 +492,7 @@ if (typeof __SEB_focusElement === 'undefined') {
{
if (!result.Success)
{
logger.Error($"Javascript error {result.Message}!");
logger.Error($"Failed to execute JavaScript: {result.Message}");
}
});
}

View file

@ -479,7 +479,7 @@ if (typeof __SEB_focusElement === 'undefined') {
{
if (!result.Success)
{
logger.Error($"Javascript error {result.Message}!");
logger.Error($"Failed to initialize JavaScript: {result.Message}!");
}
});
@ -487,7 +487,7 @@ if (typeof __SEB_focusElement === 'undefined') {
{
if (!result.Success)
{
logger.Error($"Javascript error {result.Message}!");
logger.Error($"Failed to execute JavaScript: {result.Message}!");
}
});
}

View file

@ -173,6 +173,7 @@ namespace SebWindowsConfig
public const String KeyBrowserWindowTitleSuffix = "browserWindowTitleSuffix";
public const String KeyAllowPDFReaderToolbar = "allowPDFReaderToolbar";
public const String KeyAllowFind = "allowFind";
public const String KeyAllowPrint = "allowPrint";
// Group "DownUploads"
public const String KeyAllowDownUploads = "allowDownUploads";
@ -448,8 +449,8 @@ namespace SebWindowsConfig
// *********************************
// Some settings are not stored in Plists but in Arrays
public static String [] strArrayDefault = new String [ValNum + 1];
public static String [] strArrayCurrent = new String [ValNum + 1];
public static String[] strArrayDefault = new String[ValNum + 1];
public static String[] strArrayCurrent = new String[ValNum + 1];
public static int[] intArrayDefault = new int[ValNum + 1];
public static int[] intArrayCurrent = new int[ValNum + 1];
@ -591,13 +592,13 @@ namespace SebWindowsConfig
SEBSettings.settingsDefault.Add(SEBSettings.KeyOriginatorVersion, "SEB_Win_2.1.1");
// Default settings for group "General"
SEBSettings.settingsDefault.Add(SEBSettings.KeyStartURL , "https://safeexambrowser.org/start");
SEBSettings.settingsDefault.Add(SEBSettings.KeyStartResource , "");
SEBSettings.settingsDefault.Add(SEBSettings.KeySebServerURL , "");
SEBSettings.settingsDefault.Add(SEBSettings.KeyStartURL, "https://safeexambrowser.org/start");
SEBSettings.settingsDefault.Add(SEBSettings.KeyStartResource, "");
SEBSettings.settingsDefault.Add(SEBSettings.KeySebServerURL, "");
SEBSettings.settingsDefault.Add(SEBSettings.KeyHashedAdminPassword, "");
SEBSettings.settingsDefault.Add(SEBSettings.KeyAllowQuit , true);
SEBSettings.settingsDefault.Add(SEBSettings.KeyIgnoreExitKeys , true);
SEBSettings.settingsDefault.Add(SEBSettings.KeyHashedQuitPassword , "");
SEBSettings.settingsDefault.Add(SEBSettings.KeyAllowQuit, true);
SEBSettings.settingsDefault.Add(SEBSettings.KeyIgnoreExitKeys, true);
SEBSettings.settingsDefault.Add(SEBSettings.KeyHashedQuitPassword, "");
SEBSettings.settingsDefault.Add(SEBSettings.KeyExitKey1, 2);
SEBSettings.settingsDefault.Add(SEBSettings.KeyExitKey2, 10);
SEBSettings.settingsDefault.Add(SEBSettings.KeyExitKey3, 5);
@ -606,8 +607,8 @@ namespace SebWindowsConfig
SEBSettings.settingsDefault.Add(SEBSettings.KeyBrowserMessagingPingTime, 120000);
// Default settings for group "Config File"
SEBSettings.settingsDefault.Add(SEBSettings.KeySebConfigPurpose , 1);
SEBSettings.settingsDefault.Add(SEBSettings.KeyAllowPreferencesWindow , true);
SEBSettings.settingsDefault.Add(SEBSettings.KeySebConfigPurpose, 1);
SEBSettings.settingsDefault.Add(SEBSettings.KeyAllowPreferencesWindow, true);
SEBSettings.settingsDefault.Add(SEBSettings.KeyUseAsymmetricOnlyEncryption, false);
// CryptoIdentity is stored additionally
@ -615,68 +616,68 @@ namespace SebWindowsConfig
SEBSettings.strArrayDefault[SEBSettings.ValCryptoIdentity] = "";
// Default settings for group "User Interface"
SEBSettings.settingsDefault.Add(SEBSettings.KeyBrowserViewMode , 0);
SEBSettings.settingsDefault.Add(SEBSettings.KeyBrowserViewMode, 0);
SEBSettings.settingsDefault.Add(SEBSettings.KeyBrowserWindowAllowAddressBar, false);
SEBSettings.settingsDefault.Add(SEBSettings.KeyNewBrowserWindowAllowAddressBar, false);
SEBSettings.settingsDefault.Add(SEBSettings.KeyMainBrowserWindowWidth , "100%");
SEBSettings.settingsDefault.Add(SEBSettings.KeyMainBrowserWindowHeight , "100%");
SEBSettings.settingsDefault.Add(SEBSettings.KeyMainBrowserWindowWidth, "100%");
SEBSettings.settingsDefault.Add(SEBSettings.KeyMainBrowserWindowHeight, "100%");
SEBSettings.settingsDefault.Add(SEBSettings.KeyMainBrowserWindowPositioning, 1);
SEBSettings.settingsDefault.Add(SEBSettings.KeyEnableBrowserWindowToolbar , false);
SEBSettings.settingsDefault.Add(SEBSettings.KeyHideBrowserWindowToolbar , false);
SEBSettings.settingsDefault.Add(SEBSettings.KeyShowMenuBar , false);
SEBSettings.settingsDefault.Add(SEBSettings.KeyShowTaskBar , true);
SEBSettings.settingsDefault.Add(SEBSettings.KeyEnableBrowserWindowToolbar, false);
SEBSettings.settingsDefault.Add(SEBSettings.KeyHideBrowserWindowToolbar, false);
SEBSettings.settingsDefault.Add(SEBSettings.KeyShowMenuBar, false);
SEBSettings.settingsDefault.Add(SEBSettings.KeyShowTaskBar, true);
SEBSettings.settingsDefault.Add(SEBSettings.KeyShowSideMenu, true);
SEBSettings.settingsDefault.Add(SEBSettings.KeyTaskBarHeight , 40);
SEBSettings.settingsDefault.Add(SEBSettings.KeyTouchOptimized , false);
SEBSettings.settingsDefault.Add(SEBSettings.KeyEnableZoomText , true);
SEBSettings.settingsDefault.Add(SEBSettings.KeyEnableZoomPage , true);
SEBSettings.settingsDefault.Add(SEBSettings.KeyZoomMode , 0);
SEBSettings.settingsDefault.Add(SEBSettings.KeyAllowSpellCheck , false);
SEBSettings.settingsDefault.Add(SEBSettings.KeyAllowDictionaryLookup , false);
SEBSettings.settingsDefault.Add(SEBSettings.KeyAllowSpellCheckDictionary , new ListObj());
SEBSettings.settingsDefault.Add(SEBSettings.KeyAdditionalDictionaries , new ListObj());
SEBSettings.settingsDefault.Add(SEBSettings.KeyTaskBarHeight, 40);
SEBSettings.settingsDefault.Add(SEBSettings.KeyTouchOptimized, false);
SEBSettings.settingsDefault.Add(SEBSettings.KeyEnableZoomText, true);
SEBSettings.settingsDefault.Add(SEBSettings.KeyEnableZoomPage, true);
SEBSettings.settingsDefault.Add(SEBSettings.KeyZoomMode, 0);
SEBSettings.settingsDefault.Add(SEBSettings.KeyAllowSpellCheck, false);
SEBSettings.settingsDefault.Add(SEBSettings.KeyAllowDictionaryLookup, false);
SEBSettings.settingsDefault.Add(SEBSettings.KeyAllowSpellCheckDictionary, new ListObj());
SEBSettings.settingsDefault.Add(SEBSettings.KeyAdditionalDictionaries, new ListObj());
SEBSettings.settingsDefault.Add(SEBSettings.KeyShowReloadButton, true);
SEBSettings.settingsDefault.Add(SEBSettings.KeyShowTime , true);
SEBSettings.settingsDefault.Add(SEBSettings.KeyShowInputLanguage , true);
SEBSettings.settingsDefault.Add(SEBSettings.KeyEnableTouchExit , false);
SEBSettings.settingsDefault.Add(SEBSettings.KeyOskBehavior , 2);
SEBSettings.settingsDefault.Add(SEBSettings.KeyAudioControlEnabled , true);
SEBSettings.settingsDefault.Add(SEBSettings.KeyAudioMute , false);
SEBSettings.settingsDefault.Add(SEBSettings.KeyAudioVolumeLevel , 25);
SEBSettings.settingsDefault.Add(SEBSettings.KeyAudioSetVolumeLevel , false);
SEBSettings.settingsDefault.Add(SEBSettings.KeyShowTime, true);
SEBSettings.settingsDefault.Add(SEBSettings.KeyShowInputLanguage, true);
SEBSettings.settingsDefault.Add(SEBSettings.KeyEnableTouchExit, false);
SEBSettings.settingsDefault.Add(SEBSettings.KeyOskBehavior, 2);
SEBSettings.settingsDefault.Add(SEBSettings.KeyAudioControlEnabled, true);
SEBSettings.settingsDefault.Add(SEBSettings.KeyAudioMute, false);
SEBSettings.settingsDefault.Add(SEBSettings.KeyAudioVolumeLevel, 25);
SEBSettings.settingsDefault.Add(SEBSettings.KeyAudioSetVolumeLevel, false);
SEBSettings.settingsDefault.Add(SEBSettings.KeyAllowDeveloperConsole, false);
//Touch Settings
SEBSettings.settingsDefault.Add(SEBSettings.KeyBrowserScreenKeyboard , false);
SEBSettings.settingsDefault.Add(SEBSettings.KeyBrowserScreenKeyboard, false);
// MainBrowserWindow Width and Height is stored additionally
SEBSettings.intArrayDefault[SEBSettings.ValMainBrowserWindowWidth ] = 2;
SEBSettings.intArrayDefault[SEBSettings.ValMainBrowserWindowWidth] = 2;
SEBSettings.intArrayDefault[SEBSettings.ValMainBrowserWindowHeight] = 2;
SEBSettings.strArrayDefault[SEBSettings.ValMainBrowserWindowWidth ] = "100%";
SEBSettings.strArrayDefault[SEBSettings.ValMainBrowserWindowWidth] = "100%";
SEBSettings.strArrayDefault[SEBSettings.ValMainBrowserWindowHeight] = "100%";
// Default settings for group "Browser"
SEBSettings.settingsDefault.Add(SEBSettings.KeyNewBrowserWindowByLinkPolicy , 2);
SEBSettings.settingsDefault.Add(SEBSettings.KeyNewBrowserWindowByScriptPolicy , 2);
SEBSettings.settingsDefault.Add(SEBSettings.KeyNewBrowserWindowByLinkBlockForeign , false);
SEBSettings.settingsDefault.Add(SEBSettings.KeyNewBrowserWindowByLinkPolicy, 2);
SEBSettings.settingsDefault.Add(SEBSettings.KeyNewBrowserWindowByScriptPolicy, 2);
SEBSettings.settingsDefault.Add(SEBSettings.KeyNewBrowserWindowByLinkBlockForeign, false);
SEBSettings.settingsDefault.Add(SEBSettings.KeyNewBrowserWindowByScriptBlockForeign, false);
SEBSettings.settingsDefault.Add(SEBSettings.KeyNewBrowserWindowByLinkWidth , "1000");
SEBSettings.settingsDefault.Add(SEBSettings.KeyNewBrowserWindowByLinkHeight , "100%");
SEBSettings.settingsDefault.Add(SEBSettings.KeyNewBrowserWindowByLinkPositioning , 2);
SEBSettings.settingsDefault.Add(SEBSettings.KeyNewBrowserWindowUrlPolicy , 0);
SEBSettings.settingsDefault.Add(SEBSettings.KeyNewBrowserWindowByLinkWidth, "1000");
SEBSettings.settingsDefault.Add(SEBSettings.KeyNewBrowserWindowByLinkHeight, "100%");
SEBSettings.settingsDefault.Add(SEBSettings.KeyNewBrowserWindowByLinkPositioning, 2);
SEBSettings.settingsDefault.Add(SEBSettings.KeyNewBrowserWindowUrlPolicy, 0);
SEBSettings.settingsDefault.Add(SEBSettings.KeyMainBrowserWindowUrlPolicy, 0);
SEBSettings.settingsDefault.Add(SEBSettings.KeyEnablePlugIns , true);
SEBSettings.settingsDefault.Add(SEBSettings.KeyEnableJava , false);
SEBSettings.settingsDefault.Add(SEBSettings.KeyEnableJavaScript , true);
SEBSettings.settingsDefault.Add(SEBSettings.KeyBlockPopUpWindows , false);
SEBSettings.settingsDefault.Add(SEBSettings.KeyEnablePlugIns, true);
SEBSettings.settingsDefault.Add(SEBSettings.KeyEnableJava, false);
SEBSettings.settingsDefault.Add(SEBSettings.KeyEnableJavaScript, true);
SEBSettings.settingsDefault.Add(SEBSettings.KeyBlockPopUpWindows, false);
SEBSettings.settingsDefault.Add(SEBSettings.KeyAllowVideoCapture, false);
SEBSettings.settingsDefault.Add(SEBSettings.KeyAllowAudioCapture, false);
SEBSettings.settingsDefault.Add(SEBSettings.KeyAllowBrowsingBackForward, false);
SEBSettings.settingsDefault.Add(SEBSettings.KeyNewBrowserWindowNavigation, true);
SEBSettings.settingsDefault.Add(SEBSettings.KeyRemoveBrowserProfile, true);
SEBSettings.settingsDefault.Add(SEBSettings.KeyDisableLocalStorage , false);
SEBSettings.settingsDefault.Add(SEBSettings.KeyEnableSebBrowser , true);
SEBSettings.settingsDefault.Add(SEBSettings.KeyDisableLocalStorage, false);
SEBSettings.settingsDefault.Add(SEBSettings.KeyEnableSebBrowser, true);
SEBSettings.settingsDefault.Add(SEBSettings.KeyBrowserWindowAllowReload, true);
SEBSettings.settingsDefault.Add(SEBSettings.KeyNewBrowserWindowAllowReload, true);
SEBSettings.settingsDefault.Add(SEBSettings.KeyShowReloadWarning, true);
@ -692,33 +693,34 @@ namespace SebWindowsConfig
SEBSettings.settingsDefault.Add(SEBSettings.KeyBrowserWindowTitleSuffix, "");
SEBSettings.settingsDefault.Add(SEBSettings.KeyAllowPDFReaderToolbar, false);
SEBSettings.settingsDefault.Add(SEBSettings.KeyAllowFind, true);
SEBSettings.settingsDefault.Add(SEBSettings.KeyAllowPrint, false);
// NewBrowserWindow Width and Height is stored additionally
SEBSettings.intArrayDefault[SEBSettings.ValNewBrowserWindowByLinkWidth ] = 4;
SEBSettings.intArrayDefault[SEBSettings.ValNewBrowserWindowByLinkWidth] = 4;
SEBSettings.intArrayDefault[SEBSettings.ValNewBrowserWindowByLinkHeight] = 2;
SEBSettings.strArrayDefault[SEBSettings.ValNewBrowserWindowByLinkWidth ] = "1000";
SEBSettings.strArrayDefault[SEBSettings.ValNewBrowserWindowByLinkWidth] = "1000";
SEBSettings.strArrayDefault[SEBSettings.ValNewBrowserWindowByLinkHeight] = "100%";
// Default settings for group "DownUploads"
SEBSettings.settingsDefault.Add(SEBSettings.KeyAllowDownUploads , true);
SEBSettings.settingsDefault.Add(SEBSettings.KeyAllowDownUploads, true);
SEBSettings.settingsDefault.Add(SEBSettings.KeyAllowCustomDownUploadLocation, false);
SEBSettings.settingsDefault.Add(SEBSettings.KeyDownloadDirectoryOSX , "~/Downloads");
SEBSettings.settingsDefault.Add(SEBSettings.KeyDownloadDirectoryWin , "");
SEBSettings.settingsDefault.Add(SEBSettings.KeyOpenDownloads , false);
SEBSettings.settingsDefault.Add(SEBSettings.KeyDownloadDirectoryOSX, "~/Downloads");
SEBSettings.settingsDefault.Add(SEBSettings.KeyDownloadDirectoryWin, "");
SEBSettings.settingsDefault.Add(SEBSettings.KeyOpenDownloads, false);
SEBSettings.settingsDefault.Add(SEBSettings.KeyChooseFileToUploadPolicy, 0);
SEBSettings.settingsDefault.Add(SEBSettings.KeyDownloadPDFFiles , false);
SEBSettings.settingsDefault.Add(SEBSettings.KeyAllowPDFPlugIn , false);
SEBSettings.settingsDefault.Add(SEBSettings.KeyDownloadPDFFiles, false);
SEBSettings.settingsDefault.Add(SEBSettings.KeyAllowPDFPlugIn, false);
SEBSettings.settingsDefault.Add(SEBSettings.KeyDownloadAndOpenSebConfig, true);
SEBSettings.settingsDefault.Add(SEBSettings.KeyBackgroundOpenSEBConfig , false);
SEBSettings.settingsDefault.Add(SEBSettings.KeyBackgroundOpenSEBConfig, false);
SEBSettings.settingsDefault.Add(SEBSettings.KeyUseTemporaryDownUploadDirectory, false);
// Default settings for group "Exam"
SEBSettings.settingsDefault.Add(SEBSettings.KeyExamKeySalt , new Byte[] {});
SEBSettings.settingsDefault.Add(SEBSettings.KeyExamKeySalt, new Byte[] { });
SEBSettings.settingsDefault.Add(SEBSettings.KeyExamSessionClearCookiesOnEnd, true);
SEBSettings.settingsDefault.Add(SEBSettings.KeyExamSessionClearCookiesOnStart, true);
SEBSettings.settingsDefault.Add(SEBSettings.KeyBrowserExamKey , "");
SEBSettings.settingsDefault.Add(SEBSettings.KeyBrowserURLSalt , true);
SEBSettings.settingsDefault.Add(SEBSettings.KeyBrowserExamKey, "");
SEBSettings.settingsDefault.Add(SEBSettings.KeyBrowserURLSalt, true);
SEBSettings.settingsDefault.Add(SEBSettings.KeySendBrowserExamKey, false);
SEBSettings.settingsDefault.Add(SEBSettings.KeyQuitURL , "");
SEBSettings.settingsDefault.Add(SEBSettings.KeyQuitURL, "");
SEBSettings.settingsDefault.Add(SEBSettings.KeyQuitURLConfirm, true);
SEBSettings.settingsDefault.Add(SEBSettings.KeyRestartExamURL, "");
SEBSettings.settingsDefault.Add(SEBSettings.KeyRestartExamUseStartURL, false);
@ -733,11 +735,11 @@ namespace SebWindowsConfig
SEBSettings.settingsDefault.Add(SEBSettings.KeyAdditionalResources, new ListObj());
// Default settings for group "Applications"
SEBSettings.settingsDefault.Add(SEBSettings.KeyMonitorProcesses , true);
SEBSettings.settingsDefault.Add(SEBSettings.KeyMonitorProcesses, true);
SEBSettings.settingsDefault.Add(SEBSettings.KeyAllowSwitchToApplications, false);
SEBSettings.settingsDefault.Add(SEBSettings.KeyAllowFlashFullscreen , false);
SEBSettings.settingsDefault.Add(SEBSettings.KeyPermittedProcesses , new ListObj());
SEBSettings.settingsDefault.Add(SEBSettings.KeyProhibitedProcesses , new ListObj());
SEBSettings.settingsDefault.Add(SEBSettings.KeyAllowFlashFullscreen, false);
SEBSettings.settingsDefault.Add(SEBSettings.KeyPermittedProcesses, new ListObj());
SEBSettings.settingsDefault.Add(SEBSettings.KeyProhibitedProcesses, new ListObj());
// Default settings for permitted argument data
SEBSettings.permittedArgumentDataDefault.Clear();
@ -761,34 +763,34 @@ namespace SebWindowsConfig
// Default settings for permitted process data
SEBSettings.permittedProcessDataDefault.Clear();
SEBSettings.permittedProcessDataDefault.Add(SEBSettings.KeyActive , true);
SEBSettings.permittedProcessDataDefault.Add(SEBSettings.KeyAutostart , true);
SEBSettings.permittedProcessDataDefault.Add(SEBSettings.KeyIconInTaskbar , true);
SEBSettings.permittedProcessDataDefault.Add(SEBSettings.KeyRunInBackground , false);
SEBSettings.permittedProcessDataDefault.Add(SEBSettings.KeyAllowUser , false);
SEBSettings.permittedProcessDataDefault.Add(SEBSettings.KeyStrongKill , false);
SEBSettings.permittedProcessDataDefault.Add(SEBSettings.KeyActive, true);
SEBSettings.permittedProcessDataDefault.Add(SEBSettings.KeyAutostart, true);
SEBSettings.permittedProcessDataDefault.Add(SEBSettings.KeyIconInTaskbar, true);
SEBSettings.permittedProcessDataDefault.Add(SEBSettings.KeyRunInBackground, false);
SEBSettings.permittedProcessDataDefault.Add(SEBSettings.KeyAllowUser, false);
SEBSettings.permittedProcessDataDefault.Add(SEBSettings.KeyStrongKill, false);
SEBSettings.permittedProcessDataDefault.Add(SEBSettings.KeyOS, IntWin);
SEBSettings.permittedProcessDataDefault.Add(SEBSettings.KeyTitle , "");
SEBSettings.permittedProcessDataDefault.Add(SEBSettings.KeyTitle, "");
SEBSettings.permittedProcessDataDefault.Add(SEBSettings.KeyDescription, "");
SEBSettings.permittedProcessDataDefault.Add(SEBSettings.KeyExecutable , "");
SEBSettings.permittedProcessDataDefault.Add(SEBSettings.KeyExecutable, "");
SEBSettings.permittedProcessDataDefault.Add(SEBSettings.KeyOriginalName, "");
SEBSettings.permittedProcessDataDefault.Add(SEBSettings.KeyPath , "");
SEBSettings.permittedProcessDataDefault.Add(SEBSettings.KeyIdentifier , "");
SEBSettings.permittedProcessDataDefault.Add(SEBSettings.KeyWindowHandlingProcess , "");
SEBSettings.permittedProcessDataDefault.Add(SEBSettings.KeyArguments , new ListObj());
SEBSettings.permittedProcessDataDefault.Add(SEBSettings.KeyPath, "");
SEBSettings.permittedProcessDataDefault.Add(SEBSettings.KeyIdentifier, "");
SEBSettings.permittedProcessDataDefault.Add(SEBSettings.KeyWindowHandlingProcess, "");
SEBSettings.permittedProcessDataDefault.Add(SEBSettings.KeyArguments, new ListObj());
// Default settings for prohibited process data
SEBSettings.prohibitedProcessDataDefault.Clear();
SEBSettings.prohibitedProcessDataDefault.Add(SEBSettings.KeyActive , true);
SEBSettings.prohibitedProcessDataDefault.Add(SEBSettings.KeyActive, true);
SEBSettings.prohibitedProcessDataDefault.Add(SEBSettings.KeyCurrentUser, true);
SEBSettings.prohibitedProcessDataDefault.Add(SEBSettings.KeyStrongKill , false);
SEBSettings.prohibitedProcessDataDefault.Add(SEBSettings.KeyOS , IntWin);
SEBSettings.prohibitedProcessDataDefault.Add(SEBSettings.KeyExecutable , "");
SEBSettings.prohibitedProcessDataDefault.Add(SEBSettings.KeyStrongKill, false);
SEBSettings.prohibitedProcessDataDefault.Add(SEBSettings.KeyOS, IntWin);
SEBSettings.prohibitedProcessDataDefault.Add(SEBSettings.KeyExecutable, "");
SEBSettings.prohibitedProcessDataDefault.Add(SEBSettings.KeyOriginalName, "");
SEBSettings.prohibitedProcessDataDefault.Add(SEBSettings.KeyDescription, "");
SEBSettings.prohibitedProcessDataDefault.Add(SEBSettings.KeyIdentifier , "");
SEBSettings.prohibitedProcessDataDefault.Add(SEBSettings.KeyWindowHandlingProcess , "");
SEBSettings.prohibitedProcessDataDefault.Add(SEBSettings.KeyUser , "");
SEBSettings.prohibitedProcessDataDefault.Add(SEBSettings.KeyIdentifier, "");
SEBSettings.prohibitedProcessDataDefault.Add(SEBSettings.KeyWindowHandlingProcess, "");
SEBSettings.prohibitedProcessDataDefault.Add(SEBSettings.KeyUser, "");
SEBSettings.prohibitedProcessesDefault = new List<string>
{
@ -845,9 +847,9 @@ namespace SebWindowsConfig
};
// Default settings for group "Network - Filter"
SEBSettings.settingsDefault.Add(SEBSettings.KeyEnableURLFilter , false);
SEBSettings.settingsDefault.Add(SEBSettings.KeyEnableURLFilter, false);
SEBSettings.settingsDefault.Add(SEBSettings.KeyEnableURLContentFilter, false);
SEBSettings.settingsDefault.Add(SEBSettings.KeyURLFilterRules , new ListObj());
SEBSettings.settingsDefault.Add(SEBSettings.KeyURLFilterRules, new ListObj());
//// Create a default action
//SEBSettings.urlFilterActionDataDefault.Clear();
@ -909,45 +911,45 @@ namespace SebWindowsConfig
// Default settings for group "Network - Proxies"
SEBSettings.proxiesDataDefault.Clear();
SEBSettings.proxiesDataDefault.Add(SEBSettings.KeyExceptionsList , new ListObj());
SEBSettings.proxiesDataDefault.Add(SEBSettings.KeyExcludeSimpleHostnames , false);
SEBSettings.proxiesDataDefault.Add(SEBSettings.KeyAutoDiscoveryEnabled , false);
SEBSettings.proxiesDataDefault.Add(SEBSettings.KeyAutoConfigurationEnabled , false);
SEBSettings.proxiesDataDefault.Add(SEBSettings.KeyExceptionsList, new ListObj());
SEBSettings.proxiesDataDefault.Add(SEBSettings.KeyExcludeSimpleHostnames, false);
SEBSettings.proxiesDataDefault.Add(SEBSettings.KeyAutoDiscoveryEnabled, false);
SEBSettings.proxiesDataDefault.Add(SEBSettings.KeyAutoConfigurationEnabled, false);
SEBSettings.proxiesDataDefault.Add(SEBSettings.KeyAutoConfigurationJavaScript, "");
SEBSettings.proxiesDataDefault.Add(SEBSettings.KeyAutoConfigurationURL , "");
SEBSettings.proxiesDataDefault.Add(SEBSettings.KeyFTPPassive , true);
SEBSettings.proxiesDataDefault.Add(SEBSettings.KeyAutoConfigurationURL, "");
SEBSettings.proxiesDataDefault.Add(SEBSettings.KeyFTPPassive, true);
SEBSettings.proxiesDataDefault.Add(SEBSettings.KeyHTTPEnable , false);
SEBSettings.proxiesDataDefault.Add(SEBSettings.KeyHTTPPort , 80);
SEBSettings.proxiesDataDefault.Add(SEBSettings.KeyHTTPHost , "");
SEBSettings.proxiesDataDefault.Add(SEBSettings.KeyHTTPEnable, false);
SEBSettings.proxiesDataDefault.Add(SEBSettings.KeyHTTPPort, 80);
SEBSettings.proxiesDataDefault.Add(SEBSettings.KeyHTTPHost, "");
SEBSettings.proxiesDataDefault.Add(SEBSettings.KeyHTTPRequires, false);
SEBSettings.proxiesDataDefault.Add(SEBSettings.KeyHTTPUsername, "");
SEBSettings.proxiesDataDefault.Add(SEBSettings.KeyHTTPPassword, "");
SEBSettings.proxiesDataDefault.Add(SEBSettings.KeyHTTPSEnable , false);
SEBSettings.proxiesDataDefault.Add(SEBSettings.KeyHTTPSPort , 443);
SEBSettings.proxiesDataDefault.Add(SEBSettings.KeyHTTPSHost , "");
SEBSettings.proxiesDataDefault.Add(SEBSettings.KeyHTTPSEnable, false);
SEBSettings.proxiesDataDefault.Add(SEBSettings.KeyHTTPSPort, 443);
SEBSettings.proxiesDataDefault.Add(SEBSettings.KeyHTTPSHost, "");
SEBSettings.proxiesDataDefault.Add(SEBSettings.KeyHTTPSRequires, false);
SEBSettings.proxiesDataDefault.Add(SEBSettings.KeyHTTPSUsername, "");
SEBSettings.proxiesDataDefault.Add(SEBSettings.KeyHTTPSPassword, "");
SEBSettings.proxiesDataDefault.Add(SEBSettings.KeyFTPEnable , false);
SEBSettings.proxiesDataDefault.Add(SEBSettings.KeyFTPPort , 21);
SEBSettings.proxiesDataDefault.Add(SEBSettings.KeyFTPHost , "");
SEBSettings.proxiesDataDefault.Add(SEBSettings.KeyFTPEnable, false);
SEBSettings.proxiesDataDefault.Add(SEBSettings.KeyFTPPort, 21);
SEBSettings.proxiesDataDefault.Add(SEBSettings.KeyFTPHost, "");
SEBSettings.proxiesDataDefault.Add(SEBSettings.KeyFTPRequires, false);
SEBSettings.proxiesDataDefault.Add(SEBSettings.KeyFTPUsername, "");
SEBSettings.proxiesDataDefault.Add(SEBSettings.KeyFTPPassword, "");
SEBSettings.proxiesDataDefault.Add(SEBSettings.KeySOCKSEnable , false);
SEBSettings.proxiesDataDefault.Add(SEBSettings.KeySOCKSPort , 1080);
SEBSettings.proxiesDataDefault.Add(SEBSettings.KeySOCKSHost , "");
SEBSettings.proxiesDataDefault.Add(SEBSettings.KeySOCKSEnable, false);
SEBSettings.proxiesDataDefault.Add(SEBSettings.KeySOCKSPort, 1080);
SEBSettings.proxiesDataDefault.Add(SEBSettings.KeySOCKSHost, "");
SEBSettings.proxiesDataDefault.Add(SEBSettings.KeySOCKSRequires, false);
SEBSettings.proxiesDataDefault.Add(SEBSettings.KeySOCKSUsername, "");
SEBSettings.proxiesDataDefault.Add(SEBSettings.KeySOCKSPassword, "");
SEBSettings.proxiesDataDefault.Add(SEBSettings.KeyRTSPEnable , false);
SEBSettings.proxiesDataDefault.Add(SEBSettings.KeyRTSPPort , 554);
SEBSettings.proxiesDataDefault.Add(SEBSettings.KeyRTSPHost , "");
SEBSettings.proxiesDataDefault.Add(SEBSettings.KeyRTSPEnable, false);
SEBSettings.proxiesDataDefault.Add(SEBSettings.KeyRTSPPort, 554);
SEBSettings.proxiesDataDefault.Add(SEBSettings.KeyRTSPHost, "");
SEBSettings.proxiesDataDefault.Add(SEBSettings.KeyRTSPRequires, false);
SEBSettings.proxiesDataDefault.Add(SEBSettings.KeyRTSPUsername, "");
SEBSettings.proxiesDataDefault.Add(SEBSettings.KeyRTSPPassword, "");
@ -955,21 +957,21 @@ namespace SebWindowsConfig
SEBSettings.bypassedProxyDataDefault = "";
SEBSettings.settingsDefault.Add(SEBSettings.KeyProxySettingsPolicy, 0);
SEBSettings.settingsDefault.Add(SEBSettings.KeyProxies , SEBSettings.proxiesDataDefault);
SEBSettings.settingsDefault.Add(SEBSettings.KeyProxies, SEBSettings.proxiesDataDefault);
// Default settings for group "Security"
SEBSettings.settingsDefault.Add(SEBSettings.KeySebServicePolicy , 1);
SEBSettings.settingsDefault.Add(SEBSettings.KeySebServicePolicy, 1);
SEBSettings.settingsDefault.Add(SEBSettings.KeySebServiceIgnore, true);
SEBSettings.settingsDefault.Add(SEBSettings.KeyAllowVirtualMachine, false);
SEBSettings.settingsDefault.Add(SEBSettings.KeyAllowScreenSharing, false);
SEBSettings.settingsDefault.Add(SEBSettings.KeyEnablePrivateClipboard, true);
SEBSettings.settingsDefault.Add(SEBSettings.KeyCreateNewDesktop , true);
SEBSettings.settingsDefault.Add(SEBSettings.KeyKillExplorerShell , false);
SEBSettings.settingsDefault.Add(SEBSettings.KeyCreateNewDesktop, true);
SEBSettings.settingsDefault.Add(SEBSettings.KeyKillExplorerShell, false);
SEBSettings.settingsDefault.Add(SEBSettings.KeyEnableLogging, true);
SEBSettings.settingsDefault.Add(SEBSettings.KeyAllowApplicationLog, false);
SEBSettings.settingsDefault.Add(SEBSettings.KeyShowApplicationLogButton, false);
SEBSettings.settingsDefault.Add(SEBSettings.KeyLogDirectoryOSX , "~/Documents");
SEBSettings.settingsDefault.Add(SEBSettings.KeyLogDirectoryWin , "");
SEBSettings.settingsDefault.Add(SEBSettings.KeyLogDirectoryOSX, "~/Documents");
SEBSettings.settingsDefault.Add(SEBSettings.KeyLogDirectoryWin, "");
SEBSettings.settingsDefault.Add(SEBSettings.KeyAllowWLAN, false);
SEBSettings.settingsDefault.Add(SEBSettings.KeyLockOnMessageSocketClose, true);
SEBSettings.settingsDefault.Add(SEBSettings.KeyMinMacOSVersion, 4);
@ -996,13 +998,13 @@ namespace SebWindowsConfig
SEBSettings.strArrayDefault[SEBSettings.ValAllowedDisplaysMaxNumber] = "1";
// Default settings for group "Inside SEB"
SEBSettings.settingsDefault.Add(SEBSettings.KeyInsideSebEnableSwitchUser , false);
SEBSettings.settingsDefault.Add(SEBSettings.KeyInsideSebEnableLockThisComputer , false);
SEBSettings.settingsDefault.Add(SEBSettings.KeyInsideSebEnableChangeAPassword , false);
SEBSettings.settingsDefault.Add(SEBSettings.KeyInsideSebEnableStartTaskManager , false);
SEBSettings.settingsDefault.Add(SEBSettings.KeyInsideSebEnableLogOff , false);
SEBSettings.settingsDefault.Add(SEBSettings.KeyInsideSebEnableShutDown , false);
SEBSettings.settingsDefault.Add(SEBSettings.KeyInsideSebEnableEaseOfAccess , false);
SEBSettings.settingsDefault.Add(SEBSettings.KeyInsideSebEnableSwitchUser, false);
SEBSettings.settingsDefault.Add(SEBSettings.KeyInsideSebEnableLockThisComputer, false);
SEBSettings.settingsDefault.Add(SEBSettings.KeyInsideSebEnableChangeAPassword, false);
SEBSettings.settingsDefault.Add(SEBSettings.KeyInsideSebEnableStartTaskManager, false);
SEBSettings.settingsDefault.Add(SEBSettings.KeyInsideSebEnableLogOff, false);
SEBSettings.settingsDefault.Add(SEBSettings.KeyInsideSebEnableShutDown, false);
SEBSettings.settingsDefault.Add(SEBSettings.KeyInsideSebEnableEaseOfAccess, false);
SEBSettings.settingsDefault.Add(SEBSettings.KeyInsideSebEnableVmWareClientShade, false);
SEBSettings.settingsDefault.Add(SEBSettings.KeyInsideSebEnableNetworkConnectionSelector, false);
SEBSettings.settingsDefault.Add(SEBSettings.KeySetVmwareConfiguration, false);
@ -1011,27 +1013,27 @@ namespace SebWindowsConfig
SEBSettings.settingsDefault.Add(SEBSettings.KeyHookKeys, true);
// Default settings for group "Special Keys"
SEBSettings.settingsDefault.Add(SEBSettings.KeyEnableEsc , true);
SEBSettings.settingsDefault.Add(SEBSettings.KeyEnableCtrlEsc , false);
SEBSettings.settingsDefault.Add(SEBSettings.KeyEnableAltEsc , false);
SEBSettings.settingsDefault.Add(SEBSettings.KeyEnableAltTab , true);
SEBSettings.settingsDefault.Add(SEBSettings.KeyEnableAltF4 , false);
SEBSettings.settingsDefault.Add(SEBSettings.KeyEnableStartMenu , false);
SEBSettings.settingsDefault.Add(SEBSettings.KeyEnableEsc, true);
SEBSettings.settingsDefault.Add(SEBSettings.KeyEnableCtrlEsc, false);
SEBSettings.settingsDefault.Add(SEBSettings.KeyEnableAltEsc, false);
SEBSettings.settingsDefault.Add(SEBSettings.KeyEnableAltTab, true);
SEBSettings.settingsDefault.Add(SEBSettings.KeyEnableAltF4, false);
SEBSettings.settingsDefault.Add(SEBSettings.KeyEnableStartMenu, false);
SEBSettings.settingsDefault.Add(SEBSettings.KeyEnableMiddleMouse, false);
SEBSettings.settingsDefault.Add(SEBSettings.KeyEnableRightMouse , true);
SEBSettings.settingsDefault.Add(SEBSettings.KeyEnableRightMouse, true);
SEBSettings.settingsDefault.Add(SEBSettings.KeyEnablePrintScreen, false);
SEBSettings.settingsDefault.Add(SEBSettings.KeyEnableAltMouseWheel, false);
// Default settings for group "Function Keys"
SEBSettings.settingsDefault.Add(SEBSettings.KeyEnableF1 , true);
SEBSettings.settingsDefault.Add(SEBSettings.KeyEnableF2 , true);
SEBSettings.settingsDefault.Add(SEBSettings.KeyEnableF3 , true);
SEBSettings.settingsDefault.Add(SEBSettings.KeyEnableF4 , true);
SEBSettings.settingsDefault.Add(SEBSettings.KeyEnableF5 , true);
SEBSettings.settingsDefault.Add(SEBSettings.KeyEnableF6 , true);
SEBSettings.settingsDefault.Add(SEBSettings.KeyEnableF7 , true);
SEBSettings.settingsDefault.Add(SEBSettings.KeyEnableF8 , true);
SEBSettings.settingsDefault.Add(SEBSettings.KeyEnableF9 , true);
SEBSettings.settingsDefault.Add(SEBSettings.KeyEnableF1, true);
SEBSettings.settingsDefault.Add(SEBSettings.KeyEnableF2, true);
SEBSettings.settingsDefault.Add(SEBSettings.KeyEnableF3, true);
SEBSettings.settingsDefault.Add(SEBSettings.KeyEnableF4, true);
SEBSettings.settingsDefault.Add(SEBSettings.KeyEnableF5, true);
SEBSettings.settingsDefault.Add(SEBSettings.KeyEnableF6, true);
SEBSettings.settingsDefault.Add(SEBSettings.KeyEnableF7, true);
SEBSettings.settingsDefault.Add(SEBSettings.KeyEnableF8, true);
SEBSettings.settingsDefault.Add(SEBSettings.KeyEnableF9, true);
SEBSettings.settingsDefault.Add(SEBSettings.KeyEnableF10, true);
SEBSettings.settingsDefault.Add(SEBSettings.KeyEnableF11, true);
SEBSettings.settingsDefault.Add(SEBSettings.KeyEnableF12, true);
@ -1117,7 +1119,7 @@ namespace SebWindowsConfig
// ************************
// Copy settings dictionary
// ************************
/*
/*
public static void CopySettingsDictionary(ref DictObj sebSettingsSource,
ref DictObj sebSettingsTarget)
{
@ -1136,13 +1138,13 @@ namespace SebWindowsConfig
return;
}
*/
*/
// **************
// Merge settings
// **************
/*
/*
public static void MergeSettings(ref object objectSource, ref object objectTarget)
{
// Determine the type of the input objects
@ -1208,7 +1210,7 @@ namespace SebWindowsConfig
return;
}
*/
*/
// ************************
@ -1237,32 +1239,32 @@ namespace SebWindowsConfig
}
// Get the Permitted Process List
SEBSettings.permittedProcessList = (ListObj)SEBSettings.settingsCurrent[SEBSettings.KeyPermittedProcesses];
SEBSettings.permittedProcessList = (ListObj) SEBSettings.settingsCurrent[SEBSettings.KeyPermittedProcesses];
// Traverse Permitted Processes of currently opened file
for (int listIndex = 0; listIndex < SEBSettings.permittedProcessList.Count; listIndex++)
{
// Get the Permitted Process Data
SEBSettings.permittedProcessData = (DictObj)SEBSettings.permittedProcessList[listIndex];
SEBSettings.permittedProcessData = (DictObj) SEBSettings.permittedProcessList[listIndex];
// Add potentially missing keys to current Process Dictionary
foreach (KeyValue p in SEBSettings.permittedProcessDataDefault)
if (SEBSettings.permittedProcessData.ContainsKey(p.Key) == false)
SEBSettings.permittedProcessData.Add (p.Key, p.Value);
SEBSettings.permittedProcessData.Add(p.Key, p.Value);
// Get the Permitted Argument List
SEBSettings.permittedArgumentList = (ListObj)SEBSettings.permittedProcessData[SEBSettings.KeyArguments];
SEBSettings.permittedArgumentList = (ListObj) SEBSettings.permittedProcessData[SEBSettings.KeyArguments];
// Traverse Arguments of current Process
for (int sublistIndex = 0; sublistIndex < SEBSettings.permittedArgumentList.Count; sublistIndex++)
{
// Get the Permitted Argument Data
SEBSettings.permittedArgumentData = (DictObj)SEBSettings.permittedArgumentList[sublistIndex];
SEBSettings.permittedArgumentData = (DictObj) SEBSettings.permittedArgumentList[sublistIndex];
// Add potentially missing keys to current Argument Dictionary
foreach (KeyValue p in SEBSettings.permittedArgumentDataDefault)
if (SEBSettings.permittedArgumentData.ContainsKey(p.Key) == false && p.Value as string != "")
SEBSettings.permittedArgumentData.Add (p.Key, p.Value);
SEBSettings.permittedArgumentData.Add(p.Key, p.Value);
} // next sublistIndex
} // next listIndex
@ -1270,36 +1272,36 @@ namespace SebWindowsConfig
// Get the Prohibited Process List
SEBSettings.prohibitedProcessList = (ListObj)SEBSettings.settingsCurrent[SEBSettings.KeyProhibitedProcesses];
SEBSettings.prohibitedProcessList = (ListObj) SEBSettings.settingsCurrent[SEBSettings.KeyProhibitedProcesses];
// Traverse Prohibited Processes of currently opened file
for (int listIndex = 0; listIndex < SEBSettings.prohibitedProcessList.Count; listIndex++)
{
// Get the Prohibited Process Data
SEBSettings.prohibitedProcessData = (DictObj)SEBSettings.prohibitedProcessList[listIndex];
SEBSettings.prohibitedProcessData = (DictObj) SEBSettings.prohibitedProcessList[listIndex];
// Add potentially missing keys to current Process Dictionary
foreach (KeyValue p in SEBSettings.prohibitedProcessDataDefault)
if (SEBSettings.prohibitedProcessData.ContainsKey(p.Key) == false)
SEBSettings.prohibitedProcessData.Add (p.Key, p.Value);
SEBSettings.prohibitedProcessData.Add(p.Key, p.Value);
} // next listIndex
// Get the Embedded Certificate List
SEBSettings.embeddedCertificateList = (ListObj)SEBSettings.settingsCurrent[SEBSettings.KeyEmbeddedCertificates];
SEBSettings.embeddedCertificateList = (ListObj) SEBSettings.settingsCurrent[SEBSettings.KeyEmbeddedCertificates];
// Traverse Embedded Certificates of currently opened file
for (int listIndex = 0; listIndex < SEBSettings.embeddedCertificateList.Count; listIndex++)
{
// Get the Embedded Certificate Data
SEBSettings.embeddedCertificateData = (DictObj)SEBSettings.embeddedCertificateList[listIndex];
SEBSettings.embeddedCertificateData = (DictObj) SEBSettings.embeddedCertificateList[listIndex];
// Add potentially missing keys to current Certificate Dictionary
foreach (KeyValue p in SEBSettings.embeddedCertificateDataDefault)
if (SEBSettings.embeddedCertificateData.ContainsKey(p.Key) == false)
SEBSettings.embeddedCertificateData.Add (p.Key, p.Value);
SEBSettings.embeddedCertificateData.Add(p.Key, p.Value);
} // next listIndex
@ -1339,20 +1341,20 @@ namespace SebWindowsConfig
// Get the Proxies Dictionary
SEBSettings.proxiesData = (DictObj)SEBSettings.settingsCurrent[SEBSettings.KeyProxies];
SEBSettings.proxiesData = (DictObj) SEBSettings.settingsCurrent[SEBSettings.KeyProxies];
// Add potentially missing keys to current Proxies Dictionary
foreach (KeyValue p in SEBSettings.proxiesDataDefault)
if (SEBSettings.proxiesData.ContainsKey(p.Key) == false)
SEBSettings.proxiesData.Add (p.Key, p.Value);
SEBSettings.proxiesData.Add(p.Key, p.Value);
// Get the Bypassed Proxy List
SEBSettings.bypassedProxyList = (ListObj)proxiesData[SEBSettings.KeyExceptionsList];
SEBSettings.bypassedProxyList = (ListObj) proxiesData[SEBSettings.KeyExceptionsList];
// Traverse Bypassed Proxies of currently opened file
for (int listIndex = 0; listIndex < SEBSettings.bypassedProxyList.Count; listIndex++)
{
if ((String)SEBSettings.bypassedProxyList[listIndex] == "")
if ((String) SEBSettings.bypassedProxyList[listIndex] == "")
SEBSettings.bypassedProxyList[listIndex] = bypassedProxyDataDefault;
} // next listIndex
@ -1372,40 +1374,40 @@ namespace SebWindowsConfig
// Add key/values to the clear dictionary if they're not an empty array (ListObj) or empty dictionary (DictObj)
foreach (KeyValue p in SEBSettings.settingsDefault)
if (!(p.Value is ListObj && ((ListObj)p.Value).Count == 0) && !(p.Value is DictObj && ((DictObj)p.Value).Count == 0))
if (!(p.Value is ListObj && ((ListObj) p.Value).Count == 0) && !(p.Value is DictObj && ((DictObj) p.Value).Count == 0))
cleanSettings.Add(p.Key, p.Value);
// Get the Permitted Process List
ListObj permittedProcessList = (ListObj)valueForDictionaryKey(cleanSettings, SEBSettings.KeyPermittedProcesses);
ListObj permittedProcessList = (ListObj) valueForDictionaryKey(cleanSettings, SEBSettings.KeyPermittedProcesses);
if (permittedProcessList != null)
{
// Traverse Permitted Processes of currently opened file
for (int listIndex = 0; listIndex < permittedProcessList.Count; listIndex++)
{
// Get the Permitted Process Data
DictObj permittedProcessData = (DictObj)permittedProcessList[listIndex];
DictObj permittedProcessData = (DictObj) permittedProcessList[listIndex];
if (permittedProcessData != null)
{
// Add potentially missing keys to current Process Dictionary
foreach (KeyValue p in permittedProcessDataDefault)
if (permittedProcessData.ContainsKey(p.Key) == false && !(p.Value is ListObj && ((ListObj)p.Value).Count == 0) && !(p.Value is DictObj && ((DictObj)p.Value).Count == 0))
if (permittedProcessData.ContainsKey(p.Key) == false && !(p.Value is ListObj && ((ListObj) p.Value).Count == 0) && !(p.Value is DictObj && ((DictObj) p.Value).Count == 0))
permittedProcessData.Add(p.Key, p.Value);
// Get the Permitted Argument List
ListObj permittedArgumentList = (ListObj)valueForDictionaryKey(permittedProcessData, SEBSettings.KeyArguments);
ListObj permittedArgumentList = (ListObj) valueForDictionaryKey(permittedProcessData, SEBSettings.KeyArguments);
if (permittedArgumentList != null)
{
// Traverse Arguments of current Process
for (int sublistIndex = 0; sublistIndex < permittedArgumentList.Count; sublistIndex++)
{
// Get the Permitted Argument Data
DictObj permittedArgumentData = (DictObj)permittedArgumentList[sublistIndex];
DictObj permittedArgumentData = (DictObj) permittedArgumentList[sublistIndex];
// Add potentially missing keys to current Argument Dictionary
foreach (KeyValue p in permittedArgumentDataDefault)
if (permittedArgumentData.ContainsKey(p.Key) == false && p.Value as string != "")
permittedArgumentData.Add (p.Key, p.Value);
permittedArgumentData.Add(p.Key, p.Value);
} // next sublistIndex
}
@ -1414,36 +1416,36 @@ namespace SebWindowsConfig
}
// Get the Prohibited Process List
ListObj prohibitedProcessList = (ListObj)valueForDictionaryKey(cleanSettings, SEBSettings.KeyProhibitedProcesses);
ListObj prohibitedProcessList = (ListObj) valueForDictionaryKey(cleanSettings, SEBSettings.KeyProhibitedProcesses);
if (prohibitedProcessList != null)
{
// Traverse Prohibited Processes of currently opened file
for (int listIndex = 0; listIndex < prohibitedProcessList.Count; listIndex++)
{
// Get the Prohibited Process Data
DictObj prohibitedProcessData = (DictObj)prohibitedProcessList[listIndex];
DictObj prohibitedProcessData = (DictObj) prohibitedProcessList[listIndex];
// Add potentially missing keys to current Process Dictionary
foreach (KeyValue p in prohibitedProcessDataDefault)
if (!(p.Value is ListObj && ((ListObj)p.Value).Count == 0) && !(p.Value is DictObj && ((DictObj)p.Value).Count == 0))
if (!(p.Value is ListObj && ((ListObj) p.Value).Count == 0) && !(p.Value is DictObj && ((DictObj) p.Value).Count == 0))
prohibitedProcessData.Add(p.Key, p.Value);
} // next listIndex
}
// Get the Embedded Certificate List
ListObj embeddedCertificateList = (ListObj)valueForDictionaryKey(cleanSettings, SEBSettings.KeyEmbeddedCertificates);
ListObj embeddedCertificateList = (ListObj) valueForDictionaryKey(cleanSettings, SEBSettings.KeyEmbeddedCertificates);
if (embeddedCertificateList != null)
{
// Traverse Embedded Certificates of currently opened file
for (int listIndex = 0; listIndex < embeddedCertificateList.Count; listIndex++)
{
// Get the Embedded Certificate Data
DictObj embeddedCertificateData = (DictObj)embeddedCertificateList[listIndex];
DictObj embeddedCertificateData = (DictObj) embeddedCertificateList[listIndex];
// Add potentially missing keys to current Certificate Dictionary
foreach (KeyValue p in embeddedCertificateDataDefault)
if (!(p.Value is ListObj && ((ListObj)p.Value).Count == 0) && !(p.Value is DictObj && ((DictObj)p.Value).Count == 0))
if (!(p.Value is ListObj && ((ListObj) p.Value).Count == 0) && !(p.Value is DictObj && ((DictObj) p.Value).Count == 0))
embeddedCertificateData.Add(p.Key, p.Value);
} // next listIndex
@ -1485,16 +1487,16 @@ namespace SebWindowsConfig
//}
// Get the Proxies Dictionary
DictObj proxiesData = (DictObj)valueForDictionaryKey(cleanSettings, SEBSettings.KeyProxies);
DictObj proxiesData = (DictObj) valueForDictionaryKey(cleanSettings, SEBSettings.KeyProxies);
if (proxiesData != null)
{
// Add potentially missing keys to current Proxies Dictionary
foreach (KeyValue p in proxiesDataDefault)
if (proxiesData.ContainsKey(p.Key) == false && !(p.Value is ListObj && ((ListObj)p.Value).Count == 0) && !(p.Value is DictObj && ((DictObj)p.Value).Count == 0))
if (proxiesData.ContainsKey(p.Key) == false && !(p.Value is ListObj && ((ListObj) p.Value).Count == 0) && !(p.Value is DictObj && ((DictObj) p.Value).Count == 0))
proxiesData.Add(p.Key, p.Value);
// Get the Bypassed Proxy List
ListObj bypassedProxyList = (ListObj)valueForDictionaryKey(proxiesData, SEBSettings.KeyExceptionsList);
ListObj bypassedProxyList = (ListObj) valueForDictionaryKey(proxiesData, SEBSettings.KeyExceptionsList);
if (bypassedProxyList != null)
{
if (bypassedProxyList.Count == 0)
@ -1506,7 +1508,7 @@ namespace SebWindowsConfig
// Traverse Bypassed Proxies of currently opened file
for (int listIndex = 0; listIndex < bypassedProxyList.Count; listIndex++)
{
if ((String)bypassedProxyList[listIndex] == "")
if ((String) bypassedProxyList[listIndex] == "")
bypassedProxyList[listIndex] = bypassedProxyDataDefault;
} // next listIndex
}
@ -1546,7 +1548,7 @@ namespace SebWindowsConfig
Dictionary<TKey, TValue> ret = new Dictionary<TKey, TValue>(original.Count, original.Comparer);
foreach (KeyValuePair<TKey, TValue> entry in original)
{
ret.Add(entry.Key, (TValue)entry.Value.Clone());
ret.Add(entry.Key, (TValue) entry.Value.Clone());
}
return ret;
}
@ -1554,13 +1556,13 @@ namespace SebWindowsConfig
public static void AddDefaultProhibitedProcesses()
{
// Get the Prohibited Process list
SEBSettings.prohibitedProcessList = (ListObj)SEBSettings.settingsCurrent[SEBSettings.KeyProhibitedProcesses];
SEBSettings.prohibitedProcessList = (ListObj) SEBSettings.settingsCurrent[SEBSettings.KeyProhibitedProcesses];
// Insert strictly prohibited processes unconditionally
InsertProhibitedProcessesFromArray(prohibitedProcessesDefaultStrict);
// Insert default prohibited processes only in Disable Explorer Shell kiosk mode
if ((bool)SEBSettings.settingsCurrent[SEBSettings.KeyKillExplorerShell] == true)
if ((bool) SEBSettings.settingsCurrent[SEBSettings.KeyKillExplorerShell] == true)
{
InsertProhibitedProcessesFromArray(prohibitedProcessesDefault);
}
@ -1578,13 +1580,13 @@ namespace SebWindowsConfig
// Traverse Prohibited Processes of currently opened file
for (int listIndex = 0; listIndex < SEBSettings.prohibitedProcessList.Count; listIndex++)
{
DictObj prohibitedProcessData = (DictObj)SEBSettings.prohibitedProcessList[listIndex];
DictObj prohibitedProcessData = (DictObj) SEBSettings.prohibitedProcessList[listIndex];
if ((int) prohibitedProcessData[SEBSettings.KeyOS] == IntWin)
{
// Check if this prohibited process already is in Prohibited Process list in current settings
if (Path.GetFileNameWithoutExtension((string)prohibitedProcessData[SEBSettings.KeyOriginalName]).Equals(prohibitedProcessFilenameWithoutExtension, StringComparison.InvariantCultureIgnoreCase) ||
Path.GetFileNameWithoutExtension((string)prohibitedProcessData[SEBSettings.KeyExecutable]).Equals(prohibitedProcessFilenameWithoutExtension, StringComparison.InvariantCultureIgnoreCase))
if (Path.GetFileNameWithoutExtension((string) prohibitedProcessData[SEBSettings.KeyOriginalName]).Equals(prohibitedProcessFilenameWithoutExtension, StringComparison.InvariantCultureIgnoreCase) ||
Path.GetFileNameWithoutExtension((string) prohibitedProcessData[SEBSettings.KeyExecutable]).Equals(prohibitedProcessFilenameWithoutExtension, StringComparison.InvariantCultureIgnoreCase))
indexOfProcess = listIndex;
}
} // next listIndex
@ -1618,7 +1620,7 @@ namespace SebWindowsConfig
public static bool CheckForDefaultProhibitedProcesses(bool remove)
{
// Get the Prohibited Process list
SEBSettings.prohibitedProcessList = (ListObj)SEBSettings.settingsCurrent[SEBSettings.KeyProhibitedProcesses];
SEBSettings.prohibitedProcessList = (ListObj) SEBSettings.settingsCurrent[SEBSettings.KeyProhibitedProcesses];
bool prohibitedProcessFound = false;
foreach (string defaultProhibitedProcessName in prohibitedProcessesDefault)
@ -1628,11 +1630,11 @@ namespace SebWindowsConfig
// Traverse Prohibited Processes of currently opened file
while (listIndex < SEBSettings.prohibitedProcessList.Count)
{
DictObj prohibitedProcessData = (DictObj)SEBSettings.prohibitedProcessList[listIndex];
DictObj prohibitedProcessData = (DictObj) SEBSettings.prohibitedProcessList[listIndex];
// Check if this prohibited process already is in Prohibited Process list in current settings
if (Path.GetFileNameWithoutExtension((string)prohibitedProcessData[SEBSettings.KeyOriginalName]).Equals(prohibitedProcessFilenameWithoutExtension, StringComparison.InvariantCultureIgnoreCase) ||
Path.GetFileNameWithoutExtension((string)prohibitedProcessData[SEBSettings.KeyExecutable]).Equals(prohibitedProcessFilenameWithoutExtension, StringComparison.InvariantCultureIgnoreCase))
if (Path.GetFileNameWithoutExtension((string) prohibitedProcessData[SEBSettings.KeyOriginalName]).Equals(prohibitedProcessFilenameWithoutExtension, StringComparison.InvariantCultureIgnoreCase) ||
Path.GetFileNameWithoutExtension((string) prohibitedProcessData[SEBSettings.KeyExecutable]).Equals(prohibitedProcessFilenameWithoutExtension, StringComparison.InvariantCultureIgnoreCase))
{
prohibitedProcessFound = true;
if (remove)
@ -1671,7 +1673,7 @@ namespace SebWindowsConfig
// Treat the complex datatype Dictionary<string, object>
if (typeSource.Contains("Dictionary"))
{
DictObj dictSource = (DictObj)objectSource;
DictObj dictSource = (DictObj) objectSource;
//foreach (KeyValue pair in dictSource)
for (int index = 0; index < dictSource.Count; index++)
@ -1697,7 +1699,7 @@ namespace SebWindowsConfig
// Treat the complex datatype List<object>
if (typeSource.Contains("List"))
{
ListObj listSource = (ListObj)objectSource;
ListObj listSource = (ListObj) objectSource;
//foreach (object elem in listSource)
for (int index = 0; index < listSource.Count; index++)
@ -1736,7 +1738,7 @@ namespace SebWindowsConfig
File.Delete(fileName);
// Open the file for writing
fileStream = new FileStream (fileName, FileMode.OpenOrCreate, FileAccess.Write);
fileStream = new FileStream(fileName, FileMode.OpenOrCreate, FileAccess.Write);
fileWriter = new StreamWriter(fileStream);
// Write the header lines
@ -1759,7 +1761,7 @@ namespace SebWindowsConfig
/// Decrypt, deserialize and store new settings as current SEB settings
/// </summary>
/// ----------------------------------------------------------------------------------------
public static bool StoreDecryptedSebClientSettings(byte [] sebSettings)
public static bool StoreDecryptedSebClientSettings(byte[] sebSettings)
{
DictObj settingsDict = null;
// If we were passed empty settings, we skip decrypting and just use default settings
@ -1882,7 +1884,7 @@ namespace SebWindowsConfig
// Encrypt the configuration settings depending on passed credentials
// Write the configuration settings into .seb file.
byte [] encryptedSettings = SEBConfigFileManager.EncryptSEBSettingsWithCredentials(filePassword, passwordIsHash, fileCertificateRef, useAsymmetricOnlyEncryption, configPurpose, forEditing);
byte[] encryptedSettings = SEBConfigFileManager.EncryptSEBSettingsWithCredentials(filePassword, passwordIsHash, fileCertificateRef, useAsymmetricOnlyEncryption, configPurpose, forEditing);
File.WriteAllBytes(fileName, encryptedSettings);
}
catch (Exception streamWriteException)

View file

@ -30,8 +30,8 @@ namespace SebWindowsConfig
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SebWindowsConfigForm));
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
this.openFileDialogSebConfigFile = new System.Windows.Forms.OpenFileDialog();
this.saveFileDialogSebConfigFile = new System.Windows.Forms.SaveFileDialog();
this.imageListTabIcons = new System.Windows.Forms.ImageList(this.components);
@ -257,6 +257,7 @@ namespace SebWindowsConfig
this.textBoxQuitURL = new System.Windows.Forms.TextBox();
this.textBox1 = new System.Windows.Forms.TextBox();
this.groupBox7 = new System.Windows.Forms.GroupBox();
this.label26 = new System.Windows.Forms.Label();
this.label20 = new System.Windows.Forms.Label();
this.label19 = new System.Windows.Forms.Label();
this.label18 = new System.Windows.Forms.Label();
@ -316,6 +317,7 @@ namespace SebWindowsConfig
this.radioButtonUserAgentDesktopDefault = new System.Windows.Forms.RadioButton();
this.radioButtonUserAgentDesktopCustom = new System.Windows.Forms.RadioButton();
this.groupBox11 = new System.Windows.Forms.GroupBox();
this.checkBoxAllowPrint = new System.Windows.Forms.CheckBox();
this.checkBoxAllowFind = new System.Windows.Forms.CheckBox();
this.checkBoxAllowPdfReaderToolbar = new System.Windows.Forms.CheckBox();
this.checkBoxAllowVideoCapture = new System.Windows.Forms.CheckBox();
@ -460,7 +462,6 @@ namespace SebWindowsConfig
this.editDuplicateToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.configureClientToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.applyAndStartSEBToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.label26 = new System.Windows.Forms.Label();
this.tabPageHookedKeys.SuspendLayout();
this.groupBoxFunctionKeys.SuspendLayout();
this.groupBoxSpecialKeys.SuspendLayout();
@ -1869,8 +1870,8 @@ namespace SebWindowsConfig
//
// Type
//
dataGridViewCellStyle7.BackColor = System.Drawing.Color.Silver;
this.Type.DefaultCellStyle = dataGridViewCellStyle7;
dataGridViewCellStyle1.BackColor = System.Drawing.Color.Silver;
this.Type.DefaultCellStyle = dataGridViewCellStyle1;
this.Type.HeaderText = "Type";
this.Type.Name = "Type";
this.Type.ReadOnly = true;
@ -3403,6 +3404,17 @@ namespace SebWindowsConfig
this.groupBox7.TabIndex = 119;
this.groupBox7.TabStop = false;
this.groupBox7.Text = "Browser Exam Key / Configuration Key";
//
// label26
//
this.label26.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label26.ForeColor = System.Drawing.Color.Red;
this.label26.Location = new System.Drawing.Point(12, 228);
this.label26.Name = "label26";
this.label26.Size = new System.Drawing.Size(527, 28);
this.label26.TabIndex = 120;
this.label26.Text = "The BEK is platform-specific, i.e. its value is different for the 32-bit (x86) an" +
"d 64-bit (x64) build of the same SEB version!";
//
// label20
//
@ -3729,7 +3741,7 @@ namespace SebWindowsConfig
this.groupBox19.Controls.Add(this.checkBoxAllowNavigationNewWindow);
this.groupBox19.Controls.Add(this.checkBoxAllowReloadNewWindow);
this.groupBox19.Controls.Add(this.checkBoxShowReloadWarningNewWindow);
this.groupBox19.Location = new System.Drawing.Point(281, 342);
this.groupBox19.Location = new System.Drawing.Point(281, 367);
this.groupBox19.Name = "groupBox19";
this.groupBox19.Size = new System.Drawing.Size(265, 108);
this.groupBox19.TabIndex = 128;
@ -3804,7 +3816,7 @@ namespace SebWindowsConfig
this.groupBox18.Controls.Add(this.checkBoxAllowBrowsingBackForward);
this.groupBox18.Controls.Add(this.checkBoxShowReloadWarning);
this.groupBox18.Controls.Add(this.checkBoxAllowReload);
this.groupBox18.Location = new System.Drawing.Point(24, 342);
this.groupBox18.Location = new System.Drawing.Point(24, 367);
this.groupBox18.Name = "groupBox18";
this.groupBox18.Size = new System.Drawing.Size(239, 108);
this.groupBox18.TabIndex = 127;
@ -4140,6 +4152,7 @@ namespace SebWindowsConfig
//
// groupBox11
//
this.groupBox11.Controls.Add(this.checkBoxAllowPrint);
this.groupBox11.Controls.Add(this.checkBoxAllowFind);
this.groupBox11.Controls.Add(this.checkBoxAllowPdfReaderToolbar);
this.groupBox11.Controls.Add(this.checkBoxAllowVideoCapture);
@ -4152,11 +4165,23 @@ namespace SebWindowsConfig
this.groupBox11.Controls.Add(this.checkBoxEnableJava);
this.groupBox11.Location = new System.Drawing.Point(24, 202);
this.groupBox11.Name = "groupBox11";
this.groupBox11.Size = new System.Drawing.Size(522, 113);
this.groupBox11.Size = new System.Drawing.Size(522, 140);
this.groupBox11.TabIndex = 71;
this.groupBox11.TabStop = false;
this.groupBox11.Text = "Browser security";
//
// checkBoxAllowPrint
//
this.checkBoxAllowPrint.AutoSize = true;
this.checkBoxAllowPrint.Location = new System.Drawing.Point(14, 50);
this.checkBoxAllowPrint.Name = "checkBoxAllowPrint";
this.checkBoxAllowPrint.Size = new System.Drawing.Size(503, 17);
this.checkBoxAllowPrint.TabIndex = 16;
this.checkBoxAllowPrint.Text = "Allow printing of web content (Win). This does not control printing via internal " +
"PDF reader (see below)!";
this.checkBoxAllowPrint.UseVisualStyleBackColor = true;
this.checkBoxAllowPrint.CheckedChanged += new System.EventHandler(this.checkBoxAllowPrint_CheckedChanged);
//
// checkBoxAllowFind
//
this.checkBoxAllowFind.AutoSize = true;
@ -4171,7 +4196,7 @@ namespace SebWindowsConfig
// checkBoxAllowPdfReaderToolbar
//
this.checkBoxAllowPdfReaderToolbar.AutoSize = true;
this.checkBoxAllowPdfReaderToolbar.Location = new System.Drawing.Point(14, 49);
this.checkBoxAllowPdfReaderToolbar.Location = new System.Drawing.Point(14, 76);
this.checkBoxAllowPdfReaderToolbar.Name = "checkBoxAllowPdfReaderToolbar";
this.checkBoxAllowPdfReaderToolbar.Size = new System.Drawing.Size(485, 17);
this.checkBoxAllowPdfReaderToolbar.TabIndex = 14;
@ -4228,7 +4253,7 @@ namespace SebWindowsConfig
//
// checkBoxRemoveProfile
//
this.checkBoxRemoveProfile.Location = new System.Drawing.Point(14, 66);
this.checkBoxRemoveProfile.Location = new System.Drawing.Point(14, 95);
this.checkBoxRemoveProfile.Name = "checkBoxRemoveProfile";
this.checkBoxRemoveProfile.Size = new System.Drawing.Size(481, 36);
this.checkBoxRemoveProfile.TabIndex = 6;
@ -4315,7 +4340,7 @@ namespace SebWindowsConfig
// labelUseSEBWithoutBrowser
//
this.labelUseSEBWithoutBrowser.AutoSize = true;
this.labelUseSEBWithoutBrowser.Location = new System.Drawing.Point(55, 497);
this.labelUseSEBWithoutBrowser.Location = new System.Drawing.Point(55, 522);
this.labelUseSEBWithoutBrowser.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.labelUseSEBWithoutBrowser.Name = "labelUseSEBWithoutBrowser";
this.labelUseSEBWithoutBrowser.Size = new System.Drawing.Size(436, 13);
@ -4326,7 +4351,7 @@ namespace SebWindowsConfig
// checkBoxUseSebWithoutBrowser
//
this.checkBoxUseSebWithoutBrowser.AutoSize = true;
this.checkBoxUseSebWithoutBrowser.Location = new System.Drawing.Point(38, 477);
this.checkBoxUseSebWithoutBrowser.Location = new System.Drawing.Point(38, 502);
this.checkBoxUseSebWithoutBrowser.Margin = new System.Windows.Forms.Padding(2, 1, 2, 1);
this.checkBoxUseSebWithoutBrowser.Name = "checkBoxUseSebWithoutBrowser";
this.checkBoxUseSebWithoutBrowser.Size = new System.Drawing.Size(185, 17);
@ -4585,8 +4610,8 @@ namespace SebWindowsConfig
// spellCheckerDictionaryFilesColumn
//
this.spellCheckerDictionaryFilesColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
dataGridViewCellStyle8.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.spellCheckerDictionaryFilesColumn.DefaultCellStyle = dataGridViewCellStyle8;
dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.spellCheckerDictionaryFilesColumn.DefaultCellStyle = dataGridViewCellStyle2;
this.spellCheckerDictionaryFilesColumn.HeaderText = "Files";
this.spellCheckerDictionaryFilesColumn.Name = "spellCheckerDictionaryFilesColumn";
this.spellCheckerDictionaryFilesColumn.ReadOnly = true;
@ -5983,17 +6008,6 @@ namespace SebWindowsConfig
this.applyAndStartSEBToolStripMenuItem.Text = "Apply and Start SEB";
this.applyAndStartSEBToolStripMenuItem.Visible = false;
this.applyAndStartSEBToolStripMenuItem.Click += new System.EventHandler(this.applyAndStartSEBToolStripMenuItem_Click);
//
// label26
//
this.label26.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label26.ForeColor = System.Drawing.Color.Red;
this.label26.Location = new System.Drawing.Point(12, 228);
this.label26.Name = "label26";
this.label26.Size = new System.Drawing.Size(527, 28);
this.label26.TabIndex = 120;
this.label26.Text = "The BEK is platform-specific, i.e. its value is different for the 32-bit (x86) an" +
"d 64-bit (x64) build of the same SEB version!";
//
// SebWindowsConfigForm
//
@ -6557,6 +6571,7 @@ namespace SebWindowsConfig
private System.Windows.Forms.CheckBox checkBoxTemporaryDownloadDirectory;
private System.Windows.Forms.CheckBox checkBoxEnableMiddleMouse;
private System.Windows.Forms.Label label26;
private System.Windows.Forms.CheckBox checkBoxAllowPrint;
}
}

View file

@ -506,6 +506,7 @@ namespace SebWindowsConfig
checkBoxEnableZoomPage.CheckedChanged += checkBoxEnableZoomPage_CheckedChanged;
checkBoxAllowPdfReaderToolbar.Checked = (Boolean) SEBSettings.settingsCurrent[SEBSettings.KeyAllowPDFReaderToolbar];
checkBoxAllowFind.Checked = (Boolean) SEBSettings.settingsCurrent[SEBSettings.KeyAllowFind];
checkBoxAllowPrint.Checked = (Boolean) SEBSettings.settingsCurrent[SEBSettings.KeyAllowPrint];
checkBoxAllowSpellCheck.Checked = (Boolean) SEBSettings.settingsCurrent[SEBSettings.KeyAllowSpellCheck];
checkBoxAllowDictionaryLookup.Checked = (Boolean) SEBSettings.settingsCurrent[SEBSettings.KeyAllowDictionaryLookup];
@ -4671,5 +4672,10 @@ namespace SebWindowsConfig
{
SEBSettings.settingsCurrent[SEBSettings.KeyEnableMiddleMouse] = checkBoxEnableMiddleMouse.Checked;
}
private void checkBoxAllowPrint_CheckedChanged(object sender, EventArgs e)
{
SEBSettings.settingsCurrent[SEBSettings.KeyAllowPrint] = checkBoxAllowPrint.Checked;
}
}
}

File diff suppressed because it is too large Load diff