2020-05-26 08:28:40 +00:00
|
|
|
|
///
|
|
|
|
|
|
/// Copyright (c) 2020 Sensus Slovensko a.s.
|
|
|
|
|
|
///
|
|
|
|
|
|
using System;
|
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
using System.Drawing;
|
|
|
|
|
|
using System.Linq;
|
|
|
|
|
|
using System.Text;
|
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
|
|
namespace SchematicDrawing
|
|
|
|
|
|
{
|
|
|
|
|
|
public class DrawingShape
|
|
|
|
|
|
{
|
|
|
|
|
|
public readonly Shape Shape; /// see enum SchematicDrawing.Shape
|
|
|
|
|
|
public readonly Sz Sz; /// see enum SchematicDrawing.Sz
|
|
|
|
|
|
public readonly int SzX; /// Size X in SchematicDrawing.Const.Step pixels
|
|
|
|
|
|
public readonly int SzY; /// Size Y in SchematicDrawing.Const.Step pixels
|
|
|
|
|
|
|
2020-06-03 07:31:06 +00:00
|
|
|
|
public readonly int OffsX; /// Offset of left/top coordinate of the bitmap when rendering
|
|
|
|
|
|
public readonly int OffsY; /// Offset of left/top coordinate of the bitmap when rendering
|
|
|
|
|
|
public readonly int Wid; /// Width of the bitmap when rendering, original bitmap is resized to this size
|
|
|
|
|
|
public readonly int Hgh; /// Height of the bitmap when rendering, original bitmap is resized to this size
|
|
|
|
|
|
|
|
|
|
|
|
public readonly Node[] Nodes; /// Nodes of this shape
|
|
|
|
|
|
public readonly Edge[] Edges; /// Edges (in the open state in case there are two states: open/closed)
|
|
|
|
|
|
|
2021-03-29 09:10:52 +00:00
|
|
|
|
/// open (route bit = 1), wet
|
2020-05-26 08:28:40 +00:00
|
|
|
|
public readonly bool HasImg; /// True when there is an image of this item to be displayed
|
|
|
|
|
|
public readonly Image ImgRight; /// Bitmap to be drawn (in the open state in case there are two states: open/closed)
|
|
|
|
|
|
public readonly Image ImgUp;
|
|
|
|
|
|
public readonly Image ImgLeft;
|
|
|
|
|
|
public readonly Image ImgDown;
|
|
|
|
|
|
public readonly Image ImgRightFlipped;
|
|
|
|
|
|
public readonly Image ImgUpFlipped;
|
|
|
|
|
|
public readonly Image ImgLeftFlipped;
|
|
|
|
|
|
public readonly Image ImgDownFlipped;
|
|
|
|
|
|
|
2021-03-29 09:10:52 +00:00
|
|
|
|
/// open (route bit = 1), dry
|
|
|
|
|
|
public readonly bool HasOpenDry; /// true = this shape can be displayed as dry in an open state
|
|
|
|
|
|
public readonly Image ImgRightOpenDry; /// Optional bitmap in the closed state, size should be the same as the size of Bmp
|
|
|
|
|
|
public readonly Image ImgUpOpenDry;
|
|
|
|
|
|
public readonly Image ImgLeftOpenDry;
|
|
|
|
|
|
public readonly Image ImgDownOpenDry;
|
|
|
|
|
|
public readonly Image ImgRightFlippedOpenDry;
|
|
|
|
|
|
public readonly Image ImgUpFlippedOpenDry;
|
|
|
|
|
|
public readonly Image ImgLeftFlippedOpenDry;
|
|
|
|
|
|
public readonly Image ImgDownFlippedOpenDry;
|
|
|
|
|
|
|
|
|
|
|
|
/// closed (route bit = 0), wet
|
|
|
|
|
|
public readonly bool HasClosedWet; /// true = This shape can be displayed as wet in a closed state
|
|
|
|
|
|
public readonly Image ImgRightClosedWet; /// Optional bitmap in the closed state, size should be the same as the size of Bmp
|
|
|
|
|
|
public readonly Image ImgUpClosedWet;
|
|
|
|
|
|
public readonly Image ImgLeftClosedWet;
|
|
|
|
|
|
public readonly Image ImgDownClosedWet;
|
|
|
|
|
|
public readonly Image ImgRightFlippedClosedWet;
|
|
|
|
|
|
public readonly Image ImgUpFlippedClosedWet;
|
|
|
|
|
|
public readonly Image ImgLeftFlippedClosedWet;
|
|
|
|
|
|
public readonly Image ImgDownFlippedClosedWet;
|
|
|
|
|
|
|
|
|
|
|
|
/// closed (route bit = 0), dry
|
|
|
|
|
|
public readonly bool HasClosedDry; /// true = This shape can be displayed as dry in a closed state
|
|
|
|
|
|
public readonly Image ImgRightClosedDry; /// Optional bitmap in the closed state, size should be the same as the size of Bmp
|
|
|
|
|
|
public readonly Image ImgUpClosedDry;
|
|
|
|
|
|
public readonly Image ImgLeftClosedDry;
|
|
|
|
|
|
public readonly Image ImgDownClosedDry;
|
|
|
|
|
|
public readonly Image ImgRightFlippedClosedDry;
|
|
|
|
|
|
public readonly Image ImgUpFlippedClosedDry;
|
|
|
|
|
|
public readonly Image ImgLeftFlippedClosedDry;
|
|
|
|
|
|
public readonly Image ImgDownFlippedClosedDry;
|
2020-05-26 08:28:40 +00:00
|
|
|
|
|
2020-06-03 07:31:06 +00:00
|
|
|
|
public readonly bool HasVacuum; /// true = This shape can display vacuum
|
|
|
|
|
|
public readonly Image ImgRightVacuum; /// Optional bitmap in the closed state, size should be the same as the size of Bmp
|
|
|
|
|
|
public readonly Image ImgUpVacuum;
|
|
|
|
|
|
public readonly Image ImgLeftVacuum;
|
|
|
|
|
|
public readonly Image ImgDownVacuum;
|
|
|
|
|
|
public readonly Image ImgRightFlippedVacuum;
|
|
|
|
|
|
public readonly Image ImgUpFlippedVacuum;
|
|
|
|
|
|
public readonly Image ImgLeftFlippedVacuum;
|
|
|
|
|
|
public readonly Image ImgDownFlippedVacuum;
|
|
|
|
|
|
|
2021-02-25 12:38:24 +00:00
|
|
|
|
|
2020-06-03 07:31:06 +00:00
|
|
|
|
DrawingShape(Shape shape, Sz sz, int szX, int szY, Node[] nodes = null, Edge[] edges = null,
|
|
|
|
|
|
int offsX = -10, int offsY = -10, int wid = 20, int hgh = 20,
|
2021-03-29 09:10:52 +00:00
|
|
|
|
Bitmap bmp = null, /// wet, open (route bit = 1)
|
|
|
|
|
|
Bitmap bmpClosedDry = null, /// dry (Dist == int.MaxValue), closed (route bit = 0)
|
|
|
|
|
|
Bitmap bmpVacuum = null, /// vacuum (int.MaxValue > Dist && Dist > Const.Vacuum)
|
|
|
|
|
|
Bitmap bmpOpenDry = null, /// dry (Dist == int.MaxValue), open (route bit = 1)
|
|
|
|
|
|
Bitmap bmpClosedWet = null) /// wet, closed (route bit = 0) ... diverter only
|
2020-05-26 08:28:40 +00:00
|
|
|
|
{
|
|
|
|
|
|
Shape = shape;
|
|
|
|
|
|
Sz = sz;
|
|
|
|
|
|
SzX = szX;
|
|
|
|
|
|
SzY = szY;
|
2020-06-03 07:31:06 +00:00
|
|
|
|
OffsX = offsX;
|
|
|
|
|
|
OffsY = offsY;
|
|
|
|
|
|
Wid = wid;
|
|
|
|
|
|
Hgh = hgh;
|
|
|
|
|
|
Nodes = (nodes != null) ? nodes : new Node[0];
|
|
|
|
|
|
Edges = (edges != null) ? edges : new Edge[0];
|
|
|
|
|
|
|
2020-05-26 08:28:40 +00:00
|
|
|
|
HasImg = (bmp != null);
|
|
|
|
|
|
if (HasImg)
|
|
|
|
|
|
{
|
|
|
|
|
|
ImgRight = bmp.Clone() as Image;
|
|
|
|
|
|
bmp.RotateFlip(RotateFlipType.Rotate90FlipNone);
|
|
|
|
|
|
ImgDown = bmp.Clone() as Image;
|
|
|
|
|
|
bmp.RotateFlip(RotateFlipType.Rotate90FlipNone);
|
|
|
|
|
|
ImgLeft = bmp.Clone() as Image;
|
|
|
|
|
|
bmp.RotateFlip(RotateFlipType.Rotate90FlipNone);
|
|
|
|
|
|
ImgUp = bmp.Clone() as Image;
|
|
|
|
|
|
bmp.RotateFlip(RotateFlipType.Rotate90FlipNone);
|
|
|
|
|
|
bmp.RotateFlip(RotateFlipType.RotateNoneFlipY);
|
|
|
|
|
|
ImgRightFlipped = bmp.Clone() as Image;
|
|
|
|
|
|
bmp.RotateFlip(RotateFlipType.Rotate90FlipNone);
|
|
|
|
|
|
ImgDownFlipped = bmp.Clone() as Image;
|
|
|
|
|
|
bmp.RotateFlip(RotateFlipType.Rotate90FlipNone);
|
|
|
|
|
|
ImgLeftFlipped = bmp.Clone() as Image;
|
|
|
|
|
|
bmp.RotateFlip(RotateFlipType.Rotate90FlipNone);
|
|
|
|
|
|
ImgUpFlipped = bmp.Clone() as Image;
|
|
|
|
|
|
bmp.RotateFlip(RotateFlipType.Rotate90FlipNone);
|
|
|
|
|
|
bmp.RotateFlip(RotateFlipType.RotateNoneFlipY);
|
|
|
|
|
|
}
|
2021-03-29 09:10:52 +00:00
|
|
|
|
HasClosedDry = (bmpClosedDry != null);
|
|
|
|
|
|
if (HasClosedDry)
|
2020-05-26 08:28:40 +00:00
|
|
|
|
{
|
2021-03-29 09:10:52 +00:00
|
|
|
|
ImgRightClosedDry = bmpClosedDry.Clone() as Image;
|
|
|
|
|
|
bmpClosedDry.RotateFlip(RotateFlipType.Rotate90FlipNone);
|
|
|
|
|
|
ImgDownClosedDry = bmpClosedDry.Clone() as Image;
|
|
|
|
|
|
bmpClosedDry.RotateFlip(RotateFlipType.Rotate90FlipNone);
|
|
|
|
|
|
ImgLeftClosedDry = bmpClosedDry.Clone() as Image;
|
|
|
|
|
|
bmpClosedDry.RotateFlip(RotateFlipType.Rotate90FlipNone);
|
|
|
|
|
|
ImgUpClosedDry = bmpClosedDry.Clone() as Image;
|
|
|
|
|
|
bmpClosedDry.RotateFlip(RotateFlipType.Rotate90FlipNone);
|
|
|
|
|
|
bmpClosedDry.RotateFlip(RotateFlipType.RotateNoneFlipY);
|
|
|
|
|
|
ImgRightFlippedClosedDry = bmpClosedDry.Clone() as Image;
|
|
|
|
|
|
bmpClosedDry.RotateFlip(RotateFlipType.Rotate90FlipNone);
|
|
|
|
|
|
ImgDownFlippedClosedDry = bmpClosedDry.Clone() as Image;
|
|
|
|
|
|
bmpClosedDry.RotateFlip(RotateFlipType.Rotate90FlipNone);
|
|
|
|
|
|
ImgLeftFlippedClosedDry = bmpClosedDry.Clone() as Image;
|
|
|
|
|
|
bmpClosedDry.RotateFlip(RotateFlipType.Rotate90FlipNone);
|
|
|
|
|
|
ImgUpFlippedClosedDry = bmpClosedDry.Clone() as Image;
|
|
|
|
|
|
bmpClosedDry.RotateFlip(RotateFlipType.Rotate90FlipNone);
|
|
|
|
|
|
bmpClosedDry.RotateFlip(RotateFlipType.RotateNoneFlipY);
|
2020-05-26 08:28:40 +00:00
|
|
|
|
}
|
2020-06-03 07:31:06 +00:00
|
|
|
|
HasVacuum = (bmpVacuum != null);
|
|
|
|
|
|
if (HasVacuum)
|
|
|
|
|
|
{
|
|
|
|
|
|
ImgRightVacuum = bmpVacuum.Clone() as Image;
|
|
|
|
|
|
bmpVacuum.RotateFlip(RotateFlipType.Rotate90FlipNone);
|
|
|
|
|
|
ImgDownVacuum = bmpVacuum.Clone() as Image;
|
|
|
|
|
|
bmpVacuum.RotateFlip(RotateFlipType.Rotate90FlipNone);
|
|
|
|
|
|
ImgLeftVacuum = bmpVacuum.Clone() as Image;
|
|
|
|
|
|
bmpVacuum.RotateFlip(RotateFlipType.Rotate90FlipNone);
|
|
|
|
|
|
ImgUpVacuum = bmpVacuum.Clone() as Image;
|
|
|
|
|
|
bmpVacuum.RotateFlip(RotateFlipType.Rotate90FlipNone);
|
|
|
|
|
|
bmpVacuum.RotateFlip(RotateFlipType.RotateNoneFlipY);
|
|
|
|
|
|
ImgRightFlippedVacuum = bmpVacuum.Clone() as Image;
|
|
|
|
|
|
bmpVacuum.RotateFlip(RotateFlipType.Rotate90FlipNone);
|
|
|
|
|
|
ImgDownFlippedVacuum = bmpVacuum.Clone() as Image;
|
|
|
|
|
|
bmpVacuum.RotateFlip(RotateFlipType.Rotate90FlipNone);
|
|
|
|
|
|
ImgLeftFlippedVacuum = bmpVacuum.Clone() as Image;
|
|
|
|
|
|
bmpVacuum.RotateFlip(RotateFlipType.Rotate90FlipNone);
|
|
|
|
|
|
ImgUpFlippedVacuum = bmpVacuum.Clone() as Image;
|
|
|
|
|
|
bmpVacuum.RotateFlip(RotateFlipType.Rotate90FlipNone);
|
|
|
|
|
|
bmpVacuum.RotateFlip(RotateFlipType.RotateNoneFlipY);
|
|
|
|
|
|
}
|
|
|
|
|
|
HasOpenDry = (bmpOpenDry != null);
|
|
|
|
|
|
if (HasOpenDry)
|
|
|
|
|
|
{
|
|
|
|
|
|
ImgRightOpenDry = bmpOpenDry.Clone() as Image;
|
|
|
|
|
|
bmpOpenDry.RotateFlip(RotateFlipType.Rotate90FlipNone);
|
|
|
|
|
|
ImgDownOpenDry = bmpOpenDry.Clone() as Image;
|
|
|
|
|
|
bmpOpenDry.RotateFlip(RotateFlipType.Rotate90FlipNone);
|
|
|
|
|
|
ImgLeftOpenDry = bmpOpenDry.Clone() as Image;
|
|
|
|
|
|
bmpOpenDry.RotateFlip(RotateFlipType.Rotate90FlipNone);
|
|
|
|
|
|
ImgUpOpenDry = bmpOpenDry.Clone() as Image;
|
|
|
|
|
|
bmpOpenDry.RotateFlip(RotateFlipType.Rotate90FlipNone);
|
|
|
|
|
|
bmpOpenDry.RotateFlip(RotateFlipType.RotateNoneFlipY);
|
|
|
|
|
|
ImgRightFlippedOpenDry = bmpOpenDry.Clone() as Image;
|
|
|
|
|
|
bmpOpenDry.RotateFlip(RotateFlipType.Rotate90FlipNone);
|
|
|
|
|
|
ImgDownFlippedOpenDry = bmpOpenDry.Clone() as Image;
|
|
|
|
|
|
bmpOpenDry.RotateFlip(RotateFlipType.Rotate90FlipNone);
|
|
|
|
|
|
ImgLeftFlippedOpenDry = bmpOpenDry.Clone() as Image;
|
|
|
|
|
|
bmpOpenDry.RotateFlip(RotateFlipType.Rotate90FlipNone);
|
|
|
|
|
|
ImgUpFlippedOpenDry = bmpOpenDry.Clone() as Image;
|
|
|
|
|
|
bmpOpenDry.RotateFlip(RotateFlipType.Rotate90FlipNone);
|
|
|
|
|
|
bmpOpenDry.RotateFlip(RotateFlipType.RotateNoneFlipY);
|
|
|
|
|
|
}
|
2021-03-29 09:10:52 +00:00
|
|
|
|
HasClosedWet = (bmpClosedWet != null);
|
|
|
|
|
|
if (HasClosedWet)
|
|
|
|
|
|
{
|
|
|
|
|
|
ImgRightClosedWet = bmpClosedWet.Clone() as Image;
|
|
|
|
|
|
bmpClosedWet.RotateFlip(RotateFlipType.Rotate90FlipNone);
|
|
|
|
|
|
ImgDownClosedWet = bmpClosedWet.Clone() as Image;
|
|
|
|
|
|
bmpClosedWet.RotateFlip(RotateFlipType.Rotate90FlipNone);
|
|
|
|
|
|
ImgLeftClosedWet = bmpClosedWet.Clone() as Image;
|
|
|
|
|
|
bmpClosedWet.RotateFlip(RotateFlipType.Rotate90FlipNone);
|
|
|
|
|
|
ImgUpClosedWet = bmpClosedWet.Clone() as Image;
|
|
|
|
|
|
bmpClosedWet.RotateFlip(RotateFlipType.Rotate90FlipNone);
|
|
|
|
|
|
bmpClosedWet.RotateFlip(RotateFlipType.RotateNoneFlipY);
|
|
|
|
|
|
ImgRightFlippedClosedWet = bmpClosedWet.Clone() as Image;
|
|
|
|
|
|
bmpClosedWet.RotateFlip(RotateFlipType.Rotate90FlipNone);
|
|
|
|
|
|
ImgDownFlippedClosedWet = bmpClosedWet.Clone() as Image;
|
|
|
|
|
|
bmpClosedWet.RotateFlip(RotateFlipType.Rotate90FlipNone);
|
|
|
|
|
|
ImgLeftFlippedClosedWet = bmpClosedWet.Clone() as Image;
|
|
|
|
|
|
bmpClosedWet.RotateFlip(RotateFlipType.Rotate90FlipNone);
|
|
|
|
|
|
ImgUpFlippedClosedWet = bmpClosedWet.Clone() as Image;
|
|
|
|
|
|
bmpClosedWet.RotateFlip(RotateFlipType.Rotate90FlipNone);
|
|
|
|
|
|
bmpClosedWet.RotateFlip(RotateFlipType.RotateNoneFlipY);
|
|
|
|
|
|
}
|
2020-05-26 08:28:40 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
2020-06-03 07:31:06 +00:00
|
|
|
|
public Rectangle GetRotatedFlippedImageRectangle(IDrawingItem item)
|
2020-05-26 08:28:40 +00:00
|
|
|
|
{
|
2020-06-03 07:31:06 +00:00
|
|
|
|
const int G = SchematicDrawing.Const.GridSize;
|
|
|
|
|
|
|
|
|
|
|
|
if (item.Flip)
|
2020-05-26 08:28:40 +00:00
|
|
|
|
{
|
|
|
|
|
|
/// Flipped (mirror) image
|
2020-06-03 07:31:06 +00:00
|
|
|
|
switch (item.Orient)
|
2020-05-26 08:28:40 +00:00
|
|
|
|
{
|
|
|
|
|
|
default:
|
2020-06-03 07:31:06 +00:00
|
|
|
|
case Orient.R: return new Rectangle(item.X + OffsX, item.Y + G * SzY - Hgh - OffsY, Wid, Hgh);
|
|
|
|
|
|
case Orient.Up: return new Rectangle(item.X + OffsY, item.Y + OffsX, Hgh, Wid);
|
|
|
|
|
|
case Orient.L: return new Rectangle(item.X + G * SzX - Wid - OffsX, item.Y + OffsY, Wid, Hgh);
|
|
|
|
|
|
case Orient.Dn: return new Rectangle(item.X + G * SzY - Hgh - OffsY, item.Y + G * SzX - Wid - OffsX, Hgh, Wid);
|
2020-05-26 08:28:40 +00:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
|
|
|
|
|
/// Normal image
|
2020-06-03 07:31:06 +00:00
|
|
|
|
switch (item.Orient)
|
2020-05-26 08:28:40 +00:00
|
|
|
|
{
|
|
|
|
|
|
default:
|
2020-06-03 07:31:06 +00:00
|
|
|
|
case Orient.R: return new Rectangle(item.X + OffsX, item.Y + OffsY, Wid, Hgh);
|
|
|
|
|
|
case Orient.Up: return new Rectangle(item.X + OffsY, item.Y + G * SzX - Wid - OffsX, Hgh, Wid);
|
|
|
|
|
|
case Orient.L: return new Rectangle(item.X + G * SzX - Wid - OffsX, item.Y + G * SzY - Hgh - OffsY, Wid, Hgh);
|
|
|
|
|
|
case Orient.Dn: return new Rectangle(item.X + G * SzY - Hgh - OffsY, item.Y + OffsX, Hgh, Wid);
|
2020-05-26 08:28:40 +00:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Get coordinates and orientation of the rotated/flipped node
|
|
|
|
|
|
/// </summary>
|
2020-06-03 07:31:06 +00:00
|
|
|
|
/// <param name="item">Item</param>
|
|
|
|
|
|
/// <param name="nodeId">Node id</param>
|
2020-05-26 08:28:40 +00:00
|
|
|
|
/// <returns>Rotated/flipped node</returns>
|
2020-06-03 07:31:06 +00:00
|
|
|
|
public Node GetRotatedFlippedNode(IDrawingItem item, int nodeId)
|
2020-05-26 08:28:40 +00:00
|
|
|
|
{
|
2020-06-03 07:31:06 +00:00
|
|
|
|
if (Nodes == null || nodeId < 0 || nodeId >= Nodes.Length) return new Node(0, 0, Orient.R);
|
|
|
|
|
|
Node node = Nodes[nodeId];
|
|
|
|
|
|
|
|
|
|
|
|
if (item.Flip)
|
2020-05-26 08:28:40 +00:00
|
|
|
|
{
|
|
|
|
|
|
/// Flipped
|
2020-06-03 07:31:06 +00:00
|
|
|
|
int ori = (int)node.Orient;
|
2020-05-26 08:28:40 +00:00
|
|
|
|
if (ori % 2 == 1) ori += 2;
|
2020-06-03 07:31:06 +00:00
|
|
|
|
ori += (int)item.Orient;
|
|
|
|
|
|
switch (item.Orient)
|
2020-05-26 08:28:40 +00:00
|
|
|
|
{
|
|
|
|
|
|
default:
|
2020-06-03 07:31:06 +00:00
|
|
|
|
case Orient.R: return new Node(node.X, SzY - node.Y, (Orient)(ori % 4));
|
|
|
|
|
|
case Orient.Up: return new Node(SzY - node.Y, SzX - node.X, (Orient)(ori % 4));
|
|
|
|
|
|
case Orient.L: return new Node(SzX - node.X, node.Y, (Orient)(ori % 4));
|
|
|
|
|
|
case Orient.Dn: return new Node(node.Y, node.X, (Orient)(ori % 4));
|
2020-05-26 08:28:40 +00:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
|
|
|
|
|
/// Normal
|
2020-06-03 07:31:06 +00:00
|
|
|
|
int ori = (int)item.Orient + (int)node.Orient;
|
|
|
|
|
|
switch (item.Orient)
|
2020-05-26 08:28:40 +00:00
|
|
|
|
{
|
|
|
|
|
|
default:
|
2020-06-03 07:31:06 +00:00
|
|
|
|
case Orient.R: return new Node(node.X, node.Y, (Orient)(ori % 4));
|
|
|
|
|
|
case Orient.Up: return new Node(node.Y, SzX - node.X, (Orient)(ori % 4));
|
|
|
|
|
|
case Orient.L: return new Node(SzX - node.X, SzY - node.Y, (Orient)(ori % 4));
|
|
|
|
|
|
case Orient.Dn: return new Node(SzY - node.Y, node.X, (Orient)(ori % 4));
|
2020-05-26 08:28:40 +00:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public static DrawingShape[] Shapes;
|
|
|
|
|
|
///
|
|
|
|
|
|
public static int DrShIx(Shape shape, Sz sz) { return (int)shape * (int)Sz.Count + (int)sz; }
|
|
|
|
|
|
///
|
|
|
|
|
|
public static DrawingShape GetDrawingShape(Shape shape, Sz sz) { return Shapes[DrShIx(shape, sz)]; }
|
|
|
|
|
|
///
|
2020-06-03 07:31:06 +00:00
|
|
|
|
public static DrawingShape GetDrawingShape(IDrawingItem item) { return (item != null) ? Shapes[DrShIx(item.Shape, item.Sz)] : null; }
|
2020-05-26 08:28:40 +00:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Static constructor that initializes Shapes[] array
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
static DrawingShape()
|
|
|
|
|
|
{
|
|
|
|
|
|
Shapes = new DrawingShape[(int)Shape.Count * (int)Sz.Count];
|
|
|
|
|
|
|
2021-02-25 12:38:24 +00:00
|
|
|
|
/// Ambient
|
|
|
|
|
|
Shapes[DrShIx(Shape.Ambient, Sz.S)] = new DrawingShape(Shape.Ambient, Sz.S, 0, 0);
|
|
|
|
|
|
Shapes[DrShIx(Shape.Ambient, Sz.M)] = new DrawingShape(Shape.Ambient, Sz.M, 0, 0);
|
|
|
|
|
|
Shapes[DrShIx(Shape.Ambient, Sz.L)] = new DrawingShape(Shape.Ambient, Sz.L, 0, 0);
|
|
|
|
|
|
Shapes[DrShIx(Shape.Ambient, Sz.XL)] = new DrawingShape(Shape.Ambient, Sz.XL, 0, 0);
|
|
|
|
|
|
|
2020-05-26 08:28:40 +00:00
|
|
|
|
/// Temperature meter
|
2020-06-03 07:31:06 +00:00
|
|
|
|
Shapes[DrShIx(Shape.TempM, Sz.S)] = new DrawingShape(Shape.TempM, Sz.S, 0, 0);
|
|
|
|
|
|
Shapes[DrShIx(Shape.TempM, Sz.M)] = new DrawingShape(Shape.TempM, Sz.M, 0, 0);
|
|
|
|
|
|
Shapes[DrShIx(Shape.TempM, Sz.L)] = new DrawingShape(Shape.TempM, Sz.L, 0, 0);
|
|
|
|
|
|
Shapes[DrShIx(Shape.TempM, Sz.XL)] = new DrawingShape(Shape.TempM, Sz.XL, 0, 0);
|
2020-05-26 08:28:40 +00:00
|
|
|
|
|
|
|
|
|
|
/// Pressure meter
|
2020-06-03 07:31:06 +00:00
|
|
|
|
Shapes[DrShIx(Shape.PressM, Sz.S)] = new DrawingShape(Shape.PressM, Sz.S, 0, 0);
|
|
|
|
|
|
Shapes[DrShIx(Shape.PressM, Sz.M)] = new DrawingShape(Shape.PressM, Sz.M, 0, 0);
|
|
|
|
|
|
Shapes[DrShIx(Shape.PressM, Sz.L)] = new DrawingShape(Shape.PressM, Sz.L, 0, 0);
|
|
|
|
|
|
Shapes[DrShIx(Shape.PressM, Sz.XL)] = new DrawingShape(Shape.PressM, Sz.XL, 0, 0);
|
2020-05-26 08:28:40 +00:00
|
|
|
|
|
|
|
|
|
|
/// Valve
|
2020-06-03 07:31:06 +00:00
|
|
|
|
Shapes[DrShIx(Shape.Valve, Sz.S)] = new DrawingShape(Shape.Valve, Sz.S, 2, 2,
|
|
|
|
|
|
new Node[] { new Node(0, 1, Orient.L), new Node(2, 1, Orient.R) },
|
|
|
|
|
|
new Edge[] { new Edge(0, 1, 20, RouteCouple.OpenWhen1), new Edge(1, 0, 20, RouteCouple.OpenWhen1) },
|
|
|
|
|
|
0, 0, 20, 20,
|
2021-03-29 09:10:52 +00:00
|
|
|
|
Properties.Resources.Valve_S_open,
|
|
|
|
|
|
Properties.Resources.Valve_S_closed,
|
|
|
|
|
|
Properties.Resources.Valve_S_vacuum,
|
|
|
|
|
|
Properties.Resources.Valve_S_open_dry);
|
2020-06-03 07:31:06 +00:00
|
|
|
|
Shapes[DrShIx(Shape.Valve, Sz.M)] = new DrawingShape(Shape.Valve, Sz.M, 3, 4,
|
|
|
|
|
|
new Node[] { new Node(0, 2, Orient.L), new Node(3, 2, Orient.R) },
|
|
|
|
|
|
new Edge[] { new Edge(0, 1, 30, RouteCouple.OpenWhen1), new Edge(1, 0, 30, RouteCouple.OpenWhen1) },
|
|
|
|
|
|
0, 5, 30, 30,
|
2021-03-29 09:10:52 +00:00
|
|
|
|
Properties.Resources.Valve_M_open,
|
|
|
|
|
|
Properties.Resources.Valve_M_closed,
|
|
|
|
|
|
Properties.Resources.Valve_M_vacuum,
|
|
|
|
|
|
Properties.Resources.Valve_M_open_dry);
|
2020-06-03 07:31:06 +00:00
|
|
|
|
Shapes[DrShIx(Shape.Valve, Sz.L)] = new DrawingShape(Shape.Valve, Sz.L, 4, 4,
|
|
|
|
|
|
new Node[] { new Node(0, 2, Orient.L), new Node(4, 2, Orient.R) },
|
|
|
|
|
|
new Edge[] { new Edge(0, 1, 40, RouteCouple.OpenWhen1), new Edge(1, 0, 40, RouteCouple.OpenWhen1) },
|
|
|
|
|
|
0, 0, 40, 40,
|
2021-03-29 09:10:52 +00:00
|
|
|
|
Properties.Resources.Valve_L_open,
|
|
|
|
|
|
Properties.Resources.Valve_L_closed,
|
|
|
|
|
|
Properties.Resources.Valve_L_vacuum,
|
|
|
|
|
|
Properties.Resources.Valve_L_open_dry);
|
2020-06-03 07:31:06 +00:00
|
|
|
|
Shapes[DrShIx(Shape.Valve, Sz.XL)] = new DrawingShape(Shape.Valve, Sz.XL, 5, 6,
|
|
|
|
|
|
new Node[] { new Node(0, 3, Orient.L), new Node(5, 3, Orient.R) },
|
|
|
|
|
|
new Edge[] { new Edge(0, 1, 50, RouteCouple.OpenWhen1), new Edge(1, 0, 50, RouteCouple.OpenWhen1) },
|
|
|
|
|
|
0, 5, 50, 50,
|
2021-03-29 09:10:52 +00:00
|
|
|
|
Properties.Resources.Valve_XL_open,
|
|
|
|
|
|
Properties.Resources.Valve_XL_closed,
|
|
|
|
|
|
Properties.Resources.Valve_XL_vacuum,
|
|
|
|
|
|
Properties.Resources.Valve_XL_open_dry);
|
2021-03-02 06:55:19 +00:00
|
|
|
|
/// Diverter
|
|
|
|
|
|
Shapes[DrShIx(Shape.Div, Sz.S)] = new DrawingShape(Shape.Div, Sz.S, 2, 2,
|
|
|
|
|
|
new Node[] { new Node(2, 0, Orient.Up), new Node(1, 2, Orient.Dn), new Node(3, 2, Orient.Dn) },
|
|
|
|
|
|
new Edge[] { new Edge(0, 1, 20), new Edge(0, 2, 20, RouteCouple.OpenWhen1) },
|
|
|
|
|
|
0, 0, 40, 20,
|
2021-03-29 09:10:52 +00:00
|
|
|
|
Properties.Resources.Div_S_tank_wet,
|
|
|
|
|
|
Properties.Resources.Div_S_sink_dry,
|
|
|
|
|
|
null,
|
|
|
|
|
|
Properties.Resources.Div_S_tank_dry,
|
|
|
|
|
|
Properties.Resources.Div_S_sink_wet);
|
2021-03-02 06:55:19 +00:00
|
|
|
|
Shapes[DrShIx(Shape.Div, Sz.M)] = new DrawingShape(Shape.Div, Sz.M, 3, 4,
|
|
|
|
|
|
new Node[] { new Node(2, 0, Orient.Up), new Node(1, 3, Orient.Dn), new Node(3, 3, Orient.Dn) },
|
|
|
|
|
|
new Edge[] { new Edge(0, 1, 30), new Edge(0, 2, 30, RouteCouple.OpenWhen1) },
|
|
|
|
|
|
0, 0, 40, 30,
|
2021-03-29 09:10:52 +00:00
|
|
|
|
Properties.Resources.Div_M_tank_wet,
|
|
|
|
|
|
Properties.Resources.Div_M_sink_dry,
|
|
|
|
|
|
null,
|
|
|
|
|
|
Properties.Resources.Div_M_tank_dry,
|
|
|
|
|
|
Properties.Resources.Div_M_sink_wet);
|
2021-03-02 06:55:19 +00:00
|
|
|
|
Shapes[DrShIx(Shape.Div, Sz.L)] = new DrawingShape(Shape.Div, Sz.L, 4, 4,
|
|
|
|
|
|
new Node[] { new Node(3, 0, Orient.Up), new Node(1, 4, Orient.Dn), new Node(5, 4, Orient.Dn) },
|
|
|
|
|
|
new Edge[] { new Edge(0, 1, 40), new Edge(0, 2, 40, RouteCouple.OpenWhen1) },
|
|
|
|
|
|
0, 0, 60, 40,
|
2021-03-29 09:10:52 +00:00
|
|
|
|
Properties.Resources.Div_L_tank_wet,
|
|
|
|
|
|
Properties.Resources.Div_L_sink_dry,
|
|
|
|
|
|
null,
|
|
|
|
|
|
Properties.Resources.Div_L_tank_dry,
|
|
|
|
|
|
Properties.Resources.Div_L_sink_wet);
|
2021-03-02 06:55:19 +00:00
|
|
|
|
Shapes[DrShIx(Shape.Div, Sz.XL)] = new DrawingShape(Shape.Div, Sz.XL, 5, 6,
|
|
|
|
|
|
new Node[] { new Node(3, 0, Orient.Up), new Node(1, 5, Orient.Dn), new Node(5, 5, Orient.Dn) },
|
|
|
|
|
|
new Edge[] { new Edge(0, 1, 50), new Edge(0, 2, 50, RouteCouple.OpenWhen1) },
|
|
|
|
|
|
0, 0, 60, 50,
|
2021-03-29 09:10:52 +00:00
|
|
|
|
Properties.Resources.Div_XL_tank_wet,
|
|
|
|
|
|
Properties.Resources.Div_XL_sink_dry,
|
|
|
|
|
|
null,
|
|
|
|
|
|
Properties.Resources.Div_XL_tank_dry,
|
|
|
|
|
|
Properties.Resources.Div_XL_sink_wet);
|
2020-05-26 08:28:40 +00:00
|
|
|
|
/// Regulation valve
|
2020-06-03 07:31:06 +00:00
|
|
|
|
Shapes[DrShIx(Shape.RegV, Sz.S)] = new DrawingShape(Shape.RegV, Sz.S, 2, 2,
|
|
|
|
|
|
new Node[] { new Node(0, 1, Orient.L), new Node(2, 1, Orient.R) },
|
|
|
|
|
|
new Edge[] { new Edge(0, 1, 20), new Edge(1, 0, 20) },
|
2021-03-29 09:10:52 +00:00
|
|
|
|
0, 0, 20, 20,
|
|
|
|
|
|
Properties.Resources.RegV_S);
|
2020-06-03 07:31:06 +00:00
|
|
|
|
Shapes[DrShIx(Shape.RegV, Sz.M)] = new DrawingShape(Shape.RegV, Sz.M, 3, 4,
|
|
|
|
|
|
new Node[] { new Node(0, 2, Orient.L), new Node(3, 2, Orient.R) },
|
|
|
|
|
|
new Edge[] { new Edge(0, 1, 30), new Edge(1, 0, 30) },
|
2021-03-29 09:10:52 +00:00
|
|
|
|
0, 5, 30, 30,
|
|
|
|
|
|
Properties.Resources.RegV_M);
|
2020-06-03 07:31:06 +00:00
|
|
|
|
Shapes[DrShIx(Shape.RegV, Sz.L)] = new DrawingShape(Shape.RegV, Sz.L, 4, 4,
|
|
|
|
|
|
new Node[] { new Node(0, 2, Orient.L), new Node(4, 2, Orient.R) },
|
|
|
|
|
|
new Edge[] { new Edge(0, 1, 40), new Edge(1, 0, 40) },
|
2021-03-29 09:10:52 +00:00
|
|
|
|
0, 0, 40, 40,
|
|
|
|
|
|
Properties.Resources.RegV_L);
|
2020-06-03 07:31:06 +00:00
|
|
|
|
Shapes[DrShIx(Shape.RegV, Sz.XL)] = new DrawingShape(Shape.RegV, Sz.XL, 5, 6,
|
|
|
|
|
|
new Node[] { new Node(0, 3, Orient.L), new Node(5, 3, Orient.R) },
|
|
|
|
|
|
new Edge[] { new Edge(0, 1, 50), new Edge(1, 0, 50) },
|
2021-03-29 09:10:52 +00:00
|
|
|
|
0, 5, 50, 50,
|
|
|
|
|
|
Properties.Resources.RegV_XL);
|
2020-05-26 08:28:40 +00:00
|
|
|
|
/// Pump
|
2020-06-03 07:31:06 +00:00
|
|
|
|
Shapes[DrShIx(Shape.Pump, Sz.S)] = new DrawingShape(Shape.Pump, Sz.S, 2, 2,
|
|
|
|
|
|
new Node[] { new Node(0, 1, Orient.L), new Node(2, 1, Orient.R) },
|
|
|
|
|
|
new Edge[] { new Edge(0, 1, 20, RouteCouple.OpenWhen1) },
|
2021-03-29 09:10:52 +00:00
|
|
|
|
0, 0, 20, 20,
|
|
|
|
|
|
Properties.Resources.Pump_S_open,
|
|
|
|
|
|
Properties.Resources.Pump_S_closed);
|
2020-06-03 07:31:06 +00:00
|
|
|
|
Shapes[DrShIx(Shape.Pump, Sz.M)] = new DrawingShape(Shape.Pump, Sz.M, 3, 4,
|
|
|
|
|
|
new Node[] { new Node(0, 2, Orient.L), new Node(3, 2, Orient.R) },
|
|
|
|
|
|
new Edge[] { new Edge(0, 1, 30, RouteCouple.OpenWhen1) },
|
2021-03-29 09:10:52 +00:00
|
|
|
|
0, 5, 30, 30,
|
|
|
|
|
|
Properties.Resources.Pump_M_open,
|
|
|
|
|
|
Properties.Resources.Pump_M_closed);
|
2020-06-03 07:31:06 +00:00
|
|
|
|
Shapes[DrShIx(Shape.Pump, Sz.L)] = new DrawingShape(Shape.Pump, Sz.L, 4, 4,
|
|
|
|
|
|
new Node[] { new Node(0, 2, Orient.L), new Node(4, 2, Orient.R) },
|
|
|
|
|
|
new Edge[] { new Edge(0, 1, 40, RouteCouple.OpenWhen1) },
|
2021-03-29 09:10:52 +00:00
|
|
|
|
0, 0, 40, 40,
|
|
|
|
|
|
Properties.Resources.Pump_L_open,
|
|
|
|
|
|
Properties.Resources.Pump_L_closed);
|
2020-06-03 07:31:06 +00:00
|
|
|
|
Shapes[DrShIx(Shape.Pump, Sz.XL)] = new DrawingShape(Shape.Pump, Sz.XL, 5, 6,
|
|
|
|
|
|
new Node[] { new Node(0, 3, Orient.L), new Node(5, 3, Orient.R) },
|
|
|
|
|
|
new Edge[] { new Edge(0, 1, 50, RouteCouple.OpenWhen1) },
|
2021-03-29 09:10:52 +00:00
|
|
|
|
0, 5, 50, 50,
|
|
|
|
|
|
Properties.Resources.Pump_XL_open,
|
|
|
|
|
|
Properties.Resources.Pump_XL_closed);
|
2020-05-26 08:28:40 +00:00
|
|
|
|
/// Pump with frequency inverter
|
2020-06-03 07:31:06 +00:00
|
|
|
|
Shapes[DrShIx(Shape.PumpFM, Sz.S)] = new DrawingShape(Shape.PumpFM, Sz.S, 2, 2,
|
|
|
|
|
|
new Node[] { new Node(0, 1, Orient.L), new Node(2, 1, Orient.R) },
|
|
|
|
|
|
new Edge[] { new Edge(0, 1, 20, RouteCouple.OpenWhen1) },
|
2021-03-29 09:10:52 +00:00
|
|
|
|
0, 0, 20, 20,
|
|
|
|
|
|
Properties.Resources.Pump_S_open,
|
|
|
|
|
|
Properties.Resources.Pump_S_closed);
|
2020-06-03 07:31:06 +00:00
|
|
|
|
Shapes[DrShIx(Shape.PumpFM, Sz.M)] = new DrawingShape(Shape.PumpFM, Sz.M, 3, 4,
|
|
|
|
|
|
new Node[] { new Node(0, 2, Orient.L), new Node(3, 2, Orient.R) },
|
|
|
|
|
|
new Edge[] { new Edge(0, 1, 30, RouteCouple.OpenWhen1) },
|
2021-03-29 09:10:52 +00:00
|
|
|
|
0, 5, 30, 30,
|
|
|
|
|
|
Properties.Resources.Pump_M_open,
|
|
|
|
|
|
Properties.Resources.Pump_M_closed);
|
2020-06-03 07:31:06 +00:00
|
|
|
|
Shapes[DrShIx(Shape.PumpFM, Sz.L)] = new DrawingShape(Shape.PumpFM, Sz.L, 4, 4,
|
|
|
|
|
|
new Node[] { new Node(0, 2, Orient.L), new Node(4, 2, Orient.R) },
|
|
|
|
|
|
new Edge[] { new Edge(0, 1, 40, RouteCouple.OpenWhen1) },
|
2021-03-29 09:10:52 +00:00
|
|
|
|
0, 0, 40, 40,
|
|
|
|
|
|
Properties.Resources.Pump_L_open,
|
|
|
|
|
|
Properties.Resources.Pump_L_closed);
|
2020-06-03 07:31:06 +00:00
|
|
|
|
Shapes[DrShIx(Shape.PumpFM, Sz.XL)] = new DrawingShape(Shape.PumpFM, Sz.XL, 5, 6,
|
|
|
|
|
|
new Node[] { new Node(0, 3, Orient.L), new Node(5, 3, Orient.R) },
|
|
|
|
|
|
new Edge[] { new Edge(0, 1, 50, RouteCouple.OpenWhen1) },
|
2021-03-29 09:10:52 +00:00
|
|
|
|
0, 5, 50, 50,
|
|
|
|
|
|
Properties.Resources.Pump_XL_open,
|
|
|
|
|
|
Properties.Resources.Pump_XL_closed);
|
2020-05-26 08:28:40 +00:00
|
|
|
|
/// Flow meter
|
2020-06-03 07:31:06 +00:00
|
|
|
|
Shapes[DrShIx(Shape.FlowM, Sz.S)] = new DrawingShape(Shape.FlowM, Sz.S, 2, 2,
|
2021-03-29 09:10:52 +00:00
|
|
|
|
new Node[] { new Node(0, 1, Orient.L), new Node(2, 1, Orient.R) },
|
|
|
|
|
|
new Edge[] { new Edge(0, 1, 20) },
|
|
|
|
|
|
0, 0, 20, 20,
|
|
|
|
|
|
Properties.Resources.FlowM_S);
|
2020-06-03 07:31:06 +00:00
|
|
|
|
Shapes[DrShIx(Shape.FlowM, Sz.M)] = new DrawingShape(Shape.FlowM, Sz.M, 3, 4,
|
2021-03-29 09:10:52 +00:00
|
|
|
|
new Node[] { new Node(0, 2, Orient.L), new Node(3, 2, Orient.R) },
|
|
|
|
|
|
new Edge[] { new Edge(0, 1, 30) },
|
|
|
|
|
|
0, 5, 30, 30,
|
|
|
|
|
|
Properties.Resources.FlowM_M);
|
2020-06-03 07:31:06 +00:00
|
|
|
|
Shapes[DrShIx(Shape.FlowM, Sz.L)] = new DrawingShape(Shape.FlowM, Sz.L, 4, 4,
|
2021-03-29 09:10:52 +00:00
|
|
|
|
new Node[] { new Node(0, 2, Orient.L), new Node(4, 2, Orient.R) },
|
|
|
|
|
|
new Edge[] { new Edge(0, 1, 40) },
|
|
|
|
|
|
0, 0, 40, 40,
|
|
|
|
|
|
Properties.Resources.FlowM_L);
|
2020-06-03 07:31:06 +00:00
|
|
|
|
Shapes[DrShIx(Shape.FlowM, Sz.XL)] = new DrawingShape(Shape.FlowM, Sz.XL, 5, 6,
|
2021-03-29 09:10:52 +00:00
|
|
|
|
new Node[] { new Node(0, 3, Orient.L), new Node(5, 3, Orient.R) },
|
|
|
|
|
|
new Edge[] { new Edge(0, 1, 50) },
|
|
|
|
|
|
0, 5, 50, 50,
|
|
|
|
|
|
Properties.Resources.FlowM_XL);
|
2020-05-26 08:28:40 +00:00
|
|
|
|
/// Water meter
|
2020-06-03 07:31:06 +00:00
|
|
|
|
Shapes[DrShIx(Shape.WaterM, Sz.L)] = new DrawingShape(Shape.WaterM, Sz.L, 4, 4,
|
2020-05-26 08:28:40 +00:00
|
|
|
|
new Node[] { new Node(0, 2, Orient.L), new Node(4, 2, Orient.R) },
|
2020-06-03 07:31:06 +00:00
|
|
|
|
new Edge[] { new Edge(0, 1, 40), new Edge(1, 0, 40) },
|
2021-03-29 09:10:52 +00:00
|
|
|
|
0, 0, 40, 40,
|
|
|
|
|
|
Properties.Resources.WaterM_L);
|
2020-06-03 07:31:06 +00:00
|
|
|
|
Shapes[DrShIx(Shape.WaterM, Sz.S)] = Shapes[DrShIx(Shape.WaterM, Sz.L)];
|
|
|
|
|
|
Shapes[DrShIx(Shape.WaterM, Sz.M)] = Shapes[DrShIx(Shape.WaterM, Sz.L)];
|
2020-05-26 08:28:40 +00:00
|
|
|
|
Shapes[DrShIx(Shape.WaterM, Sz.XL)] = Shapes[DrShIx(Shape.WaterM, Sz.L)];
|
|
|
|
|
|
|
2020-06-03 07:31:06 +00:00
|
|
|
|
/// Scale
|
|
|
|
|
|
Shapes[DrShIx(Shape.Scale, Sz.S)] = new DrawingShape(Shape.Scale, Sz.S, 6, 8, new Node[] { new Node(3, 8, Orient.Dn) }, null, 0, 0, 60, 80, Properties.Resources.Scale_S);
|
|
|
|
|
|
Shapes[DrShIx(Shape.Scale, Sz.M)] = new DrawingShape(Shape.Scale, Sz.M, 8, 9, new Node[] { new Node(4, 9, Orient.Dn) }, null, 0, 0, 80, 90, Properties.Resources.Scale_M);
|
|
|
|
|
|
Shapes[DrShIx(Shape.Scale, Sz.L)] = new DrawingShape(Shape.Scale, Sz.L, 12, 11, new Node[] { new Node(6, 11, Orient.Dn) }, null, 0, 0, 120, 110, Properties.Resources.Scale_L);
|
|
|
|
|
|
Shapes[DrShIx(Shape.Scale, Sz.XL)] = new DrawingShape(Shape.Scale, Sz.XL, 16, 13, new Node[] { new Node(8, 13, Orient.Dn) }, null, 0, 0, 160, 130, Properties.Resources.Scale_XL);
|
|
|
|
|
|
|
|
|
|
|
|
/// Tank
|
|
|
|
|
|
Shapes[DrShIx(Shape.Tank, Sz.S)] = new DrawingShape(Shape.Tank, Sz.S, 10, 8, new Node[] { new Node(0, 6, Orient.L) }, null, 0, 0, 100, 80, Properties.Resources.Tank_S);
|
|
|
|
|
|
Shapes[DrShIx(Shape.Tank, Sz.M)] = new DrawingShape(Shape.Tank, Sz.M, 12, 9, new Node[] { new Node(0, 7, Orient.L) }, null, 0, 0, 120, 90, Properties.Resources.Tank_M);
|
|
|
|
|
|
Shapes[DrShIx(Shape.Tank, Sz.L)] = new DrawingShape(Shape.Tank, Sz.L, 15, 11, new Node[] { new Node(0, 9, Orient.L) }, null, 0, 0, 150, 110, Properties.Resources.Tank_L);
|
|
|
|
|
|
Shapes[DrShIx(Shape.Tank, Sz.XL)] = new DrawingShape(Shape.Tank, Sz.XL, 20, 13, new Node[] { new Node(0, 11, Orient.L) }, null, 0, 0, 200, 130, Properties.Resources.Tank_XL);
|
|
|
|
|
|
|
2020-05-26 08:28:40 +00:00
|
|
|
|
/// Junction
|
2020-06-03 07:31:06 +00:00
|
|
|
|
Shapes[DrShIx(Shape.Junction, Sz.None)] = new DrawingShape(Shape.Junction, Sz.None, 0, 0, new Node[] { new Node(0, 0, Orient.R) });
|
2021-03-29 09:10:52 +00:00
|
|
|
|
Shapes[DrShIx(Shape.Junction, Sz.S)] = new DrawingShape(Shape.Junction, Sz.S, 2, 2,
|
|
|
|
|
|
new Node[] { new Node(1, 1, Orient.R) }, null,
|
|
|
|
|
|
0, 0, 20, 20,
|
|
|
|
|
|
Properties.Resources.Junction_S_wet,
|
|
|
|
|
|
Properties.Resources.Junction_S_dry,
|
|
|
|
|
|
Properties.Resources.Junction_S_vacuum);
|
|
|
|
|
|
Shapes[DrShIx(Shape.Junction, Sz.M)] = new DrawingShape(Shape.Junction, Sz.M, 2, 2,
|
|
|
|
|
|
new Node[] { new Node(1, 1, Orient.R) }, null,
|
|
|
|
|
|
0, 0, 20, 20,
|
|
|
|
|
|
Properties.Resources.Junction_M_wet,
|
|
|
|
|
|
Properties.Resources.Junction_M_dry,
|
|
|
|
|
|
Properties.Resources.Junction_M_vacuum);
|
|
|
|
|
|
Shapes[DrShIx(Shape.Junction, Sz.L)] = new DrawingShape(Shape.Junction, Sz.L, 2, 2,
|
|
|
|
|
|
new Node[] { new Node(1, 1, Orient.R) }, null,
|
|
|
|
|
|
0, 0, 20, 20,
|
|
|
|
|
|
Properties.Resources.Junction_L_wet,
|
|
|
|
|
|
Properties.Resources.Junction_L_dry,
|
|
|
|
|
|
Properties.Resources.Junction_L_vacuum);
|
|
|
|
|
|
Shapes[DrShIx(Shape.Junction, Sz.XL)] = new DrawingShape(Shape.Junction, Sz.XL, 2, 2,
|
|
|
|
|
|
new Node[] { new Node(1, 1, Orient.R) }, null,
|
|
|
|
|
|
0, 0, 20, 20,
|
|
|
|
|
|
Properties.Resources.Junction_XL_wet,
|
|
|
|
|
|
Properties.Resources.Junction_XL_dry,
|
|
|
|
|
|
Properties.Resources.Junction_XL_vacuum);
|
2020-05-26 08:28:40 +00:00
|
|
|
|
/// Knee
|
2020-06-03 07:31:06 +00:00
|
|
|
|
Shapes[DrShIx(Shape.Knee, Sz.S)] = new DrawingShape(Shape.Knee, Sz.S, 2, 2,
|
|
|
|
|
|
new Node[] { new Node(0, 1, Orient.L), new Node(1, 0, Orient.Up) },
|
|
|
|
|
|
new Edge[] { new Edge(0, 1, 18), new Edge(1, 0, 18) },
|
2021-03-29 09:10:52 +00:00
|
|
|
|
0, 0, 20, 20,
|
|
|
|
|
|
Properties.Resources.Knee_S_wet,
|
|
|
|
|
|
Properties.Resources.Knee_S_dry,
|
|
|
|
|
|
Properties.Resources.Knee_S_vacuum);
|
2020-06-03 07:31:06 +00:00
|
|
|
|
Shapes[DrShIx(Shape.Knee, Sz.M)] = new DrawingShape(Shape.Knee, Sz.M, 2, 2,
|
|
|
|
|
|
new Node[] { new Node(0, 1, Orient.L), new Node(1, 0, Orient.Up) },
|
|
|
|
|
|
new Edge[] { new Edge(0, 1, 18), new Edge(1, 0, 18) },
|
2021-03-29 09:10:52 +00:00
|
|
|
|
0, 0, 20, 20,
|
|
|
|
|
|
Properties.Resources.Knee_M_wet,
|
|
|
|
|
|
Properties.Resources.Knee_M_dry,
|
|
|
|
|
|
Properties.Resources.Knee_M_vacuum);
|
2020-06-03 07:31:06 +00:00
|
|
|
|
Shapes[DrShIx(Shape.Knee, Sz.L)] = new DrawingShape(Shape.Knee, Sz.L, 2, 2,
|
|
|
|
|
|
new Node[] { new Node(0, 1, Orient.L), new Node(1, 0, Orient.Up) },
|
|
|
|
|
|
new Edge[] { new Edge(0, 1, 17), new Edge(1, 0, 17) },
|
2021-03-29 09:10:52 +00:00
|
|
|
|
0, 0, 20, 20,
|
|
|
|
|
|
Properties.Resources.Knee_L_wet,
|
|
|
|
|
|
Properties.Resources.Knee_L_dry,
|
|
|
|
|
|
Properties.Resources.Knee_L_vacuum);
|
2020-06-03 07:31:06 +00:00
|
|
|
|
Shapes[DrShIx(Shape.Knee, Sz.XL)] = new DrawingShape(Shape.Knee, Sz.XL, 4, 4,
|
|
|
|
|
|
new Node[] { new Node(0, 2, Orient.L), new Node(2, 0, Orient.Up) },
|
|
|
|
|
|
new Edge[] { new Edge(0, 1, 36), new Edge(1, 0, 36) },
|
2021-03-29 09:10:52 +00:00
|
|
|
|
0, 0, 40, 40,
|
|
|
|
|
|
Properties.Resources.Knee_XL_wet,
|
|
|
|
|
|
Properties.Resources.Knee_XL_dry,
|
|
|
|
|
|
Properties.Resources.Knee_XL_vacuum);
|
2020-06-03 07:31:06 +00:00
|
|
|
|
/// Vacuum
|
|
|
|
|
|
Shapes[DrShIx(Shape.Vacuum, Sz.L)] = new DrawingShape(Shape.Vacuum, Sz.L, 6, 2,
|
|
|
|
|
|
new Node[] { new Node(0, 1, Orient.L), new Node(6, 1, Orient.R), new Node(4, 0, Orient.Up) },
|
|
|
|
|
|
new Edge[] { new Edge(0, 1, 60), new Edge(1, 0, 60), new Edge(0, 2, Const.Vacuum) },
|
2021-03-29 09:10:52 +00:00
|
|
|
|
0, 0, 60, 20,
|
|
|
|
|
|
Properties.Resources.Vacuum_L_wet,
|
|
|
|
|
|
Properties.Resources.Vacuum_L_dry);
|
2020-06-03 07:31:06 +00:00
|
|
|
|
Shapes[DrShIx(Shape.Vacuum, Sz.S)] = Shapes[DrShIx(Shape.Vacuum, Sz.L)];
|
|
|
|
|
|
Shapes[DrShIx(Shape.Vacuum, Sz.M)] = Shapes[DrShIx(Shape.Vacuum, Sz.L)];
|
|
|
|
|
|
Shapes[DrShIx(Shape.Vacuum, Sz.XL)] = Shapes[DrShIx(Shape.Vacuum, Sz.L)];
|
2021-02-25 12:38:24 +00:00
|
|
|
|
|
|
|
|
|
|
/// Control board UNI
|
|
|
|
|
|
Shapes[DrShIx(Shape.UniCB, Sz.L)] = new DrawingShape(Shape.UniCB, Sz.L, 2, 2, new Node[] { }, null, 0, 0, 20, 20,
|
2021-03-18 17:22:25 +00:00
|
|
|
|
Properties.Resources.UniCB_M_error,
|
2021-03-29 09:10:52 +00:00
|
|
|
|
Properties.Resources.UniCB_M_on);
|
2021-02-25 12:38:24 +00:00
|
|
|
|
Shapes[DrShIx(Shape.UniCB, Sz.S)] = Shapes[DrShIx(Shape.UniCB, Sz.L)];
|
|
|
|
|
|
Shapes[DrShIx(Shape.UniCB, Sz.M)] = Shapes[DrShIx(Shape.UniCB, Sz.L)];
|
|
|
|
|
|
Shapes[DrShIx(Shape.UniCB, Sz.XL)] = Shapes[DrShIx(Shape.UniCB, Sz.L)];
|
2020-05-26 08:28:40 +00:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|