pause,vol and catagory items work and reading from json
This commit is contained in:
parent
afe5d2f5ff
commit
9534ed3a8a
@ -38,4 +38,16 @@ public class Catagory
|
|||||||
{
|
{
|
||||||
this.items.AddRange(items);
|
this.items.AddRange(items);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int contains(string path)
|
||||||
|
{
|
||||||
|
int tmp = 0;
|
||||||
|
foreach (Item item in items)
|
||||||
|
{
|
||||||
|
if(item.getLink().Contains(path))
|
||||||
|
break;
|
||||||
|
tmp++;
|
||||||
|
}
|
||||||
|
return tmp;
|
||||||
|
}
|
||||||
}
|
}
|
6
ShadowStream/Modules/Obejeckte/Favorites.cs
Normal file
6
ShadowStream/Modules/Obejeckte/Favorites.cs
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
namespace ShadowStream.Obejeckte;
|
||||||
|
|
||||||
|
public class Favorites
|
||||||
|
{
|
||||||
|
public List<object> SharedRefs = new List<object>();
|
||||||
|
}
|
@ -33,7 +33,7 @@ public class Item
|
|||||||
{
|
{
|
||||||
Content = isFoto ? "Show" : "Play",
|
Content = isFoto ? "Show" : "Play",
|
||||||
HorizontalAlignment = HorizontalAlignment.Center,
|
HorizontalAlignment = HorizontalAlignment.Center,
|
||||||
Tag = path // Store path or any identifier
|
Tag = path+"/"+type // Store path or any identifier
|
||||||
};
|
};
|
||||||
|
|
||||||
if (clickHandler != null)
|
if (clickHandler != null)
|
||||||
|
12
ShadowStream/ReadME/VLC.txt
Normal file
12
ShadowStream/ReadME/VLC.txt
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
VLC plugins in C# are components that extend the functionality of the VLC media framework when integrated into a C#
|
||||||
|
application. These plugins enable developers to access additional codecs, filters, and input/output modules to handle
|
||||||
|
various media formats and processing tasks.
|
||||||
|
|
||||||
|
To use VLC plugins in C#, the application must first initialize the VLC core library with the appropriate configuration
|
||||||
|
options that specify the plugin path. This initialization ensures that the VLC engine can locate and load the necessary
|
||||||
|
plugins at runtime. The initialization process typically involves setting up the VLC instance with configuration
|
||||||
|
parameters and plugin directories before creating media players or other related objects.
|
||||||
|
|
||||||
|
Proper initialization is critical because it establishes the environment where VLC plugins can operate, enabling
|
||||||
|
seamless playback, streaming, or media manipulation within the C# application. After initialization, developers interact
|
||||||
|
with VLC objects to control media playback, apply filters, or utilize additional features provided by the loaded plugins.
|
10
ShadowStream/ReadME/source stream.txt
Normal file
10
ShadowStream/ReadME/source stream.txt
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
Using a Source Stream for Bitmap Conversion
|
||||||
|
|
||||||
|
In image processing within C#, a source stream commonly refers to a stream of data that serves as the origin for reading
|
||||||
|
image information. When converting a Bitmap to other formats—such as a BitmapImage for WPF applications or a Base64
|
||||||
|
string representation—a MemoryStream often acts as this source stream.
|
||||||
|
|
||||||
|
The source stream temporarily holds the binary image data in memory, enabling smooth data transfer and conversion
|
||||||
|
without requiring disk access. By writing the bitmap data into the source stream, you can efficiently read and transform
|
||||||
|
the image into the desired target format. This approach is useful for scenarios involving UI rendering, data
|
||||||
|
serialization, or network transmission.
|
@ -11,6 +11,8 @@
|
|||||||
|
|
||||||
<!-- Add this line to specify the manifest file -->
|
<!-- Add this line to specify the manifest file -->
|
||||||
<ApplicationManifest>Propertis\app.manifest</ApplicationManifest>
|
<ApplicationManifest>Propertis\app.manifest</ApplicationManifest>
|
||||||
|
<!-- allowing pointers -->
|
||||||
|
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
@ -56,16 +56,16 @@
|
|||||||
Grid.Column="0"
|
Grid.Column="0"
|
||||||
Background="#222"
|
Background="#222"
|
||||||
VerticalAlignment="Stretch">
|
VerticalAlignment="Stretch">
|
||||||
<Button Content="Home" Height="60" Foreground="White" Background="Transparent" Click="Close_Player"/>
|
<Button Content="Home" Height="60" Foreground="White" Background="Transparent" Click="Home_OnClick" />
|
||||||
<Button Content="Musik" Height="60" Foreground="White" Background="Transparent" Click="Close_Player"/>
|
<Button Content="Musik" Height="60" Foreground="White" Background="Transparent" Click="Musik_OnClick"/>
|
||||||
<Button Content="Photos" Height="60" Foreground="White" Background="Transparent" Click="Close_Player"/>
|
<Button Content="Photos" Height="60" Foreground="White" Background="Transparent" Click="Photo_OnClick"/>
|
||||||
<Button Content="Video" Height="60" Foreground="White" Background="Transparent" Click="Close_Player" />
|
<Button Content="Video" Height="60" Foreground="White" Background="Transparent" Click="Video_OnClick" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
<!-- MAIN CONTENT WRAPPED IN A GRID FOR LAYERING -->
|
<!-- MAIN CONTENT WRAPPED IN A GRID FOR LAYERING -->
|
||||||
<Grid Grid.Column="1" Grid.Row="1">
|
<Grid Grid.Column="1" Grid.Row="1">
|
||||||
<!-- ScrollViewer (Background) -->
|
<!-- ScrollViewer (Background) -->
|
||||||
<ScrollViewer x:Name="ScrollContent" Background="#444" Panel.ZIndex="0">
|
<ScrollViewer x:Name="ScrollContentHome" Background="#444" Panel.ZIndex="0">
|
||||||
<StackPanel Margin="10">
|
<StackPanel Margin="10">
|
||||||
<!-- Favorites -->
|
<!-- Favorites -->
|
||||||
<TextBlock Text="Favorites" FontSize="18" Foreground="White" Margin="0,10"/>
|
<TextBlock Text="Favorites" FontSize="18" Foreground="White" Margin="0,10"/>
|
||||||
@ -119,6 +119,27 @@
|
|||||||
Panel.ZIndex="1"
|
Panel.ZIndex="1"
|
||||||
Visibility="Collapsed"
|
Visibility="Collapsed"
|
||||||
Background="Black" />
|
Background="Black" />
|
||||||
|
|
||||||
|
<!--Catagory-->
|
||||||
|
<ScrollViewer x:Name="ScrollContentCat" Background="#444" Panel.ZIndex="0" Visibility="Collapsed">
|
||||||
|
<StackPanel Margin="10">
|
||||||
|
<!-- Cat-name -->
|
||||||
|
<TextBlock Name="Name_of_Catagory_Text" Text="Name_of_Catagory" FontSize="18" Foreground="White" Margin="0,10"/>
|
||||||
|
<WrapPanel Name="Name_of_Catagory">
|
||||||
|
<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"/>
|
||||||
|
<Rectangle Fill="LightBlue" Width="150" Height="100" Margin="5"/>
|
||||||
|
</WrapPanel>
|
||||||
|
<TextBlock Name="Name_of_Catagory_Text1" Text="Name_of_Catagory1" FontSize="18" Foreground="White" Margin="0,10"/>
|
||||||
|
<WrapPanel Name="Name_of_Catagory1" Visibility="Collapsed">
|
||||||
|
<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"/>
|
||||||
|
<Rectangle Fill="LightBlue" Width="150" Height="100" Margin="5"/>
|
||||||
|
</WrapPanel>
|
||||||
|
</StackPanel>
|
||||||
|
</ScrollViewer>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
<!-- SETTINGS BUTTON -->
|
<!-- SETTINGS BUTTON -->
|
||||||
@ -134,11 +155,11 @@
|
|||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
Background="#222">
|
Background="#222">
|
||||||
<TextBlock Text="Titel" Foreground="White" FontSize="16" Margin="10"/>
|
<TextBlock Text="Titel" Foreground="White" FontSize="16" Margin="10"/>
|
||||||
<Button Content="⏮" Width="40" Margin="10"/>
|
<Button Content="⏮" Width="40" Margin="10" Click="OnItemPriorButtonClick"/>
|
||||||
<Button Content="▶" Width="40" Margin="10"/>
|
<Button Content="▶" Width="40" Margin="10" Click="OnItemPauseBtn_Click"/>
|
||||||
<Button Content="⏭" Width="40" Margin="10"/>
|
<Button Content="⏭" Width="40" Margin="10" Click="OnItemNextButtonClick"/>
|
||||||
<TextBlock Text="🔊" Foreground="White" VerticalAlignment="Center" Margin="10,0"/>
|
<TextBlock Text="🔊" Foreground="White" VerticalAlignment="Center" Margin="10,0"/>
|
||||||
<Slider Width="100" Minimum="0" Maximum="100" Value="50" Margin="10"/>
|
<Slider Width="100" Minimum="0" Maximum="100" Value="50" Margin="10" ValueChanged="RangeBase_OnValueChanged"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Window>
|
</Window>
|
||||||
|
@ -42,6 +42,8 @@ public partial class MainWindow : Window
|
|||||||
LogWindow logWin = new LogWindow(loghelper.GetEntries());
|
LogWindow logWin = new LogWindow(loghelper.GetEntries());
|
||||||
LogHelper log = new LogHelper();
|
LogHelper log = new LogHelper();
|
||||||
|
|
||||||
|
Favorites favorites = new Favorites();
|
||||||
|
|
||||||
private Catagory Muvie = new Catagory("Muvie");
|
private Catagory Muvie = new Catagory("Muvie");
|
||||||
private Catagory Serie = new Catagory("Serie");
|
private Catagory Serie = new Catagory("Serie");
|
||||||
private Catagory Music = new Catagory("Music");
|
private Catagory Music = new Catagory("Music");
|
||||||
@ -72,7 +74,6 @@ public partial class MainWindow : Window
|
|||||||
public MainWindow()
|
public MainWindow()
|
||||||
{
|
{
|
||||||
#region Init wpf
|
#region Init wpf
|
||||||
|
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
//Initialise but Hide
|
//Initialise but Hide
|
||||||
logWin.Hide();
|
logWin.Hide();
|
||||||
@ -161,21 +162,67 @@ public partial class MainWindow : Window
|
|||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Click Methods
|
#region Click Methods
|
||||||
|
//video player variables
|
||||||
|
private string path;
|
||||||
|
private string _category;
|
||||||
private void OnItemPlayButtonClick(object sender, RoutedEventArgs e)
|
private void OnItemPlayButtonClick(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
if (sender is Button btn && btn.Tag is string filePath)
|
if (sender is Button btn && btn.Tag is string filePath)
|
||||||
{
|
{
|
||||||
if (filePath.EndsWith(".jpg") || filePath.EndsWith(".png"))
|
string[] parts = filePath.Split('/');
|
||||||
|
if (parts.Length == 2)
|
||||||
{
|
{
|
||||||
ShowImageWithVLC(filePath); // you'd implement this
|
string left = parts[0]; // "first"
|
||||||
}
|
PlayVideo(left);
|
||||||
else
|
path = left;
|
||||||
{
|
_category = parts[1];
|
||||||
PlayVideo(filePath);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
private void OnItemNextButtonClick(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
switch (_category.ToLower())
|
||||||
|
{
|
||||||
|
case "muvie":
|
||||||
|
videoArrows(ref Muvie,true); break;
|
||||||
|
case "serie":
|
||||||
|
videoArrows(ref Serie,true);break;
|
||||||
|
case "music":
|
||||||
|
videoArrows(ref Music,true); break;
|
||||||
|
case "photos":
|
||||||
|
videoArrows(ref Photo,true); break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
private void OnItemPriorButtonClick(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
switch (_category)
|
||||||
|
{
|
||||||
|
case "Muvie":
|
||||||
|
videoArrows(ref Muvie,false); break;
|
||||||
|
case "Serie":
|
||||||
|
videoArrows(ref Serie,false);break;
|
||||||
|
case "Music":
|
||||||
|
videoArrows(ref Music,false); break;
|
||||||
|
case "Photos":
|
||||||
|
videoArrows(ref Photo,false); break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void OnItemPauseBtn_Click(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
if (_mediaPlayer.IsPlaying)
|
||||||
|
{
|
||||||
|
_mediaPlayer.Pause(); // Pauses the video
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_mediaPlayer.SetPause(false); // Unpauses the video
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void Close_Player(object sender, RoutedEventArgs e)
|
private void Close_Player(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
@ -183,10 +230,6 @@ public partial class MainWindow : Window
|
|||||||
VideoView.Visibility = Visibility.Collapsed;
|
VideoView.Visibility = Visibility.Collapsed;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Video_Click(object sender, RoutedEventArgs e)
|
|
||||||
{
|
|
||||||
PlayVideo(@"F:\Rio.mp4");
|
|
||||||
}
|
|
||||||
private async void scanButton_Click(object sender, RoutedEventArgs e)
|
private async void scanButton_Click(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
@ -318,6 +361,41 @@ public partial class MainWindow : Window
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#region Catagory btns
|
||||||
|
private void Home_OnClick(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
Close_Player();
|
||||||
|
ScrollContentCat.Visibility = Visibility.Collapsed;
|
||||||
|
ScrollContentHome.Visibility = Visibility.Visible;
|
||||||
|
MenueItems();
|
||||||
|
}
|
||||||
|
private void Musik_OnClick(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
Close_Player();
|
||||||
|
ScrollContentHome.Visibility = Visibility.Collapsed;
|
||||||
|
ScrollContentCat.Visibility = Visibility.Visible;
|
||||||
|
Name_of_Catagory1.Visibility = Visibility.Collapsed;
|
||||||
|
MenueItems(ref Music);
|
||||||
|
}
|
||||||
|
private void Photo_OnClick(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
Close_Player();
|
||||||
|
ScrollContentHome.Visibility = Visibility.Collapsed;
|
||||||
|
ScrollContentCat.Visibility = Visibility.Visible;
|
||||||
|
Name_of_Catagory1.Visibility = Visibility.Collapsed;
|
||||||
|
MenueItems(ref Photo);
|
||||||
|
}
|
||||||
|
private void Video_OnClick(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
Close_Player();
|
||||||
|
ScrollContentHome.Visibility = Visibility.Collapsed;
|
||||||
|
ScrollContentCat.Visibility = Visibility.Visible;
|
||||||
|
Name_of_Catagory1.Visibility = Visibility.Visible;
|
||||||
|
MenueItems(ref Muvie,ref Serie);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region itemCreation
|
#region itemCreation
|
||||||
@ -412,36 +490,72 @@ public partial class MainWindow : Window
|
|||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Comunication
|
#region Comunication
|
||||||
|
|
||||||
|
public void addFavorit(ref Item item)
|
||||||
|
{
|
||||||
|
favorites.SharedRefs.Add(item);
|
||||||
|
}
|
||||||
public void ReciveErrorLog(string logMessage)
|
public void ReciveErrorLog(string logMessage)
|
||||||
{
|
{
|
||||||
log.Error(logMessage);
|
log.Error(logMessage);
|
||||||
}
|
}
|
||||||
public void PlayVideo(string filePath)
|
public void PlayVideo(string filePath)
|
||||||
{
|
{
|
||||||
if(suportedVidioFiles.Contains(Path.GetExtension(filePath)))
|
if(suportedVidioFiles.Contains(Path.GetExtension(filePath))||suportedPhotoFiles.Contains(Path.GetExtension(filePath)))
|
||||||
VideoView.Visibility = Visibility.Visible;
|
VideoView.Visibility = Visibility.Visible;
|
||||||
var media = new Media(_libVLC, filePath, FromType.FromPath);
|
var media = new Media(_libVLC, filePath, FromType.FromPath);
|
||||||
_mediaPlayer.Play(media);
|
_mediaPlayer.Play(media);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ShowImageWithVLC(string filePath)
|
public void videoArrows(ref Catagory catagory, bool next)
|
||||||
{
|
{
|
||||||
if (File.Exists(filePath))
|
catagory = catagory as Catagory;
|
||||||
|
if (catagory == null || catagory.getAllItems() == null)
|
||||||
{
|
{
|
||||||
VideoView.Visibility = Visibility.Visible;
|
MessageBox.Show("Category or items are null");
|
||||||
var media = new Media(_libVLC, filePath, FromType.FromPath);
|
return;
|
||||||
_mediaPlayer.Play(media);
|
|
||||||
}
|
}
|
||||||
|
int tmp = catagory.contains(path);
|
||||||
|
Media media;
|
||||||
|
|
||||||
|
if (next && catagory.getAllItems().Count > tmp)
|
||||||
|
{
|
||||||
|
media = new Media(_libVLC, catagory.getAllItems()[tmp + 1].getLink(), FromType.FromPath);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if(tmp >1)
|
||||||
|
media = new Media(_libVLC, catagory.getAllItems()[tmp - 1].getLink(), FromType.FromPath);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
media = new Media(_libVLC, catagory.getAllItems()[tmp].getLink(), FromType.FromPath);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(media!=null)
|
||||||
|
_mediaPlayer.Play(media);
|
||||||
|
}
|
||||||
|
private void Close_Player()
|
||||||
|
{
|
||||||
|
_mediaPlayer.Stop();
|
||||||
|
VideoView.Visibility = Visibility.Collapsed;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region HomeMenue
|
#region Menue
|
||||||
|
|
||||||
|
|
||||||
|
void MenueItems(ref Catagory catagory)
|
||||||
|
{
|
||||||
|
PopulatePanelWithItemsCatagorised(Name_of_Catagory,ref catagory);
|
||||||
|
}
|
||||||
|
void MenueItems(ref Catagory catagory,ref Catagory catagory1)
|
||||||
|
{
|
||||||
|
PopulatePanelWithItemsCatagorised(Name_of_Catagory,ref catagory);
|
||||||
|
PopulatePanelWithItemsCatagorised(Name_of_Catagory1,ref catagory1);
|
||||||
|
}
|
||||||
void MenueItems()
|
void MenueItems()
|
||||||
{
|
{
|
||||||
PopulatePanelWithItems(Muvie.getAllItems(), Muvies_Home);
|
PopulatePanelWithItems(Muvie.getAllItems(), Muvies_Home);
|
||||||
@ -453,77 +567,98 @@ public partial class MainWindow : Window
|
|||||||
|
|
||||||
#region PanelPop
|
#region PanelPop
|
||||||
|
|
||||||
|
private void PopulatePanelWithItemsCatagorised(Panel targetPanel,ref Catagory catagory)
|
||||||
|
{
|
||||||
|
if (catagory.name == "Serie")
|
||||||
|
{
|
||||||
|
Name_of_Catagory_Text1.Text = catagory.name;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Name_of_Catagory_Text.Text = catagory.name;
|
||||||
|
}
|
||||||
|
PopulatePanelWithItems(catagory.getAllItems(),targetPanel);
|
||||||
|
}
|
||||||
private void PopulatePanelWithItems(List<Item> items, Panel targetPanel)
|
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,
|
targetPanel.Children.Clear();
|
||||||
Height = 120,
|
byte tmp = 0;
|
||||||
Margin = new Thickness(5)
|
foreach (var item in items)
|
||||||
};
|
{
|
||||||
|
if(tmp >= 10)
|
||||||
|
break;
|
||||||
|
if (ScrollContentHome.Visibility == Visibility.Visible)
|
||||||
|
tmp++;
|
||||||
|
if (tmp < 10)
|
||||||
|
{
|
||||||
|
var name = item.getName();
|
||||||
|
var image = item.getImage();
|
||||||
|
var isFoto = item.getType() == "Photo";
|
||||||
|
var path = item.getLink();
|
||||||
|
var buttonText = isFoto ? "Show" : "Play";
|
||||||
|
|
||||||
// Define rows for layout
|
if (image == null)
|
||||||
container.RowDefinitions.Add(new RowDefinition { Height = new GridLength(1, GridUnitType.Star) }); // Image
|
continue; // Skip if image is not available
|
||||||
container.RowDefinitions.Add(new RowDefinition { Height = new GridLength(30) }); // Button
|
|
||||||
|
|
||||||
// Image
|
// Container for stacking label, image, and button
|
||||||
var imgControl = new System.Windows.Controls.Image
|
var container = new Grid
|
||||||
{
|
{
|
||||||
Source = image,
|
Width = 150,
|
||||||
Width = 150,
|
Height = 120,
|
||||||
Height = 90,
|
Margin = new Thickness(5)
|
||||||
Stretch = Stretch.UniformToFill
|
};
|
||||||
};
|
|
||||||
|
|
||||||
Grid.SetRow(imgControl, 0);
|
// Define rows for layout
|
||||||
container.Children.Add(imgControl);
|
container.RowDefinitions.Add(new RowDefinition { Height = new GridLength(1, GridUnitType.Star) }); // Image
|
||||||
|
container.RowDefinitions.Add(new RowDefinition { Height = new GridLength(30) }); // Button
|
||||||
|
|
||||||
// Label (overlays top-left, optional)
|
// Image
|
||||||
var label = new Label
|
var imgControl = new System.Windows.Controls.Image
|
||||||
{
|
{
|
||||||
Content = name,
|
Source = image,
|
||||||
HorizontalAlignment = HorizontalAlignment.Left,
|
Width = 150,
|
||||||
VerticalAlignment = VerticalAlignment.Top,
|
Height = 90,
|
||||||
Background = new SolidColorBrush(Color.FromArgb(180, 0, 0, 0)),
|
Stretch = Stretch.UniformToFill
|
||||||
Foreground = Brushes.White,
|
};
|
||||||
Padding = new Thickness(4),
|
|
||||||
FontSize = 12
|
|
||||||
};
|
|
||||||
Grid.SetRow(label, 0);
|
|
||||||
container.Children.Add(label);
|
|
||||||
|
|
||||||
// Button
|
Grid.SetRow(imgControl, 0);
|
||||||
var btn = new Button
|
container.Children.Add(imgControl);
|
||||||
{
|
|
||||||
Content = buttonText,
|
// Label (overlays top-left, optional)
|
||||||
Height = 25,
|
var label = new Label
|
||||||
Width = 140,
|
{
|
||||||
HorizontalAlignment = HorizontalAlignment.Center,
|
Content = name,
|
||||||
VerticalAlignment = VerticalAlignment.Center,
|
HorizontalAlignment = HorizontalAlignment.Left,
|
||||||
Margin = new Thickness(0, 0, 0, 5)
|
VerticalAlignment = VerticalAlignment.Top,
|
||||||
};
|
Background = new SolidColorBrush(Color.FromArgb(180, 0, 0, 0)),
|
||||||
btn.Click += (s, e) => PlayVideo(path);
|
Foreground = Brushes.White,
|
||||||
Grid.SetRow(btn, 1);
|
Padding = new Thickness(4),
|
||||||
container.Children.Add(btn);
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Add to target UI panel
|
|
||||||
targetPanel.Children.Add(container);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
@ -619,6 +754,21 @@ public partial class MainWindow : Window
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region sliders
|
||||||
|
|
||||||
|
private void RangeBase_OnValueChanged(object sender, RoutedPropertyChangedEventArgs<double> e)
|
||||||
|
{
|
||||||
|
if (sender is Slider&&_mediaPlayer != null)
|
||||||
|
{
|
||||||
|
Slider slider = sender as Slider;
|
||||||
|
int value = Convert.ToInt32(slider.Value);
|
||||||
|
_mediaPlayer.Volume = value;
|
||||||
|
log.Log("VolumeChanged");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
}
|
}
|
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
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -13,7 +13,7 @@ using System.Reflection;
|
|||||||
[assembly: System.Reflection.AssemblyCompanyAttribute("ShadowStream")]
|
[assembly: System.Reflection.AssemblyCompanyAttribute("ShadowStream")]
|
||||||
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
|
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
|
||||||
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
||||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+c8906c1471c9f5ce9888edaadf2ebbc469fa21ad")]
|
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+afe5d2f5ff1f6bedbf81fd0a6fcf377b5186c062")]
|
||||||
[assembly: System.Reflection.AssemblyProductAttribute("ShadowStream")]
|
[assembly: System.Reflection.AssemblyProductAttribute("ShadowStream")]
|
||||||
[assembly: System.Reflection.AssemblyTitleAttribute("ShadowStream")]
|
[assembly: System.Reflection.AssemblyTitleAttribute("ShadowStream")]
|
||||||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
||||||
|
@ -1 +1 @@
|
|||||||
daff693fdee4a1bdfdb621ac26fdfb74c97f175f767a43dfee9b4a3bf6b135bc
|
6bde34b2e5e75e632a9f05946a429aa1a2730ff7ebb7bdb5c8d132255bde2008
|
||||||
|
Binary file not shown.
@ -1 +1 @@
|
|||||||
e730cee9e482eea317ca776abde389e376f65b1a9752d2944ef5312824c93317
|
25fbc983509f91ec12ae31c845e2b078a52bd2cc2bfd1a54d4399d98c002f139
|
||||||
|
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/c8906c1471c9f5ce9888edaadf2ebbc469fa21ad/*"}}
|
{"documents":{"C:\\Users\\bib\\Desktop\\vpr\\pull from pc\\mediaverwaltung\\*":"https://gitlab.com/NotMoReda1/mediaverwaltung/-/raw/afe5d2f5ff1f6bedbf81fd0a6fcf377b5186c062/*"}}
|
@ -12,7 +12,7 @@ TRACE;DEBUG;NET;NET8_0;NETCOREAPP
|
|||||||
C:\Users\bib\Desktop\vpr\pull from pc\mediaverwaltung\ShadowStream\App.xaml
|
C:\Users\bib\Desktop\vpr\pull from pc\mediaverwaltung\ShadowStream\App.xaml
|
||||||
3-1800985124
|
3-1800985124
|
||||||
8442008295505
|
8442008295505
|
||||||
15304236115
|
16-532759807
|
||||||
206663139284
|
206663139284
|
||||||
Resources\LogHelper\LogWindow.xaml;Views\LogIn.xaml;Views\MainWindow.xaml;
|
Resources\LogHelper\LogWindow.xaml;Views\LogIn.xaml;Views\MainWindow.xaml;
|
||||||
|
|
||||||
|
Binary file not shown.
@ -1,4 +1,4 @@
|
|||||||
#pragma checksum "..\..\..\..\Views\MainWindow.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "904E9356AC01DA4BBA0E90DAA695C151C3553390"
|
#pragma checksum "..\..\..\..\Views\MainWindow.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "671655137D3BB5DA122D40D6179CD34D64E17E55"
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
// <auto-generated>
|
// <auto-generated>
|
||||||
// This code was generated by a tool.
|
// This code was generated by a tool.
|
||||||
@ -51,7 +51,7 @@ namespace ModuleManager {
|
|||||||
|
|
||||||
#line 68 "..\..\..\..\Views\MainWindow.xaml"
|
#line 68 "..\..\..\..\Views\MainWindow.xaml"
|
||||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||||
internal System.Windows.Controls.ScrollViewer ScrollContent;
|
internal System.Windows.Controls.ScrollViewer ScrollContentHome;
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
@ -104,6 +104,46 @@ namespace ModuleManager {
|
|||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
|
|
||||||
|
|
||||||
|
#line 124 "..\..\..\..\Views\MainWindow.xaml"
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||||
|
internal System.Windows.Controls.ScrollViewer ScrollContentCat;
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
|
||||||
|
|
||||||
|
#line 127 "..\..\..\..\Views\MainWindow.xaml"
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||||
|
internal System.Windows.Controls.TextBlock Name_of_Catagory_Text;
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
|
||||||
|
|
||||||
|
#line 128 "..\..\..\..\Views\MainWindow.xaml"
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||||
|
internal System.Windows.Controls.WrapPanel Name_of_Catagory;
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
|
||||||
|
|
||||||
|
#line 134 "..\..\..\..\Views\MainWindow.xaml"
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||||
|
internal System.Windows.Controls.TextBlock Name_of_Catagory_Text1;
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
|
||||||
|
|
||||||
|
#line 135 "..\..\..\..\Views\MainWindow.xaml"
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||||
|
internal System.Windows.Controls.WrapPanel Name_of_Catagory1;
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
|
||||||
private bool _contentLoaded;
|
private bool _contentLoaded;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -148,7 +188,7 @@ namespace ModuleManager {
|
|||||||
case 3:
|
case 3:
|
||||||
|
|
||||||
#line 59 "..\..\..\..\Views\MainWindow.xaml"
|
#line 59 "..\..\..\..\Views\MainWindow.xaml"
|
||||||
((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Close_Player);
|
((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Home_OnClick);
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
@ -156,7 +196,7 @@ namespace ModuleManager {
|
|||||||
case 4:
|
case 4:
|
||||||
|
|
||||||
#line 60 "..\..\..\..\Views\MainWindow.xaml"
|
#line 60 "..\..\..\..\Views\MainWindow.xaml"
|
||||||
((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Close_Player);
|
((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Musik_OnClick);
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
@ -164,7 +204,7 @@ namespace ModuleManager {
|
|||||||
case 5:
|
case 5:
|
||||||
|
|
||||||
#line 61 "..\..\..\..\Views\MainWindow.xaml"
|
#line 61 "..\..\..\..\Views\MainWindow.xaml"
|
||||||
((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Close_Player);
|
((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Photo_OnClick);
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
@ -172,13 +212,13 @@ namespace ModuleManager {
|
|||||||
case 6:
|
case 6:
|
||||||
|
|
||||||
#line 62 "..\..\..\..\Views\MainWindow.xaml"
|
#line 62 "..\..\..\..\Views\MainWindow.xaml"
|
||||||
((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Close_Player);
|
((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Video_OnClick);
|
||||||
|
|
||||||
#line default
|
#line default
|
||||||
#line hidden
|
#line hidden
|
||||||
return;
|
return;
|
||||||
case 7:
|
case 7:
|
||||||
this.ScrollContent = ((System.Windows.Controls.ScrollViewer)(target));
|
this.ScrollContentHome = ((System.Windows.Controls.ScrollViewer)(target));
|
||||||
return;
|
return;
|
||||||
case 8:
|
case 8:
|
||||||
this.Favorites_Home = ((System.Windows.Controls.WrapPanel)(target));
|
this.Favorites_Home = ((System.Windows.Controls.WrapPanel)(target));
|
||||||
@ -198,6 +238,53 @@ namespace ModuleManager {
|
|||||||
case 13:
|
case 13:
|
||||||
this.VideoView = ((LibVLCSharp.WPF.VideoView)(target));
|
this.VideoView = ((LibVLCSharp.WPF.VideoView)(target));
|
||||||
return;
|
return;
|
||||||
|
case 14:
|
||||||
|
this.ScrollContentCat = ((System.Windows.Controls.ScrollViewer)(target));
|
||||||
|
return;
|
||||||
|
case 15:
|
||||||
|
this.Name_of_Catagory_Text = ((System.Windows.Controls.TextBlock)(target));
|
||||||
|
return;
|
||||||
|
case 16:
|
||||||
|
this.Name_of_Catagory = ((System.Windows.Controls.WrapPanel)(target));
|
||||||
|
return;
|
||||||
|
case 17:
|
||||||
|
this.Name_of_Catagory_Text1 = ((System.Windows.Controls.TextBlock)(target));
|
||||||
|
return;
|
||||||
|
case 18:
|
||||||
|
this.Name_of_Catagory1 = ((System.Windows.Controls.WrapPanel)(target));
|
||||||
|
return;
|
||||||
|
case 19:
|
||||||
|
|
||||||
|
#line 158 "..\..\..\..\Views\MainWindow.xaml"
|
||||||
|
((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.OnItemPriorButtonClick);
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
return;
|
||||||
|
case 20:
|
||||||
|
|
||||||
|
#line 159 "..\..\..\..\Views\MainWindow.xaml"
|
||||||
|
((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.OnItemPauseBtn_Click);
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
return;
|
||||||
|
case 21:
|
||||||
|
|
||||||
|
#line 160 "..\..\..\..\Views\MainWindow.xaml"
|
||||||
|
((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.OnItemNextButtonClick);
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
return;
|
||||||
|
case 22:
|
||||||
|
|
||||||
|
#line 162 "..\..\..\..\Views\MainWindow.xaml"
|
||||||
|
((System.Windows.Controls.Slider)(target)).ValueChanged += new System.Windows.RoutedPropertyChangedEventHandler<double>(this.RangeBase_OnValueChanged);
|
||||||
|
|
||||||
|
#line default
|
||||||
|
#line hidden
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
this._contentLoaded = true;
|
this._contentLoaded = true;
|
||||||
}
|
}
|
||||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -13,7 +13,7 @@ using System.Reflection;
|
|||||||
[assembly: System.Reflection.AssemblyCompanyAttribute("file finder test")]
|
[assembly: System.Reflection.AssemblyCompanyAttribute("file finder test")]
|
||||||
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
|
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
|
||||||
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
||||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+c8906c1471c9f5ce9888edaadf2ebbc469fa21ad")]
|
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+afe5d2f5ff1f6bedbf81fd0a6fcf377b5186c062")]
|
||||||
[assembly: System.Reflection.AssemblyProductAttribute("file finder test")]
|
[assembly: System.Reflection.AssemblyProductAttribute("file finder test")]
|
||||||
[assembly: System.Reflection.AssemblyTitleAttribute("file finder test")]
|
[assembly: System.Reflection.AssemblyTitleAttribute("file finder test")]
|
||||||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
||||||
|
@ -1 +1 @@
|
|||||||
6d61691dc613a8e4f08dbd6d0fe305862e9fd659adc43d8f180dd18d9b426e35
|
c969ed8ee648fb9fdb1f3d9435801aa0c044aa8da181b83fe997ecb745d992fd
|
||||||
|
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/c8906c1471c9f5ce9888edaadf2ebbc469fa21ad/*"}}
|
{"documents":{"C:\\Users\\bib\\Desktop\\vpr\\pull from pc\\mediaverwaltung\\*":"https://gitlab.com/NotMoReda1/mediaverwaltung/-/raw/afe5d2f5ff1f6bedbf81fd0a6fcf377b5186c062/*"}}
|
Binary file not shown.
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user