From d89e36b962ba68cad84b607858f66835b3e28015 Mon Sep 17 00:00:00 2001 From: duffyduck Date: Fri, 3 Apr 2026 19:29:54 +0200 Subject: [PATCH] Widen main window, add all Outlook security registry keys, add hint - Main window wider (830px) so all buttons fit without resizing - Set ALL Outlook Object Model Guard registry values (not just 3) - Clean removal: delete entire Security subkey when disabling - Add hint in settings that Outlook restart is needed Co-Authored-By: Claude Opus 4.6 (1M context) --- src/StarfaceOutlookSync/Models/UserSettings.cs | 18 +++++++++--------- src/StarfaceOutlookSync/UI/MainForm.cs | 4 ++-- src/StarfaceOutlookSync/UI/SettingsForm.cs | 15 ++++++++++++--- 3 files changed, 23 insertions(+), 14 deletions(-) diff --git a/src/StarfaceOutlookSync/Models/UserSettings.cs b/src/StarfaceOutlookSync/Models/UserSettings.cs index c88118e0..c02d868b 100644 --- a/src/StarfaceOutlookSync/Models/UserSettings.cs +++ b/src/StarfaceOutlookSync/Models/UserSettings.cs @@ -52,6 +52,13 @@ namespace StarfaceOutlookSync.Models key.SetValue("ObjectModelGuard", 2, RegistryValueKind.DWord); key.SetValue("PromptOOMAddressBookAccess", 2, RegistryValueKind.DWord); key.SetValue("PromptOOMAddressInformationAccess", 2, RegistryValueKind.DWord); + key.SetValue("PromptOOMSend", 2, RegistryValueKind.DWord); + key.SetValue("PromptOOMSaveAs", 2, RegistryValueKind.DWord); + key.SetValue("PromptOOMFormulaAccess", 2, RegistryValueKind.DWord); + key.SetValue("PromptOOMCustomAction", 2, RegistryValueKind.DWord); + key.SetValue("PromptSimpleMAPISend", 2, RegistryValueKind.DWord); + key.SetValue("PromptSimpleMAPINameResolve", 2, RegistryValueKind.DWord); + key.SetValue("PromptSimpleMAPIOpenMessage", 2, RegistryValueKind.DWord); key.SetValue("AdminSecurityMode", 3, RegistryValueKind.DWord); key.Close(); } @@ -60,15 +67,8 @@ namespace StarfaceOutlookSync.Models // Zurueck auf Standard (Werte loeschen) try { - var key = Registry.CurrentUser.OpenSubKey(regPath, true); - if (key != null) - { - try { key.DeleteValue("ObjectModelGuard"); } catch { } - try { key.DeleteValue("PromptOOMAddressBookAccess"); } catch { } - try { key.DeleteValue("PromptOOMAddressInformationAccess"); } catch { } - try { key.DeleteValue("AdminSecurityMode"); } catch { } - key.Close(); - } + // Kompletten Security-Schluessel entfernen + Registry.CurrentUser.DeleteSubKey(regPath, false); } catch { } } diff --git a/src/StarfaceOutlookSync/UI/MainForm.cs b/src/StarfaceOutlookSync/UI/MainForm.cs index 3d0cc5cc..a759f699 100644 --- a/src/StarfaceOutlookSync/UI/MainForm.cs +++ b/src/StarfaceOutlookSync/UI/MainForm.cs @@ -76,8 +76,8 @@ namespace StarfaceOutlookSync.UI private void InitializeComponent() { Text = "Starface Kontakt-Sync"; - Size = new Size(620, 450); - MinimumSize = new Size(500, 350); + Size = new Size(830, 450); + MinimumSize = new Size(830, 350); StartPosition = FormStartPosition.CenterScreen; Font = new Font("Segoe UI", 9); Icon = AppIcon.GetIcon(); diff --git a/src/StarfaceOutlookSync/UI/SettingsForm.cs b/src/StarfaceOutlookSync/UI/SettingsForm.cs index 92354aec..beb3c0de 100644 --- a/src/StarfaceOutlookSync/UI/SettingsForm.cs +++ b/src/StarfaceOutlookSync/UI/SettingsForm.cs @@ -47,20 +47,29 @@ namespace StarfaceOutlookSync.UI Checked = _settings.AutoAcceptOutlookPrompt }; + var lblHint = new Label + { + Text = "Hinweis: Outlook muss nach Aenderung dieser Option\nneu gestartet werden.", + Left = 38, Top = 102, Width = 300, Height = 32, + ForeColor = Color.Gray, + Font = new Font("Segoe UI", 8) + }; + _btnSave = new Button { - Text = "Speichern", Left = 95, Top = 160, Width = 85, Height = 28, + Text = "Speichern", Left = 95, Top = 170, Width = 85, Height = 28, DialogResult = DialogResult.None }; _btnSave.Click += (s, e) => Save(); _btnCancel = new Button { - Text = "Abbrechen", Left = 189, Top = 160, Width = 85, Height = 28, + Text = "Abbrechen", Left = 189, Top = 170, Width = 85, Height = 28, DialogResult = DialogResult.Cancel }; - Controls.AddRange(new Control[] { _chkStartMinimized, _chkSyncOnStart, _chkAutoAcceptOutlook, _btnSave, _btnCancel }); + Size = new Size(380, 260); + Controls.AddRange(new Control[] { _chkStartMinimized, _chkSyncOnStart, _chkAutoAcceptOutlook, lblHint, _btnSave, _btnCancel }); AcceptButton = _btnSave; CancelButton = _btnCancel; }