本文整理汇总了C#中FALibrary.Sequence.FASequence.Start方法的典型用法代码示例。如果您正苦于以下问题:C# FASequence.Start方法的具体用法?C# FASequence.Start怎么用?C# FASequence.Start使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FALibrary.Sequence.FASequence
的用法示例。
在下文中一共展示了FASequence.Start方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: MakeLowerPrinterCharging
private void MakeLowerPrinterCharging(FASequence seq, VT5080.SubUnits.FAPrinterUnit printerUnit, FALabelPrinterModule printerModule)
{
seq.AddWatcher(
delegate
{
if (seq.IsStartable())
{
if (printerUnit.LowerPrinterDoorLock.Status ==
printerUnit.LowerPrinterDoorLock.StatusList.Lock)
printerUnit.LowerDoorOpenSwitchLamp.DoTurnOff(this);
else
printerUnit.LowerDoorOpenSwitchLamp.DoTurnOn(this);
}
else
return;
if (VT5080Equipment.State == VT5080Equipment.StateStop ||
VT5080Equipment.State == VT5080Equipment.StateRun ||
VT5080Equipment.State == VT5080Equipment.StateRundown)
{
if (printerUnit.LowerDoorOpenSwitch.IsOn ||
printerModule.LowerPrinterStatus == FALabelPrinterModule.PrinterStatus.ChargingPaper)
{
seq.Start();
}
}
});
seq.Steps.Add("ConfirmChargingable", new StepInfo());
seq.Steps.Add("ConfirmDoorOpenCheck", new StepInfo());
seq.Steps["ConfirmChargingable"].StepIndex =
seq.AddItem(
delegate(FASequence actor, TimeSpan time)
{
if (printerModule.PrintLabel.IsStartable() ||
printerModule.LowerPrinterStatus == FALabelPrinterModule.PrinterStatus.ChargingPaper)
{
printerModule.LowerPrinterStatus = FALabelPrinterModule.PrinterStatus.ChargingPaper;
printerUnit.LowerDoorOpenSwitchLamp.DoTurnOn(actor);
printerUnit.LowerPrinterDoorLock.DoTurnOff(actor);
printerUnit.LowerPrinterStackerLock.DoTurnOff(actor);
actor.NextStep();
}
else if (TimeBlinkLampTime.Time < time)
{
if (printerUnit.LowerDoorOpenSwitchLamp.IsOn)
printerUnit.LowerDoorOpenSwitchLamp.DoTurnOff(actor);
else
printerUnit.LowerDoorOpenSwitchLamp.DoTurnOn(actor);
actor.NextStep("ConfirmChargingable");
}
});
seq.Steps["ConfirmDoorOpenCheck"].StepIndex = seq.AddItem(
delegate(FASequence actor, TimeSpan time)
{
if (printerUnit.LowerPrinterDoorCloseSensor.IsOff)
actor.NextStep();
});
seq.AddItem(new FATime(FATimeType.second, 1));
seq.AddItem(
delegate(FASequence actor, TimeSpan time)
{
if (printerUnit.LowerPrinterDoorCloseSensor.IsOn)
actor.NextStep();
});
seq.AddItem(new FATime(FATimeType.second, 1));
seq.AddItem(
delegate(object obj)
{
printerUnit.LowerPrinterDoorLock.DoTurnOn(this);
printerUnit.LowerPrinterStackerLock.DoTurnOn(this);
});
seq.AddItem(
delegate(FASequence actor, TimeSpan time)
{
if (printerUnit.LowerPrinterDoorLock.Status == printerUnit.LowerPrinterDoorLock.StatusList.Lock &&
printerUnit.LowerPrinterStackerLock.Status == printerUnit.LowerPrinterStackerLock.StatusList.Lock)
{
printerModule.LowerPrinterStatus = FALabelPrinterModule.PrinterStatus.None;
actor.NextStep();
}
else if (TimeDoorLockTimeout.Time < time)
{
int alarm = 0;
if (printerUnit.LowerPrinterDoorLock.Status != printerUnit.LowerPrinterDoorLock.StatusList.Lock)
alarm = AlarmLowerPrinterDoorLockFail;
else
alarm = AlarmLowerPrinterStackerLockFail;
printerUnit.LowerPrinterDoorLock.DoTurnOff(actor);
printerUnit.LowerPrinterStackerLock.DoTurnOff(actor);
string windowName = string.Empty;
var alarmObj = Utility.AlarmUtility.GetAlarm(alarm, "DOOR WARNING");
Manager.MessageWindowManager.Instance.Show(Equipment, "DOOR WARNING", out windowName, alarmObj, printerModule.Name, false);
actor.NextStep("ConfirmDoorOpenCheck");
}
});
//.........这里部分代码省略.........
示例2: AddDebugLogToSequence
protected void AddDebugLogToSequence(FASequence seq)
{
seq.OnStart +=
delegate
{
WriteDebugLog(string.Format("Start {0}.{1}", Name, seq.Name));
};
seq.OnStop +=
delegate
{
WriteDebugLog(string.Format("Stop {0}.{1}", Name, seq.Name));
};
seq.OnTerminate +=
delegate
{
WriteDebugLog(string.Format("Terminate {0}.{1}", Name, seq.Name));
seq.Stop();
seq.ClearState();
seq.Start();
};
}