redundante dateien entfernt
This commit is contained in:
parent
c6fe8e3435
commit
8a6414f16e
@ -1,6 +0,0 @@
|
|||||||
namespace Project_Periodensystem.Controller;
|
|
||||||
|
|
||||||
public class Class1
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -1,6 +0,0 @@
|
|||||||
namespace Project_Periodensystem.Model;
|
|
||||||
|
|
||||||
public class Class1
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -1,25 +0,0 @@
|
|||||||
namespace Project_Periodensystem.Model
|
|
||||||
{
|
|
||||||
public class ElementModel
|
|
||||||
{
|
|
||||||
public string Symbol { get; set; } = "";
|
|
||||||
public int Number { get; set; }
|
|
||||||
public int Row { get; set; }
|
|
||||||
public int Column { get; set; }
|
|
||||||
public ElementSeries Series { get; set; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public enum ElementSeries
|
|
||||||
{
|
|
||||||
Alkali,
|
|
||||||
AlkalineEarth,
|
|
||||||
Transition,
|
|
||||||
PostTransition,
|
|
||||||
Metalloid,
|
|
||||||
Nonmetal,
|
|
||||||
Halogen,
|
|
||||||
NobleGas,
|
|
||||||
Lanthanide,
|
|
||||||
Actinide
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,6 +0,0 @@
|
|||||||
namespace Project_Periodensystem.Persistence;
|
|
||||||
|
|
||||||
public class Class1
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -1,24 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Globalization;
|
|
||||||
using Avalonia.Data.Converters;
|
|
||||||
|
|
||||||
namespace Project_Periodensystem.View.Converters
|
|
||||||
{
|
|
||||||
public class RowToYConverter : IValueConverter
|
|
||||||
{
|
|
||||||
private const double TileHeight = 80;
|
|
||||||
public object Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
|
|
||||||
=> (value is int r) ? r * TileHeight : 0;
|
|
||||||
public object ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture)
|
|
||||||
=> throw new NotImplementedException();
|
|
||||||
}
|
|
||||||
|
|
||||||
public class ColumnToXConverter : IValueConverter
|
|
||||||
{
|
|
||||||
private const double TileWidth = 80;
|
|
||||||
public object Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
|
|
||||||
=> (value is int c) ? c * TileWidth : 0;
|
|
||||||
public object ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture)
|
|
||||||
=> throw new NotImplementedException();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,54 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.IO;
|
|
||||||
|
|
||||||
namespace Project_Periodensystem.View
|
|
||||||
{
|
|
||||||
public static class Logger
|
|
||||||
{
|
|
||||||
private static readonly string LogDirectory = AppDomain.CurrentDomain.BaseDirectory;
|
|
||||||
private static readonly string LogFile = Path.Combine(LogDirectory, "app_log.txt");
|
|
||||||
|
|
||||||
public static void Log(string message)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
// Ensure directory exists
|
|
||||||
Directory.CreateDirectory(LogDirectory);
|
|
||||||
|
|
||||||
var logMessage = $"{DateTime.Now:yyyy-MM-dd HH:mm:ss.fff} - {message}";
|
|
||||||
// Write immediately to console for direct feedback
|
|
||||||
Console.WriteLine(logMessage);
|
|
||||||
|
|
||||||
// Append to file with direct flush
|
|
||||||
using (StreamWriter sw = File.AppendText(LogFile))
|
|
||||||
{
|
|
||||||
sw.WriteLine(logMessage);
|
|
||||||
sw.Flush();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
Console.WriteLine($"Logging failed: {ex.Message}");
|
|
||||||
Console.WriteLine($"Attempted to write to: {LogFile}");
|
|
||||||
Console.WriteLine($"Original message: {message}");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static Logger()
|
|
||||||
{
|
|
||||||
// Clear log on startup
|
|
||||||
try
|
|
||||||
{
|
|
||||||
if (File.Exists(LogFile))
|
|
||||||
{
|
|
||||||
File.Delete(LogFile);
|
|
||||||
}
|
|
||||||
Log("=== Logging started ===");
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
Console.WriteLine($"Failed to initialize log file: {ex.Message}");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Loading…
Reference in New Issue
Block a user