public WatermarkForm(WatermarkConfig config = null)
        {
            InitializeComponent();

            if (config == null)
            {
                config = new WatermarkConfig();
            }

            Config = config;

            codesMenu = NameParser.CreateCodesMenu(txtWatermarkText, ReplacementVariables.t);
        }
Пример #2
0
        public WatermarkForm(WatermarkConfig config = null)
        {
            InitializeComponent();

            if (config == null)
            {
                config = new WatermarkConfig();
            }

            Config = config;

            codesMenu = NameParser.CreateCodesMenu(txtWatermarkText, ReplacementVariables.t);
        }
        public static DialogResult ShowFontDialog(WatermarkConfig config)
        {
            DialogResult result = DialogResult.Cancel;

            try
            {
                FontDialog fDialog = new FontDialog
                {
                    ShowColor = true
                };

                try
                {
                    fDialog.Color = config.WatermarkFontArgb;
                    fDialog.Font = config.WatermarkFont;
                }
                catch (Exception err)
                {
                    DebugHelper.WriteException(err, "Error while initializing Font and Color");
                }

                result = fDialog.ShowDialog();

                if (result == DialogResult.OK)
                {
                    config.WatermarkFont = fDialog.Font;
                    config.WatermarkFontArgb = fDialog.Color;
                }
            }
            catch (Exception ex)
            {
                DebugHelper.WriteException(ex, "Error while setting Watermark Font");
            }

            return result;
        }
Пример #4
0
        public static DialogResult ShowFontDialog(WatermarkConfig config)
        {
            DialogResult result = DialogResult.Cancel;

            try
            {
                FontDialog fDialog = new FontDialog
                {
                    ShowColor = true
                };

                try
                {
                    fDialog.Color = config.WatermarkFontArgb;
                    fDialog.Font  = config.WatermarkFont;
                }
                catch (Exception err)
                {
                    DebugHelper.WriteException(err, "Error while initializing Font and Color");
                }

                result = fDialog.ShowDialog();

                if (result == DialogResult.OK)
                {
                    config.WatermarkFont     = fDialog.Font;
                    config.WatermarkFontArgb = fDialog.Color;
                }
            }
            catch (Exception ex)
            {
                DebugHelper.WriteException(ex, "Error while setting Watermark Font");
            }

            return(result);
        }
Пример #5
0
 public WatermarkForm(WatermarkConfig watermarkConfig)
 {
     InitializeComponent();
     config    = watermarkConfig;
     codesMenu = NameParser.CreateCodesMenu(txtWatermarkText, ReplacementVariables.t);
 }
Пример #6
0
 public WatermarkForm(WatermarkConfig watermarkConfig)
 {
     InitializeComponent();
     config = watermarkConfig;
     CodeMenu.Create<ReplCodeMenuEntry>(txtWatermarkText, ReplCodeMenuEntry.t, ReplCodeMenuEntry.pn);
 }
 public WatermarkManager(WatermarkConfig config)
 {
     Config = config;
 }
Пример #8
0
 public WatermarkForm(WatermarkConfig watermarkConfig)
 {
     InitializeComponent();
     config = watermarkConfig;
     codesMenu = NameParser.CreateCodesMenu(txtWatermarkText, ReplacementVariables.t);
 }
Пример #9
0
 public WatermarkManager(WatermarkConfig config)
 {
     Config = config;
 }
Пример #10
0
 public WatermarkForm(WatermarkConfig watermarkConfig)
 {
     InitializeComponent();
     config = watermarkConfig;
     CodeMenu.Create <ReplCodeMenuEntry>(txtWatermarkText, ReplCodeMenuEntry.t, ReplCodeMenuEntry.pn);
 }