Пример #1
0
 public string ToString(string format)
 {
     return("Step X: " + StepX.ToString(format) + ",\n" +
            "Number of nodes X: " + NumOfNodesX.ToString() + ",\n" +
            "Step Y: " + StepY.ToString(format) + ",\n" +
            "Number of nodes Y: " + NumOfNodesY.ToString());
 }
Пример #2
0
 public override string ToString()
 {
     return("Step X: " + StepX.ToString() + ",\n" +
            "Number of nodes X: " + NumOfNodesX.ToString() + ",\n" +
            "Step Y: " + StepY.ToString() + ",\n" +
            "Number of nodes Y: " + NumOfNodesY.ToString());
 }
Пример #3
0
 public string ToString(string format)
 {
     return("\nGrid Parametrs: \n" +
            "Step X size: " + StepX.ToString(format) + ",\n" +
            "Number of steps X: " + NodeNumX.ToString() + ",\n" +
            "Step Y size: " + StepY.ToString(format) + ",\n" +
            "Number of steps Y: " + NodeNumY.ToString() + "\n\n");
 }
Пример #4
0
        public override IEnumerable <SvgAttribute> GetAttributes()
        {
            var baseAttributes = base.GetAttributes();

            if (baseAttributes != null)
            {
                foreach (var attr in baseAttributes)
                {
                    // Skip path attributes
                    if (attr.NamespaceUri == XmlNamespace.Svg)
                    {
                        if (attr.LocalName == "stroke-width" || attr.LocalName == "stroke" || attr.LocalName == "stroke-opacity" ||
                            attr.LocalName == "fill" || attr.LocalName == "fill-opacity")
                        {
                            continue;
                        }
                    }

                    yield return(attr);
                }
            }

            yield return(new SvgAttribute("x", "0", XmlNamespace.AurigmaVectorObjects,
                                          () => X.ToString(CultureInfo.InvariantCulture),
                                          v => X = SvgAttribute.ParseFloatAttribute(v)
                                          ));

            yield return(new SvgAttribute("y", "0", XmlNamespace.AurigmaVectorObjects,
                                          () => Y.ToString(CultureInfo.InvariantCulture),
                                          v => Y = SvgAttribute.ParseFloatAttribute(v)
                                          ));

            yield return(new SvgAttribute("cols", "0", XmlNamespace.AurigmaVectorObjects,
                                          () => Cols.ToString(CultureInfo.InvariantCulture),
                                          v => Cols = SvgAttribute.ParseIntAttribute(v)
                                          ));

            yield return(new SvgAttribute("rows", "0", XmlNamespace.AurigmaVectorObjects,
                                          () => Rows.ToString(CultureInfo.InvariantCulture),
                                          v => Rows = SvgAttribute.ParseIntAttribute(v)
                                          ));

            yield return(new SvgAttribute("step-x", "0", XmlNamespace.AurigmaVectorObjects,
                                          () => StepX.ToString(CultureInfo.InvariantCulture),
                                          v => StepX = SvgAttribute.ParseFloatAttribute(v)
                                          ));

            yield return(new SvgAttribute("step-y", "0", XmlNamespace.AurigmaVectorObjects,
                                          () => StepY.ToString(CultureInfo.InvariantCulture),
                                          v => StepY = SvgAttribute.ParseFloatAttribute(v)
                                          ));

            yield return(new SvgAttribute("stroke-fixed-width", "", XmlNamespace.AurigmaVectorObjects,
                                          () => FixedStrokeWidth.ToString(CultureInfo.InvariantCulture).ToLowerInvariant(),
                                          v => FixedStrokeWidth = v != "false"
                                          ));

            yield return(new SvgAttribute("vertical-line-color", "", XmlNamespace.AurigmaVectorObjects,
                                          () => _verticalLineColor,
                                          v => _verticalLineColor = v
                                          ));

            yield return(new SvgAttribute("horizontal-line-color", "", XmlNamespace.AurigmaVectorObjects,
                                          () => _horizontalLineColor,
                                          v => _horizontalLineColor = v
                                          ));
        }