applying new struckture and working vlc
This commit is contained in:
parent
c8906c1471
commit
afe5d2f5ff
@ -2,7 +2,7 @@
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:local="clr-namespace:ModuleManager"
|
||||
StartupUri="MainWindow.xaml">
|
||||
StartupUri="Views/MainWindow.xaml">
|
||||
<Application.Resources>
|
||||
|
||||
</Application.Resources>
|
||||
|
@ -1,24 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Windows;
|
||||
|
||||
//Quinn Grafe Schnecken rennen.
|
||||
namespace ModuleManager;
|
||||
public partial class LogWindow : Window
|
||||
{
|
||||
public LogWindow(List<string> logText)
|
||||
{
|
||||
InitializeComponent();
|
||||
foreach (var s in logText)
|
||||
{
|
||||
LogBox.Text += s + Environment.NewLine;
|
||||
}
|
||||
}
|
||||
|
||||
public void AddLogEntry(string logEntry)
|
||||
{
|
||||
LogBox.Text += logEntry + Environment.NewLine;
|
||||
// Force scroll to the bottom
|
||||
LogBox.ScrollToEnd();
|
||||
}
|
||||
}
|
@ -1,417 +0,0 @@
|
||||
using System.Drawing;
|
||||
using System.Text;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
using file_finder__test;
|
||||
using ShadowStream;
|
||||
using ShadowStream.LogHelper;
|
||||
using ShadowStream.Obejeckte;
|
||||
using System.IO;
|
||||
using System.Threading;
|
||||
using ShadowStream.ObjecktForJason;
|
||||
using TagLib;
|
||||
using ShadowStream.Modules;
|
||||
using ShadowStream.ObjecktForJason;
|
||||
using LibVLCSharp.Shared;
|
||||
|
||||
|
||||
namespace ModuleManager;
|
||||
|
||||
/// <summary>
|
||||
/// Interaction logic for MainWindow.xaml
|
||||
/// </summary>
|
||||
//Quinn and Reda and Yazan
|
||||
public partial class MainWindow : Window
|
||||
{
|
||||
#region no dont cahnge
|
||||
|
||||
//adding base components used threw out the code
|
||||
private static LogHelper loghelper = new LogHelper();
|
||||
LogWindow log = new LogWindow(loghelper.GetEntries());
|
||||
|
||||
private Catagory Muvie = new Catagory("Muvie");
|
||||
private Catagory Serie = new Catagory("Serie");
|
||||
private Catagory Music = new Catagory("Music");
|
||||
private Catagory Photo = new Catagory("Photos");
|
||||
|
||||
List<string> suportedVidioFiles = new List<string>();
|
||||
List<string> suportedMusicFiles = new List<string>();
|
||||
List<string> suportedPhotoFiles = new List<string>();
|
||||
|
||||
//root directory
|
||||
List<string> dirs = new List<string>();
|
||||
private int option =2;
|
||||
int specificOption = 0;
|
||||
string rootPath = "F:/";
|
||||
|
||||
FileScanner fileScanner;
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region vlc logic
|
||||
|
||||
private LibVLC _libVLC;
|
||||
private LibVLCSharp.Shared.MediaPlayer _mediaPlayer;
|
||||
|
||||
#endregion
|
||||
//code start
|
||||
public MainWindow()
|
||||
{
|
||||
InitializeComponent();
|
||||
//Initialise but Hide
|
||||
log.Hide();
|
||||
|
||||
//this.Hide();
|
||||
|
||||
|
||||
#region vlc init
|
||||
|
||||
Core.Initialize(); // Important: load native libvlc binaries
|
||||
|
||||
_libVLC = new LibVLC();
|
||||
_mediaPlayer = new LibVLCSharp.Shared.MediaPlayer(_libVLC);
|
||||
|
||||
VideoView.MediaPlayer = _mediaPlayer;
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
//Begin Login Process
|
||||
var login = new LogIn();
|
||||
login.Show();
|
||||
|
||||
#region only exdend. no remuving of code
|
||||
|
||||
//adding all extensions... example values added
|
||||
suportedVidioFiles.Add(".mp4");
|
||||
suportedVidioFiles.Add(".mkv");
|
||||
suportedMusicFiles.Add(".wav");
|
||||
suportedMusicFiles.Add(".mp3");
|
||||
suportedPhotoFiles.Add(".jpg");
|
||||
Createscan();
|
||||
//dirs.Add("C:/");
|
||||
|
||||
//execute and wait for task completion
|
||||
var tmp = fileScanner.ScanAllDrivesAsync();
|
||||
|
||||
//load json parallel to finding drives
|
||||
//add code laiter
|
||||
|
||||
tmp.Wait();
|
||||
foreach (var VARIABLE in tmp.Result)
|
||||
{
|
||||
dirs.Add(VARIABLE);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
}
|
||||
|
||||
#region dont change
|
||||
|
||||
void Createscan()
|
||||
{
|
||||
//adding all string arrays to one temp array to do the initial scan of the designated drive
|
||||
int count = 0;
|
||||
string[] tmp = new string[suportedMusicFiles.Count + suportedVidioFiles.Count + suportedPhotoFiles.Count];
|
||||
foreach (var suportedVidioFile in suportedVidioFiles)
|
||||
{
|
||||
tmp[count] = suportedVidioFile;
|
||||
count++;
|
||||
}
|
||||
|
||||
foreach (var suportedMusicFile in suportedMusicFiles)
|
||||
{
|
||||
tmp[count] = suportedMusicFile;
|
||||
count++;
|
||||
}
|
||||
|
||||
foreach (var suportedPhotoFile in suportedPhotoFiles)
|
||||
{
|
||||
tmp[count] = suportedPhotoFile;
|
||||
count++;
|
||||
}
|
||||
//initialise the file scanner with all files endings wanted
|
||||
fileScanner = new FileScanner(tmp);
|
||||
}
|
||||
|
||||
|
||||
//btn logic
|
||||
|
||||
//example logoc to start vidio
|
||||
/*void Video_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
PlayVideo(@"F:\Rio.mp4");
|
||||
}*/
|
||||
public void PlayVideo(string filePath)
|
||||
{
|
||||
VideoView.Visibility = Visibility.Visible;
|
||||
|
||||
var media = new Media(_libVLC, filePath, FromType.FromPath);
|
||||
_mediaPlayer.Play(media);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
private async void scanButton_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
MessageBox.Show("scanning...");
|
||||
List<string> tmp = new List<string>();
|
||||
switch (option)
|
||||
{
|
||||
case 0:
|
||||
foreach (var VARIABLE in dirs)
|
||||
{
|
||||
foreach (var tmp2 in await fileScanner.ScanDriveParallel(VARIABLE))
|
||||
{
|
||||
tmp.Add(tmp2);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
foreach (var VARIABLE in await fileScanner.ScanDriveParallel(dirs[specificOption]))
|
||||
{
|
||||
tmp.Add(VARIABLE);
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
foreach (var VARIABLE in await fileScanner.ScanDriveParallel(rootPath))
|
||||
{
|
||||
tmp.Add(VARIABLE);
|
||||
}
|
||||
break;
|
||||
}
|
||||
Console.WriteLine($"Total scanned files: {tmp.Count}");
|
||||
|
||||
var classifier = new FileClassifier();
|
||||
var (musicFiles, videoFiles, photoFiles) = await classifier.ClassifyFilesAsync(tmp, suportedMusicFiles, suportedVidioFiles, suportedPhotoFiles);
|
||||
|
||||
var separator = new VideoSeparator();
|
||||
var (series, movies) = await separator.SeparateVideosAsync(videoFiles);
|
||||
|
||||
|
||||
Console.WriteLine($"musicFiles count: {musicFiles.Count}");
|
||||
Console.WriteLine($"videoFiles count: {videoFiles.Count}");
|
||||
Console.WriteLine($"photoFiles count: {photoFiles.Count}");
|
||||
Console.WriteLine($"series count: {series.Count}");
|
||||
Console.WriteLine($"movies count: {movies.Count}");
|
||||
|
||||
|
||||
videoFiles = null;
|
||||
|
||||
MessageBox.Show("files sorted");
|
||||
|
||||
// Prepare JSON lists
|
||||
List<locJason> muviesJS = new List<locJason>();
|
||||
List<locJason> seriesJS = new List<locJason>();
|
||||
List<locJason> photosJS = new List<locJason>();
|
||||
List<locJason> mucicJS = new List<locJason>();
|
||||
|
||||
JasonToString jasonToString = new JasonToString();
|
||||
|
||||
foreach (var VARIABLE in ItemCreater(movies, "Muvie", false))
|
||||
{
|
||||
Muvie.addItem(VARIABLE);
|
||||
muviesJS.Add(new locJason
|
||||
{
|
||||
path = VARIABLE.getLink(),
|
||||
imageData = jasonToString.BitmapToBase64String(BitmapImageToBitmap(VARIABLE.getImage())),
|
||||
type = VARIABLE.getType()
|
||||
});
|
||||
}
|
||||
foreach (var VARIABLE in ItemCreater(series, "Serie", false))
|
||||
{
|
||||
Serie.addItem(VARIABLE);
|
||||
seriesJS.Add(new locJason
|
||||
{
|
||||
path = VARIABLE.getLink(),
|
||||
imageData = jasonToString.BitmapToBase64String(BitmapImageToBitmap(VARIABLE.getImage())),
|
||||
type = VARIABLE.getType()
|
||||
});
|
||||
}
|
||||
foreach (var VARIABLE in ItemCreater(photoFiles, "Photo", true))
|
||||
{
|
||||
Photo.addItem(VARIABLE);
|
||||
photosJS.Add(new locJason
|
||||
{
|
||||
path = VARIABLE.getLink(),
|
||||
imageData = jasonToString.BitmapToBase64String(BitmapImageToBitmap(VARIABLE.getImage())),
|
||||
type = VARIABLE.getType()
|
||||
});
|
||||
}
|
||||
foreach (var VARIABLE in ItemCreater(musicFiles, "Music", false, true))
|
||||
{
|
||||
Music.addItem(VARIABLE);
|
||||
mucicJS.Add(new locJason
|
||||
{
|
||||
path = VARIABLE.getLink(),
|
||||
imageData = jasonToString.BitmapToBase64String(BitmapImageToBitmap(VARIABLE.getImage())),
|
||||
type = VARIABLE.getType()
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
MessageBox.Show("scan finished");
|
||||
|
||||
Jason_Writer jason_Writer = new Jason_Writer();
|
||||
List<Task> tasks = new List<Task>
|
||||
{
|
||||
jason_Writer.SaveList("Muvies", muviesJS),
|
||||
jason_Writer.SaveList("Series", seriesJS),
|
||||
jason_Writer.SaveList("Photos", photosJS),
|
||||
jason_Writer.SaveList("Music", mucicJS)
|
||||
};
|
||||
|
||||
await Task.WhenAll(tasks);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show($"An error occurred during scanning:\n\n{ex.ToString()}", "Error", MessageBoxButton.OK, MessageBoxImage.Error);
|
||||
Console.WriteLine($"An error occurred during scanning:\n\n{ex.ToString()}", "Error");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
List<Item> ItemCreater(List<string> path, string type,bool isFoto)
|
||||
{
|
||||
List<Item> items = new List<Item>();
|
||||
|
||||
foreach (var VARIABLE in path)
|
||||
{
|
||||
BitmapImage frame200;
|
||||
if(!isFoto)
|
||||
frame200 = VideoFrameExtractor.GetFrame200(VARIABLE);
|
||||
else
|
||||
{
|
||||
frame200 = new BitmapImage(new Uri(VARIABLE, UriKind.Absolute));
|
||||
}
|
||||
items.Add(new Item(VARIABLE, type,frame200, isFoto));
|
||||
}
|
||||
|
||||
return items;
|
||||
}
|
||||
|
||||
List<Item> ItemCreater(List<string> paths, string type, bool isFoto, bool Music)
|
||||
{
|
||||
List<Item> items = new List<Item>();
|
||||
|
||||
string baseDir = AppDomain.CurrentDomain.BaseDirectory;
|
||||
string imagePath = System.IO.Path.Combine(baseDir, "Pics", "MusicD.jpeg");
|
||||
|
||||
BitmapImage defaultImage;
|
||||
|
||||
if (System.IO.File.Exists(imagePath))
|
||||
{
|
||||
defaultImage = new BitmapImage(new Uri(imagePath));
|
||||
defaultImage.Freeze();
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show($"Default image not found at: {imagePath}");
|
||||
|
||||
// Create a blank 100x100 transparent BitmapImage fallback
|
||||
int width = 100;
|
||||
int height = 100;
|
||||
int dpi = 96;
|
||||
var pixelFormat = System.Windows.Media.PixelFormats.Pbgra32;
|
||||
int rawStride = (width * pixelFormat.BitsPerPixel + 7) / 8;
|
||||
byte[] rawImage = new byte[rawStride * height]; // all zero = transparent
|
||||
|
||||
var bitmap = BitmapSource.Create(width, height, dpi, dpi, pixelFormat, null, rawImage, rawStride);
|
||||
bitmap.Freeze();
|
||||
|
||||
defaultImage = new BitmapImage();
|
||||
// Can't cast BitmapSource directly to BitmapImage,
|
||||
// so let's use BitmapSource type instead in Item if possible
|
||||
// Otherwise, fallback to null or a resource image.
|
||||
// For now, assign null or handle in your Item class.
|
||||
defaultImage = null;
|
||||
}
|
||||
|
||||
foreach (var filePath in paths)
|
||||
{
|
||||
BitmapImage bitmapImage = defaultImage;
|
||||
|
||||
try
|
||||
{
|
||||
var file = TagLib.File.Create(filePath);
|
||||
if (file.Tag.Pictures.Length > 0)
|
||||
{
|
||||
var pic = file.Tag.Pictures[0];
|
||||
using (var ms = new MemoryStream(pic.Data.Data))
|
||||
{
|
||||
var img = new BitmapImage();
|
||||
img.BeginInit();
|
||||
img.CacheOption = BitmapCacheOption.OnLoad;
|
||||
img.StreamSource = ms;
|
||||
img.EndInit();
|
||||
img.Freeze();
|
||||
|
||||
bitmapImage = img;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
// keep defaultImage if anything fails
|
||||
}
|
||||
|
||||
items.Add(new Item(filePath, type, bitmapImage, isFoto));
|
||||
}
|
||||
|
||||
return items;
|
||||
}
|
||||
|
||||
public static BitmapImage ConvertBitmapToBitmapImage(System.Drawing.Bitmap bitmap)
|
||||
{
|
||||
using (var memory = new System.IO.MemoryStream())
|
||||
{
|
||||
bitmap.Save(memory, System.Drawing.Imaging.ImageFormat.Png);
|
||||
memory.Position = 0;
|
||||
|
||||
var bitmapImage = new BitmapImage();
|
||||
bitmapImage.BeginInit();
|
||||
bitmapImage.StreamSource = memory;
|
||||
bitmapImage.CacheOption = BitmapCacheOption.OnLoad;
|
||||
bitmapImage.EndInit();
|
||||
bitmapImage.Freeze(); // Optional: for thread safety
|
||||
|
||||
return bitmapImage;
|
||||
}
|
||||
}
|
||||
public static Bitmap BitmapImageToBitmap(BitmapImage bitmapImage)
|
||||
{
|
||||
using (MemoryStream ms = new MemoryStream())
|
||||
{
|
||||
// Encode BitmapImage to stream (e.g., PNG)
|
||||
BitmapEncoder encoder = new PngBitmapEncoder();
|
||||
encoder.Frames.Add(BitmapFrame.Create(bitmapImage));
|
||||
encoder.Save(ms);
|
||||
|
||||
ms.Seek(0, SeekOrigin.Begin); // Reset stream position
|
||||
|
||||
// Create Bitmap from stream
|
||||
return new Bitmap(ms);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//scan logic
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
@ -1,4 +1,5 @@
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Media;
|
||||
|
||||
namespace ShadowStream.Obejeckte;
|
||||
//Quinn
|
||||
@ -27,4 +28,14 @@ public class Catagory
|
||||
{
|
||||
return items;
|
||||
}
|
||||
|
||||
public void clear()
|
||||
{
|
||||
items.Clear();
|
||||
}
|
||||
|
||||
public void addItems(List<Item> items)
|
||||
{
|
||||
this.items.AddRange(items);
|
||||
}
|
||||
}
|
@ -1,5 +1,8 @@
|
||||
using System.IO;
|
||||
using System.Windows;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Media;
|
||||
|
||||
namespace ShadowStream.Obejeckte;
|
||||
//Quinn
|
||||
@ -14,28 +17,32 @@ public class Item
|
||||
bool isFoto;
|
||||
|
||||
//initilise the item
|
||||
public Item(string path, string type,BitmapImage image,bool isFoto)
|
||||
public Item(string path, string type, BitmapImage image, bool isFoto, RoutedEventHandler clickHandler = null)
|
||||
{
|
||||
this.path = path;
|
||||
this.type = type;
|
||||
this.name = new Label(){Name="name",Content = name};
|
||||
this.name = new Label()
|
||||
{
|
||||
Name = "name",
|
||||
Content = System.IO.Path.GetFileName(path),
|
||||
HorizontalAlignment = HorizontalAlignment.Center,
|
||||
Foreground = Brushes.White
|
||||
};
|
||||
this.image = image;
|
||||
this.playButton = new Button();
|
||||
playButton.Content = "Play";
|
||||
this.playButton = new Button
|
||||
{
|
||||
Content = isFoto ? "Show" : "Play",
|
||||
HorizontalAlignment = HorizontalAlignment.Center,
|
||||
Tag = path // Store path or any identifier
|
||||
};
|
||||
|
||||
if (clickHandler != null)
|
||||
playButton.Click += clickHandler;
|
||||
|
||||
this.isFoto = isFoto;
|
||||
}
|
||||
//return the entire item so it can be displaid direckly
|
||||
public (Label ,string,Button,BitmapImage,DockPanel) CreateLable(int[] gridPosition, Grid grid)
|
||||
{
|
||||
DockPanel dockPanel = new DockPanel();
|
||||
DockPanel.SetDock(name, Dock.Top);
|
||||
dockPanel.Children.Add(name);
|
||||
dockPanel.Children.Add(playButton);
|
||||
if (isFoto){
|
||||
playButton.Content = "Show";
|
||||
}
|
||||
return (name,path,playButton,image,dockPanel);
|
||||
}
|
||||
|
||||
|
||||
|
||||
//return individual data
|
||||
public string getLink()
|
||||
|
42
ShadowStream/Modules/ObjecktForJason/BitmapConversions.cs
Normal file
42
ShadowStream/Modules/ObjecktForJason/BitmapConversions.cs
Normal file
@ -0,0 +1,42 @@
|
||||
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Windows.Media.Imaging;
|
||||
|
||||
namespace ShadowStream.Modules;
|
||||
|
||||
public class BitmapConversions
|
||||
{
|
||||
public static BitmapImage BitmapToBitmapImage(System.Drawing.Bitmap bitmap)
|
||||
{
|
||||
using (var memory = new System.IO.MemoryStream())
|
||||
{
|
||||
bitmap.Save(memory, System.Drawing.Imaging.ImageFormat.Png);
|
||||
memory.Position = 0;
|
||||
|
||||
var bitmapImage = new BitmapImage();
|
||||
bitmapImage.BeginInit();
|
||||
bitmapImage.StreamSource = memory;
|
||||
bitmapImage.CacheOption = BitmapCacheOption.OnLoad;
|
||||
bitmapImage.EndInit();
|
||||
bitmapImage.Freeze(); // Optional: for thread safety
|
||||
|
||||
return bitmapImage;
|
||||
}
|
||||
}
|
||||
public static Bitmap BitmapImageToBitmap(BitmapImage bitmapImage)
|
||||
{
|
||||
using (MemoryStream ms = new MemoryStream())
|
||||
{
|
||||
// Encode BitmapImage to stream (e.g., PNG)
|
||||
BitmapEncoder encoder = new PngBitmapEncoder();
|
||||
encoder.Frames.Add(BitmapFrame.Create(bitmapImage));
|
||||
encoder.Save(ms);
|
||||
|
||||
ms.Seek(0, SeekOrigin.Begin); // Reset stream position
|
||||
|
||||
// Create Bitmap from stream
|
||||
return new Bitmap(ms);
|
||||
}
|
||||
}
|
||||
}
|
@ -37,14 +37,14 @@ public class Jason_Writer
|
||||
|
||||
|
||||
// Load one list of locJason objects from JSON file with given name
|
||||
public List<locJason> LoadList(string listName)
|
||||
public async Task<List<locJason>> LoadListAsync(string listName)
|
||||
{
|
||||
string filePath = Path.Combine(_folderPath, $"{listName}.json");
|
||||
|
||||
if (!File.Exists(filePath))
|
||||
return new List<locJason>(); // Return empty list if file doesn't exist
|
||||
return new List<locJason>();
|
||||
|
||||
string jsonString = File.ReadAllText(filePath);
|
||||
string jsonString = await File.ReadAllTextAsync(filePath);
|
||||
return JsonConvert.DeserializeObject<List<locJason>>(jsonString) ?? new List<locJason>();
|
||||
}
|
||||
|
||||
|
@ -4,6 +4,7 @@ using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Media.Imaging;
|
||||
using LibVLCSharp.Shared;
|
||||
using ModuleManager;
|
||||
|
||||
public static class VideoFrameExtractor
|
||||
{
|
||||
@ -71,10 +72,19 @@ public static class VideoFrameExtractor
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine($"Error loading snapshot image from {path}: {ex}");
|
||||
foreach (System.Windows.Window window in System.Windows.Application.Current.Windows)
|
||||
{
|
||||
if (window.IsActive && window is MainWindow mainWindow)
|
||||
{
|
||||
mainWindow.ReciveErrorLog($"Error loading snapshot image from {path}: {ex}");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
throw new Exception("Failed to load snapshot image.", ex);
|
||||
}
|
||||
|
||||
|
||||
// Async delayed delete of temp snapshot file (after 1 minute)
|
||||
DeleteFileLaterAsync(path);
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||
<security>
|
||||
<requestedPrivileges>
|
||||
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
|
||||
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
|
||||
</requestedPrivileges>
|
||||
</security>
|
||||
</trustInfo>
|
@ -1,13 +1,19 @@
|
||||
<!-- Quinn Grafe Schencken rennen-->
|
||||
<!-- Quinn Grafe Schencken rennen -->
|
||||
<Window x:Class="ModuleManager.LogWindow"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:ModuleManager"
|
||||
mc:Ignorable="d"
|
||||
Title="LogWindow" Height="450" Width="800">
|
||||
<Grid>
|
||||
<TextBox Foreground="Gray" Background="Black" FontFamily="consolas" Name="LogBox" IsReadOnly="True"></TextBox>
|
||||
<TextBox x:Name="LogBox"
|
||||
Foreground="Gray"
|
||||
Background="Black"
|
||||
FontFamily="Consolas"
|
||||
IsReadOnly="True"
|
||||
VerticalScrollBarVisibility="Auto"
|
||||
TextWrapping="Wrap"
|
||||
AcceptsReturn="True" />
|
||||
</Grid>
|
||||
</Window>
|
||||
</Window>
|
24
ShadowStream/Resources/LogHelper/LogWindow.xaml.cs
Normal file
24
ShadowStream/Resources/LogHelper/LogWindow.xaml.cs
Normal file
@ -0,0 +1,24 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Windows;
|
||||
|
||||
namespace ModuleManager
|
||||
{
|
||||
public partial class LogWindow : Window
|
||||
{
|
||||
public LogWindow(List<string> logText)
|
||||
{
|
||||
InitializeComponent();
|
||||
foreach (var s in logText)
|
||||
{
|
||||
LogBox.Text += s + Environment.NewLine;
|
||||
}
|
||||
}
|
||||
|
||||
public void AddLogEntry(string logEntry)
|
||||
{
|
||||
LogBox.Text += logEntry + Environment.NewLine;
|
||||
LogBox.ScrollToEnd();
|
||||
}
|
||||
}
|
||||
}
|
Before Width: | Height: | Size: 8.6 KiB After Width: | Height: | Size: 8.6 KiB |
@ -10,7 +10,7 @@
|
||||
<RootNamespace>ShadowStream</RootNamespace>
|
||||
|
||||
<!-- Add this line to specify the manifest file -->
|
||||
<ApplicationManifest>app.manifest</ApplicationManifest>
|
||||
<ApplicationManifest>Propertis\app.manifest</ApplicationManifest>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
@ -29,9 +29,31 @@
|
||||
|
||||
<ItemGroup>
|
||||
<None Remove="Pics\MusicD.jpeg" />
|
||||
<EmbeddedResource Include="Pics\MusicD.jpeg">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Page Update="Views\LogIn.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<XamlRuntime>Wpf</XamlRuntime>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Update="Views\MainWindow.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<XamlRuntime>Wpf</XamlRuntime>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Update="Resources\LogHelper\LogWindow.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="Resources\" />
|
||||
<Folder Include="ViewModels\" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Resources\Pics\MusicD.jpeg" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
@ -56,10 +56,10 @@
|
||||
Grid.Column="0"
|
||||
Background="#222"
|
||||
VerticalAlignment="Stretch">
|
||||
<Button Content="Home" Height="60" Foreground="White" Background="Transparent"/>
|
||||
<Button Content="Musik" Height="60" Foreground="White" Background="Transparent"/>
|
||||
<Button Content="Photos" Height="60" Foreground="White" Background="Transparent"/>
|
||||
<Button Content="Video" Height="60" Foreground="White" Background="Transparent" />
|
||||
<Button Content="Home" Height="60" Foreground="White" Background="Transparent" Click="Close_Player"/>
|
||||
<Button Content="Musik" Height="60" Foreground="White" Background="Transparent" Click="Close_Player"/>
|
||||
<Button Content="Photos" Height="60" Foreground="White" Background="Transparent" Click="Close_Player"/>
|
||||
<Button Content="Video" Height="60" Foreground="White" Background="Transparent" Click="Close_Player" />
|
||||
</StackPanel>
|
||||
|
||||
<!-- MAIN CONTENT WRAPPED IN A GRID FOR LAYERING -->
|
||||
@ -69,7 +69,7 @@
|
||||
<StackPanel Margin="10">
|
||||
<!-- Favorites -->
|
||||
<TextBlock Text="Favorites" FontSize="18" Foreground="White" Margin="0,10"/>
|
||||
<WrapPanel>
|
||||
<WrapPanel Name="Favorites_Home">
|
||||
<Rectangle Fill="LightBlue" Width="150" Height="100" Margin="5"/>
|
||||
<Rectangle Fill="LightBlue" Width="150" Height="100" Margin="5"/>
|
||||
<Rectangle Fill="LightBlue" Width="150" Height="100" Margin="5"/>
|
||||
@ -78,7 +78,16 @@
|
||||
|
||||
<!-- Movies -->
|
||||
<TextBlock Text="Movies" FontSize="18" Foreground="White" Margin="0,20,0,10"/>
|
||||
<WrapPanel>
|
||||
<WrapPanel Name="Muvies_Home">
|
||||
<Rectangle Fill="LightGreen" Width="150" Height="100" Margin="5"/>
|
||||
<Rectangle Fill="LightGreen" Width="150" Height="100" Margin="5"/>
|
||||
<Rectangle Fill="LightGreen" Width="150" Height="100" Margin="5"/>
|
||||
<Rectangle Fill="LightGreen" Width="150" Height="100" Margin="5"/>
|
||||
</WrapPanel>
|
||||
|
||||
<!-- Series -->
|
||||
<TextBlock Text="Series" FontSize="18" Foreground="White" Margin="0,20,0,10"/>
|
||||
<WrapPanel Name="Series_Home">
|
||||
<Rectangle Fill="LightGreen" Width="150" Height="100" Margin="5"/>
|
||||
<Rectangle Fill="LightGreen" Width="150" Height="100" Margin="5"/>
|
||||
<Rectangle Fill="LightGreen" Width="150" Height="100" Margin="5"/>
|
||||
@ -87,12 +96,21 @@
|
||||
|
||||
<!-- Music -->
|
||||
<TextBlock Text="Music" FontSize="18" Foreground="White" Margin="0,20,0,10"/>
|
||||
<WrapPanel>
|
||||
<WrapPanel Name="Music_Home">
|
||||
<Rectangle Fill="LightCoral" Width="150" Height="100" Margin="5"/>
|
||||
<Rectangle Fill="LightCoral" Width="150" Height="100" Margin="5"/>
|
||||
<Rectangle Fill="LightCoral" Width="150" Height="100" Margin="5"/>
|
||||
<Rectangle Fill="LightCoral" Width="150" Height="100" Margin="5"/>
|
||||
</WrapPanel>
|
||||
|
||||
<!-- Photos -->
|
||||
<TextBlock Text="Photos" FontSize="18" Foreground="White" Margin="0,20,0,10"/>
|
||||
<WrapPanel Name="Photos_Home">
|
||||
<Rectangle Fill="DarkRed" Width="150" Height="100" Margin="5"/>
|
||||
<Rectangle Fill="DarkRed" Width="150" Height="100" Margin="5"/>
|
||||
<Rectangle Fill="DarkRed" Width="150" Height="100" Margin="5"/>
|
||||
<Rectangle Fill="DarkRed" Width="150" Height="100" Margin="5"/>
|
||||
</WrapPanel>
|
||||
</StackPanel>
|
||||
</ScrollViewer>
|
||||
|
624
ShadowStream/Views/MainWindow.xaml.cs
Normal file
624
ShadowStream/Views/MainWindow.xaml.cs
Normal file
@ -0,0 +1,624 @@
|
||||
using System.Drawing;
|
||||
using System.Text;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
using file_finder__test;
|
||||
using ShadowStream;
|
||||
using ShadowStream.LogHelper;
|
||||
using ShadowStream.Obejeckte;
|
||||
using System.IO;
|
||||
using System.Threading;
|
||||
using ShadowStream.ObjecktForJason;
|
||||
using TagLib;
|
||||
using ShadowStream.Modules;
|
||||
using ShadowStream.ObjecktForJason;
|
||||
using LibVLCSharp.Shared;
|
||||
using Brushes = System.Windows.Media.Brushes;
|
||||
using Color = System.Windows.Media.Color;
|
||||
using File = System.IO.File;
|
||||
using Image = System.Drawing.Image;
|
||||
using Path = System.IO.Path;
|
||||
|
||||
|
||||
namespace ModuleManager;
|
||||
|
||||
/// <summary>
|
||||
/// Interaction logic for MainWindow.xaml
|
||||
/// </summary>
|
||||
//Quinn and Reda and Yazan
|
||||
public partial class MainWindow : Window
|
||||
{ //quinn
|
||||
#region no dont cahnge
|
||||
|
||||
//adding base components used threw out the code
|
||||
private static LogHelper loghelper = new LogHelper();
|
||||
LogWindow logWin = new LogWindow(loghelper.GetEntries());
|
||||
LogHelper log = new LogHelper();
|
||||
|
||||
private Catagory Muvie = new Catagory("Muvie");
|
||||
private Catagory Serie = new Catagory("Serie");
|
||||
private Catagory Music = new Catagory("Music");
|
||||
private Catagory Photo = new Catagory("Photos");
|
||||
|
||||
List<string> suportedVidioFiles = new List<string>();
|
||||
List<string> suportedMusicFiles = new List<string>();
|
||||
List<string> suportedPhotoFiles = new List<string>();
|
||||
|
||||
//root directory
|
||||
List<string> dirs = new List<string>();
|
||||
private int option =2;
|
||||
int specificOption = 0;
|
||||
string rootPath = "F:/";
|
||||
|
||||
FileScanner fileScanner;
|
||||
|
||||
#endregion
|
||||
|
||||
//Quinn
|
||||
#region vlc logic
|
||||
|
||||
private LibVLC _libVLC;
|
||||
private LibVLCSharp.Shared.MediaPlayer _mediaPlayer;
|
||||
|
||||
#endregion
|
||||
//code start
|
||||
public MainWindow()
|
||||
{
|
||||
#region Init wpf
|
||||
|
||||
InitializeComponent();
|
||||
//Initialise but Hide
|
||||
logWin.Hide();
|
||||
//this.Hide();
|
||||
|
||||
|
||||
//Begin Login Process
|
||||
var login = new LogIn();
|
||||
login.Show();
|
||||
|
||||
#endregion
|
||||
|
||||
//Quinn Dont change or remuve!!!
|
||||
#region vlc init
|
||||
|
||||
Core.Initialize(); // Important: load native libvlc binaries
|
||||
|
||||
_libVLC = new LibVLC();
|
||||
_mediaPlayer = new LibVLCSharp.Shared.MediaPlayer(_libVLC);
|
||||
|
||||
VideoView.MediaPlayer = _mediaPlayer;
|
||||
|
||||
#endregion
|
||||
|
||||
#region only exdend. no remuving of code
|
||||
|
||||
//adding all extensions... example values added
|
||||
suportedVidioFiles.Add(".mp4");
|
||||
suportedVidioFiles.Add(".mkv");
|
||||
suportedMusicFiles.Add(".wav");
|
||||
suportedMusicFiles.Add(".mp3");
|
||||
suportedPhotoFiles.Add(".jpg");
|
||||
Createscan();
|
||||
//dirs.Add("C:/");
|
||||
|
||||
//execute and wait for task completion
|
||||
var tmp = fileScanner.ScanAllDrivesAsync();
|
||||
|
||||
//load json parallel to finding drives
|
||||
//add code laiter
|
||||
|
||||
tmp.Wait();
|
||||
foreach (var VARIABLE in tmp.Result)
|
||||
{
|
||||
dirs.Add(VARIABLE);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
LoadSavedData();
|
||||
|
||||
}
|
||||
//Quinn
|
||||
#region dont change
|
||||
//reminder to self. if issue acures. check if anyone changed folder names
|
||||
|
||||
#region ScannLogic
|
||||
|
||||
void Createscan()
|
||||
{
|
||||
//adding all string arrays to one temp array to do the initial scan of the designated drive
|
||||
int count = 0;
|
||||
string[] tmp = new string[suportedMusicFiles.Count + suportedVidioFiles.Count + suportedPhotoFiles.Count];
|
||||
foreach (var suportedVidioFile in suportedVidioFiles)
|
||||
{
|
||||
tmp[count] = suportedVidioFile;
|
||||
count++;
|
||||
}
|
||||
|
||||
foreach (var suportedMusicFile in suportedMusicFiles)
|
||||
{
|
||||
tmp[count] = suportedMusicFile;
|
||||
count++;
|
||||
}
|
||||
|
||||
foreach (var suportedPhotoFile in suportedPhotoFiles)
|
||||
{
|
||||
tmp[count] = suportedPhotoFile;
|
||||
count++;
|
||||
}
|
||||
//initialise the file scanner with all files endings wanted
|
||||
fileScanner = new FileScanner(tmp);
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
#region Click Methods
|
||||
|
||||
private void OnItemPlayButtonClick(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (sender is Button btn && btn.Tag is string filePath)
|
||||
{
|
||||
if (filePath.EndsWith(".jpg") || filePath.EndsWith(".png"))
|
||||
{
|
||||
ShowImageWithVLC(filePath); // you'd implement this
|
||||
}
|
||||
else
|
||||
{
|
||||
PlayVideo(filePath);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void Close_Player(object sender, RoutedEventArgs e)
|
||||
{
|
||||
_mediaPlayer.Stop();
|
||||
VideoView.Visibility = Visibility.Collapsed;
|
||||
}
|
||||
|
||||
void Video_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
PlayVideo(@"F:\Rio.mp4");
|
||||
}
|
||||
private async void scanButton_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
Muvie.clear();
|
||||
Serie.clear();
|
||||
Music.clear();
|
||||
Photo.clear();
|
||||
log.Log("Scanning files...");
|
||||
List<string> tmp = new List<string>();
|
||||
switch (option)
|
||||
{
|
||||
case 0:
|
||||
foreach (var VARIABLE in dirs)
|
||||
{
|
||||
foreach (var tmp2 in await fileScanner.ScanDriveParallel(VARIABLE))
|
||||
{
|
||||
tmp.Add(tmp2);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
foreach (var VARIABLE in await fileScanner.ScanDriveParallel(dirs[specificOption]))
|
||||
{
|
||||
tmp.Add(VARIABLE);
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
foreach (var VARIABLE in await fileScanner.ScanDriveParallel(rootPath))
|
||||
{
|
||||
tmp.Add(VARIABLE);
|
||||
}
|
||||
break;
|
||||
}
|
||||
log.Log($"Total scanned files: {tmp.Count}");
|
||||
|
||||
var classifier = new FileClassifier();
|
||||
var (musicFiles, videoFiles, photoFiles) = await classifier.ClassifyFilesAsync(tmp, suportedMusicFiles, suportedVidioFiles, suportedPhotoFiles);
|
||||
|
||||
var separator = new VideoSeparator();
|
||||
var (series, movies) = await separator.SeparateVideosAsync(videoFiles);
|
||||
|
||||
|
||||
log.Log($"musicFiles count: {musicFiles.Count}");
|
||||
log.Log($"videoFiles count: {videoFiles.Count}");
|
||||
log.Log($"photoFiles count: {photoFiles.Count}");
|
||||
log.Log($"series count: {series.Count}");
|
||||
log.Log($"movies count: {movies.Count}");
|
||||
|
||||
|
||||
videoFiles = null;
|
||||
|
||||
log.Log("files sorted");
|
||||
|
||||
// Prepare JSON lists
|
||||
List<locJason> muviesJS = new List<locJason>();
|
||||
List<locJason> seriesJS = new List<locJason>();
|
||||
List<locJason> photosJS = new List<locJason>();
|
||||
List<locJason> mucicJS = new List<locJason>();
|
||||
|
||||
JasonToString jasonToString = new JasonToString();
|
||||
|
||||
foreach (var VARIABLE in ItemCreater(movies, "Muvie", false))
|
||||
{
|
||||
Muvie.addItem(VARIABLE);
|
||||
muviesJS.Add(new locJason
|
||||
{
|
||||
path = VARIABLE.getLink(),
|
||||
imageData = jasonToString.BitmapToBase64String(BitmapConversions.BitmapImageToBitmap(VARIABLE.getImage())),
|
||||
type = VARIABLE.getType()
|
||||
});
|
||||
}
|
||||
foreach (var VARIABLE in ItemCreater(series, "Serie", false))
|
||||
{
|
||||
Serie.addItem(VARIABLE);
|
||||
seriesJS.Add(new locJason
|
||||
{
|
||||
path = VARIABLE.getLink(),
|
||||
imageData = jasonToString.BitmapToBase64String(BitmapConversions.BitmapImageToBitmap(VARIABLE.getImage())),
|
||||
type = VARIABLE.getType()
|
||||
});
|
||||
}
|
||||
foreach (var VARIABLE in ItemCreater(photoFiles, "Photo", true))
|
||||
{
|
||||
Photo.addItem(VARIABLE);
|
||||
photosJS.Add(new locJason
|
||||
{
|
||||
path = VARIABLE.getLink(),
|
||||
imageData = jasonToString.BitmapToBase64String(BitmapConversions.BitmapImageToBitmap(VARIABLE.getImage())),
|
||||
type = VARIABLE.getType()
|
||||
});
|
||||
}
|
||||
foreach (var VARIABLE in ItemCreater(musicFiles, "Music", false, true))
|
||||
{
|
||||
Music.addItem(VARIABLE);
|
||||
mucicJS.Add(new locJason
|
||||
{
|
||||
path = VARIABLE.getLink(),
|
||||
imageData = jasonToString.BitmapToBase64String(BitmapConversions.BitmapImageToBitmap(VARIABLE.getImage())),
|
||||
type = VARIABLE.getType()
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
log.Log("scan finished");
|
||||
|
||||
Jason_Writer jason_Writer = new Jason_Writer();
|
||||
List<Task> tasks = new List<Task>
|
||||
{
|
||||
jason_Writer.SaveList("Muvies", muviesJS),
|
||||
jason_Writer.SaveList("Series", seriesJS),
|
||||
jason_Writer.SaveList("Photos", photosJS),
|
||||
jason_Writer.SaveList("Music", mucicJS)
|
||||
};
|
||||
|
||||
await Task.WhenAll(tasks);
|
||||
mucicJS = null;
|
||||
seriesJS = null;
|
||||
photosJS = null;
|
||||
MenueItems();
|
||||
MessageBox.Show("Scan finished");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show($"An error occurred during scanning:\n\n{ex.ToString()}", "Error", MessageBoxButton.OK, MessageBoxImage.Error);
|
||||
log.Error($"An error occurred during scanning:\n\n{ex.ToString()}");
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region itemCreation
|
||||
|
||||
List<Item> ItemCreater(List<string> path, string type,bool isFoto)
|
||||
{
|
||||
List<Item> items = new List<Item>();
|
||||
|
||||
foreach (var VARIABLE in path)
|
||||
{
|
||||
BitmapImage frame200;
|
||||
if(!isFoto)
|
||||
frame200 = VideoFrameExtractor.GetFrame200(VARIABLE);
|
||||
else
|
||||
{
|
||||
frame200 = new BitmapImage(new Uri(VARIABLE, UriKind.Absolute));
|
||||
}
|
||||
items.Add(new Item(VARIABLE, type,frame200, isFoto,OnItemPlayButtonClick));
|
||||
}
|
||||
|
||||
return items;
|
||||
}
|
||||
|
||||
List<Item> ItemCreater(List<string> paths, string type, bool isFoto, bool Music)
|
||||
{
|
||||
List<Item> items = new List<Item>();
|
||||
|
||||
string baseDir = AppDomain.CurrentDomain.BaseDirectory;
|
||||
string imagePath = Path.Combine(baseDir,"Resources", "Pics", "MusicD.jpeg");
|
||||
|
||||
BitmapImage defaultImage;
|
||||
|
||||
if (File.Exists(imagePath))
|
||||
{
|
||||
defaultImage = new BitmapImage(new Uri(imagePath));
|
||||
defaultImage.Freeze();
|
||||
}
|
||||
else
|
||||
{
|
||||
//this case schould never be called. its to prevent code from breaking because of unautorised muving of musicD!!
|
||||
MessageBox.Show($"Default image not found at: {imagePath}");
|
||||
|
||||
// Create a blank 100x100 transparent BitmapImage fallback
|
||||
int width = 100;
|
||||
int height = 100;
|
||||
int dpi = 96;
|
||||
var pixelFormat = PixelFormats.Pbgra32;
|
||||
int rawStride = (width * pixelFormat.BitsPerPixel + 7) / 8;
|
||||
byte[] rawImage = new byte[rawStride * height]; // all zero = transparent
|
||||
|
||||
var bitmap = BitmapSource.Create(width, height, dpi, dpi, pixelFormat, null, rawImage, rawStride);
|
||||
bitmap.Freeze();
|
||||
|
||||
defaultImage = new BitmapImage();
|
||||
defaultImage = null;
|
||||
}
|
||||
|
||||
foreach (var filePath in paths)
|
||||
{
|
||||
BitmapImage bitmapImage = defaultImage;
|
||||
|
||||
try
|
||||
{
|
||||
var file = TagLib.File.Create(filePath);
|
||||
if (file.Tag.Pictures.Length > 0)
|
||||
{
|
||||
var pic = file.Tag.Pictures[0];
|
||||
using (var ms = new MemoryStream(pic.Data.Data))
|
||||
{
|
||||
var img = new BitmapImage();
|
||||
img.BeginInit();
|
||||
img.CacheOption = BitmapCacheOption.OnLoad;
|
||||
img.StreamSource = ms;
|
||||
img.EndInit();
|
||||
img.Freeze();
|
||||
|
||||
bitmapImage = img;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
// keep defaultImage if anything fails
|
||||
}
|
||||
|
||||
items.Add(new Item(filePath, type, bitmapImage, isFoto,OnItemPlayButtonClick));
|
||||
}
|
||||
|
||||
return items;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Comunication
|
||||
public void ReciveErrorLog(string logMessage)
|
||||
{
|
||||
log.Error(logMessage);
|
||||
}
|
||||
public void PlayVideo(string filePath)
|
||||
{
|
||||
if(suportedVidioFiles.Contains(Path.GetExtension(filePath)))
|
||||
VideoView.Visibility = Visibility.Visible;
|
||||
var media = new Media(_libVLC, filePath, FromType.FromPath);
|
||||
_mediaPlayer.Play(media);
|
||||
}
|
||||
|
||||
public void ShowImageWithVLC(string filePath)
|
||||
{
|
||||
if (File.Exists(filePath))
|
||||
{
|
||||
VideoView.Visibility = Visibility.Visible;
|
||||
var media = new Media(_libVLC, filePath, FromType.FromPath);
|
||||
_mediaPlayer.Play(media);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
|
||||
#region HomeMenue
|
||||
|
||||
void MenueItems()
|
||||
{
|
||||
PopulatePanelWithItems(Muvie.getAllItems(), Muvies_Home);
|
||||
PopulatePanelWithItems(Serie.getAllItems(), Series_Home);
|
||||
PopulatePanelWithItems(Photo.getAllItems(), Photos_Home);
|
||||
PopulatePanelWithItems(Music.getAllItems(), Music_Home);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region PanelPop
|
||||
|
||||
private void PopulatePanelWithItems(List<Item> items, Panel targetPanel)
|
||||
{
|
||||
targetPanel.Children.Clear();
|
||||
|
||||
foreach (var item in items)
|
||||
{
|
||||
var name = item.getName();
|
||||
var image = item.getImage();
|
||||
var isFoto = item.getType() == "Photo";
|
||||
var path = item.getLink();
|
||||
var buttonText = isFoto ? "Show" : "Play";
|
||||
|
||||
if (image == null)
|
||||
continue; // Skip if image is not available
|
||||
|
||||
// Container for stacking label, image, and button
|
||||
var container = new Grid
|
||||
{
|
||||
Width = 150,
|
||||
Height = 120,
|
||||
Margin = new Thickness(5)
|
||||
};
|
||||
|
||||
// Define rows for layout
|
||||
container.RowDefinitions.Add(new RowDefinition { Height = new GridLength(1, GridUnitType.Star) }); // Image
|
||||
container.RowDefinitions.Add(new RowDefinition { Height = new GridLength(30) }); // Button
|
||||
|
||||
// Image
|
||||
var imgControl = new System.Windows.Controls.Image
|
||||
{
|
||||
Source = image,
|
||||
Width = 150,
|
||||
Height = 90,
|
||||
Stretch = Stretch.UniformToFill
|
||||
};
|
||||
|
||||
Grid.SetRow(imgControl, 0);
|
||||
container.Children.Add(imgControl);
|
||||
|
||||
// Label (overlays top-left, optional)
|
||||
var label = new Label
|
||||
{
|
||||
Content = name,
|
||||
HorizontalAlignment = HorizontalAlignment.Left,
|
||||
VerticalAlignment = VerticalAlignment.Top,
|
||||
Background = new SolidColorBrush(Color.FromArgb(180, 0, 0, 0)),
|
||||
Foreground = Brushes.White,
|
||||
Padding = new Thickness(4),
|
||||
FontSize = 12
|
||||
};
|
||||
Grid.SetRow(label, 0);
|
||||
container.Children.Add(label);
|
||||
|
||||
// Button
|
||||
var btn = new Button
|
||||
{
|
||||
Content = buttonText,
|
||||
Height = 25,
|
||||
Width = 140,
|
||||
HorizontalAlignment = HorizontalAlignment.Center,
|
||||
VerticalAlignment = VerticalAlignment.Center,
|
||||
Margin = new Thickness(0, 0, 0, 5)
|
||||
};
|
||||
btn.Click += (s, e) => PlayVideo(path);
|
||||
Grid.SetRow(btn, 1);
|
||||
container.Children.Add(btn);
|
||||
|
||||
// Add to target UI panel
|
||||
targetPanel.Children.Add(container);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
#region load saved data
|
||||
|
||||
private async void LoadSavedData()
|
||||
{
|
||||
try
|
||||
{
|
||||
Jason_Writer jason_Writer = new Jason_Writer(); // Use default "Temp Data" folder
|
||||
JasonToString jasonToString = new JasonToString();
|
||||
|
||||
var muvies = await jason_Writer.LoadListAsync("Muvies");
|
||||
var series = await jason_Writer.LoadListAsync("Series");
|
||||
var photos = await jason_Writer.LoadListAsync("Photos");
|
||||
var music = await jason_Writer.LoadListAsync("Music");
|
||||
|
||||
List<Item> MuvieItems = CreateItemsFromJson(muvies);
|
||||
List<Item> SerieItems = CreateItemsFromJson(series);
|
||||
List<Item> PhotoItems = CreateItemsFromJson(photos, isPhoto: true);
|
||||
List<Item> MusicItems = CreateItemsFromJson(music, isPhoto: false, isMusic: true);
|
||||
|
||||
Muvie.addItems(MuvieItems);
|
||||
Serie.addItems(SerieItems);
|
||||
Photo.addItems(PhotoItems);
|
||||
Music.addItems(MusicItems);
|
||||
|
||||
MenueItems(); // Re-populate the UI
|
||||
|
||||
log.Log("Loaded saved data from JSON.");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show($"Failed to load saved data:\n{ex.Message}", "Error", MessageBoxButton.OK, MessageBoxImage.Error);
|
||||
log.Error($"LoadSavedData error: {ex}");
|
||||
}
|
||||
}
|
||||
private List<Item> CreateItemsFromJson(List<locJason> jsonItems)
|
||||
{
|
||||
return CreateItemsFromJson(jsonItems, isPhoto: false, isMusic: false);
|
||||
}
|
||||
|
||||
private List<Item> CreateItemsFromJson(List<locJason> jsonItems, bool isPhoto)
|
||||
{
|
||||
return CreateItemsFromJson(jsonItems, isPhoto, isMusic: false);
|
||||
}
|
||||
|
||||
private List<Item> CreateItemsFromJson(List<locJason> jsonItems, bool isPhoto, bool isMusic)
|
||||
{
|
||||
List<Item> items = new List<Item>();
|
||||
JasonToString jasonToString = new JasonToString();
|
||||
|
||||
foreach (var loc in jsonItems)
|
||||
{
|
||||
BitmapImage bitmapImage = null;
|
||||
|
||||
try
|
||||
{
|
||||
if (!string.IsNullOrEmpty(loc.imageData))
|
||||
{
|
||||
bitmapImage = BitmapConversions.BitmapToBitmapImage(
|
||||
jasonToString.Base64StringToBitmap(loc.imageData)
|
||||
);
|
||||
}
|
||||
else if (isMusic)
|
||||
{
|
||||
string defaultImagePath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Resources", "Pics", "MusicD.jpeg");
|
||||
if (File.Exists(defaultImagePath))
|
||||
{
|
||||
bitmapImage = new BitmapImage(new Uri(defaultImagePath));
|
||||
bitmapImage.Freeze();
|
||||
}
|
||||
}
|
||||
else if (isPhoto && File.Exists(loc.path))
|
||||
{
|
||||
bitmapImage = new BitmapImage(new Uri(loc.path));
|
||||
bitmapImage.Freeze();
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
// Handle any corrupt or missing image cases
|
||||
}
|
||||
|
||||
items.Add(new Item(loc.path, loc.type, bitmapImage, isPhoto, OnItemPlayButtonClick));
|
||||
}
|
||||
|
||||
return items;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
Binary file not shown.
Before Width: | Height: | Size: 8.6 KiB |
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,4 +1,4 @@
|
||||
#pragma checksum "..\..\..\App.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "BBE033CE95728FB879F1DFB16BACEF5427F444C0"
|
||||
#pragma checksum "..\..\..\App.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "96A9FA6C989AD17E1C1CD819B3BDD897F7709830"
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
@ -48,7 +48,7 @@ namespace ModuleManager {
|
||||
public void InitializeComponent() {
|
||||
|
||||
#line 5 "..\..\..\App.xaml"
|
||||
this.StartupUri = new System.Uri("MainWindow.xaml", System.UriKind.Relative);
|
||||
this.StartupUri = new System.Uri("Views/MainWindow.xaml", System.UriKind.Relative);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
Binary file not shown.
Binary file not shown.
@ -1,4 +1,4 @@
|
||||
#pragma checksum "..\..\..\..\LogHelper\LogWindow.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "3D34AADB0C324304950678A2859D3F2187EFDBB4"
|
||||
#pragma checksum "..\..\..\..\..\Resources\LogHelper\LogWindow.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "DFDFD7DC1DFC838998FE572CA9751B51FEDD076E"
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
@ -8,7 +8,6 @@
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using ModuleManager;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Windows;
|
||||
@ -41,7 +40,7 @@ namespace ModuleManager {
|
||||
public partial class LogWindow : System.Windows.Window, System.Windows.Markup.IComponentConnector {
|
||||
|
||||
|
||||
#line 11 "..\..\..\..\LogHelper\LogWindow.xaml"
|
||||
#line 10 "..\..\..\..\..\Resources\LogHelper\LogWindow.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.TextBox LogBox;
|
||||
|
||||
@ -60,9 +59,9 @@ namespace ModuleManager {
|
||||
return;
|
||||
}
|
||||
_contentLoaded = true;
|
||||
System.Uri resourceLocater = new System.Uri("/ShadowStream;component/loghelper/logwindow.xaml", System.UriKind.Relative);
|
||||
System.Uri resourceLocater = new System.Uri("/ShadowStream;component/resources/loghelper/logwindow.xaml", System.UriKind.Relative);
|
||||
|
||||
#line 1 "..\..\..\..\LogHelper\LogWindow.xaml"
|
||||
#line 1 "..\..\..\..\..\Resources\LogHelper\LogWindow.xaml"
|
||||
System.Windows.Application.LoadComponent(this, resourceLocater);
|
||||
|
||||
#line default
|
@ -13,7 +13,7 @@ using System.Reflection;
|
||||
[assembly: System.Reflection.AssemblyCompanyAttribute("ShadowStream")]
|
||||
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
|
||||
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+7e2c8d971d315efd56d63e730484370c8ecb8cc9")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+c8906c1471c9f5ce9888edaadf2ebbc469fa21ad")]
|
||||
[assembly: System.Reflection.AssemblyProductAttribute("ShadowStream")]
|
||||
[assembly: System.Reflection.AssemblyTitleAttribute("ShadowStream")]
|
||||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
||||
|
@ -1 +1 @@
|
||||
4f2a38d8bff58315b5094a3a50e68e8d0c6068966356f553e6e6313c7ce3b788
|
||||
daff693fdee4a1bdfdb621ac26fdfb74c97f175f767a43dfee9b4a3bf6b135bc
|
||||
|
Binary file not shown.
@ -1 +1 @@
|
||||
31f375397bf852fe0b0eb4131f45808e75e1ed1477a8d9b1a0f073878701c70a
|
||||
e730cee9e482eea317ca776abde389e376f65b1a9752d2944ef5312824c93317
|
||||
|
@ -1748,16 +1748,9 @@ C:\Users\bib\Desktop\vpr\pull from pc\mediaverwaltung\ShadowStream\bin\Debug\net
|
||||
C:\Users\bib\Desktop\vpr\pull from pc\mediaverwaltung\ShadowStream\bin\Debug\net8.0-windows\file finder test.dll
|
||||
C:\Users\bib\Desktop\vpr\pull from pc\mediaverwaltung\ShadowStream\bin\Debug\net8.0-windows\file finder test.pdb
|
||||
C:\Users\bib\Desktop\vpr\pull from pc\mediaverwaltung\ShadowStream\obj\Debug\net8.0-windows\ShadowStream.csproj.AssemblyReference.cache
|
||||
C:\Users\bib\Desktop\vpr\pull from pc\mediaverwaltung\ShadowStream\obj\Debug\net8.0-windows\LogHelper\LogWindow.g.cs
|
||||
C:\Users\bib\Desktop\vpr\pull from pc\mediaverwaltung\ShadowStream\obj\Debug\net8.0-windows\LogIn.g.cs
|
||||
C:\Users\bib\Desktop\vpr\pull from pc\mediaverwaltung\ShadowStream\obj\Debug\net8.0-windows\MainWindow.g.cs
|
||||
C:\Users\bib\Desktop\vpr\pull from pc\mediaverwaltung\ShadowStream\obj\Debug\net8.0-windows\App.g.cs
|
||||
C:\Users\bib\Desktop\vpr\pull from pc\mediaverwaltung\ShadowStream\obj\Debug\net8.0-windows\ShadowStream_Content.g.cs
|
||||
C:\Users\bib\Desktop\vpr\pull from pc\mediaverwaltung\ShadowStream\obj\Debug\net8.0-windows\ShadowStream_MarkupCompile.cache
|
||||
C:\Users\bib\Desktop\vpr\pull from pc\mediaverwaltung\ShadowStream\obj\Debug\net8.0-windows\ShadowStream_MarkupCompile.lref
|
||||
C:\Users\bib\Desktop\vpr\pull from pc\mediaverwaltung\ShadowStream\obj\Debug\net8.0-windows\LogHelper\LogWindow.baml
|
||||
C:\Users\bib\Desktop\vpr\pull from pc\mediaverwaltung\ShadowStream\obj\Debug\net8.0-windows\LogIn.baml
|
||||
C:\Users\bib\Desktop\vpr\pull from pc\mediaverwaltung\ShadowStream\obj\Debug\net8.0-windows\MainWindow.baml
|
||||
C:\Users\bib\Desktop\vpr\pull from pc\mediaverwaltung\ShadowStream\obj\Debug\net8.0-windows\ShadowStream.g.resources
|
||||
C:\Users\bib\Desktop\vpr\pull from pc\mediaverwaltung\ShadowStream\obj\Debug\net8.0-windows\ShadowStream.GeneratedMSBuildEditorConfig.editorconfig
|
||||
C:\Users\bib\Desktop\vpr\pull from pc\mediaverwaltung\ShadowStream\obj\Debug\net8.0-windows\ShadowStream.AssemblyInfoInputs.cache
|
||||
@ -1770,4 +1763,9 @@ C:\Users\bib\Desktop\vpr\pull from pc\mediaverwaltung\ShadowStream\obj\Debug\net
|
||||
C:\Users\bib\Desktop\vpr\pull from pc\mediaverwaltung\ShadowStream\obj\Debug\net8.0-windows\ShadowStream.pdb
|
||||
C:\Users\bib\Desktop\vpr\pull from pc\mediaverwaltung\ShadowStream\obj\Debug\net8.0-windows\ShadowStream.genruntimeconfig.cache
|
||||
C:\Users\bib\Desktop\vpr\pull from pc\mediaverwaltung\ShadowStream\obj\Debug\net8.0-windows\ref\ShadowStream.dll
|
||||
C:\Users\bib\Desktop\vpr\pull from pc\mediaverwaltung\ShadowStream\bin\Debug\net8.0-windows\Pics\MusicD.jpeg
|
||||
C:\Users\bib\Desktop\vpr\pull from pc\mediaverwaltung\ShadowStream\obj\Debug\net8.0-windows\Views\LogIn.baml
|
||||
C:\Users\bib\Desktop\vpr\pull from pc\mediaverwaltung\ShadowStream\obj\Debug\net8.0-windows\Views\MainWindow.baml
|
||||
C:\Users\bib\Desktop\vpr\pull from pc\mediaverwaltung\ShadowStream\obj\Debug\net8.0-windows\Resources\LogHelper\LogWindow.g.cs
|
||||
C:\Users\bib\Desktop\vpr\pull from pc\mediaverwaltung\ShadowStream\obj\Debug\net8.0-windows\Views\LogIn.g.cs
|
||||
C:\Users\bib\Desktop\vpr\pull from pc\mediaverwaltung\ShadowStream\obj\Debug\net8.0-windows\Views\MainWindow.g.cs
|
||||
C:\Users\bib\Desktop\vpr\pull from pc\mediaverwaltung\ShadowStream\obj\Debug\net8.0-windows\Resources\LogHelper\LogWindow.baml
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1 +1 @@
|
||||
{"documents":{"C:\\Users\\bib\\Desktop\\vpr\\pull from pc\\mediaverwaltung\\*":"https://gitlab.com/NotMoReda1/mediaverwaltung/-/raw/7e2c8d971d315efd56d63e730484370c8ecb8cc9/*"}}
|
||||
{"documents":{"C:\\Users\\bib\\Desktop\\vpr\\pull from pc\\mediaverwaltung\\*":"https://gitlab.com/NotMoReda1/mediaverwaltung/-/raw/c8906c1471c9f5ce9888edaadf2ebbc469fa21ad/*"}}
|
@ -10,11 +10,11 @@ none
|
||||
false
|
||||
TRACE;DEBUG;NET;NET8_0;NETCOREAPP
|
||||
C:\Users\bib\Desktop\vpr\pull from pc\mediaverwaltung\ShadowStream\App.xaml
|
||||
31922853181
|
||||
3-1800985124
|
||||
8442008295505
|
||||
14641956091
|
||||
15304236115
|
||||
206663139284
|
||||
LogHelper\LogWindow.xaml;LogIn.xaml;MainWindow.xaml;
|
||||
Resources\LogHelper\LogWindow.xaml;Views\LogIn.xaml;Views\MainWindow.xaml;
|
||||
|
||||
False
|
||||
|
||||
|
@ -1,20 +0,0 @@
|
||||
ShadowStream
|
||||
1.0.0.0
|
||||
|
||||
winexe
|
||||
C#
|
||||
.cs
|
||||
C:\Users\bib\Desktop\vpr\pull from pc\mediaverwaltung\ShadowStream\obj\Debug\net8.0-windows\
|
||||
ShadowStream
|
||||
none
|
||||
false
|
||||
TRACE;DEBUG;NET;NET8_0;NETCOREAPP;WINDOWS;WINDOWS7_0;NET5_0_OR_GREATER;NET6_0_OR_GREATER;NET7_0_OR_GREATER;NET8_0_OR_GREATER;NETCOREAPP3_0_OR_GREATER;NETCOREAPP3_1_OR_GREATER;WINDOWS7_0_OR_GREATER
|
||||
C:\Users\bib\Desktop\vpr\pull from pc\mediaverwaltung\ShadowStream\App.xaml
|
||||
31922853181
|
||||
|
||||
161775828913
|
||||
206-1549934957
|
||||
LogHelper\LogWindow.xaml;LogIn.xaml;MainWindow.xaml;
|
||||
|
||||
False
|
||||
|
@ -1,4 +0,0 @@
|
||||
|
||||
|
||||
FC:\Users\bib\Desktop\vpr\pull from pc\mediaverwaltung\ShadowStream\LogHelper\LogWindow.xaml;;
|
||||
|
@ -0,0 +1,24 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
using System.Reflection;
|
||||
|
||||
[assembly: System.Reflection.AssemblyCompanyAttribute("ShadowStream")]
|
||||
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
|
||||
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+c8906c1471c9f5ce9888edaadf2ebbc469fa21ad")]
|
||||
[assembly: System.Reflection.AssemblyProductAttribute("ShadowStream")]
|
||||
[assembly: System.Reflection.AssemblyTitleAttribute("ShadowStream")]
|
||||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
||||
[assembly: System.Runtime.Versioning.TargetPlatformAttribute("Windows7.0")]
|
||||
[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("Windows7.0")]
|
||||
|
||||
// Generated by the MSBuild WriteCodeFragment class.
|
||||
|
@ -0,0 +1 @@
|
||||
daff693fdee4a1bdfdb621ac26fdfb74c97f175f767a43dfee9b4a3bf6b135bc
|
@ -0,0 +1,13 @@
|
||||
is_global = true
|
||||
build_property.TargetFramework = net8.0-windows
|
||||
build_property.TargetPlatformMinVersion = 7.0
|
||||
build_property.UsingMicrosoftNETSdkWeb =
|
||||
build_property.ProjectTypeGuids =
|
||||
build_property.InvariantGlobalization =
|
||||
build_property.PlatformNeutralAssembly =
|
||||
build_property.EnforceExtendedAnalyzerRules =
|
||||
build_property._SupportedPlatformList = Linux,macOS,Windows
|
||||
build_property.RootNamespace = ShadowStream
|
||||
build_property.ProjectDir = C:\Users\bib\Desktop\vpr\pull from pc\mediaverwaltung\ShadowStream\
|
||||
build_property.EnableComHosting =
|
||||
build_property.EnableGeneratedComInterfaceComImportInterop =
|
@ -0,0 +1,6 @@
|
||||
// <auto-generated/>
|
||||
global using global::System;
|
||||
global using global::System.Collections.Generic;
|
||||
global using global::System.Linq;
|
||||
global using global::System.Threading;
|
||||
global using global::System.Threading.Tasks;
|
Binary file not shown.
@ -0,0 +1 @@
|
||||
{"documents":{"C:\\Users\\bib\\Desktop\\vpr\\pull from pc\\mediaverwaltung\\*":"https://gitlab.com/NotMoReda1/mediaverwaltung/-/raw/c8906c1471c9f5ce9888edaadf2ebbc469fa21ad/*"}}
|
@ -1,4 +1,4 @@
|
||||
#pragma checksum "..\..\..\LogIn.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "4A0027FBC47B7021B5918847EF575752F8182B66"
|
||||
#pragma checksum "..\..\..\..\Views\LogIn.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "4A0027FBC47B7021B5918847EF575752F8182B66"
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
@ -40,7 +40,7 @@ namespace ShadowStream {
|
||||
public partial class LogIn : System.Windows.Window, System.Windows.Markup.IComponentConnector {
|
||||
|
||||
|
||||
#line 23 "..\..\..\LogIn.xaml"
|
||||
#line 23 "..\..\..\..\Views\LogIn.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.TextBox UsernameBox;
|
||||
|
||||
@ -48,7 +48,7 @@ namespace ShadowStream {
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 28 "..\..\..\LogIn.xaml"
|
||||
#line 28 "..\..\..\..\Views\LogIn.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.PasswordBox PasswordBox;
|
||||
|
||||
@ -67,9 +67,9 @@ namespace ShadowStream {
|
||||
return;
|
||||
}
|
||||
_contentLoaded = true;
|
||||
System.Uri resourceLocater = new System.Uri("/ShadowStream;component/login.xaml", System.UriKind.Relative);
|
||||
System.Uri resourceLocater = new System.Uri("/ShadowStream;component/views/login.xaml", System.UriKind.Relative);
|
||||
|
||||
#line 1 "..\..\..\LogIn.xaml"
|
||||
#line 1 "..\..\..\..\Views\LogIn.xaml"
|
||||
System.Windows.Application.LoadComponent(this, resourceLocater);
|
||||
|
||||
#line default
|
||||
@ -93,7 +93,7 @@ namespace ShadowStream {
|
||||
return;
|
||||
case 3:
|
||||
|
||||
#line 34 "..\..\..\LogIn.xaml"
|
||||
#line 34 "..\..\..\..\Views\LogIn.xaml"
|
||||
((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.LogIn_Click);
|
||||
|
||||
#line default
|
Binary file not shown.
@ -1,4 +1,4 @@
|
||||
#pragma checksum "..\..\..\MainWindow.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "820E1152499F1ED0E9E3643BDE32796527E6C955"
|
||||
#pragma checksum "..\..\..\..\Views\MainWindow.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "904E9356AC01DA4BBA0E90DAA695C151C3553390"
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
@ -41,7 +41,7 @@ namespace ModuleManager {
|
||||
public partial class MainWindow : System.Windows.Window, System.Windows.Markup.IComponentConnector {
|
||||
|
||||
|
||||
#line 30 "..\..\..\MainWindow.xaml"
|
||||
#line 30 "..\..\..\..\Views\MainWindow.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.TextBox SearchBox;
|
||||
|
||||
@ -49,7 +49,7 @@ namespace ModuleManager {
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 68 "..\..\..\MainWindow.xaml"
|
||||
#line 68 "..\..\..\..\Views\MainWindow.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.ScrollViewer ScrollContent;
|
||||
|
||||
@ -57,7 +57,47 @@ namespace ModuleManager {
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 100 "..\..\..\MainWindow.xaml"
|
||||
#line 72 "..\..\..\..\Views\MainWindow.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.WrapPanel Favorites_Home;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 81 "..\..\..\..\Views\MainWindow.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.WrapPanel Muvies_Home;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 90 "..\..\..\..\Views\MainWindow.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.WrapPanel Series_Home;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 99 "..\..\..\..\Views\MainWindow.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.WrapPanel Music_Home;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 108 "..\..\..\..\Views\MainWindow.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.WrapPanel Photos_Home;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 118 "..\..\..\..\Views\MainWindow.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal LibVLCSharp.WPF.VideoView VideoView;
|
||||
|
||||
@ -76,9 +116,9 @@ namespace ModuleManager {
|
||||
return;
|
||||
}
|
||||
_contentLoaded = true;
|
||||
System.Uri resourceLocater = new System.Uri("/ShadowStream;component/mainwindow.xaml", System.UriKind.Relative);
|
||||
System.Uri resourceLocater = new System.Uri("/ShadowStream;component/views/mainwindow.xaml", System.UriKind.Relative);
|
||||
|
||||
#line 1 "..\..\..\MainWindow.xaml"
|
||||
#line 1 "..\..\..\..\Views\MainWindow.xaml"
|
||||
System.Windows.Application.LoadComponent(this, resourceLocater);
|
||||
|
||||
#line default
|
||||
@ -99,16 +139,63 @@ namespace ModuleManager {
|
||||
return;
|
||||
case 2:
|
||||
|
||||
#line 50 "..\..\..\MainWindow.xaml"
|
||||
#line 50 "..\..\..\..\Views\MainWindow.xaml"
|
||||
((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.scanButton_Click);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
return;
|
||||
case 3:
|
||||
this.ScrollContent = ((System.Windows.Controls.ScrollViewer)(target));
|
||||
|
||||
#line 59 "..\..\..\..\Views\MainWindow.xaml"
|
||||
((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Close_Player);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
return;
|
||||
case 4:
|
||||
|
||||
#line 60 "..\..\..\..\Views\MainWindow.xaml"
|
||||
((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Close_Player);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
return;
|
||||
case 5:
|
||||
|
||||
#line 61 "..\..\..\..\Views\MainWindow.xaml"
|
||||
((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Close_Player);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
return;
|
||||
case 6:
|
||||
|
||||
#line 62 "..\..\..\..\Views\MainWindow.xaml"
|
||||
((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Close_Player);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
return;
|
||||
case 7:
|
||||
this.ScrollContent = ((System.Windows.Controls.ScrollViewer)(target));
|
||||
return;
|
||||
case 8:
|
||||
this.Favorites_Home = ((System.Windows.Controls.WrapPanel)(target));
|
||||
return;
|
||||
case 9:
|
||||
this.Muvies_Home = ((System.Windows.Controls.WrapPanel)(target));
|
||||
return;
|
||||
case 10:
|
||||
this.Series_Home = ((System.Windows.Controls.WrapPanel)(target));
|
||||
return;
|
||||
case 11:
|
||||
this.Music_Home = ((System.Windows.Controls.WrapPanel)(target));
|
||||
return;
|
||||
case 12:
|
||||
this.Photos_Home = ((System.Windows.Controls.WrapPanel)(target));
|
||||
return;
|
||||
case 13:
|
||||
this.VideoView = ((LibVLCSharp.WPF.VideoView)(target));
|
||||
return;
|
||||
}
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -16,4 +16,8 @@
|
||||
<PackageReference Include="TagLibSharp" Version="2.3.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="Modules\" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
Binary file not shown.
@ -13,7 +13,7 @@ using System.Reflection;
|
||||
[assembly: System.Reflection.AssemblyCompanyAttribute("file finder test")]
|
||||
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
|
||||
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+7e2c8d971d315efd56d63e730484370c8ecb8cc9")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+c8906c1471c9f5ce9888edaadf2ebbc469fa21ad")]
|
||||
[assembly: System.Reflection.AssemblyProductAttribute("file finder test")]
|
||||
[assembly: System.Reflection.AssemblyTitleAttribute("file finder test")]
|
||||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
||||
|
@ -1 +1 @@
|
||||
cbbb666d6f2c99cca968a50afa6a8c7a7750669279d8fbfa5cd9d46949ecb59b
|
||||
6d61691dc613a8e4f08dbd6d0fe305862e9fd659adc43d8f180dd18d9b426e35
|
||||
|
@ -1 +1 @@
|
||||
3414bf7f538e600b9edbed79a79a08ca8580d1bcb3d69ed9101e07e53e73b4b5
|
||||
bd34e26789a933ea48f10c8f96e9a5f9b2d15e5740f94d316b1fbef460c364c6
|
||||
|
Binary file not shown.
Binary file not shown.
@ -1 +1 @@
|
||||
{"documents":{"C:\\Users\\bib\\Desktop\\vpr\\pull from pc\\mediaverwaltung\\*":"https://gitlab.com/NotMoReda1/mediaverwaltung/-/raw/7e2c8d971d315efd56d63e730484370c8ecb8cc9/*"}}
|
||||
{"documents":{"C:\\Users\\bib\\Desktop\\vpr\\pull from pc\\mediaverwaltung\\*":"https://gitlab.com/NotMoReda1/mediaverwaltung/-/raw/c8906c1471c9f5ce9888edaadf2ebbc469fa21ad/*"}}
|
Binary file not shown.
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user