Ejemplo n.º 1
0
 public static void SetMainPropertiesToCircleDiagramModel(
     this CircleDiagramMainProperies mainPropeties, CircleDiagramModel model)
 {
     if (model == null || !model.IsCorrect() || mainPropeties == null)
     {
         return;
     }
     model.ChangeParametersValues(mainPropeties.CountLevels,
                                  new SolidBrush(mainPropeties.MainBackgroundColor),
                                  new SolidBrush(mainPropeties.RingBackgroundColor),
                                  new SolidBrush(mainPropeties.IntervalBackgroundColor),
                                  new Pen(mainPropeties.NodeBorderColor, mainPropeties.NodeBorderThickness),
                                  new Pen(mainPropeties.RingBorderColor, mainPropeties.RingBorderThickness),
                                  new Pen(mainPropeties.RelationshipPenColor, mainPropeties.RelationshipPenThickness),
                                  new SolidBrush(mainPropeties.NumerationColor), mainPropeties.NumerationFont,
                                  mainPropeties.NumerationBeginNumber, mainPropeties.NumerationIsInverted);
 }
Ejemplo n.º 2
0
 public static void GetMainPropertiesFromCircleDiagramModel(
     this CircleDiagramMainProperies mainProperties, CircleDiagramModel model)
 {
     if (model == null || !model.IsCorrect() || mainProperties == null)
     {
         return;
     }
     mainProperties.CountLevels              = model.CountLevels;
     mainProperties.MainBackgroundColor      = SerializeUtils.BrushToColor(model.MainBackground);
     mainProperties.RingBackgroundColor      = SerializeUtils.BrushToColor(model.RingBackground);
     mainProperties.IntervalBackgroundColor  = SerializeUtils.BrushToColor(model.IntervalBackground);
     mainProperties.NodeBorderColor          = model.NodeBorder.Color;
     mainProperties.NodeBorderThickness      = model.NodeBorder.Width;
     mainProperties.RingBorderColor          = model.RingBorder.Color;
     mainProperties.RingBorderThickness      = model.RingBorder.Width;
     mainProperties.RelationshipPenColor     = model.RelationshipPen.Color;
     mainProperties.RelationshipPenThickness = model.RelationshipPen.Width;
     mainProperties.NumerationColor          = SerializeUtils.BrushToColor(model.NumerationBrush);
     mainProperties.NumerationFont           = model.NumerationFont;
     mainProperties.NumerationBeginNumber    = model.NumerationBeginNumber;
     mainProperties.NumerationIsInverted     = model.NumerationIsInverted;
 }