Пример #1
0
 void RefreshDistances()
 {   // wird aufgerufen, wenn sich die Anzahl geändert hat
     // alle Längen werden gleich vorbesetzt.
     if (sections.Count < number)
     {   // nur verlängern, nicht kürzen
         for (int i = sections.Count; i < number; ++i)
         {
             sections.Add(0.0);
         }
     }
     for (int i = 0; i < sections.Count; ++i)
     {
         sections[i] = 1.0 / (double)number;
     }
     // die Untereinträge mit den Längen werden erzeugt
     DoubleProperty[] doubleproperties = new DoubleProperty[number];
     for (int i = 0; i < number; ++i)
     {
         DoubleProperty doubleProperty = new DoubleProperty("Constr.SplitCurve.Distance", Frame);
         doubleProperty.LabelText = StringTable.GetFormattedString("Constr.SplitCurve.Distance" + ".Label", i + 1);
         doubleProperty.UserData.Add("Index", i);
         doubleProperty.GetDoubleEvent += new DoubleProperty.GetDoubleDelegate(OnGetDistance);
         doubleProperty.SetDoubleEvent += new DoubleProperty.SetDoubleDelegate(OnSetDistance);
         doubleproperties[i]            = doubleProperty;
     }
     distances.SetShowProperties(doubleproperties);
     for (int i = 0; i < number; ++i)
     {
         DoubleProperty doubleProperty = doubleproperties[i] as DoubleProperty;
         doubleProperty.Refresh();
     }
 }
Пример #2
0
 internal void RefreshShowProperties()
 {
     if (Area == null)
     {
         section = new BoundingRect(0.0, 0.0, layout.PaperWidth, layout.PaperHeight);
     }
     else
     {
         section = Area.Extent;
     }
     scalingProperty.Refresh();
     horPos.Refresh();
     verPos.Refresh();
     left.Refresh();
     bottom.Refresh();
     width.Refresh();
     height.Refresh();
 }
Пример #3
0
        public override IPropertyEntry GetPropertyEntry(IFrame frame)
        {
            List <IPropertyEntry> se         = new List <IPropertyEntry>();
            GeoPointProperty      centerprop = new GeoPointProperty(frame, "SphericalSurface.Center");

            centerprop.ReadOnly   = true;
            centerprop.OnGetValue = new EditableProperty <GeoPoint> .GetValueDelegate(delegate() { return(center); });

            se.Add(centerprop);
            DoubleProperty radius = new DoubleProperty(frame, "SphericalSurface.Radius");

            radius.ReadOnly   = true;
            radius.OnGetValue = new EditableProperty <double> .GetValueDelegate(delegate() { return(xAxis.Length); });

            radius.Refresh();
            se.Add(radius);
            return(new GroupProperty("SphericalSurface", se.ToArray()));
        }