applying new struckture and working vlc

This commit is contained in:
Elias Quinn
2025-06-12 14:34:51 +01:00
parent c8906c1471
commit afe5d2f5ff
75 changed files with 1045 additions and 613 deletions

View File

@@ -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);
}
}

View File

@@ -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()