Пример #1
0
        private void OnShowPreferences(object sender, EventArgs e)
        {
            m_PrefsDlg.StartPosition          = FormStartPosition.CenterParent;
            m_PrefsDlg.LastBrowsedImageFolder = m_HtmlEditControl.LastBrowsedImageFolder;
            m_PrefsDlg.SetWatermark(m_HtmlEditControl.BodyBackImage, !String.IsNullOrWhiteSpace(m_HtmlEditControl.BodyBackImage));

            String curWatermark = m_PrefsDlg.WatermarkPath;
            bool   curEnabled   = m_PrefsDlg.WatermarkEnabled;

            if (m_PrefsDlg.ShowDialog(Control.FromHandle(m_HwndParent)) == DialogResult.OK)
            {
                if ((m_PrefsDlg.WatermarkPath != curWatermark) ||
                    (m_PrefsDlg.WatermarkEnabled != curEnabled))
                {
                    foreach (var ctrl in s_CoreList)
                    {
                        ctrl.UpdateWatermark(m_PrefsDlg);
                    }
                }
                else
                {
                    UpdateControlPreferences();
                }
            }
        }