コード例 #1
0
ファイル: HtmlLabel.cs プロジェクト: schifflee/Gamodo.Studio
        protected override void CreateFragment()
        {
            string text = Text;
            string font = string.Format("font: {0}pt {1}", Font.Size, Font.FontFamily.Name);

            //Create fragment container
            _htmlContainer = new InitialContainer("<table border=0 cellspacing=5 cellpadding=0 style=\"" + font + "\"><tr><td>" + text + "</td></tr></table>");
            //_htmlContainer.SetBounds(new Rectangle(0, 0, 10, 10));
        }
コード例 #2
0
ファイル: HtmlPanel.cs プロジェクト: tal-athena/RegScoreCalc
        /// <summary>
        /// Creates a new HtmlPanel
        /// </summary>
        public HtmlPanel()
        {
            _htmlContainer = new InitialContainer();

            SetStyle(ControlStyles.ResizeRedraw, true);
            SetStyle(ControlStyles.Opaque, true);
            //SetStyle(ControlStyles.Selectable, true);

            DoubleBuffered = true;

            BackColor  = SystemColors.Window;
            AutoScroll = true;

            HtmlRenderer.AddReference(Assembly.GetCallingAssembly());
        }
コード例 #3
0
        void HtmlToolTip_Popup(object sender, PopupEventArgs e)
        {
            string text = this.GetToolTip(e.AssociatedControl);
            string font = string.Format(NumberFormatInfo.InvariantInfo, "font: {0}pt {1}", e.AssociatedControl.Font.Size, e.AssociatedControl.Font.FontFamily.Name);

            //Create fragment container
            container = new InitialContainer("<table class=htmltooltipbackground cellspacing=5 cellpadding=0 style=\"" + font + "\"><tr><td style=border:0px>" + text + "</td></tr></table>");
            container.SetBounds(new Rectangle(0, 0, 10, 10));
            container.AvoidGeometryAntialias = true;

            //Measure bounds of the container
            using (IGraphics g = new GraphicsWrapper(e.AssociatedControl.CreateGraphics()))
            {
                container.MeasureBounds(g);
            }

            //Set the size of the tooltip
            e.ToolTipSize = Size.Round(container.MaximumSize);
        }
コード例 #4
0
        void ReleaseDesignerOutlets()
        {
            if (DealerBtn != null)
            {
                DealerBtn.Dispose();
                DealerBtn = null;
            }

            if (DealerCodeTxt != null)
            {
                DealerCodeTxt.Dispose();
                DealerCodeTxt = null;
            }

            if (DealerContainer != null)
            {
                DealerContainer.Dispose();
                DealerContainer = null;
            }

            if (DealerGetStartBtn != null)
            {
                DealerGetStartBtn.Dispose();
                DealerGetStartBtn = null;
            }

            if (EmailPhone != null)
            {
                EmailPhone.Dispose();
                EmailPhone = null;
            }

            if (EmailRadioBtn != null)
            {
                EmailRadioBtn.Dispose();
                EmailRadioBtn = null;
            }

            if (GetStartBtn != null)
            {
                GetStartBtn.Dispose();
                GetStartBtn = null;
            }

            if (GuestBtn != null)
            {
                GuestBtn.Dispose();
                GuestBtn = null;
            }

            if (GuestContainer != null)
            {
                GuestContainer.Dispose();
                GuestContainer = null;
            }

            if (InitialContainer != null)
            {
                InitialContainer.Dispose();
                InitialContainer = null;
            }

            if (LastNameTxt != null)
            {
                LastNameTxt.Dispose();
                LastNameTxt = null;
            }

            if (LoginGirlImg != null)
            {
                LoginGirlImg.Dispose();
                LoginGirlImg = null;
            }

            if (OverLayView != null)
            {
                OverLayView.Dispose();
                OverLayView = null;
            }

            if (PhoneRadioBtn != null)
            {
                PhoneRadioBtn.Dispose();
                PhoneRadioBtn = null;
            }

            if (scrollview != null)
            {
                scrollview.Dispose();
                scrollview = null;
            }

            if (txtZip != null)
            {
                txtZip.Dispose();
                txtZip = null;
            }
        }
コード例 #5
0
ファイル: HtmlPanel.cs プロジェクト: tal-athena/RegScoreCalc
 /// <summary>
 /// Creates the fragment of HTML that is rendered
 /// </summary>
 protected virtual void CreateFragment()
 {
     _htmlContainer = new InitialContainer(Text);
 }
コード例 #6
0
ファイル: Box.cs プロジェクト: workwhileweb/htmlrender
 /// <summary>
 ///     Sets the initial container of the box
 /// </summary>
 /// <param name="b"></param>
 private void SetInitialContainer(InitialContainer b)
 {
     _initialContainer = b;
 }