Exemplo n.º 1
0
        /// <summary>
        /// Init.
        /// </summary>
        public DemoForm()
        {
            SamplesLoader.Init(HtmlRenderingHelper.IsRunningOnMono() ? "Mono" : "WinForms", typeof(HtmlRender).Assembly.GetName().Version.ToString());

            InitializeComponent();

            Icon = GetIcon();
            _openSampleFormTSB.Image     = Common.Properties.Resources.form;
            _showIEViewTSSB.Image        = Common.Properties.Resources.browser;
            _openInExternalViewTSB.Image = Common.Properties.Resources.chrome;
            _useGeneratedHtmlTSB.Image   = Common.Properties.Resources.code;
            _generateImageSTB.Image      = Common.Properties.Resources.image;
            _generatePdfTSB.Image        = Common.Properties.Resources.pdf;
            _runPerformanceTSB.Image     = Common.Properties.Resources.stopwatch;

            StartPosition = FormStartPosition.CenterScreen;
            var size = Screen.GetWorkingArea(Point.Empty);

            Size = new Size((int)(size.Width * 0.7), (int)(size.Height * 0.8));

            LoadCustomFonts();

            _showIEViewTSSB.Enabled = !HtmlRenderingHelper.IsRunningOnMono();
            _generatePdfTSB.Enabled = !HtmlRenderingHelper.IsRunningOnMono();
        }
Exemplo n.º 2
0
        /// <summary>
        /// the private font used for the demo
        /// </summary>
        //private readonly PrivateFontCollection _privateFont = new PrivateFontCollection();

        #endregion
        public DemoWindow()
        {
            SamplesLoader.Init("WPF", typeof(HtmlRender).Assembly.GetName().Version.ToString());

            InitializeComponent();

            WindowStartupLocation = WindowStartupLocation.CenterScreen;
            Width  = SystemParameters.PrimaryScreenWidth * 0.7;
            Height = SystemParameters.PrimaryScreenHeight * 0.8;

            LoadCustomFonts();
        }
Exemplo n.º 3
0
        /// <summary>
        /// the private font used for the demo
        /// </summary>
        //private readonly PrivateFontCollection _privateFont = new PrivateFontCollection();

        #endregion
        public DemoWindow()
        {
            SamplesLoader.Init("WPF", typeof(HtmlRender).Assembly.GetName().Version.ToString());

            InitializeComponent();

            WindowStartupLocation = WindowStartupLocation.CenterScreen;
            Width  = SystemParameters.PrimaryScreenWidth * 0.7;
            Height = SystemParameters.PrimaryScreenHeight * 0.8;

            _htmlTooltipLabel.AvoidImagesLateLoading = true;
            _htmlTooltipLabel.StylesheetLoad        += HtmlRenderingHelper.OnStylesheetLoad;
            _htmlTooltipLabel.ImageLoad += HtmlRenderingHelper.OnImageLoad;
            _htmlTooltipLabel.Text       = "<div class='htmltooltip'>" + Common.Resources.Tooltip + "</div>";

            LoadCustomFonts();
        }