public FtpTraceViewModel(FtpTraceListener traceListener, string connectionName)
        {
            _traceListener = traceListener;
            var log = traceListener.Log;
            for (var i = log.Count - 1; i >= 0; i--)
            {
                _stringBuilder.Append(log.ElementAt(i));
            }
            Log = _stringBuilder.ToString();
            Title = string.Format(Resx.FtpTraceWindowTitle, connectionName);
            _traceListener.LogChanged += TraceListenerOnLogChanged;

            CloseCommand = new DelegateCommand<bool>(ExecuteCloseCommand);
            ClosingCommand = new DelegateCommand(ExecuteClosingCommand);
        }
Exemple #2
0
 public FtpContent() : base('/')
 {
     _keepAliveTimer.AutoReset = true;
     _keepAliveTimer.Elapsed += KeepAliveTimerOnElapsed;
     TraceListener = new FtpTraceListener();
 }