Exemplo n.º 1
0
        void uv_ContextMenuClick(object sender, EventArgs e, ContextAction action, List<string> videos)
        {
            if (action == ContextAction.Preview && videos.Count > 0)
            {
                /*MainWindow player = new MainWindow(videos, false);
                player.Topmost = true;
                player.WindowStartupLocation = System.Windows.WindowStartupLocation.CenterOwner;
                player.ShowDialog();*/
                // TODO: Replace with AxPlayer

                VideoFromStream player = new VideoFromStream(true);
                player.LoadVideos(videos);
                player.Topmost = true;
                player.WindowStartupLocation = System.Windows.WindowStartupLocation.CenterOwner;
                player.ShowDialog();

            }
        }
Exemplo n.º 2
0
        void performPreview(ListView sender)
        {
            List<string> urls = new List<string>();

            List<FileFromDB> files = new List<FileFromDB>();

			foreach (CodeITBL.FileFromDB selectedFile in sender.SelectedItems)
			{
				if (CodeITLicence.Licence.StorageType == CodeITLicence.StorageType.Cloud && selectedFile.IsCloudFileSystem == false)
				{
					System.Windows.MessageBox.Show(string.Format("Video {0} is stored local, please use local license", selectedFile.NewFileName), "Info", MessageBoxButton.OK, MessageBoxImage.Information);
				}
				if (CodeITLicence.Licence.StorageType == CodeITLicence.StorageType.Local && selectedFile.IsCloudFileSystem == true)
				{
					System.Windows.MessageBox.Show(string.Format("Video {0} is stored on cloud, please use cloud license", selectedFile.NewFileName), "Info", MessageBoxButton.OK, MessageBoxImage.Information);
				}
				else
					files.Add(selectedFile);
			}

			if (files.Count > 0)
			{
				VideoFromStream player = new VideoFromStream();
				player.LoadVideos(files);
				player.Topmost = true;
				player.WindowStartupLocation = System.Windows.WindowStartupLocation.CenterOwner;
				player.ShowDialog();
			}
        }
Exemplo n.º 3
0
        void uv_ContextMenuClick(object sender, EventArgs e, ContextAction action, List<string> videos)
        {
            if (action == ContextAction.Preview && videos.Count > 0)
            {
                List<FileFromDB> selectedFiles = new List<FileFromDB>();

                List<string> urls = new List<string>();
                foreach (CodeITBL.FileFromDB selectedFile in ucUserVideos.lvItemsContainer.SelectedItems)
                {					
					if(CodeITLicence.Licence.StorageType == CodeITLicence.StorageType.Cloud && selectedFile.IsCloudFileSystem == false)
					{
						System.Windows.MessageBox.Show(string.Format("Video {0} is stored local, please use local license", selectedFile.NewFileName), "Info", MessageBoxButton.OK, MessageBoxImage.Information);
					}
					if (CodeITLicence.Licence.StorageType == CodeITLicence.StorageType.Local && selectedFile.IsCloudFileSystem == true)
					{
						System.Windows.MessageBox.Show(string.Format("Video {0} is stored on cloud, please use cloud license", selectedFile.NewFileName), "Info", MessageBoxButton.OK, MessageBoxImage.Information);
					}
					else
						selectedFiles.Add(selectedFile);
                }

				if (selectedFiles.Count > 0)
				{
					VideoFromStream player = new VideoFromStream();
					player.LoadVideos(selectedFiles);
					player.Topmost = true;
					player.WindowStartupLocation = System.Windows.WindowStartupLocation.CenterOwner;
					player.ShowDialog();
				}
            }
        }
Exemplo n.º 4
0
		void uv_ContextMenuClick(object sender, EventArgs e, ContextAction action, List<string> videos)
		{
			if (action == ContextAction.Preview && videos.Count > 0)
			{
				string folderName = Guid.NewGuid().ToString().Replace("-", string.Empty);
				string folderPath = Properties.Settings.Default.TempVideoLocation.TrimEnd('\\') + "\\" + folderName;
				if (!System.IO.Directory.Exists(folderPath))
					System.IO.Directory.CreateDirectory(folderPath);

				List<string> allVideos = new List<string>();
				SelectedItems();
				DownloadVideoFromMTPDevice(_selectedFiles, _goproDevice, folderPath);

				foreach (var item in _selectedFiles)
				{
					allVideos.Add(System.IO.Path.Combine(folderPath, item.Name));
				}

                VideoFromStream player = new VideoFromStream(true);
                player.LoadVideos(allVideos);
                player.Topmost = true;
                player.WindowStartupLocation = System.Windows.WindowStartupLocation.CenterOwner;
                player.ShowDialog();
			}
		}