public void GenerateInputBoundary() { var dots = Entities.FindAll(x => x.EntityType == eEntityType.dot); List <string> boundary = new List <string>(); for (int i = 0; i < dots.Count; i++) { Dot dot = (Dot)dots[i]; var node1 = Nodes.Find(x => x.Coord == new XYPT(dot.Points[0].X, dot.Points[0].Y)); var node2 = Nodes.Find(x => x.Coord == new XYPT(dot.Points[0].X + GridSize, dot.Points[0].Y)); var restX = dot.XRestrained ? 0 : 1; var restY = dot.YRestrained ? 0 : 1; var lastLine = i == dots.Count - 1 ? 0 : 1; if (node1 != null && node2 != null) { boundary.Add(node1.Id.ToString() + " " + node2.Id.ToString() + " " + Increment.ToString() + " " + restX + " " + restY + " " + lastLine); } } if (_boundaryType == eBoundary.moving) { boundary.Add("1"); // ADD MOVING BOUNDARY CONDITIONS } else if (_boundaryType == eBoundary.fix) { boundary.Add("0"); } File.WriteAllLines(_exportFolder + "\\" + FileNameWithoutPath + @".boundary.inp", boundary); }
public override string ToString() { if (ScaleType == ScrollIncrementScaleType.Star) { return(string.Format("{0}*", Increment)); } else { return(Increment.ToString()); } }
public override string Process(TextSpan value) { base.Process(value); string param; if (Numbers.Any()) { param = $"{{{string.Join(", ", Numbers)}}}, {Multiple.ToString().ToLowerInvariant()}"; } else { param = $"{Min?.ToString() ?? "nil"}, {Max?.ToString() ?? "nil"}, {Increment?.ToString() ?? "nil"}"; } return($@" ChooseNumber({param}{(Title != null ? $", \"{Title}\"" : "")}) ".Replace("\r\n", "\n").Trim()); }
public string Get(string propertyName) { switch (propertyName) { //ELEMENT case nameof(ClassId): return(ClassId.ToString()); case nameof(AutomationId): return(AutomationId.ToString()); case nameof(Id): return(Id.ToString()); case nameof(StyleId): return(StyleId.ToString()); //VISUAL ELEMENT case nameof(AnchorX): return(AnchorX.ToString()); case nameof(AnchorY): return(AnchorY.ToString()); case nameof(BackgroundColor): return(BackgroundColor.ToHex()); case nameof(Width): return(this.Width.ToString()); case nameof(Height): return(this.Height.ToString()); case nameof(IsEnabled): return(IsEnabled.ToString()); case nameof(WidthRequest): return(this.WidthRequest.ToString()); case nameof(HeightRequest): return(this.HeightRequest.ToString()); case nameof(IsFocused): return(IsFocused.ToString()); case nameof(IsVisible): return(IsVisible.ToString()); case nameof(InputTransparent): return(InputTransparent.ToString()); case nameof(X): return(this.X.ToString()); case nameof(Y): return(this.Y.ToString()); case nameof(Opacity): return(this.Opacity.ToString()); case nameof(TranslationX): return(this.TranslationX.ToString()); case nameof(TranslationY): return(this.TranslationY.ToString()); case nameof(Rotation): return(this.Rotation.ToString()); case nameof(RotationX): return(this.RotationX.ToString()); case nameof(RotationY): return(this.RotationY.ToString()); case nameof(Scale): return(this.Scale.ToString()); //VIEW case nameof(Margin): return(this.Margin.ToString()); case nameof(VerticalOptions): return(this.VerticalOptions.ToString()); case nameof(HorizontalOptions): return(this.HorizontalOptions.ToString()); //STEPPER case nameof(Maximum): return(Maximum.ToString()); case nameof(Minimum): return(Minimum.ToString()); case nameof(Value): return(Value.ToString()); case nameof(Increment): return(Increment.ToString()); default: return(string.Empty); } }
public string GetPropertiesAsXml() { StringBuilder sbResult = new StringBuilder(); sbResult.Append("<" + (String.IsNullOrEmpty(ColumnName) ? "_" : ColumnName) + GetRegexProperties()); if (!String.IsNullOrEmpty((PrecedingRegEx ?? "").TrimEnd('"'))) { sbResult.Append(" Prefix = '" + PrecedingRegEx + "'"); } if (!String.IsNullOrEmpty((TrailingRegEx ?? "").TrimEnd('"'))) { sbResult.Append(" Suffix = '" + TrailingRegEx + "'"); } if (ColumnType != RegexColumnType.STRING) { sbResult.Append(" Type = '" + ColumnType.ToString() + "'"); } if (!String.IsNullOrEmpty(ValueMatchingCondition)) { sbResult.Append(" Condition = '" + ValueMatchingCondition + "'"); } if (AutoIncrement) { sbResult.Append(" AutoIncrement = '" + AutoIncrement.ToString() + "'"); } if (AutoIncrement) { sbResult.Append(" StartValue = '" + StartValue.ToString() + "'"); } if (AutoIncrement) { sbResult.Append(" Increment = '" + Increment.ToString() + "'"); } if (!String.IsNullOrEmpty(Expression)) { sbResult.Append(" Expression = '" + Expression + "'"); } if (IsForeignKey) { sbResult.Append(" ForeignKey = '" + IsForeignKey.ToString() + "'"); } if (IsUnique) { sbResult.Append(" PrimaryKey = '" + IsUnique.ToString() + "'"); } if (!String.IsNullOrEmpty(DisplayName)) { sbResult.Append(" DisplayName = '" + DisplayName + "'"); } if (!String.IsNullOrEmpty(Description)) { sbResult.Append(" Description = '" + Description + "'"); } if (!String.IsNullOrEmpty(Default)) { sbResult.Append(" Default = '" + Default + "'"); } sbResult.Append(" />"); return(sbResult.ToString()); }
private void MenuItem_Click(object sender, RoutedEventArgs e) { PART_IncrementTextBox.Text = Increment.ToString(); PART_Popup.IsOpen = true; }
public string GetConfig() { return(WaveColor.R.ToString() + "|" + WaveColor.G.ToString() + "|" + WaveColor.B.ToString() + "|" + Increment.ToString() + "|" + BarsInfluence.ToString() + "|" + PromLoops.ToString()); }
/// <inheritdoc /> public IEnumerable <string> Serialize() => new [] { PREFIX, BaseTrainName.FullName, Increment.ToString() };
public override string ToString() { return($"{SqlColumn.Name} ({Seed.ToString(CultureInfo.InvariantCulture)}, {Increment.ToString(CultureInfo.InvariantCulture)})"); }