Manual control of diverters by mouse clicks on a schematic drawing.
This commit is contained in:
parent
df6741cf1a
commit
ef004ce92e
@ -9,10 +9,11 @@ using System.Threading;
|
||||
using System.Windows.Forms;
|
||||
using log4net;
|
||||
using Config.Entities;
|
||||
using Dirichlet.Numerics;
|
||||
using SchematicDrawing;
|
||||
using TBF.Resources;
|
||||
using TBF.UiBridge;
|
||||
using TBF.UI.Shared;
|
||||
using SchematicDrawing;
|
||||
|
||||
namespace TBF.UI
|
||||
{
|
||||
@ -1114,12 +1115,25 @@ namespace TBF.UI
|
||||
|
||||
if (element == Element.Body)
|
||||
{
|
||||
if (item is TBF.Rig.Uni.Diverter.DiverterCfg)
|
||||
{
|
||||
TBF.Rig.ControlBoard.Uni.UniCB uniCB = TBF.Rig.StateMachine.ControlBoard as TBF.Rig.ControlBoard.Uni.UniCB;
|
||||
if (uniCB != null)
|
||||
{
|
||||
var divCfg = item as TBF.Rig.Uni.Diverter.DiverterCfg;
|
||||
bool divState = (uniCB.Route & ((UInt128)1 << divCfg.BitNr)) != 0;
|
||||
uniCB.SwitchDiverter(true, divCfg.DivNr1, !divState);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if (item is IRouteBasedDrawingItem)
|
||||
{
|
||||
TBF.UiBridge.Bridge.OnRouteChange(this, new TBF.UiBridge.RouteChangeArgs((item as IRouteBasedDrawingItem).BitNr));
|
||||
return;
|
||||
}
|
||||
else if (item is IDrawingItemWithMeasuredVal)
|
||||
|
||||
if (item is IDrawingItemWithMeasuredVal)
|
||||
{
|
||||
TBF.UiBridge.Bridge.OnMeasurementRequest(this, new TBF.UiBridge.MeasurementRequestArgs(item.Name));
|
||||
return;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user