From bd63d7d2f7769e5534fb9a58d97358564c2cb674 Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Wed, 7 Feb 2018 14:53:58 +0200 Subject: Implemented progress text on DB Comparers instead of custom logger. --- .../ViewModels/MainViewVM.cs | 61 +--------------------- 1 file changed, 1 insertion(+), 60 deletions(-) (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Synchronization/ViewModels/MainViewVM.cs') diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Synchronization/ViewModels/MainViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Synchronization/ViewModels/MainViewVM.cs index 21d76d7d7..987b9ac4d 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Synchronization/ViewModels/MainViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Synchronization/ViewModels/MainViewVM.cs @@ -19,13 +19,7 @@ namespace Tango.MachineStudio.Synchronization.ViewModels /// public MainViewVM() { - MainViewLogger logger = new MainViewLogger(); - logger.NewLog += (output) => - { - //Log += output + Environment.NewLine; - }; - - LogManager.RegisterLogger(logger); + Log = "Synchronization module started..."; } private String _log; @@ -37,58 +31,5 @@ namespace Tango.MachineStudio.Synchronization.ViewModels get { return _log; } set { _log = value; RaisePropertyChanged(nameof(Log)); } } - - #region Custom Logger - - /// - /// Represents a custom logger. - /// - /// - public class MainViewLogger : ILogger - { - /// - /// Gets or sets a value indicating whether this is enabled. - /// - public bool Enabled { get; set; } - - /// - /// Gets or sets a value indicating whether this will be notified about logs without waiting for the logs queue. - /// - public bool Immediate { get; set; } - - /// - /// Occurs when a new log item is available. - /// - public event Action NewLog; - - /// - /// Initializes a new instance of the class. - /// - public MainViewLogger() - { - Enabled = true; - Immediate = true; - } - - /// - /// Called when a new library exception is available. - /// - /// The output. - public void OnError(LogItemBase output) - { - NewLog?.Invoke(output.TimeStamp.ToTimeString() + ": " + output.GetMessage()); - } - - /// - /// Called when a new library trace is available. - /// - /// The output. - public void OnTrace(LogItemBase output) - { - NewLog?.Invoke(output.TimeStamp.ToTimeString() + ": " + output.GetMessage()); - } - } - - #endregion } } -- cgit v1.3.1