The XMLImportExport
library offers utility methods for the export of whole database tables into XML files as well as a WPF-Window for viewing the export or import progress.
Indicates, that a name of an entry is duplicated.
Accessible Interface:
public DuplicateNameException(string message, Exception innerException)
A default
ThreadStepper
for an export of data.
Accessible Interface:
protected ExportThread(string fileDestination, string exportFailedStep, string exportFailedMessage)
public override void run()
protected abstract void runExport()
A default
ThreadStepper
for an import of data supporting some utility methods.
Accessible Interface:
protected ImportThread(string fileSource, string importFailedStep, string importFailedMessage, string formatExceptionHeader, string dbConstraintExceptionHeader, Dictionary<string, string> dbConstraintMessages)
protected abstract void runImport()
protected TimeSpan ParseManualTime(string timestring)
protected bool CheckVersionImportable(string maximumVersion, string actualVersion)
protected FormatException AssembleFormatException(string message, Exception innerException)
protected FormatException ParseDBConstraintException(string message, Exception e)
A dialog with a header, progress bar and closing button that guides a
ThreadStepper
through it's process execution.The dialog shows the current progress in percent including the message broadcasted from the
ThreadStepper
and offers events to catch whenever the process finishes either successful (ProcessSucceeded
) or not (ProcessFailed
).The appearance of the dialog can be configured using the
ThreadProcessViewerConfig
. The dialog should be shown via theWindow.ShowDialog
-method.
Accessible Interface:
public delegate void ProcessFailedHandler(string message)
public event ProcessFailedHandler ProcessFailed
public delegate void ProcessSucceededHandler()
public event ProcessSucceededHandler ProcessSucceeded
public ThreadProcessViewer(ThreadStepper stepper, ThreadProcessViewerConfig config)
Configuration for a
ThreadProcessViewer
Accessible Interface:
public string Title
public string FinishButtonCaption
public ThreadProcessViewerStyle Style
Configurable style information for a
ThreadProcessViewer
Accessible Interface:
public SolidColorBrush HeaderBackground
public SolidColorBrush Background
public FontFamily HeaderFontFamily
public FontFamily FontFamily
public int HeaderFontSize
public int FontSize
public SolidColorBrush HeaderBorderColor
public int HeaderBorderThickness
The
ThreadStepper
runs a specific process usingrun
that is guided by progress events usingCallStep(float, string)
andCallFinished(Exception)
.The events triggered by those methods can be accessed using
StepDone
andFinished
and can be visualized using aThreadProcessViewer
.
Accessible Interface:
public delegate void StepHandler(float percentage, string message)
public event StepHandler StepDone
public delegate void ResultHandler(Exception result)
public event ResultHandler Finished
protected void CallStep(float percentage, string message)
protected void CallFinished(Exception exc = null)
public abstract void run()
Provides helper methods for the XML export.
Accessible Interface:
public static XElement ExportDataFromTable<T>(System.Data.Entity.DbSet<T> table, List<string> columns, Dictionary<string, Func<T, object>> additionalComputedProperties = null, Func<T, bool> filter = null, Dictionary<string, Func<object, object>> mappings = null, Func<T, List<XElement>> computeChildren = null) where T : class