Example #1
0
        private void timer1_Tick(object sender, EventArgs e)
        {
            if (!fileLoaded)
            {
                TextInstruction.LoadFile(Globals.GetPath(PathEnum.Text) + "\\service_step1.rtf");
                fileLoaded      = true;
                timer1.Interval = 1000;
                return;
            }

            CurrentWork++;

            if (CurrentWork >= FTimeWork)
            {
                timer1.Enabled = false;

                data.stage = WorkerStateStage.EndService;

                this.Close();
            }
        }
Example #2
0
        /// <inheritdoc/>
        public string ToDelimitedString()
        {
            CultureInfo culture = CultureInfo.CurrentCulture;

            return(string.Format(
                       culture,
                       StringHelper.StringFormatSequence(0, 15, Configuration.FieldSeparator),
                       Id,
                       SetIdTq1.HasValue ? SetIdTq1.Value.ToString(culture) : null,
                       Quantity?.ToDelimitedString(),
                       RepeatPattern != null ? string.Join(Configuration.FieldRepeatSeparator, RepeatPattern.Select(x => x.ToDelimitedString())) : null,
                       ExplicitTime != null ? string.Join(Configuration.FieldRepeatSeparator, ExplicitTime.Select(x => x.ToString(Consts.TimeFormatPrecisionSecond, culture))) : null,
                       RelativeTimeAndUnits != null ? string.Join(Configuration.FieldRepeatSeparator, RelativeTimeAndUnits.Select(x => x.ToDelimitedString())) : null,
                       ServiceDuration?.ToDelimitedString(),
                       StartDateTime.HasValue ? StartDateTime.Value.ToString(Consts.DateTimeFormatPrecisionSecond, culture) : null,
                       EndDateTime.HasValue ? EndDateTime.Value.ToString(Consts.DateTimeFormatPrecisionSecond, culture) : null,
                       Priority != null ? string.Join(Configuration.FieldRepeatSeparator, Priority.Select(x => x.ToDelimitedString())) : null,
                       ConditionText?.ToDelimitedString(),
                       TextInstruction?.ToDelimitedString(),
                       Conjunction,
                       OccurrenceDuration?.ToDelimitedString(),
                       TotalOccurrences.HasValue ? TotalOccurrences.Value.ToString(Consts.NumericFormat, culture) : null
                       ).TrimEnd(Configuration.FieldSeparator.ToCharArray()));
        }
 private void timer1_Tick(object sender, System.EventArgs e)
 {
     TextInstruction.LoadFile(Globals.GetPath(PathEnum.Text) + "\\service_step2.rtf");
     timer1.Enabled = false;
 }