コード例 #1
0
        public MtpVisualObjectRecord(MtpSymbolLib symbolLib, MtpSymbolMapRecord config)
        {
            if (config != null)
            {
                this.Name           = config.SymbolDefault;
                this.eClassVersions = PrepDict(config.EClassVersions);
                this.eClassClasses  = PrepDict(config.EClassClasses);
                this.eClassIRDIs    = PrepDict(config.EClassIRDIs);

                if (symbolLib != null && symbolLib.ContainsKey(config.SymbolDefault))
                {
                    var symbol = symbolLib[config.SymbolDefault];
                    this.Symbol         = symbol;
                    this.Placement      = symbol.PreferredPlacement;
                    this.LabelAlignment = symbol.PreferredLabelAlignment;
                }

                this.Priority = config.Priority;
            }
        }
コード例 #2
0
 /// <summary>
 /// Initialize a record.
 /// </summary>
 /// <param name="Name">Name. Not used for matching.</param>
 /// <param name="Symbol"></param>
 /// <param name="eClassVersions">Applicable eClass Versions, delimited by ";". If empty, then any!</param>
 /// <param name="eClassClasses">Applicable eClass Classes, delimited by ";". Only digits allow ("01024455"),
 /// If empty, then eClassIRDI shall be set.</param>
 /// <param name="eClassIRDIs">Applicable eClass IRIDs, delimited by ";". If empty, then eClassClass shall
 /// be set.</param>
 /// <param name="placement"></param>
 /// <param name="labelAlignment"></param>
 /// <param name="prio"></param>
 public MtpVisualObjectRecord(
     string Name,
     MtpSymbol Symbol,
     string eClassVersions = null,
     string eClassClasses  = null,
     string eClassIRDIs    = null,
     Nullable <MtpSymbol.SymbolPlaceType> placement       = null,
     UIElementHelper.DrawToCanvasAlignment labelAlignment = UIElementHelper.DrawToCanvasAlignment.Centered,
     int prio = 1)
 {
     this.Name           = Name;
     this.Symbol         = Symbol;
     this.eClassVersions = PrepDict(eClassVersions);
     this.eClassClasses  = PrepDict(eClassClasses);
     this.eClassIRDIs    = PrepDict(eClassIRDIs);
     if (placement != null)
     {
         this.Placement = placement.Value;
     }
     this.LabelAlignment = labelAlignment;
     this.Priority       = prio;
 }
コード例 #3
0
 public MtpSymbol(MtpSymbol other)
 {
     this.LibName    = "" + other?.LibName;
     this.SymbolName = "" + other?.SymbolName;
     this.SymbolData = other?.SymbolData;
 }