private void add3Features(FeatureList aFL) { var f1 = new Feature(); f1.Name = "F1"; aFL.AddFeature(f1); f1 = new Feature(); f1.Name = "F2"; aFL.AddFeature(f1); f1 = new Feature(); f1.Name = "F3"; aFL.AddFeature(f1); }
public FeatureList GetFeatureList() { if (null == dxf) { throw new Exception("Dxf file has not been set."); } FeatureList fList = new FeatureList(); foreach (var layer in dxf.Layers) { Feature feature = new Feature(); feature.Name = layer.Name; feature.Color = new ColorAsBrush (layer.Color.R , layer.Color.G , layer.Color.B ); feature.FillColor = feature.Color; //feature.Style = layer.LineType; feature.Weight = layer.Lineweight.Value; feature.Printable = layer.Plot; fList.AddFeature(feature); } return(fList); }
/// <summary> /// add feature to case /// </summary> /// <param name="featureName"></param> /// <param name="featureType"></param> /// <param name="featureValue"></param> /// <param name="featureWeight"></param> /// <param name="isKey"></param> /// <param name="isIndex"></param> public void AddFeature(string featureName, int featureType, object featureValue, double featureWeight, bool isKey, bool isIndex, string featureUnit) { Feature feature = new Feature(featureName, featureType, featureValue, featureWeight, isKey, isIndex, featureUnit); _featureList.AddFeature(feature); }