예제 #1
0
        public void Start(string[] args)
        {
            using (var @event = new ManualResetEvent(false))
            {
                _application = new NetIdeApplication(args);

                _application.HandleAvailable += (s, e) =>
                {
                    Handle = _application.Handle;
                    @event.Set();
                };

                _thread = new Thread(ThreadProc);

                _thread.SetApartmentState(ApartmentState.STA);

                _thread.Start();

                @event.WaitOne();
            }
        }
예제 #2
0
        public void Start(string[] args)
        {
            using (var @event = new ManualResetEvent(false))
            {
                _application = new NetIdeApplication(args);

                _application.HandleAvailable += (s, e) =>
                {
                    Handle = _application.Handle;
                    @event.Set();
                };

                _thread = new Thread(ThreadProc);

                _thread.SetApartmentState(ApartmentState.STA);

                _thread.Start();

                @event.WaitOne();
            }
        }