private void Uri_TextChanged(object sender, TextChangedEventArgs e)
        {
            var textBox = (TextBox)sender;
            var border  = (Border)textBox.Parent;

            // Validate if specified URI is valid
            border.BorderBrush = AppConfigurationWindow.GetUriSetting(textBox.Text) == null ? Brushes.Red : Brushes.Transparent;
        }
        private void SafeUri_TextChanged(object sender, TextChangedEventArgs e)
        {
            var textBox = (TextBox)sender;
            var border  = (Border)textBox.Parent;

            var uris       = textBox.Text.Split(new [] { '\r', '\n' }, StringSplitOptions.RemoveEmptyEntries);
            var errorFound = false;

            foreach (var uri in uris)
            {
                errorFound |= AppConfigurationWindow.GetUriSetting(uri) == null;
            }

            // Validate if specified URI is valid
            border.BorderBrush = errorFound ? Brushes.Red : Brushes.Transparent;
        }
        private void OKButton_OnClick(object sender, RoutedEventArgs e)
        {
            // Only persist values back upon "OK"
            for (int monitorIdx = 0; monitorIdx < monitorUris.Length && monitorIdx < config.Windows.Count; monitorIdx++)
            {
                for (int i = 0; i < 4; i++)
                {
                    config.Windows[monitorIdx].Panes[i].Uri = AppConfigurationWindow.GetUriSetting(monitorUris[monitorIdx][i].Text) ?? config.Windows[monitorIdx].Panes[i].Uri;
                }
            }

            uint startupDelaySec = 0;

            uint.TryParse(this.PreStartupDelay.Text, out startupDelaySec);
            this.config.SharedWindowConfig.OnResumeDisplayLogon = this.OnResume.IsChecked ?? true;
            this.config.SharedWindowConfig.StartupDelaySec      = startupDelaySec;
            this.config.SharedPanelConfig.SafeUris.Clear();
            var uris = this.SafeUris.Text.Split(new[] { '\r', '\n' }, StringSplitOptions.RemoveEmptyEntries).Select(s => new Uri(s, UriKind.Absolute)).ToArray();

            this.config.SharedPanelConfig.AddSafeUris(uris);
            this.Close();
        }