示例#1
0
    public List <DadoBlock> RetrieveDadoCuts(int stepNumber)
    {
        List <DadoBlock> dadoBlocks = new List <DadoBlock>();

        foreach (DadoBlock dadoBlock in DadosToCut)
        {
            StepID step = dadoBlock.GetComponent <StepID>();
            if (step.UsedInStep(stepNumber))
            {
                dadoBlocks.Add(dadoBlock);
            }
        }
        return(dadoBlocks);
    }
示例#2
0
    public List <CutLine> RetrieveLines(CutLineType cutType, int stepNumber)
    {
        List <CutLine> lines = new List <CutLine>();

        foreach (CutLine cl in LinesToCut)
        {
            StepID step = cl.GetComponent <StepID>();
            if (step.UsedInStep(stepNumber) && cl.CutType == cutType)
            {
                lines.Add(cl);
            }
        }
        return(lines);
    }
        private void Initialize(CelestialBody target, StepID stepID)
        {
            // Set the 'Target' and 'StepName' properties.
            Target = target;
            StepID = stepID;

            // Fields for better readability in the '?:' expression.
            var invalidName = "Invalid Step Name";
            var validName   = $"{Target.Name} {StepID.GetStringValue()}";

            // Set the 'StepName'
            StepName = String.IsNullOrWhiteSpace(target.Name) ? invalidName : validName;

            // Instantiate the 'EnergyRequired' dictionary.
            EnergyRequired = new Dictionary <string, double>
            {
                { "Minimum", 0 },
                { "Maximum", 0 },
                { "Average", 0 },
            };
        }
 public SubwayStepDummy(CelestialBody target, StepID stepID) : base(target, stepID)
 {
 }
示例#5
0
 /// <summary>
 /// Made specifically for the <see cref="EllipticalOrbit"/> class that inherits from <see cref="Orbit"/>.
 /// </summary>
 /// <param name="target">The <see cref="CelestialBody" /> that this information is dedicated to.</param>
 /// <param name="stepID">The <see cref="Enums.StepID"/> that represents what type of SubwayStep this is.</param>
 protected Orbit(CelestialBody target, StepID stepID) : base(target, stepID)
 {
     Initialize();
 }
示例#6
0
        protected static void StaticRegisterJobStep(StepID CurrentStep, IIgorModule Module, IgorRuntimeUtils.JobStepFunc StepFunction)
        {
            List<JobStep> NewSteps = new List<JobStep>();
            StepID Priority = new StepID();

            foreach(KeyValuePair<StepID, List<JobStep>> CurrentPriority in JobSteps)
            {
                if(CurrentPriority.Key.StepPriority == CurrentStep.StepPriority)
                {
                    NewSteps = CurrentPriority.Value;
                    Priority = CurrentPriority.Key;

                    break;
                }
            }

            NewSteps.Add(new JobStep(Module, StepFunction));

            if(JobSteps.ContainsKey(Priority))
            {
                JobSteps[Priority] = NewSteps;
            }
            else
            {
                JobSteps.Add(CurrentStep, NewSteps);
            }
        }
示例#7
0
 public virtual void RegisterJobStep(StepID CurrentStep, IIgorModule Module, IgorRuntimeUtils.JobStepFunc StepFunction)
 {
     StaticRegisterJobStep(CurrentStep, Module, StepFunction);
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="SubwayStep"/> class.
 /// </summary>
 /// <param name="target">The <see cref="CelestialBody"/> that this SubwayStep is dedicated to.</param>
 /// <param name="stepID">The <see cref="Enums.StepID"/> that represents what type of SubwayStep this is.</param>
 protected SubwayStep(CelestialBody target, StepID stepID)
 {
     Initialize(target, stepID);
 }