Пример #1
0
        public PreviewEditor()
        {
            InitializeComponent();

            textureViewer      = new TextureViewer();
            textureViewer.Dock = DockStyle.Fill;
            stPanel1.Controls.Add(textureViewer);

            textureViewer.LoadTextures();
        }
Пример #2
0
        public PreviewEditor()
        {
            InitializeComponent();

            textureViewer = new TextureViewer();
            textureViewer.LoadTextures();
            textureViewer.Show(dockPanel1, DockState.DockLeft);

            DockContent dockedViewport = new DockContent();

            SetupViewport(dockedViewport);
            dockedViewport.Show(dockPanel1, DockState.Document);
        }
Пример #3
0
        private void PreviewEditor_FormClosed(object sender, FormClosedEventArgs e)
        {
            PluginRuntime.bntxContainers.Clear();
            Runtime.abstractGlDrawables.Clear();

            if (gL_ControlModern != null)
            {
                gL_ControlModern.Dispose();
            }
            if (GL_ControlLegacy != null)
            {
                GL_ControlLegacy.Dispose();
            }
            if (textureViewer != null)
            {
                textureViewer.Close();
            }
            textureViewer    = null;
            gL_ControlModern = null;
            GL_ControlLegacy = null;

            GC.Collect();
            GC.WaitForPendingFinalizers();
        }