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))); }
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); }
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() }); }
public SetFixFrequencyContext(MainModel radio, FixFrequencyParameter verify) { Radio = radio; this.verify = verify; }
public StepConfiguration FixFrequency(FixFrequencyParameter verify) { return(LoadContext(new SetFixFrequencyContext(radio, verify))); }