/// <summary> /// Releases resources used for styles of the given <see cref="T:Dataweb.NShape.IStyleSet" />. /// </summary> public static void RemoveStyleSetTools(IStyleSet styleSet) { if (styleSet == null) { throw new ArgumentNullException("styleSet"); } // Delete GDI+ objects created from styles foreach (ICapStyle style in styleSet.CapStyles) { ToolCache.NotifyCapStyleChanged(style); } foreach (ICharacterStyle style in styleSet.CharacterStyles) { ToolCache.NotifyCharacterStyleChanged(style); } foreach (IColorStyle style in styleSet.ColorStyles) { ToolCache.NotifyColorStyleChanged(style); } foreach (IFillStyle style in styleSet.FillStyles) { ToolCache.NotifyFillStyleChanged(style); } foreach (ILineStyle style in styleSet.LineStyles) { ToolCache.NotifyLineStyleChanged(style); } foreach (IParagraphStyle style in styleSet.ParagraphStyles) { ToolCache.NotifyParagraphStyleChanged(style); } }
public static void Compare(IStyleSet designA, IStyleSet designB, int version) { foreach (ICapStyle styleA in designA.CapStyles) { ICapStyle styleB = designB.CapStyles[styleA.Name]; Compare(styleA, styleB, version); } foreach (ICharacterStyle styleA in designA.CharacterStyles) { ICharacterStyle styleB = designB.CharacterStyles[styleA.Name]; Compare(styleA, styleB, version); } foreach (IColorStyle styleA in designA.ColorStyles) { IColorStyle styleB = designB.ColorStyles[styleA.Name]; Compare(styleA, styleB, version); } foreach (IFillStyle styleA in designA.FillStyles) { IFillStyle styleB = designB.FillStyles[styleA.Name]; Compare(styleA, styleB, version); } foreach (ILineStyle styleA in designA.LineStyles) { ILineStyle styleB = designB.LineStyles[styleA.Name]; Compare(styleA, styleB, version); } foreach (IParagraphStyle styleA in designA.ParagraphStyles) { IParagraphStyle styleB = designB.ParagraphStyles[styleA.Name]; Compare(styleA, styleB, version); } }
/// <summary> /// Closes the project. /// </summary> public void Close() { if (Closing != null) { Closing(this, EventArgs.Empty); } if (IsOpen) { if (repository.IsOpen) { // Get styleSet before closing the repository IStyleSet styleSet = ((IStyleSetProvider)this).StyleSet; // Delete GDI+ objects created from styles ToolCache.RemoveStyleSetTools(styleSet); // Close Repository repository.Close(); } // Clean up project data settings.Clear(); model = null; history.Clear(); settings = new ProjectSettings(); // TODO 2: Unload dynamic libraries and remove the corresponding shape and model types. //RemoveAllLibraries(); } if (Closed != null) { Closed(this, EventArgs.Empty); } }
public StyleListBox(IStyleSet styleSet, Style style, bool showDefaultStyleItem, bool showOpenDesignerItem) : this() { if (styleSet == null) throw new ArgumentNullException("design"); if (style == null) throw new ArgumentNullException("style"); Initialize(styleSet, showDefaultStyleItem, showOpenDesignerItem, style.GetType(), style); }
/// <override></override> protected override void InitializeToDefault(IStyleSet styleSet) { base.InitializeToDefault(styleSet); FillStyle = styleSet.FillStyles.Transparent; Width = 40; Height = 70; }
/// <override></override> protected override void InitializeToDefault(IStyleSet styleSet) { base.InitializeToDefault(styleSet); pointBuffer = new Point[6]; Height = 60; Width = 20; }
/// <override></override> protected internal override void InitializeToDefault(IStyleSet styleSet) { foreach (Shape shape in ChildrenCollection) { shape.InitializeToDefault(styleSet); } }
/// <override></override> public override void MakePreview(IStyleSet styleSet) { foreach (Shape shape in ChildrenCollection) { shape.MakePreview(styleSet); } }
/// <override></override> protected override void InitializeToDefault(IStyleSet styleSet) { base.InitializeToDefault(styleSet); FillStyle = styleSet.FillStyles.Transparent; bodyHeightRatio = 1d / 3d; headWidth = (int)Math.Round(Width / 2f); }
public static void Compare(IStyleSet savedDesign, IStyleSet loadedDesign, int version) { foreach (ICapStyle savedStyle in savedDesign.CapStyles) { ICapStyle loadedStyle = loadedDesign.CapStyles[savedStyle.Name]; Compare(savedStyle, loadedStyle, version); } foreach (ICharacterStyle savedStyle in savedDesign.CharacterStyles) { ICharacterStyle loadedStyle = loadedDesign.CharacterStyles[savedStyle.Name]; Compare(savedStyle, loadedStyle, version); } foreach (IColorStyle savedStyle in savedDesign.ColorStyles) { IColorStyle loadedStyle = loadedDesign.ColorStyles[savedStyle.Name]; Compare(savedStyle, loadedStyle, version); } foreach (IFillStyle savedStyle in savedDesign.FillStyles) { IFillStyle loadedStyle = loadedDesign.FillStyles[savedStyle.Name]; Compare(savedStyle, loadedStyle, version); } foreach (ILineStyle savedStyle in savedDesign.LineStyles) { ILineStyle loadedStyle = loadedDesign.LineStyles[savedStyle.Name]; Compare(savedStyle, loadedStyle, version); } foreach (IParagraphStyle savedStyle in savedDesign.ParagraphStyles) { IParagraphStyle loadedStyle = loadedDesign.ParagraphStyles[savedStyle.Name]; Compare(savedStyle, loadedStyle, version); } }
/// <override></override> protected internal override void InitializeToDefault(IStyleSet styleSet) { base.InitializeToDefault(styleSet); gluePointPos.X = (int)Math.Round(X - (Width / 2f)) - 10; gluePointPos.Y = (int)Math.Round(Y - (Height / 2f)) - 10; calcInfo = GluePointCalcInfo.Empty; maintainOrientation = true; }
public StyleListBox(IWindowsFormsEditorService editorService, IStyleSetProvider styleSetProvider, IStyleSet styleSet, Type selectedStyleType, bool showDefaultStyleItem, bool showOpenDesignerItem) : this(editorService) { if (styleSetProvider == null) throw new ArgumentNullException("styleSetProvider"); if (styleSet == null) throw new ArgumentNullException("styleSet"); if (selectedStyleType == null) throw new ArgumentNullException("selectedStyleType"); this.styleSetProvider = styleSetProvider; Initialize(styleSet, showDefaultStyleItem, showOpenDesignerItem, selectedStyleType, null); }
/// <override></override> protected internal override void InitializeToDefault(IStyleSet styleSet) { base.InitializeToDefault(styleSet); AutoSize = true; Text = "Text"; // override standard Line- and FillStyles FillStyle = styleSet.FillStyles.Transparent; LineStyle = styleSet.LineStyles.None; }
/// <summary> /// ctor with a stylesheet for customized formatting /// </summary> /// <param name="styleSet"></param> public PdfTextFormatter(IStyleSet styleSet) { BackColor = new Color(211, 223, 240); TableBorderColor = new Color(217, 230, 245); HeadLineColor = Colors.Black; DetailsColor = Colors.Black; StyleSet = styleSet; }
private void Initialize(IStyleSet styleSet, bool showDefaultStyleItem, bool showOpenDesignerItem, Type styleType, IStyle style) { this.styleSet = styleSet; if (showDefaultStyleItem) defaultStyleItem = new DefaultStyleItem(); if (showOpenDesignerItem && styleSetProvider != null) openDesignerItem = new OpenDesignerItem(); StyleCategoryFromType(styleType); if (style != null) SelectedItem = preselectedStyle = style; }
/// <override></override> protected internal ShapeGroup(ShapeType shapeType, IStyleSet styleSet) : base() { if (shapeType == null) { throw new ArgumentNullException("shapeType"); } this.shapeType = shapeType; this.template = null; ChildrenCollection = (GroupShapeAggregation)CreateChildrenCollection(DefaultCapacity); }
/// <override></override> protected internal ShapeGroup(ShapeType shapeType, IStyleSet styleSet) : base() { if (shapeType == null) { throw new ArgumentNullException("shapeType"); } this.shapeType = shapeType; this.template = null; children = new GroupShapeAggregation(this); }
/// <ToBeCompleted></ToBeCompleted> public void SetPreviewStyles(IStyleSet styleSet) { if (styleSet == null) { throw new ArgumentNullException("styleSet"); } foreach (Shape shape in shapes) { shape.MakePreview(styleSet); } }
/// <override></override> protected override void InitializeToDefault(IStyleSet styleSet) { base.InitializeToDefault(styleSet); if (Template == null) { //StartEndCapStyle = styleSet.GetCapStyle("Circle Cap"); // @@Kurt // Den Style "Circle Cap" gibt es nicht in den Standard-Designs. Da müssen wir uns erst noch was überlegen wie // man das Design um benötigte Styles erweitern kann (am Besten beim Registrieren der GeneralShapes) EndCapStyleInternal = styleSet.CapStyles.Special1; } }
public StyleListBox(IWindowsFormsEditorService editorService, IStyleSet styleSet, Type selectedStyleType, bool showDefaultStyleItem, bool showOpenDesignerItem) : this(editorService) { if (styleSet == null) { throw new ArgumentNullException("styleSet"); } if (selectedStyleType == null) { throw new ArgumentNullException("selectedStyleType"); } Initialize(styleSet, showDefaultStyleItem, showOpenDesignerItem, selectedStyleType, null); }
public StyleListBox(IStyleSet styleSet, Style style, bool showDefaultStyleItem, bool showOpenDesignerItem) : this() { if (styleSet == null) { throw new ArgumentNullException("design"); } if (style == null) { throw new ArgumentNullException("style"); } Initialize(styleSet, showDefaultStyleItem, showOpenDesignerItem, style.GetType(), style); }
/// <summary> /// Releases resources used for styles of the given <see cref="T:Dataweb.NShape.IStyleSet" />. /// </summary> public static void RemoveStyleSetTools(IStyleSet styleSet) { if (styleSet == null) throw new ArgumentNullException("styleSet"); // delete GDI+ objects created from styles foreach (ICapStyle style in styleSet.CapStyles) ToolCache.NotifyCapStyleChanged(style); foreach (ICharacterStyle style in styleSet.CharacterStyles) ToolCache.NotifyCharacterStyleChanged(style); foreach (IColorStyle style in styleSet.ColorStyles) ToolCache.NotifyColorStyleChanged(style); foreach (IFillStyle style in styleSet.FillStyles) ToolCache.NotifyFillStyleChanged(style); foreach (ILineStyle style in styleSet.LineStyles) ToolCache.NotifyLineStyleChanged(style); foreach (IParagraphStyle style in styleSet.ParagraphStyles) ToolCache.NotifyParagraphStyleChanged(style); }
/// <override></override> protected internal override void InitializeToDefault(IStyleSet styleSet) { base.InitializeToDefault(styleSet); pointBuffer[0].X = 0; pointBuffer[0].Y = -20; pointBuffer[1].X = -20; pointBuffer[1].Y = 20; pointBuffer[2].X = 20; pointBuffer[2].Y = 20; int x, y; Geometry.CalcPolygonBalancePoint(pointBuffer, out x, out y); for (int i = shapePoints.Length - 1; i >= 0; --i) { shapePoints[i].X = pointBuffer[i].X - x; shapePoints[i].Y = pointBuffer[i].Y - y; } }
protected FreeTriangle(ShapeType shapeType, IStyleSet styleSet) : base(shapeType, styleSet) { }
/// <override></override> protected internal ShapeGroup(ShapeType shapeType, IStyleSet styleSet) : base() { if (shapeType == null) throw new ArgumentNullException("shapeType"); this.shapeType = shapeType; this.template = null; children = new GroupShapeAggregation(this); }
/// <override></override> protected internal DocumentSymbol(ShapeType shapeType, IStyleSet styleSet) : base(shapeType, styleSet) { }
protected internal ExtractSymbol(ShapeType shapeType, IStyleSet styleSet) : base(shapeType, styleSet) { }
protected internal Polyline(ShapeType shapeType, IStyleSet styleSet) : base(shapeType, styleSet) { }
/// <override></override> protected override void InitializeToDefault(IStyleSet styleSet) { base.InitializeToDefault(styleSet); Height = 40; Width = 40; }
/// <ToBeCompleted></ToBeCompleted> protected internal PathBasedPlanarShape(ShapeType shapeType, IStyleSet styleSet) : base(shapeType, styleSet) { Construct(); }
/// <override></override> public override void MakePreview(IStyleSet styleSet) { base.MakePreview(styleSet); privateFillStyle = styleSet.GetPreviewStyle(FillStyle); }
/// <summary> /// Sets private preview styles for all used styles. /// </summary> /// <param name="styleSet"></param> public abstract void MakePreview(IStyleSet styleSet);
/// <override></override> protected internal override void InitializeToDefault(IStyleSet styleSet) { base.InitializeToDefault(styleSet); controlPoints = new Point[ControlPointCount]; FillStyle = styleSet.FillStyles.Blue; }
protected internal IsoscelesTriangle(ShapeType shapeType, IStyleSet styleSet) : base(shapeType, styleSet) { }
protected internal CoreSymbol(ShapeType shapeType, IStyleSet styleSet) : base(shapeType, styleSet) { }
/// <override></override> public override void MakePreview(IStyleSet styleSet) { base.MakePreview(styleSet); privateCharacterStyle = styleSet.GetPreviewStyle(CharacterStyle); privateParagraphStyle = styleSet.GetPreviewStyle(ParagraphStyle); }
/// <override></override> protected internal DecisionSymbol(ShapeType shapeType, IStyleSet styleSet) : base(shapeType, styleSet) { }
protected internal DisplaySymbol(ShapeType shapeType, IStyleSet styleSet) : base(shapeType, styleSet) { }
protected internal CommLinkSymbol(ShapeType shapeType, IStyleSet styleSet) : base(shapeType, styleSet) { pointBuffer = new Point[6]; }
protected internal DrumStorageSymbol(ShapeType shapeType, IStyleSet styleSet) : base(shapeType, styleSet) { }
protected internal PreparationSymbol(ShapeType shapeType, IStyleSet styleSet) : base(shapeType, styleSet) { }
/// <override></override> public override void MakePreview(IStyleSet styleSet) { foreach (Shape shape in children) shape.MakePreview(styleSet); }
/// <override></override> protected internal ProcessSymbol(ShapeType shapeType, IStyleSet styleSet) : base(shapeType, styleSet) { }
/// <override></override> protected internal override void InitializeToDefault(IStyleSet styleSet) { foreach (Shape shape in children) shape.InitializeToDefault(styleSet); }
/// <override></override> protected internal TerminatorSymbol(ShapeType shapeType, IStyleSet styleSet) : base(shapeType, styleSet) { }
protected internal CustomPicture(ShapeType shapeType, IStyleSet styleSet) : base(shapeType, styleSet) { Construct(); }
protected internal FlowChartDiamondBase(ShapeType shapeType, IStyleSet styleSet) : base(shapeType, styleSet) { }
/// <summary> /// Sets the state of a freshly created shape to the default values. /// </summary> /// <param name="styleSet"></param> /// <remarks>Only used by the ShapeType class.</remarks> protected internal abstract void InitializeToDefault(IStyleSet styleSet);
protected internal FlowChartEllipseBase(ShapeType shapeType, IStyleSet styleSet) : base(shapeType, styleSet) { }
protected internal FlowChartTriangleBase(ShapeType shapeType, IStyleSet styleSet) : base(shapeType, styleSet) { }
protected internal RectangularLine(ShapeType shapeType, IStyleSet styleSet) : base(shapeType, styleSet) { }
protected internal ManualInputSymbol(ShapeType shapeType, IStyleSet styleSet) : base(shapeType, styleSet) { }
/// <override></override> protected internal override void InitializeToDefault(IStyleSet styleSet) { base.InitializeToDefault(styleSet); CharacterStyle = styleSet.CharacterStyles.Normal; ParagraphStyle = styleSet.ParagraphStyles.Title; }
/// <override></override> protected internal ManualOperationSymbol(ShapeType shapeType, IStyleSet styleSet) : base(shapeType, styleSet) { }
/// <summary> /// Initializes a new instance of <see cref="T:Dataweb.NShape.Advanced.CaptionedShape" />. /// </summary> protected internal CaptionedShapeBase(ShapeType shapeType, IStyleSet styleSet) : base(shapeType, styleSet) { }
protected internal OffpageConnectorSymbol(ShapeType shapeType, IStyleSet styleSet) : base(shapeType, styleSet) { }