// If not using .NET 4.5, http://dotnetzip.codeplex.com/
        private void PhotoScenes_Preview(object sender, RoutedEventArgs e)
        {
            if (e != null)
            {
                e.Handled = true;
            }
            if (PhotoScenes.SelectedItems.Count != 1)
            {
                return;
            }
            ReCapPhotosceneProject item = PhotoScenes.SelectedItem as ReCapPhotosceneProject;
            string location             = System.IO.Path.GetFullPath(AppDomain.CurrentDomain.BaseDirectory) + item.Name + ".zip";

            if (!File.Exists(location))
            {
                if (e != null)                                                   // Do not enter into an infinite loop
                {
                    outputFormat.SelectedItem = AdskReCap.Format.OBJ.ToString(); // Our viewer support OBJ only
                    PhotoScenes_DownloadResult(null, null);
                }
                return;
            }

            ViewerWindow wnd = new ViewerWindow();

            wnd.Owner = this;
            wnd.Show();
            wnd.LoadModel(location);
        }
        private void RegisterUser_Click(object sender, EventArgs e)
        {
            Register = true;
            ViewerWindow vw = new ViewerWindow();

            this.SendFaceValue += new SendFaceData(vw.ReceiveFaceData);
            //SendFaceValue(GetFaceData());
            vw.Show();
        }
        private void _createViewer(IManga manga, bool saveEnabled = true, object provider = null)
        {
            var p = (IProvider)provider ?? _providerService.Providers.Find(x => x.DbName == manga.Site);

            if (!p.ViewEnabled)
            {
                try {
                    Process.Start(manga.Link);
                }
                catch (Exception e) {
                    _logger.Log.Error($"{manga.Link}\n{e}");
                }
                return;
            }
            var viewerWindow = new ViewerWindow(manga, p, saveEnabled);

            viewerWindow.Show();
        }
        private void ListBox_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            var MainViewerWindow = new ViewerWindow();

            var Viewer2DWindow   = new Viewer2d();
            var Viewer2ViewModel = new Viewer2dViewModel();

            Viewer2DWindow.DataContext = Viewer2ViewModel;

            //add to layouts
            //layoutManager.Viewer2dWindowsList.Add(MainViewerWindow);
            //layoutManager.SetPositionForNewViewer(MainViewerWindow);
            layoutManager.AddNewViewerWindow(MainViewerWindow);

            MainViewerWindow.Content = Viewer2DWindow;
            MainViewerWindow.Show();

            var dicomSeries = ((sender as ListBox).SelectedItem as DicomSeries);

            //load dicom files
            //Viewer2ViewModel.LoadDicomFilesFromStudy(dicomSeries);
            Viewer2ViewModel.LoadBitmapsFromStudy(dicomSeries);
        }