コード例 #1
0
ファイル: DataGridBox.cs プロジェクト: xadxxadx/framework
        private static DataGridBox show(object source, string title)
        {
            DataGridBox form       = null;
            Thread      formThread = null;

            AutoResetEvent stopWaitHandle = new AutoResetEvent(false);

            formThread = new Thread(() =>
            {
                Accord.Controls.Tools.ConfigureWindowsFormsApplication();

                // Show control in a form
                form            = new DataGridBox();
                form.Text       = title ?? "Data Grid";
                form.formThread = formThread;
                form.dataGridView.DataSource = source;

                stopWaitHandle.Set();

                Application.Run(form);
            });

            formThread.SetApartmentState(ApartmentState.STA);

            formThread.Start();

            stopWaitHandle.WaitOne();

            return(form);
        }
コード例 #2
0
ファイル: DataGridBox.cs プロジェクト: mindnumb/Accord.Net
        private static DataGridBox show(object source, string title)
        {
            DataGridBox form       = null;
            Thread      formThread = null;

            AutoResetEvent stopWaitHandle = new AutoResetEvent(false);

            formThread = new Thread(() =>
            {
                Application.EnableVisualStyles();
                Application.SetCompatibleTextRenderingDefault(false);

                // Show control in a form
                form            = new DataGridBox();
                form.Text       = title ?? "Data Grid";
                form.formThread = formThread;
                form.dataGridView.DataSource = source;

                stopWaitHandle.Set();

                Application.Run(form);
            });

            formThread.SetApartmentState(ApartmentState.STA);

            formThread.Start();

            stopWaitHandle.WaitOne();

            return(form);
        }
コード例 #3
0
        private static DataGridBox show(object source, string title)
        {
            DataGridBox form = null;
            Thread formThread = null;

            AutoResetEvent stopWaitHandle = new AutoResetEvent(false);

            formThread = new Thread(() =>
            {
                Application.EnableVisualStyles();
                Application.SetCompatibleTextRenderingDefault(false);

                // Show control in a form
                form = new DataGridBox();
                form.Text = title ?? "Data Grid";
                form.formThread = formThread;
                form.dataGridView.DataSource = source;

                stopWaitHandle.Set();

                Application.Run(form);
            });

            formThread.SetApartmentState(ApartmentState.STA);

            formThread.Start();

            stopWaitHandle.WaitOne();

            return form;
        }
コード例 #4
0
ファイル: DataGridBox.cs プロジェクト: accord-net/framework
        private static DataGridBox show(object source, string title)
        {
            DataGridBox form = null;
            Thread formThread = null;

            AutoResetEvent stopWaitHandle = new AutoResetEvent(false);

            formThread = new Thread(() =>
            {
                Accord.Controls.Tools.ConfigureWindowsFormsApplication();

                // Show control in a form
                form = new DataGridBox();
                form.Text = title ?? "Data Grid";
                form.formThread = formThread;
                form.dataGridView.DataSource = source;

                stopWaitHandle.Set();

                Application.Run(form);
            });

            formThread.SetApartmentState(ApartmentState.STA);

            formThread.Start();

            stopWaitHandle.WaitOne();

            return form;
        }