SEBWIN-581: Implemented new configuration option to control printing of web content.
This commit is contained in:
parent
9d7b89d36c
commit
32be808415
19 changed files with 1136 additions and 1126 deletions
|
@ -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
|
||||
}));
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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";
|
||||
|
@ -134,7 +135,7 @@ namespace SafeExamBrowser.Configuration.ConfigurationData
|
|||
|
||||
internal static class Http
|
||||
{
|
||||
internal const string Enable = "HTTPEnable";
|
||||
internal const string Enable = "HTTPEnable";
|
||||
internal const string Host = "HTTPProxy";
|
||||
internal const string Password = "HTTPPassword";
|
||||
internal const string Port = "HTTPPort";
|
||||
|
|
|
@ -23,6 +23,7 @@ namespace SafeExamBrowser.I18n.Contracts
|
|||
Browser_LoadErrorMessage,
|
||||
Browser_LoadErrorTitle,
|
||||
Browser_Name,
|
||||
Browser_PrintNotAllowed,
|
||||
Browser_Tooltip,
|
||||
BrowserWindow_BackwardButton,
|
||||
BrowserWindow_DeveloperConsoleMenuItem,
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -30,6 +30,9 @@
|
|||
<Entry key="Browser_Name">
|
||||
浏览器
|
||||
</Entry>
|
||||
<Entry key="Browser_PrintNotAllowed">
|
||||
根据当前配置不允许打印。
|
||||
</Entry>
|
||||
<Entry key="Browser_Tooltip">
|
||||
浏览器应用程序
|
||||
</Entry>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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}");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -465,21 +465,21 @@ namespace SafeExamBrowser.UserInterface.Mobile.Windows
|
|||
var javascript = @"
|
||||
if (typeof __SEB_focusElement === 'undefined') {
|
||||
__SEB_focusElement = function (forward) {
|
||||
var items = [].map
|
||||
.call(document.body.querySelectorAll(['input', 'select', 'a[href]', 'textarea', 'button', '[tabindex]']), function(el, i) { return { el, i } })
|
||||
.filter(function(e) { return e.el.tabIndex >= 0 && !e.el.disabled && e.el.offsetParent; })
|
||||
.sort(function(a,b) { return a.el.tabIndex === b.el.tabIndex ? a.i - b.i : (a.el.tabIndex || 9E9) - (b.el.tabIndex || 9E9); })
|
||||
var item = items[forward ? 1 : items.length - 1];
|
||||
if (item && item.focus && typeof item.focus !== 'function')
|
||||
throw ('item.focus is not a function, ' + typeof item.focus)
|
||||
setTimeout(function () { item && item.focus && item.focus(); }, 20);
|
||||
var items = [].map
|
||||
.call(document.body.querySelectorAll(['input', 'select', 'a[href]', 'textarea', 'button', '[tabindex]']), function(el, i) { return { el, i } })
|
||||
.filter(function(e) { return e.el.tabIndex >= 0 && !e.el.disabled && e.el.offsetParent; })
|
||||
.sort(function(a,b) { return a.el.tabIndex === b.el.tabIndex ? a.i - b.i : (a.el.tabIndex || 9E9) - (b.el.tabIndex || 9E9); })
|
||||
var item = items[forward ? 1 : items.length - 1];
|
||||
if (item && item.focus && typeof item.focus !== 'function')
|
||||
throw ('item.focus is not a function, ' + typeof item.focus)
|
||||
setTimeout(function () { item && item.focus && item.focus(); }, 20);
|
||||
}
|
||||
}";
|
||||
browserControl.ExecuteJavascript(javascript, result =>
|
||||
{
|
||||
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}!");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load diff
65
SebWindowsConfig/SebWindowsConfigForm.Designer.cs
generated
65
SebWindowsConfig/SebWindowsConfigForm.Designer.cs
generated
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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
Loading…
Reference in a new issue