Exemple #1
0
 public void addRelation(FeatureRelation featureRelation)
 {
     if (_featureRelations.IndexOf(featureRelation) == -1)
     {
         _featureRelations.Add(featureRelation);
     }
 }
Exemple #2
0
        public FeatureDiagram(string filename)
        {
            _Filename         = filename;
            _rootFeature      = new Feature();
            _rootFeature.Name = "root";
            _rootFeature.XPos = 387.5;
            _rootFeature.YPos = 25;
            FeatureRelation rel = new FeatureRelation(_rootFeature);

            rel.Type = FeatureRelation.RelationType.Other;
            Feature f1 = new Feature();

            f1.Name = "A";
            f1.XPos = 50;
            f1.YPos = 125;
            Feature f2 = new Feature();

            f2.Name = "B";
            f2.XPos = 275;
            f2.YPos = 125;
            rel.AddChildFeature(f1);
            rel.AddChildFeature(f2);
            FeatureRelation rel1 = new FeatureRelation(_rootFeature);

            rel1.Type = FeatureRelation.RelationType.Other;
            Feature f3 = new Feature();

            f3.Name = "C";
            f3.XPos = 500;
            f3.YPos = 125;
            Feature f4 = new Feature();

            f4.Name = "D";
            f4.XPos = 725;
            f4.YPos = 125;
            rel1.AddChildFeature(f3);
            rel1.AddChildFeature(f4);
        }