Beispiel #1
0
        //-----

        //Запуск команды логирования в SuperHistory и отображения индикатора
        public ProgressCommand StartProgress(string name,             //Имя команды
                                             string pars      = "",   //Параметры команды
                                             string context   = null, //Конекст команды
                                             DateTime?endTime = null) //Если не null, то время конца обратного отсчета
        {
            FinishCommand(ProgressCommand);
            FinishCommand(LogCommand);
            FinishCommand(IndicatorTextCommand);
            Command = ProgressCommand = new ProgressCommand(this, Command, name, pars, context, endTime);
            return(ProgressCommand);
        }
Beispiel #2
0
 public void WriteStartSuper(ProgressCommand command)
 {
     CommandSuper = new TestCommandSuper();
     Supers.Add(CommandSuper);
     CommandSuper.Command     = command.Name;
     CommandSuper.Params      = command.Params;
     CommandSuper.PeriodBegin = Logger.PeriodBegin;
     CommandSuper.PeriodEnd   = Logger.PeriodEnd;
     CommandSuper.PeriodMode  = Logger.PeriodMode;
     CommandSuper.Status      = command.Status;
     CommandSuper.Time        = command.StartTime;
     CommandSuper.Context     = command.Context;
 }
Beispiel #3
0
 public void WriteStartSuper(ProgressCommand command)
 {
     _writer.Write(command.Name + ", ");
     if (Logger.PeriodBegin != Static.MinDate)
     {
         _writer.Write("Период: " + Logger.PeriodBegin + " - " + Logger.PeriodEnd + ", " + Logger.PeriodMode + ", ");
     }
     if (!command.Context.IsEmpty())
     {
         _writer.Write(", Контекст: " + command.Context);
     }
     if (!command.Params.IsEmpty())
     {
         _writer.Write(", " + command.Params);
     }
     _writer.WriteLine(command.StartTime);
 }
Beispiel #4
0
 public void WriteStartSuper(ProgressCommand command)
 {
     RunHistoryOperation(_superHistory, () =>
     {
         _superHistory.AddNew();
         _superHistory.Put("Command", command.Name);
         _superHistory.Put("Params", command.Params);
         _superHistory.Put("Context", command.Context, true);
         if (Logger.PeriodCommand != null)
         {
             _superHistory.Put("PeriodBegin", Logger.PeriodBegin);
             _superHistory.Put("PeriodEnd", Logger.PeriodEnd);
             _superHistory.Put("PeriodMode", Logger.PeriodMode);
         }
         _superHistory.Put("Status", command.Status);
         _superHistory.Put("Time", command.StartTime);
         _superHistoryId = _superHistory.GetInt("SuperHistoryId");
     });
 }