示例#1
0
        public StepConfiguration FixFrequency(double frequency, RangeState range, SubFrequencyState sub)
        {
            FixFrequencyParameter verify = new FixFrequencyParameter()
            {
                Frequency    = frequency,
                Range        = range,
                SubFrequency = sub
            };

            return(LoadContext(new SetFixFrequencyContext(radio, verify)));
        }
示例#2
0
 public static FixFrequencyParameter[] GetTenFixFrequencyDescriptors()
 {
     FixFrequencyParameter[] descriptor = new FixFrequencyParameter[10];
     for (int i = 0; i < descriptor.Length; i++)
     {
         FixFrequencyParameter parameter = new FixFrequencyParameter();
         parameter.Frequency    = Frequency;
         parameter.Range        = (RangeState)(i % 4);
         parameter.SubFrequency = GetSubFrequencyStateFor(parameter.Frequency);
     }
     return(descriptor);
 }
示例#3
0
        private TimeRadioTask CreateFixFrequencyTask(FixFrequencyParameter parameter = null)
        {
            HandlerBuilder builder        = new HandlerBuilder(radio);
            var            fixedFrequency = (parameter == null)?generator.FixFrequency:parameter;

            //base bulding
            builder.BuildStep().WorkMode(generator.WorkMode);
            builder.BuildStep().Noise(generator.Noise);
            builder.BuildStep().Voltage(VoltageState.Broadcast1);
            builder.BuildStep().Display(generator.Display);
            builder.BuildStep().Power(generator.Power);
            builder.BuildStep().Volume(generator.Volume);

            builder.BuildStep().FixFrequency(fixedFrequency);
            builder.BuildStep().FixAntenna(fixedFrequency.Range, fixedFrequency.SubFrequency);
            //end building

            return(new TimeRadioTask(builder.Handler)
            {
                Description = builder.Handler.Steps.Where(x => x.Type == TypeRadioAction.SetFixFrequency).First().ToString()
            });
        }
示例#4
0
 public SetFixFrequencyContext(MainModel radio, FixFrequencyParameter verify)
 {
     Radio       = radio;
     this.verify = verify;
 }
示例#5
0
 public StepConfiguration FixFrequency(FixFrequencyParameter verify)
 {
     return(LoadContext(new SetFixFrequencyContext(radio, verify)));
 }