Example #1
0
        public MainForm()
        {
            InitializeComponent();
            Settings                 = GetSettings();
            LbCssFile.Tag            = LbCssFile.Text = Settings.CssFile;
            ChDetectUrls.Checked     = Settings.ConversionSettings.DetectUrls;
            ChFixBold.Checked        = Settings.ConversionSettings.FixBold;
            ChFixItalic.Checked      = Settings.ConversionSettings.FixItalic;
            ChIncludeCSS.Checked     = Settings.UseCustomCss;
            ChJoinParagraphs.Checked = Settings.FixParagraphs;
            if (Settings.ConversionSettings.MinimumLineLength != null)
            {
                NumericMinimumLine.Value = (int)Settings.ConversionSettings.MinimumLineLength;
            }

            ChCreateEntities.Checked = Settings.ConversionSettings.CreateEntities;
        }
Example #2
0
        private static UiArguments GetSettings()
        {
            var settings = new UiArguments {
                ConversionSettings = new ConversionSettings()
            };

            settings.ConversionSettings.CreateEntities    = Properties.Settings.Default.CreateEntities;
            settings.ConversionSettings.FixBold           = Properties.Settings.Default.FixBold;
            settings.ConversionSettings.DetectUrls        = Properties.Settings.Default.DetectUrls;
            settings.ConversionSettings.FixItalic         = Properties.Settings.Default.FixItalic;
            settings.ConversionSettings.MinimumLineLength = Properties.Settings.Default.MinimumLineLength;

            settings.UseCustomCss  = Properties.Settings.Default.UseCustomCss;
            settings.CssFile       = Properties.Settings.Default.CssFile;
            settings.FixParagraphs = Properties.Settings.Default.FixParagraphs;

            return(settings);
        }