Arrow button func,progress bar
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Media;
|
||||
using ModuleManager.Modules;
|
||||
|
||||
namespace ShadowStream.Obejeckte;
|
||||
//Quinn
|
||||
@@ -8,6 +9,8 @@ public class Catagory
|
||||
//basic code for catatgorys next
|
||||
public readonly string name;
|
||||
List<Item> items = new List<Item>();
|
||||
|
||||
StringConversions conv = new StringConversions();
|
||||
|
||||
public Catagory(string name)
|
||||
{
|
||||
@@ -44,10 +47,15 @@ public class Catagory
|
||||
int tmp = 0;
|
||||
foreach (Item item in items)
|
||||
{
|
||||
if(item.getLink().Contains(path))
|
||||
break;
|
||||
var link = item?.getLink();
|
||||
string localPath = new Uri(path).LocalPath;
|
||||
localPath = conv.ReplaceFirst(localPath, '\\', '/');
|
||||
Console.WriteLine($"Comparing link: '{link}' with path: '{localPath}'");
|
||||
if (!string.IsNullOrEmpty(link) && link.Contains(localPath, StringComparison.OrdinalIgnoreCase))
|
||||
return tmp;
|
||||
tmp++;
|
||||
}
|
||||
return tmp;
|
||||
return -1; // Not found
|
||||
}
|
||||
|
||||
}
|
@@ -33,13 +33,15 @@ public class Item
|
||||
{
|
||||
Content = isFoto ? "Show" : "Play",
|
||||
HorizontalAlignment = HorizontalAlignment.Center,
|
||||
Tag = path+"/"+type // Store path or any identifier
|
||||
Tag = path+"||"+type // Store path or any identifier
|
||||
};
|
||||
|
||||
if (clickHandler != null)
|
||||
playButton.Click += clickHandler;
|
||||
|
||||
this.isFoto = isFoto;
|
||||
|
||||
Console.WriteLine(path);
|
||||
}
|
||||
|
||||
|
||||
@@ -69,5 +71,10 @@ public class Item
|
||||
{
|
||||
return type;
|
||||
}
|
||||
|
||||
public Button getPlayButton()
|
||||
{
|
||||
return playButton;
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user