LayoutFarm.Demo.DemoForm.DemoForm C# (CSharp) Method

DemoForm() public method

Init.
public DemoForm ( PixelFarm p ) : System
p PixelFarm
return System
        public DemoForm(PixelFarm.Drawing.GraphicsPlatform p)
        {
            this.graphicsPlatform = p;
            this._htmlPanel = new LayoutFarm.Demo.HtmlPanel(this.graphicsPlatform, 800, 600);
            this.htmlHost = new LayoutFarm.HtmlBoxes.HtmlHost();
            htmlHost.AttachEssentailHandlers(
                this.HandleImageRequest,
                this.HandleStylesheetRequest);
            _htmlPanel.SetHtmlHost(htmlHost);
            InitializeComponent();
            //_htmlToolTip.ImageLoad += OnImageLoad; 
            //_htmlToolTip.SetToolTip(_htmlPanel, Resources.Tooltip);

            _htmlEditor.Font = new Font(FontFamily.GenericMonospace, 10);
            StartPosition = FormStartPosition.CenterScreen;
            var size = Screen.GetWorkingArea(Point.Empty);
            Size = new Size((int)(size.Width * 0.7), (int)(size.Height * 0.8));
            _updateHtmlTimer = new Timer(OnUpdateHtmlTimerTick);
            this.Text += " : " + Path.GetDirectoryName(Application.ExecutablePath);
            this._samplesTreeView.NodeMouseClick += new TreeNodeMouseClickEventHandler(_samplesTreeView_NodeMouseClick);
        }