- UserPermission Binding führen im VS Designer nichtmehr zu Exceptions. Standard: Im Designer hat man für alles Rechte. - Mandator hat Webseite + Logo + Bankverbindung in der Maske - Beispiel für Verwendung von Logo: Report GkvBegleitzettel - Position muss ggf noch angepasst werden - Neue Logik für Ausliefern von Servern: - Ich habe ein Post-Build-Script hinzugefügt, welches nach erfolgreichem Build von Release ein Host/binRelease erzeugt und dort alle DLLs hinkopiert - Verhindert ausliefern von Debug Version! - StringExtionsions ToNullIfEmpty - und sonst nur paar Kleinigkeiten Merge branch 'feature_rene_13_dakota' of ssh://float.ownsoft.de/git/beyondSoft/BeWo * 'feature_rene_13_dakota' of ssh://float.ownsoft.de/git/beyondSoft/BeWo: (56 commits) Dakota Update 1.1 Scripte zusammengefasst Text Anpassung Formular Button fehlt bei IsEnabled=false Getrennte log files DakotaSender, checkt Status nur bei gefunden Items -> Vorbereitung auf permanentes Senden Bericht Format mit Logo, final Altes laden für Frau Schulten in AdministrationView Druckinformation ShowInfoMessage zentral in BeWoApp Format + Logo wird ohne Hintergrund angezeigt TEST - AdministrationView DoSaveCheck Update: Cache jetzt auch asynchrones Speichern ServiceFacade Erweiterung: IsWaiting und WaitUntilAsyncIsFinished SoziotherapieSetting Top Margin Reihenfolge Logo auf Report - Erster Entwurf Bug: Potentieller Speicherverlust + Speichert jetzt letztes Einstellungsfenster Logo bei Mandator - Todo: Transparent wird zu schwarz beim Speichern MandatorView und SoziotherapieSettingsView teilen sich MandatorVM Kein individueller Report -> wird standard mit neuem Logo in der Verwaltung Format + komische Abfolge von PreviewMouseWheel - Parent Control wird Child bevorzugt? Kein Standard Verhalten, wird über eigenen Subreiter bei Administration umgangen ... # Conflicts: # Report/ReportObjects/ServiceInvoiceRO.cs
138 lines
3.3 KiB
C#
138 lines
3.3 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.IO;
|
|
|
|
namespace BeWo
|
|
{
|
|
public enum DebugConfigMode
|
|
{
|
|
SimpleAutoLogin,
|
|
FeatureCustomerWohnhilfe,
|
|
FeatureWohnheimWohneinheit,
|
|
FeatureAuswertungenQuittierungsbelege,
|
|
FeatureDakota
|
|
}
|
|
|
|
public class DebugConfig
|
|
{
|
|
private static readonly string config_file_name = "DebugConfig.txt";
|
|
|
|
public static DebugConfig CurrentConfig { get; } = LoadCurrentDebugConfig();
|
|
public static string ServerUrl { get; set; } = "http://localhost:3777/Host";
|
|
|
|
public DebugConfigMode DebugConfigMode { get; set; }
|
|
|
|
public string Username { get; set; }
|
|
public string Password { get; set; }
|
|
public string Profilename { get; set; }
|
|
|
|
public bool AutoLogin { get; set; }
|
|
public UIContext? SelectView { get; set; }
|
|
/// <summary>
|
|
/// Beschreibt den Index der jeweils gewählten View (UIContext)
|
|
///
|
|
/// Z.b.:
|
|
/// Customer:
|
|
/// - Details: 0
|
|
/// - ...: 1
|
|
/// - ...: 2
|
|
/// - ...: 3
|
|
/// - VermittlungArbeit: 4
|
|
/// - Wohnhilfe: 5
|
|
/// </summary>
|
|
public int? SelectIndex { get; set; }
|
|
|
|
public static DebugConfig SimpleAutoLogin => new DebugConfig()
|
|
{
|
|
DebugConfigMode = DebugConfigMode.SimpleAutoLogin,
|
|
AutoLogin = !Environment.MachineName.Equals("OWNSOFT-JETTEN")
|
|
};
|
|
|
|
private static DebugConfig LoadCurrentDebugConfig()
|
|
{
|
|
#if DEBUG
|
|
try
|
|
{
|
|
var path = AppDomain.CurrentDomain.BaseDirectory;
|
|
var project_path = Directory.GetParent(path).Parent.Parent.FullName;
|
|
var config_path = Path.Combine(project_path, config_file_name);
|
|
|
|
if (!File.Exists(config_path))
|
|
return null;
|
|
|
|
var current_config = File.ReadAllText(config_path);
|
|
|
|
if (string.IsNullOrWhiteSpace(current_config))
|
|
return null;
|
|
|
|
var name2config = GetName2Config();
|
|
|
|
if (name2config.TryGetValue(current_config, out DebugConfig current))
|
|
{
|
|
return current;
|
|
}
|
|
}
|
|
catch (Exception)
|
|
{
|
|
|
|
}
|
|
#endif
|
|
return null;
|
|
|
|
}
|
|
|
|
#if DEBUG
|
|
private static Dictionary<string, DebugConfig> GetName2Config()
|
|
{
|
|
var name2config = new Dictionary<string, DebugConfig>();
|
|
|
|
name2config.Add("SimpleAutoLogin",
|
|
new DebugConfig()
|
|
{
|
|
DebugConfigMode = DebugConfigMode.SimpleAutoLogin,
|
|
AutoLogin = true
|
|
});
|
|
|
|
name2config.Add("FeatureCustomerWohnhilfe",
|
|
new DebugConfig()
|
|
{
|
|
DebugConfigMode = DebugConfigMode.FeatureCustomerWohnhilfe,
|
|
AutoLogin = true,
|
|
SelectView = UIContext.Customer,
|
|
SelectIndex = 5
|
|
});
|
|
|
|
name2config.Add("FeatureWohnheimWohneinheit",
|
|
new DebugConfig()
|
|
{
|
|
DebugConfigMode = DebugConfigMode.FeatureWohnheimWohneinheit,
|
|
AutoLogin = true,
|
|
SelectView = UIContext.Wohnheim
|
|
});
|
|
|
|
name2config.Add("FeatureAuswertungenQuittierungsbelege",
|
|
new DebugConfig()
|
|
{
|
|
DebugConfigMode = DebugConfigMode.FeatureAuswertungenQuittierungsbelege,
|
|
AutoLogin = true,
|
|
SelectView = UIContext.Report
|
|
});
|
|
|
|
name2config.Add("FeatureDakota",
|
|
new DebugConfig()
|
|
{
|
|
DebugConfigMode = DebugConfigMode.FeatureDakota,
|
|
AutoLogin = true,
|
|
SelectView = UIContext.Finance,
|
|
SelectIndex = 8,
|
|
//Username = "m1",
|
|
//Password = "bewobewo",
|
|
//Profilename = "5000000000"
|
|
});
|
|
|
|
return name2config;
|
|
}
|
|
#endif
|
|
}
|
|
}
|