コード例 #1
0
        public GenerateImageForm(string html)
        {
            _html = html;
            InitializeComponent();

            Icon = DemoForm.GetIcon();

            _background = HtmlRenderingHelper.CreateImageForTransparentBackground();

            foreach (var color in GetColors())
            {
                if (color != Color.Transparent)
                {
                    _backgroundColorTSB.Items.Add(color.Name);
                }
            }
            _backgroundColorTSB.SelectedItem = Color.White.Name;

            foreach (var hint in Enum.GetNames(typeof(TextRenderingHint)))
            {
                _textRenderingHintTSCB.Items.Add(hint);
            }
            _textRenderingHintTSCB.SelectedItem = TextRenderingHint.AntiAlias.ToString();

            _useGdiPlusTSB.Enabled      = !HtmlRenderingHelper.IsRunningOnMono();
            _backgroundColorTSB.Enabled = !HtmlRenderingHelper.IsRunningOnMono();
        }
コード例 #2
0
        public SampleForm()
        {
            InitializeComponent();

            Icon = DemoForm.GetIcon();

            _htmlLabel.Text = DemoUtils.SampleHtmlLabelText;
            _htmlPanel.Text = DemoUtils.SampleHtmlPanelText;

            _background = HtmlRenderingHelper.CreateImageForTransparentBackground();
        }