コード例 #1
0
ファイル: OGLControl.cs プロジェクト: whigg/PointClouds
        public OGLControl() : base()
        {
            try
            {
                if (!GLSettings.IsInitializedFromSettings)
                {
                    GLSettings.InitFromSettings();
                }



                BackColor = GLSettings.BackColor;
                CreateMenu();
                GLrender = new OpenGLContext(this);
                System.Diagnostics.Debug.WriteLine("====> ThreadID OpenControl : " + System.Threading.Thread.CurrentThread.ManagedThreadId.ToString());
                timer.Elapsed += new System.Timers.ElapsedEventHandler(Timer_Tick);


                this.ModelViewMode = ModelViewMode.Camera;
            }
            catch (Exception err)
            {
                System.Windows.Forms.MessageBox.Show("Error in OGLControl constructur : " + err.Message);
            }
        }
コード例 #2
0
        protected override void OnClosed(EventArgs e)
        {
            GLSettings.Height = this.Height;
            GLSettings.Width  = this.Width;

            GLSettings.SaveSettings();
            base.OnClosed(e);
        }
コード例 #3
0
ファイル: TestForm.cs プロジェクト: whigg/PointClouds
        private void TestForm_FormClosed(object sender, FormClosedEventArgs e)
        {
            GLSettings.Height = this.Height;
            GLSettings.Width  = this.Width;

            GLSettings.SaveSettings();
            base.OnClosed(e);
        }
コード例 #4
0
        public MultipleOGLControls()
        {
            Thread.CurrentThread.CurrentUICulture = new CultureInfo(CultureInfo.CurrentCulture.LCID);
            InitializeComponent();


            AddOpenGLControl();

            if (!GLSettings.IsInitializedFromSettings)
            {
                GLSettings.InitFromSettings();
            }

            this.Height = GLSettings.Height;
            this.Width  = GLSettings.Width;
        }
コード例 #5
0
        public OpenGLUC()
        {
            InitializeComponent();
            if (!GLSettings.IsInitializedFromSettings)
            {
                GLSettings.InitFromSettings();
            }


            InitComboBox();
            comboRenderMode.SelectedText = GLSettings.ViewMode;


            this.initGLControl();

            this.glControl1.Invalidate();
        }
コード例 #6
0
 public void SaveSettings()
 {
     GLSettings.SaveSettings();
 }