applying new struckture and working vlc
This commit is contained in:
43
ShadowStream/Resources/LogHelper/LogHelper.cs
Normal file
43
ShadowStream/Resources/LogHelper/LogHelper.cs
Normal file
@@ -0,0 +1,43 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
//namespace Scheckenrennen_GUI.modules
|
||||
//Quinn Grafe Schnecken rennen
|
||||
namespace ShadowStream.LogHelper
|
||||
{
|
||||
public class LogHelper
|
||||
{
|
||||
private List<string> logEntries;
|
||||
|
||||
public LogHelper()
|
||||
{
|
||||
logEntries = new List<string>();
|
||||
}
|
||||
|
||||
public void Log(string entry)
|
||||
{
|
||||
AddEntry($"[{DateTime.Now:HH:mm:ss}] [INFO ] {entry}");
|
||||
}
|
||||
|
||||
public void Warn(string entry)
|
||||
{
|
||||
AddEntry($"[{DateTime.Now:HH:mm:ss}] [WARN ] {entry}");
|
||||
}
|
||||
public void Error(string entry)
|
||||
{
|
||||
AddEntry($"[{DateTime.Now:HH:mm:ss}] [ERROR] {entry}");
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void AddEntry(string entry)
|
||||
{
|
||||
logEntries.Add(entry);
|
||||
}
|
||||
|
||||
public List<string> GetEntries()
|
||||
{
|
||||
return logEntries;
|
||||
}
|
||||
}
|
||||
}
|
19
ShadowStream/Resources/LogHelper/LogWindow.xaml
Normal file
19
ShadowStream/Resources/LogHelper/LogWindow.xaml
Normal file
@@ -0,0 +1,19 @@
|
||||
<!-- Quinn Grafe Schencken rennen -->
|
||||
<Window x:Class="ModuleManager.LogWindow"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
mc:Ignorable="d"
|
||||
Title="LogWindow" Height="450" Width="800">
|
||||
<Grid>
|
||||
<TextBox x:Name="LogBox"
|
||||
Foreground="Gray"
|
||||
Background="Black"
|
||||
FontFamily="Consolas"
|
||||
IsReadOnly="True"
|
||||
VerticalScrollBarVisibility="Auto"
|
||||
TextWrapping="Wrap"
|
||||
AcceptsReturn="True" />
|
||||
</Grid>
|
||||
</Window>
|
24
ShadowStream/Resources/LogHelper/LogWindow.xaml.cs
Normal file
24
ShadowStream/Resources/LogHelper/LogWindow.xaml.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Windows;
|
||||
|
||||
namespace ModuleManager
|
||||
{
|
||||
public partial class LogWindow : Window
|
||||
{
|
||||
public LogWindow(List<string> logText)
|
||||
{
|
||||
InitializeComponent();
|
||||
foreach (var s in logText)
|
||||
{
|
||||
LogBox.Text += s + Environment.NewLine;
|
||||
}
|
||||
}
|
||||
|
||||
public void AddLogEntry(string logEntry)
|
||||
{
|
||||
LogBox.Text += logEntry + Environment.NewLine;
|
||||
LogBox.ScrollToEnd();
|
||||
}
|
||||
}
|
||||
}
|
BIN
ShadowStream/Resources/Pics/MusicD.jpeg
Normal file
BIN
ShadowStream/Resources/Pics/MusicD.jpeg
Normal file
Binary file not shown.
After Width: | Height: | Size: 8.6 KiB |
Reference in New Issue
Block a user