Initial commit: Add ShadowStream media application with file scanning and classification
This commit is contained in:
22
ShadowStream/Obejeckte/Catagory.cs
Normal file
22
ShadowStream/Obejeckte/Catagory.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
namespace ShadowStream.Obejeckte;
|
||||
//Quinn
|
||||
public class Catagory
|
||||
{
|
||||
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();
|
||||
}
|
||||
}
|
52
ShadowStream/Obejeckte/Item.cs
Normal file
52
ShadowStream/Obejeckte/Item.cs
Normal file
@@ -0,0 +1,52 @@
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Controls;
|
||||
|
||||
namespace ShadowStream.Obejeckte;
|
||||
//Quinn
|
||||
public class Item
|
||||
{
|
||||
Label name;
|
||||
string path;
|
||||
string type;
|
||||
BitmapImage image;
|
||||
Button playButton;
|
||||
bool isFoto;
|
||||
|
||||
|
||||
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;
|
||||
}
|
||||
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);
|
||||
}
|
||||
|
||||
public string getLink()
|
||||
{
|
||||
return path;
|
||||
}
|
||||
|
||||
public string getFormat()
|
||||
{
|
||||
return type;
|
||||
}
|
||||
|
||||
public string getName()
|
||||
{
|
||||
return name.Content.ToString();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user