Ejemplo n.º 1
0
        private void RenderView_Resize(object sender, EventArgs e)
        {
            Control control = (Control)sender;

            if (control.Width != 0 && control.Height != 0)
            {
                RenderMethods.ResizeWnd(control.Width, control.Height);
            }
        }
Ejemplo n.º 2
0
        private void FXStudioForm_Load(object sender, EventArgs e)
        {
            string configFile = Path.Combine(Path.GetDirectoryName(Application.ExecutablePath), "FXStudio.Layout.config");

            if (File.Exists(configFile))
            {
                panelAllView.LoadFromXml(configFile, m_dockContent);
            }
            else
            {
                ResetLayout();
            }

            panelAllView.DockLeftPortion  = panelAllView.Width * 0.20d;
            panelAllView.DockRightPortion = panelAllView.DockLeftPortion;

            IntPtr hInstance   = Marshal.GetHINSTANCE(this.GetType().Module);
            var    panelRender = m_RenderView.GetRenderPanel();

            m_messageHandler.ResetRenderPanel(panelRender);

            try
            {
                if (!RenderMethods.CreateInstance(hInstance, IntPtr.Zero, panelRender.Handle, 1, panelRender.Width, panelRender.Height))
                {
                    this.Close();
                }

                if (panelRender.Width != 0 && panelRender.Height != 0)
                {
                    RenderMethods.ResizeWnd(panelRender.Width, panelRender.Height);
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
                this.Close();
            }
        }