private void NewWindowHandler(EmberAPI.MediaContainers.Movie DBMovie) { //Thread newWindowThread = new Thread(new ThreadStart(ThreadStartingPoint)); //Thread newWindowThread = System.Windows.Threading.Dispatcher.CurrentDispatcher.Thread; //newWindowThread.SetApartmentState(ApartmentState.STA); //newWindowThread.IsBackground = false; //newWindowThread.Start(); Thread workerThread = new Thread(new ParameterizedThreadStart(ShowMyWindow)); workerThread.SetApartmentState(ApartmentState.STA); workerThread.Start(DBMovie); workerThread.Join(); }
//private readonly FilmCollection _ListeResult = new FilmCollection(); public dlgResults(EmberAPI.MediaContainers.Movie _ParamMovie) { // = String.Concat(Master.eLang.GetString(301, "Search Results - "), _SearchMovie.Title); //_ListeResult = TryFindResource("ResultDataSource") as FilmCollection; _ListeResult = new FilmCollection(); API _API = new API(); _SearchMovie = _ParamMovie; _ListeResult = _API.Search(_SearchMovie); InitializeComponent(); //lstResults.ItemsSource = _ListeResult; string test = ""; //foreach (var item in _ListeResult) //{ // lstResults.Items.Add(item); //} }