Move helpers to Helpers/
This commit is contained in:
@ -7,6 +7,7 @@ using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.IO;
|
||||
using WGneu.Helpers;
|
||||
|
||||
namespace WGneu {
|
||||
public partial class App : Application {
|
||||
|
@ -5,6 +5,7 @@ using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.IO;
|
||||
using System.Windows;
|
||||
using WGneu.Helpers;
|
||||
|
||||
namespace WGneu.Documents {
|
||||
public abstract class Document : IDisposable {
|
||||
|
@ -12,6 +12,7 @@ using PdfSharp.Pdf.IO;
|
||||
using PuppeteerSharp;
|
||||
using PuppeteerSharp.Media;
|
||||
using RazorLight;
|
||||
using WGneu.Helpers;
|
||||
using WGneu.Windows;
|
||||
|
||||
namespace WGneu.Documents {
|
||||
|
@ -9,7 +9,7 @@ using System.Windows.Controls;
|
||||
using System.IO;
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace WGneu {
|
||||
namespace WGneu.Helpers {
|
||||
public static class Utils {
|
||||
public static void SetInputChanged(Control input) {
|
||||
input.BorderBrush = Brushes.Orange;
|
||||
@ -68,9 +68,9 @@ namespace WGneu {
|
||||
private int Usages = 0;
|
||||
public string FilePath { get; private set; }
|
||||
|
||||
public TemporaryFile() : this(null) {}
|
||||
public TemporaryFile() : this(null) { }
|
||||
|
||||
public TemporaryFile(string? ext) : this(Path.Combine(Path.GetTempPath(), "Kelwin"), ext) {}
|
||||
public TemporaryFile(string? ext) : this(Path.Combine(Path.GetTempPath(), "Kelwin"), ext) { }
|
||||
|
||||
public TemporaryFile(string dir, string? ext) {
|
||||
FilePath = Path.Combine(dir, Path.GetRandomFileName().Replace(".", "") + (ext != null ? $".{ext}" : ""));
|
||||
@ -95,7 +95,7 @@ namespace WGneu {
|
||||
}
|
||||
|
||||
private void Create() {
|
||||
using (File.Create(FilePath)) {};
|
||||
using (File.Create(FilePath)) { };
|
||||
}
|
||||
|
||||
private void Delete() {
|
@ -6,7 +6,7 @@ using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Controls;
|
||||
|
||||
namespace WGneu {
|
||||
namespace WGneu.Helpers {
|
||||
static class Validator {
|
||||
|
||||
private static readonly Dictionary<string, string[][]> PHONE_NRS = new() {
|
@ -6,7 +6,7 @@ using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using WGneu.Models;
|
||||
|
||||
namespace WGneu {
|
||||
namespace WGneu.Helpers {
|
||||
public class WgContext : DbContext {
|
||||
public DbSet<Country> Countries { get; set; }
|
||||
public DbSet<Member> Members { get; set; }
|
||||
@ -26,8 +26,7 @@ namespace WGneu {
|
||||
public DbSet<WineVar> WineVarieties { get; set; }
|
||||
|
||||
|
||||
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
||||
{
|
||||
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) {
|
||||
optionsBuilder.UseSqlite("Data Source=\"C:\\Users\\lorenz\\Desktop\\wgtest.sqlite3\"; foreign keys=true");
|
||||
optionsBuilder.UseLazyLoadingProxies();
|
||||
}
|
@ -6,6 +6,7 @@ using System.Diagnostics.CodeAnalysis;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using WGneu.Helpers;
|
||||
|
||||
namespace WGneu.Models {
|
||||
[Table("AT_plz"), PrimaryKey("Plz", "Okz"), Index("Id", IsUnique = true)]
|
||||
|
@ -5,6 +5,7 @@ using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using WGneu.Helpers;
|
||||
|
||||
namespace WGneu.Models {
|
||||
[Table("postal_dest"), PrimaryKey("CountryCode", "Id")]
|
||||
|
@ -12,6 +12,7 @@ using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Shapes;
|
||||
using WGneu.Helpers;
|
||||
using WGneu.Models;
|
||||
|
||||
namespace WGneu.Windows {
|
||||
|
@ -11,6 +11,7 @@ using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Shapes;
|
||||
using WGneu.Helpers;
|
||||
|
||||
namespace WGneu.Windows {
|
||||
public partial class DocumentViewerWindow : Window {
|
||||
|
@ -16,6 +16,7 @@ using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
using WGneu.Documents;
|
||||
using WGneu.Helpers;
|
||||
using WGneu.Models;
|
||||
|
||||
|
||||
|
@ -16,6 +16,7 @@ using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Shapes;
|
||||
using WGneu.Helpers;
|
||||
using WGneu.Models;
|
||||
|
||||
|
||||
@ -257,7 +258,7 @@ namespace WGneu.Windows {
|
||||
}
|
||||
|
||||
private void ContractButton_Click(object sender, RoutedEventArgs e) {
|
||||
var w = new ContractListWindow((Member) MemberList.SelectedItem);
|
||||
var w = new ContractListWindow((Member)MemberList.SelectedItem);
|
||||
w.Show();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user