before restrucktur

This commit is contained in:
unknown
2025-06-09 19:01:41 +02:00
parent 467d6af393
commit 7e2c8d971d
36 changed files with 450 additions and 1016 deletions

View File

@@ -0,0 +1,23 @@
namespace ShadowStream.Obejeckte;
//Quinn
public class Catagory
{
//basic code for catatgorys next
public readonly string name;
List<Item> items = new List<Item>();
public Catagory(string name)
{
this.name = name;
}
public void addItem(Item item)
{
items.Add(item);
}
public void removeAllItems()
{
items.Clear();
}
}

View File

@@ -0,0 +1,66 @@
using System.Windows.Media.Imaging;
using System.Windows.Controls;
namespace ShadowStream.Obejeckte;
//Quinn
public class Item
{
//public data
Label name;
string path;
string type;
BitmapImage image;
Button playButton;
bool isFoto;
//initilise the item
public Item(string path, string type,BitmapImage image,bool isFoto)
{
this.path = path;
this.type = type;
this.name = new Label(){Name="name",Content = name};
this.image = image;
this.playButton = new Button();
playButton.Content = "Play";
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()
{
return path;
}
public string getFormat()
{
return type;
}
public string getName()
{
return name.Content.ToString();
}
public BitmapImage getImage()
{
return image;
}
public string getType()
{
return type;
}
}